(file) Return to ProviderRegistrar.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManager2 / Attic

Diff for /pegasus/src/Pegasus/ProviderManager2/Attic/ProviderRegistrar.cpp between version 1.7 and 1.7.6.1

version 1.7, 2003/11/12 13:19:19 version 1.7.6.1, 2004/02/19 16:31:32
Line 25 
Line 25 
 // //
 // Author: Chip Vincent (cvincent@us.ibm.com) // Author: Chip Vincent (cvincent@us.ibm.com)
 // //
 // Modified By:  // Modified By: Adrian Schuur (schuur@de-ibm.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 34 
Line 34 
 #include <Pegasus/Common/Constants.h> #include <Pegasus/Common/Constants.h>
 #include <Pegasus/Common/Tracer.h> #include <Pegasus/Common/Tracer.h>
 #include <Pegasus/Common/Pair.h> #include <Pegasus/Common/Pair.h>
   #include <Pegasus/Common/Tracer.h>
   #include <Pegasus/Common/Logger.h>
   #include <Pegasus/Common/MessageLoader.h> //l10n
  
 #include <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h> #include <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h>
 #include <Pegasus/ProviderManager2/ProviderType.h> #include <Pegasus/ProviderManager2/ProviderType.h>
Line 193 
Line 196 
 { {
 } }
  
   static const Uint16 _MODULE_STOPPING = 9;
   static const Uint16 _MODULE_STOPPED  = 10;
   
   static void checkBlocked(CIMInstance &pm)
   {
       PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, "checkBlocked");
   
       Array<Uint16> operationalStatus;
   
       Uint32 pos = pm.findProperty(CIMName ("OperationalStatus"));
       if(pos == PEG_NOT_FOUND) {
           PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,
               "OperationalStatus not found.");
           PEG_METHOD_EXIT();
           //l10n
           //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, "provider lookup failed.");
           throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, MessageLoaderParms(
                                                   "ProviderManager.ProviderManagerService.PROVIDER_LOOKUP_FAILED",
                                                   "provider lookup failed."));
       }
   
       pm.getProperty(pos).getValue().get(operationalStatus);
       for(Uint32 i = 0; i < operationalStatus.size(); i++) {
           if(operationalStatus[i] == _MODULE_STOPPED ||
              operationalStatus[i] == _MODULE_STOPPING) {
               PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,
                   "Provider blocked.");
               PEG_METHOD_EXIT();
                           //l10n
               //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_ACCESS_DENIED, "provider blocked.");
               throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_ACCESS_DENIED, MessageLoaderParms(
                                   "ProviderManager.ProviderManagerService.PROVIDER_BLOCKED",
                                   "provider blocked."));
           }
       }
   }
   
 // need at least the object and the one capability. // need at least the object and the one capability.
 // for example, // for example,
 //  "//localhost/root/cimv2:CIM_ComputerSystem", INSTANCE //  "//localhost/root/cimv2:CIM_ComputerSystem", INSTANCE
Line 202 
Line 242 
  
 // the method will return the logical and physical provider names associated with the object and capability. // the method will return the logical and physical provider names associated with the object and capability.
  
 ProviderName ProviderRegistrar::findProvider(const ProviderName & providerName)  ProviderName ProviderRegistrar::findProvider(const ProviderName & providerName, Boolean test)
 { {
     CIMObjectPath objectName = providerName.getObjectName();     CIMObjectPath objectName = providerName.getObjectName();
     Uint32 flags = providerName.getCapabilitiesMask();     Uint32 flags = providerName.getCapabilitiesMask();
Line 221 
Line 261 
        case 2: //ProviderType::INSTANCE        case 2: //ProviderType::INSTANCE
           if (_prm->lookupInstanceProvider(objectName.getNameSpace(),objectName.getClassName(),           if (_prm->lookupInstanceProvider(objectName.getNameSpace(),objectName.getClassName(),
                 provider,providerModule,0)) {                 provider,providerModule,0)) {
                 if (test) checkBlocked(providerModule);
               return ProviderName(providerName.getObjectName(),               return ProviderName(providerName.getObjectName(),
                     provider.getProperty(providerModule.findProperty                      provider.getProperty(provider.findProperty
                        ("Name")).getValue ().toString (),                        ("Name")).getValue ().toString (),
                     providerModule.getProperty(providerModule.findProperty                     providerModule.getProperty(providerModule.findProperty
                        ("Location")).getValue().toString(),                        ("Location")).getValue().toString(),
Line 234 
Line 275 
        case 5: //ProviderType::ASSOCIATION        case 5: //ProviderType::ASSOCIATION
           if (_prm->lookupInstanceProvider(objectName.getNameSpace(),objectName.getClassName(),           if (_prm->lookupInstanceProvider(objectName.getNameSpace(),objectName.getClassName(),
                 provider,providerModule,1)) {                 provider,providerModule,1)) {
                 if (test) checkBlocked(providerModule);
               return ProviderName(providerName.getObjectName(),               return ProviderName(providerName.getObjectName(),
                     provider.getProperty(providerModule.findProperty                      provider.getProperty(provider.findProperty
                        ("Name")).getValue ().toString (),                        ("Name")).getValue ().toString (),
                     providerModule.getProperty(providerModule.findProperty                     providerModule.getProperty(providerModule.findProperty
                        ("Location")).getValue().toString(),                        ("Location")).getValue().toString(),


Legend:
Removed from v.1.7  
changed lines
  Added in v.1.7.6.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2