(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.11 and 1.34

version 1.11, 2004/09/29 19:46:20 version 1.34, 2005/05/19 13:56:13
Line 1 
Line 1 
 //%2003////////////////////////////////////////////////////////////////////////  //%2005////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development  // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.  // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
 // IBM Corp.; EMC Corporation, The Open Group. // IBM Corp.; EMC Corporation, The Open Group.
   // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
   // 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 // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 29 
Line 33 
 //                (carolann_graves@hp.com) //                (carolann_graves@hp.com)
 //              Karl Schopmeyer - Created Cim_Namespace capabilities. //              Karl Schopmeyer - Created Cim_Namespace capabilities.
 //              Karl Schopmeyer - added objectmanager and communication classes //              Karl Schopmeyer - added objectmanager and communication classes
   //              Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#3194
   //              David Dillard, VERITAS Software Corp.
   //                  (david.dillard@veritas.com)
 // //
 //%//////////////////////////////////////////////////////////////////////////// //%////////////////////////////////////////////////////////////////////////////
  
Line 41 
Line 48 
 //      CIMObjectManager //      CIMObjectManager
 //      CIM_ObjectManagerCommunicationMechanism //      CIM_ObjectManagerCommunicationMechanism
 //      CIM_CIMXMLCommunicationMechanism //      CIM_CIMXMLCommunicationMechanism
 //      CIM_ProtocolAdapter  //      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 which
 //      is a subclass of CIM_Namespace with additional properties for //      is a subclass of CIM_Namespace with additional properties for
 //      shared namespaces. //      shared namespaces.
Line 109 
Line 116 
 #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::INFORMATION, "$0", X)
 // The following is attempt to use the tracer for CDEBUG.  Not working. 1 sept 2004  
 //#include <cstring>  
 //#include <stdcxx/stream/strstream>  
 // This one sucks because not applicable to separate executables.  
 // looks like we use trace for the externals.  
 // requires using PEGASUS_USING_PEGASUS  
 //#define CDEBUG(X) {ostrstream os; os << X; char* tmp = os.str(); PEG_TRACE_STRING(TRC_CONTROLPROVIDER, Tracer::LEVEL4, String(tmp));delete tmp;}  
 //#define CDEBUG(X) {stringstream os; os << X;string os_str = os.str(); const char* tmp = os_str.c_str(); PEG_TRACE_STRING(TRC_CONTROLPROVIDER, Tracer::LEVEL4, String(tmp); }  
  
 //************************************************************************** //**************************************************************************
 // //
Line 218 
Line 217 
         CIM_OBJECTMANAGER = 2,         CIM_OBJECTMANAGER = 2,
         PG_CIMXMLCOMMUNICATIONMECHANISM = 3,         PG_CIMXMLCOMMUNICATIONMECHANISM = 3,
         CIM_NAMESPACEINMANAGERINST =4,         CIM_NAMESPACEINMANAGERINST =4,
         CIM_COMMMECHANISMFORMANAGERINST=5          CIM_COMMMECHANISMFORMANAGERINST=5,
           CIM_NAMESPACEINMANAGER=6
     };     };
  
  enum targetAssocClass{  enum targetAssocClass{
      CIM_NAMESPACEINMANAGER =1,       CIM_NAMESPACEINMANAGERASSOC = 1,
      CIM_COMMMECHANISMFORMANAGER=2       CIM_COMMMECHANISMFORMANAGERASSOC=2
  };  };
  
   
   //*************************************************************
   //  Constructor
   //**********************************************************
   InteropProvider::InteropProvider(CIMRepository* repository)
   {
       PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,"InteropProvider::InteropProvider");
        _repository = repository;
   
       //***********************************************
       // 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
       //statistical gathering function.
       Array<CIMInstance> instance = repository->enumerateInstances(CIMNamespaceName("root/cimv2"), CIMName ("CIM_ObjectManager"));
   
       if(instance.size() > 0)
       {
           Boolean output = false;
           Uint32 pos;
           if ((pos = instance[0].findProperty(CIMName("GatherStatisticalData"))) != PEG_NOT_FOUND)
           {
               CIMConstProperty p1 = instance[0].getProperty(pos);
               if (p1.getType() == CIMTYPE_BOOLEAN)
               {
                   CIMValue v1  = p1.getValue();
                   if (!v1.isNull())
                   {
                       v1.get(output);
                       if (v1 == true)
                       {
                           StatisticalData* sd = StatisticalData::current();
                           sd->setCopyGSD(true);
                       }
                   }
               }
           }
       }
       //******************************************* end of temporary fix
       PEG_METHOD_EXIT();
    }
   
   
   
 //*************************************************************** //***************************************************************
 // Provider Utility Functions // Provider Utility Functions
 //*************************************************************** //***************************************************************
  
   String _showBool(Boolean x)
   {
       return(x? "true" : "false");
   }
   
   static String _toStringPropertyList(const CIMPropertyList& pl)
   {
       String tmp;
       for (Uint32 i = 0; i < pl.size() ; i++)
       {
           if (i > 0)
               tmp.append(", ");
           tmp.append(pl[i].getString());
       }
       return(tmp);
   }
   
   static String _showPropertyList(const CIMPropertyList& pl)
   {
       if (pl.isNull())
           return("NULL");
   
       String tmp;
   
       tmp.append((pl.size() == 0) ? "Empty" : _toStringPropertyList(pl));
       return(tmp);
   }
   
 /** get one string property from an instance. Note that these functions simply /** get one string property from an instance. Note that these functions simply
     return the default value if the property cannot be found or is of the wrong     return the default value if the property cannot be found or is of the wrong
     type thus, in reality being a maintenance problem since there is no     type thus, in reality being a maintenance problem since there is no
Line 290 
Line 361 
 */ */
 String _getHostAddress(String hostName) String _getHostAddress(String hostName)
 { {
   // set default address    String ipAddress;
   String ipAddress("127.0.0.1");  
  
   if (hostName == String::EMPTY)   if (hostName == String::EMPTY)
         hostName = System::getHostName();         hostName = System::getHostName();
  
   struct hostent * phostent;    if ((ipAddress = System::getHostIP(hostName)) == String::EMPTY)
   struct in_addr   inaddr;  
   
   if ((phostent = ::gethostbyname((const char *)hostName.getCString())) != NULL)  
     {     {
      ::memcpy( &inaddr, phostent->h_addr,4);        // set default address if everything else failed
       ipAddress = ::inet_ntoa( inaddr );        ipAddress = String("127.0.0.1");
     }     }
   return ipAddress;   return ipAddress;
 } }
  
  Array<String> _getFunctionalProfiles(Array<Uint16> profiles)   Array<String> _getFunctionalProfiles(Array<Uint16> & profiles)
  {  {
      Array<String> profileDescriptions;      Array<String> profileDescriptions;
      profiles.append(2); profileDescriptions.append("Basic Read");      profiles.append(2); profileDescriptions.append("Basic Read");
Line 351 
Line 418 
 { {
     return true;     return true;
 } }
   
 Boolean _validateProperties(const CIMInstance& instance) Boolean _validateProperties(const CIMInstance& instance)
 { {
     return true;     return true;
Line 436 
Line 504 
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
     return(true);     return(true);
 } }
   
 Boolean _validateRequiredProperty(const CIMObjectPath& objectPath, Boolean _validateRequiredProperty(const CIMObjectPath& objectPath,
                           const CIMName& propertyName,                           const CIMName& propertyName,
                           const String value)                           const String value)
Line 505 
Line 574 
    @return - Uint32 indicating type    @return - Uint32 indicating type
    @Exceptions - throws CIMNotSupportedException if invalid class.    @Exceptions - throws CIMNotSupportedException if invalid class.
 */ */
 targetClass _verifyValidClassInput(const CIMName& className)  static targetClass _verifyValidClassInput(const CIMName& className)
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::_verifyValidClassInput");             "InteropProvider::_verifyValidClassInput");
Line 515 
Line 584 
     if (className.equal(PG_CIMXMLCOMMUNICATIONMECHANISM_CLASSNAME))     if (className.equal(PG_CIMXMLCOMMUNICATIONMECHANISM_CLASSNAME))
         return PG_CIMXMLCOMMUNICATIONMECHANISM;         return PG_CIMXMLCOMMUNICATIONMECHANISM;
  
       if (className.equal(CIM_NAMESPACEINMANAGER_CLASSNAME))
           return CIM_NAMESPACEINMANAGER;
   
     // Last entry, reverse test and return OK if PG_Namespace     // Last entry, reverse test and return OK if PG_Namespace
     // Note: Changed to PG_Namespace for CIM 2.4     // Note: Changed to PG_Namespace for CIM 2.4
     if (!className.equal(PG_NAMESPACE_CLASSNAME))     if (!className.equal(PG_NAMESPACE_CLASSNAME))
Line 525 
Line 597 
     return PG_NAMESPACE;     return PG_NAMESPACE;
 } }
  
 targetAssocClass _verifyValidAssocClassInput(const CIMName& className)  static targetAssocClass _verifyValidAssocClassInput(const CIMName& className)
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::_verifyValidAssocClassInput");             "InteropProvider::_verifyValidAssocClassInput");
     if (className.equal(CIM_NAMESPACEINMANAGER_CLASSNAME))     if (className.equal(CIM_NAMESPACEINMANAGER_CLASSNAME))
         return CIM_NAMESPACEINMANAGER;          return CIM_NAMESPACEINMANAGERASSOC;
   
     // Last entry, reverse test and return OK if CIM_CommMech....     // Last entry, reverse test and return OK if CIM_CommMech....
     if (!className.equal(CIM_COMMMECHANISMFORMANAGER_CLASSNAME))     if (!className.equal(CIM_COMMMECHANISMFORMANAGER_CLASSNAME))
         throw CIMNotSupportedException         throw CIMNotSupportedException
             (className.getString() + " not supported by Interop Provider");             (className.getString() + " not supported by Interop Provider");
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
     return CIM_COMMMECHANISMFORMANAGER;      return CIM_COMMMECHANISMFORMANAGERASSOC;
 } }
  
 /* validate the authorization of the user name against the namespace. /* validate the authorization of the user name against the namespace.
Line 623 
Line 696 
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::_fixInstanceCommonKeys()");             "InteropProvider::_fixInstanceCommonKeys()");
     String SystemCreationClassName = System::getSystemCreationClassName ();     String SystemCreationClassName = System::getSystemCreationClassName ();
     if (SystemCreationClassName == String::EMPTY)  
     {  
         //Attn: Get this globally. For now This in place because global is often Empty  
         SystemCreationClassName = "CIM_ComputerSystem";  
     }  
  
     _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,System::getHostName());      _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_SYSTEMNAME,System::getFullyQualifiedHostName());
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
  
Line 692 
Line 760 
     //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.      //Name, this CommunicationMechanism.  We need to make it unique.  To do this
     _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_NAME, PG_CIMXMLCOMMUNICATIONMECHANISM_CLASSNAME.getString());      // we simply append the commtype to the classname since we have max of two right
       // now.
       _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_NAME, (String("PEGASUSCOMM") + namespaceType));
  
     // CommunicationMechanism Property      // CommunicationMechanism Property - Force to 2.
     _setPropertyValue(instance, OM_COMMUNICATIONMECHANISM, Uint16(2));     _setPropertyValue(instance, OM_COMMUNICATIONMECHANISM, Uint16(2));
  
     //Functional Profiles Supported Property.     //Functional Profiles Supported Property.
Line 714 
Line 784 
     Array<Uint16> authentications;     Array<Uint16> authentications;
     Array<String> authenticationDescriptions;     Array<String> authenticationDescriptions;
  
       // Note that we have fixed authentication here.
     authentications.append(3); authenticationDescriptions.append("Basic");     authentications.append(3); authenticationDescriptions.append("Basic");
  
     _setPropertyValue(instance, OM_AUTHENTICATIONMECHANISMSSUPPORTED, authentications);     _setPropertyValue(instance, OM_AUTHENTICATIONMECHANISMSSUPPORTED, authentications);
Line 722 
Line 793 
  
     _setPropertyValue(instance, OM_VERSION, CIMXMLProtocolVersion);     _setPropertyValue(instance, OM_VERSION, CIMXMLProtocolVersion);
  
       // Obsolete function
     _setPropertyValue(instance, "namespaceType", namespaceType);     _setPropertyValue(instance, "namespaceType", namespaceType);
  
     _setPropertyValue(instance, "IPAddress", IPAddress);     _setPropertyValue(instance, "IPAddress", IPAddress);
Line 794 
Line 866 
     ATTN: Probably should get rid of the local parameter since     ATTN: Probably should get rid of the local parameter since
     this is used so infrequently, waste of space.     this is used so infrequently, waste of space.
 */ */
 Boolean InteropProvider::_getInstanceCIMObjectManager(  Boolean InteropProvider::_getInstanceFromRepositoryCIMObjectManager(
                           CIMInstance& rtnInstance,
                         const Boolean includeQualifiers,                         const Boolean includeQualifiers,
                         const Boolean includeClassOrigin,                         const Boolean includeClassOrigin,
                         const CIMPropertyList& propertyList)                         const CIMPropertyList& propertyList)
 { {
   
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::_getInstanceCIMObjectManager");             "InteropProvider::_getInstanceCIMObjectManager");
     // If there is already an instance of this class local use it.  
     if (!instanceOfCIMObjectManager.isUninitialized())  
     {  
         PEG_METHOD_EXIT();  
         return(true);  
     }  
     // Try to get persistent instance from repository     // Try to get persistent instance from repository
     Array<CIMInstance> instances;     Array<CIMInstance> instances;
     try     try
Line 816 
Line 882 
                       CIM_OBJECTMANAGER_CLASSNAME, true, false, includeQualifiers,                       CIM_OBJECTMANAGER_CLASSNAME, true, false, includeQualifiers,
                         includeClassOrigin, propertyList);                         includeClassOrigin, propertyList);
  
         CDEBUG("_buildInstanceCIMOBJMGR Found Instance in repository " << instances.size() );          CDEBUG("_getInstancefrom... " << instances.size());
   
         if (instances.size() >= 1)         if (instances.size() >= 1)
         {         {
             // set this instance into global variable.             // set this instance into global variable.
             instanceOfCIMObjectManager = instances[0];              rtnInstance = instances[0];
  
             // log entry if there is more than one instance.             // log entry if there is more than one instance.
             // Some day we may support multiple entries to see other CIMOMs but             // Some day we may support multiple entries to see other CIMOMs but
Line 832 
Line 897 
                 Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION,                 Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION,
                     "Error. Multiple definitons of : $0", CIM_OBJECTMANAGER_CLASSNAME.getString());                     "Error. Multiple definitons of : $0", CIM_OBJECTMANAGER_CLASSNAME.getString());
             }             }
               CDEBUG("getInstanceFromRepository returning true");
             return(true);             return(true);
         }         }
         else         else
           {
               CDEBUG("getInstanceFromRepository returning false");
             return(false);             return(false);
     }     }
     catch(CIMException& e)      }
       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 e;          throw;
     }     }
     catch(Exception& e)      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 e;          throw;
     }     }
 } }
  
   
 /** build an instance of the CIM_ObjectManager class filling out /** build an instance of the CIM_ObjectManager class filling out
     the required properties      the required properties if one does not already exist in the
       repository. This function will either return an instance
       or throw an exception.
     @param includeQualifiers Boolean     @param includeQualifiers Boolean
     @param includeClassOrigin Boolean     @param includeClassOrigin Boolean
     @param propertylist CIMPropertyList     @param propertylist CIMPropertyList
Line 863 
Line 933 
     @exception repository instances if exception to enumerateInstances     @exception repository instances if exception to enumerateInstances
         for this class.         for this class.
 */ */
 CIMInstance InteropProvider::_buildInstanceCIMObjectManager(  CIMInstance InteropProvider::_getInstanceCIMObjectManager(
                         const Boolean includeQualifiers,                         const Boolean includeQualifiers,
                         const Boolean includeClassOrigin,                         const Boolean includeClassOrigin,
                         const CIMPropertyList& propertyList)                         const CIMPropertyList& propertyList)
Line 872 
Line 942 
             "InteropProvider::_buildInstanceCIMObjectManager");             "InteropProvider::_buildInstanceCIMObjectManager");
  
     // 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.
     if (_getInstanceCIMObjectManager(includeQualifiers,includeClassOrigin,propertyList))      CIMInstance instance;
       if (!_getInstanceFromRepositoryCIMObjectManager(instance, includeQualifiers,includeClassOrigin,propertyList))
     {     {
         PEG_METHOD_EXIT();  
         return(instanceOfCIMObjectManager);  
     }  
     //     //
     // No instance in the repository. Build new instance and save it.     // No instance in the repository. Build new instance and save it.
     //     //
     CIMInstance instance = _buildInstanceSkeleton(CIM_OBJECTMANAGER_CLASSNAME);          CDEBUG("Creating New instance of CIMOBjectManager");
           instance = _buildInstanceSkeleton(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 900 
Line 967 
     char * envDescription;     char * envDescription;
     envDescription = getenv("PEGASUS_CIMOM_DESCRIPTION");     envDescription = getenv("PEGASUS_CIMOM_DESCRIPTION");
  
     description = (envDescription) ?          description = (envDescription) ? envDescription :
         envDescription :              String(PEGASUS_PRODUCT_NAME) + " Version " +
         "Pegasus " + String(PEGASUS_NAME) + "Version " + String(PEGASUS_VERSION);                  String(PEGASUS_PRODUCT_VERSION);
  
     _setPropertyValue(instance, CIMName("Description"), description);     _setPropertyValue(instance, CIMName("Description"), description);
  
Line 918 
Line 985 
     // gathering function dynamically.  We simply get the correct value     // gathering function dynamically.  We simply get the correct value
     // and call the internal method to set it each time this object is     // and call the internal method to set it each time this object is
     // built.     // built.
 #ifdef PEGASUS_HAS_PERFINST      #ifndef PEGASUS_DISABLE_PERFINST
     StatisticalData* sd = StatisticalData::current();     StatisticalData* sd = StatisticalData::current();
     sd->setCopyGSD(gatherStatDataFlag);     sd->setCopyGSD(gatherStatDataFlag);
 #endif #endif
  
     // write the instance to the repository          // write instance to the repository
     CIMObjectPath instancePath;     CIMObjectPath instancePath;
     // Add the instance path to this if necessary ATTN ATTN:     // Add the instance path to this if necessary ATTN ATTN:
     try     try
     {     {
               CDEBUG("Create Instance for CIM_ObjectManager");
         instancePath = _repository->createInstance(_operationNamespace,         instancePath = _repository->createInstance(_operationNamespace,
                        instance );                        instance );
     }     }
     catch(CIMException& e)          catch(const CIMException&)
     {     {
         // ATTN: KS generate log error if this not possible         // ATTN: KS generate log error if this not possible
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         throw e;              throw;
     }     }
     catch(Exception& e)          catch(const Exception&)
     {     {
         // ATTN: Generate log error.         // ATTN: Generate log error.
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         throw e;              throw;
     }     }
     instance.setPath(instancePath);     instance.setPath(instancePath);
     CDEBUG("CIMObjectMgr path = " << instancePath.toString());      }
     // Save this instance for other requests      instance.filter(includeQualifiers, includeClassOrigin, propertyList);
     instanceOfCIMObjectManager = instance;  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
     return(instanceOfCIMObjectManager);      return(instance);
 } }
  
 /** Get the instances of CIM_Namespace. Gets all instances of the namespace from /** Get the instances of CIM_Namespace. Gets all instances of the namespace from
Line 989 
Line 1056 
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::_getInstancesCIMNamespace()");             "InteropProvider::_getInstancesCIMNamespace()");
  
     CDEBUG("_getinstanceCIMNamespace Gets ONE only from Namespace=" << nameSpace.getString());  
     Array<CIMInstance> instances = _getInstancesCIMNamespace(true, true, CIMPropertyList());     Array<CIMInstance> instances = _getInstancesCIMNamespace(true, true, CIMPropertyList());
  
     // search the instances for one with the name property value = input parameter.     // search the instances for one with the name property value = input parameter.
Line 1019 
Line 1085 
     Array<CIMInstance> namespaceInstances = _getInstancesCIMNamespace(false,     Array<CIMInstance> namespaceInstances = _getInstancesCIMNamespace(false,
                             false, CIMPropertyList());                             false, CIMPropertyList());
  
     CIMInstance instanceObjMgr = _buildInstanceCIMObjectManager( true, true, CIMPropertyList());      CIMInstance instanceObjMgr = _getInstanceCIMObjectManager( true, true, CIMPropertyList());
  
     CIMObjectPath refObjMgr = _buildReference(instanceObjMgr, CIM_OBJECTMANAGER_CLASSNAME);     CIMObjectPath refObjMgr = _buildReference(instanceObjMgr, CIM_OBJECTMANAGER_CLASSNAME);
  
Line 1048 
Line 1114 
     Array<CIMInstance> commInstances = _buildInstancesPGCIMXMLCommunicationMechanism(true,     Array<CIMInstance> commInstances = _buildInstancesPGCIMXMLCommunicationMechanism(true,
          true, CIMPropertyList());          true, CIMPropertyList());
  
     CIMInstance instanceObjMgr = _buildInstanceCIMObjectManager( true, true, CIMPropertyList());      CIMInstance instanceObjMgr = _getInstanceCIMObjectManager( true, true, CIMPropertyList());
  
     CIMObjectPath refObjMgr = _buildReference(instanceObjMgr, CIM_OBJECTMANAGER_CLASSNAME);     CIMObjectPath refObjMgr = _buildReference(instanceObjMgr, CIM_OBJECTMANAGER_CLASSNAME);
     Array<CIMInstance> assocInstances;     Array<CIMInstance> assocInstances;
Line 1112 
Line 1178 
     //  Everything above was commmon to CIM Namespace.  The following is PG_Namespace Properties     //  Everything above was commmon to CIM Namespace.  The following is PG_Namespace Properties
     //     //
     // ATTN: KS Get the correct values for these entities from repository interface.     // ATTN: KS Get the correct values for these entities from repository interface.
     CDEBUG("_buildPGNS Instance get namespace attributes for namespace= " << nameSpace.getString());  
         CIMRepository::NameSpaceAttributes attributes;         CIMRepository::NameSpaceAttributes attributes;
     _repository->getNameSpaceAttributes(nameSpace.getString(), attributes);     _repository->getNameSpaceAttributes(nameSpace.getString(), attributes);
     String parent="";     String parent="";
Line 1123 
Line 1189 
     {     {
        String key=i.key();        String key=i.key();
        String value = i.value();        String value = i.value();
        CDEBUG("Show Attributes. key= " << key << " value= " << value);  
        if (String::equalNoCase(key,"shareable"))        if (String::equalNoCase(key,"shareable"))
            {            {
           if (String::equalNoCase(value,"true"))           if (String::equalNoCase(value,"true"))
Line 1184 
Line 1250 
     }     }
     if (!_validateRequiredProperty(objectPath,     if (!_validateRequiredProperty(objectPath,
                 CIM_NAMESPACE_PROPERTY_SYSTEMNAME,                 CIM_NAMESPACE_PROPERTY_SYSTEMNAME,
                 System::getHostName()))                  System::getFullyQualifiedHostName()))
     {     {
         propertyName = CIM_NAMESPACE_PROPERTY_SYSTEMNAME;         propertyName = CIM_NAMESPACE_PROPERTY_SYSTEMNAME;
         valid = false;         valid = false;
Line 1288 
Line 1354 
  
     if (!_completeProperty(instance,     if (!_completeProperty(instance,
                 CIM_NAMESPACE_PROPERTY_SYSTEMNAME,                 CIM_NAMESPACE_PROPERTY_SYSTEMNAME,
                 System::getHostName()))                  System::getFullyQualifiedHostName()))
     {     {
         propertyName = CIM_NAMESPACE_PROPERTY_SYSTEMNAME;         propertyName = CIM_NAMESPACE_PROPERTY_SYSTEMNAME;
         valid = false;         valid = false;
Line 1355 
Line 1421 
  
     if (!_validateRequiredProperty(instance,     if (!_validateRequiredProperty(instance,
                 CIM_NAMESPACE_PROPERTY_SYSTEMNAME,                 CIM_NAMESPACE_PROPERTY_SYSTEMNAME,
                 System::getHostName()))                  System::getFullyQualifiedHostName ()))
     {     {
         propertyName = CIM_NAMESPACE_PROPERTY_SYSTEMNAME;         propertyName = CIM_NAMESPACE_PROPERTY_SYSTEMNAME;
         valid = false;         valid = false;
Line 1451 
Line 1517 
     return(ref);     return(ref);
 } }
  
 /* _isNamespace determines if the namespace in the second  
    parameter is in the array in the first parameter.  
     @param array of possible namespaces  
     @param canidate namespace  
     @return - true if found  
 */  
 Boolean _isNamespace(  
             Array<CIMNamespaceName>& namespaceNames,  
                 CIMNamespaceName& namespaceName)  
 {  
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,  
             "InteropProvider::_isNamespace");  
   
      Boolean found = false;  
      for(Uint32 i = 0; i < namespaceNames.size(); i++)  
      {  
         if(namespaceNames[i].equal ( namespaceName ))  
             return true;  
      }  
   
      PEG_METHOD_EXIT();  
      return false;  
 }  
   
 //************************************************************** //**************************************************************
 // Overloaded functions to get key value with different params // Overloaded functions to get key value with different params
 //************************************************************** //**************************************************************
Line 1533 
Line 1575 
     {     {
         PEG_METHOD_ENTER(TRC_CONTROLPROVIDER, "InteropProvider::createInstance()");         PEG_METHOD_ENTER(TRC_CONTROLPROVIDER, "InteropProvider::createInstance()");
  
           Tracer::trace(TRC_CONTROLPROVIDER, Tracer::LEVEL4,
               "%s createInstance. InstanceReference= %s",
               thisProvider,
               (const char *) instanceReference.toString().getCString());
   
         handler.processing();         handler.processing();
         CIMNamespaceName newNamespaceName;         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();         _operationNamespace = instanceReference.getNameSpace();
Line 1551 
Line 1599 
  
         if (classEnum == PG_NAMESPACE)         if (classEnum == PG_NAMESPACE)
         {         {
   #ifdef PEGASUS_OS_OS400
               MessageLoaderParms mparms("ControlProviders.InteropProvider.CREATE_INSTANCE_NOT_ALLOWED",
                                         "Create instance operation not allowed by Interop Provider for class $0.",
                                         PG_NAMESPACE_CLASSNAME.getString());
               throw CIMNotSupportedException(mparms);
   #else
             // Create local instance to complete any keys.             // Create local instance to complete any keys.
             CIMInstance localInstance = myInstance.clone();             CIMInstance localInstance = myInstance.clone();
  
Line 1560 
Line 1614 
  
             newInstanceReference = _buildInstancePath(_operationNamespace,             newInstanceReference = _buildInstancePath(_operationNamespace,
                                         PG_NAMESPACE_CLASSNAME, localInstance);                                         PG_NAMESPACE_CLASSNAME, localInstance);
   #endif
         }         }
  
         else   // Invalid class for the create functions.         else   // Invalid class for the create functions.
Line 1625 
Line 1680 
                 newNamespaceName.getString(), shareable? "true" : "false", shareable? "true" : "false", parent );                 newNamespaceName.getString(), shareable? "true" : "false", shareable? "true" : "false", parent );
  
         }         }
         catch(CIMException& e)          catch(const CIMException&)
         {         {
            PEG_METHOD_EXIT();            PEG_METHOD_EXIT();
            throw e;             throw;
         }         }
         catch(Exception& e)          catch(const Exception&)
         {         {
            PEG_METHOD_EXIT();            PEG_METHOD_EXIT();
            throw e;             throw;
         }         }
  
         // begin processing the request         // begin processing the request
Line 1657 
Line 1712 
     {     {
         PEG_METHOD_ENTER(TRC_CONTROLPROVIDER, "InteropProvider::deleteInstance");         PEG_METHOD_ENTER(TRC_CONTROLPROVIDER, "InteropProvider::deleteInstance");
  
         CIMNamespaceName childNamespaceName;          Tracer::trace(TRC_CONTROLPROVIDER, Tracer::LEVEL4,
         CIMNamespaceName deleteNamespaceName;              "%s deleteInstance. instanceName= %s",
               thisProvider,
               (const char *) instanceName.toString().getCString());
  
         _operationNamespace = instanceName.getNameSpace();         _operationNamespace = instanceName.getNameSpace();
         handler.processing();         handler.processing();
Line 1667 
Line 1724 
  
         String userName = _validateUserID(context);         String userName = _validateUserID(context);
  
   
         if ((classEnum == PG_CIMXMLCOMMUNICATIONMECHANISM))  
             throw CIMNotSupportedException("Delete Not allowed");  
   
         // Delete the instance since it may be in persistent storage         // Delete the instance since it may be in persistent storage
         if ((classEnum == CIM_OBJECTMANAGER))         if ((classEnum == CIM_OBJECTMANAGER))
         {         {
             CIMInstance instance;  
             try             try
             {             {
             instance = _repository->getInstance(_operationNamespace, instanceName);  
   
             // If instance found, then delete it.  
             _repository->deleteInstance(_operationNamespace,instanceName);             _repository->deleteInstance(_operationNamespace,instanceName);
   
             PEG_METHOD_EXIT();  
             handler.complete();  
             return;  
             }             }
             catch(CIMException& e)              catch(const CIMException&)
             {             {
                 PEG_METHOD_EXIT();                 PEG_METHOD_EXIT();
                 throw e;                  throw;
             }             }
         }         }
           else if (classEnum == PG_NAMESPACE)
         Array<CIMNamespaceName> namespaceNames;  
         namespaceNames = _enumerateNameSpaces();  
         if (classEnum == PG_NAMESPACE)  
         {         {
               CIMNamespaceName deleteNamespaceName;
   #ifdef PEGASUS_OS_OS400
               MessageLoaderParms mparms("ControlProviders.InteropProvider.DELETE_INSTANCE_NOT_ALLOWED",
                                         "Delete instance operation not allowed by Interop Provider for class $0.",
                                         PG_NAMESPACE_CLASSNAME.getString());
               throw CIMNotSupportedException(mparms);
   #else
             // validate requred keys.  Exception out if not valid             // validate requred keys.  Exception out if not valid
             _validateCIMNamespaceKeys(instanceName);             _validateCIMNamespaceKeys(instanceName);
  
             deleteNamespaceName = _getKeyValue(instanceName, CIM_NAMESPACE_PROPERTY_NAME);             deleteNamespaceName = _getKeyValue(instanceName, CIM_NAMESPACE_PROPERTY_NAME);
             CDEBUG("Delete namespace = " << deleteNamespaceName );  #endif
         }  
               Array<CIMNamespaceName> namespaceNames;
               namespaceNames = _enumerateNameSpaces();
  
             // ATTN: KS Why THis???  
         if (deleteNamespaceName.equal (ROOTNS))         if (deleteNamespaceName.equal (ROOTNS))
        {        {
            throw CIMNotSupportedException("root namespace cannot be deleted.");            throw CIMNotSupportedException("root namespace cannot be deleted.");
Line 1719 
Line 1769 
        Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,        Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,
            "Interop Provider Delete Namespace: $0",            "Interop Provider Delete Namespace: $0",
            deleteNamespaceName.getString());            deleteNamespaceName.getString());
           }
           else
           {
               throw CIMNotSupportedException("Delete Not allowed for " + instanceName.getClassName().getString());
           }
  
        handler.processing();        handler.processing();
  
        // complete processing the request  
        handler.complete();        handler.complete();
  
        PEG_METHOD_EXIT();        PEG_METHOD_EXIT();
Line 1742 
Line 1796 
     {     {
         PEG_METHOD_ENTER(TRC_CONTROLPROVIDER, "InteropProvider::getInstance");         PEG_METHOD_ENTER(TRC_CONTROLPROVIDER, "InteropProvider::getInstance");
  
           Tracer::trace(TRC_CONTROLPROVIDER, Tracer::LEVEL4,
               "%s getInstance. instanceName= %s , includeQualifiers= %s, includeClassOrigin= %s, PropertyList= %s",
               thisProvider,
               (const char *)instanceName.toString().getCString(),
               (const char *)_showBool(includeQualifiers).getCString(),
               (const char*) _showBool(includeClassOrigin).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 = _buildInstanceCIMObjectManager(includeQualifiers,              CIMInstance instance = _getInstanceCIMObjectManager(includeQualifiers,
                                         includeClassOrigin, propertyList);                                         includeClassOrigin, propertyList);
             handler.deliver(instance);             handler.deliver(instance);
             handler.complete();             handler.complete();
Line 1771 
Line 1832 
             return;             return;
         }         }
  
           if (classEnum == CIM_NAMESPACEINMANAGER)
           {
               handler.complete();
               PEG_METHOD_EXIT();
               return;
           }
   
         // Get List of namespaces         // Get List of namespaces
         Array<CIMNamespaceName> namespaceNames;         Array<CIMNamespaceName> namespaceNames;
         namespaceNames = _enumerateNameSpaces();         namespaceNames = _enumerateNameSpaces();
Line 1785 
Line 1853 
             namespaceName = _getKeyValue(instanceName, CIM_NAMESPACE_PROPERTY_NAME);             namespaceName = _getKeyValue(instanceName, CIM_NAMESPACE_PROPERTY_NAME);
  
             // ATTN: Why this CIMNamespaceName parentNamespaceName = instanceName.getNameSpace();             // ATTN: Why this CIMNamespaceName parentNamespaceName = instanceName.getNameSpace();
             if (!_isNamespace(namespaceNames, namespaceName))              if (!Contains(namespaceNames, namespaceName))
             {             {
                 throw CIMObjectNotFoundException("Namespace does not exist: "                 throw CIMObjectNotFoundException("Namespace does not exist: "
                                      + namespaceName.getString());                                      + namespaceName.getString());
Line 1821 
Line 1889 
     InstanceResponseHandler & handler)     InstanceResponseHandler & handler)
     {     {
         PEG_METHOD_ENTER(TRC_CONTROLPROVIDER, "InteropProvider::enumerateInstances()");         PEG_METHOD_ENTER(TRC_CONTROLPROVIDER, "InteropProvider::enumerateInstances()");
         // Verify that ClassName is correct and get value  
  
           Tracer::trace(TRC_CONTROLPROVIDER, Tracer::LEVEL4,
               "%s enumerateInstances. ref= %s, includeQualifiers= %s, includeClassOrigin= %s, PropertyList= %s",
               thisProvider,
               (const char *) ref.toString().getCString(),
               (const char *) _showBool(includeQualifiers).getCString(),
               (const char *) _showBool(includeClassOrigin).getCString(),
               (const char *) _showPropertyList(propertyList).getCString());
   
           // 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.         // operation namespace needed internally to get class.
         _operationNamespace = ref.getNameSpace();         _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 = _buildInstanceCIMObjectManager(includeQualifiers,              CIMInstance instance = _getInstanceCIMObjectManager(includeQualifiers,
                                     includeClassOrigin,                                     includeClassOrigin,
                                     propertyList);                                     propertyList);
  
Line 1844 
Line 1921 
             //        "Instance - XML content: $0", tmp.getData());             //        "Instance - XML content: $0", tmp.getData());
             ///XmlWriter::printInstanceElement(instance);             ///XmlWriter::printInstanceElement(instance);
             handler.deliver(instance);             handler.deliver(instance);
             handler.complete();              //handler.complete();
             PEG_METHOD_EXIT();              //PEG_METHOD_EXIT();
             return;              //return;
         }         }
  
         if (classEnum == PG_CIMXMLCOMMUNICATIONMECHANISM)          else if (classEnum == PG_CIMXMLCOMMUNICATIONMECHANISM)
         {         {
             Array<CIMInstance> instances = _buildInstancesPGCIMXMLCommunicationMechanism(includeQualifiers,             Array<CIMInstance> instances = _buildInstancesPGCIMXMLCommunicationMechanism(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();              //handler.complete();
             PEG_METHOD_EXIT();              //PEG_METHOD_EXIT();
             return;              //return;
         }         }
  
           else if (classEnum == CIM_NAMESPACEINMANAGER)
           {
               //handler.complete();
               //PEG_METHOD_EXIT();
               //return;
           }
  
         if (classEnum == PG_NAMESPACE)          else if (classEnum == PG_NAMESPACE)
         {         {
             Array<CIMInstance> instances = _getInstancesCIMNamespace(includeQualifiers,             Array<CIMInstance> instances = _getInstancesCIMNamespace(includeQualifiers,
                                     includeClassOrigin, propertyList);                                     includeClassOrigin, propertyList);
  
             handler.deliver(instances);             handler.deliver(instances);
             handler.complete();              //handler.complete();
             PEG_METHOD_EXIT();              //PEG_METHOD_EXIT();
             return;              //return;
           }
           else
           {
               throw CIMNotSupportedException
                   ("EnumerateInstance for " + ref.getClassName().getString() + " not supported");
         }         }
  
         handler.complete();         handler.complete();
Line 1889 
Line 1977 
     // 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)
     {     {
         // ATTN: This function is a design problem.  
         // ATTN: Should the ifdef include everything????  
         // 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
         // gathering function dynamically.  We simply get the  value from input         // gathering function dynamically.  We simply get the  value from input
         // and call the internal method to set it each time this object is         // and call the internal method to set it each time this object is
         // built.         // built.
 #ifdef PEGASUS_HAS_PERFINST  #ifndef PEGASUS_DISABLE_PERFINST
         StatisticalData* sd = StatisticalData::current();  
         Boolean statisticsFlag = _getPropertyValue(modifiedIns, OM_GATHERSTATISTICALDATA, false);         Boolean statisticsFlag = _getPropertyValue(modifiedIns, OM_GATHERSTATISTICALDATA, false);
         sd->setCopyGSD(statisticsFlag);          CIMInstance instance;
         if ( ! _getInstanceCIMObjectManager(false, false, CIMPropertyList()))          instance = _getInstanceCIMObjectManager(true, true, CIMPropertyList());
         {  
             _buildInstanceCIMObjectManager(true, true, CIMPropertyList());  
         }  
   
         // ATTN: Think we need to clone here to avoid any issues of overwriting.  
         _setPropertyValue(instanceOfCIMObjectManager, OM_GATHERSTATISTICALDATA, statisticsFlag);  
         CIMObjectPath instancePath;  
  
           if (statisticsFlag != _getPropertyValue(instance,  OM_GATHERSTATISTICALDATA, false))
           {
               // set the changed property into the
               _setPropertyValue(instance, OM_GATHERSTATISTICALDATA, statisticsFlag);
         // Modify the object on disk         // Modify the object on disk
         try         try
         {         {
             _repository->modifyInstance(_operationNamespace,             _repository->modifyInstance(_operationNamespace,
                            instanceOfCIMObjectManager );                                 instance );
         }         }
         catch(CIMException& e)              catch(const CIMException&)
         {         {
             // ATTN: KS generate log error if this not possible             // ATTN: KS generate log error if this not possible
             PEG_METHOD_EXIT();             PEG_METHOD_EXIT();
             throw e;                  throw;
         }         }
         catch(Exception& e)              catch(const Exception&)
         {         {
             // ATTN: Generate log error.             // ATTN: Generate log error.
             PEG_METHOD_EXIT();             PEG_METHOD_EXIT();
             throw e;                  throw;
         }         }
         Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,         Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,
             "Interop Provider Set Statistics gathering in CIM_ObjectManager: $0",             "Interop Provider Set Statistics gathering in CIM_ObjectManager: $0",
             (statisticsFlag? "true" : "false"));             (statisticsFlag? "true" : "false"));
         // modify returns nothing normally.              StatisticalData* sd = StatisticalData::current();
               sd->setCopyGSD(statisticsFlag);
           }
         return;         return;
 #endif #endif
  
Line 1954 
Line 2038 
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::modifyInstance");             "InteropProvider::modifyInstance");
  
     // operation namespace needed internally to get class.      Tracer::trace(TRC_CONTROLPROVIDER, Tracer::LEVEL4,
           "%s modifyInstance. instanceReference= %s, includeQualifiers= %s, PropertyList= %s",
           thisProvider,
           (const char *) instanceReference.toString().getCString(),
           (const char *) _showBool(includeQualifiers).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();     _operationNamespace = instanceReference.getNameSpace();
Line 1981 
Line 2070 
     }     }
     else if (classEnum == PG_NAMESPACE)     else if (classEnum == PG_NAMESPACE)
     {     {
   #ifdef PEGASUS_OS_OS400
               MessageLoaderParms mparms("ControlProviders.InteropProvider.MODIFY_INSTANCE_NOT_ALLOWED",
                                         "Modify instance operation not allowed by Interop Provider for class $0.",
                                         PG_NAMESPACE_CLASSNAME.getString());
               throw CIMNotSupportedException(mparms);
   #else
         // for the moment allow modification of the statistics property only         // for the moment allow modification of the statistics property only
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         throw CIMNotSupportedException         throw CIMNotSupportedException
             (className.getString() + " not supported by Interop Provider");             (className.getString() + " not supported by Interop Provider");
   #endif
     }     }
     else     else
     {     {
Line 2020 
Line 2116 
         // 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 = _buildInstanceCIMObjectManager( true, true, CIMPropertyList());              CIMInstance instance = _getInstanceCIMObjectManager( true, true, CIMPropertyList());
             CIMObjectPath ref = _buildInstancePath(_operationNamespace,             CIMObjectPath ref = _buildInstancePath(_operationNamespace,
                 CIM_OBJECTMANAGER_CLASSNAME, instance);                 CIM_OBJECTMANAGER_CLASSNAME, instance);
             handler.deliver(ref);             handler.deliver(ref);
Line 2046 
Line 2142 
             return;             return;
         }         }
  
           if (classEnum == CIM_NAMESPACEINMANAGER)
           {
               handler.complete();
               PEG_METHOD_EXIT();
               return;
           }
   
         if (classEnum == PG_NAMESPACE)         if (classEnum == PG_NAMESPACE)
         {         {
             Array<CIMInstance> instances = _getInstancesCIMNamespace(false,             Array<CIMInstance> instances = _getInstancesCIMNamespace(false,
Line 2110 
Line 2213 
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::associatorNames()");             "InteropProvider::associatorNames()");
         throw CIMNotSupportedException("AssociationProvider::associators");          //throw CIMNotSupportedException("AssociationProvider::associators");
 } }
  
 void InteropProvider::associatorNames( void InteropProvider::associatorNames(
Line 2124 
Line 2227 
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::associatorNames()");             "InteropProvider::associatorNames()");
         throw CIMNotSupportedException("AssociationProvider::associatorNames");          //throw CIMNotSupportedException("AssociationProvider::associatorNames");
 } }
  
 void InteropProvider::references( void InteropProvider::references(
Line 2139 
Line 2242 
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
             "InteropProvider::references()");             "InteropProvider::references()");
         throw CIMNotSupportedException("AssociationProvider::references");          //throw CIMNotSupportedException("AssociationProvider::references");
 } }
  
 void _filterAssocInstances(Array<CIMInstance>& instances, void _filterAssocInstances(Array<CIMInstance>& instances,
Line 2178 
Line 2281 
  
     Array<CIMInstance> assocInstances;     Array<CIMInstance> assocInstances;
  
     if (classEnum == CIM_COMMMECHANISMFORMANAGER)      if (classEnum == CIM_COMMMECHANISMFORMANAGERASSOC)
         assocInstances = _buildInstancesCommMechanismForManager();         assocInstances = _buildInstancesCommMechanismForManager();
  
     if (classEnum == CIM_NAMESPACEINMANAGER)      if (classEnum == CIM_NAMESPACEINMANAGERASSOC)
         assocInstances = _buildInstancesNamespaceInManager();         assocInstances = _buildInstancesNamespaceInManager();
  
     _filterAssocInstances(assocInstances, resultClass, role);     _filterAssocInstances(assocInstances, resultClass, role);


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2