version 1.157.2.8, 2009/10/27 18:38:11
|
version 1.157.2.9, 2009/10/30 13:04:14
|
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
} | } |
| |
|
|
|
SCMOInstance* CMPIProviderManager::getSCMOClassFromRequest( |
|
CString& nameSpace, |
|
CString& className ) |
|
{ |
|
SCMOClass* scmoClass = mbGetSCMOClass( |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
|
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL2, |
|
"CMPIProviderManager::getSCMOClassFromRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
|
|
return new SCMOInstance(*scmoClass); |
|
} |
|
|
|
SCMOInstance* CMPIProviderManager::getSCMOObjectPathFromRequest( |
|
CString& nameSpace, |
|
CString& className, |
|
CIMObjectPath& cimObjPath ) |
|
{ |
|
SCMOClass* scmoClass = mbGetSCMOClass( |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
|
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::getSCMOObjectPathFromRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
|
|
SCMOInstance * objectPath = new SCMOInstance(*scmoClass,cimObjPath); |
|
objectPath->setHostName((const char*)System::getHostName().getCString()); |
|
return objectPath; |
|
} |
|
|
|
SCMOInstance* CMPIProviderManager::getSCMOInstanceFromRequest( |
|
CString& nameSpace, |
|
CString& className, |
|
CIMInstance& cimInstance ) |
|
{ |
|
SCMOClass* scmoClass = mbGetSCMOClass( |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
|
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::getSCMOInstanceFromRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
|
|
SCMOInstance * newInstance = new SCMOInstance(*scmoClass, cimInstance); |
|
newInstance->setHostName((const char*)System::getHostName().getCString()); |
|
|
|
return newInstance; |
|
} |
|
|
|
|
|
|
Message * CMPIProviderManager::processMessage(Message * request) | Message * CMPIProviderManager::processMessage(Message * request) |
{ | { |
PEG_METHOD_ENTER( | PEG_METHOD_ENTER( |
|
|
request->includeClassOrigin, | request->includeClassOrigin, |
true); | true); |
| |
// make target object path |
|
SCMOClass* scmoClass = |
|
mbGetSCMOClass( |
|
pr.getBroker(), |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleGetInstanceRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
| |
CIMException cimException(CIM_ERR_NOT_FOUND); |
SCMOInstance * objectPath = getSCMOObjectPathFromRequest( |
throw cimException; |
nameSpace, className, request->instanceName); |
} |
|
| |
SCMOInstance objectPath(*scmoClass,request->instanceName); |
|
objectPath.setHostName((const char*)System::getHostName().getCString()); |
|
CMPI_ObjectPathOnStack eRef(objectPath); | CMPI_ObjectPathOnStack eRef(objectPath); |
| |
CMPIProvider::pm_service_op_lock op_lock(&pr); | CMPIProvider::pm_service_op_lock op_lock(&pr); |
|
|
request->includeClassOrigin, | request->includeClassOrigin, |
true); | true); |
| |
// make target object path |
SCMOInstance * objectPath = |
SCMOClass* scmoClass = |
getSCMOClassFromRequest(nameSpace, className); |
mbGetSCMOClass( |
|
pr.getBroker(), |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleEnumerateInstancesRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
| |
SCMOInstance objectPath(*scmoClass); |
|
CMPI_ObjectPathOnStack eRef(objectPath); | CMPI_ObjectPathOnStack eRef(objectPath); |
| |
CMPIProvider::pm_service_op_lock op_lock(&pr); | CMPIProvider::pm_service_op_lock op_lock(&pr); |
|
|
false, | false, |
true); | true); |
| |
// make target object path |
SCMOInstance * objectPath = |
SCMOClass* scmoClass = |
getSCMOClassFromRequest(nameSpace, className); |
mbGetSCMOClass( |
|
pr.getBroker(), |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleEnumerateInstanceNamesRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
| |
SCMOInstance objectPath(*scmoClass); |
|
CMPI_ObjectPathOnStack eRef(objectPath); | CMPI_ObjectPathOnStack eRef(objectPath); |
| |
CMPIProvider::pm_service_op_lock op_lock(&pr); | CMPIProvider::pm_service_op_lock op_lock(&pr); |
|
|
false, | false, |
true); | true); |
| |
// make target object path and new instance |
SCMOInstance * newInstance = getSCMOInstanceFromRequest( |
SCMOClass* scmoClass = |
nameSpace, className, request->newInstance); |
mbGetSCMOClass( |
|
pr.getBroker(), |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleGetInstanceRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
|
|
SCMOInstance newInstance(*scmoClass,request->newInstance); |
|
newInstance.setHostName( |
|
(const char*)System::getHostName().getCString()); |
|
CMPI_ObjectPathOnStack eRef(newInstance); |
|
CMPI_InstanceOnStack eInst(newInstance); | CMPI_InstanceOnStack eInst(newInstance); |
| |
|
// This will create a second reference for the same SCMOInstance |
|
CMPI_ObjectPathOnStack eRef(*newInstance); |
|
|
CMPIProvider::pm_service_op_lock op_lock(&pr); | CMPIProvider::pm_service_op_lock op_lock(&pr); |
| |
PEG_TRACE(( | PEG_TRACE(( |
|
|
false, | false, |
true); | true); |
| |
// make target object path and modified instance |
|
SCMOClass* scmoClass = |
|
mbGetSCMOClass( |
|
pr.getBroker(), |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleGetInstanceRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
| |
SCMOInstance modInstance(*scmoClass,request->modifiedInstance); |
SCMOInstance * modInstance = getSCMOInstanceFromRequest( |
modInstance.setHostName( |
nameSpace, className, request->modifiedInstance); |
(const char*)System::getHostName().getCString()); |
|
CMPI_ObjectPathOnStack eRef(modInstance); |
|
CMPI_InstanceOnStack eInst(modInstance); | CMPI_InstanceOnStack eInst(modInstance); |
| |
|
// This will create a second reference for the same SCMOInstance |
|
CMPI_ObjectPathOnStack eRef(*modInstance); |
|
|
CMPIProvider::pm_service_op_lock op_lock(&pr); | CMPIProvider::pm_service_op_lock op_lock(&pr); |
| |
PEG_TRACE(( | PEG_TRACE(( |
|
|
false, | false, |
true); | true); |
| |
// make target object path |
SCMOInstance * objectPath = getSCMOObjectPathFromRequest( |
SCMOClass* scmoClass = |
nameSpace, className, request->instanceName); |
mbGetSCMOClass( |
|
pr.getBroker(), |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleGetInstanceRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
| |
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
|
|
SCMOInstance objectPath(*scmoClass, request->instanceName); |
|
objectPath.setHostName((const char*)System::getHostName().getCString()); |
|
CMPI_ObjectPathOnStack eRef(objectPath); | CMPI_ObjectPathOnStack eRef(objectPath); |
| |
CMPIProvider::pm_service_op_lock op_lock(&pr); | CMPIProvider::pm_service_op_lock op_lock(&pr); |
|
|
false, | false, |
true); | true); |
| |
// make target object path |
SCMOInstance * classPath = getSCMOClassFromRequest(nameSpace,className); |
SCMOClass* scmoClass = |
CMPI_ObjectPathOnStack eRef(classPath); |
mbGetSCMOClass( |
|
pr.getBroker(), |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleGetInstanceRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
|
|
SCMOInstance objectPath(*scmoClass); |
|
objectPath.setHostName((const char*)System::getHostName().getCString()); |
|
CMPI_ObjectPathOnStack eRef(objectPath); |
|
| |
CMPIProvider::pm_service_op_lock op_lock(&pr); | CMPIProvider::pm_service_op_lock op_lock(&pr); |
| |
|
|
request->includeClassOrigin, | request->includeClassOrigin, |
true); | true); |
| |
// make target object path |
SCMOInstance * objectPath = getSCMOObjectPathFromRequest( |
SCMOClass* scmoClass = |
nameSpace, className, request->objectName); |
mbGetSCMOClass( |
|
pr.getBroker(), |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleAssociatorsRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
| |
SCMOInstance objectPath(*scmoClass,request->objectName); |
|
objectPath.setHostName((const char*)System::getHostName().getCString()); |
|
CMPI_ObjectPathOnStack eRef(objectPath); | CMPI_ObjectPathOnStack eRef(objectPath); |
| |
CMPIProvider::pm_service_op_lock op_lock(&pr); | CMPIProvider::pm_service_op_lock op_lock(&pr); |
|
|
false, | false, |
true); | true); |
| |
// make target object path |
SCMOInstance * objectPath = getSCMOObjectPathFromRequest( |
SCMOClass* scmoClass = |
nameSpace, className, request->objectName); |
mbGetSCMOClass( |
|
pr.getBroker(), |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleAssociatorNamesRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
| |
SCMOInstance objectPath(*scmoClass,request->objectName); |
|
objectPath.setHostName((const char*)System::getHostName().getCString()); |
|
CMPI_ObjectPathOnStack eRef(objectPath); | CMPI_ObjectPathOnStack eRef(objectPath); |
| |
CMPIProvider::pm_service_op_lock op_lock(&pr); | CMPIProvider::pm_service_op_lock op_lock(&pr); |
|
|
request->includeClassOrigin, | request->includeClassOrigin, |
true); | true); |
| |
// make target object path |
SCMOInstance * objectPath = getSCMOObjectPathFromRequest( |
SCMOClass* scmoClass = |
nameSpace, className, request->objectName); |
mbGetSCMOClass( |
|
pr.getBroker(), |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleAssociatorsRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
| |
SCMOInstance objectPath(*scmoClass,request->objectName); |
|
objectPath.setHostName((const char*)System::getHostName().getCString()); |
|
CMPI_ObjectPathOnStack eRef(objectPath); | CMPI_ObjectPathOnStack eRef(objectPath); |
| |
CMPIProvider::pm_service_op_lock op_lock(&pr); | CMPIProvider::pm_service_op_lock op_lock(&pr); |
|
|
false, | false, |
true); | true); |
| |
// make target object path |
SCMOInstance * objectPath = getSCMOObjectPathFromRequest( |
SCMOClass* scmoClass = |
nameSpace, className, request->objectName); |
mbGetSCMOClass( |
|
pr.getBroker(), |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleAssociatorNamesRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
| |
SCMOInstance objectPath(*scmoClass,request->objectName); |
|
objectPath.setHostName((const char*)System::getHostName().getCString()); |
|
CMPI_ObjectPathOnStack eRef(objectPath); | CMPI_ObjectPathOnStack eRef(objectPath); |
| |
CMPIProvider::pm_service_op_lock op_lock(&pr); | CMPIProvider::pm_service_op_lock op_lock(&pr); |
|
|
false, | false, |
true); | true); |
| |
// make target object path |
|
SCMOClass* scmoClass = |
|
mbGetSCMOClass( |
|
pr.getBroker(), |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleGetInstanceRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
| |
CIMException cimException(CIM_ERR_NOT_FOUND); |
SCMOInstance * objectPath = getSCMOObjectPathFromRequest( |
throw cimException; |
nameSpace, className, request->instanceName); |
} |
|
| |
SCMOInstance objectPath(*scmoClass,request->instanceName); |
|
objectPath.setHostName((const char*)System::getHostName().getCString()); |
|
CMPI_ObjectPathOnStack eRef(objectPath); | CMPI_ObjectPathOnStack eRef(objectPath); |
| |
CMPIProvider::pm_service_op_lock op_lock(&pr); | CMPIProvider::pm_service_op_lock op_lock(&pr); |
|
|
| |
eSelx->classNames.append(indClassPath); | eSelx->classNames.append(indClassPath); |
| |
SCMOClass* scmoIndClass = |
SCMOInstance * indClassPathSCMO = |
mbGetSCMOClass( |
getSCMOClassFromRequest(nameSpace, className); |
pr.getBroker(), |
indClassPathSCMO->setHostName( |
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoIndClass) |
|
{ |
|
// This indicates a severe error, since we should't have |
|
// come here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleCreateSubscriptionRequest-" |
|
"Failed to obtain CIMClass for Namespace: %s " |
|
" Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
|
|
SCMOInstance indClassPathSCMO(*scmoIndClass); |
|
indClassPathSCMO.setHostName( |
|
(const char*)System::getHostName().getCString()); | (const char*)System::getHostName().getCString()); |
eSelx->classNamesSCMO.append(indClassPathSCMO); |
eSelx->classNamesSCMO.append(*indClassPathSCMO); |
|
delete indClassPathSCMO; |
| |
CIMPropertyList propertyList = request->propertyList; | CIMPropertyList propertyList = request->propertyList; |
if (!propertyList.isNull()) | if (!propertyList.isNull()) |
|
|
request->nameSpace, | request->nameSpace, |
request->classNames[i]); | request->classNames[i]); |
| |
SCMOClass* scmoClass = |
SCMOInstance * classPathSCMO = |
mbGetSCMOClass( |
getSCMOClassFromRequest(nameSpace, className); |
pr.getBroker(), |
classPathSCMO->setHostName( |
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have |
|
// come here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleCreateSubscriptionRequest-" |
|
"Failed to obtain CIMClass for Namespace: %s " |
|
" Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
|
|
SCMOInstance classPathSCMO(*scmoClass); |
|
classPathSCMO.setHostName( |
|
(const char*)System::getHostName().getCString()); | (const char*)System::getHostName().getCString()); |
CMPI_ObjectPathOnStack eRef(classPathSCMO); | CMPI_ObjectPathOnStack eRef(classPathSCMO); |
| |
|
|
{ | { |
filterActivated = true; | filterActivated = true; |
eSelx->classNames.append(classPath); | eSelx->classNames.append(classPath); |
eSelx->classNamesSCMO.append(classPathSCMO); |
eSelx->classNamesSCMO.append(*classPathSCMO); |
| |
} | } |
else | else |
|
|
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
| |
Array<CIMObjectPath> subClassPaths = eSelx->classNames; |
|
// Call deactivateFilter() for each subclass name those were | // Call deactivateFilter() for each subclass name those were |
// activated previously using activateFilter(). | // activated previously using activateFilter(). |
// Note: Start from Index 1, first name is actual class name in | // Note: Start from Index 1, first name is actual class name in |
|
|
false, | false, |
true); | true); |
| |
// make target object path |
SCMOInstance * objectPath = getSCMOObjectPathFromRequest( |
SCMOClass* scmoClass = |
nameSpace, className, request->instanceName); |
mbGetSCMOClass( |
|
pr.getBroker(), |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleGetInstanceRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
|
|
SCMOInstance objectPath(*scmoClass,request->instanceName); |
|
objectPath.setHostName((const char*)System::getHostName().getCString()); |
|
CMPI_ObjectPathOnStack eRef(objectPath); | CMPI_ObjectPathOnStack eRef(objectPath); |
| |
CMPIProvider::pm_service_op_lock op_lock(&pr); | CMPIProvider::pm_service_op_lock op_lock(&pr); |
|
|
request->propertyName.getString().getCString(); | request->propertyName.getString().getCString(); |
| |
// Construct a temporary CMPI Instance object, on which we | // Construct a temporary CMPI Instance object, on which we |
// can use the encpsulation functions to retrieve the property. |
// can use the encapsulation functions to retrieve the property. |
CMPI_InstanceOnStack tmpInst(instance); | CMPI_InstanceOnStack tmpInst(instance); |
| |
CMPIStatus trc; | CMPIStatus trc; |
|
|
false, | false, |
true); | true); |
| |
// make target object path |
|
SCMOClass* scmoClass = |
|
mbGetSCMOClass( |
|
pr.getBroker(), |
|
(const char*)nameSpace, |
|
strlen((const char*)nameSpace), |
|
(const char*)className, |
|
strlen((const char*)className)); |
|
if (0 == scmoClass) |
|
{ |
|
// This indicates a severe error, since we should't have come |
|
// here at all, if the class is invalid |
|
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL1, |
|
"CMPIProviderManager::handleGetInstanceRequest - " |
|
"Failed to obtain CIMClass for Namespace: %s Classname: %s", |
|
(const char*) nameSpace, |
|
(const char*) className)); |
|
|
|
CIMException cimException(CIM_ERR_NOT_FOUND); |
|
throw cimException; |
|
} |
|
| |
SCMOInstance modInst(*scmoClass, localModifiedInstance); |
SCMOInstance * modInst = getSCMOInstanceFromRequest( |
modInst.setHostName((const char*)System::getHostName().getCString()); |
nameSpace, className, localModifiedInstance); |
modInst.setPropertyFilter((const char **)props.getList()); |
modInst->setPropertyFilter((const char **)props.getList()); |
CMPI_ObjectPathOnStack eRef(modInst); |
|
CMPI_InstanceOnStack eInst(modInst); | CMPI_InstanceOnStack eInst(modInst); |
| |
|
// This will create a second reference for the same SCMOInstance |
|
CMPI_ObjectPathOnStack eRef(*modInst); |
|
|
CMPIProvider::pm_service_op_lock op_lock(&pr); | CMPIProvider::pm_service_op_lock op_lock(&pr); |
| |
PEG_TRACE(( | PEG_TRACE(( |