version 1.5, 2008/02/20 14:00:31
|
version 1.6, 2008/04/24 06:28:01
|
|
|
| |
void InteropProvider::verifyCachedInfo() | void InteropProvider::verifyCachedInfo() |
{ | { |
// TBD: May need an algorithm to determine whether or not the information |
if (!updateProfileCache.get()) |
// cached by the Interop Provider is out of date in some way. Until that |
{ |
// can be created, then providers that are dynamically registered after |
return; |
// the Server profile has already been traversed may not be properly |
} |
// reflected. Although this is a shortcoming, the current users of this |
// At present cache will be rebuilt in the following conditions. |
// functionality do not generally use dynamic registration as part of their |
// (1) When instances of PG_ProviderProfileCapabilities is created |
// installation procedures. |
// or deleted. |
|
// (2) When Provider and ProviderCapabilities instances |
|
// are created or Provider, ProviderModule and ProviderCapabilities |
|
// instance are deleted. |
|
// (3) When Provider or ProviderModule is disabled or enabled. |
|
AutoMutex mtx(interopMut); |
|
if (updateProfileCache.get()) |
|
{ |
|
initializeNamespaces(); |
|
cacheProfileRegistrationInfo(); |
|
updateProfileCache--; |
|
} |
} | } |
| |
// | // |
|
|
{ | { |
Array<CIMInstance> instances; | Array<CIMInstance> instances; |
Array<CIMInstance> providerCapabilitiesInstances; | Array<CIMInstance> providerCapabilitiesInstances; |
|
|
|
// Clear existing cache |
|
profileIds.clear(); |
|
conformingElements.clear(); |
|
elementNamespaces.clear(); |
|
|
// Retrieve all of the provider profile registration info | // Retrieve all of the provider profile registration info |
Array<CIMName> propList; | Array<CIMName> propList; |
propList.append(CAPABILITIES_PROPERTY_PROVIDERMODULENAME); | propList.append(CAPABILITIES_PROPERTY_PROVIDERMODULENAME); |
|
|
propList.append(PROFILECAPABILITIES_PROPERTY_OTHERREGISTEREDPROFILE); | propList.append(PROFILECAPABILITIES_PROPERTY_OTHERREGISTEREDPROFILE); |
propList.append(PROFILECAPABILITIES_PROPERTY_OTHERPROFILEORGANIZATION); | propList.append(PROFILECAPABILITIES_PROPERTY_OTHERPROFILEORGANIZATION); |
propList.append(PROFILECAPABILITIES_PROPERTY_CONFORMINGELEMENTS); | propList.append(PROFILECAPABILITIES_PROPERTY_CONFORMINGELEMENTS); |
|
|
Array<CIMInstance> providerProfileInstances = | Array<CIMInstance> providerProfileInstances = |
repository->enumerateInstancesForClass(PEGASUS_NAMESPACENAME_INTEROP, |
enumProviderProfileCapabilityInstances( |
PEGASUS_CLASSNAME_PG_PROVIDERPROFILECAPABILITIES, false, |
true, |
false, false, CIMPropertyList(propList)); |
false, |
|
false, |
|
false, |
|
CIMPropertyList(propList)); |
|
|
CIMClass elementConformsClass = repository->getClass( | CIMClass elementConformsClass = repository->getClass( |
PEGASUS_NAMESPACENAME_INTEROP, | PEGASUS_NAMESPACENAME_INTEROP, |
PEGASUS_CLASSNAME_PG_ELEMENTCONFORMSTOPROFILE, | PEGASUS_CLASSNAME_PG_ELEMENTCONFORMSTOPROFILE, |
|
|
Array<String> profileVersions; // Not going to use this info | Array<String> profileVersions; // Not going to use this info |
Array<Uint16> profileOrganizations; // Not going to use this info | Array<Uint16> profileOrganizations; // Not going to use this info |
Array<String> profileOrganizationNames; // Not going to use this info | Array<String> profileOrganizationNames; // Not going to use this info |
|
Array<String> providerModuleNames; // Not going to use this info |
|
Array<String> providerNames; // Not going to use this info |
|
|
String profileId = extractProfileInfo(currentProfileInstance, | String profileId = extractProfileInfo(currentProfileInstance, |
profileCapabilitiesClass, | profileCapabilitiesClass, |
registeredProfileClass, | registeredProfileClass, |
|
|
profileVersions, | profileVersions, |
profileOrganizations, | profileOrganizations, |
profileOrganizationNames, | profileOrganizationNames, |
|
providerModuleNames, |
|
providerNames, |
true); | true); |
|
|
Uint32 propIndex = currentProfileInstance.findProperty( | Uint32 propIndex = currentProfileInstance.findProperty( |
PROFILECAPABILITIES_PROPERTY_CONFORMINGELEMENTS); | PROFILECAPABILITIES_PROPERTY_CONFORMINGELEMENTS); |
| |