version 1.2, 2003/10/08 16:31:16
|
version 1.3, 2003/10/11 15:25:42
|
|
|
| |
_getPropertyValue(cimInstance, "Namespaces").get(nameSpaces); | _getPropertyValue(cimInstance, "Namespaces").get(nameSpaces); |
| |
for(Uint32 i = 0, n = nameSpaces.size(); i < n; i++) |
// ATTN: need to walk the array |
{ |
if(String::equalNoCase(cimObjectPath.getNameSpace().getString(), nameSpaces[0])) |
if(String::equalNoCase(cimObjectPath.getNameSpace().getString(), nameSpaces[i])) |
|
{ | { |
providerName = _getPropertyValue(cimInstance, "ProviderName").toString(); | providerName = _getPropertyValue(cimInstance, "ProviderName").toString(); |
| |
|
|
} | } |
} | } |
} | } |
|
catch(Exception & e) |
|
{ |
|
// log error |
|
String message = e.getMessage(); |
} | } |
catch(...) | catch(...) |
{ | { |
|
|
} | } |
} | } |
} | } |
|
catch(Exception & e) |
|
{ |
|
// log error |
|
String message = e.getMessage(); |
|
} |
catch(...) | catch(...) |
{ | { |
} | } |
|
|
| |
if(String::equalNoCase(moduleName, _getPropertyValue(cimInstance, "Name").toString())) | if(String::equalNoCase(moduleName, _getPropertyValue(cimInstance, "Name").toString())) |
{ | { |
// check status |
// ATTN: check operational status |
if(String::equalNoCase("2", _getPropertyValue(cimInstance, "OperationalStatus").toString())) |
|
{ |
|
// get interface | // get interface |
interfaceType = _getPropertyValue(cimInstance, "InterfaceType").toString(); | interfaceType = _getPropertyValue(cimInstance, "InterfaceType").toString(); |
| |
|
|
} | } |
} | } |
} | } |
|
catch(Exception & e) |
|
{ |
|
// log error |
|
String message = e.getMessage(); |
} | } |
catch(...) | catch(...) |
{ | { |
|
|
throw Exception("Could not determine PG_ProviderModule.InterfaceType or PG_ProviderModule.Location or module is disabled."); | throw Exception("Could not determine PG_ProviderModule.InterfaceType or PG_ProviderModule.Location or module is disabled."); |
} | } |
| |
// fully qualify physical provider name (module), if not already done so. |
|
#if defined(PEGASUS_PLATFORM_WIN32_IX86_MSVC) |
|
moduleLocation = moduleLocation + String(".dll"); |
|
#elif defined(PEGASUS_PLATFORM_LINUX_IX86_GNU) || defined(PEGASUS_PLATFORM_LINUX_IA86_GNU) |
|
String temp = ConfigManager::getHomedPath(ConfigManager::getInstance()->getCurrentValue("providerDir")); |
|
|
|
moduleLocation = temp + String("/lib") + moduleLocation + String(".so")); |
|
#elif defined(PEGASUS_OS_HPUX) |
|
String temp = ConfigManager::getHomedPath(ConfigManager::getInstance()->getCurrentValue("providerDir")); |
|
|
|
moduleLocation = temp + String("/lib") + moduleLocation + String(".sl")); |
|
#elif defined(PEGASUS_OS_OS400) |
|
// do nothing |
|
#else |
|
foo // needs code |
|
#endif |
|
|
|
ProviderName temp( | ProviderName temp( |
cimObjectPath.toString(), | cimObjectPath.toString(), |
providerName, | providerName, |
|
|
Uint32 flags = providerName.getCapabilitiesMask(); | Uint32 flags = providerName.getCapabilitiesMask(); |
| |
// validate arguments | // validate arguments |
if(objectName.getNameSpace().isNull() || objectName.getClassName().isNull() || (flags == 0)) |
if(objectName.getNameSpace().isNull() || objectName.getClassName().isNull()) |
{ | { |
throw Exception("Invalid argument."); | throw Exception("Invalid argument."); |
} | } |