version 1.81, 2008/12/16 18:56:32
|
version 1.81.2.1, 2009/08/18 16:58:50
|
|
|
// | // |
// Constructor for the InteropProvider control provider | // Constructor for the InteropProvider control provider |
// | // |
InteropProvider::InteropProvider(CIMRepository * rep) : repository(rep), |
InteropProvider::InteropProvider( |
hostName(System::getHostName()), providerInitialized(false), |
CIMRepository * rep, |
|
ProviderRegistrationManager *provRegManager): |
|
repository(rep), |
|
providerRegistrationManager(provRegManager), |
|
hostName(System::getHostName()), |
|
providerInitialized(false), |
updateProfileCache(0), | updateProfileCache(0), |
profileIds(Array<String>()), conformingElements(Array<CIMNameArray>()), |
profileIds(Array<String>()), |
|
conformingElements(Array<CIMNameArray>()), |
elementNamespaces(Array<CIMNamespaceArray>()) | elementNamespaces(Array<CIMNamespaceArray>()) |
{ | { |
PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,"InteropProvider::InteropProvider"); | PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,"InteropProvider::InteropProvider"); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return gotInstance; | return gotInstance; |
} | } |
|
TARGET_CLASS classEnum = translateClassInput(opClass); |
|
CIMInstance retInstance; |
|
switch(classEnum) |
|
{ |
|
case PG_SOFTWAREIDENTITY: |
|
{ |
|
retInstance = getSoftwareIdentityInstance(instanceName); |
|
normalizeInstance( |
|
retInstance, instanceName, false, false, propertyList); |
|
} |
|
break; |
|
// ATTN: Implement getIntstance for all other classes. Currently |
|
// this method calls localEnumerateInstances() to select instance |
|
// which is too expensive. |
|
default: |
|
{ |
// Create reference from host, namespace, class components of | // Create reference from host, namespace, class components of |
// instance name | // instance name |
CIMObjectPath ref; | CIMObjectPath ref; |
|
|
propertyList); | propertyList); |
| |
// deliver a single instance if found. | // deliver a single instance if found. |
CIMInstance retInstance; |
|
|
|
bool found = false; | bool found = false; |
for(Uint32 i = 0, n = instances.size(); i < n; i++) | for(Uint32 i = 0, n = instances.size(); i < n; i++) |
{ | { |
|
|
break; | break; |
} | } |
} | } |
|
PEG_METHOD_EXIT(); |
if(!found) | if(!found) |
{ | { |
cout << "Coule not find instance: " << instanceName.toString() << endl; |
throw CIMObjectNotFoundException(instanceName.toString()); |
|
} |
|
} |
} | } |
PEG_METHOD_EXIT(); |
|
return retInstance; | return retInstance; |
} | } |
| |