version 1.33, 2005/05/09 11:17:03
|
version 1.36, 2005/05/24 10:42:51
|
|
|
// Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#3194 | // Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#3194 |
// David Dillard, VERITAS Software Corp. | // David Dillard, VERITAS Software Corp. |
// (david.dillard@veritas.com) | // (david.dillard@veritas.com) |
|
// Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3659 |
// | // |
//%//////////////////////////////////////////////////////////////////////////// | //%//////////////////////////////////////////////////////////////////////////// |
| |
|
|
#define CDEBUG(X) | #define CDEBUG(X) |
#define LDEBUG() | #define LDEBUG() |
//#define CDEBUG(X) PEGASUS_STD(cout) << "InteropProvider " << X << PEGASUS_STD(endl) | //#define CDEBUG(X) PEGASUS_STD(cout) << "InteropProvider " << X << PEGASUS_STD(endl) |
//#define LDEBUG(X) Logger::put (Logger::DEBUG_LOG, "InteropProvider", Logger::INFORMATION, "$0", X) |
//#define LDEBUG(X) Logger::put (Logger::DEBUG_LOG, "InteropProvider", Logger::TRACE, "$0", X) |
| |
//************************************************************************** | //************************************************************************** |
// | // |
|
|
CIM_COMMMECHANISMFORMANAGERASSOC=2 | CIM_COMMMECHANISMFORMANAGERASSOC=2 |
}; | }; |
| |
|
|
|
//************************************************************* |
|
// Constructor |
|
//********************************************************** |
|
InteropProvider::InteropProvider(CIMRepository* repository) |
|
{ |
|
PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,"InteropProvider::InteropProvider"); |
|
_repository = repository; |
|
|
|
//*********************************************** |
|
// This is a tempory fix untill there is a method created for the InteropProvider to |
|
// do it's inaliaztion work. This fix sets StatisticalData::CopyGSD, enabling the |
|
//statistical gathering function. |
|
Array<CIMInstance> instance = repository->enumerateInstances(CIMNamespaceName("root/cimv2"), CIMName ("CIM_ObjectManager")); |
|
|
|
if(instance.size() > 0) |
|
{ |
|
Boolean output = false; |
|
Uint32 pos; |
|
if ((pos = instance[0].findProperty(CIMName("GatherStatisticalData"))) != PEG_NOT_FOUND) |
|
{ |
|
CIMConstProperty p1 = instance[0].getProperty(pos); |
|
if (p1.getType() == CIMTYPE_BOOLEAN) |
|
{ |
|
CIMValue v1 = p1.getValue(); |
|
if (!v1.isNull()) |
|
{ |
|
v1.get(output); |
|
if (v1 == true) |
|
{ |
|
StatisticalData* sd = StatisticalData::current(); |
|
sd->setCopyGSD(true); |
|
} |
|
} |
|
} |
|
} |
|
} |
|
//******************************************* end of temporary fix |
|
PEG_METHOD_EXIT(); |
|
} |
|
|
|
|
|
|
//*************************************************************** | //*************************************************************** |
// Provider Utility Functions | // Provider Utility Functions |
//*************************************************************** | //*************************************************************** |
|
|
{ | { |
CIMInstance instance = _buildInstanceSkeleton(CIM_NAMESPACEINMANAGER_CLASSNAME); | CIMInstance instance = _buildInstanceSkeleton(CIM_NAMESPACEINMANAGER_CLASSNAME); |
| |
_setPropertyValue(instance, CIMName("Antecdent"), refObjMgr); |
_setPropertyValue(instance, CIMName("Antecedent"), refObjMgr); |
//ATTNATTN: this is weak qualifier. | //ATTNATTN: this is weak qualifier. |
_setPropertyValue(instance, CIMName("Dependent"), _buildReference(namespaceInstances[i], | _setPropertyValue(instance, CIMName("Dependent"), _buildReference(namespaceInstances[i], |
CIM_NAMESPACEINMANAGER_CLASSNAME)); | CIM_NAMESPACEINMANAGER_CLASSNAME)); |
|
|
| |
CIMInstance instance = _buildInstanceSkeleton(CIM_COMMMECHANISMFORMANAGER_CLASSNAME); | CIMInstance instance = _buildInstanceSkeleton(CIM_COMMMECHANISMFORMANAGER_CLASSNAME); |
| |
_setPropertyValue(instance,CIMName("Antecdent"), refObjMgr); |
_setPropertyValue(instance,CIMName("Antecedent"), refObjMgr); |
//ATTNATTN: this is weak qualifier. | //ATTNATTN: this is weak qualifier. |
_setPropertyValue(instance,CIMName("Dependent"), _buildReference(commInstances[i],CIM_COMMMECHANISMFORMANAGER_CLASSNAME)); | _setPropertyValue(instance,CIMName("Dependent"), _buildReference(commInstances[i],CIM_COMMMECHANISMFORMANAGER_CLASSNAME)); |
assocInstances.append(instance); | assocInstances.append(instance); |
|
|
PEG_TRACE_STRING(TRC_CONTROLPROVIDER, Tracer::LEVEL4, | PEG_TRACE_STRING(TRC_CONTROLPROVIDER, Tracer::LEVEL4, |
"Namespace = " + newNamespaceName.getString() + | "Namespace = " + newNamespaceName.getString() + |
" successfully created."); | " successfully created."); |
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, |
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
"Create Namespace: Shareable = $0, Updates allows: $1, Parent: $2", | "Create Namespace: Shareable = $0, Updates allows: $1, Parent: $2", |
newNamespaceName.getString(), shareable? "true" : "false", shareable? "true" : "false", parent ); | newNamespaceName.getString(), shareable? "true" : "false", shareable? "true" : "false", parent ); |
| |
|
|
"Namespace = " + deleteNamespaceName.getString() + | "Namespace = " + deleteNamespaceName.getString() + |
" successfully deleted."); | " successfully deleted."); |
| |
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, |
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
"Interop Provider Delete Namespace: $0", | "Interop Provider Delete Namespace: $0", |
deleteNamespaceName.getString()); | deleteNamespaceName.getString()); |
} | } |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, |
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
"Interop Provider Set Statistics gathering in CIM_ObjectManager: $0", | "Interop Provider Set Statistics gathering in CIM_ObjectManager: $0", |
(statisticsFlag? "true" : "false")); | (statisticsFlag? "true" : "false")); |
StatisticalData* sd = StatisticalData::current(); | StatisticalData* sd = StatisticalData::current(); |