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

Diff for /pegasus/src/Pegasus/ControlProviders/InteropProvider/ElementConformsToProfile.cpp between version 1.10.2.1 and 1.11

version 1.10.2.1, 2009/08/06 18:10:37 version 1.11, 2009/02/19 18:01:07
Line 111 
Line 111 
             enumRegisteredSubProfileInstances();             enumRegisteredSubProfileInstances();
         profileInstances.appendArray(subprofileInstances);         profileInstances.appendArray(subprofileInstances);
         Array<CIMInstance> profilesForVersion = getProfilesForVersion(         Array<CIMInstance> profilesForVersion = getProfilesForVersion(
             profileInstances, SNIA_NUM, 1, 2, 0);              profileInstances,
               SNIA_VER_120);
         for (Uint32 i = 0, n = profilesForVersion.size(); i < n; ++i)         for (Uint32 i = 0, n = profilesForVersion.size(); i < n; ++i)
         {         {
             instances.append(buildElementConformsToProfile(             instances.append(buildElementConformsToProfile(
Line 119 
Line 120 
                 profilesForVersion[i].getPath(),                 profilesForVersion[i].getPath(),
                 elementConformsClass));                 elementConformsClass));
         }         }
   
           //Add association between the 1.2 SMI-S registeredprofile and
           //profileregistration registeredprofile with registeredversion 1.0.0
           profRegProfile = buildDependencyReference(
               hostName,
               buildProfileInstanceId(
                   SNIA_NAME,
                   "Profile Registration",
                   SNIA_VER_100),
               PEGASUS_CLASSNAME_PG_REGISTEREDPROFILE);
           instances.append(buildElementConformsToProfile(
               smisVersionProfile,
               profRegProfile,
               elementConformsClass));
   
   
     }     }
     return instances;     return instances;
 } }
Line 271 
Line 288 
 } }
  
 //Method that filters the registered profile or registered subprofile instances //Method that filters the registered profile or registered subprofile instances
 //whose versions are greater or equal to the given version.  //for the SMI-S version.
 Array<CIMInstance> InteropProvider::getProfilesForVersion( Array<CIMInstance> InteropProvider::getProfilesForVersion(
     Array<CIMInstance>& profiles,     Array<CIMInstance>& profiles,
     Uint16 regOrg,      const String version)
     Uint32 majorVer,  {
     Uint32 minorVer,  
     Uint32 updateVer)  
 {  
     static const String SMISProfileName("SMI-S");  
     static const String IndicationProfileName("Indication");  
     static const String ServerProfileName("Server");  
     static const String SoftwareProfileName("Software");  
   
     Array<CIMInstance> instances;     Array<CIMInstance> instances;
     instances.clear();     instances.clear();
     for (Uint32 i = 0, n = profiles.size(); i < n; ++i)     for (Uint32 i = 0, n = profiles.size(); i < n; ++i)
     {     {
         String versionNumber;         String versionNumber;
         String profileName;         String profileName;
         Uint16 regOrgNo;  
   
         Uint32 index = profiles[i].findProperty("RegisteredVersion");         Uint32 index = profiles[i].findProperty("RegisteredVersion");
         if (index != PEG_NOT_FOUND)         if (index != PEG_NOT_FOUND)
         {         {
Line 310 
Line 317 
                 tmpVal.get(profileName);                 tmpVal.get(profileName);
             }             }
         }         }
         index = profiles[i].findProperty("RegisteredOrganization");  
         if (index != PEG_NOT_FOUND)  
         {  
             const CIMValue &tmpVal = profiles[i].getProperty(index).getValue();  
             if (!tmpVal.isNull())  
             {  
                 tmpVal.get(regOrgNo);  
             }  
         }  
  
         if (regOrg == regOrgNo)          if ((versionNumber == version) && (profileName != String("SMI-S")))
         {  
             if (profileName == ServerProfileName ||  
                 profileName == IndicationProfileName ||  
                 profileName == SoftwareProfileName)  
             {  
                 if (VersionUtil::isVersionGreaterOrEqual(  
                     versionNumber, majorVer, minorVer, updateVer))  
                 {                 {
                     instances.append(profiles[i]);                     instances.append(profiles[i]);
                 }                 }
             }             }
             else if (profileName != SMISProfileName)  
             {  
                 instances.append(profiles[i]);  
             }  
         }  
     }  
     return instances;     return instances;
 } }
  
Line 386 
Line 371 
         propList.append(PROVIDERCAPABILITIES_PROPERTY_CLASSNAME);         propList.append(PROVIDERCAPABILITIES_PROPERTY_CLASSNAME);
         capabilities = repository->enumerateInstancesForClass(         capabilities = repository->enumerateInstancesForClass(
             PEGASUS_NAMESPACENAME_INTEROP,             PEGASUS_NAMESPACENAME_INTEROP,
             PEGASUS_CLASSNAME_PROVIDERCAPABILITIES, false, false, false);              PEGASUS_CLASSNAME_PROVIDERCAPABILITIES, false, false);
     }     }
     else     else
     {     {
Line 466 
Line 451 
             true,             true,
             false,             false,
             false,             false,
             false,  
             CIMPropertyList(propList));             CIMPropertyList(propList));
  
     CIMClass elementConformsClass = repository->getClass(     CIMClass elementConformsClass = repository->getClass(
Line 547 
Line 531 
                 capPropList.append(PROVIDERCAPABILITIES_PROPERTY_CLASSNAME);                 capPropList.append(PROVIDERCAPABILITIES_PROPERTY_CLASSNAME);
                 capabilities = repository->enumerateInstancesForClass(                 capabilities = repository->enumerateInstancesForClass(
                     PEGASUS_NAMESPACENAME_INTEROP,                     PEGASUS_NAMESPACENAME_INTEROP,
                     PEGASUS_CLASSNAME_PROVIDERCAPABILITIES, false, false,                      PEGASUS_CLASSNAME_PROVIDERCAPABILITIES, false, false);
                     false);  
             }             }
             Array<CIMInstance> capabilitiesForProvider;             Array<CIMInstance> capabilitiesForProvider;
             Array<CIMNamespaceName> namespacesForProvider;             Array<CIMNamespaceName> namespacesForProvider;


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2