这篇教程C++ CIMObjectPath函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CIMObjectPath函数的典型用法代码示例。如果您正苦于以下问题:C++ CIMObjectPath函数的具体用法?C++ CIMObjectPath怎么用?C++ CIMObjectPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CIMObjectPath函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: switchBoolean operator==(const CIMKeyBinding& x, const CIMKeyBinding& y){ // Check that the names and types match if (!(x.getName().equal(y.getName())) || !(x.getType() == y.getType())) { return false; } switch (x.getType()) { case CIMKeyBinding::REFERENCE: try { // References should be compared as CIMObjectPaths return (CIMObjectPath(x.getValue()) == CIMObjectPath(y.getValue())); } catch (Exception&) { // If CIMObjectPath parsing fails, just compare strings return String::equal(x.getValue(), y.getValue()); } case CIMKeyBinding::BOOLEAN: // Case-insensitive comparison is sufficient for booleans return String::equalNoCase(x.getValue(), y.getValue()); case CIMKeyBinding::NUMERIC: // Note: This comparison assumes XML syntax for integers // First try comparing as unsigned integers { Uint64 xValue; Uint64 yValue; if (StringConversion::stringToUnsignedInteger( x.getValue().getCString(), xValue) && StringConversion::stringToUnsignedInteger( y.getValue().getCString(), yValue)) { return (xValue == yValue); } } // Next try comparing as signed integers { Sint64 xValue; Sint64 yValue; if (StringConversion::stringToSignedInteger( x.getValue().getCString(), xValue) && StringConversion::stringToSignedInteger( y.getValue().getCString(), yValue)) { return (xValue == yValue); } } // Note: Keys may not be real values, so don't try comparing as reals // We couldn't parse the numbers, so just compare the strings return String::equal(x.getValue(), y.getValue()); default: // CIMKeyBinding::STRING return String::equal(x.getValue(), y.getValue()); } PEGASUS_UNREACHABLE(return false;)}
开发者ID:brunolauze,项目名称:pegasus,代码行数:60,
示例2: test05//Test reference array type propertiesvoid test05(){ Array<CIMObjectPath> oa; oa.append(CIMObjectPath("/root/cimv2:My_Class.a=1")); oa.append(CIMObjectPath("/root/cimv2:My_Class.a=2")); CIMProperty p1; Boolean gotException = false; try { p1 = CIMProperty(CIMName("property1"), oa, 0, CIMName("refclass")); } catch (TypeMismatchException&) { gotException = true; } PEGASUS_TEST_ASSERT(gotException); p1 = CIMProperty(CIMName("property1"), oa[0], 0, CIMName("refclass")); gotException = false; try { p1.setValue(oa); } catch (TypeMismatchException&) { gotException = true; } PEGASUS_TEST_ASSERT(gotException);}
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:31,
示例3: instance1void InstanceProvider::initialize(CIMOMHandle & cimom){ // create default instances CIMInstance instance1("Sample_InstanceProviderClass"); instance1.setPath(CIMObjectPath("Sample_InstanceProviderClass.Identifier=1")); instance1.addProperty(CIMProperty("Identifier", Uint8(1))); // key instance1.addProperty(CIMProperty("Message", String("Hello World"))); _instances.append(instance1); CIMInstance instance2("Sample_InstanceProviderClass"); instance2.setPath(CIMObjectPath("Sample_InstanceProviderClass.Identifier=2")); instance2.addProperty(CIMProperty("Identifier", Uint8(2))); // key instance2.addProperty(CIMProperty("Message", String("Yo Planet"))); _instances.append(instance2); CIMInstance instance3("Sample_InstanceProviderClass"); instance3.setPath(CIMObjectPath("Sample_InstanceProviderClass.Identifier=3")); instance3.addProperty(CIMProperty("Identifier", Uint8(3))); // key instance3.addProperty(CIMProperty("Message", String("Hey Earth"))); _instances.append(instance3);}
开发者ID:brunolauze,项目名称:pegasus,代码行数:27,
示例4: _getInstanceint _getInstance(const int argc, const char **argv){ if (argv[0] == 0) { _giUsage(); return 1; } // need to get class definition to find keys // first arg is name of class CIMClass cldef; try { cldef = _c.getClass( _nameSpace, argv[0] ); } catch(Exception& e) { cerr << /* "getInstance: " << */ e.getMessage() << endl; return 1; } CIMObjectPath ref; CIMInstance inst; // If there are no more args, prompt user for keys if (argv[1] == 0) ref = CIMObjectPath(String::EMPTY, // hostname left blank _nameSpace, argv[0], _inputInstanceKeys(cldef)); // else if there's another arg and it's "list", enumInstNames and print // a list from which user will select (return if none) else if (String::equalNoCase("list",argv[1])) { ref = _selectInstance(argv[0]); // An empty ObjectPath means nothing was selected if (ref.identical(CIMObjectPath())) return 0; } // else there's another arg but it's invalid else { _giUsage(); return 1; } // get the specified instance try { inst = _c.getInstance(_nameSpace,ref); } catch(Exception& e) { cerr << /* "getInstance: " << */ e.getMessage() << endl; return 1; } _displayInstance(inst); return 0;}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:59,
示例5: _getPropertyint _getProperty(const int argc, const char **argv){ // need to get class definition to find keys // first arg is name of class CIMClass cldef; try { cldef = _c.getClass( PEGASUS_NAMESPACENAME_INTEROP, argv[0] ); } catch(Exception& e) { cerr << /* "getProperty: " << */ e.getMessage() << endl; return 1; } CIMObjectPath ref; CIMInstance inst; // If next arg is "ask", prompt user for keys if (String::equalNoCase("ask",argv[1])) ref = CIMObjectPath(String::EMPTY, PEGASUS_NAMESPACENAME_INTEROP, argv[0], _inputInstanceKeys(cldef) ); // else if the next arg and is "list", enumInstNames and print // a list from which user will select else if (String::equalNoCase("list",argv[1])) { ref = _selectInstance( argv[0] ); if (ref.identical(CIMObjectPath())) return 0; } // else there's another arg but it's invalid else { return 1; } CIMProperty pDef; // if no more args, display property names and ask which if (argc < 3) { int n; for (n=0; n<cldef.getPropertyCount(); n++) cerr << n+1 << ": " << cldef.getProperty(n).getName().getString() << endl; cerr << "Property (1.." << cldef.getPropertyCount() << ")? "; cin >> n; pDef = cldef.getProperty(n-1); }
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:50,
示例6: instCIMInstance UNIX_ClassifierElementInClassifierServiceProvider::constructInstance( const CIMName &className, const CIMNamespaceName &nameSpace, const UNIX_ClassifierElementInClassifierService &_p){ CIMProperty p; CIMInstance inst(className); // Set path inst.setPath(CIMObjectPath(String(""), // hostname nameSpace, CIMName("UNIX_ClassifierElementInClassifierService"), constructKeyBindings(_p))); //CIM_Component Properties if (_p.getGroupComponent(p)) inst.addProperty(p); if (_p.getPartComponent(p)) inst.addProperty(p); //CIM_ServiceComponent Properties //CIM_ClassifierElementInClassifierService Properties if (_p.getClassifierOrder(p)) inst.addProperty(p); return inst;}
开发者ID:brunolauze,项目名称:openpegasus-providers-old,代码行数:27,
示例7: instCIMInstance UNIX_BlockStatisticsManifestCollectionProvider::constructInstance( const CIMName &className, const CIMNamespaceName &nameSpace, const UNIX_BlockStatisticsManifestCollection &_p){ CIMProperty p; CIMInstance inst(className); // Set path inst.setPath(CIMObjectPath(String(""), // hostname nameSpace, CIMName("UNIX_BlockStatisticsManifestCollection"), constructKeyBindings(_p))); //CIM_ManagedElement Properties if (_p.getInstanceID(p)) inst.addProperty(p); if (_p.getCaption(p)) inst.addProperty(p); if (_p.getDescription(p)) inst.addProperty(p); if (_p.getElementName(p)) inst.addProperty(p); //CIM_Collection Properties //CIM_SystemSpecificCollection Properties //CIM_BlockStatisticsManifestCollection Properties if (_p.getIsDefault(p)) inst.addProperty(p); return inst;}
开发者ID:brunolauze,项目名称:openpegasus-providers-old,代码行数:31,
示例8: CIMObjectPathvoid LargeDataProvider::getInstance( const OperationContext & context, const CIMObjectPath & instanceReference, const Boolean includeQualifiers, const Boolean includeClassOrigin, const CIMPropertyList & propertyList, InstanceResponseHandler & handler){ cout << "------------------------------" << endl; cout << "LargeDataProvider::getInstance" << endl; cout << "------------------------------" << endl; // convert a potential fully qualified reference into a local reference // (class name and keys only). CIMObjectPath localReference = CIMObjectPath( String(), String(), instanceReference.getClassName(), instanceReference.getKeyBindings()); // begin processing the request handler.processing(); // instance index corresponds to reference index for(Uint32 i = 0, n = _instances.size(); i < n; i++) { if(localReference == _instanceNames[i]) { // deliver requested instance handler.deliver(_instances[i]); break; } } // complete processing the request handler.complete();}
开发者ID:brunolauze,项目名称:pegasus,代码行数:35,
示例9: instCIMInstance UNIX_AssociatedSupplyVoltageSensorProvider::constructInstance( const CIMName &className, const CIMNamespaceName &nameSpace, const UNIX_AssociatedSupplyVoltageSensor &_p){ CIMProperty p; CIMInstance inst(className); // Set path inst.setPath(CIMObjectPath(String(""), // hostname nameSpace, CIMName("UNIX_AssociatedSupplyVoltageSensor"), constructKeyBindings(_p))); //CIM_Dependency Properties if (_p.getAntecedent(p)) inst.addProperty(p); if (_p.getDependent(p)) inst.addProperty(p); //CIM_AssociatedSensor Properties //CIM_AssociatedSupplyVoltageSensor Properties if (_p.getMonitoringRange(p)) inst.addProperty(p); return inst;}
开发者ID:brunolauze,项目名称:openpegasus-providers-old,代码行数:27,
示例10: instCIMInstance UNIX_AccountSettingDataProvider::constructInstance( const CIMName &className, const CIMNamespaceName &nameSpace, const UNIX_AccountSettingData &_p){ CIMProperty p; CIMInstance inst(className); // Set path inst.setPath(CIMObjectPath(String(""), // hostname nameSpace, CIMName("UNIX_AccountSettingData"), constructKeyBindings(_p))); //CIM_ManagedElement Properties if (_p.getInstanceID(p)) inst.addProperty(p); if (_p.getCaption(p)) inst.addProperty(p); if (_p.getDescription(p)) inst.addProperty(p); if (_p.getElementName(p)) inst.addProperty(p); //CIM_SettingData Properties if (_p.getChangeableType(p)) inst.addProperty(p); if (_p.getConfigurationName(p)) inst.addProperty(p); //CIM_AccountSettingData Properties if (_p.getComplexPasswordRulesEnforced(p)) inst.addProperty(p); if (_p.getInactivityTimeout(p)) inst.addProperty(p); if (_p.getMaximumPasswordExpiration(p)) inst.addProperty(p); if (_p.getMaximumSuccessiveLoginFailures(p)) inst.addProperty(p); if (_p.getPasswordHistoryDepth(p)) inst.addProperty(p); return inst;}
开发者ID:brunolauze,项目名称:openpegasus-providers-old,代码行数:35,
示例11: instCIMInstance UNIX_CalculationBasedOnQueueProvider::constructInstance( const CIMName &className, const CIMNamespaceName &nameSpace, const UNIX_CalculationBasedOnQueue &_p){ CIMProperty p; CIMInstance inst(className); // Set path inst.setPath(CIMObjectPath(String(""), // hostname nameSpace, CIMName("UNIX_CalculationBasedOnQueue"), constructKeyBindings(_p))); //CIM_Dependency Properties if (_p.getAntecedent(p)) inst.addProperty(p); if (_p.getDependent(p)) inst.addProperty(p); //CIM_ProvidesServiceToElement Properties //CIM_ServiceServiceDependency Properties if (_p.getTypeOfDependency(p)) inst.addProperty(p); if (_p.getRestartService(p)) inst.addProperty(p); //CIM_CalculationBasedOnQueue Properties return inst;}
开发者ID:brunolauze,项目名称:openpegasus-providers-old,代码行数:30,
示例12: instCIMInstance UNIX_BGPPeerUsesRouteMapProvider::constructInstance( const CIMName &className, const CIMNamespaceName &nameSpace, const UNIX_BGPPeerUsesRouteMap &_p){ CIMProperty p; CIMInstance inst(className); // Set path inst.setPath(CIMObjectPath(String(""), // hostname nameSpace, CIMName("UNIX_BGPPeerUsesRouteMap"), constructKeyBindings(_p))); //CIM_MemberOfCollection Properties if (_p.getCollection(p)) inst.addProperty(p); if (_p.getMember(p)) inst.addProperty(p); //CIM_CollectedMSEs Properties //CIM_BGPPeerUsesRouteMap Properties if (_p.getMapSequence(p)) inst.addProperty(p); return inst;}
开发者ID:brunolauze,项目名称:openpegasus-providers-old,代码行数:27,
示例13: CIMObjectPathvoid InstanceProvider::deleteInstance( const OperationContext & context, const CIMObjectPath & instanceReference, ResponseHandler & handler){ // convert a potential fully qualified reference into a local reference // (class name and keys only). CIMObjectPath localReference = CIMObjectPath( String(), CIMNamespaceName(), instanceReference.getClassName(), instanceReference.getKeyBindings()); // begin processing the request handler.processing(); // instance index corresponds to reference index for(Uint32 i = 0, n = _instances.size(); i < n; i++) { if(localReference == _instances[i].getPath()) { // remove instance from the array _instances.remove(i); break; } } // complete processing the request handler.complete();}
开发者ID:brunolauze,项目名称:pegasus,代码行数:31,
示例14: instCIMInstance UNIX_BootConfigSettingProvider::constructInstance( const CIMName &className, const CIMNamespaceName &nameSpace, const UNIX_BootConfigSetting &_p){ CIMProperty p; CIMInstance inst(className); // Set path inst.setPath(CIMObjectPath(String(""), // hostname nameSpace, CIMName("UNIX_BootConfigSetting"), constructKeyBindings(_p))); //CIM_ManagedElement Properties if (_p.getInstanceID(p)) inst.addProperty(p); if (_p.getCaption(p)) inst.addProperty(p); if (_p.getDescription(p)) inst.addProperty(p); if (_p.getElementName(p)) inst.addProperty(p); //CIM_SettingData Properties if (_p.getChangeableType(p)) inst.addProperty(p); if (_p.getConfigurationName(p)) inst.addProperty(p); //CIM_BootConfigSetting Properties return inst;}
开发者ID:brunolauze,项目名称:openpegasus-providers-old,代码行数:30,
示例15: testInstanceCollectionvoid testInstanceCollection(){ Buffer expected; FileSystem::loadFileToMemory(expected, "./instanceCollection.json"); if (verbose) cout << "Expected: " << expected.getData() << endl; Buffer outputBuffer; JSONWriter writer(outputBuffer); CIMName className = "className"; Array<CIMObject> instances; for (Uint32 i = 0; i < 10; i++) { CIMInstance x(className); x.addProperty(CIMProperty(CIMName("boolProp"), CIMValue(true))); x.addProperty(CIMProperty(CIMName("intProp"), CIMValue(i))); x.addProperty(CIMProperty( CIMName("stringProp"), CIMValue(String("hello world")))); Buffer objPath; objPath << className.getString() << ".intProp=" << i; x.setPath(CIMObjectPath(objPath.getData())); instances.append(x); } writer._append(instances); if (verbose) cout << "Got: " << outputBuffer.getData() << endl; PEGASUS_TEST_ASSERT( System::strcasecmp( expected.getData(), outputBuffer.getData()) == 0);}
开发者ID:deleisha,项目名称:neopegasus,代码行数:34,
示例16: CIMObjectPathvoid AuditLogger::logUpdateInstanceOperation( const char* cimMethodName, AuditEvent eventType, const String& userName, const String& ipAddr, const CIMNamespaceName& nameSpace, const CIMObjectPath& instanceName, const String& moduleName, const String& providerName, CIMStatusCode statusCode){ // check if SMF is gathering this type of records. if (_smf.isRecording(CIM_OPERATION) || (! _isInternalWriterUsed) ) { String cimInstanceName = CIMObjectPath("", CIMNamespaceName(), instanceName.getClassName(), instanceName.getKeyBindings()).toString(); _writeCIMOperationRecord( INSTANCE_OPERATION, userName, statusCode, ipAddr, cimMethodName, cimInstanceName, nameSpace.getString(), providerName, moduleName ); }}
开发者ID:brunolauze,项目名称:pegasus,代码行数:25,
示例17: instCIMInstance UNIX_BIOSServiceCapabilitiesProvider::constructInstance( const CIMName &className, const CIMNamespaceName &nameSpace, const UNIX_BIOSServiceCapabilities &_p){ CIMProperty p; CIMInstance inst(className); // Set path inst.setPath(CIMObjectPath(String(""), // hostname nameSpace, CIMName("UNIX_BIOSServiceCapabilities"), constructKeyBindings(_p))); //CIM_ManagedElement Properties if (_p.getInstanceID(p)) inst.addProperty(p); if (_p.getCaption(p)) inst.addProperty(p); if (_p.getDescription(p)) inst.addProperty(p); if (_p.getElementName(p)) inst.addProperty(p); //CIM_Capabilities Properties //CIM_BIOSServiceCapabilities Properties if (_p.getMethodsSupported(p)) inst.addProperty(p); if (_p.getSupportedPasswordAlgorithms(p)) inst.addProperty(p); if (_p.getSupportedPasswordEncodings(p)) inst.addProperty(p); return inst;}
开发者ID:brunolauze,项目名称:openpegasus-providers-old,代码行数:31,
示例18: CIMObjectPathvoid CIMServer::auditLogInitializeCallback(){#ifdef PEGASUS_ENABLE_AUDIT_LOGGER Array<String> propertyNames; Array<String> propertyValues; // Get all current property names and values ConfigManager* configManager = ConfigManager::getInstance(); configManager->getAllPropertyNames(propertyNames, false); for (Uint32 i = 0; i < propertyNames.size(); i++) { propertyValues.append(configManager->getCurrentValue(propertyNames[i])); } AuditLogger::logCurrentConfig(propertyNames, propertyValues); // get currently registered provider module instances Array<CIMInstance> moduleInstances; moduleInstances = _cimserver->_providerRegistrationManager->enumerateInstancesForClass( CIMObjectPath("PG_ProviderModule")); AuditLogger::logCurrentRegProvider(moduleInstances); AuditLogger::logCurrentEnvironmentVar();#endif}
开发者ID:govindraopanduru,项目名称:neopegasus,代码行数:32,
示例19: instCIMInstance UNIX_IPRouteProvider::_constructInstance( const CIMName &className, const CIMNamespaceName &nameSpace, const UNIX_IPRoute &_p){ CIMProperty p; CIMInstance inst(className); // Set path inst.setPath(CIMObjectPath(String(""), // hostname nameSpace, CLASS_IMPLEMENTATION_CIM_NAME, _constructKeyBindings(_p))); addManagedSystemElementProperties(inst, _p); if (_p.getAddressType(p)) inst.addProperty(p); if (_p.getServiceCreationClassName(p)) inst.addProperty(p); if (_p.getServiceName(p)) inst.addProperty(p); if (_p.getDestinationAddress(p)) inst.addProperty(p); if (_p.getDestinationMask(p)) inst.addProperty(p); if (_p.getIPDestinationAddress(p)) inst.addProperty(p); if (_p.getIPDestinationMask(p)) inst.addProperty(p); if (_p.getIsStatic(p)) inst.addProperty(p); return inst;}
开发者ID:brunolauze,项目名称:pegasus,代码行数:27,
示例20: instCIMInstance UNIX_AggregateRedundancyComponentProvider::constructInstance( const CIMName &className, const CIMNamespaceName &nameSpace, const UNIX_AggregateRedundancyComponent &_p){ CIMProperty p; CIMInstance inst(className); // Set path inst.setPath(CIMObjectPath(String(""), // hostname nameSpace, CIMName("UNIX_AggregateRedundancyComponent"), constructKeyBindings(_p))); //CIM_Component Properties if (_p.getGroupComponent(p)) inst.addProperty(p); if (_p.getPartComponent(p)) inst.addProperty(p); //CIM_RedundancyComponent Properties //CIM_ExtentRedundancyComponent Properties //CIM_AggregateRedundancyComponent Properties return inst;}
开发者ID:brunolauze,项目名称:openpegasus-providers-old,代码行数:28,
示例21: _checkClassvoid ComputerSystemProvider::enumerateInstanceNames( const OperationContext& context, const CIMObjectPath &ref, ObjectPathResponseHandler& handler){ CIMName className = ref.getClassName(); _checkClass(className); handler.processing(); // Deliver instance only if request was for leaf class if (className.equal(CLASS_EXTENDED_COMPUTER_SYSTEM)) { Array<CIMKeyBinding> keys; keys.append(CIMKeyBinding( PROPERTY_CREATION_CLASS_NAME, CLASS_EXTENDED_COMPUTER_SYSTEM, CIMKeyBinding::STRING)); keys.append(CIMKeyBinding( PROPERTY_NAME, _cs.getHostName(), CIMKeyBinding::STRING)); handler.deliver(CIMObjectPath( _cs.getHostName(), ref.getNameSpace(), CLASS_EXTENDED_COMPUTER_SYSTEM, keys)); } handler.complete(); return;}
开发者ID:deleisha,项目名称:neopegasus,代码行数:34,
示例22: memsetvoid TestFaultyInstanceProvider::initialize(CIMOMHandle& cimom){ // save cimom handle //_cimom = cimom; char namebuf[20]; char pathbuf[45]; memset(namebuf, 0x00, sizeof(namebuf)); memset(pathbuf, 0x00, sizeof(pathbuf)); // create default instances for (Uint32 i = 1; i <= 2; i++) { sprintf(namebuf, "%u", i); sprintf(pathbuf, "TST_FaultyInstanceInstance.Name=/"%u/"", i); { CIMInstance instance("TST_FaultyInstanceInstance"); instance.addProperty(CIMProperty("name", String(namebuf))); instance.addProperty(CIMProperty("s", String("specified"))); instance.addProperty(CIMProperty("n", Uint64(i))); instance.addProperty(CIMProperty("f", Real64(Real64(i)+0.001))); instance.addProperty( CIMProperty("d", CIMDateTime::getCurrentDateTime())); instance.setPath(CIMObjectPath(pathbuf)); _instances.append(instance); } }}
开发者ID:brunolauze,项目名称:pegasus,代码行数:31,
示例23: instCIMInstance UNIX_AuthorizationServiceProvider::constructInstance( const CIMName &className, const CIMNamespaceName &nameSpace, const UNIX_AuthorizationService &_p){ CIMProperty p; CIMInstance inst(className); // Set path inst.setPath(CIMObjectPath(String(""), // hostname nameSpace, CIMName("UNIX_AuthorizationService"), constructKeyBindings(_p))); //CIM_ManagedElement Properties if (_p.getInstanceID(p)) inst.addProperty(p); if (_p.getCaption(p)) inst.addProperty(p); if (_p.getDescription(p)) inst.addProperty(p); if (_p.getElementName(p)) inst.addProperty(p); //CIM_ManagedSystemElement Properties if (_p.getInstallDate(p)) inst.addProperty(p); if (_p.getName(p)) inst.addProperty(p); if (_p.getOperationalStatus(p)) inst.addProperty(p); if (_p.getStatusDescriptions(p)) inst.addProperty(p); if (_p.getStatus(p)) inst.addProperty(p); if (_p.getHealthState(p)) inst.addProperty(p); if (_p.getCommunicationStatus(p)) inst.addProperty(p); if (_p.getDetailedStatus(p)) inst.addProperty(p); if (_p.getOperatingStatus(p)) inst.addProperty(p); if (_p.getPrimaryStatus(p)) inst.addProperty(p); //CIM_LogicalElement Properties //CIM_EnabledLogicalElement Properties if (_p.getEnabledState(p)) inst.addProperty(p); if (_p.getOtherEnabledState(p)) inst.addProperty(p); if (_p.getRequestedState(p)) inst.addProperty(p); if (_p.getEnabledDefault(p)) inst.addProperty(p); if (_p.getTimeOfLastStateChange(p)) inst.addProperty(p); if (_p.getAvailableRequestedStates(p)) inst.addProperty(p); if (_p.getTransitioningToState(p)) inst.addProperty(p); //CIM_Service Properties if (_p.getSystemCreationClassName(p)) inst.addProperty(p); if (_p.getSystemName(p)) inst.addProperty(p); if (_p.getCreationClassName(p)) inst.addProperty(p); if (_p.getPrimaryOwnerName(p)) inst.addProperty(p); if (_p.getPrimaryOwnerContact(p)) inst.addProperty(p); if (_p.getStartMode(p)) inst.addProperty(p); if (_p.getStarted(p)) inst.addProperty(p); //CIM_SecurityService Properties //CIM_AuthorizationService Properties return inst;}
开发者ID:brunolauze,项目名称:openpegasus-providers-old,代码行数:60,
示例24: instCIMInstance UNIX_ComputerSystemMappedIOProvider::constructInstance( const CIMName &className, const CIMNamespaceName &nameSpace, const UNIX_ComputerSystemMappedIO &_p){ CIMProperty p; CIMInstance inst(className); // Set path inst.setPath(CIMObjectPath(String(""), // hostname nameSpace, CIMName("UNIX_ComputerSystemMappedIO"), constructKeyBindings(_p))); //CIM_Component Properties if (_p.getGroupComponent(p)) inst.addProperty(p); if (_p.getPartComponent(p)) inst.addProperty(p); //CIM_SystemComponent Properties //CIM_ResourceOfSystem Properties //CIM_ComputerSystemResource Properties //CIM_ComputerSystemMappedIO Properties return inst;}
开发者ID:brunolauze,项目名称:openpegasus-providers-old,代码行数:30,
示例25: CIMObjectPathvoid TimingProvider::modifyInstance( const OperationContext & context, const CIMObjectPath & instanceReference, const CIMInstance & instanceObject, const Boolean includeQualifiers, const CIMPropertyList & propertyList, ResponseHandler & handler){ // convert a potential fully qualified reference into a local reference // (class name and keys only). CIMObjectPath localReference = CIMObjectPath( String(), String(), instanceReference.getClassName(), instanceReference.getKeyBindings()); cout <<"TimingProvider::modifyInstance" << endl; // begin processing the request handler.processing(); // instance index corresponds to reference index for(Uint32 i = 0, n = _instances.size(); i < n; i++) { if(localReference == _instanceNames[i]) { // overwrite existing instance _instances[i] = instanceObject; break; } } // complete processing the request handler.complete();}
开发者ID:brunolauze,项目名称:pegasus,代码行数:33,
注:本文中的CIMObjectPath函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CIMValue函数代码示例 C++ CIMNamespaceName函数代码示例 |