/* ================================================================================ NAME : _constructKeyBindings DESCRIPTION : Constructs an array of keybindings for an IP Interface ASSUMPTIONS : None PRE-CONDITIONS : POST-CONDITIONS : NOTES : PARAMETERS : className, Process ================================================================================ */ Array<CIMKeyBinding> BIPTLEpProvider::_constructKeyBindings( const CIMNamespaceName &nameSpace, const IPInterface &_ipif) { #ifdef DEBUG cout << "BIPTLEpProvider::_constructKeyBindings()" << endl; #endif Array<CIMKeyBinding> keyBindings; String s, sn; CIMObjectPath op; if (_ipif.getSystemName(sn) == false) { throw CIMNotSupportedException( String("Host-specific module doesn't support Key `") + PROPERTY_SYSTEM_NAME.getString() + String("'")); } // Construct the key bindings op = CIMObjectPath(sn, //hostname nameSpace, CLASS_CIM_LAN_ENDPOINT, _constructReference( CLASS_CIM_LAN_ENDPOINT, sn,_ipif.get_LANInterfaceName()) ); keyBindings.append(CIMKeyBinding(PROPERTY_ANTECEDENT, op.toString(), CIMKeyBinding::REFERENCE)); if (_ipif.getName(s)) { op = CIMObjectPath(sn, //hostname nameSpace, CLASS_CIM_IP_PROTOCOL_ENDPOINT, _constructReference( CLASS_CIM_IP_PROTOCOL_ENDPOINT, sn,s) ); keyBindings.append(CIMKeyBinding(PROPERTY_DEPENDENT, op.toString(), CIMKeyBinding::REFERENCE)); } else { throw CIMNotSupportedException( String("Host-specific module doesn't support Key `") + PROPERTY_NAME.getString() + String("'")); } #ifdef DEBUG cout << "BIPTLEpProvider::_constructKeyBindings() -- done" << endl; #endif return keyBindings; }
/* ================================================================================ NAME : _constructKeyBindings DESCRIPTION : Constructs an array of keybindings for an IP Interface ASSUMPTIONS : None PRE-CONDITIONS : POST-CONDITIONS : NOTES : PARAMETERS : IP Interface ================================================================================ */ Array<CIMKeyBinding> IPPEpProvider::_constructKeyBindings( const IPInterface& _ipif) { #ifdef DEBUG cout << "IPPEpProvider::_constructKeyBindings()" << endl; #endif Array<CIMKeyBinding> keyBindings; String s; // Construct the key bindings keyBindings.append(CIMKeyBinding(PROPERTY_SYSTEM_CREATION_CLASS_NAME, CLASS_CIM_UNITARY_COMPUTER_SYSTEM.getString(), CIMKeyBinding::STRING)); keyBindings.append(CIMKeyBinding(PROPERTY_CREATION_CLASS_NAME, CLASS_CIM_IP_PROTOCOL_ENDPOINT.getString(), CIMKeyBinding::STRING)); if (_ipif.getSystemName(s)) keyBindings.append(CIMKeyBinding(PROPERTY_SYSTEM_NAME, s, CIMKeyBinding::STRING)); else throw CIMNotSupportedException( String("Host-specific module doesn't support Key `") + PROPERTY_SYSTEM_NAME.getString() + String("'")); if (_ipif.getName(s)) keyBindings.append(CIMKeyBinding(PROPERTY_NAME, s, CIMKeyBinding::STRING)); else throw CIMNotSupportedException( String("Host-specific module doesn't support Key `") + PROPERTY_NAME.getString() + String("'")); #ifdef DEBUG cout << "IPPEpProvider::_constructKeyBindings() -- done" << endl; #endif return keyBindings; }