version 1.2, 2006/11/29 22:09:30
|
version 1.3, 2007/04/05 18:46:41
|
|
|
"OtherCommunicationMechanismDescription"; | "OtherCommunicationMechanismDescription"; |
static const String PROP_INTEROPSCHEMANAMESPACE = "InteropSchemaNamespace"; | static const String PROP_INTEROPSCHEMANAMESPACE = "InteropSchemaNamespace"; |
static const String PROP_VERSION = "Version"; | static const String PROP_VERSION = "Version"; |
static const String PROP_FUNCTIONALPROFILESSUPPORTED = "FunctionalProfilesSupported"; |
static const String PROP_FUNCTIONALPROFILESSUPPORTED = |
|
"FunctionalProfilesSupported"; |
static const String PROP_FUNCTIONALPROFILEDESCRIPTIONS = | static const String PROP_FUNCTIONALPROFILEDESCRIPTIONS = |
"FunctionalProfileDescriptions"; | "FunctionalProfileDescriptions"; |
static const String PROP_MULTIPLEOPERATIONSSUPPORTED = "MultipleOperationsSupported"; |
static const String PROP_MULTIPLEOPERATIONSSUPPORTED = |
|
"MultipleOperationsSupported"; |
static const String PROP_AUTHENTICATIONMECHANISMSSUPPORTED = | static const String PROP_AUTHENTICATIONMECHANISMSSUPPORTED = |
"AuthenticationMechanismsSupported"; | "AuthenticationMechanismsSupported"; |
static const String PROP_AUTHENTICATIONMECHANISMDESCRIPTIONS = | static const String PROP_AUTHENTICATIONMECHANISMDESCRIPTIONS = |
|
|
static const String PROP_IPADDRESS = "IPAddress"; | static const String PROP_IPADDRESS = "IPAddress"; |
| |
static const String CIM_CLASSNAME_REGISTEREDPROFILE = "CIM_RegisteredProfile"; | static const String CIM_CLASSNAME_REGISTEREDPROFILE = "CIM_RegisteredProfile"; |
static const String PROP_OTHERREGISTEREDORGANIZATION = "OtherRegisteredOrganization"; |
static const String PROP_OTHERREGISTEREDORGANIZATION = |
|
"OtherRegisteredOrganization"; |
static const String PROP_REGISTEREDNAME = "RegisteredName"; | static const String PROP_REGISTEREDNAME = "RegisteredName"; |
static const String PROP_ADVERTISETYPES = "AdvertiseTypes"; | static const String PROP_ADVERTISETYPES = "AdvertiseTypes"; |
| |
|
|
Boolean deepInheritance=true; | Boolean deepInheritance=true; |
Uint32 len = 0; | Uint32 len = 0; |
| |
// set to true if there is "Other" property value in FunctionsProfilesSupported value. |
// set to true if there is "Other" property value in |
|
// FunctionsProfilesSupported value. |
Boolean functionaProfileDescriptions = false; | Boolean functionaProfileDescriptions = false; |
| |
instances = client.enumerateInstances |
instances = client.enumerateInstances ( |
(PEGASUS_NAMESPACENAME_INTEROP, PEGASUS_CLASSNAME_OBJECTMANAGER, |
PEGASUS_NAMESPACENAME_INTEROP, |
deepInheritance,localOnly,includeQualifiers,includeClassOrigin); |
PEGASUS_CLASSNAME_OBJECTMANAGER, |
|
deepInheritance, |
|
localOnly, |
|
includeQualifiers, |
|
includeClassOrigin); |
| |
PEGASUS_ASSERT (instances.size () == 1); | PEGASUS_ASSERT (instances.size () == 1); |
| |
|
|
val = instances[0].getProperty(pos).getValue (); | val = instances[0].getProperty(pos).getValue (); |
serviceId = val.toString(); | serviceId = val.toString(); |
| |
instances = client.enumerateInstances |
instances = client.enumerateInstances ( |
(PEGASUS_NAMESPACENAME_INTEROP, PEGASUS_CLASSNAME_PG_CIMXMLCOMMUNICATIONMECHANISM, |
PEGASUS_NAMESPACENAME_INTEROP, |
deepInheritance,localOnly,includeQualifiers,includeClassOrigin); |
PEGASUS_CLASSNAME_PG_CIMXMLCOMMUNICATIONMECHANISM, |
|
deepInheritance, |
|
localOnly, |
|
includeQualifiers, |
|
includeClassOrigin); |
| |
for (Uint32 n=instances.size(),i=0 ; i<n; i++) | for (Uint32 n=instances.size(),i=0 ; i<n; i++) |
{ | { |
|
|
return false; | return false; |
} | } |
| |
cimClass = client.getClass(PEGASUS_NAMESPACENAME_INTEROP, PEGASUS_CLASSNAME_CIMNAMESPACE); |
cimClass = client.getClass(PEGASUS_NAMESPACENAME_INTEROP, |
|
PEGASUS_CLASSNAME_CIMNAMESPACE); |
instances = client.enumerateInstances | instances = client.enumerateInstances |
(PEGASUS_NAMESPACENAME_INTEROP, PEGASUS_CLASSNAME_CIMNAMESPACE,deepInheritance, |
(PEGASUS_NAMESPACENAME_INTEROP, PEGASUS_CLASSNAME_CIMNAMESPACE, |
localOnly,includeQualifiers,includeClassOrigin); |
deepInheritance, localOnly,includeQualifiers,includeClassOrigin); |
| |
for (Uint32 n=instances.size(),i=0 ; i<n; i++) | for (Uint32 n=instances.size(),i=0 ; i<n; i++) |
{ | { |
|
|
if (len > 0) | if (len > 0) |
classes.remove( len-1,1); | classes.remove( len-1,1); |
| |
cimClass = client.getClass |
cimClass = client.getClass (PEGASUS_NAMESPACENAME_INTEROP, |
(PEGASUS_NAMESPACENAME_INTEROP, |
|
PEGASUS_CLASSNAME_OBJECTMANAGERCOMMUNICATIONMECHANISM); | PEGASUS_CLASSNAME_OBJECTMANAGERCOMMUNICATIONMECHANISM); |
instances = client.enumerateInstances |
instances = client.enumerateInstances (PEGASUS_NAMESPACENAME_INTEROP, |
(PEGASUS_NAMESPACENAME_INTEROP, PEGASUS_CLASSNAME_OBJECTMANAGERCOMMUNICATIONMECHANISM, |
PEGASUS_CLASSNAME_OBJECTMANAGERCOMMUNICATIONMECHANISM, |
deepInheritance,localOnly,includeQualifiers,includeClassOrigin); | deepInheritance,localOnly,includeQualifiers,includeClassOrigin); |
| |
pos = saveInstance.findProperty (PROP_COMMUNICATIONMECHANISM); | pos = saveInstance.findProperty (PROP_COMMUNICATIONMECHANISM); |
|
|
val = saveInstance.getProperty(pos).getValue(); | val = saveInstance.getProperty(pos).getValue(); |
pos = cimClass.findProperty(PROP_COMMUNICATIONMECHANISM); | pos = cimClass.findProperty(PROP_COMMUNICATIONMECHANISM); |
communicationMechanism = getMappedValue(cimClass.getProperty(pos),val); | communicationMechanism = getMappedValue(cimClass.getProperty(pos),val); |
pos = saveInstance.findProperty (PROP_OTHERCOMMUNICATIONMECHANISMDESCRIPTION); |
pos = saveInstance.findProperty ( |
|
PROP_OTHERCOMMUNICATIONMECHANISMDESCRIPTION); |
PEGASUS_ASSERT (pos != PEG_NOT_FOUND); | PEGASUS_ASSERT (pos != PEG_NOT_FOUND); |
|
|
val = saveInstance.getProperty(pos).getValue (); | val = saveInstance.getProperty(pos).getValue (); |
otherCommunicationMechanismDescription = val.toString(); | otherCommunicationMechanismDescription = val.toString(); |
| |
|
|
| |
pos = saveInstance.findProperty (PROP_FUNCTIONALPROFILESSUPPORTED); | pos = saveInstance.findProperty (PROP_FUNCTIONALPROFILESSUPPORTED); |
PEGASUS_ASSERT (pos != PEG_NOT_FOUND); | PEGASUS_ASSERT (pos != PEG_NOT_FOUND); |
|
|
CIMConstProperty constProperty; | CIMConstProperty constProperty; |
constProperty = saveInstance.getProperty(pos); | constProperty = saveInstance.getProperty(pos); |
val = constProperty.getValue(); | val = constProperty.getValue(); |
|
|
String profileValue = getMappedValue(cimClass.getProperty(pos), | String profileValue = getMappedValue(cimClass.getProperty(pos), |
CIMValue(arrayValFPS[i])); | CIMValue(arrayValFPS[i])); |
if (profileValue == "Other") | if (profileValue == "Other") |
|
{ |
functionaProfileDescriptions = true; | functionaProfileDescriptions = true; |
|
} |
functionalProfilesSupported.append(profileValue); | functionalProfilesSupported.append(profileValue); |
functionalProfilesSupported.append(","); | functionalProfilesSupported.append(","); |
} | } |
|
|
else | else |
multipleOperationsSupported.append("FALSE"); | multipleOperationsSupported.append("FALSE"); |
| |
pos = saveInstance.findProperty (PROP_AUTHENTICATIONMECHANISMSSUPPORTED); |
pos = saveInstance.findProperty ( |
|
PROP_AUTHENTICATIONMECHANISMSSUPPORTED); |
PEGASUS_ASSERT (pos != PEG_NOT_FOUND); | PEGASUS_ASSERT (pos != PEG_NOT_FOUND); |
val = saveInstance.getProperty(pos).getValue(); | val = saveInstance.getProperty(pos).getValue(); |
Array<Uint16> arrayValAMS; | Array<Uint16> arrayValAMS; |
|
|
pos = cimClass.findProperty (PROP_AUTHENTICATIONMECHANISMSSUPPORTED); | pos = cimClass.findProperty (PROP_AUTHENTICATIONMECHANISMSSUPPORTED); |
for (Uint32 n=arrayValAMS.size(),i=0; i<n; i++) | for (Uint32 n=arrayValAMS.size(),i=0; i<n; i++) |
{ | { |
authenticationMechanismsSupported.append(getMappedValue(cimClass.getProperty(pos), |
authenticationMechanismsSupported.append( |
|
getMappedValue(cimClass.getProperty(pos), |
CIMValue(arrayValAMS[i]))); | CIMValue(arrayValAMS[i]))); |
authenticationMechanismsSupported.append(","); | authenticationMechanismsSupported.append(","); |
} | } |
|
|
if (len > 0) | if (len > 0) |
authenticationMechanismsSupported.remove( len-1,1); | authenticationMechanismsSupported.remove( len-1,1); |
| |
pos = saveInstance.findProperty (PROP_AUTHENTICATIONMECHANISMDESCRIPTIONS); |
pos = saveInstance.findProperty ( |
|
PROP_AUTHENTICATIONMECHANISMDESCRIPTIONS); |
PEGASUS_ASSERT (pos != PEG_NOT_FOUND); | PEGASUS_ASSERT (pos != PEG_NOT_FOUND); |
val = saveInstance.getProperty(pos).getValue(); | val = saveInstance.getProperty(pos).getValue(); |
Array<String> arrayValAMD; | Array<String> arrayValAMD; |
|
|
len = authenticationMechanismDescriptions.size(); | len = authenticationMechanismDescriptions.size(); |
if (len > 0) | if (len > 0) |
authenticationMechanismDescriptions.remove( len-1,1); | authenticationMechanismDescriptions.remove( len-1,1); |
instances = client.enumerateInstances |
instances = client.enumerateInstances (PEGASUS_NAMESPACENAME_INTEROP, |
(PEGASUS_NAMESPACENAME_INTEROP, CIM_CLASSNAME_REGISTEREDPROFILE, |
CIM_CLASSNAME_REGISTEREDPROFILE, |
deepInheritance,localOnly,includeQualifiers,includeClassOrigin); | deepInheritance,localOnly,includeQualifiers,includeClassOrigin); |
| |
for (Uint32 n=instances.size(),i=0 ; i<n; i++) | for (Uint32 n=instances.size(),i=0 ; i<n; i++) |
|
|
{ | { |
if(advTypes[j] == 3) | if(advTypes[j] == 3) |
{ | { |
pos = instances[i].findProperty (PROP_OTHERREGISTEREDORGANIZATION); |
pos = instances[i].findProperty ( |
|
PROP_OTHERREGISTEREDORGANIZATION); |
PEGASUS_ASSERT (pos != PEG_NOT_FOUND); | PEGASUS_ASSERT (pos != PEG_NOT_FOUND); |
registeredProfiles.append(instances[i].getProperty(pos).getValue().toString()); |
registeredProfiles.append( |
|
instances[i].getProperty(pos).getValue().toString()); |
registeredProfiles.append(":"); | registeredProfiles.append(":"); |
pos = instances[i].findProperty (PROP_REGISTEREDNAME); | pos = instances[i].findProperty (PROP_REGISTEREDNAME); |
PEGASUS_ASSERT (pos != PEG_NOT_FOUND); | PEGASUS_ASSERT (pos != PEG_NOT_FOUND); |
registeredProfiles.append(instances[i].getProperty(pos).getValue().toString()); |
registeredProfiles.append( |
|
instances[i].getProperty(pos).getValue().toString()); |
registeredProfiles.append(","); | registeredProfiles.append(","); |
break; | break; |
} | } |
|
|
{ | { |
Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING, | Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING, |
"Server.CIMServer.EXTERNAL_SLP_REGISTRATION_FAILED_EXCEPTION", | "Server.CIMServer.EXTERNAL_SLP_REGISTRATION_FAILED_EXCEPTION", |
"exception raised during CIMServer registration with External SLP. $0", |
"exception raised during CIMServer registration with" |
|
" External SLP. $0", |
e.getMessage()); | e.getMessage()); |
} | } |
| |
|
|
{ | { |
Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING, | Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING, |
"Server.CIMServer.EXTERNAL_SLP_REGISTRATION_FAILED_EXCEPTION", | "Server.CIMServer.EXTERNAL_SLP_REGISTRATION_FAILED_EXCEPTION", |
"Exception raised during CIMserver registration with External SLP."); |
"Exception raised during CIMserver registration with" |
|
" External SLP."); |
} | } |
| |
client.disconnect(); | client.disconnect(); |
|
|
Uint16 localValue; | Uint16 localValue; |
| |
if (strcmp(cimTypeToString(value.getType()),"string") == 0) | if (strcmp(cimTypeToString(value.getType()),"string") == 0) |
|
{ |
value.get(retValue); | value.get(retValue); |
|
} |
else | else |
{ | { |
value.get(localValue); | value.get(localValue); |
|
|
| |
Uint32 posValueMap; | Uint32 posValueMap; |
| |
if ((posValueMap = cimProperty.findQualifier(CIMName("ValueMap"))) == PEG_NOT_FOUND) |
if ((posValueMap = cimProperty.findQualifier(CIMName("ValueMap"))) |
|
== PEG_NOT_FOUND) |
{ | { |
return retValue; | return retValue; |
} | } |
|
|
// Form the attributes String. | // Form the attributes String. |
void SLPAttrib::formAttributes() | void SLPAttrib::formAttributes() |
{ | { |
|
|
attributes.append(Formatter::format( | attributes.append(Formatter::format( |
"(template-url-syntax=$0),(service-hi-name=$1)," | "(template-url-syntax=$0),(service-hi-name=$1)," |
"(service-hi-description=$2),(service-id=$3)," | "(service-hi-description=$2),(service-id=$3)," |