version 1.51, 2003/09/10 18:36:49
|
version 1.64, 2004/04/16 22:17:41
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2003//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development |
// The Open Group, Tivoli Systems |
// Company, L. P., IBM Corp., The Open Group, Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
| |
try | try |
{ | { |
instance = _providerRegistrationManager->getInstance(instanceReference); |
instance = _providerRegistrationManager->getInstance(instanceReference, |
|
includeQualifiers, |
|
includeClassOrigin, |
|
propertyList); |
} | } |
catch(CIMException& e) | catch(CIMException& e) |
{ | { |
|
|
| |
try | try |
{ | { |
enumInstances = _providerRegistrationManager->enumerateInstances(classReference); |
enumInstances = |
|
_providerRegistrationManager->enumerateInstances(classReference, |
|
includeQualifiers, |
|
includeClassOrigin, |
|
propertyList); |
} | } |
catch(CIMException& e) | catch(CIMException& e) |
{ | { |
|
|
try | try |
{ | { |
_providerRegistrationManager->modifyInstance(instanceReference, | _providerRegistrationManager->modifyInstance(instanceReference, |
instanceObject, includeQualifiers, propertyArray); |
instanceObject, |
|
includeQualifiers, |
|
propertyArray); |
} | } |
catch(CIMException& e) | catch(CIMException& e) |
{ | { |
|
|
ObjectPathResponseHandler & handler) | ObjectPathResponseHandler & handler) |
{ | { |
// get userName and only privileged user can execute this operation | // get userName and only privileged user can execute this operation |
String PG_ProviderModule_Name = "PG_ProviderModule"; //l10n |
|
String PG_ProviderCapabilities_Name = "PG_ProviderCapabilities"; //l10n |
|
String PG_Provider_Name = "PG_Provider"; |
|
String userName; | String userName; |
try | try |
{ | { |
|
|
if (instanceObject.findProperty(_PROPERTY_PROVIDERMODULE_NAME) == | if (instanceObject.findProperty(_PROPERTY_PROVIDERMODULE_NAME) == |
PEG_NOT_FOUND) | PEG_NOT_FOUND) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//"Missing Name which is required property in PG_ProviderModule class."); | //"Missing Name which is required property in PG_ProviderModule class."); |
String missing = "Name"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_NAME_IN_PG_PROVIDERMODULE", |
"Missing $0 which is required property in $1 class.",missing,PG_ProviderModule_Name)); |
"Missing Name which is required property in PG_ProviderModule class.")); |
} | } |
| |
if (instanceObject.findProperty(_PROPERTY_VENDOR) == PEG_NOT_FOUND) | if (instanceObject.findProperty(_PROPERTY_VENDOR) == PEG_NOT_FOUND) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//"Missing Vendor which is required property in PG_ProviderModule class."); | //"Missing Vendor which is required property in PG_ProviderModule class."); |
String missing = "Vendor"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_VENDOR_IN_PG_PROVIDERMODULE", |
"Missing $0 which is required property in $1 class.",missing,PG_ProviderModule_Name)); |
"Missing Vendor which is required property in PG_ProviderModule class.")); |
} | } |
| |
if (instanceObject.findProperty(_PROPERTY_VERSION) == PEG_NOT_FOUND) | if (instanceObject.findProperty(_PROPERTY_VERSION) == PEG_NOT_FOUND) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//"Missing Version which is required property in PG_ProviderModule class."); | //"Missing Version which is required property in PG_ProviderModule class."); |
String missing = "Version"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_VERSION_IN_PG_PROVIDERMODULE", |
"Missing $0 which is required property in $1 class.",missing,PG_ProviderModule_Name)); |
"Missing Version which is required property in PG_ProviderModule class.")); |
} | } |
| |
Uint32 ifcTypeIndex = | Uint32 ifcTypeIndex = |
instanceObject.findProperty(_PROPERTY_INTERFACETYPE); | instanceObject.findProperty(_PROPERTY_INTERFACETYPE); |
if (ifcTypeIndex == PEG_NOT_FOUND) | if (ifcTypeIndex == PEG_NOT_FOUND) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//"Missing InterfaceType which is required property in PG_ProviderModule class."); | //"Missing InterfaceType which is required property in PG_ProviderModule class."); |
String missing = "InterfaceType"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_INTERFACETYPE_IN_PG_PROVIDERMODULE", |
"Missing $0 which is required property in $1 class.",missing,PG_ProviderModule_Name)); |
"Missing InterfaceType which is required property in PG_ProviderModule class.")); |
} | } |
String ifcTypeString; | String ifcTypeString; |
instanceObject.getProperty(ifcTypeIndex).getValue(). | instanceObject.getProperty(ifcTypeIndex).getValue(). |
get(ifcTypeString); | get(ifcTypeString); |
| |
if(ifcTypeString != "C++Default" && ifcTypeString != "CMPI" ) |
if (ifcTypeString != "C++Default" |
|
#ifdef ENABLE_CMPI_PROVIDER_MANAGER |
|
&& ifcTypeString != "CMPI" |
|
#endif |
|
) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, |
//"Unsupported InterfaceType value: \"" + ifcTypeString + "\""); | //"Unsupported InterfaceType value: \"" + ifcTypeString + "\""); |
String unsupported = "InterfaceType"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.UNSUPPORTED_VALUE", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.UNSUPPORTED_INTERFACETYPE_VALUE", |
"Unsupported $0 value: \"$1\"",unsupported,ifcTypeString)); |
"Unsupported InterfaceType value: \"$0\"",ifcTypeString)); |
} | } |
| |
Uint32 ifcVersionIndex = | Uint32 ifcVersionIndex = |
instanceObject.findProperty(_PROPERTY_INTERFACEVERSION); | instanceObject.findProperty(_PROPERTY_INTERFACEVERSION); |
if (ifcVersionIndex == PEG_NOT_FOUND) | if (ifcVersionIndex == PEG_NOT_FOUND) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//"Missing InterfaceVersion which is required property in PG_ProviderModule class."); | //"Missing InterfaceVersion which is required property in PG_ProviderModule class."); |
String missing = "InterfaceVersion"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_INTERFACEVERSION_IN_PG_PROVIDERMODULE", |
"Missing $0 which is required property in $1 class.",missing,PG_ProviderModule_Name)); |
"Missing InterfaceVersion which is required property in PG_ProviderModule class.")); |
} | } |
String ifcVersionString; | String ifcVersionString; |
instanceObject.getProperty(ifcVersionIndex).getValue(). | instanceObject.getProperty(ifcVersionIndex).getValue(). |
get(ifcVersionString); | get(ifcVersionString); |
if ((ifcVersionString != "2.1.0") && |
if ( |
(ifcVersionString != "2.2.0") && |
#ifdef ENABLE_CMPI_PROVIDER_MANAGER |
(ifcVersionString != "2.3.0")) |
(ifcTypeString == "CMPI" && |
|
ifcVersionString != "2.0.0") || |
|
#endif |
|
(ifcTypeString == "C++Default" && |
|
ifcVersionString != "2.1.0" && |
|
ifcVersionString != "2.2.0" && |
|
ifcVersionString != "2.3.0")) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, |
//"Unsupported InterfaceVersion value: \"" + ifcVersionString + | //"Unsupported InterfaceVersion value: \"" + ifcVersionString + |
// "\""); | // "\""); |
String unsupported = "InterfaceVersion"; | String unsupported = "InterfaceVersion"; |
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.UNSUPPORTED_VALUE", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.UNSUPPORTED_INTERFACEVERSION_VALUE", |
"Unsupported $0 value: \"$1\"",unsupported,ifcVersionString)); |
"Unsupported InterfaceVersion value: \"$0\"",ifcVersionString)); |
} | } |
| |
if (instanceObject.findProperty(_PROPERTY_LOCATION) == PEG_NOT_FOUND) | if (instanceObject.findProperty(_PROPERTY_LOCATION) == PEG_NOT_FOUND) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//"Missing Location which is required property in PG_ProviderModule class."); | //"Missing Location which is required property in PG_ProviderModule class."); |
String missing = "Location"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_LOCATION_IN_PG_PROVIDERMODULE", |
"Missing $0 which is required property in $1 class.",missing,PG_ProviderModule_Name)); |
"Missing Location which is required property in PG_ProviderModule class.")); |
} | } |
| |
if (instanceObject.findProperty(_PROPERTY_OPERATIONALSTATUS) == | if (instanceObject.findProperty(_PROPERTY_OPERATIONALSTATUS) == |
|
|
if (instanceObject.findProperty(_PROPERTY_PROVIDERMODULENAME) == | if (instanceObject.findProperty(_PROPERTY_PROVIDERMODULENAME) == |
PEG_NOT_FOUND) | PEG_NOT_FOUND) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//"Missing ProviderModuleName which is required property in PG_ProviderCapabilities class."); | //"Missing ProviderModuleName which is required property in PG_ProviderCapabilities class."); |
String missing = "ProviderModuleName"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_PROVIDERMODULENAME_IN_PG_PROVIDERCAPABILITIES", |
"Missing $0 which is required property in $1 class.",missing,PG_ProviderCapabilities_Name)); |
"Missing ProviderModuleName which is required property in PG_ProviderCapabilities class.")); |
} | } |
| |
if (instanceObject.findProperty(_PROPERTY_PROVIDERNAME) == | if (instanceObject.findProperty(_PROPERTY_PROVIDERNAME) == |
PEG_NOT_FOUND) | PEG_NOT_FOUND) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//"Missing ProviderName which is required property in PG_ProviderCapabilities class."); | //"Missing ProviderName which is required property in PG_ProviderCapabilities class."); |
String missing = "ProviderName"; | String missing = "ProviderName"; |
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", | "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", |
"Missing $0 which is required property in $1 class.",missing,PG_ProviderCapabilities_Name)); |
"Missing ProviderName which is required property in PG_ProviderCapabilities class.")); |
} | } |
| |
if (instanceObject.findProperty(_PROPERTY_CAPABILITYID) == | if (instanceObject.findProperty(_PROPERTY_CAPABILITYID) == |
PEG_NOT_FOUND) | PEG_NOT_FOUND) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//"Missing CapabilityID which is required property in PG_ProviderCapabilities class."); | //"Missing CapabilityID which is required property in PG_ProviderCapabilities class."); |
String missing = "CapabilityID"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSINGCAPABILITYID_IN_PG_PROVIDERCAPABILITIES", |
"Missing $0 which is required property in $1 class.",missing,PG_ProviderCapabilities_Name)); |
"Missing CapabilityID which is required property in PG_ProviderCapabilities class.")); |
} | } |
| |
if (instanceObject.findProperty(_PROPERTY_CLASSNAME) == PEG_NOT_FOUND) | if (instanceObject.findProperty(_PROPERTY_CLASSNAME) == PEG_NOT_FOUND) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//"Missing ClassName which is required property in PG_ProviderCapabilities class."); | //"Missing ClassName which is required property in PG_ProviderCapabilities class."); |
String missing = "ClassName"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_CLASSNAME_IN_PG_PROVIDERCAPABILITIES", |
"Missing $0 which is required property in $1 class.",missing,PG_ProviderCapabilities_Name)); |
"Missing ClassName which is required property in PG_ProviderCapabilities class.")); |
} | } |
| |
if (instanceObject.findProperty(_PROPERTY_NAMESPACES) == PEG_NOT_FOUND) | if (instanceObject.findProperty(_PROPERTY_NAMESPACES) == PEG_NOT_FOUND) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//"Missing Namespaces which is required property in PG_ProviderCapabilities class."); | //"Missing Namespaces which is required property in PG_ProviderCapabilities class."); |
String missing = "Namespaces"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_NAMESPACES_IN_PG_PROVIDERCAPABILITIES", |
"Missing $0 which is required property in $1 class.",missing,PG_ProviderCapabilities_Name)); |
"Missing Namespaces which is required property in PG_ProviderCapabilities class.")); |
} | } |
| |
if (instanceObject.findProperty(_PROPERTY_PROVIDERTYPE) == PEG_NOT_FOUND) | if (instanceObject.findProperty(_PROPERTY_PROVIDERTYPE) == PEG_NOT_FOUND) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//"Missing ProviderType which is required property in PG_ProviderCapabilities class."); | //"Missing ProviderType which is required property in PG_ProviderCapabilities class."); |
String missing = "ProviderType"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_PROVIDERTYPE_IN_PG_PROVIDERCAPABILITIES", |
"Missing $0 which is required property in $1 class.",missing,PG_ProviderCapabilities_Name)); |
"Missing ProviderType which is required property in PG_ProviderCapabilities class.")); |
} | } |
} | } |
else if (className.equal (PEGASUS_CLASSNAME_CONSUMERCAPABILITIES)) | else if (className.equal (PEGASUS_CLASSNAME_CONSUMERCAPABILITIES)) |
|
|
// | // |
if (instanceObject.findProperty(_PROPERTY_PROVIDER_NAME) == PEG_NOT_FOUND) | if (instanceObject.findProperty(_PROPERTY_PROVIDER_NAME) == PEG_NOT_FOUND) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//"Missing Name which is required property in PG_Provider class."); | //"Missing Name which is required property in PG_Provider class."); |
String missing = "Name"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", | "ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", |
"Missing $0 which is required property in $1 class.",missing,PG_Provider_Name)); |
"Missing Name which is required property in PG_Provider class.")); |
} | } |
| |
if (instanceObject.findProperty(_PROPERTY_PROVIDERMODULENAME) == | if (instanceObject.findProperty(_PROPERTY_PROVIDERMODULENAME) == |
PEG_NOT_FOUND) | PEG_NOT_FOUND) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//"Missing ProviderModuleName which is required property in PG_Provider class."); | //"Missing ProviderModuleName which is required property in PG_Provider class."); |
String missing = "ProviderModuleName"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_REQUIRED_PROPERTY", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.MISSING_PROVIDERMODULENAME_IN_PG_PROVIDER", |
"Missing $0 which is required property in $1 class.",missing,PG_Provider_Name)); |
"Missing ProviderModuleName which is required property in PG_Provider class.")); |
} | } |
} | } |
| |
|
|
// if _PROPERTY_PROVIDERMODULENAME key not found | // if _PROPERTY_PROVIDERMODULENAME key not found |
if( !moduleFound) | if( !moduleFound) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, |
//"key ProviderModuleName was not found"); | //"key ProviderModuleName was not found"); |
String sub = "ProviderModuleName"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.KEY_NOT_FOUND", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.PROVIDERMODULENAME_KEY_NOT_FOUND", |
"key $0 was not found",sub)); |
"key ProviderModuleName was not found")); |
} | } |
| |
// | // |
|
|
if (ret_value == -2) | if (ret_value == -2) |
{ | { |
//L10N TODO | //L10N TODO |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
// throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
"disable the provider failed: Provider is busy."); |
//"disable the provider failed: Provider is busy."); |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
|
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.DISABLE_PROVIDER_FAILED_PROVIDER_BUSY", |
|
"disable the provider failed: Provider is busy.")); |
} | } |
} | } |
catch(CIMException&) | catch(CIMException&) |
|
|
// if _PROPERTY_PROVIDERMODULE_NAME key not found | // if _PROPERTY_PROVIDERMODULE_NAME key not found |
if( !moduleFound) | if( !moduleFound) |
{ | { |
//l10n |
//l10n 485 |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, | //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, |
//"key Name was not found"); | //"key Name was not found"); |
String sub = "Name"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.KEY_NOT_FOUND", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.NAME_KEY_NOT_FOUND", |
"key $0 was not found",sub)); |
"key Name was not found")); |
} | } |
| |
// | // |
|
|
if (ret_value == -2) | if (ret_value == -2) |
{ | { |
//L10N TODO | //L10N TODO |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
//throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, |
"disable the provider module failed: Provider is busy."); |
// "disable the provider module failed: Provider is busy."); |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,MessageLoaderParms( |
|
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.DISABLE_PROVIDER_MODULE_FAILED_PROVIDER_BUSY", |
|
"disable the provider module failed: Provider is busy.")); |
} | } |
} | } |
catch(CIMException& e) | catch(CIMException& e) |
|
|
// if _PROPERTY_PROVIDERMODULE_NAME key not found | // if _PROPERTY_PROVIDERMODULE_NAME key not found |
if( !moduleFound) | if( !moduleFound) |
{ | { |
//l10n |
//l10n 485 |
String sub = "Name"; |
|
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms( | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,MessageLoaderParms( |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.KEY_NOT_FOUND", |
"ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider.NAME_KEY_NOT_FOUND", |
"key $0 was not found",sub)); |
"key Name was not found")); |
} | } |
| |
handler.processing(); | handler.processing(); |
| |
Sint16 ret_value; | Sint16 ret_value; |
| |
|
try |
|
{ |
if(methodName.equal(_STOP_PROVIDER)) | if(methodName.equal(_STOP_PROVIDER)) |
{ | { |
// disable module | // disable module |
try |
|
{ |
|
// l10n |
|
ret_value = _disableModule(objectReference, moduleName, false, al); | ret_value = _disableModule(objectReference, moduleName, false, al); |
} | } |
catch(CIMException& e) |
|
{ |
|
throw (e); |
|
} |
|
|
|
CIMValue retValue(ret_value); |
|
handler.deliver(retValue); |
|
handler.complete(); |
|
return; |
|
} |
|
else if(methodName.equal(_START_PROVIDER)) | else if(methodName.equal(_START_PROVIDER)) |
{ | { |
// |
// enable module |
// get module status |
ret_value = _enableModule(objectReference, moduleName, al); |
// |
|
Array<Uint16> _OperationalStatus = |
|
_providerRegistrationManager->getProviderModuleStatus( moduleName); |
|
|
|
for (Uint32 i = 0; i<_OperationalStatus.size(); i++) |
|
{ |
|
// retValue equals 1 if module is already enabled |
|
if (_OperationalStatus[i] == _MODULE_OK) |
|
{ |
|
ret_value = 1; |
|
CIMValue retValue(ret_value); |
|
handler.deliver(retValue); |
|
handler.complete(); |
|
return; |
|
} | } |
|
else |
// retValue equals 2 if module is stopping |
|
// at this stage, module can not be started |
|
if (_OperationalStatus[i] == _MODULE_STOPPING) |
|
{ | { |
ret_value = 2; |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_METHOD_NOT_AVAILABLE, String::EMPTY); |
CIMValue retValue(ret_value); |
|
handler.deliver(retValue); |
|
handler.complete(); |
|
return; |
|
} | } |
} | } |
|
catch(CIMException& e) |
// get module instance |
|
CIMInstance mInstance = |
|
_providerRegistrationManager->getInstance(objectReference); |
|
|
|
// |
|
// get provider manager service |
|
// |
|
MessageQueueService * _service = _getProviderManagerService(); |
|
|
|
if (_service != NULL) |
|
{ |
|
// create CIMEnableModuleRequestMessage |
|
CIMEnableModuleRequestMessage * enable_req = |
|
new CIMEnableModuleRequestMessage( |
|
XmlWriter::getNextMessageId (), |
|
mInstance, |
|
QueueIdStack(_service->getQueueId())); |
|
// l10n |
|
enable_req->acceptLanguages = al; |
|
|
|
Array<Uint16> _opStatus; |
|
_opStatus = _sendEnableMessageToProviderManager(enable_req); |
|
|
|
for (Uint32 i = 0; i<_opStatus.size(); i++) |
|
{ |
|
if (_opStatus[i] == _MODULE_OK) |
|
{ | { |
// module was enabled successfully |
throw (e); |
ret_value = 0; |
|
CIMValue retValue(ret_value); |
|
handler.deliver(retValue); |
|
handler.complete(); |
|
return; |
|
} |
|
} |
|
} | } |
| |
// enable failed |
|
ret_value = -1; |
|
CIMValue retValue(ret_value); | CIMValue retValue(ret_value); |
handler.deliver(retValue); | handler.deliver(retValue); |
handler.complete(); | handler.complete(); |
return; | return; |
} | } |
else |
|
{ |
|
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_METHOD_NOT_AVAILABLE, String::EMPTY); |
|
} |
|
} |
|
| |
// get provider manager service | // get provider manager service |
MessageQueueService * ProviderRegistrationProvider::_getProviderManagerService() | MessageQueueService * ProviderRegistrationProvider::_getProviderManagerService() |
|
|
{ | { |
reference.setKeyBindings(keys); | reference.setKeyBindings(keys); |
instance = _providerRegistrationManager->getInstance(reference); | instance = _providerRegistrationManager->getInstance(reference); |
|
// |
|
// if the provider is indication provider |
|
// |
|
if (_isIndicationProvider(moduleName, instance, reference)) |
|
{ |
instances.append(instance); | instances.append(instance); |
} | } |
} | } |
} | } |
|
} |
else | else |
{ | { |
instance = _providerRegistrationManager->getInstance(ref); | instance = _providerRegistrationManager->getInstance(ref); |
|
|
|
// |
|
// if the provider is indication provider |
|
// |
|
if (_isIndicationProvider(moduleName, instance, ref)) |
|
{ |
instances.append(instance); | instances.append(instance); |
} | } |
|
} |
| |
// | // |
// get indication server queueId | // get indication server queueId |
|
|
String _moduleName; | String _moduleName; |
Uint16 providers; | Uint16 providers; |
CIMObjectPath providerRef; | CIMObjectPath providerRef; |
|
Boolean indProvider = false; |
|
Array<Boolean> indicationProviders; |
| |
// disable a provider module or delete a provider module | // disable a provider module or delete a provider module |
if (!disableProviderOnly) | if (!disableProviderOnly) |
|
|
providerRef.setKeyBindings(keys); | providerRef.setKeyBindings(keys); |
instance = _providerRegistrationManager->getInstance | instance = _providerRegistrationManager->getInstance |
(providerRef); | (providerRef); |
|
if (_isIndicationProvider(moduleName, instance, providerRef)) |
|
{ |
|
indProvider = true; |
|
indicationProviders.append(true); |
|
} |
|
else |
|
{ |
|
indicationProviders.append(false); |
|
} |
instances.append(instance); | instances.append(instance); |
} | } |
| |
|
|
} | } |
else | else |
{ | { |
instances.append(_providerRegistrationManager->getInstance |
instance = _providerRegistrationManager->getInstance(objectReference); |
(objectReference)); |
if (_isIndicationProvider(moduleName, instance, objectReference)) |
|
{ |
|
indProvider = true; |
|
indicationProviders.append(true); |
|
} |
|
else |
|
{ |
|
indicationProviders.append(false); |
|
} |
|
|
|
instances.append(instance); |
} | } |
| |
// | // |
|
|
mInstance, | mInstance, |
instances, | instances, |
disableProviderOnly, | disableProviderOnly, |
|
indicationProviders, |
QueueIdStack(_service->getQueueId())); | QueueIdStack(_service->getQueueId())); |
// l10n | // l10n |
disable_req->acceptLanguages = al; | disable_req->acceptLanguages = al; |
|
|
// module was disabled successfully | // module was disabled successfully |
if (_opStatus[i] == _MODULE_STOPPED) | if (_opStatus[i] == _MODULE_STOPPED) |
{ | { |
|
if (indProvider) |
|
{ |
// send termination message to subscription service | // send termination message to subscription service |
_sendTerminationMessageToSubscription(objectReference, | _sendTerminationMessageToSubscription(objectReference, |
moduleName, false, al); | moduleName, false, al); |
|
} |
return (0); | return (0); |
} | } |
| |
|
|
} | } |
else // disable provider | else // disable provider |
{ | { |
|
if (indProvider) |
|
{ |
_sendTerminationMessageToSubscription(objectReference, | _sendTerminationMessageToSubscription(objectReference, |
moduleName, true, al); | moduleName, true, al); |
|
} |
return (0); | return (0); |
} | } |
} | } |
|
|
return (-1); | return (-1); |
} | } |
| |
|
// enable provider module |
|
// return 0 if module is enabled successfully, |
|
// return 1 if module is already enabled, |
|
// return 2 if module can not be enabled since module is stopping, |
|
// otherwise, return -1 |
|
Sint16 ProviderRegistrationProvider::_enableModule( |
|
const CIMObjectPath & moduleRef, |
|
const String & moduleName, |
|
const AcceptLanguages & al) |
|
{ |
|
// |
|
// get module status |
|
// |
|
Array<Uint16> _OperationalStatus = |
|
_providerRegistrationManager->getProviderModuleStatus( moduleName); |
|
|
|
for (Uint32 i = 0; i<_OperationalStatus.size(); i++) |
|
{ |
|
// retValue equals 1 if module is already enabled |
|
if (_OperationalStatus[i] == _MODULE_OK) |
|
{ |
|
return (1); |
|
} |
|
|
|
// retValue equals 2 if module is stopping |
|
// at this stage, module can not be started |
|
if (_OperationalStatus[i] == _MODULE_STOPPING) |
|
{ |
|
return (2); |
|
} |
|
} |
|
|
|
// get module instance |
|
CIMInstance mInstance = |
|
_providerRegistrationManager->getInstance(moduleRef); |
|
|
|
// |
|
// get provider manager service |
|
// |
|
MessageQueueService * _service = _getProviderManagerService(); |
|
Boolean enabled = false; |
|
|
|
if (_service != NULL) |
|
{ |
|
// create CIMEnableModuleRequestMessage |
|
CIMEnableModuleRequestMessage * enable_req = |
|
new CIMEnableModuleRequestMessage( |
|
XmlWriter::getNextMessageId (), |
|
mInstance, |
|
QueueIdStack(_service->getQueueId())); |
|
// l10n |
|
enable_req->acceptLanguages = al; |
|
|
|
Array<Uint16> _opStatus; |
|
_opStatus = _sendEnableMessageToProviderManager(enable_req); |
|
|
|
for (Uint32 i = 0; i<_opStatus.size(); i++) |
|
{ |
|
// module is enabled successfully |
|
if (_opStatus[i] == _MODULE_OK) |
|
{ |
|
enabled = true; |
|
} |
|
} |
|
} |
|
|
|
if (enabled) |
|
{ |
|
// |
|
// Since module is enabled, need get updated module instance |
|
// |
|
CIMInstance UpdatedModuleInstance = |
|
_providerRegistrationManager->getInstance(moduleRef); |
|
|
|
// |
|
// The module is enabled, need to send enable message to |
|
// subscription service if the provider is an indication provider |
|
// |
|
|
|
CIMObjectPath providerRef = CIMObjectPath(String::EMPTY, |
|
moduleRef.getNameSpace(), |
|
PEGASUS_CLASSNAME_PROVIDER, |
|
Array<CIMKeyBinding>()); |
|
|
|
// |
|
// get all provider instances which have same module name as |
|
// moduleName |
|
// |
|
Array<CIMObjectPath> instanceNames = |
|
_providerRegistrationManager->enumerateInstanceNames(providerRef); |
|
CIMInstance pInstance; |
|
String _moduleName; |
|
String _providerName; |
|
Array<CIMInstance> capInstances; |
|
|
|
for(Uint32 i = 0, n=instanceNames.size(); i < n; i++) |
|
{ |
|
|
|
Array<CIMKeyBinding> keys = instanceNames[i].getKeyBindings(); |
|
|
|
for(Uint32 j=0; j < keys.size(); j++) |
|
{ |
|
// |
|
// get provider module name from reference |
|
// |
|
if(keys[j].getName().equal (_PROPERTY_PROVIDERMODULENAME)) |
|
{ |
|
_moduleName = keys[j].getValue(); |
|
} |
|
|
|
// |
|
// get provider name from reference |
|
// |
|
if(keys[j].getName().equal (_PROPERTY_PROVIDER_NAME)) |
|
{ |
|
_providerName = keys[j].getValue(); |
|
} |
|
} |
|
|
|
if (String::equalNoCase(_moduleName, moduleName)) |
|
{ |
|
providerRef.setKeyBindings(keys); |
|
pInstance = _providerRegistrationManager->getInstance |
|
(providerRef); |
|
// |
|
// get all the indication capability instances which belongs |
|
// to this provider |
|
// |
|
capInstances = _getIndicationCapInstances( |
|
moduleName, pInstance, providerRef); |
|
|
|
// |
|
// if there are indication capability instances |
|
// |
|
if (capInstances.size() != 0) |
|
{ |
|
_sendEnableMessageToSubscription(UpdatedModuleInstance, |
|
pInstance, |
|
capInstances, |
|
al); |
|
} |
|
} |
|
} |
|
return (0); |
|
} |
|
|
|
|
|
// enable failed |
|
return (-1); |
|
} |
|
|
|
// send enable message to indication service |
|
void ProviderRegistrationProvider::_sendEnableMessageToSubscription( |
|
const CIMInstance & mInstance, |
|
const CIMInstance & pInstance, |
|
const Array<CIMInstance> & capInstances, |
|
const AcceptLanguages & al) |
|
{ |
|
// |
|
// get indication server queueId |
|
// |
|
MessageQueueService * _service = _getIndicationService(); |
|
|
|
if (_service != NULL) |
|
{ |
|
Uint32 _queueId = _service->getQueueId(); |
|
|
|
CIMNotifyProviderEnableRequestMessage * enable_req = |
|
new CIMNotifyProviderEnableRequestMessage ( |
|
XmlWriter::getNextMessageId (), |
|
mInstance, |
|
pInstance, |
|
capInstances, |
|
QueueIdStack(_service->getQueueId())); |
|
|
|
enable_req->acceptLanguages = al; |
|
|
|
// create request envelope |
|
AsyncLegacyOperationStart * asyncRequest = |
|
new AsyncLegacyOperationStart ( |
|
_service->get_next_xid(), |
|
NULL, |
|
_queueId, |
|
enable_req, |
|
_queueId); |
|
|
|
AsyncReply * asyncReply = |
|
_controller->ClientSendWait(*_client_handle, |
|
_queueId, |
|
asyncRequest); |
|
|
|
CIMNotifyProviderEnableResponseMessage * response = |
|
reinterpret_cast<CIMNotifyProviderEnableResponseMessage *>( |
|
(static_cast<AsyncLegacyOperationResult *>(asyncReply))->get_result()); |
|
|
|
if (response->cimException.getCode() != CIM_ERR_SUCCESS) |
|
{ |
|
CIMException e = response->cimException; |
|
delete asyncRequest; |
|
delete asyncReply; |
|
delete response; |
|
throw (e); |
|
} |
|
|
|
delete asyncRequest; |
|
delete asyncReply; |
|
delete response; |
|
} |
|
} |
|
|
|
// If the provider is indication provider, return true, |
|
// otherwise, return false |
|
Boolean ProviderRegistrationProvider::_isIndicationProvider( |
|
const String & moduleName, |
|
const CIMInstance & instance, |
|
const CIMObjectPath & providerRef) |
|
{ |
|
// get provider name |
|
String providerName; |
|
Uint32 pos = instance.findProperty(CIMName (_PROPERTY_PROVIDER_NAME)); |
|
if (pos != PEG_NOT_FOUND) |
|
{ |
|
instance.getProperty(pos).getValue().get(providerName); |
|
} |
|
|
|
CIMObjectPath capabilityRef; |
|
|
|
capabilityRef = CIMObjectPath(providerRef.getHost(), |
|
providerRef.getNameSpace(), |
|
PEGASUS_CLASSNAME_CAPABILITIESREGISTRATION, |
|
providerRef.getKeyBindings()); |
|
|
|
// get all Capabilities instances |
|
Array<CIMObjectPath> instanceNames = |
|
_providerRegistrationManager->enumerateInstanceNames(capabilityRef); |
|
|
|
// |
|
// get provider module name and provider name from capability reference |
|
// |
|
String _moduleName, _providerName; |
|
CIMInstance capInstance; |
|
Array<Uint16> providerTypes; |
|
for(Uint32 i = 0, n=instanceNames.size(); i < n; i++) |
|
{ |
|
Array<CIMKeyBinding> keys = instanceNames[i].getKeyBindings(); |
|
|
|
for(Uint32 j=0; j < keys.size(); j++) |
|
{ |
|
if(keys[j].getName().equal (_PROPERTY_PROVIDERMODULENAME)) |
|
{ |
|
_moduleName = keys[j].getValue(); |
|
} |
|
|
|
if(keys[j].getName().equal (_PROPERTY_PROVIDERNAME)) |
|
{ |
|
_providerName = keys[j].getValue(); |
|
} |
|
|
|
// |
|
// if capability instance has same module name as moduleName |
|
// and same provider name as providerName, get provider type |
|
// |
|
if(String::equal(_moduleName, moduleName) && |
|
String::equal(_providerName, providerName)) |
|
{ |
|
capInstance = _providerRegistrationManager->getInstance |
|
(instanceNames[i]); |
|
|
|
Uint32 pos = capInstance.findProperty(CIMName (_PROPERTY_PROVIDERTYPE)); |
|
if (pos != PEG_NOT_FOUND) |
|
{ |
|
capInstance.getProperty(pos).getValue().get(providerTypes); |
|
|
|
for (Uint32 k=0; k < providerTypes.size(); k++) |
|
{ |
|
if (providerTypes[k] == _INDICATION_PROVIDER) |
|
{ |
|
return (true); |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
|
return (false); |
|
} |
|
|
|
// |
|
// get all the capability instances whose provider type is indication |
|
// |
|
Array<CIMInstance> ProviderRegistrationProvider::_getIndicationCapInstances( |
|
const String & moduleName, |
|
const CIMInstance & instance, |
|
const CIMObjectPath & providerRef) |
|
{ |
|
// get provider name |
|
String providerName; |
|
Uint32 pos = instance.findProperty(CIMName (_PROPERTY_PROVIDER_NAME)); |
|
if (pos != PEG_NOT_FOUND) |
|
{ |
|
instance.getProperty(pos).getValue().get(providerName); |
|
} |
|
|
|
CIMObjectPath capabilityRef; |
|
|
|
capabilityRef = CIMObjectPath(providerRef.getHost(), |
|
providerRef.getNameSpace(), |
|
PEGASUS_CLASSNAME_CAPABILITIESREGISTRATION, |
|
providerRef.getKeyBindings()); |
|
|
|
// get all Capabilities instances |
|
Array<CIMObjectPath> instanceNames = |
|
_providerRegistrationManager->enumerateInstanceNames(capabilityRef); |
|
|
|
String _moduleName, _providerName; |
|
CIMInstance capInstance; |
|
Array<Uint16> providerTypes; |
|
Array<CIMInstance> indCapInstances = 0; |
|
for(Uint32 i = 0, n=instanceNames.size(); i < n; i++) |
|
{ |
|
Array<CIMKeyBinding> keys = instanceNames[i].getKeyBindings(); |
|
|
|
for(Uint32 j=0; j < keys.size(); j++) |
|
{ |
|
if(keys[j].getName().equal (_PROPERTY_PROVIDERMODULENAME)) |
|
{ |
|
_moduleName = keys[j].getValue(); |
|
} |
|
|
|
if(keys[j].getName().equal (_PROPERTY_PROVIDERNAME)) |
|
{ |
|
_providerName = keys[j].getValue(); |
|
} |
|
} |
|
|
|
// |
|
// if capability instance has same module name as moduleName |
|
// and same provider name as providerName, get provider type |
|
// |
|
if(String::equal(_moduleName, moduleName) && |
|
String::equal(_providerName, providerName)) |
|
{ |
|
capInstance = _providerRegistrationManager->getInstance |
|
(instanceNames[i]); |
|
|
|
Uint32 pos = capInstance.findProperty(CIMName (_PROPERTY_PROVIDERTYPE)); |
|
if (pos != PEG_NOT_FOUND) |
|
{ |
|
capInstance.getProperty(pos).getValue().get(providerTypes); |
|
|
|
for (Uint32 k=0; k < providerTypes.size(); k++) |
|
{ |
|
// |
|
// if provider type of the instance is indication, |
|
// append the instance |
|
// |
|
if (providerTypes[k] == _INDICATION_PROVIDER) |
|
{ |
|
indCapInstances.append(capInstance); |
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
|
return (indCapInstances); |
|
} |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |