(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.72 and 1.75

version 1.72, 2008/02/20 14:00:31 version 1.75, 2008/05/16 06:26:48
Line 78 
Line 78 
 // //
 InteropProvider::InteropProvider(CIMRepository * rep) : repository(rep), InteropProvider::InteropProvider(CIMRepository * rep) : repository(rep),
     hostName(System::getHostName()), providerInitialized(false),     hostName(System::getHostName()), providerInitialized(false),
       updateProfileCache(0),
     profileIds(Array<String>()), conformingElements(Array<CIMNameArray>()),     profileIds(Array<String>()), conformingElements(Array<CIMNameArray>()),
     elementNamespaces(Array<CIMNamespaceArray>())     elementNamespaces(Array<CIMNamespaceArray>())
 { {
Line 122 
Line 123 
     CIMNamespaceName opNamespace = instanceName.getNameSpace();     CIMNamespaceName opNamespace = instanceName.getNameSpace();
     CIMName opClass = instanceName.getClassName();     CIMName opClass = instanceName.getClassName();
     if(opNamespace != PEGASUS_NAMESPACENAME_INTEROP &&     if(opNamespace != PEGASUS_NAMESPACENAME_INTEROP &&
         opClass != PEGASUS_CLASSNAME_PG_ELEMENTCONFORMSTOPROFILE)          opClass != PEGASUS_CLASSNAME_PG_ELEMENTCONFORMSTOPROFILE
           // Get CIM_IndicationService instance from IndicationService.
   #ifdef PEGASUS_ENABLE_DMTF_INDICATION_PROFILE_SUPPORT
           || opClass == PEGASUS_CLASSNAME_CIM_INDICATIONSERVICE
   #endif
           )
     {     {
         AutoMutex mut(interopMut);         AutoMutex mut(interopMut);
         CIMInstance gotInstance = cimomHandle.getInstance(         CIMInstance gotInstance = cimomHandle.getInstance(
Line 294 
Line 300 
             instances = enumHostedAccessPointInstances();             instances = enumHostedAccessPointInstances();
             break;             break;
         }         }
           //We don't support enumerate CIM_Namespace instances. PG_Namespace is
           //supported.
           case CIM_NAMESPACE:
           {
               break;
           }
           case PG_PROVIDERPROFILECAPABILITIES:
           {
               instances = enumProviderProfileCapabilityInstances(false, false);
               break;
           }
   
   #ifdef PEGASUS_ENABLE_DMTF_INDICATION_PROFILE_SUPPORT
           case PG_ELEMENTCAPABILITIES:
           {
               instances = enumElementCapabilityInstances(context);
               break;
           }
           case PG_HOSTEDINDICATIONSERVICE:
           {
               instances = enumHostedIndicationServiceInstances(context);
               break;
           }
           case PG_SERVICEAFFECTSELEMENT:
           {
               instances = enumServiceAffectsElementInstances(context);
               break;
           }
   #endif
         default:         default:
             PEG_METHOD_EXIT();             PEG_METHOD_EXIT();
             throw CIMNotSupportedException(className.getString() +             throw CIMNotSupportedException(className.getString() +
Line 447 
Line 482 
               context,               context,
               objectName,               objectName,
               propertyList);               propertyList);
             if (!tmpInstance.isUninitialized())
             {
           index = tmpInstance.findProperty("RegisteredName");           index = tmpInstance.findProperty("RegisteredName");
           if (index != PEG_NOT_FOUND)           if (index != PEG_NOT_FOUND)
           {           {
Line 457 
Line 494 
                   tmpVal.get(profileName);                   tmpVal.get(profileName);
               }               }
           }           }
             }
           if (String::compareNoCase(profileName, String("SMI-S")) == 0)           if (String::compareNoCase(profileName, String("SMI-S")) == 0)
           {           {
               expectedTargetRole =               expectedTargetRole =
Line 587 
Line 625 
               expectedOriginRole = PROPERTY_DEPENDENT;               expectedOriginRole = PROPERTY_DEPENDENT;
           }           }
           break;           break;
   #ifdef PEGASUS_ENABLE_DMTF_INDICATION_PROFILE_SUPPORT
         case PG_HOSTEDINDICATIONSERVICE:
             if(originClassEnum == PG_COMPUTERSYSTEM)
             {
                 expectedTargetRole = PROPERTY_DEPENDENT;
                 expectedOriginRole = PROPERTY_ANTECEDENT;
             }
             break;
   #endif
       default:       default:
           break;           break;
     }     }
Line 845 
Line 892 
         profileCapabilitiesClass = repository->getClass(         profileCapabilitiesClass = repository->getClass(
             PEGASUS_NAMESPACENAME_INTEROP,             PEGASUS_NAMESPACENAME_INTEROP,
             PEGASUS_CLASSNAME_PG_PROVIDERPROFILECAPABILITIES,             PEGASUS_CLASSNAME_PG_PROVIDERPROFILECAPABILITIES,
             false, true, false);              false,
               true,
               false);
  
         providerClassifications.append(Uint16(5)); // "Instrumentation"         providerClassifications.append(Uint16(5)); // "Instrumentation"
  
           // initialize namespaces.
           initializeNamespaces();
   
           // Now cache the Registration info used for ElementConformsToProfile
           cacheProfileRegistrationInfo();
   
           providerInitialized = true;
       }
       PEG_METHOD_EXIT();
   }
   
         //         //
         // Initialize the namespaces so that all namespaces with the         // Initialize the namespaces so that all namespaces with the
         // CIM_ElementConformsToProfile class also have the         // CIM_ElementConformsToProfile class also have the
Line 856 
Line 916 
         // the cross-namespace ElementConformsToProfile association in both         // the cross-namespace ElementConformsToProfile association in both
         // directions.         // directions.
         //         //
         Array<CIMNamespaceName> namespaceNames =  void InteropProvider::initializeNamespaces()
             repository->enumerateNameSpaces();  {
       Array<CIMNamespaceName> namespaceNames =  repository->enumerateNameSpaces();
         // get the PG_ElementConformstoProfile class without the qualifiers         // get the PG_ElementConformstoProfile class without the qualifiers
         // and then add just the required ASSOCIATION qualifier, so that         // and then add just the required ASSOCIATION qualifier, so that
         // resolveclass doesn't fail for the test/EmbeddedInstance/Dynamic         // resolveclass doesn't fail for the test/EmbeddedInstance/Dynamic
Line 866 
Line 927 
         // the CIMSchema.         // the CIMSchema.
         CIMClass conformsClass = repository->getClass(         CIMClass conformsClass = repository->getClass(
             PEGASUS_NAMESPACENAME_INTEROP,             PEGASUS_NAMESPACENAME_INTEROP,
             PEGASUS_CLASSNAME_PG_ELEMENTCONFORMSTOPROFILE, true, false);          PEGASUS_CLASSNAME_PG_ELEMENTCONFORMSTOPROFILE,
         conformsClass.addQualifier(CIMQualifier(CIMName("ASSOCIATION"),          true,
                               CIMValue(true)));          false);
       conformsClass.addQualifier(
           CIMQualifier(CIMName("ASSOCIATION"), CIMValue(true)));
         CIMClass profileClass = repository->getClass(         CIMClass profileClass = repository->getClass(
             PEGASUS_NAMESPACENAME_INTEROP,             PEGASUS_NAMESPACENAME_INTEROP,
             PEGASUS_CLASSNAME_PG_REGISTEREDPROFILE, true, false);          PEGASUS_CLASSNAME_PG_REGISTEREDPROFILE,
           true,
           false);
         for(Uint32 i = 0, n = namespaceNames.size(); i < n; ++i)         for(Uint32 i = 0, n = namespaceNames.size(); i < n; ++i)
         {         {
             // Check if the PG_ElementConformsToProfile class is present             // Check if the PG_ElementConformsToProfile class is present
Line 883 
Line 948 
             {             {
                 // Look for these classes in the same try-block since the                 // Look for these classes in the same try-block since the
                 // second depends on the first                 // second depends on the first
                 tmpCimClass = repository->getClass(currentNamespace,              tmpCimClass = repository->getClass(
                   currentNamespace,
                     PEGASUS_CLASSNAME_CIM_ELEMENTCONFORMSTOPROFILE);                     PEGASUS_CLASSNAME_CIM_ELEMENTCONFORMSTOPROFILE);
                 tmpPgClass = repository->getClass(currentNamespace,              tmpPgClass = repository->getClass(
                   currentNamespace,
                     PEGASUS_CLASSNAME_PG_ELEMENTCONFORMSTOPROFILE);                     PEGASUS_CLASSNAME_PG_ELEMENTCONFORMSTOPROFILE);
             }             }
             catch(const Exception &)             catch(const Exception &)
Line 893 
Line 960 
             }             }
             try             try
             {             {
                 tmpPgProfileClass = repository->getClass(currentNamespace,              tmpPgProfileClass = repository->getClass(
                   currentNamespace,
                     PEGASUS_CLASSNAME_PG_REGISTEREDPROFILE);                     PEGASUS_CLASSNAME_PG_REGISTEREDPROFILE);
             }             }
             catch(const Exception &)             catch(const Exception &)
Line 920 
Line 988 
                     CIMObjectPath newPath = conformsClass.getPath();                     CIMObjectPath newPath = conformsClass.getPath();
                     newPath.setNameSpace(currentNamespace);                     newPath.setNameSpace(currentNamespace);
                     newclass.setPath(newPath);                     newclass.setPath(newPath);
                     repository->createClass(currentNamespace,                  repository->createClass(
                       currentNamespace,
                         newclass);                         newclass);
                 }                 }
                 if(tmpPgProfileClass.isUninitialized())                 if(tmpPgProfileClass.isUninitialized())
Line 929 
Line 998 
                     CIMObjectPath newPath = profileClass.getPath();                     CIMObjectPath newPath = profileClass.getPath();
                     newPath.setNameSpace(currentNamespace);                     newPath.setNameSpace(currentNamespace);
                     newclass.setPath(newPath);                     newclass.setPath(newPath);
                     repository->createClass(currentNamespace,                  repository->createClass(
                       currentNamespace,
                         newclass);                         newclass);
                 }                 }
             }             }
         }         }
   
         // Now cache the Registration info used for ElementConformsToProfile  
         cacheProfileRegistrationInfo();  
   
         providerInitialized = true;  
     }  
   
     PEG_METHOD_EXIT();  
 } }
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2