version 1.96, 2007/04/20 18:26:56
|
version 1.97, 2007/07/31 19:13:43
|
|
|
| |
CIMInstance instance; | CIMInstance instance; |
| |
try |
instance = _providerRegistrationManager->getInstance( |
{ |
instanceReference, includeQualifiers, includeClassOrigin, propertyList); |
instance = _providerRegistrationManager->getInstance(instanceReference, |
|
includeQualifiers, |
|
includeClassOrigin, |
|
propertyList); |
|
} |
|
catch(const CIMException&) |
|
{ |
|
throw; |
|
} |
|
| |
handler.deliver(instance); | handler.deliver(instance); |
| |
|
|
| |
Array<CIMInstance> enumInstances; | Array<CIMInstance> enumInstances; |
| |
try |
|
{ |
|
enumInstances = | enumInstances = |
_providerRegistrationManager->enumerateInstancesForClass( | _providerRegistrationManager->enumerateInstancesForClass( |
classReference, | classReference, |
includeQualifiers, | includeQualifiers, |
includeClassOrigin, | includeClassOrigin, |
propertyList); | propertyList); |
} |
|
catch(const CIMException&) |
|
{ |
|
throw; |
|
} |
|
| |
handler.deliver(enumInstances); | handler.deliver(enumInstances); |
| |
|
|
Array<CIMObjectPath> enumInstanceNames; | Array<CIMObjectPath> enumInstanceNames; |
| |
// get all instance names from repository | // get all instance names from repository |
try |
|
{ |
|
enumInstanceNames = | enumInstanceNames = |
_providerRegistrationManager->enumerateInstanceNamesForClass( | _providerRegistrationManager->enumerateInstanceNamesForClass( |
classReference); | classReference); |
} |
|
catch(const CIMException&) |
|
{ |
|
throw; |
|
} |
|
| |
handler.deliver(enumInstanceNames); | handler.deliver(enumInstanceNames); |
| |
|
|
// begin processing the request | // begin processing the request |
handler.processing(); | handler.processing(); |
| |
try |
_providerRegistrationManager->modifyInstance( |
{ |
instanceReference, instanceObject, includeQualifiers, propertyArray); |
_providerRegistrationManager->modifyInstance(instanceReference, |
|
instanceObject, |
|
includeQualifiers, |
|
propertyArray); |
|
} |
|
catch(const CIMException&) |
|
{ |
|
throw; |
|
} |
|
| |
// complete processing the request | // complete processing the request |
handler.complete(); | handler.complete(); |
|
|
// begin processing the request | // begin processing the request |
handler.processing(); | handler.processing(); |
| |
try |
returnReference = _providerRegistrationManager->createInstance( |
{ |
instanceReference, instance); |
returnReference = |
|
_providerRegistrationManager->createInstance(instanceReference, |
|
instance); |
|
} |
|
catch(const CIMException&) |
|
{ |
|
throw; |
|
} |
|
| |
handler.deliver(returnReference); | handler.deliver(returnReference); |
| |
|
|
// | // |
// disable the provider | // disable the provider |
// | // |
try |
Sint16 ret_value = _disableModule( |
{ |
instanceReference, moduleName, true, al); |
Sint16 ret_value = _disableModule(instanceReference, |
|
moduleName, true, al); |
|
| |
// | // |
// if the provider disable failed | // if the provider disable failed |
// | // |
// l10n |
|
if (ret_value == -1) | if (ret_value == -1) |
{ | { |
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, |
|
|
"DISABLE_PROVIDER_FAILED", | "DISABLE_PROVIDER_FAILED", |
"disable the provider failed.")); | "disable the provider failed.")); |
} | } |
|
|
// | // |
// The provider disable failed since there are pending requests | // The provider disable failed since there are pending requests |
// | // |
|
|
"disable the provider failed: Provider is busy.")); | "disable the provider failed: Provider is busy.")); |
} | } |
} | } |
catch(CIMException&) |
|
{ |
|
throw; |
|
} |
|
} |
|
| |
// | // |
// disable provider module before remove provider registration | // disable provider module before remove provider registration |
|
|
// | // |
// disable the provider module | // disable the provider module |
// | // |
try |
Sint16 ret_value = _disableModule( |
{ |
instanceReference, moduleName, false, al); |
Sint16 ret_value = _disableModule(instanceReference, |
|
moduleName, false, al); |
|
| |
// | // |
// if the provider module disable failed | // if the provider module disable failed |
// | // |
// l10n |
|
if (ret_value == -1) | if (ret_value == -1) |
{ | { |
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, |
|
MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider." | "ControlProviders.ProviderRegistrationProvider." |
"ProviderRegistrationProvider." | "ProviderRegistrationProvider." |
"DISABLE_PROVIDER_MODULE_FAILED", | "DISABLE_PROVIDER_MODULE_FAILED", |
|
|
// | // |
if (ret_value == -2) | if (ret_value == -2) |
{ | { |
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, |
|
MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider." | "ControlProviders.ProviderRegistrationProvider." |
"ProviderRegistrationProvider." | "ProviderRegistrationProvider." |
"DISABLE_PROVIDER_MODULE_FAILED_PROVIDER_BUSY", | "DISABLE_PROVIDER_MODULE_FAILED_PROVIDER_BUSY", |
"disable the provider module failed: Provider is busy.")); | "disable the provider module failed: Provider is busy.")); |
} | } |
} | } |
catch(const CIMException&) |
|
{ |
|
throw; |
|
} |
|
} |
|
| |
try |
|
{ |
|
_providerRegistrationManager->deleteInstance(instanceReference); | _providerRegistrationManager->deleteInstance(instanceReference); |
} |
|
catch(const CIMException&) |
|
{ |
|
throw; |
|
} |
|
| |
// complete processing the request | // complete processing the request |
handler.complete(); | handler.complete(); |
|
|
| |
Sint16 ret_value; | Sint16 ret_value; |
| |
try |
|
{ |
|
if(methodName.equal(_STOP_PROVIDER)) | if(methodName.equal(_STOP_PROVIDER)) |
{ | { |
// disable module | // disable module |
ret_value = _disableModule(objectReference, |
ret_value = _disableModule(objectReference, moduleName, false, al); |
moduleName, false, al); |
|
} | } |
else if(methodName.equal(_START_PROVIDER)) | else if(methodName.equal(_START_PROVIDER)) |
{ | { |
|
|
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_METHOD_NOT_AVAILABLE, | throw PEGASUS_CIM_EXCEPTION(CIM_ERR_METHOD_NOT_AVAILABLE, |
String::EMPTY); | String::EMPTY); |
} | } |
} |
|
catch(const CIMException&) |
|
{ |
|
throw; |
|
} |
|
| |
CIMValue retValue(ret_value); | CIMValue retValue(ret_value); |
handler.deliver(retValue); | handler.deliver(retValue); |