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

Diff for /pegasus/src/Pegasus/ControlProviders/InteropProvider/InteropProvider.cpp between version 1.34 and 1.39

version 1.34, 2005/05/19 13:56:13 version 1.39, 2005/05/27 19:52:17
Line 36 
Line 36 
 //              Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#3194 //              Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#3194
 //              David Dillard, VERITAS Software Corp. //              David Dillard, VERITAS Software Corp.
 //                  (david.dillard@veritas.com) //                  (david.dillard@veritas.com)
   //              Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3659
 // //
 //%//////////////////////////////////////////////////////////////////////////// //%////////////////////////////////////////////////////////////////////////////
  
Line 49 
Line 50 
 //      CIM_ObjectManagerCommunicationMechanism //      CIM_ObjectManagerCommunicationMechanism
 //      CIM_CIMXMLCommunicationMechanism //      CIM_CIMXMLCommunicationMechanism
 //      CIM_ProtocolAdapter  (Note: Removed because deprecated class in cim 2.9) //      CIM_ProtocolAdapter  (Note: Removed because deprecated class in cim 2.9)
 //      CIM_Namespace (Effective Pegasus 2.4 we use PG_Namespace which  //      CIM_Namespace (Effective Pegasus 2.4 we use PG_Namespace.
 //      is a subclass of CIM_Namespace with additional properties for  //
 //      shared namespaces.  //      PG_Namespace - Pegasus particular subclass of CIM_Namespace that
   //      add the parameters for shared namespaces
   //
   //      PG_CIMXMLCommunicationMechanism - Pegasus subclass of
   //      CIM_CIMXMLCommunicationMechanism that adds support for passing
   //      additional communication parameters (ie. port, https vs. http, etc.)
 // //
 //      It also services the Interop associations tied to these classes //      It also services the Interop associations tied to these classes
 //      including: //      including:
Line 115 
Line 121 
 #define CDEBUG(X) #define CDEBUG(X)
 #define LDEBUG() #define LDEBUG()
 //#define CDEBUG(X) PEGASUS_STD(cout) << "InteropProvider " << X << PEGASUS_STD(endl) //#define CDEBUG(X) PEGASUS_STD(cout) << "InteropProvider " << X << PEGASUS_STD(endl)
 //#define LDEBUG(X) Logger::put (Logger::DEBUG_LOG, "InteropProvider", Logger::INFORMATION, "$0", X)  //#define LDEBUG(X) Logger::put (Logger::DEBUG_LOG, "InteropProvider", Logger::TRACE, "$0", X)
  
 //************************************************************************** //**************************************************************************
 // //
Line 130 
Line 136 
 /** /**
     The constants representing the class names we process     The constants representing the class names we process
 */ */
 // ATTN DELETE: static const CIMName __NAMESPACE_CLASSNAME  = CIMName ("__Namespace");  
 static const CIMName CIM_NAMESPACE_CLASSNAME  = CIMName ("CIM_Namespace"); static const CIMName CIM_NAMESPACE_CLASSNAME  = CIMName ("CIM_Namespace");
 static const CIMName PG_NAMESPACE_CLASSNAME  = CIMName ("PG_Namespace"); static const CIMName PG_NAMESPACE_CLASSNAME  = CIMName ("PG_Namespace");
  
Line 144 
Line 149 
 static const CIMName CIM_NAMESPACEINMANAGER_CLASSNAME  = static const CIMName CIM_NAMESPACEINMANAGER_CLASSNAME  =
         CIMName ("CIM_NamespaceInManager");         CIMName ("CIM_NamespaceInManager");
  
 // Property Names for __Namespace Class  // Property Names for CIM_Namespace Class
 static const CIMName NAMESPACE_PROPERTYNAME  = CIMName ("Name"); static const CIMName NAMESPACE_PROPERTYNAME  = CIMName ("Name");
   
   // Root Namespace Name for test.
 static const CIMNamespaceName ROOTNS  = CIMNamespaceName ("root"); static const CIMNamespaceName ROOTNS  = CIMNamespaceName ("root");
  
  
 // Property names for CIM_ObjectManager Class // Property names for CIM_ObjectManager Class
 static const CIMName OM_GATHERSTATISTICALDATA  = static const CIMName OM_GATHERSTATISTICALDATA  =
  CIMName ("GatherStatisticalData");  CIMName ("GatherStatisticalData");
   
 // Property for the slp template. // Property for the slp template.
 static const CIMName OM_DESCRIPTIONPROPERTY = static const CIMName OM_DESCRIPTIONPROPERTY =
     CIMName("Description");     CIMName("Description");
Line 237 
Line 245 
  
     //***********************************************     //***********************************************
     // This is a tempory fix untill there is a method created for the InteropProvider to     // This is a tempory fix untill there is a method created for the InteropProvider to
     // do it's inaliaztion work. This fix sets StatisticalData::CopyGSD, enabling the      // do it's inalization work. This fix sets StatisticalData::CopyGSD, enabling the
     //statistical gathering function.     //statistical gathering function.
     Array<CIMInstance> instance = repository->enumerateInstances(CIMNamespaceName("root/cimv2"), CIMName ("CIM_ObjectManager"));  
  
     if(instance.size() > 0)  
        Boolean InstancesExists = true;
        Array<CIMInstance> instance;
   
        try
        {
            instance = repository->enumerateInstances(CIMNamespaceName("root/cimv2"),
                                                      CIMName ("CIM_ObjectManager"));
        }
        catch(Exception e)
        {
          InstancesExists = false;
        }
   
        /* When Bug 3696 is fixed the following try block will replace the try block above. But for
           now if no instances of the CIM_ObjectManager class are found in the root/cimv2 name space
           the root/PG_InterOp name space will be checked
        */
        if(!InstancesExists)
        {
            try
            {
                instance = repository->enumerateInstances(CIMNamespaceName("root/PG_InterOp"),
                                                          CIMName ("CIM_ObjectManager"));
            }
            catch(Exception e)
            {
                InstancesExists = false;
            }
        }
   
        if(instance.size() > 0 && InstancesExists)
     {     {
         Boolean output = false;         Boolean output = false;
         Uint32 pos;         Uint32 pos;
Line 267 
Line 305 
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
  }  }
  
   
   
 //*************************************************************** //***************************************************************
 // Provider Utility Functions // Provider Utility Functions
 //*************************************************************** //***************************************************************
Line 556 
Line 592 
    @return the CIMClass object    @return the CIMClass object
    @Exceptions any repository exceptions if class not found.    @Exceptions any repository exceptions if class not found.
 */ */
 CIMClass InteropProvider::_getClass(const CIMNamespaceName& nameSpace,  CIMClass InteropProvider::_getClass(const CIMObjectPath& objectPath,
                                     const CIMName& className)                                     const CIMName& className)
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::_getClass");             "InteropProvider::_getClass");
  
     CIMClass myClass = _repository->getClass(nameSpace, className,      CIMClass myClass = _repository->getClass(objectPath.getNameSpace(), className,
                             false,true,true);                             false,true,true);
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
     return myClass;     return myClass;
Line 697 
Line 733 
             "InteropProvider::_fixInstanceCommonKeys()");             "InteropProvider::_fixInstanceCommonKeys()");
     String SystemCreationClassName = System::getSystemCreationClassName ();     String SystemCreationClassName = System::getSystemCreationClassName ();
  
     _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_SYSTEMCREATIONCLASSNAME,SystemCreationClassName);      _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_SYSTEMCREATIONCLASSNAME,
               SystemCreationClassName);
  
     // Add property SystemName     // Add property SystemName
       _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_SYSTEMNAME,
     _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_SYSTEMNAME,System::getFullyQualifiedHostName());              System::getFullyQualifiedHostName());
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
  
Line 717 
Line 754 
     @return CIMInstance of this class with properties complete.     @return CIMInstance of this class with properties complete.
     @exception passes on any exceptions received from the repository request.     @exception passes on any exceptions received from the repository request.
 */ */
 CIMInstance InteropProvider::_buildInstanceSkeleton(const CIMName& className)  CIMInstance InteropProvider::_buildInstanceSkeleton(const CIMObjectPath & objectPath,
                                                       const CIMName& className)
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::_buildInstanceSkeleton()");             "InteropProvider::_buildInstanceSkeleton()");
     CIMClass myClass;     CIMClass myClass;
  
     CIMInstance skeleton(className);     CIMInstance skeleton(className);
         myClass = _repository->getClass(_operationNamespace, className, false, true, true);          myClass = _repository->getClass(objectPath.getNameSpace(),
                                           className, false, true, true);
  
     // copy the qualifiers     // copy the qualifiers
     for (Uint32 i = 0 ; i < myClass.getQualifierCount() ; i++)     for (Uint32 i = 0 ; i < myClass.getQualifierCount() ; i++)
Line 744 
Line 783 
    @return CIMInstance of the class    @return CIMInstance of the class
 */ */
 CIMInstance InteropProvider::_buildInstancePGCIMXMLCommunicationMechanism( CIMInstance InteropProvider::_buildInstancePGCIMXMLCommunicationMechanism(
               const CIMObjectPath& objectPath,
                                             const String& namespaceType,                                             const String& namespaceType,
                                             const String& IPAddress,                                             const String& IPAddress,
                                             const Boolean& includeQualifiers,                                             const Boolean& includeQualifiers,
Line 753 
Line 793 
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::_buildInstancePGCIMXMLCommunicationMechanism()");             "InteropProvider::_buildInstancePGCIMXMLCommunicationMechanism()");
  
     CIMInstance instance = _buildInstanceSkeleton(PG_CIMXMLCOMMUNICATIONMECHANISM_CLASSNAME);      CIMInstance instance = _buildInstanceSkeleton(objectPath,
                               PG_CIMXMLCOMMUNICATIONMECHANISM_CLASSNAME);
  
     _fixInstanceCommonKeys(instance);     _fixInstanceCommonKeys(instance);
  
     //CreationClassName     //CreationClassName
     _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_CREATIONCLASSNAME,PG_CIMXMLCOMMUNICATIONMECHANISM_CLASSNAME.getString());      _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_CREATIONCLASSNAME,
               PG_CIMXMLCOMMUNICATIONMECHANISM_CLASSNAME.getString());
  
     //Name, this CommunicationMechanism.  We need to make it unique.  To do this     //Name, this CommunicationMechanism.  We need to make it unique.  To do this
     // we simply append the commtype to the classname since we have max of two right     // we simply append the commtype to the classname since we have max of two right
     // now.     // now.
     _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_NAME, (String("PEGASUSCOMM") + namespaceType));      _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_NAME,
               (String("PEGASUSCOMM") + namespaceType));
  
     // CommunicationMechanism Property - Force to 2.     // CommunicationMechanism Property - Force to 2.
     _setPropertyValue(instance, OM_COMMUNICATIONMECHANISM, Uint16(2));     _setPropertyValue(instance, OM_COMMUNICATIONMECHANISM, Uint16(2));
Line 803 
Line 846 
 } }
  
 Array<CIMInstance> InteropProvider::_buildInstancesPGCIMXMLCommunicationMechanism( Array<CIMInstance> InteropProvider::_buildInstancesPGCIMXMLCommunicationMechanism(
                                               const CIMObjectPath& objectPath,
                                             const Boolean includeQualifiers,                                             const Boolean includeQualifiers,
                                             const Boolean includeClassOrigin,                                             const Boolean includeClassOrigin,
                                             const CIMPropertyList& propertyList)                                             const CIMPropertyList& propertyList)
Line 822 
Line 866 
  
     if (enableHttpConnection)     if (enableHttpConnection)
     {     {
         CDEBUG("building pgcimxmlinstances 1");  
         CIMInstance instance = _buildInstancePGCIMXMLCommunicationMechanism(         CIMInstance instance = _buildInstancePGCIMXMLCommunicationMechanism(
                                           objectPath,
                             "http", IPAddress,                             "http", IPAddress,
                             includeQualifiers,                             includeQualifiers,
                             includeClassOrigin,                             includeClassOrigin,
Line 833 
Line 877 
  
     if (enableHttpsConnection)     if (enableHttpsConnection)
     {     {
         CDEBUG("building pgcimxmlinstances 2");  
         CIMInstance instance = _buildInstancePGCIMXMLCommunicationMechanism(         CIMInstance instance = _buildInstancePGCIMXMLCommunicationMechanism(
                                           objectPath,
                                                 "https", IPAddress,                                                 "https", IPAddress,
                                                 includeQualifiers,                                                 includeQualifiers,
                                                 includeClassOrigin,                                                 includeClassOrigin,
Line 867 
Line 911 
     this is used so infrequently, waste of space.     this is used so infrequently, waste of space.
 */ */
 Boolean InteropProvider::_getInstanceFromRepositoryCIMObjectManager( Boolean InteropProvider::_getInstanceFromRepositoryCIMObjectManager(
                           const CIMObjectPath& objectPath,
                         CIMInstance& rtnInstance,                         CIMInstance& rtnInstance,
                         const Boolean includeQualifiers,                         const Boolean includeQualifiers,
                         const Boolean includeClassOrigin,                         const Boolean includeClassOrigin,
Line 878 
Line 923 
     Array<CIMInstance> instances;     Array<CIMInstance> instances;
     try     try
     {     {
         instances = _repository->enumerateInstances(_operationNamespace,          instances = _repository->enumerateInstances(
                   objectPath.getNameSpace(),
                       CIM_OBJECTMANAGER_CLASSNAME, true, false, includeQualifiers,                       CIM_OBJECTMANAGER_CLASSNAME, true, false, includeQualifiers,
                         includeClassOrigin, propertyList);                         includeClassOrigin, propertyList);
  
Line 894 
Line 940 
             // but we will still continue to use the first entry.             // but we will still continue to use the first entry.
             if (instances.size() > 1)             if (instances.size() > 1)
             {             {
                 Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION,                  Logger::put(Logger::ERROR_LOG,
                     "Error. Multiple definitons of : $0", CIM_OBJECTMANAGER_CLASSNAME.getString());                      System::CIMSERVER, Logger::INFORMATION,
                       "Error. Multiple definitons of : $0",
                       CIM_OBJECTMANAGER_CLASSNAME.getString());
             }             }
             CDEBUG("getInstanceFromRepository returning true");             CDEBUG("getInstanceFromRepository returning true");
             return(true);             return(true);
Line 909 
Line 957 
     catch(const CIMException&)     catch(const CIMException&)
     {     {
         Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION,         Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION,
             "Error. Cannot access $0 in repository", CIM_OBJECTMANAGER_CLASSNAME.getString());              "Error. Cannot access $0 in repository",
               CIM_OBJECTMANAGER_CLASSNAME.getString());
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         throw;         throw;
     }     }
     catch(const Exception&)     catch(const Exception&)
     {     {
         Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION,         Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION,
             "Error. Cannot access $0 in repository", CIM_OBJECTMANAGER_CLASSNAME.getString());              "Error. Cannot access $0 in repository",
               CIM_OBJECTMANAGER_CLASSNAME.getString());
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         throw;         throw;
     }     }
Line 934 
Line 984 
         for this class.         for this class.
 */ */
 CIMInstance InteropProvider::_getInstanceCIMObjectManager( CIMInstance InteropProvider::_getInstanceCIMObjectManager(
                           const CIMObjectPath& objectPath,
                         const Boolean includeQualifiers,                         const Boolean includeQualifiers,
                         const Boolean includeClassOrigin,                         const Boolean includeClassOrigin,
                         const CIMPropertyList& propertyList)                         const CIMPropertyList& propertyList)
Line 943 
Line 994 
  
     // Try to get the current object.  If true then it is already created.     // Try to get the current object.  If true then it is already created.
     CIMInstance instance;     CIMInstance instance;
     if (!_getInstanceFromRepositoryCIMObjectManager(instance, includeQualifiers,includeClassOrigin,propertyList))      if (!_getInstanceFromRepositoryCIMObjectManager(objectPath,
                   instance, includeQualifiers,includeClassOrigin,propertyList))
     {     {
         //         //
         // No instance in the repository. Build new instance and save it.         // No instance in the repository. Build new instance and save it.
         //         //
         CDEBUG("Creating New instance of CIMOBjectManager");         CDEBUG("Creating New instance of CIMOBjectManager");
         instance = _buildInstanceSkeleton(CIM_OBJECTMANAGER_CLASSNAME);          instance = _buildInstanceSkeleton(objectPath, CIM_OBJECTMANAGER_CLASSNAME);
  
         _fixInstanceCommonKeys(instance);         _fixInstanceCommonKeys(instance);
  
         _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_CREATIONCLASSNAME,CIM_OBJECTMANAGER_CLASSNAME.getString());          _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_CREATIONCLASSNAME,
                   CIM_OBJECTMANAGER_CLASSNAME.getString());
         _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_NAME,buildObjectManagerName());         _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_NAME,buildObjectManagerName());
         _setPropertyValue(instance, CIMName("ElementName"), String("Pegasus"));         _setPropertyValue(instance, CIMName("ElementName"), String("Pegasus"));
  
Line 996 
Line 1049 
         try         try
         {         {
             CDEBUG("Create Instance for CIM_ObjectManager");             CDEBUG("Create Instance for CIM_ObjectManager");
             instancePath = _repository->createInstance(_operationNamespace,              instancePath = _repository->createInstance(objectPath.getNameSpace(),
                            instance );                            instance );
         }         }
         catch(const CIMException&)         catch(const CIMException&)
Line 1022 
Line 1075 
     the repository namespace management functions     the repository namespace management functions
     Pegasus 2.4 - This now gets CIM_Namespace and its subclass PG_Namespace     Pegasus 2.4 - This now gets CIM_Namespace and its subclass PG_Namespace
 */ */
 Array<CIMInstance> InteropProvider::_getInstancesCIMNamespace(const Boolean& includeQualifiers,  Array<CIMInstance> InteropProvider::_getInstancesCIMNamespace(
                               const CIMObjectPath& objectPath,
                               const Boolean& includeQualifiers,
                             const Boolean& includeClassOrigin,                             const Boolean& includeClassOrigin,
                             const CIMPropertyList& propertyList)                             const CIMPropertyList& propertyList)
 { {
Line 1037 
Line 1092 
     // We build instances of PG namespace since that is the leaf class     // We build instances of PG namespace since that is the leaf class
     for (Uint32 i = 0; i < namespaceNames.size(); i++)     for (Uint32 i = 0; i < namespaceNames.size(); i++)
     {     {
        instanceArray.append( _buildInstancePGNamespace(namespaceNames[i]));         instanceArray.append( _buildInstancePGNamespace(objectPath, namespaceNames[i]));
     }     }
     CDEBUG("Build this many PG_Namespace Instances. count= " << instanceArray.size());     CDEBUG("Build this many PG_Namespace Instances. count= " << instanceArray.size());
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
Line 1048 
Line 1103 
     for the instance required.     for the instance required.
     ATTN: Note that this is incorrect. We are supplying the namespace name and need to supply     ATTN: Note that this is incorrect. We are supplying the namespace name and need to supply
     the objectpath     the objectpath
     @param TBD      @param objectPath CIMObjectPath from request
       @param nameSpace CIMNamespaceName for instance to get
     @return CIMInstance with the found instance or CIMInstance() if nothing found.     @return CIMInstance with the found instance or CIMInstance() if nothing found.
 */ */
 CIMInstance InteropProvider::_getInstanceCIMNamespace(const CIMNamespaceName & nameSpace)  CIMInstance InteropProvider::_getInstanceCIMNamespace(const CIMObjectPath& objectPath)
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::_getInstancesCIMNamespace()");             "InteropProvider::_getInstancesCIMNamespace()");
  
     Array<CIMInstance> instances = _getInstancesCIMNamespace(true, true, CIMPropertyList());      Array<CIMInstance> instances = _getInstancesCIMNamespace(objectPath, true, true, CIMPropertyList());
  
       CIMNamespaceName nameSpace = objectPath.getNameSpace();
     // search the instances for one with the name property value = input parameter.     // search the instances for one with the name property value = input parameter.
     for (Uint32 i = 0 ; i < instances.size() ; i++)     for (Uint32 i = 0 ; i < instances.size() ; i++)
     {     {
Line 1072 
Line 1129 
     return(nullInstance);     return(nullInstance);
 } }
  
 CIMObjectPath InteropProvider::_buildReference(const CIMInstance& instance, const CIMName& className)  CIMObjectPath InteropProvider::_buildReference(const CIMObjectPath& objectPath,
           const CIMInstance& instance, const CIMName& className)
 { {
     return(_buildObjectPath(_operationNamespace,className, instance));      return(_buildObjectPath(objectPath,className, instance));
 } }
  
 Array<CIMInstance> InteropProvider::_buildInstancesNamespaceInManager()  Array<CIMInstance> InteropProvider::_buildInstancesNamespaceInManager(const CIMObjectPath& objectPath)
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::_buildInstancesNamespaceInManager");             "InteropProvider::_buildInstancesNamespaceInManager");
  
     Array<CIMInstance> namespaceInstances = _getInstancesCIMNamespace(false,      Array<CIMInstance> namespaceInstances = _getInstancesCIMNamespace(objectPath, false,
                             false, CIMPropertyList());                             false, CIMPropertyList());
  
     CIMInstance instanceObjMgr = _getInstanceCIMObjectManager( true, true, CIMPropertyList());      CIMInstance instanceObjMgr = _getInstanceCIMObjectManager(objectPath, true, true, CIMPropertyList());
  
     CIMObjectPath refObjMgr = _buildReference(instanceObjMgr, CIM_OBJECTMANAGER_CLASSNAME);      CIMObjectPath refObjMgr = _buildReference(objectPath,instanceObjMgr, CIM_OBJECTMANAGER_CLASSNAME);
  
     Array<CIMInstance> assocInstances;     Array<CIMInstance> assocInstances;
  
     for (Uint32 i = 0 ; i < namespaceInstances.size() ; i++)     for (Uint32 i = 0 ; i < namespaceInstances.size() ; i++)
     {     {
         CIMInstance instance = _buildInstanceSkeleton(CIM_NAMESPACEINMANAGER_CLASSNAME);          CIMInstance instance = _buildInstanceSkeleton(objectPath, CIM_NAMESPACEINMANAGER_CLASSNAME);
  
         _setPropertyValue(instance, CIMName("Antecdent"), refObjMgr);          _setPropertyValue(instance, CIMName("Antecedent"), refObjMgr);
         //ATTNATTN: this is weak qualifier.         //ATTNATTN: this is weak qualifier.
         _setPropertyValue(instance, CIMName("Dependent"), _buildReference(namespaceInstances[i],          _setPropertyValue(instance, CIMName("Dependent"),
                                                             CIM_NAMESPACEINMANAGER_CLASSNAME));              _buildReference(objectPath, namespaceInstances[i], CIM_NAMESPACEINMANAGER_CLASSNAME));
         assocInstances.append(instance);         assocInstances.append(instance);
     }     }
  
Line 1106 
Line 1164 
     return(assocInstances);     return(assocInstances);
 } }
  
 Array<CIMInstance> InteropProvider::_buildInstancesCommMechanismForManager()  Array<CIMInstance> InteropProvider::_buildInstancesCommMechanismForManager(
       const CIMObjectPath& objectPath)
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::_buildInstancesCommMechanismForManager");             "InteropProvider::_buildInstancesCommMechanismForManager");
  
     Array<CIMInstance> commInstances = _buildInstancesPGCIMXMLCommunicationMechanism(true,      Array<CIMInstance> commInstances = _buildInstancesPGCIMXMLCommunicationMechanism(
            objectPath,true,
          true, CIMPropertyList());          true, CIMPropertyList());
  
     CIMInstance instanceObjMgr = _getInstanceCIMObjectManager( true, true, CIMPropertyList());      CIMInstance instanceObjMgr = _getInstanceCIMObjectManager(objectPath, true, true, CIMPropertyList());
  
     CIMObjectPath refObjMgr = _buildReference(instanceObjMgr, CIM_OBJECTMANAGER_CLASSNAME);      CIMObjectPath refObjMgr = _buildReference(objectPath, instanceObjMgr, CIM_OBJECTMANAGER_CLASSNAME);
     Array<CIMInstance> assocInstances;     Array<CIMInstance> assocInstances;
  
     for (Uint32 i = 0 ; i < commInstances.size() ; i++)     for (Uint32 i = 0 ; i < commInstances.size() ; i++)
     {     {
  
         CIMInstance instance = _buildInstanceSkeleton(CIM_COMMMECHANISMFORMANAGER_CLASSNAME);          CIMInstance instance = _buildInstanceSkeleton(objectPath,CIM_COMMMECHANISMFORMANAGER_CLASSNAME);
  
         _setPropertyValue(instance,CIMName("Antecdent"), refObjMgr);          _setPropertyValue(instance,CIMName("Antecedent"), refObjMgr);
         //ATTNATTN: this is weak qualifier.         //ATTNATTN: this is weak qualifier.
         _setPropertyValue(instance,CIMName("Dependent"), _buildReference(commInstances[i],CIM_COMMMECHANISMFORMANAGER_CLASSNAME));          _setPropertyValue(instance,CIMName("Dependent"),
               _buildReference(objectPath, commInstances[i],CIM_COMMMECHANISMFORMANAGER_CLASSNAME));
         assocInstances.append(instance);         assocInstances.append(instance);
     }     }
  
Line 1137 
Line 1198 
 /* generate one instance of the CIM_Namespace class with the /* generate one instance of the CIM_Namespace class with the
    properties    properties
    NOTE: CIM 2.4 - Changed to build PG namespace    NOTE: CIM 2.4 - Changed to build PG namespace
      @param objectPath
    @param namespace name to put into the class    @param namespace name to put into the class
    @exceptions - exceptions carried forward from create instance    @exceptions - exceptions carried forward from create instance
    and addProperty.    and addProperty.
 */ */
 CIMInstance InteropProvider::_buildInstancePGNamespace(const CIMNamespaceName & nameSpace)  CIMInstance InteropProvider::_buildInstancePGNamespace(const CIMObjectPath& objectPath,
           CIMNamespaceName& nameSpace)
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::_buildInstancePGNamespace");             "InteropProvider::_buildInstancePGNamespace");
Line 1152 
Line 1215 
     // interop or more generally somewhere within the system for common access.     // interop or more generally somewhere within the system for common access.
     String ObjectManagerName = "ObjectManagerNameValue";     String ObjectManagerName = "ObjectManagerNameValue";
  
     CIMInstance instance = _buildInstanceSkeleton(PG_NAMESPACE_CLASSNAME);      CIMInstance instance = _buildInstanceSkeleton(objectPath, PG_NAMESPACE_CLASSNAME);
  
     _fixInstanceCommonKeys(instance);     _fixInstanceCommonKeys(instance);
  
Line 1234 
Line 1297 
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
     return(instance);     return(instance);
 } }
   
 void _validateCIMNamespaceKeys(const CIMObjectPath& objectPath) void _validateCIMNamespaceKeys(const CIMObjectPath& objectPath)
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
Line 1326 
Line 1390 
         }         }
         else         else
         {         {
             //  
             _setPropertyValue(instance, propertyName, value);             _setPropertyValue(instance, propertyName, value);
         }         }
     }     }
Line 1474 
Line 1537 
 /** builds complete object path from instance and classinfo by building the full path /** builds complete object path from instance and classinfo by building the full path
     with host and namespace names included.     with host and namespace names included.
 */ */
 CIMObjectPath InteropProvider::_buildObjectPath(const CIMNamespaceName& name,  CIMObjectPath InteropProvider::_buildObjectPath(const CIMObjectPath& objectPath,
                                                 const CIMName& className,                                                 const CIMName& className,
                                                 const CIMInstance& instance)                                                 const CIMInstance& instance)
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::_buildObjectPath");             "InteropProvider::_buildObjectPath");
  
     CIMObjectPath objectPath;      CIMObjectPath rtnObjectPath;
     objectPath = _buildInstancePath(name,className,instance);      rtnObjectPath = _buildInstancePath(objectPath,className,instance);
  
     objectPath.setHost(System::getHostName());      rtnObjectPath.setHost(objectPath.getHost());
  
     objectPath.setNameSpace(name);      rtnObjectPath.setNameSpace(objectPath.getNameSpace());
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
     return(objectPath);      return(rtnObjectPath);
 } }
  
 /* Given a class and instance build the instance path for a /* Given a class and instance build the instance path for a
Line 1500 
Line 1563 
    @exceptions - Passes repository exceptions.    @exceptions - Passes repository exceptions.
 */ */
  
 CIMObjectPath InteropProvider::_buildInstancePath(const CIMNamespaceName& name,  CIMObjectPath InteropProvider::_buildInstancePath(const CIMObjectPath& objectPath,
                                            const CIMName& className,                                            const CIMName& className,
                                            const CIMInstance& instance)                                            const CIMInstance& instance)
 { {
Line 1509 
Line 1572 
  
     // get the class CIM_Namespace class to use in building path     // get the class CIM_Namespace class to use in building path
     // Exception out if Class does not exist in this namespace     // Exception out if Class does not exist in this namespace
     CIMClass thisClass = _getClass(name, className);      CIMClass thisClass = _getClass(objectPath, className);
  
     CIMObjectPath ref = instance.buildPath(thisClass);     CIMObjectPath ref = instance.buildPath(thisClass);
  
Line 1559 
Line 1622 
     String name;     String name;
     propertyValue.get(name);     propertyValue.get(name);
     return(name);     return(name);
     //ATTN: KS Returns String whereas below returns CIMNamespaceName.  
 } }
  
 //*************************************************************************** //***************************************************************************
Line 1581 
Line 1643 
             (const char *) instanceReference.toString().getCString());             (const char *) instanceReference.toString().getCString());
  
         handler.processing();         handler.processing();
         CIMNamespaceName newNamespaceName;  
  
         CDEBUG("CreateInstance " << instanceReference.toString());         CDEBUG("CreateInstance " << instanceReference.toString());
         // operation namespace needed internally to get class.         // operation namespace needed internally to get class.
         _operationNamespace = instanceReference.getNameSpace();          // KS_TEMP _operationNamespace = instanceReference.getNameSpace();
  
         // Verify that ClassName is correct and get value         // Verify that ClassName is correct and get value
         targetClass classEnum  = _verifyValidClassInput(instanceReference.getClassName());         targetClass classEnum  = _verifyValidClassInput(instanceReference.getClassName());
Line 1593 
Line 1654 
         String userName = _validateUserID(context);         String userName = _validateUserID(context);
         CIMObjectPath newInstanceReference;         CIMObjectPath newInstanceReference;
  
         if ((classEnum == CIM_OBJECTMANAGER) ||          CIMNamespaceName newNamespaceName;
             (classEnum == PG_CIMXMLCOMMUNICATIONMECHANISM))  
             throw CIMNotSupportedException("InteropProvider, Create Not allowed");  
   
         if (classEnum == PG_NAMESPACE)         if (classEnum == PG_NAMESPACE)
         {         {
 #ifdef PEGASUS_OS_OS400 #ifdef PEGASUS_OS_OS400
             MessageLoaderParms mparms("ControlProviders.InteropProvider.CREATE_INSTANCE_NOT_ALLOWED",              MessageLoaderParms mparms(
                   "ControlProviders.InteropProvider.CREATE_INSTANCE_NOT_ALLOWED",
                                       "Create instance operation not allowed by Interop Provider for class $0.",                                       "Create instance operation not allowed by Interop Provider for class $0.",
                                       PG_NAMESPACE_CLASSNAME.getString());                                       PG_NAMESPACE_CLASSNAME.getString());
             throw CIMNotSupportedException(mparms);             throw CIMNotSupportedException(mparms);
Line 1612 
Line 1671 
             // Validate that keys are as required. Does its own exception.             // Validate that keys are as required. Does its own exception.
             newNamespaceName = _getKeyValue(myInstance, CIM_NAMESPACE_PROPERTY_NAME);             newNamespaceName = _getKeyValue(myInstance, CIM_NAMESPACE_PROPERTY_NAME);
  
             newInstanceReference = _buildInstancePath(_operationNamespace,              newInstanceReference = _buildInstancePath(instanceReference,
                                         PG_NAMESPACE_CLASSNAME, localInstance);                                         PG_NAMESPACE_CLASSNAME, localInstance);
 #endif #endif
         }         }
  
           else if ((classEnum == CIM_OBJECTMANAGER) ||
               (classEnum == PG_CIMXMLCOMMUNICATIONMECHANISM))
           {
               PEG_METHOD_EXIT();
               throw CIMNotSupportedException("InteropProvider, Create Not allowed");
           }
   
         else   // Invalid class for the create functions.         else   // Invalid class for the create functions.
         {         {
             PEGASUS_ASSERT(false);             PEGASUS_ASSERT(false);
Line 1675 
Line 1741 
             PEG_TRACE_STRING(TRC_CONTROLPROVIDER, Tracer::LEVEL4,             PEG_TRACE_STRING(TRC_CONTROLPROVIDER, Tracer::LEVEL4,
                 "Namespace = " + newNamespaceName.getString() +                 "Namespace = " + newNamespaceName.getString() +
                     " successfully created.");                     " successfully created.");
             Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,              Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,
                 "Create Namespace: Shareable = $0, Updates allows: $1,  Parent: $2",                  "Create Namespace: Shareable = $0, Updates allowed: $1,  Parent: $2",
                 newNamespaceName.getString(), shareable? "true" : "false", shareable? "true" : "false", parent );                  newNamespaceName.getString(), shareable?
                           "true" : "false", shareable? "true" : "false", parent );
  
         }         }
         catch(const CIMException&)         catch(const CIMException&)
Line 1717 
Line 1784 
             thisProvider,             thisProvider,
             (const char *) instanceName.toString().getCString());             (const char *) instanceName.toString().getCString());
  
         _operationNamespace = instanceName.getNameSpace();          // KS_TEMP _operationNamespace = instanceName.getNameSpace();
         handler.processing();         handler.processing();
         // Verify that ClassName is correct and get value         // Verify that ClassName is correct and get value
         targetClass classEnum  = _verifyValidClassInput(instanceName.getClassName());         targetClass classEnum  = _verifyValidClassInput(instanceName.getClassName());
Line 1729 
Line 1796 
         {         {
             try             try
             {             {
                 _repository->deleteInstance(_operationNamespace,instanceName);                  _repository->deleteInstance(instanceName.getNameSpace(),instanceName);
             }             }
             catch(const CIMException&)             catch(const CIMException&)
             {             {
Line 1741 
Line 1808 
         {         {
             CIMNamespaceName deleteNamespaceName;             CIMNamespaceName deleteNamespaceName;
 #ifdef PEGASUS_OS_OS400 #ifdef PEGASUS_OS_OS400
             MessageLoaderParms mparms("ControlProviders.InteropProvider.DELETE_INSTANCE_NOT_ALLOWED",              MessageLoaderParms mparms(
                   "ControlProviders.InteropProvider.DELETE_INSTANCE_NOT_ALLOWED",
                                       "Delete instance operation not allowed by Interop Provider for class $0.",                                       "Delete instance operation not allowed by Interop Provider for class $0.",
                                       PG_NAMESPACE_CLASSNAME.getString());                                       PG_NAMESPACE_CLASSNAME.getString());
             throw CIMNotSupportedException(mparms);             throw CIMNotSupportedException(mparms);
Line 1766 
Line 1834 
                "Namespace = " + deleteNamespaceName.getString() +                "Namespace = " + deleteNamespaceName.getString() +
                    " successfully deleted.");                    " successfully deleted.");
  
             Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,              Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,
                "Interop Provider Delete Namespace: $0",                "Interop Provider Delete Namespace: $0",
                deleteNamespaceName.getString());                deleteNamespaceName.getString());
         }         }
Line 1775 
Line 1843 
             throw CIMNotSupportedException("Delete Not allowed for " + instanceName.getClassName().getString());             throw CIMNotSupportedException("Delete Not allowed for " + instanceName.getClassName().getString());
         }         }
  
         handler.processing();  
   
         handler.complete();         handler.complete();
  
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
Line 1803 
Line 1869 
             (const char *)_showBool(includeQualifiers).getCString(),             (const char *)_showBool(includeQualifiers).getCString(),
             (const char*) _showBool(includeClassOrigin).getCString(),             (const char*) _showBool(includeClassOrigin).getCString(),
             (const char *)_showPropertyList(propertyList).getCString());             (const char *)_showPropertyList(propertyList).getCString());
   
         // Verify that ClassName is correct and get value         // Verify that ClassName is correct and get value
         targetClass classEnum  = _verifyValidClassInput(instanceName.getClassName());         targetClass classEnum  = _verifyValidClassInput(instanceName.getClassName());
  
         _operationNamespace = instanceName.getNameSpace();  
         String userName = _validateUserID(context);         String userName = _validateUserID(context);
   
         // begin processing the request         // begin processing the request
         handler.processing();         handler.processing();
   
         if (classEnum == CIM_OBJECTMANAGER)         if (classEnum == CIM_OBJECTMANAGER)
         {         {
             CIMInstance instance = _getInstanceCIMObjectManager(includeQualifiers,              CIMInstance instance = _getInstanceCIMObjectManager(
                               instanceName,
                               includeQualifiers,
                                         includeClassOrigin, propertyList);                                         includeClassOrigin, propertyList);
             handler.deliver(instance);             handler.deliver(instance);
             handler.complete();  
             PEG_METHOD_EXIT();  
             return;  
         }         }
  
         if (classEnum == PG_CIMXMLCOMMUNICATIONMECHANISM)          else if (classEnum == PG_CIMXMLCOMMUNICATIONMECHANISM)
         {         {
             // ATTN: test for correct instance KS: Priority 1             // ATTN: test for correct instance KS: Priority 1
             Array <CIMInstance> instances = _buildInstancesPGCIMXMLCommunicationMechanism(              Array <CIMInstance> instances =
                   _buildInstancesPGCIMXMLCommunicationMechanism(
                               instanceName,
                                     includeQualifiers,                                     includeQualifiers,
                                     includeClassOrigin, propertyList);                                     includeClassOrigin, propertyList);
             handler.deliver(instances[0]);             handler.deliver(instances[0]);
             handler.complete();  
             PEG_METHOD_EXIT();  
             return;  
         }         }
  
         if (classEnum == CIM_NAMESPACEINMANAGER)          else if (classEnum == CIM_NAMESPACEINMANAGER)
         {         {
             handler.complete();  
             PEG_METHOD_EXIT();  
             return;  
         }         }
  
           else if (classEnum == PG_NAMESPACE)
           {
         // Get List of namespaces         // Get List of namespaces
         Array<CIMNamespaceName> namespaceNames;         Array<CIMNamespaceName> namespaceNames;
         namespaceNames = _enumerateNameSpaces();         namespaceNames = _enumerateNameSpaces();
         CIMInstance instance;  
  
         if (classEnum == PG_NAMESPACE)  
         {  
             // Not clear what we have to take into account here.             // Not clear what we have to take into account here.
             // get the namespace from the name value.             // get the namespace from the name value.
             // should check the other keys to see if valid.             // should check the other keys to see if valid.
             CIMNamespaceName namespaceName;              CIMNamespaceName namespaceName =
             namespaceName = _getKeyValue(instanceName, CIM_NAMESPACE_PROPERTY_NAME);                  _getKeyValue(instanceName, CIM_NAMESPACE_PROPERTY_NAME);
  
             // ATTN: Why this CIMNamespaceName parentNamespaceName = instanceName.getNameSpace();             // ATTN: Why this CIMNamespaceName parentNamespaceName = instanceName.getNameSpace();
             if (!Contains(namespaceNames, namespaceName))             if (!Contains(namespaceNames, namespaceName))
Line 1861 
Line 1923 
             PEG_TRACE_STRING(TRC_CONTROLPROVIDER, Tracer::LEVEL4,             PEG_TRACE_STRING(TRC_CONTROLPROVIDER, Tracer::LEVEL4,
                "Namespace = " + namespaceName.getString() + " successfully found.");                "Namespace = " + namespaceName.getString() + " successfully found.");
  
             instance = _getInstanceCIMNamespace(namespaceName);              handler.deliver(_getInstanceCIMNamespace(instanceName));
         }         }
         else  // processing for __Namespace         else  // processing for __Namespace
         {         {
             PEGASUS_ASSERT(false);              PEG_METHOD_EXIT();
               throw CIMNotSupportedException
                   (instanceName.getClassName().getString() + " not supported by Interop Provider");
         }         }
  
        handler.deliver(instance);  
   
        // complete processing the request  
        handler.complete();        handler.complete();
  
        PEG_METHOD_EXIT();        PEG_METHOD_EXIT();
Line 1901 
Line 1962 
         // Verify that ClassName is correct and get value         // Verify that ClassName is correct and get value
         targetClass classEnum  = _verifyValidClassInput(ref.getClassName());         targetClass classEnum  = _verifyValidClassInput(ref.getClassName());
  
         // operation namespace needed internally to get class.  
         _operationNamespace = ref.getNameSpace();  
         CDEBUG("Namespace = " << _operationNamespace.getString());  
         //String userName = _validateUserID(context);         //String userName = _validateUserID(context);
  
         // The following 3 classes deliver a single instance because         // The following 3 classes deliver a single instance because
         // that is all there is today.         // that is all there is today.
   
         if (classEnum == CIM_OBJECTMANAGER)         if (classEnum == CIM_OBJECTMANAGER)
         {         {
             CIMInstance instance = _getInstanceCIMObjectManager(includeQualifiers,              CIMInstance instance = _getInstanceCIMObjectManager(
                                       ref,
                                       includeQualifiers,
                                     includeClassOrigin,                                     includeClassOrigin,
                                     propertyList);                                     propertyList);
  
             //Array<Sint8> tmp;  
             ///XmlWriter::appendInstanceElement(tmp, instance);  
             //tmp.append('\0');  
             //Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,  
             //        "Instance - XML content: $0", tmp.getData());  
             ///XmlWriter::printInstanceElement(instance);  
             handler.deliver(instance);             handler.deliver(instance);
             //handler.complete();  
             //PEG_METHOD_EXIT();  
             //return;  
         }         }
  
         else if (classEnum == PG_CIMXMLCOMMUNICATIONMECHANISM)         else if (classEnum == PG_CIMXMLCOMMUNICATIONMECHANISM)
         {         {
             Array<CIMInstance> instances = _buildInstancesPGCIMXMLCommunicationMechanism(includeQualifiers,              Array<CIMInstance> instances = _buildInstancesPGCIMXMLCommunicationMechanism(
                                       ref,
                                       includeQualifiers,
                                     includeClassOrigin, propertyList);                                     includeClassOrigin, propertyList);
             CDEBUG("Build instances of PGCIMXML. count= " << instances.size());             CDEBUG("Build instances of PGCIMXML. count= " << instances.size());
             handler.deliver(instances);             handler.deliver(instances);
             //handler.complete();  
             //PEG_METHOD_EXIT();  
             //return;  
         }         }
  
         else if (classEnum == CIM_NAMESPACEINMANAGER)         else if (classEnum == CIM_NAMESPACEINMANAGER)
Line 1946 
Line 1997 
  
         else if (classEnum == PG_NAMESPACE)         else if (classEnum == PG_NAMESPACE)
         {         {
             Array<CIMInstance> instances = _getInstancesCIMNamespace(includeQualifiers,              Array<CIMInstance> instances = _getInstancesCIMNamespace(
                                       ref,
                                       includeQualifiers,
                                     includeClassOrigin, propertyList);                                     includeClassOrigin, propertyList);
  
             handler.deliver(instances);             handler.deliver(instances);
             //handler.complete();  
             //PEG_METHOD_EXIT();  
             //return;  
         }         }
         else         else
         {         {
               PEG_METHOD_EXIT();
             throw CIMNotSupportedException             throw CIMNotSupportedException
                 ("EnumerateInstance for " + ref.getClassName().getString() + " not supported");                  (ref.getClassName().getString() + " not supported by Interop Provider");
         }         }
  
         handler.complete();         handler.complete();
Line 1974 
Line 2025 
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::modifyInstanceManagerInstance");             "InteropProvider::modifyInstanceManagerInstance");
   
     // the only allowed modification is this one property, statistical data     // the only allowed modification is this one property, statistical data
   
     if (modifiedIns.findProperty(OM_GATHERSTATISTICALDATA) != PEG_NOT_FOUND)     if (modifiedIns.findProperty(OM_GATHERSTATISTICALDATA) != PEG_NOT_FOUND)
     {     {
         // the following is a temporary hack to set the value of the statistics         // the following is a temporary hack to set the value of the statistics
Line 1984 
Line 2037 
 #ifndef PEGASUS_DISABLE_PERFINST #ifndef PEGASUS_DISABLE_PERFINST
         Boolean statisticsFlag = _getPropertyValue(modifiedIns, OM_GATHERSTATISTICALDATA, false);         Boolean statisticsFlag = _getPropertyValue(modifiedIns, OM_GATHERSTATISTICALDATA, false);
         CIMInstance instance;         CIMInstance instance;
         instance = _getInstanceCIMObjectManager(true, true, CIMPropertyList());          instance = _getInstanceCIMObjectManager(instanceReference, true, true, CIMPropertyList());
  
         if (statisticsFlag != _getPropertyValue(instance,  OM_GATHERSTATISTICALDATA, false))         if (statisticsFlag != _getPropertyValue(instance,  OM_GATHERSTATISTICALDATA, false))
         {         {
Line 1993 
Line 2046 
             // Modify the object on disk             // Modify the object on disk
             try             try
             {             {
                 _repository->modifyInstance(_operationNamespace,                  _repository->modifyInstance(instanceReference.getNameSpace(),
                                instance );                                instance );
             }             }
             catch(const CIMException&)             catch(const CIMException&)
Line 2008 
Line 2061 
                 PEG_METHOD_EXIT();                 PEG_METHOD_EXIT();
                 throw;                 throw;
             }             }
             Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,              Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,
                 "Interop Provider Set Statistics gathering in CIM_ObjectManager: $0",                 "Interop Provider Set Statistics gathering in CIM_ObjectManager: $0",
                 (statisticsFlag? "true" : "false"));                 (statisticsFlag? "true" : "false"));
             StatisticalData* sd = StatisticalData::current();             StatisticalData* sd = StatisticalData::current();
Line 2034 
Line 2087 
     const CIMPropertyList& propertyList,     const CIMPropertyList& propertyList,
     ResponseHandler & handler)     ResponseHandler & handler)
 { {
   
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::modifyInstance");             "InteropProvider::modifyInstance");
  
Line 2046 
Line 2098 
         (const char *) _showPropertyList(propertyList).getCString());         (const char *) _showPropertyList(propertyList).getCString());
  
     // ATTN: KS 31 August 2004. This must test for privileged user.     // ATTN: KS 31 August 2004. This must test for privileged user.
     _operationNamespace = instanceReference.getNameSpace();  
     CIMName className =  instanceReference.getClassName();     CIMName className =  instanceReference.getClassName();
     targetClass classEnum  = _verifyValidClassInput(instanceReference.getClassName());      targetClass classEnum  = _verifyValidClassInput(className);
  
     String userName = _validateUserID(context);     String userName = _validateUserID(context);
     // begin processing the request     // begin processing the request
Line 2084 
Line 2136 
     }     }
     else     else
     {     {
         PEGASUS_ASSERT(false);  // should never get here.          PEG_METHOD_EXIT();
           throw CIMNotSupportedException(
               className.getString() + " not supported by Interop Provider");
     }     }
  
     handler.complete();     handler.complete();
Line 2103 
Line 2157 
         PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,         PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
                 "InteropProvider::enumerateInstanceNames()");                 "InteropProvider::enumerateInstanceNames()");
  
         // operation namespace needed internally to get class.          Tracer::trace(TRC_CONTROLPROVIDER, Tracer::LEVEL4,
         _operationNamespace = classReference.getNameSpace();              "%s enumerateInstanceNames. classReference= %s",
               thisProvider,
               (const char *) classReference.toString().getCString());
  
         targetClass classEnum  = _verifyValidClassInput(classReference.getClassName());         targetClass classEnum  = _verifyValidClassInput(classReference.getClassName());
  
Line 2116 
Line 2172 
         // Deliver a single instance because there should only be one instance.         // Deliver a single instance because there should only be one instance.
         if (classEnum == CIM_OBJECTMANAGER)         if (classEnum == CIM_OBJECTMANAGER)
         {         {
             CIMInstance instance = _getInstanceCIMObjectManager( true, true, CIMPropertyList());              CIMInstance instance = _getInstanceCIMObjectManager(
             CIMObjectPath ref = _buildInstancePath(_operationNamespace,                              classReference, true, true, CIMPropertyList());
   
               CIMObjectPath ref = _buildInstancePath(classReference,
                 CIM_OBJECTMANAGER_CLASSNAME, instance);                 CIM_OBJECTMANAGER_CLASSNAME, instance);
   
             handler.deliver(ref);             handler.deliver(ref);
             handler.complete();  
             PEG_METHOD_EXIT();  
             return;  
         }         }
  
         // Deliver all possible instances of this class         // Deliver all possible instances of this class
         if (classEnum == PG_CIMXMLCOMMUNICATIONMECHANISM)          else if (classEnum == PG_CIMXMLCOMMUNICATIONMECHANISM)
         {         {
             Array<CIMInstance> instances = _buildInstancesPGCIMXMLCommunicationMechanism(true,              Array<CIMInstance> instances =
                   _buildInstancesPGCIMXMLCommunicationMechanism(
                           classReference, true,
                  true, CIMPropertyList());                  true, CIMPropertyList());
  
             for (Uint32 i = 0 ; i < instances.size() ; i++)             for (Uint32 i = 0 ; i < instances.size() ; i++)
             {             {
                 CIMObjectPath ref = _buildInstancePath(_operationNamespace,                  CIMObjectPath ref = _buildInstancePath(classReference,
                     PG_CIMXMLCOMMUNICATIONMECHANISM_CLASSNAME, instances[i]);                     PG_CIMXMLCOMMUNICATIONMECHANISM_CLASSNAME, instances[i]);
                 handler.deliver(ref);                 handler.deliver(ref);
             }             }
             handler.complete();  
             PEG_METHOD_EXIT();  
             return;  
         }         }
  
         if (classEnum == CIM_NAMESPACEINMANAGER)          else if (classEnum == CIM_NAMESPACEINMANAGER)
         {         {
             handler.complete();  
             PEG_METHOD_EXIT();  
             return;  
         }         }
  
         if (classEnum == PG_NAMESPACE)          else if (classEnum == PG_NAMESPACE)
         {         {
             Array<CIMInstance> instances = _getInstancesCIMNamespace(false,              Array<CIMInstance> instances = _getInstancesCIMNamespace(
                                       classReference,
                                       false,
                                     false, CIMPropertyList());                                     false, CIMPropertyList());
             CDEBUG("EvalNames. Found instances. Count= " << instances.size());             CDEBUG("EvalNames. Found instances. Count= " << instances.size());
   
             for (Uint32 i = 0 ; i < instances.size() ; i++)             for (Uint32 i = 0 ; i < instances.size() ; i++)
             {             {
                 CIMObjectPath ref = _buildInstancePath(_operationNamespace,                  CIMObjectPath ref = _buildInstancePath(classReference,
                                             CIM_NAMESPACE_CLASSNAME, instances[i]);                                             CIM_NAMESPACE_CLASSNAME, instances[i]);
                 handler.deliver(ref);                 handler.deliver(ref);
             }             }
   
             handler.complete();  
             PEG_METHOD_EXIT();  
             return;  
         }         }
  
         if (classEnum == CIM_COMMMECHANISMFORMANAGERINST)          else if (classEnum == CIM_COMMMECHANISMFORMANAGERINST)
         {         {
             Array<CIMInstance> instances = _buildInstancesCommMechanismForManager();              Array<CIMInstance> instances = _buildInstancesCommMechanismForManager(classReference);
             for (Uint32 i = 0 ; i < instances.size() ; i++ )             for (Uint32 i = 0 ; i < instances.size() ; i++ )
             {             {
                 CIMObjectPath ref = _buildObjectPath(_operationNamespace,                  CIMObjectPath ref = _buildObjectPath(classReference,
                         CIM_COMMMECHANISMFORMANAGER_CLASSNAME, instances[i]);                         CIM_COMMMECHANISMFORMANAGER_CLASSNAME, instances[i]);
                 handler.deliver(ref);                 handler.deliver(ref);
             }             }
         }         }
  
         if (classEnum == CIM_NAMESPACEINMANAGERINST)          else if (classEnum == CIM_NAMESPACEINMANAGERINST)
         {         {
             Array<CIMInstance> instances = _buildInstancesNamespaceInManager();              Array<CIMInstance> instances = _buildInstancesNamespaceInManager(classReference);
             for (Uint32 i = 0 ; i < instances.size() ; i++ )             for (Uint32 i = 0 ; i < instances.size() ; i++ )
             {             {
                 CIMObjectPath ref = _buildObjectPath(_operationNamespace,                  CIMObjectPath ref = _buildObjectPath(classReference,
                         CIM_NAMESPACEINMANAGER_CLASSNAME, instances[i]);                         CIM_NAMESPACEINMANAGER_CLASSNAME, instances[i]);
                 handler.deliver(ref);                 handler.deliver(ref);
             }             }
         }         }
           else
           {
               // ERROR: Code should never get here because of Enum tests.
               throw CIMNotSupportedException("Class not processed by Interop " +classReference.getClassName().getString());
           }
  
  
         // ATTN: Exception response because of error         // ATTN: Exception response because of error
           handler.complete();
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
     }     }
  
Line 2266 
Line 2323 
     CDEBUG("::referenceNames(): object= " << objectName.toString() << " result Class= " << resultClass.getString());     CDEBUG("::referenceNames(): object= " << objectName.toString() << " result Class= " << resultClass.getString());
  
     // operation namespace needed internally to get class.     // operation namespace needed internally to get class.
     _operationNamespace = objectName.getNameSpace();      // KS_TEMP _operationNamespace = objectName.getNameSpace();
     String userName = _validateUserID(context);     String userName = _validateUserID(context);
     // begin processing the request     // begin processing the request
     handler.processing();     handler.processing();
Line 2275 
Line 2332 
  
     CIMName targetAssocClassName = resultClass;     CIMName targetAssocClassName = resultClass;
  
     CIMName targetClassName = objectName.getClassName();      // KSTEMPCIMName targetClassName = objectName.getClassName();
  
     targetAssocClass classEnum  = _verifyValidAssocClassInput(targetAssocClassName);     targetAssocClass classEnum  = _verifyValidAssocClassInput(targetAssocClassName);
  
     Array<CIMInstance> assocInstances;     Array<CIMInstance> assocInstances;
  
     if (classEnum == CIM_COMMMECHANISMFORMANAGERASSOC)     if (classEnum == CIM_COMMMECHANISMFORMANAGERASSOC)
         assocInstances = _buildInstancesCommMechanismForManager();          assocInstances = _buildInstancesCommMechanismForManager(objectName);
  
     if (classEnum == CIM_NAMESPACEINMANAGERASSOC)     if (classEnum == CIM_NAMESPACEINMANAGERASSOC)
         assocInstances = _buildInstancesNamespaceInManager();          assocInstances = _buildInstancesNamespaceInManager(objectName);
  
     _filterAssocInstances(assocInstances, resultClass, role);     _filterAssocInstances(assocInstances, resultClass, role);
  
     for (Uint32 i = 0 ; i < assocInstances.size() ; i++ )     for (Uint32 i = 0 ; i < assocInstances.size() ; i++ )
     {     {
         CIMObjectPath ref = _buildObjectPath(_operationNamespace,          CIMObjectPath ref = _buildObjectPath(objectName,
                 targetAssocClassName, assocInstances[i]);                 targetAssocClassName, assocInstances[i]);
         CDEBUG("referenceNames returns: " << ref.toString());         CDEBUG("referenceNames returns: " << ref.toString());
         handler.deliver(ref);         handler.deliver(ref);


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2