version 1.18, 2005/02/05 23:00:10
|
version 1.19, 2005/02/05 23:45:22
|
|
|
// CIMObjectManager | // CIMObjectManager |
// CIM_ObjectManagerCommunicationMechanism | // CIM_ObjectManagerCommunicationMechanism |
// CIM_CIMXMLCommunicationMechanism | // CIM_CIMXMLCommunicationMechanism |
// CIM_ProtocolAdapter |
// CIM_ProtocolAdapter (Note: Removed because deprecated class in cim 2.9) |
// CIM_Namespace (Effective Pegasus 2.4 we use PG_Namespace which | // CIM_Namespace (Effective Pegasus 2.4 we use PG_Namespace which |
// is a subclass of CIM_Namespace with additional properties for | // is a subclass of CIM_Namespace with additional properties for |
// shared namespaces. | // shared namespaces. |
|
|
CIM_OBJECTMANAGER = 2, | CIM_OBJECTMANAGER = 2, |
PG_CIMXMLCOMMUNICATIONMECHANISM = 3, | PG_CIMXMLCOMMUNICATIONMECHANISM = 3, |
CIM_NAMESPACEINMANAGERINST =4, | CIM_NAMESPACEINMANAGERINST =4, |
CIM_COMMMECHANISMFORMANAGERINST=5 |
CIM_COMMMECHANISMFORMANAGERINST=5, |
|
CIM_NAMESPACEINMANAGER=6 |
}; | }; |
| |
enum targetAssocClass{ | enum targetAssocClass{ |
CIM_NAMESPACEINMANAGER =1, |
CIM_NAMESPACEINMANAGERASSOC = 1, |
CIM_COMMMECHANISMFORMANAGER=2 |
CIM_COMMMECHANISMFORMANAGERASSOC=2 |
}; | }; |
| |
//*************************************************************** | //*************************************************************** |
|
|
return ipAddress; | return ipAddress; |
} | } |
| |
Array<String> _getFunctionalProfiles(Array<Uint16> profiles) |
Array<String> _getFunctionalProfiles(Array<Uint16> & profiles) |
{ | { |
Array<String> profileDescriptions; | Array<String> profileDescriptions; |
profiles.append(2); profileDescriptions.append("Basic Read"); | profiles.append(2); profileDescriptions.append("Basic Read"); |
|
|
if (className.equal(PG_CIMXMLCOMMUNICATIONMECHANISM_CLASSNAME)) | if (className.equal(PG_CIMXMLCOMMUNICATIONMECHANISM_CLASSNAME)) |
return PG_CIMXMLCOMMUNICATIONMECHANISM; | return PG_CIMXMLCOMMUNICATIONMECHANISM; |
| |
|
if (className.equal(CIM_NAMESPACEINMANAGER_CLASSNAME)) |
|
return CIM_NAMESPACEINMANAGER; |
|
|
// Last entry, reverse test and return OK if PG_Namespace | // Last entry, reverse test and return OK if PG_Namespace |
// Note: Changed to PG_Namespace for CIM 2.4 | // Note: Changed to PG_Namespace for CIM 2.4 |
if (!className.equal(PG_NAMESPACE_CLASSNAME)) | if (!className.equal(PG_NAMESPACE_CLASSNAME)) |
|
|
PEG_METHOD_ENTER(TRC_CONTROLPROVIDER, | PEG_METHOD_ENTER(TRC_CONTROLPROVIDER, |
"InteropProvider::_verifyValidAssocClassInput"); | "InteropProvider::_verifyValidAssocClassInput"); |
if (className.equal(CIM_NAMESPACEINMANAGER_CLASSNAME)) | if (className.equal(CIM_NAMESPACEINMANAGER_CLASSNAME)) |
return CIM_NAMESPACEINMANAGER; |
return CIM_NAMESPACEINMANAGERASSOC; |
|
|
// Last entry, reverse test and return OK if CIM_CommMech.... | // Last entry, reverse test and return OK if CIM_CommMech.... |
if (!className.equal(CIM_COMMMECHANISMFORMANAGER_CLASSNAME)) | if (!className.equal(CIM_COMMMECHANISMFORMANAGER_CLASSNAME)) |
throw CIMNotSupportedException | throw CIMNotSupportedException |
(className.getString() + " not supported by Interop Provider"); | (className.getString() + " not supported by Interop Provider"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return CIM_COMMMECHANISMFORMANAGER; |
return CIM_COMMMECHANISMFORMANAGERASSOC; |
} | } |
| |
/* validate the authorization of the user name against the namespace. | /* validate the authorization of the user name against the namespace. |
|
|
//CreationClassName | //CreationClassName |
_setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_CREATIONCLASSNAME,PG_CIMXMLCOMMUNICATIONMECHANISM_CLASSNAME.getString()); | _setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_CREATIONCLASSNAME,PG_CIMXMLCOMMUNICATIONMECHANISM_CLASSNAME.getString()); |
| |
//Name, this CommunicationMechanism. |
//Name, this CommunicationMechanism. We need to make it unique. To do this |
_setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_NAME, PG_CIMXMLCOMMUNICATIONMECHANISM_CLASSNAME.getString()); |
// we simply append the commtype to the classname since we have max of two right |
|
// now. |
|
_setPropertyValue(instance, CIM_NAMESPACE_PROPERTY_NAME, (String("PEGASUSCOMM") + namespaceType)); |
| |
// CommunicationMechanism Property |
// CommunicationMechanism Property - Force to 2. |
_setPropertyValue(instance, OM_COMMUNICATIONMECHANISM, Uint16(2)); | _setPropertyValue(instance, OM_COMMUNICATIONMECHANISM, Uint16(2)); |
| |
//Functional Profiles Supported Property. | //Functional Profiles Supported Property. |
|
|
Array<Uint16> authentications; | Array<Uint16> authentications; |
Array<String> authenticationDescriptions; | Array<String> authenticationDescriptions; |
| |
|
// Note that we have fixed authentication here. |
authentications.append(3); authenticationDescriptions.append("Basic"); | authentications.append(3); authenticationDescriptions.append("Basic"); |
| |
_setPropertyValue(instance, OM_AUTHENTICATIONMECHANISMSSUPPORTED, authentications); | _setPropertyValue(instance, OM_AUTHENTICATIONMECHANISMSSUPPORTED, authentications); |
|
|
| |
_setPropertyValue(instance, OM_VERSION, CIMXMLProtocolVersion); | _setPropertyValue(instance, OM_VERSION, CIMXMLProtocolVersion); |
| |
_setPropertyValue(instance, "namespaceType", namespaceType); |
// Obsolete function _setPropertyValue(instance, "namespaceType", namespaceType); |
| |
_setPropertyValue(instance, "IPAddress", IPAddress); | _setPropertyValue(instance, "IPAddress", IPAddress); |
| |
|
|
return; | return; |
} | } |
| |
|
if (classEnum == CIM_NAMESPACEINMANAGER) |
|
{ |
|
handler.complete(); |
|
PEG_METHOD_EXIT(); |
|
return; |
|
} |
|
|
// Get List of namespaces | // Get List of namespaces |
Array<CIMNamespaceName> namespaceNames; | Array<CIMNamespaceName> namespaceNames; |
namespaceNames = _enumerateNameSpaces(); | namespaceNames = _enumerateNameSpaces(); |
|
|
} | } |
| |
| |
|
if (classEnum == CIM_NAMESPACEINMANAGER) |
|
{ |
|
handler.complete(); |
|
PEG_METHOD_EXIT(); |
|
return; |
|
} |
|
|
if (classEnum == PG_NAMESPACE) | if (classEnum == PG_NAMESPACE) |
{ | { |
Array<CIMInstance> instances = _getInstancesCIMNamespace(includeQualifiers, | Array<CIMInstance> instances = _getInstancesCIMNamespace(includeQualifiers, |
|
|
return; | return; |
} | } |
| |
|
if (classEnum == CIM_NAMESPACEINMANAGER) |
|
{ |
|
handler.complete(); |
|
PEG_METHOD_EXIT(); |
|
return; |
|
} |
|
|
if (classEnum == PG_NAMESPACE) | if (classEnum == PG_NAMESPACE) |
{ | { |
Array<CIMInstance> instances = _getInstancesCIMNamespace(false, | Array<CIMInstance> instances = _getInstancesCIMNamespace(false, |
|
|
| |
Array<CIMInstance> assocInstances; | Array<CIMInstance> assocInstances; |
| |
if (classEnum == CIM_COMMMECHANISMFORMANAGER) |
if (classEnum == CIM_COMMMECHANISMFORMANAGERASSOC) |
assocInstances = _buildInstancesCommMechanismForManager(); | assocInstances = _buildInstancesCommMechanismForManager(); |
| |
if (classEnum == CIM_NAMESPACEINMANAGER) |
if (classEnum == CIM_NAMESPACEINMANAGERASSOC) |
assocInstances = _buildInstancesNamespaceInManager(); | assocInstances = _buildInstancesNamespaceInManager(); |
| |
_filterAssocInstances(assocInstances, resultClass, role); | _filterAssocInstances(assocInstances, resultClass, role); |