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

version 1.11, 2009/02/19 18:01:07 version 1.12.6.2, 2013/06/03 22:35:54
Line 111 
Line 111 
             enumRegisteredSubProfileInstances();             enumRegisteredSubProfileInstances();
         profileInstances.appendArray(subprofileInstances);         profileInstances.appendArray(subprofileInstances);
         Array<CIMInstance> profilesForVersion = getProfilesForVersion(         Array<CIMInstance> profilesForVersion = getProfilesForVersion(
             profileInstances,              profileInstances, SNIA_NUM, 1, 2, 0);
             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 120 
Line 119 
                 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 284 
Line 267 
                 elementConformsClass));                 elementConformsClass));
  
     }     }
   
   #ifdef PEGASUS_ENABLE_DMTF_INDICATION_PROFILE_SUPPORT
       // Now add the  association between the Indication profile
       // and IndicationService
       if (opNamespace == PEGASUS_NAMESPACENAME_INTEROP)
       {
           CIMObjectPath serverProfile = buildDependencyReference(
               hostName,
               buildProfileInstanceId(DMTF_NAME, "Indications", DMTF_VER_110),
               PEGASUS_CLASSNAME_PG_REGISTEREDPROFILE);
           // Retrieve the IndicationService instance
           Array<CIMInstance> indService =
               enumIndicationServiceInstances(OperationContext());
   
           instances.append(
               buildElementConformsToProfile(
                   serverProfile,
                   indService[0].getPath(),
                   elementConformsClass));
       }
   #endif
   
     return instances;     return instances;
 } }
  
 //Method that filters the registered profile or registered subprofile instances //Method that filters the registered profile or registered subprofile instances
 //for the SMI-S version.  //whose versions are greater or equal to the given version.
 Array<CIMInstance> InteropProvider::getProfilesForVersion( Array<CIMInstance> InteropProvider::getProfilesForVersion(
     Array<CIMInstance>& profiles,     Array<CIMInstance>& profiles,
     const String version)      Uint16 regOrg,
 {      Uint32 majorVer,
       Uint32 minorVer,
       Uint32 updateVer)
   {
       static const String SMISProfileName("SMI-S");
       static const String SNIAIndicationProfileName("Indication");
       static const String DMTFIndicationProfileName("Indications");
       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;
           //Can use 0 here as registered organization value of 0 is
           //ruled out(not specified in the CIM Schema
           Uint16 regOrgNo = 0;
   
         Uint32 index = profiles[i].findProperty("RegisteredVersion");         Uint32 index = profiles[i].findProperty("RegisteredVersion");
         if (index != PEG_NOT_FOUND)         if (index != PEG_NOT_FOUND)
         {         {
Line 317 
Line 335 
                 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 ((versionNumber == version) && (profileName != String("SMI-S")))          if ( regOrgNo != 0 && regOrg == regOrgNo)
           {
               if (profileName == ServerProfileName ||
                   (regOrg == SNIA_NUM &&
                       profileName == SNIAIndicationProfileName) ||
                   (regOrg == DMTF_NUM
                       && profileName == DMTFIndicationProfileName) ||
                   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;
 } }
  


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2