(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.2 and 1.2.4.2

version 1.2, 2006/11/03 20:15:39 version 1.2.4.2, 2008/02/22 21:49:57
Line 27 
Line 27 
 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 // //
 //==============================================================================  //=============================================================================
  
  
 /////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
Line 84 
Line 84 
     return tmpInstance;     return tmpInstance;
 } }
  
   Array<CIMInstance> InteropProvider::enumElementConformsToProfileRPRPInstances(
       const OperationContext & opContext,
       const CIMNamespaceName & opNamespace)
   {
       CIMClass elementConformsClass = repository->getClass(
           PEGASUS_NAMESPACENAME_INTEROP,
           PEGASUS_CLASSNAME_PG_ELEMENTCONFORMSTOPROFILE_RP_RP,
           false, true, false);
   
       Array<CIMInstance> instances;
       CIMObjectPath smisVersionProfile, profRegProfile;
   
       if (opNamespace == PEGASUS_NAMESPACENAME_INTEROP)
       {
           //Add associations between the 1.2 SMIS-Version profile and all
           //the version 1.2.0 profiles and subprofiles.
           smisVersionProfile = buildDependencyReference(
               hostName,
               buildProfileInstanceId(SNIA_NAME, "SMI-S", SNIA_VER_120),
               PEGASUS_CLASSNAME_PG_REGISTEREDPROFILE);
   
           Array<CIMInstance> profileInstances =
               enumRegisteredProfileInstances();
           Array<CIMInstance> subprofileInstances =
               enumRegisteredSubProfileInstances();
           profileInstances.appendArray(subprofileInstances);
           Array<CIMInstance> profilesForVersion = getProfilesForVersion(
               profileInstances,
               SNIA_VER_120);
           for (Uint32 i = 0, n = profilesForVersion.size(); i < n; ++i)
           {
               instances.append(buildElementConformsToProfile(
                   smisVersionProfile,
                   profilesForVersion[i].getPath(),
                   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;
   }
   
 // //
 // Enumerates all of the ElementConformsToProfile association instances. // Enumerates all of the ElementConformsToProfile association instances.
 // //
Line 140 
Line 196 
                         CIMInstance & currentInstance =                         CIMInstance & currentInstance =
                             elementConformsInstances[k];                             elementConformsInstances[k];
  
                           // NOCHKSRC
                         // Make sure that the current instance points to the                         // Make sure that the current instance points to the
                         // current profile ID.                         // current profile ID.
                         CIMObjectPath profilePath =                         CIMObjectPath profilePath =
                             getRequiredValue<CIMObjectPath>(                             getRequiredValue<CIMObjectPath>(
                                 elementConformsInstances[k],                                 elementConformsInstances[k],
                                 ELEMENTCONFORMSTOPROFILE_PROPERTY_CONFORMANTSTANDARD);                                 ELEMENTCONFORMSTOPROFILE_PROPERTY_CONFORMANTSTANDARD);
                           // DOCHKSRC
                         const Array<CIMKeyBinding> & keys =                         const Array<CIMKeyBinding> & keys =
                             profilePath.getKeyBindings();                             profilePath.getKeyBindings();
                         if(keys.size() != 1)                         if(keys.size() != 1)
                             continue;                             continue;
                         if(keys.size() == 1 && keys[0].getValue() == profileId)                         if(keys.size() == 1 && keys[0].getValue() == profileId)
                         {                         {
                               // NOCHKSRC
                             conformingElementPaths.append(                             conformingElementPaths.append(
                                 getRequiredValue<CIMObjectPath>(                                 getRequiredValue<CIMObjectPath>(
                                 currentInstance,                                 currentInstance,
                                 ELEMENTCONFORMSTOPROFILE_PROPERTY_MANAGEDELEMENT));                                 ELEMENTCONFORMSTOPROFILE_PROPERTY_MANAGEDELEMENT));
                               // DOCHKSRC
                         }                         }
                     }                     }
                 }                 }
Line 197 
Line 257 
     // and the ObjectManager (if we're in the Interop namespace)     // and the ObjectManager (if we're in the Interop namespace)
     if(opNamespace == PEGASUS_NAMESPACENAME_INTEROP)     if(opNamespace == PEGASUS_NAMESPACENAME_INTEROP)
     {     {
         // Build up the Object Path for the server profile          // Build up the Object Path for the server profile version 1.1.0
         CIMObjectPath serverProfile = buildDependencyReference(hostName,          CIMObjectPath serverProfile = buildDependencyReference(
               hostName,
             buildProfileInstanceId(SNIA_NAME, "Server", SNIA_VER_110),             buildProfileInstanceId(SNIA_NAME, "Server", SNIA_VER_110),
             PEGASUS_CLASSNAME_PG_REGISTEREDPROFILE);             PEGASUS_CLASSNAME_PG_REGISTEREDPROFILE);
         // Retrieve the Object Manager instance         // Retrieve the Object Manager instance
         CIMInstance objManager = getObjectManagerInstance();         CIMInstance objManager = getObjectManagerInstance();
  
         instances.append(buildElementConformsToProfile(serverProfile,          instances.append(
             objManager.getPath(), elementConformsClass));              buildElementConformsToProfile(
     }                  serverProfile,
                   objManager.getPath(),
                   elementConformsClass));
   
           // Build up the Object Path for the server profile ver 1.2.0
           // and add the elementconformstoprofile association instance
           serverProfile = buildDependencyReference(
               hostName,
               buildProfileInstanceId(SNIA_NAME, "Server", SNIA_VER_120),
               PEGASUS_CLASSNAME_PG_REGISTEREDPROFILE);
           instances.append(
               buildElementConformsToProfile(
                   serverProfile,
                   objManager.getPath(),
                   elementConformsClass));
  
       }
     return instances;     return instances;
 } }
  
   //Method that filters the registered profile or registered subprofile instances
   //for the SMI-S version.
   Array<CIMInstance> InteropProvider::getProfilesForVersion(
       Array<CIMInstance>& profiles,
       const String version)
   {
       Array<CIMInstance> instances;
       instances.clear();
       for (Uint32 i = 0, n = profiles.size(); i < n; ++i)
       {
           String versionNumber;
           String profileName;
           Uint32 index = profiles[i].findProperty("RegisteredVersion");
           if (index != PEG_NOT_FOUND)
           {
               const CIMValue &tmpVal = profiles[i].getProperty(index).getValue();
               if (!tmpVal.isNull())
               {
                 tmpVal.get(versionNumber);
               }
           }
           index = profiles[i].findProperty("RegisteredName");
           if (index != PEG_NOT_FOUND)
           {
               const CIMValue &tmpVal = profiles[i].getProperty(index).getValue();
               if (!tmpVal.isNull())
               {
                   tmpVal.get(profileName);
               }
           }
   
           if ((versionNumber == version) && (profileName != String("SMI-S")))
           {
               instances.append(profiles[i]);
           }
       }
       return instances;
   }
  
 typedef Array<String> StringArray; typedef Array<String> StringArray;
  
Line 245 
Line 359 
         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, true, false, false);              PEGASUS_CLASSNAME_PROVIDERCAPABILITIES, false, false, false);
     }     }
     else     else
     {     {
Line 315 
Line 429 
     propList.append(PROFILECAPABILITIES_PROPERTY_CONFORMINGELEMENTS);     propList.append(PROFILECAPABILITIES_PROPERTY_CONFORMINGELEMENTS);
     Array<CIMInstance> providerProfileInstances =     Array<CIMInstance> providerProfileInstances =
         repository->enumerateInstancesForClass(PEGASUS_NAMESPACENAME_INTEROP,         repository->enumerateInstancesForClass(PEGASUS_NAMESPACENAME_INTEROP,
             PEGASUS_CLASSNAME_PG_PROVIDERPROFILECAPABILITIES, true,              PEGASUS_CLASSNAME_PG_PROVIDERPROFILECAPABILITIES, false,
             false, false, CIMPropertyList(propList));             false, false, CIMPropertyList(propList));
     CIMClass elementConformsClass = repository->getClass(     CIMClass elementConformsClass = repository->getClass(
         PEGASUS_NAMESPACENAME_INTEROP,         PEGASUS_NAMESPACENAME_INTEROP,
Line 395 
Line 509 
                 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, true, false,                      PEGASUS_CLASSNAME_PROVIDERCAPABILITIES, false, false,
                     false);                     false);
             }             }
             Array<CIMInstance> capabilitiesForProvider;             Array<CIMInstance> capabilitiesForProvider;


Legend:
Removed from v.1.2  
changed lines
  Added in v.1.2.4.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2