(file) Return to ProviderRegistrationProvider.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ControlProviders / ProviderRegistrationProvider

Diff for /pegasus/src/Pegasus/ControlProviders/ProviderRegistrationProvider/ProviderRegistrationProvider.cpp between version 1.34 and 1.37

version 1.34, 2002/09/10 03:14:39 version 1.37, 2002/09/19 16:17:36
Line 45 
Line 45 
 /** /**
    The name of the operational status property    The name of the operational status property
 */ */
 static const char _PROPERTY_OPERATIONALSTATUS [] = "OperationalStatus";  static const CIMName _PROPERTY_OPERATIONALSTATUS  =
       CIMName ("OperationalStatus");
  
 /** /**
    The name of the name property for PG_Provider class    The name of the name property for PG_Provider class
 */ */
 static const char _PROPERTY_PROVIDER_NAME [] = "Name";  static const CIMName _PROPERTY_PROVIDER_NAME  = CIMName ("Name");
  
 /** /**
    The name of the Name property for PG_ProviderModule class    The name of the Name property for PG_ProviderModule class
 */ */
 static const char _PROPERTY_PROVIDERMODULE_NAME [] = "Name";  static const CIMName _PROPERTY_PROVIDERMODULE_NAME  = CIMName ("Name");
  
 /** /**
    The name of the Vendor property for PG_ProviderModule class    The name of the Vendor property for PG_ProviderModule class
 */ */
 static const char _PROPERTY_VENDOR [] = "Vendor";  static const CIMName _PROPERTY_VENDOR  = CIMName ("Vendor");
  
 /** /**
    The name of the Version property for PG_ProviderModule class    The name of the Version property for PG_ProviderModule class
 */ */
 static const char _PROPERTY_VERSION [] = "Version";  static const CIMName _PROPERTY_VERSION  = CIMName ("Version");
  
 /** /**
    The name of the interface type property for PG_ProviderModule class    The name of the interface type property for PG_ProviderModule class
 */ */
 static const char _PROPERTY_INTERFACETYPE [] = "InterfaceType";  static const CIMName _PROPERTY_INTERFACETYPE  = CIMName ("InterfaceType");
  
 /** /**
    The name of the interface version property for PG_ProviderModule class    The name of the interface version property for PG_ProviderModule class
 */ */
 static const char _PROPERTY_INTERFACEVERSION [] = "InterfaceVersion";  static const CIMName _PROPERTY_INTERFACEVERSION  = CIMName ("InterfaceVersion");
  
 /** /**
    The name of the location property for PG_ProviderModule class    The name of the location property for PG_ProviderModule class
 */ */
 static const char _PROPERTY_LOCATION [] = "Location";  static const CIMName _PROPERTY_LOCATION  = CIMName ("Location");
  
 /** /**
    The name of the CapabilityID property for provider capabilities class    The name of the CapabilityID property for provider capabilities class
 */ */
 static const char _PROPERTY_CAPABILITYID [] = "CapabilityID";  static const CIMName _PROPERTY_CAPABILITYID  = CIMName ("CapabilityID");
  
 /** /**
    The name of the provider module name  property for provider capabilities class    The name of the provider module name  property for provider capabilities class
 */ */
 static const char _PROPERTY_PROVIDERMODULENAME [] = "ProviderModuleName";  static const CIMName _PROPERTY_PROVIDERMODULENAME  =
       CIMName ("ProviderModuleName");
  
 /** /**
    The name of the provider name  property for provider capabilities class    The name of the provider name  property for provider capabilities class
 */ */
 static const char _PROPERTY_PROVIDERNAME [] = "ProviderName";  static const CIMName _PROPERTY_PROVIDERNAME  = CIMName ("ProviderName");
  
 /** /**
    The name of the classname property for provider capabilities class    The name of the classname property for provider capabilities class
 */ */
 static const char _PROPERTY_CLASSNAME [] = "ClassName";  static const CIMName _PROPERTY_CLASSNAME  = CIMName ("ClassName");
  
 /** /**
    The name of the Namespace property for provider capabilities class    The name of the Namespace property for provider capabilities class
 */ */
 static const char _PROPERTY_NAMESPACES [] = "Namespaces";  static const CIMName _PROPERTY_NAMESPACES  = CIMName ("Namespaces");
  
 /** /**
    The name of the provider type  property for provider capabilities class    The name of the provider type  property for provider capabilities class
 */ */
 static const char _PROPERTY_PROVIDERTYPE [] = "ProviderType";  static const CIMName _PROPERTY_PROVIDERTYPE  = CIMName ("ProviderType");
  
 /** /**
    The name of the supported properties property for provider capabilities class    The name of the supported properties property for provider capabilities class
 */ */
 static const char _PROPERTY_SUPPORTEDPROPERTIES [] = "SupportedProperties";  static const CIMName _PROPERTY_SUPPORTEDPROPERTIES  =
       CIMName ("SupportedProperties");
  
 /** /**
    The name of the supported methods property for provider capabilities class    The name of the supported methods property for provider capabilities class
 */ */
 static const char _PROPERTY_SUPPORTEDMETHODS [] = "SupportedMethods";  static const CIMName _PROPERTY_SUPPORTEDMETHODS  = CIMName ("SupportedMethods");
  
 /** /**
    Registered instance provider type    Registered instance provider type
Line 145 
Line 148 
 /** /**
    stopping provider method    stopping provider method
 */ */
 static const char _STOP_PROVIDER[]     = "Stop";  static const CIMName _STOP_PROVIDER     = CIMName ("Stop");
  
 /** /**
    starting provider method    starting provider method
 */ */
 static const char _START_PROVIDER[]   = "Start";  static const CIMName _START_PROVIDER   = CIMName ("Start");
  
 /** /**
    Provider status    Provider status
Line 206 
Line 209 
     InstanceResponseHandler & handler)     InstanceResponseHandler & handler)
 { {
  
     if(!String::equalNoCase(instanceReference.getNameSpace(),      if(!instanceReference.getNameSpace().equal (PEGASUS_NAMESPACENAME_INTEROP))
                             PEGASUS_NAMESPACENAME_INTEROP))  
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
                                     instanceReference.getNameSpace());              instanceReference.getNameSpace().getString());
     }     }
  
     // ensure the class existing in the specified namespace     // ensure the class existing in the specified namespace
     String className = instanceReference.getClassName();      CIMName className = instanceReference.getClassName();
  
     if(!String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDER) &&      if(!className.equal (PEGASUS_CLASSNAME_PROVIDER) &&
        !String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDERCAPABILITIES) &&         !className.equal (PEGASUS_CLASSNAME_PROVIDERCAPABILITIES) &&
        !String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDERMODULE))         !className.equal (PEGASUS_CLASSNAME_PROVIDERMODULE))
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, className);          throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
               className.getString());
     }     }
  
     // begin processing the request     // begin processing the request
Line 252 
Line 255 
     const CIMPropertyList & propertyList,     const CIMPropertyList & propertyList,
     InstanceResponseHandler & handler)     InstanceResponseHandler & handler)
 { {
     if(!String::equalNoCase(classReference.getNameSpace(),      if(!classReference.getNameSpace().equal (PEGASUS_NAMESPACENAME_INTEROP))
                             PEGASUS_NAMESPACENAME_INTEROP))  
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, classReference.getNameSpace());          throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
               classReference.getNameSpace().getString());
     }     }
  
     // ensure the class existing in the specified namespace     // ensure the class existing in the specified namespace
     String className = classReference.getClassName();      CIMName className = classReference.getClassName();
  
     if(!String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDER) &&      if(!className.equal (PEGASUS_CLASSNAME_PROVIDER) &&
        !String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDERCAPABILITIES) &&         !className.equal (PEGASUS_CLASSNAME_PROVIDERCAPABILITIES) &&
        !String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDERMODULE))         !className.equal (PEGASUS_CLASSNAME_PROVIDERMODULE))
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, className);          throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
               className.getString());
     }     }
  
     // begin processing the request     // begin processing the request
Line 294 
Line 298 
     const CIMObjectPath & classReference,     const CIMObjectPath & classReference,
     ObjectPathResponseHandler & handler)     ObjectPathResponseHandler & handler)
 { {
     if(!String::equalNoCase(classReference.getNameSpace(),      if(!classReference.getNameSpace().equal (PEGASUS_NAMESPACENAME_INTEROP))
                             PEGASUS_NAMESPACENAME_INTEROP))  
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, classReference.getNameSpace());          throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
               classReference.getNameSpace().getString());
     }     }
  
     // ensure the class existing in the specified namespace     // ensure the class existing in the specified namespace
     String className = classReference.getClassName();      CIMName className = classReference.getClassName();
  
     if(!String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDER) &&      if(!className.equal (PEGASUS_CLASSNAME_PROVIDER) &&
        !String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDERCAPABILITIES) &&         !className.equal (PEGASUS_CLASSNAME_PROVIDERCAPABILITIES) &&
        !String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDERMODULE))         !className.equal (PEGASUS_CLASSNAME_PROVIDERMODULE))
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, className);          throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
               className.getString());
     }     }
  
     // begin processing the request     // begin processing the request
Line 347 
Line 352 
     String userName;     String userName;
     try     try
     {     {
         IdentityContainer container = context.get(CONTEXT_IDENTITY);          IdentityContainer container = context.get(IdentityContainer::NAME);
         userName = container.getUserName();         userName = container.getUserName();
     }     }
     catch (...)     catch (...)
Line 361 
Line 366 
             "You must have superuser privilege to modify the registration.");             "You must have superuser privilege to modify the registration.");
     }     }
  
     if(!String::equalNoCase(instanceReference.getNameSpace(),      if(!instanceReference.getNameSpace().equal (PEGASUS_NAMESPACENAME_INTEROP))
                             PEGASUS_NAMESPACENAME_INTEROP))  
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, instanceReference.getNameSpace());          throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
               instanceReference.getNameSpace().getString());
     }     }
  
     //     //
     // only support to modify the instance of PG_ProviderCapabilities     // only support to modify the instance of PG_ProviderCapabilities
     //     //
     if (!String::equalNoCase(instanceReference.getClassName(),      if (!instanceReference.getClassName().equal
                              PEGASUS_CLASSNAME_PROVIDERCAPABILITIES))          (PEGASUS_CLASSNAME_PROVIDERCAPABILITIES))
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, instanceReference.getClassName());          throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
               instanceReference.getClassName().getString());
     }     }
  
     //     //
Line 389 
Line 395 
     Array<CIMName> propertyArray = propertyList.getPropertyNameArray();     Array<CIMName> propertyArray = propertyList.getPropertyNameArray();
     for (Uint32 i=0; i<propertyArray.size(); i++)     for (Uint32 i=0; i<propertyArray.size(); i++)
     {     {
         if (!String::equalNoCase(propertyArray[i], _PROPERTY_NAMESPACES) &&          if (!propertyArray[i].equal (_PROPERTY_NAMESPACES) &&
             !String::equalNoCase(propertyArray[i], _PROPERTY_SUPPORTEDPROPERTIES) &&              !propertyArray[i].equal (_PROPERTY_SUPPORTEDPROPERTIES) &&
             !String::equalNoCase(propertyArray[i], _PROPERTY_SUPPORTEDMETHODS))              !propertyArray[i].equal (_PROPERTY_SUPPORTEDMETHODS))
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, propertyArray[i]);              throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
                   propertyArray[i].getString());
         }         }
     }     }
  
Line 425 
Line 432 
     String userName;     String userName;
     try     try
     {     {
         IdentityContainer container = context.get(CONTEXT_IDENTITY);          IdentityContainer container = context.get(IdentityContainer::NAME);
         userName = container.getUserName();         userName = container.getUserName();
     }     }
     catch (...)     catch (...)
Line 439 
Line 446 
             "You must have superuser privilege to register providers.");             "You must have superuser privilege to register providers.");
     }     }
  
     String className = instanceReference.getClassName();      CIMName className = instanceReference.getClassName();
     String nameSpace = instanceReference.getNameSpace();      CIMNamespaceName nameSpace = instanceReference.getNameSpace();
  
     CIMObjectPath returnReference;     CIMObjectPath returnReference;
  
     CIMInstance instance = instanceObject;     CIMInstance instance = instanceObject;
  
     if(!String::equalNoCase(nameSpace, PEGASUS_NAMESPACENAME_INTEROP))      if(!nameSpace.equal (PEGASUS_NAMESPACENAME_INTEROP))
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, nameSpace);          throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
               nameSpace.getString());
     }     }
  
     // ensure the class existing in the specified namespace     // ensure the class existing in the specified namespace
     if(!String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDER) &&      if(!className.equal (PEGASUS_CLASSNAME_PROVIDER) &&
        !String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDERCAPABILITIES) &&         !className.equal (PEGASUS_CLASSNAME_PROVIDERCAPABILITIES) &&
        !String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDERMODULE))         !className.equal (PEGASUS_CLASSNAME_PROVIDERMODULE))
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, className);          throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
               className.getString());
     }     }
  
     //     //
     // Check all required properties are set     // Check all required properties are set
     //     //
     if(String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDERMODULE))      if (className.equal (PEGASUS_CLASSNAME_PROVIDERMODULE))
     {     {
         //         //
         // Name, Version, InterfaceType, InterfaceVersion, and Location         // Name, Version, InterfaceType, InterfaceVersion, and Location
Line 517 
Line 526 
                 (_PROPERTY_OPERATIONALSTATUS, _operationalStatus));                 (_PROPERTY_OPERATIONALSTATUS, _operationalStatus));
         }         }
     }     }
     else if(String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDERCAPABILITIES))      else if (className.equal (PEGASUS_CLASSNAME_PROVIDERCAPABILITIES))
     {     {
         //         //
         // ProviderModuleName, ProviderName, InstanceID, ClassName,         // ProviderModuleName, ProviderName, InstanceID, ClassName,
Line 611 
Line 620 
     String userName;     String userName;
     try     try
     {     {
         IdentityContainer container = context.get(CONTEXT_IDENTITY);          IdentityContainer container = context.get(IdentityContainer::NAME);
         userName = container.getUserName();         userName = container.getUserName();
     }     }
     catch (...)     catch (...)
Line 625 
Line 634 
             "You must have superuser privilege to unregister providers.");             "You must have superuser privilege to unregister providers.");
     }     }
  
     if(!String::equalNoCase(instanceReference.getNameSpace(),      if(!instanceReference.getNameSpace().equal (PEGASUS_NAMESPACENAME_INTEROP))
                             PEGASUS_NAMESPACENAME_INTEROP))  
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, instanceReference.getNameSpace());          throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
               instanceReference.getNameSpace().getString());
     }     }
  
     String className = instanceReference.getClassName();      CIMName className = instanceReference.getClassName();
  
     // ensure the class existing in the specified namespace     // ensure the class existing in the specified namespace
     if(!String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDER) &&      if(!className.equal (PEGASUS_CLASSNAME_PROVIDER) &&
        !String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDERCAPABILITIES) &&         !className.equal (PEGASUS_CLASSNAME_PROVIDERCAPABILITIES) &&
        !String::equalNoCase(className, PEGASUS_CLASSNAME_PROVIDERMODULE))         !className.equal (PEGASUS_CLASSNAME_PROVIDERMODULE))
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, className);          throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
               className.getString());
     }     }
  
     // begin processing the request     // begin processing the request
Line 669 
Line 679 
     String userName;     String userName;
     try     try
     {     {
         IdentityContainer container = context.get(CONTEXT_IDENTITY);          IdentityContainer container = context.get(IdentityContainer::NAME);
         userName = container.getUserName();         userName = container.getUserName();
     }     }
     catch (...)     catch (...)
Line 683 
Line 693 
             "You must have superuser privilege to disable or enable providers.");             "You must have superuser privilege to disable or enable providers.");
     }     }
  
     if(!String::equalNoCase(objectReference.getNameSpace(),      if(!objectReference.getNameSpace().equal (PEGASUS_NAMESPACENAME_INTEROP))
                             PEGASUS_NAMESPACENAME_INTEROP))  
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, objectReference.getNameSpace());          throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
               objectReference.getNameSpace().getString());
     }     }
  
     String moduleName;     String moduleName;
     Boolean moduleFound = false;     Boolean moduleFound = false;
  
     // get module name from reference     // get module name from reference
     Array<KeyBinding> keys = objectReference.getKeyBindings();      Array<CIMKeyBinding> keys = objectReference.getKeyBindings();
  
     for(Uint32 i=0; i<keys.size() ; i++)     for(Uint32 i=0; i<keys.size() ; i++)
     {     {
         if(String::equalNoCase(keys[i].getName(), _PROPERTY_PROVIDERMODULE_NAME))          if(keys[i].getName().equal (_PROPERTY_PROVIDERMODULE_NAME))
         {         {
             moduleName = keys[i].getValue();             moduleName = keys[i].getValue();
             moduleFound = true;             moduleFound = true;


Legend:
Removed from v.1.34  
changed lines
  Added in v.1.37

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2