version 1.11, 2009/02/19 18:01:07
|
version 1.12, 2009/07/13 06:30:34
|
|
|
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( |
|
|
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; |
} | } |
|
|
} | } |
| |
//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 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) |
{ | { |
|
|
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 (regOrg == regOrgNo) |
|
{ |
|
if (profileName == ServerProfileName || |
|
profileName == IndicationProfileName || |
|
profileName == SoftwareProfileName) |
|
{ |
|
if (VersionUtil::isVersionGreaterOrEqual( |
|
versionNumber, majorVer, minorVer, updateVer)) |
|
{ |
|
instances.append(profiles[i]); |
|
} |
|
} |
|
else if (profileName != SMISProfileName) |
{ | { |
instances.append(profiles[i]); | instances.append(profiles[i]); |
} | } |
} | } |
|
} |
return instances; | return instances; |
} | } |
| |