(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.75 and 1.117

version 1.75, 2005/02/05 23:00:11 version 1.117, 2010/10/29 05:29:51
Line 1 
Line 1 
 //%2005////////////////////////////////////////////////////////////////////////  //%LICENSE////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development  // Licensed to The Open Group (TOG) under one or more contributor license
 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.  // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;  // this work for additional information regarding copyright ownership.
 // IBM Corp.; EMC Corporation, The Open Group.  // Each contributor licenses this file to you under the OpenPegasus Open
 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;  // Source License; you may not use this file except in compliance with the
 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.  // License.
 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;  //
 // EMC Corporation; VERITAS Software Corporation; The Open Group.  // Permission is hereby granted, free of charge, to any person obtaining a
 //  // copy of this software and associated documentation files (the "Software"),
 // Permission is hereby granted, free of charge, to any person obtaining a copy  // to deal in the Software without restriction, including without limitation
 // of this software and associated documentation files (the "Software"), to  // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 // deal in the Software without restriction, including without limitation the  // and/or sell copies of the Software, and to permit persons to whom the
 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or  // Software is furnished to do so, subject to the following conditions:
 // sell copies of the Software, and to permit persons to whom the Software is  //
 // furnished to do so, subject to the following conditions:  // The above copyright notice and this permission notice shall be included
 //  // in all copies or substantial portions of the Software.
 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN  //
 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT  // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR  // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT  // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN  // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION  // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //  
 //==============================================================================  
 //  
 // Author: Yi Zhou (yi_zhou@hp.com)  
 //  
 // Modified By: Chip Vincent (cvincent@us.ibm.com)  
 //              Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)  
 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)  
 //              Carol Ann Krug Graves, Hewlett-Packard Company  
 //                  (carolann_graves@hp.com)  
 //              Seema Gupta (gseema@in.ibm.com) for PEP135  
 // //
   //////////////////////////////////////////////////////////////////////////
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include "ProviderRegistrationProvider.h" #include "ProviderRegistrationProvider.h"
Line 48 
Line 38 
 #include <Pegasus/Common/System.h> #include <Pegasus/Common/System.h>
 #include <Pegasus/Common/MessageLoader.h> //l10n #include <Pegasus/Common/MessageLoader.h> //l10n
 #include <Pegasus/Common/Constants.h> #include <Pegasus/Common/Constants.h>
   #include <Pegasus/Common/Tracer.h>
   #include <Pegasus/Common/CIMNameCast.h>
   
   #include <Pegasus/Server/ProviderRegistrationManager/ProviderManagerMap.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 /** /**
    The name of the CapabilityID property for provider capabilities class    The name of the CapabilityID property for provider capabilities class
 */ */
 static const CIMName _PROPERTY_CAPABILITYID  = CIMName ("CapabilityID");  static const CIMName _PROPERTY_CAPABILITYID = CIMNameCast("CapabilityID");
  
 /** /**
    stopping provider method    stopping provider method
 */ */
 static const CIMName _STOP_PROVIDER     = CIMName ("Stop");  static const CIMName _STOP_PROVIDER = CIMNameCast("Stop");
  
 /** /**
    starting provider method    starting provider method
 */ */
 static const CIMName _START_PROVIDER   = CIMName ("Start");  static const CIMName _START_PROVIDER = CIMNameCast("Start");
   
   /**
      setting provider module group method
   */
   static const CIMName _SET_MODULEGROUPNAME = CIMNameCast("SetModuleGroupName");
   
   /**
      input param for setModuleGroupName name method
   */
   static const CIMName _PARAM_MODULEGROUPNAME = CIMNameCast("ModuleGroupName");
   
  
 ProviderRegistrationProvider::ProviderRegistrationProvider( ProviderRegistrationProvider::ProviderRegistrationProvider(
     ProviderRegistrationManager * providerRegistrationManager)     ProviderRegistrationManager * providerRegistrationManager)
     :_id(peg_credential_types::PROVIDER)  
 { {
     _providerRegistrationManager = providerRegistrationManager;     _providerRegistrationManager = providerRegistrationManager;
  
     _controller = &(ModuleController::get_client_handle(_id, &_client_handle));      _controller = ModuleController::getModuleController();
     if(_client_handle == NULL)  
         throw UninitializedObjectException();  
 } }
  
 ProviderRegistrationProvider::~ProviderRegistrationProvider(void) ProviderRegistrationProvider::~ProviderRegistrationProvider(void)
 { {
     if (_providerRegistrationManager)  
     {  
         delete _providerRegistrationManager;  
     }  
   
     if (_client_handle)  
     {  
         delete _client_handle;  
     }  
   
 }  
   
 void ProviderRegistrationProvider::initialize(CIMOMHandle & cimom)  
 {  
     // This method should not be called because this is a control provider  
     // and is not dynamically loaded through the provider manager  
 }  
   
 void ProviderRegistrationProvider::terminate(void)  
 {  
 } }
  
 // get registered provider // get registered provider
Line 134 
Line 116 
  
     CIMInstance instance;     CIMInstance instance;
  
     try      instance = _providerRegistrationManager->getInstance(
     {          instanceReference, includeQualifiers, includeClassOrigin, propertyList);
         instance = _providerRegistrationManager->getInstance(instanceReference,  
                                                              includeQualifiers,  
                                                              includeClassOrigin,  
                                                              propertyList);  
     }  
     catch(CIMException& e)  
     {  
         throw (e);  
     }  
  
     handler.deliver(instance);     handler.deliver(instance);
  
Line 184 
Line 157 
  
     Array<CIMInstance> enumInstances;     Array<CIMInstance> enumInstances;
  
     try  
     {  
         enumInstances =         enumInstances =
             _providerRegistrationManager->enumerateInstances(classReference,          _providerRegistrationManager->enumerateInstancesForClass(
               classReference,
                                                              includeQualifiers,                                                              includeQualifiers,
                                                              includeClassOrigin,                                                              includeClassOrigin,
                                                              propertyList);                                                              propertyList);
     }  
     catch(CIMException& e)  
     {  
         throw (e);  
     }  
  
     handler.deliver(enumInstances);     handler.deliver(enumInstances);
  
Line 233 
Line 200 
     Array<CIMObjectPath> enumInstanceNames;     Array<CIMObjectPath> enumInstanceNames;
  
     // get all instance names from repository     // get all instance names from repository
     try  
     {  
         enumInstanceNames =         enumInstanceNames =
             _providerRegistrationManager->enumerateInstanceNames(classReference);          _providerRegistrationManager->enumerateInstanceNamesForClass(
     }              classReference);
     catch(CIMException& e)  
     {  
         throw (e);  
     }  
  
     handler.deliver(enumInstanceNames);     handler.deliver(enumInstanceNames);
  
Line 272 
Line 233 
         userName = String::EMPTY;         userName = String::EMPTY;
     }     }
  
   #ifndef PEGASUS_OS_ZOS
     if ((userName != String::EMPTY) && !System::isPrivilegedUser(userName))     if ((userName != String::EMPTY) && !System::isPrivilegedUser(userName))
     {     {
         //l10n  
         //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_ACCESS_DENIED,  
             //"You must have superuser privilege to modify the registration.");  
             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_ACCESS_DENIED,MessageLoaderParms(             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_ACCESS_DENIED,MessageLoaderParms(
                         "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.SUPERUSER_PRIVILEGE_REQUIRED_MODIFY_REGISTRATION",              "ControlProviders.ProviderRegistrationProvider."
                         "You must have superuser privilege to modify the registration."));                  "ProviderRegistrationProvider."
                   "SUPERUSER_PRIVILEGE_REQUIRED_MODIFY_REGISTRATION",
               "You must have superuser privilege to modify the"
                   " registration."));
     }     }
   #endif
  
     if(!instanceReference.getNameSpace().equal (PEGASUS_NAMESPACENAME_INTEROP))     if(!instanceReference.getNameSpace().equal (PEGASUS_NAMESPACENAME_INTEROP))
     {     {
Line 304 
Line 267 
     //     //
     if (propertyList.isNull())     if (propertyList.isNull())
     {     {
         //l10n  
         //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,  
             //"Only can modify Namespaces, SupportedProperties, and SupportedMethods.");  
             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED, MessageLoaderParms(             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED, MessageLoaderParms(
                         "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.CAN_ONLY_MODIFY_ERR",              "ControlProviders.ProviderRegistrationProvider."
                         "Only can modify Namespaces, SupportedProperties, and SupportedMethods."));                  "ProviderRegistrationProvider."
               "CAN_ONLY_MODIFY_ERR",
               "Only can modify Namespaces, SupportedProperties,"
                   "and SupportedMethods."));
     }     }
  
     Array<CIMName> propertyArray = propertyList.getPropertyNameArray();     Array<CIMName> propertyArray = propertyList.getPropertyNameArray();
Line 327 
Line 290 
     // begin processing the request     // begin processing the request
     handler.processing();     handler.processing();
  
     try      _providerRegistrationManager->modifyInstance(
     {          instanceReference, instanceObject, includeQualifiers, propertyArray);
         _providerRegistrationManager->modifyInstance(instanceReference,  
                                                      instanceObject,  #ifdef PEGASUS_ENABLE_INTEROP_PROVIDER
                                                      includeQualifiers,      _sendUpdateCacheMessagetoInteropProvider(context);
                                                      propertyArray);  #endif
     }  
     catch(CIMException& e)  
     {  
         throw (e);  
     }  
  
     // complete processing the request     // complete processing the request
     handler.complete();     handler.complete();
Line 362 
Line 320 
         userName = String::EMPTY;         userName = String::EMPTY;
     }     }
  
   #ifndef PEGASUS_OS_ZOS
     if ((userName != String::EMPTY) && !System::isPrivilegedUser(userName))     if ((userName != String::EMPTY) && !System::isPrivilegedUser(userName))
     {     {
         //l10n  
         //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_ACCESS_DENIED,  
             //"You must have superuser privilege to register providers.");  
             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_ACCESS_DENIED, MessageLoaderParms(             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_ACCESS_DENIED, MessageLoaderParms(
                                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.SUPERUSER_PRIVILEGE_REQUIRED_REGISTER_PROVIDERS",              "ControlProviders.ProviderRegistrationProvider."
                   "ProviderRegistrationProvider."
                   "SUPERUSER_PRIVILEGE_REQUIRED_REGISTER_PROVIDERS",
                                 "You must have superuser privilege to register providers."));                                 "You must have superuser privilege to register providers."));
     }     }
   #endif
  
     CIMName className = instanceReference.getClassName();     CIMName className = instanceReference.getClassName();
     CIMNamespaceName nameSpace = instanceReference.getNameSpace();     CIMNamespaceName nameSpace = instanceReference.getNameSpace();
Line 408 
Line 367 
         if (instanceObject.findProperty(_PROPERTY_PROVIDERMODULE_NAME) ==         if (instanceObject.findProperty(_PROPERTY_PROVIDERMODULE_NAME) ==
             PEG_NOT_FOUND)             PEG_NOT_FOUND)
         {         {
                 //l10n 485              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                 //"Missing Name which is required property in PG_ProviderModule class.");                      "ControlProviders.ProviderRegistrationProvider."
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_NAME_IN_PG_PROVIDERMODULE",                          "MISSING_NAME_IN_PG_PROVIDERMODULE",
                 "Missing Name which is required property in PG_ProviderModule class."));                      "Missing Name which is required property in "
                           "PG_ProviderModule class."));
         }         }
  
         if (instanceObject.findProperty(_PROPERTY_VENDOR) == PEG_NOT_FOUND)         if (instanceObject.findProperty(_PROPERTY_VENDOR) == PEG_NOT_FOUND)
         {         {
                 //l10n 485              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                 //"Missing Vendor which is required property in PG_ProviderModule class.");                      "ControlProviders.ProviderRegistrationProvider."
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_VENDOR_IN_PG_PROVIDERMODULE",                          "MISSING_VENDOR_IN_PG_PROVIDERMODULE",
                 "Missing Vendor which is required property in PG_ProviderModule class."));                      "Missing Vendor which is required property in"
                           " PG_ProviderModule class."));
           }
   
           Uint32 bitnessIndx = instanceObject.findProperty(
                PEGASUS_PROPERTYNAME_MODULE_BITNESS);
   
           if (bitnessIndx != PEG_NOT_FOUND)
           {
               CIMValue value = instanceObject.getProperty(bitnessIndx).getValue();
               if (!value.isNull())
               {
                   if (value.getType() != CIMTYPE_UINT16)
                   {
                       throw PEGASUS_CIM_EXCEPTION(CIM_ERR_TYPE_MISMATCH,
                           PEGASUS_PROPERTYNAME_MODULE_BITNESS.getString());
                   }
                   Uint16 bitness;
                   value.get(bitness);
                   if(bitness != PG_PROVMODULE_BITNESS_DEFAULT
   #ifdef PEGASUS_PLATFORM_FOR_32BIT_PROVIDER_SUPPORT
                       && bitness != PG_PROVMODULE_BITNESS_32
                       && bitness != PG_PROVMODULE_BITNESS_64
   #endif
                       )
                   {
                       throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,
                           PEGASUS_PROPERTYNAME_MODULE_BITNESS.getString());
                   }
               }
         }         }
  
         if (instanceObject.findProperty(_PROPERTY_VERSION) == PEG_NOT_FOUND)         if (instanceObject.findProperty(_PROPERTY_VERSION) == PEG_NOT_FOUND)
         {         {
                 //l10n 485              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                 //"Missing Version which is required property in PG_ProviderModule class.");                      "ControlProviders.ProviderRegistrationProvider."
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_VERSION_IN_PG_PROVIDERMODULE",                          "MISSING_VERSION_IN_PG_PROVIDERMODULE",
                 "Missing Version which is required property in PG_ProviderModule class."));                      "Missing Version which is required property in"
                           " PG_ProviderModule class."));
         }         }
  
         Uint32 ifcTypeIndex =         Uint32 ifcTypeIndex =
             instanceObject.findProperty(_PROPERTY_INTERFACETYPE);             instanceObject.findProperty(_PROPERTY_INTERFACETYPE);
         if (ifcTypeIndex == PEG_NOT_FOUND)         if (ifcTypeIndex == PEG_NOT_FOUND)
         {         {
                 //l10n 485              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                 //"Missing InterfaceType which is required property in PG_ProviderModule class.");                      "ControlProviders.ProviderRegistrationProvider."
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_INTERFACETYPE_IN_PG_PROVIDERMODULE",                          "MISSING_INTERFACETYPE_IN_PG_PROVIDERMODULE",
                 "Missing InterfaceType which is required property in PG_ProviderModule class."));                      "Missing InterfaceType which is required property in"
                           " PG_ProviderModule class."));
         }         }
         String ifcTypeString;         String ifcTypeString;
         instanceObject.getProperty(ifcTypeIndex).getValue().         instanceObject.getProperty(ifcTypeIndex).getValue().
             get(ifcTypeString);             get(ifcTypeString);
  
         if (ifcTypeString != "C++Default"          String ifcEmptyVersion;
 #ifdef PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER          if (!ProviderManagerMap::instance().
             && ifcTypeString != "CMPI"                  isValidProvMgrIfc(ifcTypeString, ifcEmptyVersion))
 #endif  
                 )  
         {         {
                 //l10n 485              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,                  MessageLoaderParms(
                 //"Unsupported InterfaceType value: \"" + ifcTypeString + "\"");                  "ControlProviders.ProviderRegistrationProvider."
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms(                      "ProviderRegistrationProvider."
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.UNSUPPORTED_INTERFACETYPE_VALUE",                      "UNSUPPORTED_INTERFACETYPE_VALUE",
                 "Unsupported InterfaceType value: \"$0\"",ifcTypeString));                 "Unsupported InterfaceType value: \"$0\"",ifcTypeString));
         }         }
  
Line 469 
Line 458 
             instanceObject.findProperty(_PROPERTY_INTERFACEVERSION);             instanceObject.findProperty(_PROPERTY_INTERFACEVERSION);
         if (ifcVersionIndex == PEG_NOT_FOUND)         if (ifcVersionIndex == PEG_NOT_FOUND)
         {         {
                 //l10n 485              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                 //"Missing InterfaceVersion which is required property in PG_ProviderModule class.");                      "ControlProviders.ProviderRegistrationProvider."
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_INTERFACEVERSION_IN_PG_PROVIDERMODULE",                          "MISSING_INTERFACEVERSION_IN_PG_PROVIDERMODULE",
                 "Missing InterfaceVersion which is required property in PG_ProviderModule class."));                      "Missing InterfaceVersion which is required property "
                           "in PG_ProviderModule class."));
         }         }
         String ifcVersionString;         String ifcVersionString;
         instanceObject.getProperty(ifcVersionIndex).getValue().         instanceObject.getProperty(ifcVersionIndex).getValue().
             get(ifcVersionString);             get(ifcVersionString);
         if (  
 #ifdef PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER          if (!ProviderManagerMap::instance().isValidProvMgrIfc(
            (ifcTypeString == "CMPI" &&                      ifcTypeString, ifcVersionString))
             ifcVersionString != "2.0.0") ||          {
 #endif  
            (ifcTypeString == "C++Default" &&  
             ifcVersionString != "2.1.0" &&  
             ifcVersionString != "2.2.0" &&  
             ifcVersionString != "2.3.0" &&  
             ifcVersionString != "2.5.0"))  
         {  
                 //l10n 485  
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,  
                 //"Unsupported InterfaceVersion value: \"" + ifcVersionString +  
                    // "\"");  
         String unsupported = "InterfaceVersion";         String unsupported = "InterfaceVersion";
         throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms(              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.UNSUPPORTED_INTERFACEVERSION_VALUE",                  MessageLoaderParms(
                 "Unsupported InterfaceVersion value: \"$0\"",ifcVersionString));                      "ControlProviders.ProviderRegistrationProvider."
                       "ProviderRegistrationProvider."
                       "UNSUPPORTED_INTERFACEVERSION_VALUE",
                       "Unsupported InterfaceVersion value: \"$0\"",
                   ifcVersionString));
         }         }
  
         if (instanceObject.findProperty(_PROPERTY_LOCATION) == PEG_NOT_FOUND)         if (instanceObject.findProperty(_PROPERTY_LOCATION) == PEG_NOT_FOUND)
         {         {
                 //l10n 485              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                 //"Missing Location which is required property in PG_ProviderModule class.");                      "ControlProviders.ProviderRegistrationProvider."
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_LOCATION_IN_PG_PROVIDERMODULE",                          "MISSING_LOCATION_IN_PG_PROVIDERMODULE",
                 "Missing Location which is required property in PG_ProviderModule class."));                      "Missing Location which is required property in"
                           " PG_ProviderModule class."));
         }         }
  
         if (instanceObject.findProperty(_PROPERTY_OPERATIONALSTATUS) ==         if (instanceObject.findProperty(_PROPERTY_OPERATIONALSTATUS) ==
Line 522 
Line 506 
         //         //
         // Validate the UserContext property         // Validate the UserContext property
         //         //
           CIMValue userContextValue;
         Uint32 userContextIndex = instanceObject.findProperty(         Uint32 userContextIndex = instanceObject.findProperty(
             PEGASUS_PROPERTYNAME_MODULE_USERCONTEXT);             PEGASUS_PROPERTYNAME_MODULE_USERCONTEXT);
   
         if (userContextIndex != PEG_NOT_FOUND)         if (userContextIndex != PEG_NOT_FOUND)
         {         {
               userContextValue =
                   instanceObject.getProperty(userContextIndex).getValue();
           }
   
           if (!userContextValue.isNull())
           {
               Uint16 userContext;
               userContextValue.get(userContext);
   
 #ifdef PEGASUS_DISABLE_PROV_USERCTXT #ifdef PEGASUS_DISABLE_PROV_USERCTXT
             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, MessageLoaderParms(              if (userContext != PG_PROVMODULE_USERCTXT_CIMSERVER)
               {
                   throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,
                       MessageLoaderParms(
                 "ControlProviders.ProviderRegistrationProvider."                 "ControlProviders.ProviderRegistrationProvider."
                     "ProviderRegistrationProvider.USERCONTEXT_UNSUPPORTED",                              "ProviderRegistrationProvider."
                 "The UserContext property in the PG_ProviderModule class is "                              "USERCONTEXT_UNSUPPORTED",
                     "not supported."));                          "The UserContext property in the PG_ProviderModule "
                               "class is not supported."));
               }
 #else #else
             Uint16 userContextValue;              if (!((userContext == PG_PROVMODULE_USERCTXT_REQUESTOR) ||
             instanceObject.getProperty(userContextIndex).getValue()  #ifndef PEGASUS_OS_ZOS
                 .get(userContextValue);                    (userContext == PG_PROVMODULE_USERCTXT_CIMSERVER) ||
                     (userContext == PG_PROVMODULE_USERCTXT_PRIVILEGED) ||
             if (!(  
 # ifndef PEGASUS_DISABLE_PROV_USERCTXT_REQUESTOR  
                   (userContextValue == PG_PROVMODULE_USERCTXT_REQUESTOR) ||  
 # endif  
 # ifndef PEGASUS_DISABLE_PROV_USERCTXT_DESIGNATED  
                   (userContextValue == PG_PROVMODULE_USERCTXT_DESIGNATED) ||  
 # endif  
 # ifndef PEGASUS_DISABLE_PROV_USERCTXT_PRIVILEGED  
                   (userContextValue == PG_PROVMODULE_USERCTXT_PRIVILEGED) ||  
 # endif # endif
 # ifndef PEGASUS_DISABLE_PROV_USERCTXT_CIMSERVER                    (userContext == PG_PROVMODULE_USERCTXT_DESIGNATED)))
                   (userContextValue == PG_PROVMODULE_USERCTXT_CIMSERVER) ||  
 # endif  
                   0))  
             {             {
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,
                     MessageLoaderParms(                     MessageLoaderParms(
Line 558 
Line 546 
                             "ProviderRegistrationProvider."                             "ProviderRegistrationProvider."
                             "UNSUPPORTED_USERCONTEXT_VALUE",                             "UNSUPPORTED_USERCONTEXT_VALUE",
                         "Unsupported UserContext value: \"$0\".",                         "Unsupported UserContext value: \"$0\".",
                         userContextValue));                          userContext));
             }             }
  
             // DesignatedUserContext property is required when UserContext == 3             // DesignatedUserContext property is required when UserContext == 3
             if (userContextValue == PG_PROVMODULE_USERCTXT_DESIGNATED)              if (userContext == PG_PROVMODULE_USERCTXT_DESIGNATED)
             {             {
                 Uint32 designatedUserIndex = instanceObject.findProperty(                 Uint32 designatedUserIndex = instanceObject.findProperty(
                     PEGASUS_PROPERTYNAME_MODULE_DESIGNATEDUSER);                     PEGASUS_PROPERTYNAME_MODULE_DESIGNATEDUSER);
Line 570 
Line 558 
                     instanceObject.getProperty(designatedUserIndex).getValue()                     instanceObject.getProperty(designatedUserIndex).getValue()
                         .isNull())                         .isNull())
                 {                 {
                     throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,                      throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
                         MessageLoaderParms(                         MessageLoaderParms(
                             "ControlProviders.ProviderRegistrationProvider."                             "ControlProviders.ProviderRegistrationProvider."
                                 "ProviderRegistrationProvider."                                 "ProviderRegistrationProvider."
Line 599 
Line 587 
         if (instanceObject.findProperty(_PROPERTY_PROVIDERMODULENAME) ==         if (instanceObject.findProperty(_PROPERTY_PROVIDERMODULENAME) ==
             PEG_NOT_FOUND)             PEG_NOT_FOUND)
         {         {
                 //l10n 485              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                 //"Missing ProviderModuleName which is required property in PG_ProviderCapabilities class.");                      "ControlProviders.ProviderRegistrationProvider."
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_PROVIDERMODULENAME_IN_PG_PROVIDERCAPABILITIES",                          "MISSING_PROVIDERMODULENAME_IN_PG_PROVIDERCAPABILITIES",
                 "Missing ProviderModuleName which is required property in PG_ProviderCapabilities class."));                      "Missing ProviderModuleName which is required property in"
                           " PG_ProviderCapabilities class."));
         }         }
  
         if (instanceObject.findProperty(_PROPERTY_PROVIDERNAME) ==         if (instanceObject.findProperty(_PROPERTY_PROVIDERNAME) ==
             PEG_NOT_FOUND)             PEG_NOT_FOUND)
         {         {
                 //l10n 485  
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,  
                 //"Missing ProviderName which is required property in PG_ProviderCapabilities class.");  
                 String missing = "ProviderName";                 String missing = "ProviderName";
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY",                  MessageLoaderParms(
                 "Missing ProviderName which is required property in PG_ProviderCapabilities class."));                      "ControlProviders.ProviderRegistrationProvider."
                           "ProviderRegistrationProvider."
                           "MISSING_PROVIDERNAME_IN_PG_PROVIDERCAPABILITIES",
                       "Missing the required ProviderName property in "
                           "PG_ProviderCapabilities class."));
         }         }
  
         if (instanceObject.findProperty(_PROPERTY_CAPABILITYID) ==         if (instanceObject.findProperty(_PROPERTY_CAPABILITYID) ==
             PEG_NOT_FOUND)             PEG_NOT_FOUND)
         {         {
                 //l10n 485              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                 //"Missing CapabilityID which is required property in PG_ProviderCapabilities class.");                      "ControlProviders.ProviderRegistrationProvider."
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSINGCAPABILITYID_IN_PG_PROVIDERCAPABILITIES",                          "MISSING_CAPABILITYID_IN_PG_PROVIDERCAPABILITIES",
                 "Missing CapabilityID which is required property in PG_ProviderCapabilities class."));                      "Missing the required CapabilityID property in "
                           "PG_ProviderCapabilities class."));
         }         }
  
         if (instanceObject.findProperty(_PROPERTY_CLASSNAME) == PEG_NOT_FOUND)         if (instanceObject.findProperty(_PROPERTY_CLASSNAME) == PEG_NOT_FOUND)
         {         {
                 //l10n 485              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                 //"Missing ClassName which is required property in PG_ProviderCapabilities class.");                      "ControlProviders.ProviderRegistrationProvider."
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_CLASSNAME_IN_PG_PROVIDERCAPABILITIES",                          "MISSING_CLASSNAME_IN_PG_PROVIDERCAPABILITIES",
                 "Missing ClassName which is required property in PG_ProviderCapabilities class."));                      "Missing ClassName which is required property in"
         }                          " PG_ProviderCapabilities class."));
           }
         if (instanceObject.findProperty(_PROPERTY_NAMESPACES) == PEG_NOT_FOUND)  
         {          // Validate the Namespaces property
                 //l10n 485  
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,          Uint32 namespacesIndex =
                 //"Missing Namespaces which is required property in PG_ProviderCapabilities class.");              instanceObject.findProperty(_PROPERTY_NAMESPACES);
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(          Array<String> namespacesArray;
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_NAMESPACES_IN_PG_PROVIDERCAPABILITIES",          if (namespacesIndex != PEG_NOT_FOUND)
                 "Missing Namespaces which is required property in PG_ProviderCapabilities class."));          {
         }              CIMValue namespacesValue =
                   instanceObject.getProperty(namespacesIndex).getValue();
         if (instanceObject.findProperty(_PROPERTY_PROVIDERTYPE) == PEG_NOT_FOUND)              if (!namespacesValue.isNull())
         {              {
                 //l10n 485                  namespacesValue.get(namespacesArray);
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,              }
                 //"Missing ProviderType which is required property in PG_ProviderCapabilities class.");          }
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(  
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_PROVIDERTYPE_IN_PG_PROVIDERCAPABILITIES",          if (namespacesArray.size() == 0)
                 "Missing ProviderType which is required property in PG_ProviderCapabilities class."));          {
               throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
                   MessageLoaderParms(
                       "ControlProviders.ProviderRegistrationProvider."
                           "ProviderRegistrationProvider."
                           "MISSING_NAMESPACES_IN_PG_PROVIDERCAPABILITIES",
                       "Missing Namespaces which is required property in "
                           "PG_ProviderCapabilities class."));
           }
   
           // Validate the ProviderType property
   
           Uint32 providerTypeIndex =
               instanceObject.findProperty(_PROPERTY_PROVIDERTYPE);
           Array<Uint16> providerTypeArray;
           if (providerTypeIndex != PEG_NOT_FOUND)
           {
               CIMValue providerTypeValue =
                   instanceObject.getProperty(providerTypeIndex).getValue();
               if (!providerTypeValue.isNull())
               {
                   providerTypeValue.get(providerTypeArray);
               }
           }
   
           if (providerTypeArray.size() == 0)
           {
               throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
                   MessageLoaderParms(
                       "ControlProviders.ProviderRegistrationProvider."
                           "ProviderRegistrationProvider."
                           "MISSING_PROVIDERTYPE_IN_PG_PROVIDERCAPABILITIES",
                       "Missing ProviderType which is required property in "
                           "PG_ProviderCapabilities class."));
           }
   
           for (Uint32 i = 0; i < providerTypeArray.size(); i++)
           {
               if ((providerTypeArray[i] < 2) ||
   #ifdef PEGASUS_DISABLE_EXECQUERY
                   (providerTypeArray[i] > 6)
   #else
                   (providerTypeArray[i] > 7)
   #endif
                                             )
               {
                   throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,
                       MessageLoaderParms(
                           "ControlProviders.ProviderRegistrationProvider."
                               "ProviderRegistrationProvider.UNSUPPORTED_"
                               "PROVIDERTYPE_IN_PG_PROVIDERCAPABILITIES",
                           "Unsupported ProviderType value \"$0\" in "
                               "PG_ProviderCapabilities instance.",
                           providerTypeArray[i]));
               }
         }         }
     }     }
     else if (className.equal (PEGASUS_CLASSNAME_CONSUMERCAPABILITIES))     else if (className.equal (PEGASUS_CLASSNAME_CONSUMERCAPABILITIES))
Line 670 
Line 715 
         if (instanceObject.findProperty(_PROPERTY_PROVIDERMODULENAME) ==         if (instanceObject.findProperty(_PROPERTY_PROVIDERMODULENAME) ==
             PEG_NOT_FOUND)             PEG_NOT_FOUND)
         {         {
 //L10N_ TODO DONE  
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,  
                 //"Missing ProviderModuleName which is required property in PG_ConsumerCapabilities class.");  
             MessageLoaderParms parms(             MessageLoaderParms parms(
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_PROVIDER_MODULE_NAME_WHICH_IS_REQUIRED",                  "ControlProviders.ProviderRegistrationProvider."
                 "Missing ProviderModuleName which is required property in PG_ConsumerCapabilities class.");                      "ProviderRegistrationProvider."
                       "MISSING_PROVIDER_MODULE_NAME_WHICH_IS_REQUIRED",
                   "Missing ProviderModuleName which is required property in"
                       " PG_ConsumerCapabilities class.");
  
             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, parms);              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER, parms);
         }         }
  
         if (instanceObject.findProperty(_PROPERTY_PROVIDERNAME) ==         if (instanceObject.findProperty(_PROPERTY_PROVIDERNAME) ==
             PEG_NOT_FOUND)             PEG_NOT_FOUND)
         {         {
 //L10N_ TODO DONE  
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,  
                 //"Missing ProviderName which is required property in PG_ConsumerCapabilities class.");  
  
             MessageLoaderParms parms(             MessageLoaderParms parms(
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_PROVIDER_NAME_WHICH_IS_REQUIRED",                  "ControlProviders.ProviderRegistrationProvider."
                 "Missing ProviderName which is required property in PG_ConsumerCapabilities class.");                      "ProviderRegistrationProvider."
                       "MISSING_PROVIDER_NAME_WHICH_IS_REQUIRED",
                   "Missing ProviderName which is required property in"
                       " PG_ConsumerCapabilities class.");
  
             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, parms);              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER, parms);
         }         }
  
         if (instanceObject.findProperty(_PROPERTY_CAPABILITYID) ==         if (instanceObject.findProperty(_PROPERTY_CAPABILITYID) ==
             PEG_NOT_FOUND)             PEG_NOT_FOUND)
         {         {
 //L10N_ TODO DONE  
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,  
                 //"Missing CapabilityID which is required property in PG_ConsumerCapabilities class.");  
  
             MessageLoaderParms parms(             MessageLoaderParms parms(
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_CAPABILITY_ID_WHICH_IS_REQUIRED",                  "ControlProviders.ProviderRegistrationProvider."
                 "Missing CapabilityID which is required property in PG_ConsumerCapabilities class.");                      "ProviderRegistrationProvider."
                       "MISSING_CAPABILITY_ID_WHICH_IS_REQUIRED",
                   "Missing the required CapabilityID property in "
                       "PG_ConsumerCapabilities class.");
  
             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, parms);              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER, parms);
         }         }
  
         if (instanceObject.findProperty(_PROPERTY_PROVIDERTYPE) == PEG_NOT_FOUND)          if (instanceObject.findProperty
               (_PROPERTY_PROVIDERTYPE) == PEG_NOT_FOUND)
         {         {
 //L10N_ TODO DONE  
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,  
                 //"Missing ProviderType which is required property in PG_ConsumerCapabilities class.");  
  
             MessageLoaderParms parms(             MessageLoaderParms parms(
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_PROVIDER_TYPE_WHICH_IS_REQUIRED",                  "ControlProviders.ProviderRegistrationProvider."
                 "Missing ProviderType which is required property in PG_ConsumerCapabilities class.");                      "ProviderRegistrationProvider."
                       "MISSING_PROVIDER_TYPE_WHICH_IS_REQUIRED",
                   "Missing ProviderType which is required property in"
                       " PG_ConsumerCapabilities class.");
  
             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, parms);              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER, parms);
         }         }
  
         if (instanceObject.findProperty(_PROPERTY_INDICATIONDESTINATIONS) ==         if (instanceObject.findProperty(_PROPERTY_INDICATIONDESTINATIONS) ==
             PEG_NOT_FOUND)             PEG_NOT_FOUND)
         {         {
 //L10N_ TODO DONE  
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,  
                 //"Missing Destinations which is required property in PG_ConsumerCapabilities class.");  
  
             MessageLoaderParms parms(             MessageLoaderParms parms(
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_DESTINATIONS_TYPE_WHICH_IS_REQUIRED",                  "ControlProviders.ProviderRegistrationProvider."
                 "Missing Destinations which is required property in PG_ConsumerCapabilities class.");                      "ProviderRegistrationProvider."
                       "MISSING_DESTINATIONS_TYPE_WHICH_IS_REQUIRED",
                   "Missing Destinations which is required property in"
                       " PG_ConsumerCapabilities class.");
  
             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, parms);              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER, parms);
         }         }
     }     }
     else // PEGASUS_CLASSNAME_PROVIDER     else // PEGASUS_CLASSNAME_PROVIDER
Line 740 
Line 786 
         //         //
         // Name and ProviderModuleName properties must be set         // Name and ProviderModuleName properties must be set
         //         //
         if (instanceObject.findProperty(_PROPERTY_PROVIDER_NAME) == PEG_NOT_FOUND)          if (instanceObject.findProperty
                   (PEGASUS_PROPERTYNAME_NAME) == PEG_NOT_FOUND)
         {         {
                 //l10n 485              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                 //"Missing Name which is required property in PG_Provider class.");                      "ControlProviders.ProviderRegistrationProvider."
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY",                          "MISSING_NAME_IN_PG_PROVIDER",
                 "Missing Name which is required property in PG_Provider class."));                      "Missing the required Name property in PG_Provider "
                           "class."));
         }         }
  
         if (instanceObject.findProperty(_PROPERTY_PROVIDERMODULENAME) ==         if (instanceObject.findProperty(_PROPERTY_PROVIDERMODULENAME) ==
             PEG_NOT_FOUND)             PEG_NOT_FOUND)
         {         {
                 //l10n 485              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                 //"Missing ProviderModuleName which is required property in PG_Provider class.");                      "ControlProviders.ProviderRegistrationProvider."
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_PROVIDERMODULENAME_IN_PG_PROVIDER",                          "MISSING_PROVIDERMODULENAME_IN_PG_PROVIDER",
                 "Missing ProviderModuleName which is required property in PG_Provider class."));                      "Missing ProviderModuleName which is required property in "
                           "PG_Provider class."));
         }         }
     }     }
  
     // begin processing the request     // begin processing the request
     handler.processing();     handler.processing();
  
     try      returnReference = _providerRegistrationManager->createInstance(
     {          instanceReference, instance);
         returnReference =  
             _providerRegistrationManager->createInstance(instanceReference, instance);  #ifdef PEGASUS_ENABLE_INTEROP_PROVIDER
     }      if(className.equal (PEGASUS_CLASSNAME_PROVIDER) ||
     catch(CIMException& e)         className.equal (PEGASUS_CLASSNAME_PROVIDERCAPABILITIES))
     {     {
         throw (e);          _sendUpdateCacheMessagetoInteropProvider(context);
     }     }
   #endif
  
     handler.deliver(returnReference);     handler.deliver(returnReference);
  
Line 799 
Line 849 
         userName = String::EMPTY;         userName = String::EMPTY;
     }     }
  
   #ifndef PEGASUS_OS_ZOS
     if ((userName != String::EMPTY) && !System::isPrivilegedUser(userName))     if ((userName != String::EMPTY) && !System::isPrivilegedUser(userName))
     {     {
         //l10n  
         //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_ACCESS_DENIED,  
             //"You must have superuser privilege to unregister providers.");  
             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_ACCESS_DENIED,MessageLoaderParms(             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_ACCESS_DENIED,MessageLoaderParms(
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.SUPERUSER_PRIVILEGE_REQUIRED_UNREGISTER_PROVIDERS",              "ControlProviders.ProviderRegistrationProvider."
                   "ProviderRegistrationProvider."
                   "SUPERUSER_PRIVILEGE_REQUIRED_UNREGISTER_PROVIDERS",
             "You must have superuser privilege to unregister providers."));             "You must have superuser privilege to unregister providers."));
     }     }
   #endif
  
     if(!instanceReference.getNameSpace().equal (PEGASUS_NAMESPACENAME_INTEROP))     if(!instanceReference.getNameSpace().equal (PEGASUS_NAMESPACENAME_INTEROP))
     {     {
Line 816 
Line 867 
     }     }
  
  
 // l10n      AcceptLanguageList al;
     // Get the client's list of preferred languages for the response  
     AcceptLanguages al = AcceptLanguages::EMPTY;  
     try     try
     {     {
         AcceptLanguageListContainer al_container =         AcceptLanguageListContainer al_container =
                 (AcceptLanguageListContainer)context.get(AcceptLanguageListContainer::NAME);                  (AcceptLanguageListContainer)context.get
                   (AcceptLanguageListContainer::NAME);
         al = al_container.getLanguages();         al = al_container.getLanguages();
     }     }
     catch (...)     catch (...)
     {     {
         ;   // Leave AcceptLanguages empty          ;   // Leave AcceptLanguageList empty
     }     }
  
     CIMName className = instanceReference.getClassName();     CIMName className = instanceReference.getClassName();
Line 869 
Line 919 
         // if _PROPERTY_PROVIDERMODULENAME key not found         // if _PROPERTY_PROVIDERMODULENAME key not found
         if( !moduleFound)         if( !moduleFound)
         {         {
                 //l10n 485              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
             //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,                      MessageLoaderParms(
                 //"key ProviderModuleName was not found");                  "ControlProviders.ProviderRegistrationProvider."
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms(                      "ProviderRegistrationProvider."
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.PROVIDERMODULENAME_KEY_NOT_FOUND",                      "PROVIDERMODULENAME_KEY_NOT_FOUND",
                 "key ProviderModuleName was not found"));                 "key ProviderModuleName was not found"));
         }         }
  
         //         //
         // disable the provider         // disable the provider
         //         //
         try          Sint16 ret_value = _disableModule(
         {              instanceReference, moduleName, true, al);
              Sint16 ret_value = _disableModule(instanceReference, moduleName, true, al);  
  
              //              //
              // if the provider disable failed              // if the provider disable failed
              //              //
 // l10n  
              if (ret_value == -1)              if (ret_value == -1)
              {              {
                 //l10n              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,
                  //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                      //"disable the provider failed.");                      "ControlProviders.ProviderRegistrationProvider."
                  throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                                         "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.DISABLE_PROVIDER_FAILED",                          "DISABLE_PROVIDER_FAILED",
                     "disable the provider failed."));                     "disable the provider failed."));
              }              }
   
              //              //
              // The provider disable failed since there are pending requests              // The provider disable failed since there are pending requests
              //              //
              if (ret_value == -2)              if (ret_value == -2)
              {              {
 //L10N TODO              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,
                 // throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                      //"disable the provider failed: Provider is busy.");                      "ControlProviders.ProviderRegistrationProvider."
                  throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                                         "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.DISABLE_PROVIDER_FAILED_PROVIDER_BUSY",                          "DISABLE_PROVIDER_FAILED_PROVIDER_BUSY",
                     "disable the provider failed: Provider is busy."));                     "disable the provider failed: Provider is busy."));
              }              }
         }         }
         catch(CIMException&)  
         {  
             throw;  
         }  
     }  
  
     //     //
     // disable provider module before remove provider registration     // disable provider module before remove provider registration
Line 937 
Line 981 
         // if _PROPERTY_PROVIDERMODULE_NAME key not found         // if _PROPERTY_PROVIDERMODULE_NAME key not found
         if( !moduleFound)         if( !moduleFound)
         {         {
                 //l10n 485              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
         //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED,                  MessageLoaderParms(
                 //"key Name was not found");                  "ControlProviders.ProviderRegistrationProvider."
                 throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms(                  "ProviderRegistrationProvider.NAME_KEY_NOT_FOUND",
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.NAME_KEY_NOT_FOUND",  
                 "key Name was not found"));                 "key Name was not found"));
         }         }
  
         //         //
         // disable the provider module         // disable the provider module
         //         //
         try          Sint16 ret_value = _disableModule(
         {              instanceReference, moduleName, false, al);
             Sint16 ret_value = _disableModule(instanceReference, moduleName, false, al);  
  
             //             //
             // if the provider module disable failed             // if the provider module disable failed
             //             //
 // l10n  
             if (ret_value == -1)             if (ret_value == -1)
             {             {
                 //l10n              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,
                  //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                      //"disable the provider module failed.");                      "ControlProviders.ProviderRegistrationProvider."
                      throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                                                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.DISABLE_PROVIDER_MODULE_FAILED",                          "DISABLE_PROVIDER_MODULE_FAILED",
                         "disable the provider module failed."));                         "disable the provider module failed."));
             }             }
  
             //             //
             // The provider module disable failed since there are pending requests          // The provider module disable failed since there are
           // pending requests
             //             //
             if (ret_value == -2)             if (ret_value == -2)
             {             {
 //L10N TODO              throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,
                  //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,                  MessageLoaderParms(
                     // "disable the provider module failed: Provider is busy.");                      "ControlProviders.ProviderRegistrationProvider."
                  throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms(                          "ProviderRegistrationProvider."
                                                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.DISABLE_PROVIDER_MODULE_FAILED_PROVIDER_BUSY",                          "DISABLE_PROVIDER_MODULE_FAILED_PROVIDER_BUSY",
                         "disable the provider module failed: Provider is busy."));                         "disable the provider module failed: Provider is busy."));
             }             }
         }         }
         catch(CIMException& e)  
         {  
             throw (e);  
         }  
     }  
  
     try  
     {  
         _providerRegistrationManager->deleteInstance(instanceReference);         _providerRegistrationManager->deleteInstance(instanceReference);
     }  
     catch(CIMException& e)  #ifdef PEGASUS_ENABLE_INTEROP_PROVIDER
       if(className.equal (PEGASUS_CLASSNAME_PROVIDER) ||
          className.equal (PEGASUS_CLASSNAME_PROVIDERCAPABILITIES) ||
          className.equal (PEGASUS_CLASSNAME_PROVIDERMODULE))
     {     {
         throw (e);          _sendUpdateCacheMessagetoInteropProvider(context);
     }     }
   #endif
     // complete processing the request     // complete processing the request
     handler.complete();     handler.complete();
 } }
Line 1018 
Line 1056 
         userName = String::EMPTY;         userName = String::EMPTY;
     }     }
  
   #ifndef PEGASUS_OS_ZOS
     if ((userName != String::EMPTY) && !System::isPrivilegedUser(userName))     if ((userName != String::EMPTY) && !System::isPrivilegedUser(userName))
     {     {
         //l10n          throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_ACCESS_DENIED,
         //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_ACCESS_DENIED,              MessageLoaderParms(
             //"You must have superuser privilege to disable or enable providers.");              "ControlProviders.ProviderRegistrationProvider."
             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_ACCESS_DENIED,MessageLoaderParms(                  "ProviderRegistrationProvider."
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.SUPERUSER_PRIVILEGE_REQUIRED_DISABLE_ENABLE_PROVIDERS",                  "SUPERUSER_PRIVILEGE_REQUIRED_DISABLE_ENABLE_PROVIDERS",
             "You must have superuser privilege to disable or enable providers."));              "You must have superuser privilege to disable or enable"
                   " providers."));
     }     }
   #endif
  
     if(!objectReference.getNameSpace().equal (PEGASUS_NAMESPACENAME_INTEROP))     if(!objectReference.getNameSpace().equal (PEGASUS_NAMESPACENAME_INTEROP))
     {     {
Line 1037 
Line 1078 
  
 // l10n // l10n
     // Get the client's list of preferred languages for the response     // Get the client's list of preferred languages for the response
     AcceptLanguages al = AcceptLanguages::EMPTY;      AcceptLanguageList al;
     try     try
     {     {
         AcceptLanguageListContainer al_container =         AcceptLanguageListContainer al_container =
                 (AcceptLanguageListContainer)context.get(AcceptLanguageListContainer::NAME);                  (AcceptLanguageListContainer)context.get
                   (AcceptLanguageListContainer::NAME);
         al = al_container.getLanguages();         al = al_container.getLanguages();
     }     }
     catch (...)     catch (...)
     {     {
         ;   // Leave AcceptLanguages empty          ;   // Leave AcceptLanguageList empty
     }     }
  
     String moduleName;     String moduleName;
Line 1064 
Line 1106 
         }         }
     }     }
  
   
     // if _PROPERTY_PROVIDERMODULE_NAME key not found     // if _PROPERTY_PROVIDERMODULE_NAME key not found
     if( !moduleFound)     if( !moduleFound)
     {     {
         //l10n 485          throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER,
         throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms(              MessageLoaderParms(
                 "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.NAME_KEY_NOT_FOUND",                  "ControlProviders.ProviderRegistrationProvider."
                       "ProviderRegistrationProvider.NAME_KEY_NOT_FOUND",
                 "key Name was not found"));                 "key Name was not found"));
     }     }
  
Line 1077 
Line 1121 
  
     Sint16 ret_value;     Sint16 ret_value;
  
     try  
     {  
         if(methodName.equal(_STOP_PROVIDER))         if(methodName.equal(_STOP_PROVIDER))
         {         {
             // disable module             // disable module
Line 1089 
Line 1131 
             // enable module             // enable module
              ret_value =  _enableModule(objectReference, moduleName, al);              ret_value =  _enableModule(objectReference, moduleName, al);
         }         }
         else      else if (methodName.equal(_SET_MODULEGROUPNAME))
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_METHOD_NOT_AVAILABLE, String::EMPTY);          String paramName;
         }          if (!inParameters.size() ||
               ((paramName = inParameters[0].getParameterName())
                   != _PARAM_MODULEGROUPNAME))
           {
               throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, paramName);
           }
           // set group
           String moduleGroupName;
           inParameters[0].getValue().get(moduleGroupName);
           ret_value = _setModuleGroupName(
               objectReference, moduleName, moduleGroupName, al);
     }     }
     catch(CIMException& e)      else
     {     {
         throw (e);          throw PEGASUS_CIM_EXCEPTION(CIM_ERR_METHOD_NOT_AVAILABLE,
               String::EMPTY);
     }     }
   #ifdef PEGASUS_ENABLE_INTEROP_PROVIDER
       _sendUpdateCacheMessagetoInteropProvider(context);
   #endif
  
     CIMValue retValue(ret_value);     CIMValue retValue(ret_value);
     handler.deliver(retValue);     handler.deliver(retValue);
     handler.complete();     handler.complete();
     return;  
 } }
  
   Sint16 ProviderRegistrationProvider::_setModuleGroupName(
       const CIMObjectPath & moduleRef,
       const String & moduleName,
       const String & moduleGroupName,
       const AcceptLanguageList & al)
   {
       Sint32 disableRC = _disableModule (moduleRef, moduleName, false, al);
   
       if (disableRC == -1)
       {
           throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,
               MessageLoaderParms(
                   "ControlProviders.ProviderRegistrationProvider."
                       "ProviderRegistrationProvider."
                       "DISABLE_PROVIDER_FAILED",
                   "disable the provider failed."));
       }
   
       if (disableRC == -2)
       {
           throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,
               MessageLoaderParms(
                   "ControlProviders.ProviderRegistrationProvider."
                       "ProviderRegistrationProvider."
                       "DISABLE_PROVIDER_FAILED_PROVIDER_BUSY",
                   "disable the provider failed: Provider is busy."));
       }
   
       String errorMsg;
   
       if (!_providerRegistrationManager->setProviderModuleGroupName(
           moduleName, moduleGroupName, errorMsg))
       {
           throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,
               MessageLoaderParms(
                   "ControlProviders.ProviderRegistrationProvider."
                       "ProviderRegistrationProvider."
                       "SET_PROVIDERMODULEGROUPNAME_FAILED",
                   "Failed to set the ModuleGroupName: $0.",
                   errorMsg));
       }
   
       // Enable the module only if it was previously enabled.
       if (disableRC == 0)
       {
           try
           {
               _enableModule(moduleRef, moduleName, al);
           }
           catch(const Exception &e)
           {
               PEG_TRACE((TRC_CONTROLPROVIDER,Tracer::LEVEL1,
                   "Exception caught while enabling the provider module %s : %s",
                   (const char*)moduleName.getCString(),
                   (const char*)e.getMessage().getCString()));
           }
           catch(...)
           {
               PEG_TRACE((
                   TRC_CONTROLPROVIDER,
                   Tracer::LEVEL1,
                   "Unknown error occurred while"
                       " enabling the provider modules %s.",
                   (const char*)moduleName.getCString()));
           }
       }
   
       return 0;
   }
   
   
 // get provider manager service // get provider manager service
 MessageQueueService * ProviderRegistrationProvider::_getProviderManagerService() MessageQueueService * ProviderRegistrationProvider::_getProviderManagerService()
 { {
     MessageQueue * queue = MessageQueue::lookup(PEGASUS_QUEUENAME_PROVIDERMANAGER_CPP);      MessageQueue * queue =
           MessageQueue::lookup(PEGASUS_QUEUENAME_PROVIDERMANAGER_CPP);
     MessageQueueService * _service = dynamic_cast<MessageQueueService *>(queue);     MessageQueueService * _service = dynamic_cast<MessageQueueService *>(queue);
  
     return(_service);     return(_service);
 } }
  
 ProviderRegistrationProvider & ProviderRegistrationProvider::operator=(const ProviderRegistrationProvider & handle)  ProviderRegistrationProvider & ProviderRegistrationProvider::operator=
       (const ProviderRegistrationProvider & handle)
 { {
     if(this == &handle)     if(this == &handle)
     {     {
Line 1124 
Line 1252 
     return(*this);     return(*this);
 } }
  
 Array<Uint16> ProviderRegistrationProvider::_sendDisableMessageToProviderManager(  Array<Uint16>
       ProviderRegistrationProvider::_sendDisableMessageToProviderManager(
         CIMDisableModuleRequestMessage * disable_req)         CIMDisableModuleRequestMessage * disable_req)
 { {
     MessageQueueService * _service = _getProviderManagerService();     MessageQueueService * _service = _getProviderManagerService();
     Uint32 _queueId = _service->getQueueId();     Uint32 _queueId = _service->getQueueId();
  
     callback_data *cb_data = new callback_data(this);  
   
     // create request envelope     // create request envelope
     AsyncLegacyOperationStart * asyncRequest =     AsyncLegacyOperationStart * asyncRequest =
         new AsyncLegacyOperationStart (         new AsyncLegacyOperationStart (
             _service->get_next_xid(),  
             NULL,             NULL,
             _queueId,             _queueId,
             disable_req,              disable_req);
             _queueId);  
  
     AsyncReply * asyncReply = _controller->ClientSendWait(*_client_handle,      AsyncReply * asyncReply =
                                                           _queueId,          _controller->ClientSendWait(_queueId, asyncRequest);
                                                           asyncRequest);  
     CIMDisableModuleResponseMessage * response =     CIMDisableModuleResponseMessage * response =
         reinterpret_cast<CIMDisableModuleResponseMessage *>(         reinterpret_cast<CIMDisableModuleResponseMessage *>(
              (dynamic_cast<AsyncLegacyOperationResult *>(asyncReply))->get_result());               (dynamic_cast<AsyncLegacyOperationResult
                     *>(asyncReply))->get_result());
     if (response->cimException.getCode() != CIM_ERR_SUCCESS)     if (response->cimException.getCode() != CIM_ERR_SUCCESS)
     {     {
         CIMException e = response->cimException;         CIMException e = response->cimException;
         delete asyncRequest;         delete asyncRequest;
         delete asyncReply;         delete asyncReply;
         delete response;         delete response;
         throw (e);          throw e;
     }     }
  
     Array<Uint16> operationalStatus = response->operationalStatus;     Array<Uint16> operationalStatus = response->operationalStatus;
Line 1171 
Line 1296 
     MessageQueueService * _service = _getProviderManagerService();     MessageQueueService * _service = _getProviderManagerService();
     Uint32 _queueId = _service->getQueueId();     Uint32 _queueId = _service->getQueueId();
  
     callback_data *cb_data = new callback_data(this);  
   
     // create request envelope     // create request envelope
     AsyncLegacyOperationStart * asyncRequest =     AsyncLegacyOperationStart * asyncRequest =
         new AsyncLegacyOperationStart (         new AsyncLegacyOperationStart (
             _service->get_next_xid(),  
             NULL,             NULL,
             _queueId,             _queueId,
             enable_req,              enable_req);
             _queueId);  
  
     AsyncReply * asyncReply = _controller->ClientSendWait(*_client_handle,      AsyncReply * asyncReply =
                                                           _queueId,          _controller->ClientSendWait(_queueId, asyncRequest);
                                                           asyncRequest);  
     CIMEnableModuleResponseMessage * response =     CIMEnableModuleResponseMessage * response =
         reinterpret_cast<CIMEnableModuleResponseMessage *>(         reinterpret_cast<CIMEnableModuleResponseMessage *>(
              (dynamic_cast<AsyncLegacyOperationResult *>(asyncReply))->get_result());               (dynamic_cast<AsyncLegacyOperationResult
                     *>(asyncReply))->get_result());
     if (response->cimException.getCode() != CIM_ERR_SUCCESS)     if (response->cimException.getCode() != CIM_ERR_SUCCESS)
     {     {
         CIMException e = response->cimException;         CIMException e = response->cimException;
Line 1210 
Line 1331 
 void ProviderRegistrationProvider::_sendTerminationMessageToSubscription( void ProviderRegistrationProvider::_sendTerminationMessageToSubscription(
     const CIMObjectPath & ref, const String & moduleName,     const CIMObjectPath & ref, const String & moduleName,
     const Boolean disableProviderOnly,     const Boolean disableProviderOnly,
     const AcceptLanguages & al)      const AcceptLanguageList & al)
 { {
     CIMInstance instance;     CIMInstance instance;
     String _moduleName;     String _moduleName;
Line 1222 
Line 1343 
             PEGASUS_CLASSNAME_PROVIDER, ref.getKeyBindings());             PEGASUS_CLASSNAME_PROVIDER, ref.getKeyBindings());
  
         Array<CIMObjectPath> instanceNames =         Array<CIMObjectPath> instanceNames =
             _providerRegistrationManager->enumerateInstanceNames(reference);              _providerRegistrationManager->enumerateInstanceNamesForClass(
                   reference);
  
         // find all the instances which have same module name as moduleName         // find all the instances which have same module name as moduleName
         for (Uint32 i = 0, n=instanceNames.size(); i < n; i++)         for (Uint32 i = 0, n=instanceNames.size(); i < n; i++)
Line 1287 
Line 1409 
         termination_req->operationContext.set(AcceptLanguageListContainer(al));         termination_req->operationContext.set(AcceptLanguageListContainer(al));
  
         // create request envelope         // create request envelope
         AsyncLegacyOperationStart asyncRequest          AsyncLegacyOperationStart asyncRequest(
             (_service->get_next_xid(),  
             NULL,             NULL,
             _queueId,             _queueId,
             termination_req,              termination_req);
             _queueId);  
  
         AutoPtr <AsyncReply> asyncReply          AutoPtr <AsyncReply> asyncReply(
             (_controller->ClientSendWait (* _client_handle, _queueId,              _controller->ClientSendWait(_queueId, &asyncRequest));
             &asyncRequest));  
  
         AutoPtr <CIMNotifyProviderTerminationResponseMessage> response         AutoPtr <CIMNotifyProviderTerminationResponseMessage> response
             (reinterpret_cast <CIMNotifyProviderTerminationResponseMessage *>             (reinterpret_cast <CIMNotifyProviderTerminationResponseMessage *>
Line 1306 
Line 1425 
         if (response->cimException.getCode () != CIM_ERR_SUCCESS)         if (response->cimException.getCode () != CIM_ERR_SUCCESS)
         {         {
             CIMException e = response->cimException;             CIMException e = response->cimException;
             throw (e);              throw e;
         }         }
     }     }
 } }
Line 1329 
Line 1448 
     const CIMObjectPath & objectReference,     const CIMObjectPath & objectReference,
     const String & moduleName,     const String & moduleName,
     Boolean disableProviderOnly,     Boolean disableProviderOnly,
     const AcceptLanguages & al)         // l10n      const AcceptLanguageList & al)
 { {
         //         //
         // get module status         // get module status
Line 1351 
Line 1470 
         Array<CIMInstance> instances;         Array<CIMInstance> instances;
         CIMInstance mInstance;         CIMInstance mInstance;
         String _moduleName;         String _moduleName;
         Uint16 providers;  
         CIMObjectPath providerRef;         CIMObjectPath providerRef;
         Boolean indProvider = false;         Boolean indProvider = false;
         Array<Boolean> indicationProviders;         Array<Boolean> indicationProviders;
Line 1391 
Line 1509 
             // get all provider instances which have same module name as             // get all provider instances which have same module name as
             // moduleName             // moduleName
             Array<CIMObjectPath> instanceNames =             Array<CIMObjectPath> instanceNames =
                 _providerRegistrationManager->enumerateInstanceNames(providerRef);                  _providerRegistrationManager->enumerateInstanceNamesForClass(
                       providerRef);
  
             for(Uint32 i = 0, n=instanceNames.size(); i < n; i++)             for(Uint32 i = 0, n=instanceNames.size(); i < n; i++)
             {             {
Line 1430 
Line 1549 
         }         }
         else         else
         {         {
             instance = _providerRegistrationManager->getInstance(objectReference);              instance =
                   _providerRegistrationManager->getInstance(objectReference);
             if (_isIndicationProvider(moduleName, instance))             if (_isIndicationProvider(moduleName, instance))
             {             {
                 indProvider = true;                 indProvider = true;
Line 1461 
Line 1581 
                     indicationProviders,                     indicationProviders,
                     QueueIdStack(_service->getQueueId()));                     QueueIdStack(_service->getQueueId()));
 // l10n // l10n
                 disable_req->operationContext.set(AcceptLanguageListContainer(al));;                  disable_req->operationContext.set
                       (AcceptLanguageListContainer(al));;
  
             Array<Uint16> _opStatus =             Array<Uint16> _opStatus =
                 _sendDisableMessageToProviderManager(disable_req);                 _sendDisableMessageToProviderManager(disable_req);
Line 1476 
Line 1597 
                         if (indProvider)                         if (indProvider)
                         {                         {
                             // send termination message to subscription service                             // send termination message to subscription service
                             _sendTerminationMessageToSubscription(objectReference,                              _sendTerminationMessageToSubscription(
                                   moduleName, false, al);                                  objectReference, moduleName, false, al);
                         }                         }
                         return (0);                         return (0);
                     }                     }
Line 1513 
Line 1634 
 Sint16 ProviderRegistrationProvider::_enableModule( Sint16 ProviderRegistrationProvider::_enableModule(
     const CIMObjectPath & moduleRef,     const CIMObjectPath & moduleRef,
     const String & moduleName,     const String & moduleName,
     const AcceptLanguages & al)      const AcceptLanguageList & al)
 { {
         //         //
         // get module status         // get module status
Line 1555 
Line 1676 
                     XmlWriter::getNextMessageId (),                     XmlWriter::getNextMessageId (),
                     mInstance,                     mInstance,
                     QueueIdStack(_service->getQueueId()));                     QueueIdStack(_service->getQueueId()));
 // l10n  
         enable_req->operationContext.set(AcceptLanguageListContainer(al));;              enable_req->operationContext.set(AcceptLanguageListContainer(al));
  
             Array<Uint16> _opStatus;             Array<Uint16> _opStatus;
             _opStatus = _sendEnableMessageToProviderManager(enable_req);             _opStatus = _sendEnableMessageToProviderManager(enable_req);
Line 1579 
Line 1700 
             CIMInstance updatedModuleInstance =             CIMInstance updatedModuleInstance =
                 _providerRegistrationManager->getInstance(moduleRef);                 _providerRegistrationManager->getInstance(moduleRef);
  
             // module is enabled, initialize providers as necessary  
             _providerRegistrationManager->initializeProviders(  
                 updatedModuleInstance);  
   
             //             //
             // The module is enabled, need to send enable message to             // The module is enabled, need to send enable message to
             // subscription service if the provider is an indication provider             // subscription service if the provider is an indication provider
Line 1598 
Line 1715 
             // moduleName             // moduleName
             //             //
             Array<CIMObjectPath> instanceNames =             Array<CIMObjectPath> instanceNames =
                 _providerRegistrationManager->enumerateInstanceNames(providerRef);                  _providerRegistrationManager->enumerateInstanceNamesForClass(
                       providerRef);
             CIMInstance pInstance;             CIMInstance pInstance;
             String _moduleName;             String _moduleName;
             String _providerName;             String _providerName;
Line 1622 
Line 1740 
                     //                     //
                     // get provider name from reference                     // get provider name from reference
                     //                     //
                     if(keys[j].getName().equal (_PROPERTY_PROVIDER_NAME))                      if(keys[j].getName().equal (PEGASUS_PROPERTYNAME_NAME))
                     {                     {
                         _providerName = keys[j].getValue();                         _providerName = keys[j].getValue();
                     }                     }
Line 1634 
Line 1752 
                     pInstance = _providerRegistrationManager->getInstance                     pInstance = _providerRegistrationManager->getInstance
                         (providerRef);                         (providerRef);
                     //                     //
                     // get all the indication capability instances which belongs                      // get all the indication capability instances which
                     // to this provider                      // belongs to this provider
                     //                     //
                     capInstances = _getIndicationCapInstances(                     capInstances = _getIndicationCapInstances(
                                    moduleName, pInstance, providerRef);                                    moduleName, pInstance, providerRef);
Line 1665 
Line 1783 
     const CIMInstance & mInstance,     const CIMInstance & mInstance,
     const CIMInstance & pInstance,     const CIMInstance & pInstance,
     const Array<CIMInstance> & capInstances,     const Array<CIMInstance> & capInstances,
     const AcceptLanguages & al)      const AcceptLanguageList & al)
 { {
     //     //
     // get indication server queueId     // get indication server queueId
Line 1683 
Line 1801 
                     QueueIdStack(_service->getQueueId()));                     QueueIdStack(_service->getQueueId()));
  
         enable_req->operationContext.set(AcceptLanguageListContainer(al));         enable_req->operationContext.set(AcceptLanguageListContainer(al));
     enable_req->operationContext.insert(ProviderIdContainer(mInstance,pInstance));      enable_req->operationContext.insert(ProviderIdContainer
                                           (mInstance,pInstance));
  
         // create request envelope         // create request envelope
         AsyncLegacyOperationStart * asyncRequest =         AsyncLegacyOperationStart * asyncRequest =
             new AsyncLegacyOperationStart (             new AsyncLegacyOperationStart (
                 _service->get_next_xid(),  
                 NULL,                 NULL,
                 _queueId,                 _queueId,
                 enable_req,                  enable_req);
                 _queueId);  
  
         AsyncReply * asyncReply =         AsyncReply * asyncReply =
             _controller->ClientSendWait(*_client_handle,              _controller->ClientSendWait(_queueId, asyncRequest);
                                         _queueId,  
                                         asyncRequest);  
  
         CIMNotifyProviderEnableResponseMessage * response =         CIMNotifyProviderEnableResponseMessage * response =
             reinterpret_cast<CIMNotifyProviderEnableResponseMessage *>(             reinterpret_cast<CIMNotifyProviderEnableResponseMessage *>(
                 (dynamic_cast<AsyncLegacyOperationResult *>(asyncReply))->get_result());                  (dynamic_cast<AsyncLegacyOperationResult *>
                       (asyncReply))->get_result());
  
         if (response->cimException.getCode() != CIM_ERR_SUCCESS)         if (response->cimException.getCode() != CIM_ERR_SUCCESS)
         {         {
Line 1709 
Line 1825 
             delete asyncRequest;             delete asyncRequest;
             delete asyncReply;             delete asyncReply;
             delete response;             delete response;
             throw (e);              throw e;
         }         }
  
         delete asyncRequest;         delete asyncRequest;
Line 1726 
Line 1842 
 { {
     // get provider name     // get provider name
     String providerName;     String providerName;
     Uint32 pos = instance.findProperty(_PROPERTY_PROVIDER_NAME);      Uint32 pos = instance.findProperty(PEGASUS_PROPERTYNAME_NAME);
     if (pos != PEG_NOT_FOUND)     if (pos != PEG_NOT_FOUND)
     {     {
         instance.getProperty(pos).getValue().get(providerName);         instance.getProperty(pos).getValue().get(providerName);
Line 1746 
Line 1862 
 { {
     // get provider name     // get provider name
     String providerName;     String providerName;
     Uint32 pos = instance.findProperty(CIMName (_PROPERTY_PROVIDER_NAME));      Uint32 pos = instance.findProperty(PEGASUS_PROPERTYNAME_NAME);
     if (pos != PEG_NOT_FOUND)     if (pos != PEG_NOT_FOUND)
     {     {
         instance.getProperty(pos).getValue().get(providerName);         instance.getProperty(pos).getValue().get(providerName);
Line 1756 
Line 1872 
  
     capabilityRef = CIMObjectPath(providerRef.getHost(),     capabilityRef = CIMObjectPath(providerRef.getHost(),
                                   providerRef.getNameSpace(),                                   providerRef.getNameSpace(),
                                   PEGASUS_CLASSNAME_CAPABILITIESREGISTRATION,                                    PEGASUS_CLASSNAME_PROVIDERCAPABILITIES,
                                   providerRef.getKeyBindings());                                   providerRef.getKeyBindings());
  
     // get all Capabilities instances     // get all Capabilities instances
     Array<CIMObjectPath> instanceNames =     Array<CIMObjectPath> instanceNames =
         _providerRegistrationManager->enumerateInstanceNames(capabilityRef);          _providerRegistrationManager->enumerateInstanceNamesForClass(
               capabilityRef);
  
     String _moduleName, _providerName;     String _moduleName, _providerName;
     CIMInstance capInstance;     CIMInstance capInstance;
Line 1794 
Line 1911 
             capInstance = _providerRegistrationManager->getInstance             capInstance = _providerRegistrationManager->getInstance
                                 (instanceNames[i]);                                 (instanceNames[i]);
  
             Uint32 pos = capInstance.findProperty(CIMName (_PROPERTY_PROVIDERTYPE));              Uint32 providerTypePos = capInstance.findProperty(
             if (pos != PEG_NOT_FOUND)                  CIMName (_PROPERTY_PROVIDERTYPE));
               if (providerTypePos != PEG_NOT_FOUND)
             {             {
                 capInstance.getProperty(pos).getValue().get(providerTypes);                  capInstance.getProperty(providerTypePos).getValue().get(
                       providerTypes);
  
                 for (Uint32 k=0; k < providerTypes.size(); k++)                 for (Uint32 k=0; k < providerTypes.size(); k++)
                 {                 {
Line 1817 
Line 1936 
     return (indCapInstances);     return (indCapInstances);
 } }
  
   #ifdef PEGASUS_ENABLE_INTEROP_PROVIDER
   void ProviderRegistrationProvider::_sendUpdateCacheMessagetoInteropProvider(
       const OperationContext & context)
   {
       String referenceStr("//", 2);
       referenceStr.append(System::getHostName());
       referenceStr.append("/");
       referenceStr.append(PEGASUS_NAMESPACENAME_INTEROP.getString());
       referenceStr.append(":");
       referenceStr.append(
           PEGASUS_CLASSNAME_PG_PROVIDERPROFILECAPABILITIES.getString());
       CIMObjectPath reference(referenceStr);
   
       Array<CIMParamValue> inParams;
   
       try
       {
           CIMInvokeMethodRequestMessage* request =
               new CIMInvokeMethodRequestMessage(
                   XmlWriter::getNextMessageId(),
                   PEGASUS_NAMESPACENAME_INTEROP,
                   referenceStr,
                   "updateCache",
                   inParams,
                   QueueIdStack(_controller->getQueueId()));
   
           request->operationContext = context;
   
           AsyncModuleOperationStart* moduleControllerRequest =
               new AsyncModuleOperationStart(
                   0,
                   _controller->getQueueId(),
                   PEGASUS_MODULENAME_INTEROPPROVIDER,
                   request);
   
           _controller->SendForget(moduleControllerRequest);
       }
       catch(const Exception &e)
       {
           PEG_TRACE((TRC_CONTROLPROVIDER,Tracer::LEVEL1,
               "Exception caught while invoking InteropProvider 'updateCache'"
                   " method: %s",(const char*)e.getMessage().getCString()));
       }
       catch(...)
       {
           PEG_TRACE_CSTRING(
               TRC_CONTROLPROVIDER,
               Tracer::LEVEL1,
               "Unknown error occurred while"
                   " invoking InteropProvider 'updateCache' method.");
       }
   }
   #endif
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.75  
changed lines
  Added in v.1.117

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2