opendrim-lmp-ethernetport-1.1.2~ppa/0000755000175000017500000000000011404314174020267 5ustar guillaumeguillaumeopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/0000755000175000017500000000000011377664252027614 5ustar guillaumeguillaumeopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/Makefile.am0000644000175000017500000000515311377664252031654 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiEthernetPort_OpenDRIM_EthernetPortToComputerSystemProvider.la libcmpiEthernetPort_OpenDRIM_EthernetPortToComputerSystemProvider_la_SOURCES = OpenDRIM_EthernetPortToComputerSystemAccess.cpp OpenDRIM_EthernetPortToComputerSystemProvider.cpp cmpiOpenDRIM_EthernetPortToComputerSystem.cpp assocOpenDRIM_EthernetPortToComputerSystem.cpp # May have to be adjusted for direct invocation libcmpiEthernetPort_OpenDRIM_EthernetPortToComputerSystemProvider_la_CPPFLAGS = -I../CIM_LogicalDevice -I../CIM_System # Uncomment the end for direct invocation, may have to be adjusted libcmpiEthernetPort_OpenDRIM_EthernetPortToComputerSystemProvider_la_LIBADD = ../Common/libcmpiEthernetPort_Common.la #../CIM_LogicalDevice/libcmpiEthernetPort_CIM_LogicalDeviceProvider.la ../CIM_System/libcmpiEthernetPort_CIM_SystemProvider.la libcmpiEthernetPort_OpenDRIM_EthernetPortToComputerSystemProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_EthernetPortToComputerSystem.h OpenDRIM_EthernetPortToComputerSystem.h OpenDRIM_EthernetPortToComputerSystemAccess.h ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/OpenDRIM_EthernetPortToComputerSystemAccess.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/OpenDRIM_EthernetPortToCom0000644000175000017500000002635711377664252034576 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_EthernetPortToComputerSystemAccess.h" int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(EthernetPort_CIM_LogicalDevice_load(broker, errorMessage)); CF_assert(EthernetPort_CIM_System_load(broker, errorMessage)); */ // TODO _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(EthernetPort_CIM_LogicalDevice_unload(errorMessage)); CF_assert(EthernetPort_CIM_System_unload(errorMessage)); */ // TODO _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_isAssociated(const Instance& PartComponent, const Instance& GroupComponent, bool& isAssociated, string& errorMessage) { _E_; // Determine if the association can be established or not string ethernetPort_systemName; CF_assert(PartComponent.getProperty("SystemName", ethernetPort_systemName)); string computerSystem_name; CF_assert(GroupComponent.getProperty("Name", computerSystem_name)); if (ethernetPort_systemName==computerSystem_name) isAssociated=true; else isAssociated=false; _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(EthernetPort_OpenDRIM_EthernetPortToComputerSystem_enumeratePartComponents(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_EthernetPortToComputerSystem_enumeratePartComponents(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; EthernetPort_OpenDRIM_EthernetPortToComputerSystem_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), PartComponent_classnames[0], GroupComponent_classnames[0], PartComponent_role.c_str(), GroupComponent_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(EthernetPort_OpenDRIM_EthernetPortToComputerSystem_referencePartComponentToGroupComponent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_EthernetPortToComputerSystem& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath PartComponent_objectpath; instance.getPartComponent(PartComponent_objectpath); Instance PartComponent_instance; CF_assert(EthernetPort_OpenDRIM_EthernetPortToComputerSystem_getPartComponent(broker, ctx, PartComponent_objectpath, PartComponent_instance, NULL, errorMessage)); Objectpath GroupComponent_objectpath; instance.getGroupComponent(GroupComponent_objectpath); Instance GroupComponent_instance; CF_assert(EthernetPort_OpenDRIM_EthernetPortToComputerSystem_getGroupComponent(broker, ctx, GroupComponent_objectpath, GroupComponent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(EthernetPort_OpenDRIM_EthernetPortToComputerSystem_isAssociated(PartComponent_instance, GroupComponent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortToComputerSystem& newInstance, const OpenDRIM_EthernetPortToComputerSystem& oldInstance, const char** properties, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortToComputerSystem& instance, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortToComputerSystem& instance, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_associatorPartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const char** properties, vector& GroupComponent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector GroupComponent_instances; if (discriminant=="a") CF_assert(EthernetPort_OpenDRIM_EthernetPortToComputerSystem_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(EthernetPort_OpenDRIM_EthernetPortToComputerSystem_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_EthernetPortToComputerSystem_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, false, errorMessage)); } for (size_t i=0; i& PartComponent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector PartComponent_instances; if (discriminant=="a") CF_assert(EthernetPort_OpenDRIM_EthernetPortToComputerSystem_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(EthernetPort_OpenDRIM_EthernetPortToComputerSystem_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_EthernetPortToComputerSystem_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); } for (size_t i=0; i& GroupComponent_instances, vector& OpenDRIM_EthernetPortToComputerSystem_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < GroupComponent_instances.size(); i++) { OpenDRIM_EthernetPortToComputerSystem instance; instance.setPartComponent(((Instance) PartComponent_instance).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instances[i]).getObjectpath()); OpenDRIM_EthernetPortToComputerSystem_instances.push_back(instance); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_EthernetPortToComputerSystem_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < PartComponent_instances.size(); i++) { OpenDRIM_EthernetPortToComputerSystem instance; instance.setPartComponent(((Instance) PartComponent_instances[i]).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instance).getObjectpath()); OpenDRIM_EthernetPortToComputerSystem_instances.push_back(instance); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_populate(OpenDRIM_EthernetPortToComputerSystem& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/cmpiOpenDRIM_EthernetPortToComputerSystem.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/cmpiOpenDRIM_EthernetPortT0000644000175000017500000000643311377664252034622 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPortToComputerSystem.h" CMPIObjectPath* EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_EthernetPortToComputerSystem& instance) { _E_; Objectpath op(broker, OpenDRIM_EthernetPortToComputerSystem_classnames[0], OpenDRIM_EthernetPortToComputerSystem_NAMESPACE); if (!instance.GroupComponent_isNULL) op.addKey("GroupComponent", instance.GroupComponent); if (!instance.PartComponent_isNULL) op.addKey("PartComponent", instance.PartComponent); _L_; return op.getHdl(); } CMPIInstance* EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_EthernetPortToComputerSystem& instance) { _E_; Objectpath op(broker, EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_EthernetPortToComputerSystem& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("PartComponent", instance.PartComponent) == OK) instance.PartComponent_isNULL = false; if (op.getKey("GroupComponent", instance.GroupComponent) == OK) instance.GroupComponent_isNULL = false; _L_; } void EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_EthernetPortToComputerSystem& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("GroupComponent", instance.GroupComponent) == OK) instance.GroupComponent_isNULL = false; if (inst.getProperty("PartComponent", instance.PartComponent) == OK) instance.PartComponent_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/OpenDRIM_EthernetPortToComputerSystem.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/OpenDRIM_EthernetPortToCom0000644000175000017500000000716211377664252034567 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_ETHERNETPORTTOCOMPUTERSYSTEM_H_ #define OPENDRIM_ETHERNETPORTTOCOMPUTERSYSTEM_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_LogicalDevice.h" #include "CIM_LogicalDeviceAccess.h" #include "cmpiCIM_System.h" #include "CIM_SystemAccess.h" */ const static char* OpenDRIM_EthernetPortToComputerSystem_classnames[] = {"OpenDRIM_EthernetPortToComputerSystem"}; static string OpenDRIM_EthernetPortToComputerSystem_NAMESPACE = _NAMESPACE; const static string PartComponent_role = "PartComponent"; const static char* PartComponent_classnames[] = {"OpenDRIM_EthernetPort"}; const static string PartComponent_NAMESPACE = _NAMESPACE; const static string GroupComponent_role = "GroupComponent"; const static char* GroupComponent_classnames[] = {"OpenDRIM_ComputerSystem"}; const static string GroupComponent_NAMESPACE = _NAMESPACE; class OpenDRIM_EthernetPortToComputerSystem { public: Objectpath GroupComponent; bool GroupComponent_isNULL; Objectpath PartComponent; bool PartComponent_isNULL; OpenDRIM_EthernetPortToComputerSystem() { GroupComponent_isNULL = true; PartComponent_isNULL = true; } ~OpenDRIM_EthernetPortToComputerSystem() {} string getKeys() const { return CF_toLowCase(".GroupComponent=\"" + CF_quoteString(GroupComponent.toString()) + "\""".PartComponent=\"" + CF_quoteString(PartComponent.toString()) + "\""); } int getGroupComponent(Objectpath& value) const { if (GroupComponent_isNULL==true) return NOT_FOUND; value = GroupComponent; return OK; } int setGroupComponent(const Objectpath& newValue) { GroupComponent = newValue; GroupComponent.setNamespace(GroupComponent_NAMESPACE); GroupComponent_isNULL = false; return OK; } int getPartComponent(Objectpath& value) const { if (PartComponent_isNULL==true) return NOT_FOUND; value = PartComponent; return OK; } int setPartComponent(const Objectpath& newValue) { PartComponent = newValue; PartComponent.setNamespace(PartComponent_NAMESPACE); PartComponent_isNULL = false; return OK; } }; #endif /*OPENDRIM_ETHERNETPORTTOCOMPUTERSYSTEM_H_*/ ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/cmpiOpenDRIM_EthernetPortToComputerSystem.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/cmpiOpenDRIM_EthernetPortT0000644000175000017500000000457411377664252034626 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_ETHERNETPORTTOCOMPUTERSYSTEM_H_ #define CMPIOPENDRIM_ETHERNETPORTTOCOMPUTERSYSTEM_H_ #include "OpenDRIM_EthernetPortToComputerSystem.h" CMPIObjectPath* EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_EthernetPortToComputerSystem& instance); CMPIInstance* EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_EthernetPortToComputerSystem& instance); void EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_EthernetPortToComputerSystem& instance); void EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_EthernetPortToComputerSystem& instance); #endif /*CMPIOPENDRIM_ETHERNETPORTTOCOMPUTERSYSTEM_H_*/ ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/OpenDRIM_EthernetPortToComputerSystemAccess.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/OpenDRIM_EthernetPortToCom0000644000175000017500000001126311377664252034564 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_ETHERNETPORTTOCOMPUTERSYSTEMACCESS_H_ #define OPENDRIM_ETHERNETPORTTOCOMPUTERSYSTEMACCESS_H_ #include "EthernetPort_Common.h" #include "OpenDRIM_EthernetPortToComputerSystem.h" #include "assocOpenDRIM_EthernetPortToComputerSystem.h" int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_load(const CMPIBroker* broker, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_unload(string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_EthernetPortToComputerSystem& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortToComputerSystem& newInstance, const OpenDRIM_EthernetPortToComputerSystem& oldInstance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortToComputerSystem& instance, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortToComputerSystem& instance, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_associatorPartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const char** properties, vector& GroupComponent_associatedInstances, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_associatorGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const char** properties, vector& PartComponent_associatedInstances, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_referencePartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const vector& GroupComponent_instances, vector& OpenDRIM_EthernetPortToComputerSystem_instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_EthernetPortToComputerSystem_instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_populate(OpenDRIM_EthernetPortToComputerSystem& instance, string& errorMessage); #endif /*OPENDRIM_ETHERNETPORTTOCOMPUTERSYSTEMACCESS_H_*/ ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/assocOpenDRIM_EthernetPortToComputerSystem.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/assocOpenDRIM_EthernetPort0000644000175000017500000002152311377664252034653 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_EthernetPortToComputerSystem.h" int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "PartComponent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "GroupComponent") != 0) return OK; CF_assert(EthernetPort_OpenDRIM_EthernetPortToComputerSystem_associatorPartComponentToGroupComponent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "GroupComponent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "PartComponent") != 0) return OK; CF_assert(EthernetPort_OpenDRIM_EthernetPortToComputerSystem_associatorGroupComponentToPartComponent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_enumeratePartComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, PartComponent_NAMESPACE, PartComponent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(EthernetPort_CIM_LogicalDevice_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(EthernetPort_CIM_LogicalDevice_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, EthernetPort_CIM_LogicalDevice_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_getPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), PartComponent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), PartComponent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_LogicalDevice _instance; EthernetPort_CIM_LogicalDevice_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(EthernetPort_CIM_LogicalDevice_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, EthernetPort_CIM_LogicalDevice_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_enumerateGroupComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, GroupComponent_NAMESPACE, GroupComponent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(EthernetPort_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(EthernetPort_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, EthernetPort_CIM_System_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_getGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), GroupComponent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), GroupComponent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_System _instance; EthernetPort_CIM_System_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(EthernetPort_CIM_System_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, EthernetPort_CIM_System_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/OpenDRIM_EthernetPortToComputerSystemProvider.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/OpenDRIM_EthernetPortToCom0000644000175000017500000004423511377664252034571 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPortToComputerSystem.h" #include "OpenDRIM_EthernetPortToComputerSystemAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderSetInstance EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderModifyInstance #endif int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_init(const CMPIBroker* broker); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortToComputerSystem instance; EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortToComputerSystem newInstance, oldInstance; EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCPP(_broker, ci, newInstance); EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortToComputerSystem instance; EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCPP(_broker, ci, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortToComputerSystem instance; EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortToComputerSystemProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_EthernetPortToComputerSystem_init FAILED: " + (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_unload(errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_EthernetPortToComputerSystem_unload FAILED: " + (string) OpenDRIM_EthernetPortToComputerSystem_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define EthernetPort_OpenDRIM_EthernetPortToComputerSystem_INIT if (EthernetPort_OpenDRIM_EthernetPortToComputerSystem_init(_broker) < 0) return NULL CMInstanceMIStub(EthernetPort_OpenDRIM_EthernetPortToComputerSystemProvider, EthernetPort_OpenDRIM_EthernetPortToComputerSystemProvider, _broker, EthernetPort_OpenDRIM_EthernetPortToComputerSystem_INIT); CMAssociationMIStub(EthernetPort_OpenDRIM_EthernetPortToComputerSystemProvider, EthernetPort_OpenDRIM_EthernetPortToComputerSystemProvider, _broker, EthernetPort_OpenDRIM_EthernetPortToComputerSystem_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/assocOpenDRIM_EthernetPortToComputerSystem.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortToComputerSystem/assocOpenDRIM_EthernetPort0000644000175000017500000000645011377664252034655 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_ETHERNETPORTTOCOMPUTERSYSTEM_H_ #define ASSOCOPENDRIM_ETHERNETPORTTOCOMPUTERSYSTEM_H_ #include "OpenDRIM_EthernetPortToComputerSystemAccess.h" int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_enumeratePartComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_getPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_enumerateGroupComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortToComputerSystem_getGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_ETHERNETPORTTOCOMPUTERSYSTEM_H_*/ opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/0000755000175000017500000000000011377664252027360 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/OpenDRIM_LANEndpointHostedAccessPointAccess.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/OpenDRIM_LANEndpointHosted0000644000175000017500000001113611377664252034224 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_LANENDPOINTHOSTEDACCESSPOINTACCESS_H_ #define OPENDRIM_LANENDPOINTHOSTEDACCESSPOINTACCESS_H_ #include "EthernetPort_Common.h" #include "OpenDRIM_LANEndpointHostedAccessPoint.h" #include "assocOpenDRIM_LANEndpointHostedAccessPoint.h" int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_load(const CMPIBroker* broker, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_unload(string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_LANEndpointHostedAccessPoint& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpointHostedAccessPoint& newInstance, const OpenDRIM_LANEndpointHostedAccessPoint& oldInstance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpointHostedAccessPoint& instance, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpointHostedAccessPoint& instance, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_LANEndpointHostedAccessPoint_instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_LANEndpointHostedAccessPoint_instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_populate(OpenDRIM_LANEndpointHostedAccessPoint& instance, string& errorMessage); #endif /*OPENDRIM_LANENDPOINTHOSTEDACCESSPOINTACCESS_H_*/ opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/Makefile.am0000644000175000017500000000514511377664252031421 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiEthernetPort_OpenDRIM_LANEndpointHostedAccessPointProvider.la libcmpiEthernetPort_OpenDRIM_LANEndpointHostedAccessPointProvider_la_SOURCES = OpenDRIM_LANEndpointHostedAccessPointAccess.cpp OpenDRIM_LANEndpointHostedAccessPointProvider.cpp cmpiOpenDRIM_LANEndpointHostedAccessPoint.cpp assocOpenDRIM_LANEndpointHostedAccessPoint.cpp # May have to be adjusted for direct invocation libcmpiEthernetPort_OpenDRIM_LANEndpointHostedAccessPointProvider_la_CPPFLAGS = -I../CIM_System -I../CIM_ServiceAccessPoint # Uncomment the end for direct invocation, may have to be adjusted libcmpiEthernetPort_OpenDRIM_LANEndpointHostedAccessPointProvider_la_LIBADD = ../Common/libcmpiEthernetPort_Common.la #../CIM_System/libcmpiEthernetPort_CIM_SystemProvider.la ../CIM_ServiceAccessPoint/libcmpiEthernetPort_CIM_ServiceAccessPointProvider.la libcmpiEthernetPort_OpenDRIM_LANEndpointHostedAccessPointProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_LANEndpointHostedAccessPoint.h OpenDRIM_LANEndpointHostedAccessPoint.h OpenDRIM_LANEndpointHostedAccessPointAccess.h ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/assocOpenDRIM_LANEndpointHostedAccessPoint.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/assocOpenDRIM_LANEndpointH0000644000175000017500000002134611377664252034222 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "assocOpenDRIM_LANEndpointHostedAccessPoint.h" int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "Antecedent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Dependent") != 0) return OK; CF_assert(EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_associatorAntecedentToDependent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "Dependent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Antecedent") != 0) return OK; CF_assert(EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Antecedent_NAMESPACE, Antecedent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(EthernetPort_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(EthernetPort_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, EthernetPort_CIM_System_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Antecedent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Antecedent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_System _instance; EthernetPort_CIM_System_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(EthernetPort_CIM_System_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, EthernetPort_CIM_System_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Dependent_NAMESPACE, Dependent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(EthernetPort_CIM_ServiceAccessPoint_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(EthernetPort_CIM_ServiceAccessPoint_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, EthernetPort_CIM_ServiceAccessPoint_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Dependent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Dependent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ServiceAccessPoint _instance; EthernetPort_CIM_ServiceAccessPoint_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(EthernetPort_CIM_ServiceAccessPoint_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, EthernetPort_CIM_ServiceAccessPoint_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/cmpiOpenDRIM_LANEndpointHostedAccessPoint.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/cmpiOpenDRIM_LANEndpointHo0000644000175000017500000000627611377664252034226 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_LANEndpointHostedAccessPoint.h" CMPIObjectPath* EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_LANEndpointHostedAccessPoint& instance) { _E_; Objectpath op(broker, OpenDRIM_LANEndpointHostedAccessPoint_classnames[0], OpenDRIM_LANEndpointHostedAccessPoint_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_LANEndpointHostedAccessPoint& instance) { _E_; Objectpath op(broker, EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_LANEndpointHostedAccessPoint& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (op.getKey("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } void EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_LANEndpointHostedAccessPoint& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (inst.getProperty("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/OpenDRIM_LANEndpointHostedAccessPoint.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/OpenDRIM_LANEndpointHosted0000644000175000017500000000674311377664252034234 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_LANENDPOINTHOSTEDACCESSPOINT_H_ #define OPENDRIM_LANENDPOINTHOSTEDACCESSPOINT_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_System.h" #include "CIM_SystemAccess.h" #include "cmpiCIM_ServiceAccessPoint.h" #include "CIM_ServiceAccessPointAccess.h" */ const static char* OpenDRIM_LANEndpointHostedAccessPoint_classnames[] = {"OpenDRIM_LANEndpointHostedAccessPoint"}; static string OpenDRIM_LANEndpointHostedAccessPoint_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"OpenDRIM_ComputerSystem"}; const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"OpenDRIM_LANEndpoint"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_LANEndpointHostedAccessPoint { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; OpenDRIM_LANEndpointHostedAccessPoint() { Antecedent_isNULL = true; Dependent_isNULL = true; } ~OpenDRIM_LANEndpointHostedAccessPoint() {} string getKeys() const { return CF_toLowCase(".Antecedent=\"" + CF_quoteString(Antecedent.toString()) + "\""".Dependent=\"" + CF_quoteString(Dependent.toString()) + "\""); } int getAntecedent(Objectpath& value) const { if (Antecedent_isNULL==true) return NOT_FOUND; value = Antecedent; return OK; } int setAntecedent(const Objectpath& newValue) { Antecedent = newValue; Antecedent.setNamespace(Antecedent_NAMESPACE); Antecedent_isNULL = false; return OK; } int getDependent(Objectpath& value) const { if (Dependent_isNULL==true) return NOT_FOUND; value = Dependent; return OK; } int setDependent(const Objectpath& newValue) { Dependent = newValue; Dependent.setNamespace(Dependent_NAMESPACE); Dependent_isNULL = false; return OK; } }; #endif /*OPENDRIM_LANENDPOINTHOSTEDACCESSPOINT_H_*/ ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/OpenDRIM_LANEndpointHostedAccessPointAccess.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/OpenDRIM_LANEndpointHosted0000644000175000017500000002571211377664252034231 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_LANEndpointHostedAccessPointAccess.h" int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(EthernetPort_CIM_System_load(broker, errorMessage)); CF_assert(EthernetPort_CIM_ServiceAccessPoint_load(broker, errorMessage)); */ // TODO _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(EthernetPort_CIM_System_unload(errorMessage)); CF_assert(EthernetPort_CIM_ServiceAccessPoint_unload(errorMessage)); */ // TODO _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_isAssociated(const Instance& Antecedent, const Instance& Dependent, bool& isAssociated, string& errorMessage) { _E_; // Determine if the association can be established or not string computerSystem_name; CF_assert(Antecedent.getProperty("Name", computerSystem_name)); string lanEndpoint_systemName; CF_assert(Dependent.getProperty("SystemName", lanEndpoint_systemName)); if (computerSystem_name==lanEndpoint_systemName) isAssociated=true; else isAssociated=false; _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_enumerateAntecedents(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_enumerateAntecedents(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), Antecedent_classnames[0], Dependent_classnames[0], Antecedent_role.c_str(), Dependent_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_LANEndpointHostedAccessPoint& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath Antecedent_objectpath; instance.getAntecedent(Antecedent_objectpath); Instance Antecedent_instance; CF_assert(EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpointHostedAccessPoint& newInstance, const OpenDRIM_LANEndpointHostedAccessPoint& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpointHostedAccessPoint& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpointHostedAccessPoint& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Dependent_instances; if (discriminant=="a") CF_assert(EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_enumerateDependents(broker, ctx, Dependent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Antecedent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Antecedent_instances; if (discriminant=="a") CF_assert(EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_LANEndpointHostedAccessPoint_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Dependent_instances.size(); i++) { OpenDRIM_LANEndpointHostedAccessPoint instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); OpenDRIM_LANEndpointHostedAccessPoint_instances.push_back(instance); } _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_LANEndpointHostedAccessPoint_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Antecedent_instances.size(); i++) { OpenDRIM_LANEndpointHostedAccessPoint instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); OpenDRIM_LANEndpointHostedAccessPoint_instances.push_back(instance); } _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_populate(OpenDRIM_LANEndpointHostedAccessPoint& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/cmpiOpenDRIM_LANEndpointHostedAccessPoint.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/cmpiOpenDRIM_LANEndpointHo0000644000175000017500000000454711377664252034225 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_LANENDPOINTHOSTEDACCESSPOINT_H_ #define CMPIOPENDRIM_LANENDPOINTHOSTEDACCESSPOINT_H_ #include "OpenDRIM_LANEndpointHostedAccessPoint.h" CMPIObjectPath* EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_LANEndpointHostedAccessPoint& instance); CMPIInstance* EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_LANEndpointHostedAccessPoint& instance); void EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_LANEndpointHostedAccessPoint& instance); void EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_LANEndpointHostedAccessPoint& instance); #endif /*CMPIOPENDRIM_LANENDPOINTHOSTEDACCESSPOINT_H_*/ ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/assocOpenDRIM_LANEndpointHostedAccessPoint.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/assocOpenDRIM_LANEndpointH0000644000175000017500000000640311377664252034217 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_LANENDPOINTHOSTEDACCESSPOINT_H_ #define ASSOCOPENDRIM_LANENDPOINTHOSTEDACCESSPOINT_H_ #include "OpenDRIM_LANEndpointHostedAccessPointAccess.h" int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_LANENDPOINTHOSTEDACCESSPOINT_H_*/ ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/OpenDRIM_LANEndpointHostedAccessPointProvider.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointHostedAccessPoint/OpenDRIM_LANEndpointHosted0000644000175000017500000004415011377664252034226 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_LANEndpointHostedAccessPoint.h" #include "OpenDRIM_LANEndpointHostedAccessPointAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderSetInstance EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderModifyInstance #endif int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_init(const CMPIBroker* broker); int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LANEndpointHostedAccessPoint instance; EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LANEndpointHostedAccessPoint newInstance, oldInstance; EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCPP(_broker, ci, newInstance); EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LANEndpointHostedAccessPoint instance; EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCPP(_broker, ci, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LANEndpointHostedAccessPoint instance; EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_init FAILED: " + (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_unload(errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_unload FAILED: " + (string) OpenDRIM_LANEndpointHostedAccessPoint_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_INIT if (EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_init(_broker) < 0) return NULL CMInstanceMIStub(EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProvider, EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProvider, _broker, EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_INIT); CMAssociationMIStub(EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProvider, EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProvider, _broker, EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-ethernetport-1.1.2~ppa/Makefile.am0000644000175000017500000001057511377664252022351 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ VENDOR = OpenDRIM VERSION = $(shell cat ./VERSION) APP_NAME = opendrim-lmp-ethernetport RPM_PACKAGE_DIR = packaging PLATFORM = $(shell rpm --eval %_target_cpu) WORKING_DIR = $(shell pwd) SUBDIRS = Common OpenDRIM_RegisteredEthernetPortProfile OpenDRIM_EthernetPort OpenDRIM_LANEndpoint OpenDRIM_EthernetPortConformsToProfile OpenDRIM_EthernetPortToComputerSystem OpenDRIM_LANEndpointHostedAccessPoint OpenDRIM_LANEndpointCapabilities OpenDRIM_EthernetPortDeviceSAPImplementation OpenDRIM_EthernetPortCapabilities test postinstall: registration/EthernetPort.sh @CIMNAMESPACE@ $(VENDOR) @CIMSERVER@ @INTEROPNAMESPACE@ $(VERSION) . preuninstall: registration/EthernetPort-remove.sh @CIMNAMESPACE@ @CIMSERVER@ @INTEROPNAMESPACE@ . test-OpenDRIM_EthernetPortConformsToProfile: all make -C test test-OpenDRIM_EthernetPortConformsToProfile test-OpenDRIM_RegisteredEthernetPortProfile: all make -C test test-OpenDRIM_RegisteredEthernetPortProfile test-OpenDRIM_EthernetPortToComputerSystem: all make -C test test-OpenDRIM_EthernetPortToComputerSystem test-OpenDRIM_LANEndpointHostedAccessPoint: all make -C test test-OpenDRIM_LANEndpointHostedAccessPoint test-OpenDRIM_EthernetPort: all make -C test test-OpenDRIM_EthernetPort test-OpenDRIM_LANEndpointCapabilities: all make -C test test-OpenDRIM_LANEndpointCapabilities test-OpenDRIM_LANEndpoint: all make -C test test-OpenDRIM_LANEndpoint test-OpenDRIM_EthernetPortDeviceSAPImplementation: all make -C test test-OpenDRIM_EthernetPortDeviceSAPImplementation test-OpenDRIM_EthernetPortCapabilities: all make -C test test-OpenDRIM_EthernetPortCapabilities pkg-src: rm -rf packaging/$(APP_NAME)-$(VERSION) rm -rf .tmp mkdir .tmp cp -r ./* .tmp/ rm -rf ./tmp/packaging/ mv .tmp packaging/$(APP_NAME)-$(VERSION) tar --directory packaging -zcf packaging/$(APP_NAME)-$(VERSION).tar.gz $(APP_NAME)-$(VERSION) rm -rf packaging/$(APP_NAME)-$(VERSION) pkg-rpm: pkg-src mkdir -p $(RPM_PACKAGE_DIR)/rpm/RPMS/$(PLATFORM) mkdir -p $(RPM_PACKAGE_DIR)/rpm/SRPMS mkdir -p $(RPM_PACKAGE_DIR)/rpm/BUILD mkdir -p $(RPM_PACKAGE_DIR)/rpm/SOURCES mkdir -p $(RPM_PACKAGE_DIR)/rpm/tmp - rm -r $(RPM_PACKAGE_DIR)/rpm/BUILD/$(APP_NAME)-root - rm -r $(RPM_PACKAGE_DIR)/rpm/RPMS/$(APP_NAME)-* - rm -r $(RPM_PACKAGE_DIR)/rpm/SRPMS/$(APP_NAME)-* - rm -r $(RPM_PACKAGE_DIR)/rpm/SOURCES/$(APP_NAME)-* mv packaging/$(APP_NAME)-$(VERSION).tar.gz $(RPM_PACKAGE_DIR)/rpm/SOURCES/ rpmbuild --define="_topdir $(WORKING_DIR)/$(RPM_PACKAGE_DIR)/rpm" --define="version $(VERSION)" -ba $(RPM_PACKAGE_DIR)/$(APP_NAME).spec pkg-deb: pkg-src cp packaging/$(APP_NAME)-$(VERSION).tar.gz packaging/$(APP_NAME)-$(VERSION).orig.tar.gz cd packaging/ && tar axf $(APP_NAME)-$(VERSION).tar.gz cp -R packaging/debian packaging/$(APP_NAME)-$(VERSION) - cd packaging/$(APP_NAME)-$(VERSION) && dpkg-buildpackage -b rm -rf packaging/$(APP_NAME)-$(VERSION)* packaging/*.changes opendrim-lmp-ethernetport-1.1.2~ppa/registration/0000755000175000017500000000000011377664252023017 5ustar guillaumeguillaumeopendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_EthernetPortToComputerSystem-remove.sh0000755000175000017500000000653611377664252034172 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m EthernetPort_OpenDRIM_EthernetPortToComputerSystemModule cimprovider -r -m EthernetPort_OpenDRIM_EthernetPortToComputerSystemModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_EthernetPortToComputerSystem.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/EthernetPort-remove.sh0000755000175000017500000000506011377664252027275 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then if !( ps -C cimserver > /dev/null 2>&1 ) then echo "ERROR: Pegasus CIM server is not running" exit 1 fi fi if test "$2" = openwbem then if !( ps -C owcimomd > /dev/null 2>&1 ) then echo "ERROR: OpenWBEM CIM server is not running" exit 1 fi fi if test "$2" = sfcb then /etc/init.d/sfcb stop fi $4/registration/OpenDRIM_EthernetPortCapabilities-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_EthernetPortDeviceSAPImplementation-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_LANEndpoint-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_LANEndpointCapabilities-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_EthernetPort-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_LANEndpointHostedAccessPoint-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_EthernetPortToComputerSystem-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_RegisteredEthernetPortProfile-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_EthernetPortConformsToProfile-remove.sh $1 $2 $3 $4 if test "$2" = sfcb then /etc/init.d/sfcb start fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_EthernetPort-remove.sh0000755000175000017500000000627111377664252030737 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m EthernetPort_OpenDRIM_EthernetPortModule cimprovider -r -m EthernetPort_OpenDRIM_EthernetPortModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_EthernetPort.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_EthernetPort.sh0000755000175000017500000001071211377664252027437 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_EthernetPort.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_EthernetPort provider module"; Name = "EthernetPort_OpenDRIM_EthernetPortModule"; Location = "cmpiEthernetPort_OpenDRIM_EthernetPortProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_EthernetPort provider"; Name = "EthernetPort_OpenDRIM_EthernetPortProvider"; ProviderModuleName = "EthernetPort_OpenDRIM_EthernetPortModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_EthernetPort provider capabilities"; ProviderModuleName = "EthernetPort_OpenDRIM_EthernetPortModule"; ProviderName = "EthernetPort_OpenDRIM_EthernetPortProvider"; ClassName = "OpenDRIM_EthernetPort"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstallDate", "Name", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "EnabledState", "OtherEnabledState", "RequestedState", "EnabledDefault", "TimeOfLastStateChange", "AvailableRequestedStates", "TransitioningToState", "SystemCreationClassName", "SystemName", "CreationClassName", "DeviceID", "PowerManagementSupported", "PowerManagementCapabilities", "Availability", "StatusInfo", "LastErrorCode", "ErrorDescription", "ErrorCleared", "OtherIdentifyingInfo", "PowerOnHours", "TotalPowerOnHours", "IdentifyingDescriptions", "AdditionalAvailability", "MaxQuiesceTime", "LocationIndicator", "MaxSpeed", "RequestedSpeed", "UsageRestriction", "OtherPortType", "Speed", "OtherNetworkPortType", "PortNumber", "LinkTechnology", "OtherLinkTechnology", "PermanentAddress", "FullDuplex", "AutoSense", "SupportedMaximumTransmissionUnit", "ActiveMaximumTransmissionUnit", "PortType", "NetworkAddresses", "MaxDataSize", "Capabilities", "CapabilityDescriptions", "EnabledCapabilities", "OtherEnabledCapabilities"}; SupportedMethods = {"RequestStateChange", "SetPowerState", "Reset", "EnableDevice", "OnlineDevice", "QuiesceDevice", "SaveProperties", "RestoreProperties"}; CapabilityID = "EthernetPort_OpenDRIM_EthernetPort"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_EthernetPort.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_EthernetPortConformsToProfile-remove.sh0000755000175000017500000001050011377664252034260 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m EthernetPort_OpenDRIM_EthernetPortConformsToProfileModule cimprovider -r -m EthernetPort_OpenDRIM_EthernetPortConformsToProfileModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE cat >> $OUTFILE < EOFC namespace=$3 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_EthernetPortConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_EthernetPortCapabilities.sh0000755000175000017500000000670311377664252031756 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_EthernetPortCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_EthernetPortCapabilities provider module"; Name = "EthernetPort_OpenDRIM_EthernetPortCapabilitiesModule"; Location = "cmpiEthernetPort_OpenDRIM_EthernetPortCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_EthernetPortCapabilities provider"; Name = "EthernetPort_OpenDRIM_EthernetPortCapabilitiesProvider"; ProviderModuleName = "EthernetPort_OpenDRIM_EthernetPortCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_EthernetPortCapabilities provider capabilities"; ProviderModuleName = "EthernetPort_OpenDRIM_EthernetPortCapabilitiesModule"; ProviderName = "EthernetPort_OpenDRIM_EthernetPortCapabilitiesProvider"; ClassName = "OpenDRIM_EthernetPortCapabilities"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"ManagedElement", "Capabilities", "Characteristics"}; CapabilityID = "EthernetPort_OpenDRIM_EthernetPortCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_EthernetPortCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_LANEndpointHostedAccessPoint.sh0000755000175000017500000000676511377664252032447 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_LANEndpointHostedAccessPoint.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_LANEndpointHostedAccessPoint provider module"; Name = "EthernetPort_OpenDRIM_LANEndpointHostedAccessPointModule"; Location = "cmpiEthernetPort_OpenDRIM_LANEndpointHostedAccessPointProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_LANEndpointHostedAccessPoint provider"; Name = "EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProvider"; ProviderModuleName = "EthernetPort_OpenDRIM_LANEndpointHostedAccessPointModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_LANEndpointHostedAccessPoint provider capabilities"; ProviderModuleName = "EthernetPort_OpenDRIM_LANEndpointHostedAccessPointModule"; ProviderName = "EthernetPort_OpenDRIM_LANEndpointHostedAccessPointProvider"; ClassName = "OpenDRIM_LANEndpointHostedAccessPoint"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent"}; CapabilityID = "EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_LANEndpointHostedAccessPoint.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_EthernetPortConformsToProfile.sh0000755000175000017500000000735611377664252033004 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_EthernetPortConformsToProfile.mof cimmof -aE -n $4 $6/mof/OpenDRIM_EthernetPortConformsToProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_EthernetPortConformsToProfile provider module"; Name = "EthernetPort_OpenDRIM_EthernetPortConformsToProfileModule"; Location = "cmpiEthernetPort_OpenDRIM_EthernetPortConformsToProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_EthernetPortConformsToProfile provider"; Name = "EthernetPort_OpenDRIM_EthernetPortConformsToProfileProvider"; ProviderModuleName = "EthernetPort_OpenDRIM_EthernetPortConformsToProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_EthernetPortConformsToProfile provider capabilities"; ProviderModuleName = "EthernetPort_OpenDRIM_EthernetPortConformsToProfileModule"; ProviderName = "EthernetPort_OpenDRIM_EthernetPortConformsToProfileProvider"; ClassName = "OpenDRIM_EthernetPortConformsToProfile"; ProviderType = {2, 3}; Namespaces = {"$1", "$4"}; SupportedProperties = {"ConformantStandard", "ManagedElement"}; CapabilityID = "EthernetPort_OpenDRIM_EthernetPortConformsToProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_EthernetPortConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_EthernetPortDeviceSAPImplementation-remove.shopendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_EthernetPortDeviceSAPImplementation-remove0000755000175000017500000000661711377664252034724 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationModule cimprovider -r -m EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_EthernetPortDeviceSAPImplementation.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_LANEndpointCapabilities.sh0000755000175000017500000000666011377664252031450 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_LANEndpointCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_LANEndpointCapabilities provider module"; Name = "EthernetPort_OpenDRIM_LANEndpointCapabilitiesModule"; Location = "cmpiEthernetPort_OpenDRIM_LANEndpointCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_LANEndpointCapabilities provider"; Name = "EthernetPort_OpenDRIM_LANEndpointCapabilitiesProvider"; ProviderModuleName = "EthernetPort_OpenDRIM_LANEndpointCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_LANEndpointCapabilities provider capabilities"; ProviderModuleName = "EthernetPort_OpenDRIM_LANEndpointCapabilitiesModule"; ProviderName = "EthernetPort_OpenDRIM_LANEndpointCapabilitiesProvider"; ClassName = "OpenDRIM_LANEndpointCapabilities"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"ManagedElement", "Capabilities", "Characteristics"}; CapabilityID = "EthernetPort_OpenDRIM_LANEndpointCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_LANEndpointCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_LANEndpointHostedAccessPoint-remove.sh0000755000175000017500000000651211377664252033730 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m EthernetPort_OpenDRIM_LANEndpointHostedAccessPointModule cimprovider -r -m EthernetPort_OpenDRIM_LANEndpointHostedAccessPointModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_LANEndpointHostedAccessPoint.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_RegisteredEthernetPortProfile-remove.sh0000755000175000017500000000650711377664252034300 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m EthernetPort_OpenDRIM_RegisteredEthernetPortProfileModule cimprovider -r -m EthernetPort_OpenDRIM_RegisteredEthernetPortProfileModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$3 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_RegisteredEthernetPortProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_EthernetPortToComputerSystem.sh0000755000175000017500000000702211377664252032666 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_EthernetPortToComputerSystem.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_EthernetPortToComputerSystem provider module"; Name = "EthernetPort_OpenDRIM_EthernetPortToComputerSystemModule"; Location = "cmpiEthernetPort_OpenDRIM_EthernetPortToComputerSystemProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_EthernetPortToComputerSystem provider"; Name = "EthernetPort_OpenDRIM_EthernetPortToComputerSystemProvider"; ProviderModuleName = "EthernetPort_OpenDRIM_EthernetPortToComputerSystemModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_EthernetPortToComputerSystem provider capabilities"; ProviderModuleName = "EthernetPort_OpenDRIM_EthernetPortToComputerSystemModule"; ProviderName = "EthernetPort_OpenDRIM_EthernetPortToComputerSystemProvider"; ClassName = "OpenDRIM_EthernetPortToComputerSystem"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"GroupComponent", "PartComponent"}; CapabilityID = "EthernetPort_OpenDRIM_EthernetPortToComputerSystem"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_EthernetPortToComputerSystem.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_EthernetPortCapabilities-remove.sh0000755000175000017500000000644111377664252033250 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m EthernetPort_OpenDRIM_EthernetPortCapabilitiesModule cimprovider -r -m EthernetPort_OpenDRIM_EthernetPortCapabilitiesModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_EthernetPortCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_LANEndpoint.sh0000755000175000017500000000747411377664252027142 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_LANEndpoint.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_LANEndpoint provider module"; Name = "EthernetPort_OpenDRIM_LANEndpointModule"; Location = "cmpiEthernetPort_OpenDRIM_LANEndpointProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_LANEndpoint provider"; Name = "EthernetPort_OpenDRIM_LANEndpointProvider"; ProviderModuleName = "EthernetPort_OpenDRIM_LANEndpointModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_LANEndpoint provider capabilities"; ProviderModuleName = "EthernetPort_OpenDRIM_LANEndpointModule"; ProviderName = "EthernetPort_OpenDRIM_LANEndpointProvider"; ClassName = "OpenDRIM_LANEndpoint"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "ElementName", "InstallDate", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "OtherEnabledState", "RequestedState", "EnabledDefault", "AvailableRequestedStates", "TransitioningToState", "SystemCreationClassName", "SystemName", "CreationClassName", "Name", "Description", "OperationalStatus", "EnabledState", "TimeOfLastStateChange", "NameFormat", "ProtocolType", "OtherTypeDescription", "BroadcastResetSupported", "LANID", "LANType", "OtherLANType", "MACAddress", "AliasAddresses", "GroupAddresses", "MaxDataSize", "ProtocolIFType"}; SupportedMethods = {"RequestStateChange", "BroadcastReset"}; CapabilityID = "EthernetPort_OpenDRIM_LANEndpoint"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_LANEndpoint.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/EthernetPort.sh0000755000175000017500000000504711377664252026007 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then if !( ps -C cimserver > /dev/null 2>&1 ) then echo "ERROR: Pegasus CIM server is not running" exit 1 fi fi if test "$3" = openwbem then if !( ps -C owcimomd > /dev/null 2>&1 ) then echo "ERROR: OpenWBEM CIM server is not running" exit 1 fi fi if test "$3" = sfcb then /etc/init.d/sfcb stop fi $6/registration/OpenDRIM_EthernetPortConformsToProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_RegisteredEthernetPortProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_EthernetPortToComputerSystem.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_LANEndpointHostedAccessPoint.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_EthernetPort.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_LANEndpointCapabilities.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_LANEndpoint.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_EthernetPortDeviceSAPImplementation.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_EthernetPortCapabilities.sh $1 $2 $3 $4 $5 $6 if test "$3" = sfcb then /etc/init.d/sfcb start fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_LANEndpoint-remove.sh0000755000175000017500000000623211377664252030424 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m EthernetPort_OpenDRIM_LANEndpointModule cimprovider -r -m EthernetPort_OpenDRIM_LANEndpointModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_LANEndpoint.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_LANEndpointCapabilities-remove.sh0000755000175000017500000000642711377664252032744 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m EthernetPort_OpenDRIM_LANEndpointCapabilitiesModule cimprovider -r -m EthernetPort_OpenDRIM_LANEndpointCapabilitiesModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_LANEndpointCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_RegisteredEthernetPortProfile.sh0000755000175000017500000000724411377664252033004 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $4 $6/mof/OpenDRIM_RegisteredEthernetPortProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_RegisteredEthernetPortProfile provider module"; Name = "EthernetPort_OpenDRIM_RegisteredEthernetPortProfileModule"; Location = "cmpiEthernetPort_OpenDRIM_RegisteredEthernetPortProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_RegisteredEthernetPortProfile provider"; Name = "EthernetPort_OpenDRIM_RegisteredEthernetPortProfileProvider"; ProviderModuleName = "EthernetPort_OpenDRIM_RegisteredEthernetPortProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_RegisteredEthernetPortProfile provider capabilities"; ProviderModuleName = "EthernetPort_OpenDRIM_RegisteredEthernetPortProfileModule"; ProviderName = "EthernetPort_OpenDRIM_RegisteredEthernetPortProfileProvider"; ClassName = "OpenDRIM_RegisteredEthernetPortProfile"; ProviderType = {2}; Namespaces = {"$4"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID", "RegisteredOrganization", "OtherRegisteredOrganization", "RegisteredName", "RegisteredVersion", "AdvertiseTypes", "AdvertiseTypeDescriptions"}; CapabilityID = "EthernetPort_OpenDRIM_RegisteredEthernetPortProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_RegisteredEthernetPortProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/registration/OpenDRIM_EthernetPortDeviceSAPImplementation.sh0000755000175000017500000000717211377664252034037 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_EthernetPortDeviceSAPImplementation.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_EthernetPortDeviceSAPImplementation provider module"; Name = "EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationModule"; Location = "cmpiEthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_EthernetPortDeviceSAPImplementation provider"; Name = "EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProvider"; ProviderModuleName = "EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_EthernetPortDeviceSAPImplementation provider capabilities"; ProviderModuleName = "EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationModule"; ProviderName = "EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProvider"; ClassName = "OpenDRIM_EthernetPortDeviceSAPImplementation"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent"}; CapabilityID = "EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_EthernetPortDeviceSAPImplementation.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-ethernetport-1.1.2~ppa/VERSION0000644000175000017500000000000611377664252021351 0ustar guillaumeguillaume1.1.2 opendrim-lmp-ethernetport-1.1.2~ppa/test/0000755000175000017500000000000011377664252021264 5ustar guillaumeguillaumeopendrim-lmp-ethernetport-1.1.2~ppa/test/testOpenDRIM_RegisteredEthernetPortProfile.cpp0000644000175000017500000001263011377664252032311 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_RegisteredEthernetPortProfile.h" #include "OpenDRIM_RegisteredEthernetPortProfileAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_RegisteredEthernetPortProfile& instance) { os << " [OpenDRIM_RegisteredEthernetPortProfile]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToStringInt("RegisteredOrganization", RegisteredOrganization, RegisteredOrganization_isNULL); ToString("OtherRegisteredOrganization", OtherRegisteredOrganization, OtherRegisteredOrganization_isNULL); ToString("RegisteredName", RegisteredName, RegisteredName_isNULL); ToString("RegisteredVersion", RegisteredVersion, RegisteredVersion_isNULL); ToStringArrayInt("AdvertiseTypes", AdvertiseTypes, AdvertiseTypes_isNULL); ToStringArray("AdvertiseTypeDescriptions", AdvertiseTypeDescriptions, AdvertiseTypeDescriptions_isNULL); os << " [\\OpenDRIM_RegisteredEthernetPortProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-ethernetport-1.1.2~ppa/test/Makefile.am0000644000175000017500000001441611377664252023326 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ noinst_PROGRAMS = testOpenDRIM_EthernetPortConformsToProfile testOpenDRIM_RegisteredEthernetPortProfile testOpenDRIM_EthernetPortToComputerSystem testOpenDRIM_LANEndpointHostedAccessPoint testOpenDRIM_EthernetPort testOpenDRIM_LANEndpointCapabilities testOpenDRIM_LANEndpoint testOpenDRIM_EthernetPortDeviceSAPImplementation testOpenDRIM_EthernetPortCapabilities # May have to be adjusted for direct invocation testOpenDRIM_EthernetPortConformsToProfile_CPPFLAGS = -I../OpenDRIM_EthernetPortConformsToProfile/ -I../null/ -I../null/ testOpenDRIM_EthernetPortConformsToProfile_SOURCES = testOpenDRIM_EthernetPortConformsToProfile.cpp testOpenDRIM_EthernetPortConformsToProfile_LDADD = ../OpenDRIM_EthernetPortConformsToProfile/libcmpiEthernetPort_OpenDRIM_EthernetPortConformsToProfileProvider.la test-OpenDRIM_EthernetPortConformsToProfile: testOpenDRIM_EthernetPortConformsToProfile ./testOpenDRIM_EthernetPortConformsToProfile testOpenDRIM_RegisteredEthernetPortProfile_CPPFLAGS = -I../OpenDRIM_RegisteredEthernetPortProfile/ testOpenDRIM_RegisteredEthernetPortProfile_SOURCES = testOpenDRIM_RegisteredEthernetPortProfile.cpp testOpenDRIM_RegisteredEthernetPortProfile_LDADD = ../OpenDRIM_RegisteredEthernetPortProfile/libcmpiEthernetPort_OpenDRIM_RegisteredEthernetPortProfileProvider.la test-OpenDRIM_RegisteredEthernetPortProfile: testOpenDRIM_RegisteredEthernetPortProfile ./testOpenDRIM_RegisteredEthernetPortProfile # May have to be adjusted for direct invocation testOpenDRIM_EthernetPortToComputerSystem_CPPFLAGS = -I../OpenDRIM_EthernetPortToComputerSystem/ -I../null/ -I../null/ testOpenDRIM_EthernetPortToComputerSystem_SOURCES = testOpenDRIM_EthernetPortToComputerSystem.cpp testOpenDRIM_EthernetPortToComputerSystem_LDADD = ../OpenDRIM_EthernetPortToComputerSystem/libcmpiEthernetPort_OpenDRIM_EthernetPortToComputerSystemProvider.la test-OpenDRIM_EthernetPortToComputerSystem: testOpenDRIM_EthernetPortToComputerSystem ./testOpenDRIM_EthernetPortToComputerSystem # May have to be adjusted for direct invocation testOpenDRIM_LANEndpointHostedAccessPoint_CPPFLAGS = -I../OpenDRIM_LANEndpointHostedAccessPoint/ -I../null/ -I../null/ testOpenDRIM_LANEndpointHostedAccessPoint_SOURCES = testOpenDRIM_LANEndpointHostedAccessPoint.cpp testOpenDRIM_LANEndpointHostedAccessPoint_LDADD = ../OpenDRIM_LANEndpointHostedAccessPoint/libcmpiEthernetPort_OpenDRIM_LANEndpointHostedAccessPointProvider.la test-OpenDRIM_LANEndpointHostedAccessPoint: testOpenDRIM_LANEndpointHostedAccessPoint ./testOpenDRIM_LANEndpointHostedAccessPoint testOpenDRIM_EthernetPort_CPPFLAGS = -I../OpenDRIM_EthernetPort/ testOpenDRIM_EthernetPort_SOURCES = testOpenDRIM_EthernetPort.cpp testOpenDRIM_EthernetPort_LDADD = ../OpenDRIM_EthernetPort/libcmpiEthernetPort_OpenDRIM_EthernetPortProvider.la test-OpenDRIM_EthernetPort: testOpenDRIM_EthernetPort ./testOpenDRIM_EthernetPort # May have to be adjusted for direct invocation testOpenDRIM_LANEndpointCapabilities_CPPFLAGS = -I../OpenDRIM_LANEndpointCapabilities/ -I../null/ -I../null/ testOpenDRIM_LANEndpointCapabilities_SOURCES = testOpenDRIM_LANEndpointCapabilities.cpp testOpenDRIM_LANEndpointCapabilities_LDADD = ../OpenDRIM_LANEndpointCapabilities/libcmpiEthernetPort_OpenDRIM_LANEndpointCapabilitiesProvider.la test-OpenDRIM_LANEndpointCapabilities: testOpenDRIM_LANEndpointCapabilities ./testOpenDRIM_LANEndpointCapabilities testOpenDRIM_LANEndpoint_CPPFLAGS = -I../OpenDRIM_LANEndpoint/ testOpenDRIM_LANEndpoint_SOURCES = testOpenDRIM_LANEndpoint.cpp testOpenDRIM_LANEndpoint_LDADD = ../OpenDRIM_LANEndpoint/libcmpiEthernetPort_OpenDRIM_LANEndpointProvider.la test-OpenDRIM_LANEndpoint: testOpenDRIM_LANEndpoint ./testOpenDRIM_LANEndpoint # May have to be adjusted for direct invocation testOpenDRIM_EthernetPortDeviceSAPImplementation_CPPFLAGS = -I../OpenDRIM_EthernetPortDeviceSAPImplementation/ -I../null/ -I../null/ testOpenDRIM_EthernetPortDeviceSAPImplementation_SOURCES = testOpenDRIM_EthernetPortDeviceSAPImplementation.cpp testOpenDRIM_EthernetPortDeviceSAPImplementation_LDADD = ../OpenDRIM_EthernetPortDeviceSAPImplementation/libcmpiEthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProvider.la test-OpenDRIM_EthernetPortDeviceSAPImplementation: testOpenDRIM_EthernetPortDeviceSAPImplementation ./testOpenDRIM_EthernetPortDeviceSAPImplementation # May have to be adjusted for direct invocation testOpenDRIM_EthernetPortCapabilities_CPPFLAGS = -I../OpenDRIM_EthernetPortCapabilities/ -I../null/ -I../null/ testOpenDRIM_EthernetPortCapabilities_SOURCES = testOpenDRIM_EthernetPortCapabilities.cpp testOpenDRIM_EthernetPortCapabilities_LDADD = ../OpenDRIM_EthernetPortCapabilities/libcmpiEthernetPort_OpenDRIM_EthernetPortCapabilitiesProvider.la test-OpenDRIM_EthernetPortCapabilities: testOpenDRIM_EthernetPortCapabilities ./testOpenDRIM_EthernetPortCapabilities opendrim-lmp-ethernetport-1.1.2~ppa/test/testOpenDRIM_LANEndpointHostedAccessPoint.cpp0000644000175000017500000001142111377664252031742 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_LANEndpointHostedAccessPoint.h" #include "OpenDRIM_LANEndpointHostedAccessPointAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_LANEndpointHostedAccessPoint& instance) { os << " [OpenDRIM_LANEndpointHostedAccessPoint]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); os << " [\\OpenDRIM_LANEndpointHostedAccessPoint]" << endl; return os; } int main() { string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = EthernetPort_OpenDRIM_LANEndpointHostedAccessPoint_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-ethernetport-1.1.2~ppa/test/testOpenDRIM_LANEndpointCapabilities.cpp0000644000175000017500000001147111377664252030756 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_LANEndpointCapabilities.h" #include "OpenDRIM_LANEndpointCapabilitiesAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_LANEndpointCapabilities& instance) { os << " [OpenDRIM_LANEndpointCapabilities]" << endl; ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); ToStringRef("Capabilities", Capabilities, Capabilities_isNULL); ToStringArrayInt("Characteristics", Characteristics, Characteristics_isNULL); os << " [\\OpenDRIM_LANEndpointCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-ethernetport-1.1.2~ppa/test/testOpenDRIM_EthernetPortToComputerSystem.cpp0000644000175000017500000001147611377664252032210 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPortToComputerSystem.h" #include "OpenDRIM_EthernetPortToComputerSystemAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_EthernetPortToComputerSystem& instance) { os << " [OpenDRIM_EthernetPortToComputerSystem]" << endl; ToStringRef("GroupComponent", GroupComponent, GroupComponent_isNULL); ToStringRef("PartComponent", PartComponent, PartComponent_isNULL); os << " [\\OpenDRIM_EthernetPortToComputerSystem]" << endl; return os; } int main() { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = EthernetPort_OpenDRIM_EthernetPortToComputerSystem_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-ethernetport-1.1.2~ppa/test/testOpenDRIM_LANEndpoint.cpp0000644000175000017500000001550611377664252026447 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_LANEndpoint.h" #include "OpenDRIM_LANEndpointAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_LANEndpoint& instance) { os << " [OpenDRIM_LANEndpoint]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToString("OtherEnabledState", OtherEnabledState, OtherEnabledState_isNULL); ToStringInt("RequestedState", RequestedState, RequestedState_isNULL); ToStringInt("EnabledDefault", EnabledDefault, EnabledDefault_isNULL); ToStringArrayInt("AvailableRequestedStates", AvailableRequestedStates, AvailableRequestedStates_isNULL); ToStringInt("TransitioningToState", TransitioningToState, TransitioningToState_isNULL); ToString("SystemCreationClassName", SystemCreationClassName, SystemCreationClassName_isNULL); ToString("SystemName", SystemName, SystemName_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("Name", Name, Name_isNULL); ToString("Description", Description, Description_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringInt("EnabledState", EnabledState, EnabledState_isNULL); ToString("TimeOfLastStateChange", TimeOfLastStateChange, TimeOfLastStateChange_isNULL); ToString("NameFormat", NameFormat, NameFormat_isNULL); ToStringInt("ProtocolType", ProtocolType, ProtocolType_isNULL); ToString("OtherTypeDescription", OtherTypeDescription, OtherTypeDescription_isNULL); ToString("BroadcastResetSupported", BroadcastResetSupported, BroadcastResetSupported_isNULL); ToString("LANID", LANID, LANID_isNULL); ToStringInt("LANType", LANType, LANType_isNULL); ToString("OtherLANType", OtherLANType, OtherLANType_isNULL); ToString("MACAddress", MACAddress, MACAddress_isNULL); ToStringArray("AliasAddresses", AliasAddresses, AliasAddresses_isNULL); ToStringArray("GroupAddresses", GroupAddresses, GroupAddresses_isNULL); ToString("MaxDataSize", MaxDataSize, MaxDataSize_isNULL); ToStringInt("ProtocolIFType", ProtocolIFType, ProtocolIFType_isNULL); os << " [\\OpenDRIM_LANEndpoint]" << endl; return os; } int main() { string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpoint_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = EthernetPort_OpenDRIM_LANEndpoint_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = EthernetPort_OpenDRIM_LANEndpoint_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = EthernetPort_OpenDRIM_LANEndpoint_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = EthernetPort_OpenDRIM_LANEndpoint_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-ethernetport-1.1.2~ppa/test/testOpenDRIM_EthernetPortDeviceSAPImplementation.cpp0000644000175000017500000001154511377664252033350 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPortDeviceSAPImplementation.h" #include "OpenDRIM_EthernetPortDeviceSAPImplementationAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_EthernetPortDeviceSAPImplementation& instance) { os << " [OpenDRIM_EthernetPortDeviceSAPImplementation]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); os << " [\\OpenDRIM_EthernetPortDeviceSAPImplementation]" << endl; return os; } int main() { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-ethernetport-1.1.2~ppa/test/testOpenDRIM_EthernetPortCapabilities.cpp0000644000175000017500000001150511377664252031264 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPortCapabilities.h" #include "OpenDRIM_EthernetPortCapabilitiesAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_EthernetPortCapabilities& instance) { os << " [OpenDRIM_EthernetPortCapabilities]" << endl; ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); ToStringRef("Capabilities", Capabilities, Capabilities_isNULL); ToStringArrayInt("Characteristics", Characteristics, Characteristics_isNULL); os << " [\\OpenDRIM_EthernetPortCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-ethernetport-1.1.2~ppa/test/testOpenDRIM_EthernetPort.cpp0000644000175000017500000002140411377664252026751 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPort.h" #include "OpenDRIM_EthernetPortAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_EthernetPort& instance) { os << " [OpenDRIM_EthernetPort]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToString("Name", Name, Name_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToStringInt("EnabledState", EnabledState, EnabledState_isNULL); ToString("OtherEnabledState", OtherEnabledState, OtherEnabledState_isNULL); ToStringInt("RequestedState", RequestedState, RequestedState_isNULL); ToStringInt("EnabledDefault", EnabledDefault, EnabledDefault_isNULL); ToString("TimeOfLastStateChange", TimeOfLastStateChange, TimeOfLastStateChange_isNULL); ToStringArrayInt("AvailableRequestedStates", AvailableRequestedStates, AvailableRequestedStates_isNULL); ToStringInt("TransitioningToState", TransitioningToState, TransitioningToState_isNULL); ToString("SystemCreationClassName", SystemCreationClassName, SystemCreationClassName_isNULL); ToString("SystemName", SystemName, SystemName_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("DeviceID", DeviceID, DeviceID_isNULL); ToString("PowerManagementSupported", PowerManagementSupported, PowerManagementSupported_isNULL); ToStringArrayInt("PowerManagementCapabilities", PowerManagementCapabilities, PowerManagementCapabilities_isNULL); ToStringInt("Availability", Availability, Availability_isNULL); ToStringInt("StatusInfo", StatusInfo, StatusInfo_isNULL); ToString("LastErrorCode", LastErrorCode, LastErrorCode_isNULL); ToString("ErrorDescription", ErrorDescription, ErrorDescription_isNULL); ToString("ErrorCleared", ErrorCleared, ErrorCleared_isNULL); ToStringArray("OtherIdentifyingInfo", OtherIdentifyingInfo, OtherIdentifyingInfo_isNULL); ToString("PowerOnHours", PowerOnHours, PowerOnHours_isNULL); ToString("TotalPowerOnHours", TotalPowerOnHours, TotalPowerOnHours_isNULL); ToStringArray("IdentifyingDescriptions", IdentifyingDescriptions, IdentifyingDescriptions_isNULL); ToStringArrayInt("AdditionalAvailability", AdditionalAvailability, AdditionalAvailability_isNULL); ToString("MaxQuiesceTime", MaxQuiesceTime, MaxQuiesceTime_isNULL); ToStringInt("LocationIndicator", LocationIndicator, LocationIndicator_isNULL); ToString("MaxSpeed", MaxSpeed, MaxSpeed_isNULL); ToString("RequestedSpeed", RequestedSpeed, RequestedSpeed_isNULL); ToStringInt("UsageRestriction", UsageRestriction, UsageRestriction_isNULL); ToString("OtherPortType", OtherPortType, OtherPortType_isNULL); ToString("Speed", Speed, Speed_isNULL); ToString("OtherNetworkPortType", OtherNetworkPortType, OtherNetworkPortType_isNULL); ToStringInt("PortNumber", PortNumber, PortNumber_isNULL); ToStringInt("LinkTechnology", LinkTechnology, LinkTechnology_isNULL); ToString("OtherLinkTechnology", OtherLinkTechnology, OtherLinkTechnology_isNULL); ToString("PermanentAddress", PermanentAddress, PermanentAddress_isNULL); ToString("FullDuplex", FullDuplex, FullDuplex_isNULL); ToString("AutoSense", AutoSense, AutoSense_isNULL); ToString("SupportedMaximumTransmissionUnit", SupportedMaximumTransmissionUnit, SupportedMaximumTransmissionUnit_isNULL); ToString("ActiveMaximumTransmissionUnit", ActiveMaximumTransmissionUnit, ActiveMaximumTransmissionUnit_isNULL); ToStringInt("PortType", PortType, PortType_isNULL); ToStringArray("NetworkAddresses", NetworkAddresses, NetworkAddresses_isNULL); ToString("MaxDataSize", MaxDataSize, MaxDataSize_isNULL); ToStringArrayInt("Capabilities", Capabilities, Capabilities_isNULL); ToStringArray("CapabilityDescriptions", CapabilityDescriptions, CapabilityDescriptions_isNULL); ToStringArrayInt("EnabledCapabilities", EnabledCapabilities, EnabledCapabilities_isNULL); ToStringArray("OtherEnabledCapabilities", OtherEnabledCapabilities, OtherEnabledCapabilities_isNULL); os << " [\\OpenDRIM_EthernetPort]" << endl; return os; } int main() { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPort_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = EthernetPort_OpenDRIM_EthernetPort_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = EthernetPort_OpenDRIM_EthernetPort_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = EthernetPort_OpenDRIM_EthernetPort_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = EthernetPort_OpenDRIM_EthernetPort_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-ethernetport-1.1.2~ppa/test/testOpenDRIM_EthernetPortConformsToProfile.cpp0000644000175000017500000001147711377664252032315 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPortConformsToProfile.h" #include "OpenDRIM_EthernetPortConformsToProfileAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_EthernetPortConformsToProfile& instance) { os << " [OpenDRIM_EthernetPortConformsToProfile]" << endl; ToStringRef("ConformantStandard", ConformantStandard, ConformantStandard_isNULL); ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); os << " [\\OpenDRIM_EthernetPortConformsToProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/0000755000175000017500000000000011377664252026367 5ustar guillaumeguillaumeopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/Makefile.am0000644000175000017500000000505711377664252030432 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiEthernetPort_OpenDRIM_LANEndpointCapabilitiesProvider.la libcmpiEthernetPort_OpenDRIM_LANEndpointCapabilitiesProvider_la_SOURCES = OpenDRIM_LANEndpointCapabilitiesAccess.cpp OpenDRIM_LANEndpointCapabilitiesProvider.cpp cmpiOpenDRIM_LANEndpointCapabilities.cpp assocOpenDRIM_LANEndpointCapabilities.cpp # May have to be adjusted for direct invocation libcmpiEthernetPort_OpenDRIM_LANEndpointCapabilitiesProvider_la_CPPFLAGS = -I../CIM_Capabilities -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiEthernetPort_OpenDRIM_LANEndpointCapabilitiesProvider_la_LIBADD = ../Common/libcmpiEthernetPort_Common.la #../CIM_Capabilities/libcmpiEthernetPort_CIM_CapabilitiesProvider.la ../CIM_ManagedElement/libcmpiEthernetPort_CIM_ManagedElementProvider.la libcmpiEthernetPort_OpenDRIM_LANEndpointCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_LANEndpointCapabilities.h OpenDRIM_LANEndpointCapabilities.h OpenDRIM_LANEndpointCapabilitiesAccess.h ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/OpenDRIM_LANEndpointCapabilitiesAccess.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/OpenDRIM_LANEndpointCapabilitie0000644000175000017500000002610711377664252034217 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_LANEndpointCapabilitiesAccess.h" int EthernetPort_OpenDRIM_LANEndpointCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(EthernetPort_CIM_Capabilities_load(broker, errorMessage)); CF_assert(EthernetPort_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(EthernetPort_CIM_Capabilities_unload(errorMessage)); CF_assert(EthernetPort_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_isAssociated(const Instance& Capabilities, const Instance& ManagedElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_enumerateCapabilitiess(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_enumerateCapabilitiess(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; EthernetPort_OpenDRIM_LANEndpointCapabilities_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), Capabilities_classnames[0], ManagedElement_classnames[0], Capabilities_role.c_str(), ManagedElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_referenceCapabilitiesToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_LANEndpointCapabilities& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath Capabilities_objectpath; instance.getCapabilities(Capabilities_objectpath); Instance Capabilities_instance; CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_getCapabilities(broker, ctx, Capabilities_objectpath, Capabilities_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_isAssociated(Capabilities_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_populate(instance, errorMessage)); _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpointCapabilities& newInstance, const OpenDRIM_LANEndpointCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpointCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpointCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_associatorCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector ManagedElement_instances; if (discriminant=="a") CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& Capabilities_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Capabilities_instances; if (discriminant=="a") CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_LANEndpointCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < ManagedElement_instances.size(); i++) { OpenDRIM_LANEndpointCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_populate(instance, errorMessage)); } OpenDRIM_LANEndpointCapabilities_instances.push_back(instance); } _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_LANEndpointCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Capabilities_instances.size(); i++) { OpenDRIM_LANEndpointCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_populate(instance, errorMessage)); } OpenDRIM_LANEndpointCapabilities_instances.push_back(instance); } _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_populate(OpenDRIM_LANEndpointCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/OpenDRIM_LANEndpointCapabilitiesProvider.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/OpenDRIM_LANEndpointCapabilitie0000644000175000017500000004330211377664252034213 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_LANEndpointCapabilities.h" #include "OpenDRIM_LANEndpointCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderSetInstance EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderModifyInstance #endif int EthernetPort_OpenDRIM_LANEndpointCapabilities_init(const CMPIBroker* broker); int EthernetPort_OpenDRIM_LANEndpointCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_LANEndpointCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = EthernetPort_OpenDRIM_LANEndpointCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LANEndpointCapabilities instance; EthernetPort_OpenDRIM_LANEndpointCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = EthernetPort_OpenDRIM_LANEndpointCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LANEndpointCapabilities newInstance, oldInstance; EthernetPort_OpenDRIM_LANEndpointCapabilities_toCPP(_broker, ci, newInstance); EthernetPort_OpenDRIM_LANEndpointCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LANEndpointCapabilities instance; EthernetPort_OpenDRIM_LANEndpointCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = EthernetPort_OpenDRIM_LANEndpointCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LANEndpointCapabilities instance; EthernetPort_OpenDRIM_LANEndpointCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_LANEndpointCapabilities_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointCapabilitiesProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = EthernetPort_OpenDRIM_LANEndpointCapabilities_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int EthernetPort_OpenDRIM_LANEndpointCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_LANEndpointCapabilities_init FAILED: " + (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_LANEndpointCapabilities_unload FAILED: " + (string) OpenDRIM_LANEndpointCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define EthernetPort_OpenDRIM_LANEndpointCapabilities_INIT if (EthernetPort_OpenDRIM_LANEndpointCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(EthernetPort_OpenDRIM_LANEndpointCapabilitiesProvider, EthernetPort_OpenDRIM_LANEndpointCapabilitiesProvider, _broker, EthernetPort_OpenDRIM_LANEndpointCapabilities_INIT); CMAssociationMIStub(EthernetPort_OpenDRIM_LANEndpointCapabilitiesProvider, EthernetPort_OpenDRIM_LANEndpointCapabilitiesProvider, _broker, EthernetPort_OpenDRIM_LANEndpointCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/OpenDRIM_LANEndpointCapabilitiesAccess.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/OpenDRIM_LANEndpointCapabilitie0000644000175000017500000001101211377664252034204 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_LANENDPOINTCAPABILITIESACCESS_H_ #define OPENDRIM_LANENDPOINTCAPABILITIESACCESS_H_ #include "EthernetPort_Common.h" #include "OpenDRIM_LANEndpointCapabilities.h" #include "assocOpenDRIM_LANEndpointCapabilities.h" int EthernetPort_OpenDRIM_LANEndpointCapabilities_load(const CMPIBroker* broker, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointCapabilities_unload(string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_LANEndpointCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_LANEndpointCapabilities& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpointCapabilities& newInstance, const OpenDRIM_LANEndpointCapabilities& oldInstance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpointCapabilities& instance, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpointCapabilities& instance, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointCapabilities_associatorCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_LANEndpointCapabilities_associatorManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& Capabilities_associatedInstances, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_LANEndpointCapabilities_referenceCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const vector& ManagedElement_instances, vector& OpenDRIM_LANEndpointCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_LANEndpointCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_LANEndpointCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_LANEndpointCapabilities_populate(OpenDRIM_LANEndpointCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_LANENDPOINTCAPABILITIESACCESS_H_*/ ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/cmpiOpenDRIM_LANEndpointCapabilities.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/cmpiOpenDRIM_LANEndpointCapabil0000644000175000017500000000445311377664252034215 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_LANENDPOINTCAPABILITIES_H_ #define CMPIOPENDRIM_LANENDPOINTCAPABILITIES_H_ #include "OpenDRIM_LANEndpointCapabilities.h" CMPIObjectPath* EthernetPort_OpenDRIM_LANEndpointCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_LANEndpointCapabilities& instance); CMPIInstance* EthernetPort_OpenDRIM_LANEndpointCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_LANEndpointCapabilities& instance); void EthernetPort_OpenDRIM_LANEndpointCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_LANEndpointCapabilities& instance); void EthernetPort_OpenDRIM_LANEndpointCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_LANEndpointCapabilities& instance); #endif /*CMPIOPENDRIM_LANENDPOINTCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/assocOpenDRIM_LANEndpointCapabilities.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/assocOpenDRIM_LANEndpointCapabi0000644000175000017500000000633711377664252034224 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_LANENDPOINTCAPABILITIES_H_ #define ASSOCOPENDRIM_LANENDPOINTCAPABILITIES_H_ #include "OpenDRIM_LANEndpointCapabilitiesAccess.h" int EthernetPort_OpenDRIM_LANEndpointCapabilities_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointCapabilities_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int EthernetPort_OpenDRIM_LANEndpointCapabilities_enumerateCapabilitiess(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointCapabilities_getCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointCapabilities_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpointCapabilities_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_LANENDPOINTCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/assocOpenDRIM_LANEndpointCapabilities.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/assocOpenDRIM_LANEndpointCapabi0000644000175000017500000002142611377664252034220 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "assocOpenDRIM_LANEndpointCapabilities.h" int EthernetPort_OpenDRIM_LANEndpointCapabilities_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = EthernetPort_OpenDRIM_LANEndpointCapabilities_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "Capabilities") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "ManagedElement") != 0) return OK; CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_associatorCapabilitiesToManagedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "ManagedElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Capabilities") != 0) return OK; CF_assert(EthernetPort_OpenDRIM_LANEndpointCapabilities_associatorManagedElementToCapabilities(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_enumerateCapabilitiess(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Capabilities_NAMESPACE, Capabilities_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(EthernetPort_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(EthernetPort_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, EthernetPort_CIM_Capabilities_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_getCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Capabilities_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Capabilities_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_Capabilities _instance; EthernetPort_CIM_Capabilities_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(EthernetPort_CIM_Capabilities_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, EthernetPort_CIM_Capabilities_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, ManagedElement_NAMESPACE, ManagedElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(EthernetPort_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(EthernetPort_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, EthernetPort_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpointCapabilities_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), ManagedElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), ManagedElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; EthernetPort_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(EthernetPort_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, EthernetPort_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/OpenDRIM_LANEndpointCapabilities.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/OpenDRIM_LANEndpointCapabilitie0000644000175000017500000000771211377664252034220 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_LANENDPOINTCAPABILITIES_H_ #define OPENDRIM_LANENDPOINTCAPABILITIES_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_Capabilities.h" #include "CIM_CapabilitiesAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_LANEndpointCapabilities_classnames[] = {"OpenDRIM_LANEndpointCapabilities"}; static string OpenDRIM_LANEndpointCapabilities_NAMESPACE = _NAMESPACE; const static string Capabilities_role = "Capabilities"; const static char* Capabilities_classnames[] = {"CIM_Capabilities"}; const static string Capabilities_NAMESPACE = _NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"CIM_ManagedElement"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_LANEndpointCapabilities { public: Objectpath ManagedElement; bool ManagedElement_isNULL; Objectpath Capabilities; bool Capabilities_isNULL; vector Characteristics; bool Characteristics_isNULL; OpenDRIM_LANEndpointCapabilities() { ManagedElement_isNULL = true; Capabilities_isNULL = true; Characteristics_isNULL = true; } ~OpenDRIM_LANEndpointCapabilities() {} string getKeys() const { return CF_toLowCase(".ManagedElement=\"" + CF_quoteString(ManagedElement.toString()) + "\""".Capabilities=\"" + CF_quoteString(Capabilities.toString()) + "\""); } int getManagedElement(Objectpath& value) const { if (ManagedElement_isNULL==true) return NOT_FOUND; value = ManagedElement; return OK; } int setManagedElement(const Objectpath& newValue) { ManagedElement = newValue; ManagedElement.setNamespace(ManagedElement_NAMESPACE); ManagedElement_isNULL = false; return OK; } int getCapabilities(Objectpath& value) const { if (Capabilities_isNULL==true) return NOT_FOUND; value = Capabilities; return OK; } int setCapabilities(const Objectpath& newValue) { Capabilities = newValue; Capabilities.setNamespace(Capabilities_NAMESPACE); Capabilities_isNULL = false; return OK; } int getCharacteristics(vector& value) const { if (Characteristics_isNULL==true) return NOT_FOUND; value = Characteristics; return OK; } int setCharacteristics(const vector& newValue) { Characteristics = newValue; Characteristics_isNULL = false; return OK; } }; #endif /*OPENDRIM_LANENDPOINTCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/cmpiOpenDRIM_LANEndpointCapabilities.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpointCapabilities/cmpiOpenDRIM_LANEndpointCapabil0000644000175000017500000000664311377664252034220 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 , , ###############################################################################*/ #include "cmpiOpenDRIM_LANEndpointCapabilities.h" CMPIObjectPath* EthernetPort_OpenDRIM_LANEndpointCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_LANEndpointCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_LANEndpointCapabilities_classnames[0], OpenDRIM_LANEndpointCapabilities_NAMESPACE); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); if (!instance.Capabilities_isNULL) op.addKey("Capabilities", instance.Capabilities); _L_; return op.getHdl(); } CMPIInstance* EthernetPort_OpenDRIM_LANEndpointCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_LANEndpointCapabilities& instance) { _E_; Objectpath op(broker, EthernetPort_OpenDRIM_LANEndpointCapabilities_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Characteristics_isNULL) ci.setProperty("Characteristics", instance.Characteristics); _L_; return ci.getHdl(); } void EthernetPort_OpenDRIM_LANEndpointCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_LANEndpointCapabilities& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Capabilities", instance.Capabilities) == OK) instance.Capabilities_isNULL = false; if (op.getKey("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } void EthernetPort_OpenDRIM_LANEndpointCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_LANEndpointCapabilities& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; if (inst.getProperty("Capabilities", instance.Capabilities) == OK) instance.Capabilities_isNULL = false; if (inst.getProperty("Characteristics", instance.Characteristics) == OK) instance.Characteristics_isNULL = false; _L_; } opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_RegisteredEthernetPortProfile/0000755000175000017500000000000011377664252027724 5ustar guillaumeguillaumeopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_RegisteredEthernetPortProfile/Makefile.am0000644000175000017500000000430711377664252031764 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiEthernetPort_OpenDRIM_RegisteredEthernetPortProfileProvider.la libcmpiEthernetPort_OpenDRIM_RegisteredEthernetPortProfileProvider_la_SOURCES = OpenDRIM_RegisteredEthernetPortProfileAccess.cpp OpenDRIM_RegisteredEthernetPortProfileProvider.cpp cmpiOpenDRIM_RegisteredEthernetPortProfile.cpp libcmpiEthernetPort_OpenDRIM_RegisteredEthernetPortProfileProvider_la_LIBADD = ../Common/libcmpiEthernetPort_Common.la libcmpiEthernetPort_OpenDRIM_RegisteredEthernetPortProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_RegisteredEthernetPortProfile.h OpenDRIM_RegisteredEthernetPortProfile.h OpenDRIM_RegisteredEthernetPortProfileAccess.h ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_RegisteredEthernetPortProfile/cmpiOpenDRIM_RegisteredEthernetPortProfile.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_RegisteredEthernetPortProfile/cmpiOpenDRIM_RegisteredEt0000644000175000017500000001171411377664252034547 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_RegisteredEthernetPortProfile.h" CMPIObjectPath* EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RegisteredEthernetPortProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_RegisteredEthernetPortProfile_classnames[0], OpenDRIM_RegisteredEthernetPortProfile_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RegisteredEthernetPortProfile& instance) { _E_; Objectpath op(broker, EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.RegisteredOrganization_isNULL) ci.setProperty("RegisteredOrganization", instance.RegisteredOrganization); if (!instance.OtherRegisteredOrganization_isNULL) ci.setProperty("OtherRegisteredOrganization", instance.OtherRegisteredOrganization); if (!instance.RegisteredName_isNULL) ci.setProperty("RegisteredName", instance.RegisteredName); if (!instance.RegisteredVersion_isNULL) ci.setProperty("RegisteredVersion", instance.RegisteredVersion); if (!instance.AdvertiseTypes_isNULL) ci.setProperty("AdvertiseTypes", instance.AdvertiseTypes); if (!instance.AdvertiseTypeDescriptions_isNULL) ci.setProperty("AdvertiseTypeDescriptions", instance.AdvertiseTypeDescriptions); _L_; return ci.getHdl(); } void EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RegisteredEthernetPortProfile& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RegisteredEthernetPortProfile& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; if (inst.getProperty("RegisteredOrganization", instance.RegisteredOrganization) == OK) instance.RegisteredOrganization_isNULL = false; if (inst.getProperty("OtherRegisteredOrganization", instance.OtherRegisteredOrganization) == OK) instance.OtherRegisteredOrganization_isNULL = false; if (inst.getProperty("RegisteredName", instance.RegisteredName) == OK) instance.RegisteredName_isNULL = false; if (inst.getProperty("RegisteredVersion", instance.RegisteredVersion) == OK) instance.RegisteredVersion_isNULL = false; if (inst.getProperty("AdvertiseTypes", instance.AdvertiseTypes) == OK) instance.AdvertiseTypes_isNULL = false; if (inst.getProperty("AdvertiseTypeDescriptions", instance.AdvertiseTypeDescriptions) == OK) instance.AdvertiseTypeDescriptions_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_RegisteredEthernetPortProfile/OpenDRIM_RegisteredEthernetPortProfileAccess.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_RegisteredEthernetPortProfile/OpenDRIM_RegisteredEthern0000644000175000017500000000632311377664252034553 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_REGISTEREDETHERNETPORTPROFILEACCESS_H_ #define OPENDRIM_REGISTEREDETHERNETPORTPROFILEACCESS_H_ #include "EthernetPort_Common.h" #include "OpenDRIM_RegisteredEthernetPortProfile.h" int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_load(const CMPIBroker* broker, string& errorMessage); int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_unload(string& errorMessage); int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RegisteredEthernetPortProfile& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredEthernetPortProfile& newInstance, const OpenDRIM_RegisteredEthernetPortProfile& oldInstance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredEthernetPortProfile& instance, string& errorMessage); int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredEthernetPortProfile& instance, string& errorMessage); int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_populate(OpenDRIM_RegisteredEthernetPortProfile& instance, string& errorMessage); #endif /*OPENDRIM_REGISTEREDETHERNETPORTPROFILEACCESS_H_*/ ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_RegisteredEthernetPortProfile/OpenDRIM_RegisteredEthernetPortProfile.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_RegisteredEthernetPortProfile/OpenDRIM_RegisteredEthern0000644000175000017500000001363611377664252034560 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_REGISTEREDETHERNETPORTPROFILE_H_ #define OPENDRIM_REGISTEREDETHERNETPORTPROFILE_H_ #include const static char* OpenDRIM_RegisteredEthernetPortProfile_classnames[] = {"OpenDRIM_RegisteredEthernetPortProfile"}; static string OpenDRIM_RegisteredEthernetPortProfile_NAMESPACE = _INTEROP_NAMESPACE; class OpenDRIM_RegisteredEthernetPortProfile { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstanceID; bool InstanceID_isNULL; unsigned short RegisteredOrganization; bool RegisteredOrganization_isNULL; string OtherRegisteredOrganization; bool OtherRegisteredOrganization_isNULL; string RegisteredName; bool RegisteredName_isNULL; string RegisteredVersion; bool RegisteredVersion_isNULL; vector AdvertiseTypes; bool AdvertiseTypes_isNULL; vector AdvertiseTypeDescriptions; bool AdvertiseTypeDescriptions_isNULL; OpenDRIM_RegisteredEthernetPortProfile() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstanceID_isNULL = true; RegisteredOrganization_isNULL = true; OtherRegisteredOrganization_isNULL = true; RegisteredName_isNULL = true; RegisteredVersion_isNULL = true; AdvertiseTypes_isNULL = true; AdvertiseTypeDescriptions_isNULL = true; } ~OpenDRIM_RegisteredEthernetPortProfile() {} string getKeys() const { return CF_toLowCase(".InstanceID=\"" + CF_quoteString(InstanceID) + "\""); } int getCaption(string& value) const { if (Caption_isNULL==true) return NOT_FOUND; value = Caption; return OK; } int setCaption(const string& newValue) { Caption = newValue; Caption_isNULL = false; return OK; } int getDescription(string& value) const { if (Description_isNULL==true) return NOT_FOUND; value = Description; return OK; } int setDescription(const string& newValue) { Description = newValue; Description_isNULL = false; return OK; } int getElementName(string& value) const { if (ElementName_isNULL==true) return NOT_FOUND; value = ElementName; return OK; } int setElementName(const string& newValue) { ElementName = newValue; ElementName_isNULL = false; return OK; } int getInstanceID(string& value) const { if (InstanceID_isNULL==true) return NOT_FOUND; value = InstanceID; return OK; } int setInstanceID(const string& newValue) { InstanceID = newValue; InstanceID_isNULL = false; return OK; } int getRegisteredOrganization(unsigned short& value) const { if (RegisteredOrganization_isNULL==true) return NOT_FOUND; value = RegisteredOrganization; return OK; } int setRegisteredOrganization(const unsigned short& newValue) { RegisteredOrganization = newValue; RegisteredOrganization_isNULL = false; return OK; } int getOtherRegisteredOrganization(string& value) const { if (OtherRegisteredOrganization_isNULL==true) return NOT_FOUND; value = OtherRegisteredOrganization; return OK; } int setOtherRegisteredOrganization(const string& newValue) { OtherRegisteredOrganization = newValue; OtherRegisteredOrganization_isNULL = false; return OK; } int getRegisteredName(string& value) const { if (RegisteredName_isNULL==true) return NOT_FOUND; value = RegisteredName; return OK; } int setRegisteredName(const string& newValue) { RegisteredName = newValue; RegisteredName_isNULL = false; return OK; } int getRegisteredVersion(string& value) const { if (RegisteredVersion_isNULL==true) return NOT_FOUND; value = RegisteredVersion; return OK; } int setRegisteredVersion(const string& newValue) { RegisteredVersion = newValue; RegisteredVersion_isNULL = false; return OK; } int getAdvertiseTypes(vector& value) const { if (AdvertiseTypes_isNULL==true) return NOT_FOUND; value = AdvertiseTypes; return OK; } int setAdvertiseTypes(const vector& newValue) { AdvertiseTypes = newValue; AdvertiseTypes_isNULL = false; return OK; } int getAdvertiseTypeDescriptions(vector& value) const { if (AdvertiseTypeDescriptions_isNULL==true) return NOT_FOUND; value = AdvertiseTypeDescriptions; return OK; } int setAdvertiseTypeDescriptions(const vector& newValue) { AdvertiseTypeDescriptions = newValue; AdvertiseTypeDescriptions_isNULL = false; return OK; } }; #endif /*OPENDRIM_REGISTEREDETHERNETPORTPROFILE_H_*/ ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_RegisteredEthernetPortProfile/OpenDRIM_RegisteredEthernetPortProfileAccess.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_RegisteredEthernetPortProfile/OpenDRIM_RegisteredEthern0000644000175000017500000001005611377664252034551 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_RegisteredEthernetPortProfileAccess.h" const string InstanceID="OpenDRIM:EthernetPort:1.0.0"; int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; OpenDRIM_RegisteredEthernetPortProfile instance; instance.setInstanceID(InstanceID); if(discriminant=="ei") CF_assert(EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_populate(instance,errorMessage)); result.push_back(instance); _L_; return OK; } int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RegisteredEthernetPortProfile& instance, const char** properties, string& errorMessage) { _E_; if (instance.InstanceID!=InstanceID) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_populate(instance,errorMessage)); _L_; return OK; } int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredEthernetPortProfile& newInstance, const OpenDRIM_RegisteredEthernetPortProfile& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredEthernetPortProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredEthernetPortProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_populate(OpenDRIM_RegisteredEthernetPortProfile& instance, string& errorMessage) { _E_; vector AdvertiseTypes; instance.setRegisteredName("Ethernet Port"); instance.setRegisteredVersion("1.0.0"); instance.setRegisteredOrganization(2); // DMTF AdvertiseTypes.push_back(2); // Not Advertised instance.setAdvertiseTypes(AdvertiseTypes); _L_; return OK; } ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_RegisteredEthernetPortProfile/cmpiOpenDRIM_RegisteredEthernetPortProfile.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_RegisteredEthernetPortProfile/cmpiOpenDRIM_RegisteredEt0000644000175000017500000000456311377664252034553 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_REGISTEREDETHERNETPORTPROFILE_H_ #define CMPIOPENDRIM_REGISTEREDETHERNETPORTPROFILE_H_ #include "OpenDRIM_RegisteredEthernetPortProfile.h" CMPIObjectPath* EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RegisteredEthernetPortProfile& instance); CMPIInstance* EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RegisteredEthernetPortProfile& instance); void EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RegisteredEthernetPortProfile& instance); void EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RegisteredEthernetPortProfile& instance); #endif /*CMPIOPENDRIM_REGISTEREDETHERNETPORTPROFILE_H_*/ ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_RegisteredEthernetPortProfile/OpenDRIM_RegisteredEthernetPortProfileProvider.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_RegisteredEthernetPortProfile/OpenDRIM_RegisteredEthern0000644000175000017500000002743611377664252034563 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_RegisteredEthernetPortProfile.h" #include "OpenDRIM_RegisteredEthernetPortProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define EthernetPort_OpenDRIM_RegisteredEthernetPortProfileProviderSetInstance EthernetPort_OpenDRIM_RegisteredEthernetPortProfileProviderModifyInstance #endif int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_init(const CMPIBroker* broker); int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_RegisteredEthernetPortProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_RegisteredEthernetPortProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredEthernetPortProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_RegisteredEthernetPortProfileProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredEthernetPortProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_RegisteredEthernetPortProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredEthernetPortProfile instance; EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredEthernetPortProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_RegisteredEthernetPortProfileProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredEthernetPortProfile newInstance, oldInstance; EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCPP(_broker, ci, newInstance); EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredEthernetPortProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredEthernetPortProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_RegisteredEthernetPortProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredEthernetPortProfile instance; EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_RegisteredEthernetPortProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredEthernetPortProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredEthernetPortProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_RegisteredEthernetPortProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredEthernetPortProfile instance; EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredEthernetPortProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredEthernetPortProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_RegisteredEthernetPortProfileProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_init FAILED: " + (string) OpenDRIM_RegisteredEthernetPortProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_unload FAILED: " + (string) OpenDRIM_RegisteredEthernetPortProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_INIT if (EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_init(_broker) < 0) return NULL CMInstanceMIStub(EthernetPort_OpenDRIM_RegisteredEthernetPortProfileProvider, EthernetPort_OpenDRIM_RegisteredEthernetPortProfileProvider, _broker, EthernetPort_OpenDRIM_RegisteredEthernetPortProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-ethernetport-1.1.2~ppa/acinclude.m40000644000175000017500000002113511377664252022500 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ AC_DEFUN([SHOW_COPYRIGHT], [ echo "################################################################################# # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# " ] ) AC_DEFUN([CHECK_CIMSERVER], [ AC_MSG_CHECKING(for CIM servers) if test x"$CIMSERVER" == x then AC_MSG_ERROR([[please define the CIMSERVER variable (see ./configure --help)]]) fi if test "$CIMSERVER" != pegasus && test "$CIMSERVER" != sfcb && test "$CIMSERVER" != openwbem then AC_MSG_ERROR([[please define the CIMSERVER variable (see ./configure --help)]]) fi if test "$CIMSERVER" == pegasus then if !( command -v cimmof > /dev/null ) then AC_MSG_ERROR([[no. the Pegasus mof compiler could not be found (cimmof)]]) fi fi if test "$CIMSERVER" == openwbem then if !( command -v owmofc > /dev/null) then AC_MSG_ERROR([[no. the OpenWBEM mof compiler could not be found (owmofc)]]) fi fi if test "$CIMSERVER" == sfcb then if !( command -v sfcbd > /dev/null ) then AC_MSG_ERROR([[no. the SBLIM sfcb deamon could not be found (sfcbd)]]) fi if !( command -v sfcbstage > /dev/null ) then AC_MSG_ERROR([[no. the SBLIM mof stager could not be found (sfcbstage)]]) fi if !( command -v sfcbrepos > /dev/null ) then AC_MSG_ERROR([[no. the SBLIM repository builder could no be found (sfcbrepos)]]) fi fi if test "$CIMSERVER" == pegasus then if test x"$prefix" == xNONE then if test "$HW" == X86_64 || test "$HW" == IA64 then PROVIDERDIR_TMP=/usr/lib64/Pegasus/providers COMMONLIBDIR_TMP=/usr/lib64 OPENDRIMCOMMONLIBDIR_TMP=/usr/lib64 else PROVIDERDIR_TMP=/usr/lib/Pegasus/providers COMMONLIBDIR_TMP=/usr/lib OPENDRIMCOMMONLIBDIR_TMP=/usr/lib fi OPENDRIMCOMMONINCLUDE_TMP=/usr/include/OpenDRIM else if test "$HW" == X86_64 || test "$HW" == IA64 then PROVIDERDIR_TMP=$prefix/lib64/Pegasus/providers COMMONLIBDIR_TMP=$prefix/lib64 OPENDRIMCOMMONLIBDIR_TMP=$prefix/lib64 else PROVIDERDIR_TMP=$prefix/lib/Pegasus/providers COMMONLIBDIR_TMP=$prefix/lib OPENDRIMCOMMONLIBDIR_TMP=$prefix/lib fi OPENDRIMCOMMONINCLUDE_TMP=$prefix/include/OpenDRIM fi if test x"$PEGASUS_HOME" != x then PROVIDERDIR_TMP=$PEGASUS_HOME/lib COMMONLIBDIR_TMP=$PEGASUS_HOME/lib OPENDRIMCOMMONLIBDIR_TMP=$PEGASUS_HOME/lib OPENDRIMCOMMONINCLUDE_TMP=$PEGASUS_HOME/include/OpenDRIM fi fi if test "$CIMSERVER" == sfcb then if test x"$prefix" == xNONE then PROVIDERDIR_TMP=$ac_default_prefix/lib/cmpi COMMONLIBDIR_TMP=$ac_default_prefix/lib OPENDRIMCOMMONLIBDIR_TMP=$ac_default_prefix/lib OPENDRIMCOMMONINCLUDE_TMP=$ac_default_prefix/include/OpenDRIM else PROVIDERDIR_TMP=$prefix/lib/cmpi COMMONLIBDIR_TMP=$prefix/lib OPENDRIMCOMMONLIBDIR_TMP=$prefix/lib OPENDRIMCOMMONINCLUDE_TMP=$prefix/include/OpenDRIM fi fi if test "$CIMSERVER" == openwbem then if test x"$prefix" == xNONE then if test "$HW" == X86_64 || test "$HW" == IA64 then PROVIDERDIR_TMP=/usr/lib64/openwbem/cmpiproviders COMMONLIBDIR_TMP=/usr/lib64 OPENDRIMCOMMONLIBDIR_TMP=/usr/lib64 else PROVIDERDIR_TMP=/usr/lib/openwbem/cmpiproviders COMMONLIBDIR_TMP=/usr/lib OPENDRIMCOMMONLIBDIR_TMP=/usr/lib fi OPENDRIMCOMMONINCLUDE_TMP=/usr/include/OpenDRIM else PROVIDERDIR_TMP=$prefix/lib/openwbem/cmpiproviders COMMONLIBDIR_TMP=$prefix/lib OPENDRIMCOMMONLIBDIR_TMP=$prefix/lib OPENDRIMCOMMONINCLUDE_TMP=$prefix/include/OpenDRIM fi fi if test x"$PROVIDERDIR" = x then PROVIDERDIR=$PROVIDERDIR_TMP fi if test x"$COMMONLIBDIR" = x then COMMONLIBDIR=$COMMONLIBDIR_TMP fi if test x"$OPENDRIMCOMMONLIBDIR" = x then OPENDRIMCOMMONLIBDIR=$OPENDRIMCOMMONLIBDIR_TMP fi if test x"$OPENDRIMCOMMONINCLUDE" = x then OPENDRIMCOMMONINCLUDE=$OPENDRIMCOMMONINCLUDE_TMP fi TEMP_CPPFLAGS="$CPPFLAGS -D_REENTRANT" CFLAGS="-Wall -Wunused -fPIC -O2 $CFLAGS" CXXFLAGS="-Wall -Wunused -fPIC -fno-rtti -fno-exceptions -O2 $CXXFLAGS" LDFLAGS="$LDFLAGS -L. -L$PROVIDERDIR -L$COMMONLIBDIR" AC_MSG_RESULT(yes) ] ) AC_DEFUN([CHECK_CIMNAMESPACE], [ if test x"$CIMNAMESPACE" == x then CIMNAMESPACE=root/cimv2 fi TEMP_CPPFLAGS="$TEMP_CPPFLAGS -D_NAMESPACE=\\\"$CIMNAMESPACE\\\"" ] ) AC_DEFUN([CHECK_INTEROPNAMESPACE], [ if test x"$INTEROPNAMESPACE" == x then if test "$CIMSERVER" == pegasus then INTEROPNAMESPACE=Interop fi if test "$CIMSERVER" == openwbem then INTEROPNAMESPACE=root/Interop fi if test "$CIMSERVER" == sfcb then INTEROPNAMESPACE=Interop fi fi TEMP_CPPFLAGS="$TEMP_CPPFLAGS -D_INTEROP_NAMESPACE=\\\"$INTEROPNAMESPACE\\\"" ] ) AC_DEFUN([CHECK_OPENDRIMCOMMONHEADERS], [ AC_MSG_CHECKING(for OpenDRIM Common headers) _HEADERS="Common.h Datastore.h CMPIBroking.h Association.h Indication.h Instance.h Objectpath.h Transtype.h" for _HEADER in $_HEADERS do if !( test -e $OPENDRIMCOMMONINCLUDE/$_HEADER ) then AC_MSG_ERROR([[no. Could not find OpenDRIM Common headers:] $_HEADER]) fi done AC_MSG_RESULT(yes) ] ) AC_DEFUN([CHECK_OPENDRIMCOMMONLIBRARY], [ AC_MSG_CHECKING(for OpenDRIM Common library) if test -e $OPENDRIMCOMMONLIBDIR/libopendrim.so then AC_MSG_RESULT(yes) else AC_MSG_ERROR([[no. The OpenDRIM Common library could not be found (libopendrim.so)]]) fi ] ) AC_DEFUN([_CHECK_CMPIHEADERS], [ AC_MSG_CHECKING($1) AC_TRY_LINK( [ #include #include #include ], [ CMPIBroker broker; CMPIStatus status = {CMPI_RC_OK, NULL}; CMPIString *s = CMNewString(&broker, "TEST", &status); ], [ have_CMPI=yes ], [ have_CMPI=no ]) ]) AC_DEFUN([CHECK_CMPIHEADERS], [ AC_MSG_CHECKING(for CMPI headers) CPPFLAGS="$TEMP_CPPFLAGS -DCMPI_PLATFORM_LINUX_GENERIC_GNU -I$OPENDRIMCOMMONINCLUDE/cmpi" _CHECK_CMPIHEADERS($OPENDRIMCOMMONINCLUDE) if test "$have_CMPI" == "yes" then CPPFLAGS="$TEMP_CPPFLAGS" AC_MSG_RESULT(yes) else _CHECK_CMPIHEADERS(standard) if test "$have_CMPI" == "yes" then CPPFLAGS="$TEMP_CPPFLAGS" AC_MSG_RESULT(yes) fi fi if test "$have_CMPI" == "no" then AC_MSG_ERROR([[no. The CMPI headers could not be found (cmpidt.h, cmpimacs.h, cmpift.h)]]) fi ] ) opendrim-lmp-ethernetport-1.1.2~ppa/Common/0000755000175000017500000000000011377664252021535 5ustar guillaumeguillaumeopendrim-lmp-ethernetport-1.1.2~ppa/Common/Makefile.am0000644000175000017500000000347011377664252023575 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ commonlibdir = @COMMONLIBDIR@ commonlib_LTLIBRARIES = libcmpiEthernetPort_Common.la libcmpiEthernetPort_Common_la_SOURCES = EthernetPort_Common.cpp libcmpiEthernetPort_Common_la_LDFLAGS = -avoid-version libcmpiEthernetPort_Common_la_LIBADD = -lopendrim noinst_HEADERS = EthernetPort_Common.h opendrim-lmp-ethernetport-1.1.2~ppa/Common/EthernetPort_Common.cpp0000644000175000017500000000631511377664252026201 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "EthernetPort_Common.h" int CF_getCapabilities(vector& capabilities,vector& enabledCapabilities,const string& deviceid,string& errorMessage) { string cmd; vector cmdoutput; capabilities.clear(); enabledCapabilities.clear(); // Lokking for Wake on LAN capability cmd ="ethtool "; cmd+=deviceid; cmd+=" | grep Wake | awk -F Wake-on: '{print $2;}'"; CF_assert(CF_runCommandToLines(cmd,cmdoutput,0,errorMessage)); if(cmdoutput.size()>0) { if(cmdoutput[0].find('d',0)==string::npos) capabilities.push_back(WAKE_ON_LAN); if(cmdoutput[1].find('d',0)==string::npos) enabledCapabilities.push_back(WAKE_ON_LAN); } // Can not determine the following capabilities: // - Alert on LAN // - Failover // - Load Balancing if(!capabilities.size()) capabilities.push_back(UNKNOWN); if(!enabledCapabilities.size()) enabledCapabilities.push_back(UNKNOWN); return OK; } int CF_getHWaddress(const string& ifName, string& hwaddr, string& errorMessage) { string erroutput; string ifcfg_cmd("/sbin/ifconfig "); ifcfg_cmd += ifName; ifcfg_cmd += " | awk '/HWaddr/ {for(i=1;i<=NF;++i) {if ($i == \"HWaddr\") {print $(i+1); exit; } } }'"; hwaddr.clear(); CF_assert(CF_runCommand(ifcfg_cmd, hwaddr, erroutput, errorMessage)); return OK; } int CF_getEthEnabledState(const string& ifName, unsigned int& enabledState ,string& errorMessage) { string value; string stderr; CF_assert( CF_runCommand("/sbin/ifconfig " + ifName, value, stderr, errorMessage)); if(value.find("UP")!=string::npos) { if(value.find("RUNNING")!=string::npos) enabledState=ES_ENABLE; else enabledState=ES_ENABLED_OFFLINE; } else enabledState=ES_DISABLE; return OK; } opendrim-lmp-ethernetport-1.1.2~ppa/Common/EthernetPort_Common.h0000644000175000017500000000735611377664252025654 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ETHERNETPORT_COMMON_H_ #define ETHERNETPORT_COMMON_H_ #include // Define constants for the Link Technology #define LT_UNKNOWN 0 #define LT_OTHER 1 #define LT_ETHERNET 2 #define LT_IB 3 // InfiniBand #define LT_FC 4 // Fibre Channel #define LT_FDDI 5 // Fiber Distributed Data Interface #define LT_ATM 6 // Asynchronous Transfer Mode #define LT_TOKEN_RING 7 #define LT_FRAME_RELAY 8 #define LT_INFRARED 9 #define LT_BLUETOOTH 10 #define LT_WIRELESS_LAN 11 // Define EnabledState Constants #define ES_UNKNOWN 0 #define ES_ENABLE 2 #define ES_DISABLE 3 #define ES_NOT_APPLICABLE 5 #define ES_ENABLED_OFFLINE 6 // Define RequestedState Constants #define RS_UNKNOWN 0 #define RS_NO_CHANGE 5 #define RS_NOT_APPLICABLE 12 // Define constants for LANEndpoint's LANType #define LEPT_UNKNOWN 0 #define LEPT_OTHER 1 #define LEPT_ETHERNET 2 #define LEPT_TOKEN_RING 3 #define LEPT_FDDI 4 // Define constants for Protocol Interface Type #define LEPIT_OTHER 1 #define LEPIT_ETHERNET 6 #define LEPIT_TOKEN_RING 9 #define LEPIT_FDDI 15 // Define constants for the Capabilities and EnabledCapabilities #define UNKNOWN 0 #define OTHER 1 #define ALERT_ON_LAN 2 #define WAKE_ON_LAN 3 #define FAILOVER 4 #define LOAD_BALANCING 5 // Define constants for Port Type #define PT_UNKNOWN 0 #define PT_OTHER 1 #define PT_10BASET 50 #define PT_10_100BASET 51 #define PT_100BASET 52 #define PT_1000BASET 53 #define PT_2500BASET 54 #define PT_10GBASET 55 #define PT_10GBASE_CX4 56 #define PT_100BASE_FX 100 #define PT_100BASE_SX 101 #define PT_1000BASE_SX 102 #define PT_1000BASE_LX 103 #define PT_1000BASE_CX 104 #define PT_10GBASE_SR 105 #define PT_10GBASE_SW 106 #define PT_10GBASE_LX4 107 #define PT_10GBASE_LR 108 #define PT_10GBASE_LW 109 #define PT_10GBASE_ER 110 #define PT_10GBASE_EW 111 static const string DEVICE_BASE_PATH = "/etc/sysconfig/network-scripts/"; int CF_getCapabilities(vector& capabilities,vector& enabledCapabilities,const string& deviceid,string& errorMessage); int CF_getHWaddress(const string& ifName, string& hwaddr, string& errorMessage); int CF_getEthEnabledState(const string& ifName, unsigned int& enabledState ,string& errorMessage); #endif /*ETHERNETPORT_COMMON_H_*/ opendrim-lmp-ethernetport-1.1.2~ppa/configure.ac0000644000175000017500000001271311377664252022577 0ustar guillaumeguillaume# Process this file with autoconf to produce a configure script. ################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ AC_PREREQ(2.59) AC_COPYRIGHT([[############################################################################### Note: This Copyright statement covers the OpenDRIM original parts of this file. It does NOT concern the parts generated by autoconf. Linux Management Providers (LMP), EthernetPort provider package Copyright (C) 2007 Ilsoo Byun This program is being developed under the "OpenDRIM" project. The "OpenDRIM" project web page: http://opendrim.sourceforge.net The "OpenDRIM" project mailing list: opendrim@googlegroups.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ###############################################################################]]) AC_INIT(EthernetPort provider package, -, -) SHOW_COPYRIGHT AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([foreign]) AC_CANONICAL_HOST case $host_cpu in i*86) HW=INTEL;; s390*) HW=S390;; ppc*) HW=PPC;; x86_64) HW=X86_64;; ia64) HW=IA64;; **) HW=GENERIC;; esac # Configuration AC_ARG_VAR([CIMSERVER],[the target CIM server (pegasus|sfcb|openwbem).]) AC_ARG_VAR([CIMNAMESPACE],[the target CIM namespace (default: root/cimv2)]) AC_ARG_VAR([INTEROPNAMESPACE],[the target interoperability namespace (default: Interop (pegasus and sfcb) or root/Interop (openwbem))]) AC_ARG_VAR([PROVIDERDIR],[the directory where the CMPI providers will be installed.]) AC_ARG_VAR([COMMONLIBDIR],[the directory where the package common libraries will be installed.]) # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_INSTALL AC_PROG_LIBTOOL # Check for CIM server (defined in acinclude.m4) CHECK_CIMSERVER # Check for CIM namespace (defined in acinclude.m4) CHECK_CIMNAMESPACE # Check for interoperability namespace (defined in acinclude.m4) CHECK_INTEROPNAMESPACE # Check for OpenDRIM Common library (defined in acinclude.m4) CHECK_OPENDRIMCOMMONLIBRARY # Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([pthread.h]) # Check for CMPI headers (defined in acinclude.m4) CHECK_CMPIHEADERS # Check for OpenDRIM Common headers (defined in acinclude.m4) CHECK_OPENDRIMCOMMONHEADERS # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM AC_CONFIG_FILES([Makefile Common/Makefile OpenDRIM_EthernetPortConformsToProfile/Makefile OpenDRIM_RegisteredEthernetPortProfile/Makefile OpenDRIM_EthernetPortToComputerSystem/Makefile OpenDRIM_LANEndpointHostedAccessPoint/Makefile OpenDRIM_EthernetPort/Makefile OpenDRIM_LANEndpointCapabilities/Makefile OpenDRIM_LANEndpoint/Makefile OpenDRIM_EthernetPortDeviceSAPImplementation/Makefile OpenDRIM_EthernetPortCapabilities/Makefile test/Makefile]) CFLAGS="$CFLAGS -D$HW -DCMPI_PLATFORM_LINUX_GENERIC_GNU -I../Common -I$OPENDRIMCOMMONINCLUDE -I$OPENDRIMCOMMONINCLUDE/cmpi" CPPFLAGS="$CPPFLAGS -D$HW -DCMPI_PLATFORM_LINUX_GENERIC_GNU -I../Common -I$OPENDRIMCOMMONINCLUDE -I$OPENDRIMCOMMONINCLUDE/cmpi" echo "-------------------------------------------------------" echo "CIMSERVER: " $CIMSERVER echo "PROVIDERDIR: " $PROVIDERDIR echo "COMMONLIBDIR: " $COMMONLIBDIR echo "CFLAGS : " $CFLAGS echo "CXXFLAGS : " $CXXFLAGS echo "CPPFLAGS:" $CPPFLAGS echo "-------------------------------------------------------" AC_OUTPUT echo "You may now run make" opendrim-lmp-ethernetport-1.1.2~ppa/TODO0000644000175000017500000000010111377664252020765 0ustar guillaumeguillaumeTODO for Major.Minor.Revision ========================= // TODO opendrim-lmp-ethernetport-1.1.2~ppa/INSTALL0000644000175000017500000000672011377664252021343 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ --------------------------------------------------------- BUILD --------------------------------------------------------- ./configure CIMSERVER= // For seeing the possible options: ./configure --help make --------------------------------------------------------- INSTALLATION --------------------------------------------------------- make install // Complile and copy the libraries to the provider library directory make postinstall // Register the providers --------------------------------------------------------- REMOVAL --------------------------------------------------------- make preuninstall // Deregister the providers make uninstall // Delete the libraries from the provider directory --------------------------------------------------------- CLEANUP --------------------------------------------------------- make clean --------------------------------------------------------- DEBUG --------------------------------------------------------- Configure (./configure) the source code with 'CPPFLAGS=-D__DEBUG__'. The debugging information is printed in a file called 'cmpi_prov_debug.txt'. OpenPegasus from source: ----------------------- The file is located in the directory where you executed 'cimserver' (to start the CIM server). OpenPegasus from RPM: -------------------- If Pegasus is installed from RPM the file is located in the '/var/lib/Pegasus/cache' directory. SBLIM sfcb: ---------- The file is located in the directory where you executed 'sfcbd' (to start the CIM server). OpenWBEM: -------- // TODO --------------------------------------------------------- OFFLINE TEST --------------------------------------------------------- make test- If you enabled the debugging information, 'cmpi_prov_debug.txt' is created in the 'test' directory. The test MAY BE impossible to run for associations. If it is the case you have to install the provider package and test the association providers online (CIM server running). opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/0000755000175000017500000000000011377664252030757 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/assocOpenDRIM_EthernetPortDeviceSAPImplementation.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/assocOpenDRIM_Ether0000644000175000017500000000651111377664252034442 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_ETHERNETPORTDEVICESAPIMPLEMENTATION_H_ #define ASSOCOPENDRIM_ETHERNETPORTDEVICESAPIMPLEMENTATION_H_ #include "OpenDRIM_EthernetPortDeviceSAPImplementationAccess.h" int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_ETHERNETPORTDEVICESAPIMPLEMENTATION_H_*/ opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/Makefile.am0000644000175000017500000000531611377664252033020 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiEthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProvider.la libcmpiEthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProvider_la_SOURCES = OpenDRIM_EthernetPortDeviceSAPImplementationAccess.cpp OpenDRIM_EthernetPortDeviceSAPImplementationProvider.cpp cmpiOpenDRIM_EthernetPortDeviceSAPImplementation.cpp assocOpenDRIM_EthernetPortDeviceSAPImplementation.cpp # May have to be adjusted for direct invocation libcmpiEthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProvider_la_CPPFLAGS = -I../CIM_LogicalDevice -I../CIM_ServiceAccessPoint # Uncomment the end for direct invocation, may have to be adjusted libcmpiEthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProvider_la_LIBADD = ../Common/libcmpiEthernetPort_Common.la #../CIM_LogicalDevice/libcmpiEthernetPort_CIM_LogicalDeviceProvider.la ../CIM_ServiceAccessPoint/libcmpiEthernetPort_CIM_ServiceAccessPointProvider.la libcmpiEthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_EthernetPortDeviceSAPImplementation.h OpenDRIM_EthernetPortDeviceSAPImplementation.h OpenDRIM_EthernetPortDeviceSAPImplementationAccess.h ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/cmpiOpenDRIM_EthernetPortDeviceSAPImplementation.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/cmpiOpenDRIM_Ethern0000644000175000017500000000467311377664252034447 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_ETHERNETPORTDEVICESAPIMPLEMENTATION_H_ #define CMPIOPENDRIM_ETHERNETPORTDEVICESAPIMPLEMENTATION_H_ #include "OpenDRIM_EthernetPortDeviceSAPImplementation.h" CMPIObjectPath* EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_EthernetPortDeviceSAPImplementation& instance); CMPIInstance* EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_EthernetPortDeviceSAPImplementation& instance); void EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_EthernetPortDeviceSAPImplementation& instance); void EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_EthernetPortDeviceSAPImplementation& instance); #endif /*CMPIOPENDRIM_ETHERNETPORTDEVICESAPIMPLEMENTATION_H_*/ ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/OpenDRIM_EthernetPortDeviceSAPImplementationAccess.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/OpenDRIM_EthernetPo0000644000175000017500000001144211377664252034416 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_ETHERNETPORTDEVICESAPIMPLEMENTATIONACCESS_H_ #define OPENDRIM_ETHERNETPORTDEVICESAPIMPLEMENTATIONACCESS_H_ #include "EthernetPort_Common.h" #include "OpenDRIM_EthernetPortDeviceSAPImplementation.h" #include "assocOpenDRIM_EthernetPortDeviceSAPImplementation.h" int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_load(const CMPIBroker* broker, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_unload(string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_EthernetPortDeviceSAPImplementation& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortDeviceSAPImplementation& newInstance, const OpenDRIM_EthernetPortDeviceSAPImplementation& oldInstance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortDeviceSAPImplementation& instance, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortDeviceSAPImplementation& instance, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_EthernetPortDeviceSAPImplementation_instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_EthernetPortDeviceSAPImplementation_instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_populate(OpenDRIM_EthernetPortDeviceSAPImplementation& instance, string& errorMessage); #endif /*OPENDRIM_ETHERNETPORTDEVICESAPIMPLEMENTATIONACCESS_H_*/ ././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/OpenDRIM_EthernetPortDeviceSAPImplementationProvider.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/OpenDRIM_EthernetPo0000644000175000017500000004533611377664252034427 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPortDeviceSAPImplementation.h" #include "OpenDRIM_EthernetPortDeviceSAPImplementationAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderSetInstance EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderModifyInstance #endif int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_init(const CMPIBroker* broker); int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortDeviceSAPImplementation instance; EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortDeviceSAPImplementation newInstance, oldInstance; EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCPP(_broker, ci, newInstance); EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortDeviceSAPImplementation instance; EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCPP(_broker, ci, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortDeviceSAPImplementation instance; EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_init FAILED: " + (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_unload(errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_unload FAILED: " + (string) OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_INIT if (EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_init(_broker) < 0) return NULL CMInstanceMIStub(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProvider, EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProvider, _broker, EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_INIT); CMAssociationMIStub(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProvider, EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProvider, _broker, EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/OpenDRIM_EthernetPortDeviceSAPImplementationAccess.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/OpenDRIM_EthernetPo0000644000175000017500000002677011377664252034430 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_EthernetPortDeviceSAPImplementationAccess.h" int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(EthernetPort_CIM_LogicalDevice_load(broker, errorMessage)); CF_assert(EthernetPort_CIM_ServiceAccessPoint_load(broker, errorMessage)); */ // TODO _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(EthernetPort_CIM_LogicalDevice_unload(errorMessage)); CF_assert(EthernetPort_CIM_ServiceAccessPoint_unload(errorMessage)); */ // TODO _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_isAssociated(const Instance& Antecedent, const Instance& Dependent, bool& isAssociated, string& errorMessage) { _E_; // Determine if the association can be established or not string ethernetPort_id; CF_assert(Antecedent.getProperty("DeviceID", ethernetPort_id)); string lanEndpoint_name; CF_assert(Dependent.getProperty("Name", lanEndpoint_name)); string ethernetPort_systemName; CF_assert(Antecedent.getProperty("SystemName", ethernetPort_systemName)); string lanEndpoint_systemName; CF_assert(Dependent.getProperty("SystemName", lanEndpoint_systemName)); if( ethernetPort_id==lanEndpoint_name && ethernetPort_systemName==lanEndpoint_systemName) isAssociated=true; else isAssociated=false; _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_enumerateAntecedents(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_enumerateAntecedents(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), Antecedent_classnames[0], Dependent_classnames[0], Antecedent_role.c_str(), Dependent_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_EthernetPortDeviceSAPImplementation& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath Antecedent_objectpath; instance.getAntecedent(Antecedent_objectpath); Instance Antecedent_instance; CF_assert(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortDeviceSAPImplementation& newInstance, const OpenDRIM_EthernetPortDeviceSAPImplementation& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortDeviceSAPImplementation& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortDeviceSAPImplementation& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Dependent_instances; if (discriminant=="a") CF_assert(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_enumerateDependents(broker, ctx, Dependent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Antecedent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Antecedent_instances; if (discriminant=="a") CF_assert(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_EthernetPortDeviceSAPImplementation_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Dependent_instances.size(); i++) { OpenDRIM_EthernetPortDeviceSAPImplementation instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); OpenDRIM_EthernetPortDeviceSAPImplementation_instances.push_back(instance); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_EthernetPortDeviceSAPImplementation_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Antecedent_instances.size(); i++) { OpenDRIM_EthernetPortDeviceSAPImplementation instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); OpenDRIM_EthernetPortDeviceSAPImplementation_instances.push_back(instance); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_populate(OpenDRIM_EthernetPortDeviceSAPImplementation& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/cmpiOpenDRIM_EthernetPortDeviceSAPImplementation.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/cmpiOpenDRIM_Ethern0000644000175000017500000000642211377664252034441 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPortDeviceSAPImplementation.h" CMPIObjectPath* EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_EthernetPortDeviceSAPImplementation& instance) { _E_; Objectpath op(broker, OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[0], OpenDRIM_EthernetPortDeviceSAPImplementation_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_EthernetPortDeviceSAPImplementation& instance) { _E_; Objectpath op(broker, EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_EthernetPortDeviceSAPImplementation& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (op.getKey("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } void EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_EthernetPortDeviceSAPImplementation& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (inst.getProperty("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/assocOpenDRIM_EthernetPortDeviceSAPImplementation.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/assocOpenDRIM_Ether0000644000175000017500000002161611377664252034445 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "assocOpenDRIM_EthernetPortDeviceSAPImplementation.h" int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "Antecedent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Dependent") != 0) return OK; CF_assert(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_associatorAntecedentToDependent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "Dependent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Antecedent") != 0) return OK; CF_assert(EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Antecedent_NAMESPACE, Antecedent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(EthernetPort_CIM_LogicalDevice_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(EthernetPort_CIM_LogicalDevice_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, EthernetPort_CIM_LogicalDevice_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Antecedent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Antecedent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_LogicalDevice _instance; EthernetPort_CIM_LogicalDevice_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(EthernetPort_CIM_LogicalDevice_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, EthernetPort_CIM_LogicalDevice_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Dependent_NAMESPACE, Dependent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(EthernetPort_CIM_ServiceAccessPoint_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(EthernetPort_CIM_ServiceAccessPoint_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, EthernetPort_CIM_ServiceAccessPoint_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementation_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Dependent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Dependent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ServiceAccessPoint _instance; EthernetPort_CIM_ServiceAccessPoint_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(EthernetPort_CIM_ServiceAccessPoint_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, EthernetPort_CIM_ServiceAccessPoint_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/OpenDRIM_EthernetPortDeviceSAPImplementation.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortDeviceSAPImplementation/OpenDRIM_EthernetPo0000644000175000017500000000705611377664252034424 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_ETHERNETPORTDEVICESAPIMPLEMENTATION_H_ #define OPENDRIM_ETHERNETPORTDEVICESAPIMPLEMENTATION_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_LogicalDevice.h" #include "CIM_LogicalDeviceAccess.h" #include "cmpiCIM_ServiceAccessPoint.h" #include "CIM_ServiceAccessPointAccess.h" */ const static char* OpenDRIM_EthernetPortDeviceSAPImplementation_classnames[] = {"OpenDRIM_EthernetPortDeviceSAPImplementation"}; static string OpenDRIM_EthernetPortDeviceSAPImplementation_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"OpenDRIM_EthernetPort"}; const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"OpenDRIM_LANEndpoint"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_EthernetPortDeviceSAPImplementation { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; OpenDRIM_EthernetPortDeviceSAPImplementation() { Antecedent_isNULL = true; Dependent_isNULL = true; } ~OpenDRIM_EthernetPortDeviceSAPImplementation() {} string getKeys() const { return CF_toLowCase(".Antecedent=\"" + CF_quoteString(Antecedent.toString()) + "\""".Dependent=\"" + CF_quoteString(Dependent.toString()) + "\""); } int getAntecedent(Objectpath& value) const { if (Antecedent_isNULL==true) return NOT_FOUND; value = Antecedent; return OK; } int setAntecedent(const Objectpath& newValue) { Antecedent = newValue; Antecedent.setNamespace(Antecedent_NAMESPACE); Antecedent_isNULL = false; return OK; } int getDependent(Objectpath& value) const { if (Dependent_isNULL==true) return NOT_FOUND; value = Dependent; return OK; } int setDependent(const Objectpath& newValue) { Dependent = newValue; Dependent.setNamespace(Dependent_NAMESPACE); Dependent_isNULL = false; return OK; } }; #endif /*OPENDRIM_ETHERNETPORTDEVICESAPIMPLEMENTATION_H_*/ opendrim-lmp-ethernetport-1.1.2~ppa/AUTHORS0000644000175000017500000000017411377664252021357 0ustar guillaumeguillaumeIlsoo Byun Guillaume BOTTEX opendrim-lmp-ethernetport-1.1.2~ppa/packaging/0000755000175000017500000000000011377664252022231 5ustar guillaumeguillaumeopendrim-lmp-ethernetport-1.1.2~ppa/packaging/debian/0000755000175000017500000000000011404312777023444 5ustar guillaumeguillaumeopendrim-lmp-ethernetport-1.1.2~ppa/packaging/debian/postrm0000644000175000017500000000307311404312777024716 0ustar guillaumeguillaume#!/bin/sh set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in purge) rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_EthernetPortConformsToProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_RegisteredEthernetPortProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_EthernetPortToComputerSystem rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_LANEndpointHostedAccessPoint rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_EthernetPort rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_LANEndpointCapabilities rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_LANEndpoint rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_EthernetPortDeviceSAPImplementation rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_EthernetPortCapabilities ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 opendrim-lmp-ethernetport-1.1.2~ppa/packaging/debian/source/0000755000175000017500000000000011400643444024736 5ustar guillaumeguillaumeopendrim-lmp-ethernetport-1.1.2~ppa/packaging/debian/source/format0000644000175000017500000000001411377670370026157 0ustar guillaumeguillaume3.0 (quilt) opendrim-lmp-ethernetport-1.1.2~ppa/packaging/debian/copyright0000644000175000017500000000302611377664252025407 0ustar guillaumeguillaumeThis package was debianized by Guillaume BOTTEX on Wed, 19 Aug 2009 13:56:44 +0900. It was downloaded from http://opendrim.sourceforge.net/ Upstream Authors: Ilsoo Byun Guillaume BOTTEX Copyright: Copyright (C) 2007 ETRI Ilsoo Byun Copyright (C) 2008 ETRI Guillaume BOTTEX License: Linux Management Providers (LMP), Ethernet Port provider package This program is being developed under the "OpenDRIM" project. The "OpenDRIM" project web page: http://opendrim.sourceforge.net The "OpenDRIM" project mailing list: opendrim@googlegroups.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. The Debian packaging is copyright 2009, Guillaume BOTTEX and is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'. opendrim-lmp-ethernetport-1.1.2~ppa/packaging/debian/control0000644000175000017500000000132711404312761025043 0ustar guillaumeguillaumeSource: opendrim-lmp-ethernetport Priority: optional Section: libs Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Guillaume BOTTEX Build-Depends: debhelper (>= 5), automake, autoconf, libtool, sfcb, libopendrim0-dev (>= 1.1.3), libxml2-dev Standards-Version: 3.8.4 Homepage: http://opendrim.sourceforge.net/ Package: opendrim-lmp-ethernetport Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, sfcb, libopendrim0 (>= 1.1.3), ethtool, net-tools Description: OpenDRIM Ethernet Port provider Provides information about the computer system's ethernet port capabilities. . Compliant with the DMTF Ethernet Port Profile v1.0.0 (DSP1014). opendrim-lmp-ethernetport-1.1.2~ppa/packaging/debian/prerm0000644000175000017500000000244011377664252024523 0ustar guillaumeguillaume#!/bin/sh -e # prerm script for opendrim-lmp-baseserver # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # * `deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in remove|upgrade|deconfigure) CIMNAMESPACE=root/cimv2 CIMSERVER=sfcb INTEROPNAMESPACE=root/interop APP_NAME=opendrim-lmp-ethernetport VERSION=`cat /usr/share/doc/opendrim-lmp-ethernetport/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=EthernetPort $OPENDRIM_REG_DIR/$APP_NAME/registration/$PROVIDER_SCRIPT_POST-remove.sh $CIMNAMESPACE $CIMSERVER $INTEROPNAMESPACE $OPENDRIM_REG_DIR/$APP_NAME ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 opendrim-lmp-ethernetport-1.1.2~ppa/packaging/debian/changelog0000644000175000017500000000053011404312736025307 0ustar guillaumeguillaumeopendrim-lmp-ethernetport (1.1.2-0ubuntu1) lucid; urgency=low * New upstream version -- Guillaume BOTTEX Fri, 11 Jun 2010 10:48:00 +0900 opendrim-lmp-ethernetport (1.1.1-0ubuntu1) karmic; urgency=low * Initial release -- Guillaume BOTTEX Wed, 19 Aug 2009 13:56:44 +0900 opendrim-lmp-ethernetport-1.1.2~ppa/packaging/debian/postinst0000644000175000017500000000261511377664252025265 0ustar guillaumeguillaume#!/bin/sh -e # postinst script for opendrim-lmp-baseserver # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) CIMNAMESPACE=root/cimv2 VENDOR=OpenDRIM CIMSERVER=sfcb INTEROPNAMESPACE=root/interop APP_NAME=opendrim-lmp-ethernetport VERSION=`cat /usr/share/doc/opendrim-lmp-ethernetport/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=EthernetPort $OPENDRIM_REG_DIR/$APP_NAME/registration/$PROVIDER_SCRIPT_POST.sh $CIMNAMESPACE $VENDOR $CIMSERVER $INTEROPNAMESPACE $VERSION $OPENDRIM_REG_DIR/$APP_NAME ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 opendrim-lmp-ethernetport-1.1.2~ppa/packaging/debian/install0000644000175000017500000000004711377664252025045 0ustar guillaumeguillaumeusr/lib/cmpi/*.so usr/share/OpenDRIM/* opendrim-lmp-ethernetport-1.1.2~ppa/packaging/debian/rules0000755000175000017500000000356611377664252024545 0ustar guillaumeguillaume#!/usr/bin/make -f INSTALL = /usr/bin/install -c CONFIGURE_OPTIONS := CIMSERVER=sfcb --prefix=/usr INTEROPNAMESPACE=root/interop COMMONLIBDIR=/usr/lib/cmpi DESTDIR = $(CURDIR)/debian/tmp VERSION = $(shell cat ./VERSION) APP_NAME = opendrim-lmp-ethernetport OPENDRIM_REG_DIR = /usr/share/OpenDRIM OPENDRIM_MOF_DIR = /usr/share/OpenDRIM/$(APP_NAME)/mof configure: configure-stamp configure-stamp: dh_testdir autoreconf -i --force ./configure $(CONFIGURE_OPTIONS) touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir $(MAKE) #docbook-to-man debian/opendrim-lmp-ethernetport.sgml > opendrim-lmp-ethernetport.1 touch $@ clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp [ ! -f Makefile ] || $(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) DESTDIR=$(DESTDIR) install $(INSTALL) -d -m 744 $(DESTDIR)$(OPENDRIM_REG_DIR)/$(APP_NAME)/registration $(INSTALL) -p -m 744 registration/*.sh $(DESTDIR)$(OPENDRIM_REG_DIR)/$(APP_NAME)/registration $(INSTALL) -d -m 744 $(DESTDIR)$(OPENDRIM_MOF_DIR) $(INSTALL) -p -m 644 mof/*.mof $(DESTDIR)$(OPENDRIM_MOF_DIR) # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installexamples dh_install --sourcedir=$(DESTDIR) # dh_installmenu # dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_python # dh_installinit # dh_installcron # dh_installinfo dh_installman dh_link dh_strip dh_compress dh_fixperms # dh_perl # dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure opendrim-lmp-ethernetport-1.1.2~ppa/packaging/debian/docs0000644000175000017500000000003111377664252024320 0ustar guillaumeguillaumeNEWS README TODO VERSION opendrim-lmp-ethernetport-1.1.2~ppa/packaging/debian/compat0000644000175000017500000000000211377664252024651 0ustar guillaumeguillaume5 opendrim-lmp-ethernetport-1.1.2~ppa/packaging/opendrim-lmp-ethernetport.spec0000644000175000017500000000774711377664252030250 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ %define packageVersion 1 Version: %{version} Release: %{packageVersion}%{?dist} Vendor: OpenDRIM Summary: OpenDRIM EthernetPort Provider Name: opendrim-lmp-ethernetport Group: Systems Management/Base License: GPL BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://opendrim.sourceforge.net Source: %{name}-%{version}.tar.gz BuildRequires: autoconf, tog-pegasus-devel, libopendrim >= 1.1.1 Requires: tog-pegasus, libopendrim >= 1.1.1, ethtool, grep, gawk, net-tools %description %global PEGASUS_ARCH_LIB %{_lib} %global COMMONLIBDIR /usr/%PEGASUS_ARCH_LIB %global PROVIDERDIR %COMMONLIBDIR/Pegasus/providers %global OPENDRIM_REG_DIR /usr/share/OpenDRIM %global OPENDRIM_MOF_DIR /usr/share/OpenDRIM/%{name}/mof %global PROVIDER_SCRIPT_POST EthernetPort %global CIMNAMESPACE %{?CIM_NAMESPACE:%{CIM_NAMESPACE}}%{!?CIM_NAMESPACE:root/cimv2} %global CIMSERVER pegasus %global INTEROPNAMESPACE root/interop %prep %setup -q -n %{name}-%{version} %build autoreconf --install --force ./configure CIMSERVER=%CIMSERVER CIMNAMESPACE=%CIMNAMESPACE INTEROPNAMESPACE=%INTEROPNAMESPACE --prefix=/usr make %pre SERVICE='cimserver' if !(ps ax | grep -v grep | grep $SERVICE > /dev/null) then echo "$SERVICE is not running" exit 1 fi %install make install COMMONLIBDIR=$RPM_BUILD_ROOT%COMMONLIBDIR PROVIDERDIR=$RPM_BUILD_ROOT%PROVIDERDIR %{__install} -d -m 744 $RPM_BUILD_ROOT%OPENDRIM_REG_DIR/%{name}/registration %{__install} -p -m 644 registration/*.sh $RPM_BUILD_ROOT%OPENDRIM_REG_DIR/%{name}/registration %{__install} -d -m 744 $RPM_BUILD_ROOT%OPENDRIM_MOF_DIR/ %{__install} -p -m 644 mof/*.mof $RPM_BUILD_ROOT%OPENDRIM_MOF_DIR/ %post %OPENDRIM_REG_DIR/%{name}-%{version}-script/%PROVIDER_SCRIPT_POST.sh %CIMNAMESPACE %{vendor} %CIMSERVER %INTEROPNAMESPACE %{version} %clean [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT; [ "${RPM_BUILD_DIR}" != "/" ] && %{__rm} -rf ${RPM_BUILD_DIR}/%{name}-%{version}; %preun SERVICE='cimserver' if !(ps ax | grep -v grep | grep $SERVICE > /dev/null) then echo "$SERVICE is not running" exit 1 fi %OPENDRIM_REG_DIR/%{name}-%{version}-script/%PROVIDER_SCRIPT_POST-remove.sh %CIMNAMESPACE %CIMSERVER %INTEROPNAMESPACE %files %defattr(755, root, root, 755) %dir %COMMONLIBDIR %dir %PROVIDERDIR %COMMONLIBDIR/*.so %PROVIDERDIR/*.so %defattr(744, root, root, 755) %dir %OPENDRIM_REG_DIR %dir %OPENDRIM_MOF_DIR %dir %OPENDRIM_REG_DIR/%{name}-%{version}-script %OPENDRIM_REG_DIR/%{name}-%{version}-script/*.sh %OPENDRIM_MOF_DIR/*.mof opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/0000755000175000017500000000000011377664252027720 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/assocOpenDRIM_EthernetPortConformsToProfile.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/assocOpenDRIM_EthernetPor0000644000175000017500000000644211377664252034576 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_ETHERNETPORTCONFORMSTOPROFILE_H_ #define ASSOCOPENDRIM_ETHERNETPORTCONFORMSTOPROFILE_H_ #include "OpenDRIM_EthernetPortConformsToProfileAccess.h" int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_enumerateConformantStandards(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_getConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_ETHERNETPORTCONFORMSTOPROFILE_H_*/ opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/Makefile.am0000644000175000017500000000520611377664252031757 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiEthernetPort_OpenDRIM_EthernetPortConformsToProfileProvider.la libcmpiEthernetPort_OpenDRIM_EthernetPortConformsToProfileProvider_la_SOURCES = OpenDRIM_EthernetPortConformsToProfileAccess.cpp OpenDRIM_EthernetPortConformsToProfileProvider.cpp cmpiOpenDRIM_EthernetPortConformsToProfile.cpp assocOpenDRIM_EthernetPortConformsToProfile.cpp # May have to be adjusted for direct invocation libcmpiEthernetPort_OpenDRIM_EthernetPortConformsToProfileProvider_la_CPPFLAGS = -I../CIM_RegisteredProfile -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiEthernetPort_OpenDRIM_EthernetPortConformsToProfileProvider_la_LIBADD = ../Common/libcmpiEthernetPort_Common.la #../CIM_RegisteredProfile/libcmpiEthernetPort_CIM_RegisteredProfileProvider.la ../CIM_ManagedElement/libcmpiEthernetPort_CIM_ManagedElementProvider.la libcmpiEthernetPort_OpenDRIM_EthernetPortConformsToProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_EthernetPortConformsToProfile.h OpenDRIM_EthernetPortConformsToProfile.h OpenDRIM_EthernetPortConformsToProfileAccess.h ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/OpenDRIM_EthernetPortConformsToProfile.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/OpenDRIM_EthernetPortConf0000644000175000017500000000736211377664252034541 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_ETHERNETPORTCONFORMSTOPROFILE_H_ #define OPENDRIM_ETHERNETPORTCONFORMSTOPROFILE_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_RegisteredProfile.h" #include "CIM_RegisteredProfileAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_EthernetPortConformsToProfile_classnames[] = {"OpenDRIM_EthernetPortConformsToProfile"}; static string OpenDRIM_EthernetPortConformsToProfile_NAMESPACE = _INTEROP_NAMESPACE; const static string ConformantStandard_role = "ConformantStandard"; const static char* ConformantStandard_classnames[] = {"OpenDRIM_RegisteredEthernetPortProfile"}; const static string ConformantStandard_NAMESPACE = _INTEROP_NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_EthernetPort"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_EthernetPortConformsToProfile { public: Objectpath ConformantStandard; bool ConformantStandard_isNULL; Objectpath ManagedElement; bool ManagedElement_isNULL; OpenDRIM_EthernetPortConformsToProfile() { ConformantStandard_isNULL = true; ManagedElement_isNULL = true; } ~OpenDRIM_EthernetPortConformsToProfile() {} string getKeys() const { return CF_toLowCase(".ConformantStandard=\"" + CF_quoteString(ConformantStandard.toString()) + "\""".ManagedElement=\"" + CF_quoteString(ManagedElement.toString()) + "\""); } int getConformantStandard(Objectpath& value) const { if (ConformantStandard_isNULL==true) return NOT_FOUND; value = ConformantStandard; return OK; } int setConformantStandard(const Objectpath& newValue) { ConformantStandard = newValue; ConformantStandard.setNamespace(ConformantStandard_NAMESPACE); ConformantStandard_isNULL = false; return OK; } int getManagedElement(Objectpath& value) const { if (ManagedElement_isNULL==true) return NOT_FOUND; value = ManagedElement; return OK; } int setManagedElement(const Objectpath& newValue) { ManagedElement = newValue; ManagedElement.setNamespace(ManagedElement_NAMESPACE); ManagedElement_isNULL = false; return OK; } }; #endif /*OPENDRIM_ETHERNETPORTCONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/OpenDRIM_EthernetPortConformsToProfileAccess.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/OpenDRIM_EthernetPortConf0000644000175000017500000001133511377664252034534 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_ETHERNETPORTCONFORMSTOPROFILEACCESS_H_ #define OPENDRIM_ETHERNETPORTCONFORMSTOPROFILEACCESS_H_ #include "EthernetPort_Common.h" #include "OpenDRIM_EthernetPortConformsToProfile.h" #include "assocOpenDRIM_EthernetPortConformsToProfile.h" int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_load(const CMPIBroker* broker, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_unload(string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_EthernetPortConformsToProfile& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortConformsToProfile& newInstance, const OpenDRIM_EthernetPortConformsToProfile& oldInstance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortConformsToProfile& instance, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortConformsToProfile& instance, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_associatorConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_associatorManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& ConformantStandard_associatedInstances, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_referenceConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const vector& ManagedElement_instances, vector& OpenDRIM_EthernetPortConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_EthernetPortConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_populate(OpenDRIM_EthernetPortConformsToProfile& instance, string& errorMessage); #endif /*OPENDRIM_ETHERNETPORTCONFORMSTOPROFILEACCESS_H_*/ ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/cmpiOpenDRIM_EthernetPortConformsToProfile.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/cmpiOpenDRIM_EthernetPort0000644000175000017500000000455611377664252034606 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_ETHERNETPORTCONFORMSTOPROFILE_H_ #define CMPIOPENDRIM_ETHERNETPORTCONFORMSTOPROFILE_H_ #include "OpenDRIM_EthernetPortConformsToProfile.h" CMPIObjectPath* EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_EthernetPortConformsToProfile& instance); CMPIInstance* EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_EthernetPortConformsToProfile& instance); void EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_EthernetPortConformsToProfile& instance); void EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_EthernetPortConformsToProfile& instance); #endif /*CMPIOPENDRIM_ETHERNETPORTCONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/cmpiOpenDRIM_EthernetPortConformsToProfile.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/cmpiOpenDRIM_EthernetPort0000644000175000017500000000647211377664252034605 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPortConformsToProfile.h" CMPIObjectPath* EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_EthernetPortConformsToProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_EthernetPortConformsToProfile_classnames[0], OpenDRIM_EthernetPortConformsToProfile_NAMESPACE); if (!instance.ConformantStandard_isNULL) op.addKey("ConformantStandard", instance.ConformantStandard); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); _L_; return op.getHdl(); } CMPIInstance* EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_EthernetPortConformsToProfile& instance) { _E_; Objectpath op(broker, EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_EthernetPortConformsToProfile& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("ConformantStandard", instance.ConformantStandard) == OK) instance.ConformantStandard_isNULL = false; if (op.getKey("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } void EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_EthernetPortConformsToProfile& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("ConformantStandard", instance.ConformantStandard) == OK) instance.ConformantStandard_isNULL = false; if (inst.getProperty("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/OpenDRIM_EthernetPortConformsToProfileAccess.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/OpenDRIM_EthernetPortConf0000644000175000017500000002633411377664252034541 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_EthernetPortConformsToProfileAccess.h" int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(EthernetPort_CIM_RegisteredProfile_load(broker, errorMessage)); CF_assert(EthernetPort_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(EthernetPort_CIM_RegisteredProfile_unload(errorMessage)); CF_assert(EthernetPort_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_isAssociated(const Instance& ConformantStandard, const Instance& ManagedElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(EthernetPort_OpenDRIM_EthernetPortConformsToProfile_enumerateConformantStandards(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_EthernetPortConformsToProfile_enumerateConformantStandards(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; EthernetPort_OpenDRIM_EthernetPortConformsToProfile_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), ConformantStandard_classnames[0], ManagedElement_classnames[0], ConformantStandard_role.c_str(), ManagedElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(EthernetPort_OpenDRIM_EthernetPortConformsToProfile_referenceConformantStandardToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_EthernetPortConformsToProfile& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath ConformantStandard_objectpath; instance.getConformantStandard(ConformantStandard_objectpath); Instance ConformantStandard_instance; CF_assert(EthernetPort_OpenDRIM_EthernetPortConformsToProfile_getConformantStandard(broker, ctx, ConformantStandard_objectpath, ConformantStandard_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(EthernetPort_OpenDRIM_EthernetPortConformsToProfile_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(EthernetPort_OpenDRIM_EthernetPortConformsToProfile_isAssociated(ConformantStandard_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortConformsToProfile& newInstance, const OpenDRIM_EthernetPortConformsToProfile& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_associatorConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector ManagedElement_instances; if (discriminant=="a") CF_assert(EthernetPort_OpenDRIM_EthernetPortConformsToProfile_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(EthernetPort_OpenDRIM_EthernetPortConformsToProfile_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_EthernetPortConformsToProfile_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& ConformantStandard_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector ConformantStandard_instances; if (discriminant=="a") CF_assert(EthernetPort_OpenDRIM_EthernetPortConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(EthernetPort_OpenDRIM_EthernetPortConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_EthernetPortConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_EthernetPortConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < ManagedElement_instances.size(); i++) { OpenDRIM_EthernetPortConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); OpenDRIM_EthernetPortConformsToProfile_instances.push_back(instance); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_EthernetPortConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < ConformantStandard_instances.size(); i++) { OpenDRIM_EthernetPortConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); OpenDRIM_EthernetPortConformsToProfile_instances.push_back(instance); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_populate(OpenDRIM_EthernetPortConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/assocOpenDRIM_EthernetPortConformsToProfile.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/assocOpenDRIM_EthernetPor0000644000175000017500000002177111377664252034600 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "assocOpenDRIM_EthernetPortConformsToProfile.h" int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "ConformantStandard") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "ManagedElement") != 0) return OK; CF_assert(EthernetPort_OpenDRIM_EthernetPortConformsToProfile_associatorConformantStandardToManagedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "ManagedElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "ConformantStandard") != 0) return OK; CF_assert(EthernetPort_OpenDRIM_EthernetPortConformsToProfile_associatorManagedElementToConformantStandard(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_enumerateConformantStandards(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, ConformantStandard_NAMESPACE, ConformantStandard_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(EthernetPort_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(EthernetPort_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, EthernetPort_CIM_RegisteredProfile_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_getConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), ConformantStandard_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), ConformantStandard_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_RegisteredProfile _instance; EthernetPort_CIM_RegisteredProfile_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(EthernetPort_CIM_RegisteredProfile_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, EthernetPort_CIM_RegisteredProfile_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, ManagedElement_NAMESPACE, ManagedElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(EthernetPort_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(EthernetPort_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, EthernetPort_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), ManagedElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), ManagedElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; EthernetPort_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(EthernetPort_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, EthernetPort_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/OpenDRIM_EthernetPortConformsToProfileProvider.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortConformsToProfile/OpenDRIM_EthernetPortConf0000644000175000017500000004436111377664252034541 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPortConformsToProfile.h" #include "OpenDRIM_EthernetPortConformsToProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderSetInstance EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderModifyInstance #endif int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_init(const CMPIBroker* broker); int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortConformsToProfile instance; EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortConformsToProfile newInstance, oldInstance; EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCPP(_broker, ci, newInstance); EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortConformsToProfile instance; EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortConformsToProfile instance; EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortConformsToProfileProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_EthernetPortConformsToProfile_init FAILED: " + (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortConformsToProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortConformsToProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_EthernetPortConformsToProfile_unload FAILED: " + (string) OpenDRIM_EthernetPortConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define EthernetPort_OpenDRIM_EthernetPortConformsToProfile_INIT if (EthernetPort_OpenDRIM_EthernetPortConformsToProfile_init(_broker) < 0) return NULL CMInstanceMIStub(EthernetPort_OpenDRIM_EthernetPortConformsToProfileProvider, EthernetPort_OpenDRIM_EthernetPortConformsToProfileProvider, _broker, EthernetPort_OpenDRIM_EthernetPortConformsToProfile_INIT); CMAssociationMIStub(EthernetPort_OpenDRIM_EthernetPortConformsToProfileProvider, EthernetPort_OpenDRIM_EthernetPortConformsToProfileProvider, _broker, EthernetPort_OpenDRIM_EthernetPortConformsToProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-ethernetport-1.1.2~ppa/mof/0000755000175000017500000000000011377664252021066 5ustar guillaumeguillaumeopendrim-lmp-ethernetport-1.1.2~ppa/mof/OpenDRIM_EthernetPortConformsToProfile.mof0000644000175000017500000000331011377664252031201 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), EthernetPort provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Association, Provider("cmpi:cmpiEthernetPort_OpenDRIM_EthernetPortConformsToProfileProvider")] class OpenDRIM_EthernetPortConformsToProfile:CIM_ElementConformsToProfile { }; opendrim-lmp-ethernetport-1.1.2~ppa/mof/OpenDRIM_EthernetPortCapabilities.mof0000644000175000017500000000327111377664252030166 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), EthernetPort provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Association, Provider("cmpi:cmpiEthernetPort_OpenDRIM_EthernetPortCapabilitiesProvider")] class OpenDRIM_EthernetPortCapabilities:CIM_ElementCapabilities { }; opendrim-lmp-ethernetport-1.1.2~ppa/mof/OpenDRIM_LANEndpointHostedAccessPoint.mof0000644000175000017500000000327711377664252030655 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), EthernetPort provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Association, Provider("cmpi:cmpiEthernetPort_OpenDRIM_LANEndpointHostedAccessPointProvider")] class OpenDRIM_LANEndpointHostedAccessPoint:CIM_HostedAccessPoint { }; opendrim-lmp-ethernetport-1.1.2~ppa/mof/OpenDRIM_EthernetPortDeviceSAPImplementation.mof0000644000175000017500000000332311377664252032244 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), EthernetPort provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Association, Provider("cmpi:cmpiEthernetPort_OpenDRIM_EthernetPortDeviceSAPImplementationProvider")] class OpenDRIM_EthernetPortDeviceSAPImplementation:CIM_DeviceSAPImplementation { }; opendrim-lmp-ethernetport-1.1.2~ppa/mof/OpenDRIM_EthernetPortToComputerSystem.mof0000644000175000017500000000331711377664252031104 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), EthernetPort provider package // Copyright (C) 2007 Ilsoo Byun // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2008 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiEthernetPort_OpenDRIM_EthernetPortToComputerSystemProvider")] class OpenDRIM_EthernetPortToComputerSystem:CIM_SystemDevice { }; opendrim-lmp-ethernetport-1.1.2~ppa/mof/OpenDRIM_RegisteredEthernetPortProfile.mof0000644000175000017500000000326311377664252031214 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), EthernetPort provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiEthernetPort_OpenDRIM_RegisteredEthernetPortProfileProvider")] class OpenDRIM_RegisteredEthernetPortProfile:CIM_RegisteredProfile { }; opendrim-lmp-ethernetport-1.1.2~ppa/mof/OpenDRIM_LANEndpoint.mof0000644000175000017500000000321111377664252025336 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), EthernetPort provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiEthernetPort_OpenDRIM_LANEndpointProvider")] class OpenDRIM_LANEndpoint:CIM_LANEndpoint { }; opendrim-lmp-ethernetport-1.1.2~ppa/mof/OpenDRIM_LANEndpointCapabilities.mof0000644000175000017500000000326711377664252027663 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), EthernetPort provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Association, Provider("cmpi:cmpiEthernetPort_OpenDRIM_LANEndpointCapabilitiesProvider")] class OpenDRIM_LANEndpointCapabilities:CIM_ElementCapabilities { }; opendrim-lmp-ethernetport-1.1.2~ppa/mof/OpenDRIM_EthernetPort.mof0000644000175000017500000000324111377664252025651 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), EthernetPort provider package // Copyright (C) 2007 Ilsoo Byun // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2008 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiEthernetPort_OpenDRIM_EthernetPortProvider")] class OpenDRIM_EthernetPort:CIM_EthernetPort { }; opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/0000755000175000017500000000000011377664252026677 5ustar guillaumeguillaumeopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/Makefile.am0000644000175000017500000000507311377664252030740 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiEthernetPort_OpenDRIM_EthernetPortCapabilitiesProvider.la libcmpiEthernetPort_OpenDRIM_EthernetPortCapabilitiesProvider_la_SOURCES = OpenDRIM_EthernetPortCapabilitiesAccess.cpp OpenDRIM_EthernetPortCapabilitiesProvider.cpp cmpiOpenDRIM_EthernetPortCapabilities.cpp assocOpenDRIM_EthernetPortCapabilities.cpp # May have to be adjusted for direct invocation libcmpiEthernetPort_OpenDRIM_EthernetPortCapabilitiesProvider_la_CPPFLAGS = -I../CIM_Capabilities -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiEthernetPort_OpenDRIM_EthernetPortCapabilitiesProvider_la_LIBADD = ../Common/libcmpiEthernetPort_Common.la #../CIM_Capabilities/libcmpiEthernetPort_CIM_CapabilitiesProvider.la ../CIM_ManagedElement/libcmpiEthernetPort_CIM_ManagedElementProvider.la libcmpiEthernetPort_OpenDRIM_EthernetPortCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_EthernetPortCapabilities.h OpenDRIM_EthernetPortCapabilities.h OpenDRIM_EthernetPortCapabilitiesAccess.h ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/OpenDRIM_EthernetPortCapabilitiesAccess.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/OpenDRIM_EthernetPortCapabilit0000644000175000017500000002616611377664252034526 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_EthernetPortCapabilitiesAccess.h" int EthernetPort_OpenDRIM_EthernetPortCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(EthernetPort_CIM_Capabilities_load(broker, errorMessage)); CF_assert(EthernetPort_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(EthernetPort_CIM_Capabilities_unload(errorMessage)); CF_assert(EthernetPort_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_isAssociated(const Instance& Capabilities, const Instance& ManagedElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_enumerateCapabilitiess(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_enumerateCapabilitiess(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; EthernetPort_OpenDRIM_EthernetPortCapabilities_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), Capabilities_classnames[0], ManagedElement_classnames[0], Capabilities_role.c_str(), ManagedElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_referenceCapabilitiesToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_EthernetPortCapabilities& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath Capabilities_objectpath; instance.getCapabilities(Capabilities_objectpath); Instance Capabilities_instance; CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_getCapabilities(broker, ctx, Capabilities_objectpath, Capabilities_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_isAssociated(Capabilities_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_populate(instance, errorMessage)); _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortCapabilities& newInstance, const OpenDRIM_EthernetPortCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_associatorCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector ManagedElement_instances; if (discriminant=="a") CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& Capabilities_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Capabilities_instances; if (discriminant=="a") CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_EthernetPortCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < ManagedElement_instances.size(); i++) { OpenDRIM_EthernetPortCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_populate(instance, errorMessage)); } OpenDRIM_EthernetPortCapabilities_instances.push_back(instance); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_EthernetPortCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Capabilities_instances.size(); i++) { OpenDRIM_EthernetPortCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_populate(instance, errorMessage)); } OpenDRIM_EthernetPortCapabilities_instances.push_back(instance); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_populate(OpenDRIM_EthernetPortCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/OpenDRIM_EthernetPortCapabilities.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/OpenDRIM_EthernetPortCapabilit0000644000175000017500000000772311377664252034524 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_ETHERNETPORTCAPABILITIES_H_ #define OPENDRIM_ETHERNETPORTCAPABILITIES_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_Capabilities.h" #include "CIM_CapabilitiesAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_EthernetPortCapabilities_classnames[] = {"OpenDRIM_EthernetPortCapabilities"}; static string OpenDRIM_EthernetPortCapabilities_NAMESPACE = _NAMESPACE; const static string Capabilities_role = "Capabilities"; const static char* Capabilities_classnames[] = {"CIM_Capabilities"}; const static string Capabilities_NAMESPACE = _NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"CIM_ManagedElement"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_EthernetPortCapabilities { public: Objectpath ManagedElement; bool ManagedElement_isNULL; Objectpath Capabilities; bool Capabilities_isNULL; vector Characteristics; bool Characteristics_isNULL; OpenDRIM_EthernetPortCapabilities() { ManagedElement_isNULL = true; Capabilities_isNULL = true; Characteristics_isNULL = true; } ~OpenDRIM_EthernetPortCapabilities() {} string getKeys() const { return CF_toLowCase(".ManagedElement=\"" + CF_quoteString(ManagedElement.toString()) + "\""".Capabilities=\"" + CF_quoteString(Capabilities.toString()) + "\""); } int getManagedElement(Objectpath& value) const { if (ManagedElement_isNULL==true) return NOT_FOUND; value = ManagedElement; return OK; } int setManagedElement(const Objectpath& newValue) { ManagedElement = newValue; ManagedElement.setNamespace(ManagedElement_NAMESPACE); ManagedElement_isNULL = false; return OK; } int getCapabilities(Objectpath& value) const { if (Capabilities_isNULL==true) return NOT_FOUND; value = Capabilities; return OK; } int setCapabilities(const Objectpath& newValue) { Capabilities = newValue; Capabilities.setNamespace(Capabilities_NAMESPACE); Capabilities_isNULL = false; return OK; } int getCharacteristics(vector& value) const { if (Characteristics_isNULL==true) return NOT_FOUND; value = Characteristics; return OK; } int setCharacteristics(const vector& newValue) { Characteristics = newValue; Characteristics_isNULL = false; return OK; } }; #endif /*OPENDRIM_ETHERNETPORTCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/assocOpenDRIM_EthernetPortCapabilities.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/assocOpenDRIM_EthernetPortCapa0000644000175000017500000000635111377664252034525 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_ETHERNETPORTCAPABILITIES_H_ #define ASSOCOPENDRIM_ETHERNETPORTCAPABILITIES_H_ #include "OpenDRIM_EthernetPortCapabilitiesAccess.h" int EthernetPort_OpenDRIM_EthernetPortCapabilities_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortCapabilities_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int EthernetPort_OpenDRIM_EthernetPortCapabilities_enumerateCapabilitiess(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortCapabilities_getCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortCapabilities_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortCapabilities_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_ETHERNETPORTCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/OpenDRIM_EthernetPortCapabilitiesProvider.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/OpenDRIM_EthernetPortCapabilit0000644000175000017500000004343411377664252034523 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPortCapabilities.h" #include "OpenDRIM_EthernetPortCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderSetInstance EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderModifyInstance #endif int EthernetPort_OpenDRIM_EthernetPortCapabilities_init(const CMPIBroker* broker); int EthernetPort_OpenDRIM_EthernetPortCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_EthernetPortCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = EthernetPort_OpenDRIM_EthernetPortCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortCapabilities instance; EthernetPort_OpenDRIM_EthernetPortCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = EthernetPort_OpenDRIM_EthernetPortCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortCapabilities newInstance, oldInstance; EthernetPort_OpenDRIM_EthernetPortCapabilities_toCPP(_broker, ci, newInstance); EthernetPort_OpenDRIM_EthernetPortCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortCapabilities instance; EthernetPort_OpenDRIM_EthernetPortCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = EthernetPort_OpenDRIM_EthernetPortCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPortCapabilities instance; EthernetPort_OpenDRIM_EthernetPortCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_EthernetPortCapabilities_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortCapabilitiesProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = EthernetPort_OpenDRIM_EthernetPortCapabilities_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int EthernetPort_OpenDRIM_EthernetPortCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_EthernetPortCapabilities_init FAILED: " + (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_EthernetPortCapabilities_unload FAILED: " + (string) OpenDRIM_EthernetPortCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define EthernetPort_OpenDRIM_EthernetPortCapabilities_INIT if (EthernetPort_OpenDRIM_EthernetPortCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(EthernetPort_OpenDRIM_EthernetPortCapabilitiesProvider, EthernetPort_OpenDRIM_EthernetPortCapabilitiesProvider, _broker, EthernetPort_OpenDRIM_EthernetPortCapabilities_INIT); CMAssociationMIStub(EthernetPort_OpenDRIM_EthernetPortCapabilitiesProvider, EthernetPort_OpenDRIM_EthernetPortCapabilitiesProvider, _broker, EthernetPort_OpenDRIM_EthernetPortCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/OpenDRIM_EthernetPortCapabilitiesAccess.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/OpenDRIM_EthernetPortCapabilit0000644000175000017500000001104611377664252034515 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_ETHERNETPORTCAPABILITIESACCESS_H_ #define OPENDRIM_ETHERNETPORTCAPABILITIESACCESS_H_ #include "EthernetPort_Common.h" #include "OpenDRIM_EthernetPortCapabilities.h" #include "assocOpenDRIM_EthernetPortCapabilities.h" int EthernetPort_OpenDRIM_EthernetPortCapabilities_load(const CMPIBroker* broker, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortCapabilities_unload(string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_EthernetPortCapabilities& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortCapabilities& newInstance, const OpenDRIM_EthernetPortCapabilities& oldInstance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortCapabilities& instance, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPortCapabilities& instance, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPortCapabilities_associatorCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortCapabilities_associatorManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& Capabilities_associatedInstances, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortCapabilities_referenceCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const vector& ManagedElement_instances, vector& OpenDRIM_EthernetPortCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_EthernetPortCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPortCapabilities_populate(OpenDRIM_EthernetPortCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_ETHERNETPORTCAPABILITIESACCESS_H_*/ ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/cmpiOpenDRIM_EthernetPortCapabilities.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/cmpiOpenDRIM_EthernetPortCapab0000644000175000017500000000665211377664252034513 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPortCapabilities.h" CMPIObjectPath* EthernetPort_OpenDRIM_EthernetPortCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_EthernetPortCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_EthernetPortCapabilities_classnames[0], OpenDRIM_EthernetPortCapabilities_NAMESPACE); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); if (!instance.Capabilities_isNULL) op.addKey("Capabilities", instance.Capabilities); _L_; return op.getHdl(); } CMPIInstance* EthernetPort_OpenDRIM_EthernetPortCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_EthernetPortCapabilities& instance) { _E_; Objectpath op(broker, EthernetPort_OpenDRIM_EthernetPortCapabilities_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Characteristics_isNULL) ci.setProperty("Characteristics", instance.Characteristics); _L_; return ci.getHdl(); } void EthernetPort_OpenDRIM_EthernetPortCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_EthernetPortCapabilities& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Capabilities", instance.Capabilities) == OK) instance.Capabilities_isNULL = false; if (op.getKey("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } void EthernetPort_OpenDRIM_EthernetPortCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_EthernetPortCapabilities& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; if (inst.getProperty("Capabilities", instance.Capabilities) == OK) instance.Capabilities_isNULL = false; if (inst.getProperty("Characteristics", instance.Characteristics) == OK) instance.Characteristics_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/assocOpenDRIM_EthernetPortCapabilities.cppopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/assocOpenDRIM_EthernetPortCapa0000644000175000017500000002144611377664252034527 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "assocOpenDRIM_EthernetPortCapabilities.h" int EthernetPort_OpenDRIM_EthernetPortCapabilities_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = EthernetPort_OpenDRIM_EthernetPortCapabilities_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "Capabilities") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "ManagedElement") != 0) return OK; CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_associatorCapabilitiesToManagedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "ManagedElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Capabilities") != 0) return OK; CF_assert(EthernetPort_OpenDRIM_EthernetPortCapabilities_associatorManagedElementToCapabilities(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_enumerateCapabilitiess(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Capabilities_NAMESPACE, Capabilities_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(EthernetPort_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(EthernetPort_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, EthernetPort_CIM_Capabilities_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_getCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Capabilities_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Capabilities_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_Capabilities _instance; EthernetPort_CIM_Capabilities_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(EthernetPort_CIM_Capabilities_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, EthernetPort_CIM_Capabilities_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, ManagedElement_NAMESPACE, ManagedElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(EthernetPort_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(EthernetPort_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, EthernetPort_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPortCapabilities_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), ManagedElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), ManagedElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; EthernetPort_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(EthernetPort_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, EthernetPort_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/cmpiOpenDRIM_EthernetPortCapabilities.hopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPortCapabilities/cmpiOpenDRIM_EthernetPortCapab0000644000175000017500000000446711377664252034515 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_ETHERNETPORTCAPABILITIES_H_ #define CMPIOPENDRIM_ETHERNETPORTCAPABILITIES_H_ #include "OpenDRIM_EthernetPortCapabilities.h" CMPIObjectPath* EthernetPort_OpenDRIM_EthernetPortCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_EthernetPortCapabilities& instance); CMPIInstance* EthernetPort_OpenDRIM_EthernetPortCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_EthernetPortCapabilities& instance); void EthernetPort_OpenDRIM_EthernetPortCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_EthernetPortCapabilities& instance); void EthernetPort_OpenDRIM_EthernetPortCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_EthernetPortCapabilities& instance); #endif /*CMPIOPENDRIM_ETHERNETPORTCAPABILITIES_H_*/ opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPort/0000755000175000017500000000000011377664252024365 5ustar guillaumeguillaumeopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPort/OpenDRIM_EthernetPortAccess.h0000644000175000017500000001133511377664252031743 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_ETHERNETPORTACCESS_H_ #define OPENDRIM_ETHERNETPORTACCESS_H_ #include "EthernetPort_Common.h" #include "OpenDRIM_EthernetPort.h" int EthernetPort_OpenDRIM_EthernetPort_load(const CMPIBroker* broker, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPort_unload(string& errorMessage); int EthernetPort_OpenDRIM_EthernetPort_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_EthernetPort_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_EthernetPort& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPort_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& newInstance, const OpenDRIM_EthernetPort& oldInstance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPort_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPort_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPort_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, const OpenDRIM_EthernetPort_RequestStateChange_In& in, OpenDRIM_EthernetPort_RequestStateChange_Out& out, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPort_SetPowerState(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, const OpenDRIM_EthernetPort_SetPowerState_In& in, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPort_Reset(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPort_EnableDevice(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, const OpenDRIM_EthernetPort_EnableDevice_In& in, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPort_OnlineDevice(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, const OpenDRIM_EthernetPort_OnlineDevice_In& in, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPort_QuiesceDevice(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, const OpenDRIM_EthernetPort_QuiesceDevice_In& in, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPort_SaveProperties(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPort_RestoreProperties(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, string& errorMessage); int EthernetPort_OpenDRIM_EthernetPort_populate(OpenDRIM_EthernetPort& instance, string& errorMessage); #endif /*OPENDRIM_ETHERNETPORTACCESS_H_*/ opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPort/Makefile.am0000644000175000017500000000406211377664252026423 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiEthernetPort_OpenDRIM_EthernetPortProvider.la libcmpiEthernetPort_OpenDRIM_EthernetPortProvider_la_SOURCES = OpenDRIM_EthernetPortAccess.cpp OpenDRIM_EthernetPortProvider.cpp cmpiOpenDRIM_EthernetPort.cpp libcmpiEthernetPort_OpenDRIM_EthernetPortProvider_la_LIBADD = ../Common/libcmpiEthernetPort_Common.la libcmpiEthernetPort_OpenDRIM_EthernetPortProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_EthernetPort.h OpenDRIM_EthernetPort.h OpenDRIM_EthernetPortAccess.h opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPort/cmpiOpenDRIM_EthernetPort.h0000644000175000017500000000602211377664252031467 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_ETHERNETPORT_H_ #define CMPIOPENDRIM_ETHERNETPORT_H_ #include "OpenDRIM_EthernetPort.h" CMPIObjectPath* EthernetPort_OpenDRIM_EthernetPort_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_EthernetPort& instance); CMPIInstance* EthernetPort_OpenDRIM_EthernetPort_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_EthernetPort& instance); void EthernetPort_OpenDRIM_EthernetPort_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_EthernetPort& instance); void EthernetPort_OpenDRIM_EthernetPort_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_EthernetPort& instance); void EthernetPort_OpenDRIM_EthernetPort_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_EthernetPort_RequestStateChange_In& args); void EthernetPort_OpenDRIM_EthernetPort_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_EthernetPort_RequestStateChange_Out& args); void EthernetPort_OpenDRIM_EthernetPort_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_EthernetPort_SetPowerState_In& args); void EthernetPort_OpenDRIM_EthernetPort_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_EthernetPort_EnableDevice_In& args); void EthernetPort_OpenDRIM_EthernetPort_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_EthernetPort_OnlineDevice_In& args); void EthernetPort_OpenDRIM_EthernetPort_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_EthernetPort_QuiesceDevice_In& args); #endif /*CMPIOPENDRIM_ETHERNETPORT_H_*/ opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPort/OpenDRIM_EthernetPortAccess.cpp0000644000175000017500000002202511377664252032274 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_EthernetPortAccess.h" #include "Common/EthernetPort_Common.h" #include "net_dev.h" const string systemCreationClassName = "OpenDRIM_ComputerSystem"; const string creationClassName = "OpenDRIM_EthernetPort"; static string systemName; int EthernetPort_OpenDRIM_EthernetPort_load(const CMPIBroker* broker, string& errorMessage) { _E_; CF_assert(CF_getSystemName(systemName, errorMessage)); _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPort_unload(string& errorMessage) { _E_; // Nothing _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPort_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; vector eth_names; CF_assert(CF_getEthernetPortNames(eth_names, errorMessage)); //Initialize an instance OpenDRIM_EthernetPort instance; instance.setSystemCreationClassName(systemCreationClassName); instance.setSystemName(systemName); instance.setCreationClassName(creationClassName); for (unsigned int i=0;i eth_names; vector::size_type index; CF_assert(CF_getEthernetPortNames(eth_names, errorMessage)); if (instance.SystemCreationClassName != systemCreationClassName || instance.CreationClassName != creationClassName || instance.SystemName != systemName || !CF_foundInList(instance.DeviceID,eth_names,index)) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(EthernetPort_OpenDRIM_EthernetPort_populate(instance, errorMessage)); _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPort_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& newInstance, const OpenDRIM_EthernetPort& oldInstance, const char** properties, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPort_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPort_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPort_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, const OpenDRIM_EthernetPort_RequestStateChange_In& in, OpenDRIM_EthernetPort_RequestStateChange_Out& out, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPort_SetPowerState(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, const OpenDRIM_EthernetPort_SetPowerState_In& in, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPort_Reset(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPort_EnableDevice(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, const OpenDRIM_EthernetPort_EnableDevice_In& in, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPort_OnlineDevice(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, const OpenDRIM_EthernetPort_OnlineDevice_In& in, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPort_QuiesceDevice(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, const OpenDRIM_EthernetPort_QuiesceDevice_In& in, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPort_SaveProperties(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPort_RestoreProperties(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_EthernetPort& instance, unsigned int& returnValue, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_EthernetPort_populate(OpenDRIM_EthernetPort& instance, string& errorMessage) { _E_; /* * Properties to fill from profile * + Mandatory (from Ethernet): * [X] PortType * [X] NetworkAddresses * [X] Capabilities * [X] EnabledCapabilities * [X] LinkTechnology * [X] PermanentAddress * + Mandatory (from Network): * [X] SystemCreationClassName [KEY] * [X] CreationClassName [KEY] * [X] SystemName [KEY] * [X] DeviceID [KEY] * [X] Name * [X] EnabledState * [X] RequestedState * [X] ElementName * + Optional: * [-] Speed * [X] MaxSpeed * [-] RequestedSpeed * + Others: * [X] FullDuplex */ string hwaddr, temp; string ethtool_str; string addr; vector addresses; unsigned int enabledState; unsigned int index; instance.setName(instance.DeviceID); instance.setLinkTechnology(LT_ETHERNET); const char* mac = CN_getMacAddress(instance.DeviceID.c_str()); if (mac != NULL) { addr=CF_removeChar(mac,":"); instance.setPermanentAddress(addr); addresses.push_back(addr); instance.setNetworkAddresses(addresses); free((void*)mac); } CF_getEthEnabledState(instance.DeviceID,enabledState,errorMessage); instance.setEnabledState(enabledState); // Setting RequestedState as Not applicable, // as far as the RequestStateChange method is Not Supported. // (see: Network Port Profile) instance.setRequestedState(RS_NOT_APPLICABLE); index=instance.DeviceID.find_first_of("0123456789"); if(index!=string::npos) instance.setElementName("Ethernet Interface " + instance.DeviceID.substr(index,instance.DeviceID.length()-index)); else instance.setElementName("Ethernet Interface"); CF_assert(CF_runCommand("ethtool eth0 | grep Speed | awk '{print $2}'", ethtool_str, temp, errorMessage)); instance.setMaxSpeed(atoi(ethtool_str.c_str())*1024*1024); int speed = atoi(ethtool_str.c_str()); switch(speed) { case 10: instance.setPortType(PT_10BASET); break; case 100: instance.setPortType(PT_100BASET); break; case 1000: instance.setPortType(PT_1000BASET); break; case 2500: instance.setPortType(PT_2500BASET); break; case 10000: instance.setPortType(PT_10GBASET); break; default: instance.setPortType(PT_UNKNOWN); break; } CF_assert(CF_runCommand("ethtool eth0 | grep Duplex | awk '{print $2}'", ethtool_str, temp, errorMessage)); if (CF_trimText(ethtool_str) == "Full") instance.setFullDuplex(true); else instance.setFullDuplex(false); vector capabilities; vector enabledCapabilities; CF_assert(CF_getCapabilities(capabilities,enabledCapabilities,instance.DeviceID,errorMessage)); instance.setCapabilities(capabilities); instance.setEnabledCapabilities(enabledCapabilities); _L_; return OK; } opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPort/cmpiOpenDRIM_EthernetPort.cpp0000644000175000017500000004433211377664252032030 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPort.h" CMPIObjectPath* EthernetPort_OpenDRIM_EthernetPort_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_EthernetPort& instance) { _E_; Objectpath op(broker, OpenDRIM_EthernetPort_classnames[0], OpenDRIM_EthernetPort_NAMESPACE); if (!instance.SystemCreationClassName_isNULL) op.addKey("SystemCreationClassName", instance.SystemCreationClassName); if (!instance.SystemName_isNULL) op.addKey("SystemName", instance.SystemName); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); if (!instance.DeviceID_isNULL) op.addKey("DeviceID", instance.DeviceID); _L_; return op.getHdl(); } CMPIInstance* EthernetPort_OpenDRIM_EthernetPort_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_EthernetPort& instance) { _E_; Objectpath op(broker, EthernetPort_OpenDRIM_EthernetPort_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.Name_isNULL) ci.setProperty("Name", instance.Name); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.EnabledState_isNULL) ci.setProperty("EnabledState", instance.EnabledState); if (!instance.OtherEnabledState_isNULL) ci.setProperty("OtherEnabledState", instance.OtherEnabledState); if (!instance.RequestedState_isNULL) ci.setProperty("RequestedState", instance.RequestedState); if (!instance.EnabledDefault_isNULL) ci.setProperty("EnabledDefault", instance.EnabledDefault); if (!instance.TimeOfLastStateChange_isNULL) ci.setPropertyDatetime("TimeOfLastStateChange", instance.TimeOfLastStateChange); if (!instance.AvailableRequestedStates_isNULL) ci.setProperty("AvailableRequestedStates", instance.AvailableRequestedStates); if (!instance.TransitioningToState_isNULL) ci.setProperty("TransitioningToState", instance.TransitioningToState); if (!instance.PowerManagementSupported_isNULL) ci.setProperty("PowerManagementSupported", instance.PowerManagementSupported); if (!instance.PowerManagementCapabilities_isNULL) ci.setProperty("PowerManagementCapabilities", instance.PowerManagementCapabilities); if (!instance.Availability_isNULL) ci.setProperty("Availability", instance.Availability); if (!instance.StatusInfo_isNULL) ci.setProperty("StatusInfo", instance.StatusInfo); if (!instance.LastErrorCode_isNULL) ci.setProperty("LastErrorCode", instance.LastErrorCode); if (!instance.ErrorDescription_isNULL) ci.setProperty("ErrorDescription", instance.ErrorDescription); if (!instance.ErrorCleared_isNULL) ci.setProperty("ErrorCleared", instance.ErrorCleared); if (!instance.OtherIdentifyingInfo_isNULL) ci.setProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo); if (!instance.PowerOnHours_isNULL) ci.setProperty("PowerOnHours", instance.PowerOnHours); if (!instance.TotalPowerOnHours_isNULL) ci.setProperty("TotalPowerOnHours", instance.TotalPowerOnHours); if (!instance.IdentifyingDescriptions_isNULL) ci.setProperty("IdentifyingDescriptions", instance.IdentifyingDescriptions); if (!instance.AdditionalAvailability_isNULL) ci.setProperty("AdditionalAvailability", instance.AdditionalAvailability); if (!instance.MaxQuiesceTime_isNULL) ci.setProperty("MaxQuiesceTime", instance.MaxQuiesceTime); if (!instance.LocationIndicator_isNULL) ci.setProperty("LocationIndicator", instance.LocationIndicator); if (!instance.MaxSpeed_isNULL) ci.setProperty("MaxSpeed", instance.MaxSpeed); if (!instance.RequestedSpeed_isNULL) ci.setProperty("RequestedSpeed", instance.RequestedSpeed); if (!instance.UsageRestriction_isNULL) ci.setProperty("UsageRestriction", instance.UsageRestriction); if (!instance.OtherPortType_isNULL) ci.setProperty("OtherPortType", instance.OtherPortType); if (!instance.Speed_isNULL) ci.setProperty("Speed", instance.Speed); if (!instance.OtherNetworkPortType_isNULL) ci.setProperty("OtherNetworkPortType", instance.OtherNetworkPortType); if (!instance.PortNumber_isNULL) ci.setProperty("PortNumber", instance.PortNumber); if (!instance.LinkTechnology_isNULL) ci.setProperty("LinkTechnology", instance.LinkTechnology); if (!instance.OtherLinkTechnology_isNULL) ci.setProperty("OtherLinkTechnology", instance.OtherLinkTechnology); if (!instance.PermanentAddress_isNULL) ci.setProperty("PermanentAddress", instance.PermanentAddress); if (!instance.FullDuplex_isNULL) ci.setProperty("FullDuplex", instance.FullDuplex); if (!instance.AutoSense_isNULL) ci.setProperty("AutoSense", instance.AutoSense); if (!instance.SupportedMaximumTransmissionUnit_isNULL) ci.setProperty("SupportedMaximumTransmissionUnit", instance.SupportedMaximumTransmissionUnit); if (!instance.ActiveMaximumTransmissionUnit_isNULL) ci.setProperty("ActiveMaximumTransmissionUnit", instance.ActiveMaximumTransmissionUnit); if (!instance.PortType_isNULL) ci.setProperty("PortType", instance.PortType); if (!instance.NetworkAddresses_isNULL) ci.setProperty("NetworkAddresses", instance.NetworkAddresses); if (!instance.MaxDataSize_isNULL) ci.setProperty("MaxDataSize", instance.MaxDataSize); if (!instance.Capabilities_isNULL) ci.setProperty("Capabilities", instance.Capabilities); if (!instance.CapabilityDescriptions_isNULL) ci.setProperty("CapabilityDescriptions", instance.CapabilityDescriptions); if (!instance.EnabledCapabilities_isNULL) ci.setProperty("EnabledCapabilities", instance.EnabledCapabilities); if (!instance.OtherEnabledCapabilities_isNULL) ci.setProperty("OtherEnabledCapabilities", instance.OtherEnabledCapabilities); _L_; return ci.getHdl(); } void EthernetPort_OpenDRIM_EthernetPort_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_EthernetPort& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("DeviceID", instance.DeviceID) == OK) instance.DeviceID_isNULL = false; if (op.getKey("SystemCreationClassName", instance.SystemCreationClassName) == OK) instance.SystemCreationClassName_isNULL = false; if (op.getKey("SystemName", instance.SystemName) == OK) instance.SystemName_isNULL = false; if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; _L_; } void EthernetPort_OpenDRIM_EthernetPort_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_EthernetPort& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("EnabledState", instance.EnabledState) == OK) instance.EnabledState_isNULL = false; if (inst.getProperty("OtherEnabledState", instance.OtherEnabledState) == OK) instance.OtherEnabledState_isNULL = false; if (inst.getProperty("RequestedState", instance.RequestedState) == OK) instance.RequestedState_isNULL = false; if (inst.getProperty("EnabledDefault", instance.EnabledDefault) == OK) instance.EnabledDefault_isNULL = false; if (inst.getPropertyDatetime("TimeOfLastStateChange", instance.TimeOfLastStateChange) == OK) instance.TimeOfLastStateChange_isNULL = false; if (inst.getProperty("AvailableRequestedStates", instance.AvailableRequestedStates) == OK) instance.AvailableRequestedStates_isNULL = false; if (inst.getProperty("TransitioningToState", instance.TransitioningToState) == OK) instance.TransitioningToState_isNULL = false; if (inst.getProperty("SystemCreationClassName", instance.SystemCreationClassName) == OK) instance.SystemCreationClassName_isNULL = false; if (inst.getProperty("SystemName", instance.SystemName) == OK) instance.SystemName_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("DeviceID", instance.DeviceID) == OK) instance.DeviceID_isNULL = false; if (inst.getProperty("PowerManagementSupported", instance.PowerManagementSupported) == OK) instance.PowerManagementSupported_isNULL = false; if (inst.getProperty("PowerManagementCapabilities", instance.PowerManagementCapabilities) == OK) instance.PowerManagementCapabilities_isNULL = false; if (inst.getProperty("Availability", instance.Availability) == OK) instance.Availability_isNULL = false; if (inst.getProperty("StatusInfo", instance.StatusInfo) == OK) instance.StatusInfo_isNULL = false; if (inst.getProperty("LastErrorCode", instance.LastErrorCode) == OK) instance.LastErrorCode_isNULL = false; if (inst.getProperty("ErrorDescription", instance.ErrorDescription) == OK) instance.ErrorDescription_isNULL = false; if (inst.getProperty("ErrorCleared", instance.ErrorCleared) == OK) instance.ErrorCleared_isNULL = false; if (inst.getProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo) == OK) instance.OtherIdentifyingInfo_isNULL = false; if (inst.getProperty("PowerOnHours", instance.PowerOnHours) == OK) instance.PowerOnHours_isNULL = false; if (inst.getProperty("TotalPowerOnHours", instance.TotalPowerOnHours) == OK) instance.TotalPowerOnHours_isNULL = false; if (inst.getProperty("IdentifyingDescriptions", instance.IdentifyingDescriptions) == OK) instance.IdentifyingDescriptions_isNULL = false; if (inst.getProperty("AdditionalAvailability", instance.AdditionalAvailability) == OK) instance.AdditionalAvailability_isNULL = false; if (inst.getProperty("MaxQuiesceTime", instance.MaxQuiesceTime) == OK) instance.MaxQuiesceTime_isNULL = false; if (inst.getProperty("LocationIndicator", instance.LocationIndicator) == OK) instance.LocationIndicator_isNULL = false; if (inst.getProperty("MaxSpeed", instance.MaxSpeed) == OK) instance.MaxSpeed_isNULL = false; if (inst.getProperty("RequestedSpeed", instance.RequestedSpeed) == OK) instance.RequestedSpeed_isNULL = false; if (inst.getProperty("UsageRestriction", instance.UsageRestriction) == OK) instance.UsageRestriction_isNULL = false; if (inst.getProperty("OtherPortType", instance.OtherPortType) == OK) instance.OtherPortType_isNULL = false; if (inst.getProperty("Speed", instance.Speed) == OK) instance.Speed_isNULL = false; if (inst.getProperty("OtherNetworkPortType", instance.OtherNetworkPortType) == OK) instance.OtherNetworkPortType_isNULL = false; if (inst.getProperty("PortNumber", instance.PortNumber) == OK) instance.PortNumber_isNULL = false; if (inst.getProperty("LinkTechnology", instance.LinkTechnology) == OK) instance.LinkTechnology_isNULL = false; if (inst.getProperty("OtherLinkTechnology", instance.OtherLinkTechnology) == OK) instance.OtherLinkTechnology_isNULL = false; if (inst.getProperty("PermanentAddress", instance.PermanentAddress) == OK) instance.PermanentAddress_isNULL = false; if (inst.getProperty("FullDuplex", instance.FullDuplex) == OK) instance.FullDuplex_isNULL = false; if (inst.getProperty("AutoSense", instance.AutoSense) == OK) instance.AutoSense_isNULL = false; if (inst.getProperty("SupportedMaximumTransmissionUnit", instance.SupportedMaximumTransmissionUnit) == OK) instance.SupportedMaximumTransmissionUnit_isNULL = false; if (inst.getProperty("ActiveMaximumTransmissionUnit", instance.ActiveMaximumTransmissionUnit) == OK) instance.ActiveMaximumTransmissionUnit_isNULL = false; if (inst.getProperty("PortType", instance.PortType) == OK) instance.PortType_isNULL = false; if (inst.getProperty("NetworkAddresses", instance.NetworkAddresses) == OK) instance.NetworkAddresses_isNULL = false; if (inst.getProperty("MaxDataSize", instance.MaxDataSize) == OK) instance.MaxDataSize_isNULL = false; if (inst.getProperty("Capabilities", instance.Capabilities) == OK) instance.Capabilities_isNULL = false; if (inst.getProperty("CapabilityDescriptions", instance.CapabilityDescriptions) == OK) instance.CapabilityDescriptions_isNULL = false; if (inst.getProperty("EnabledCapabilities", instance.EnabledCapabilities) == OK) instance.EnabledCapabilities_isNULL = false; if (inst.getProperty("OtherEnabledCapabilities", instance.OtherEnabledCapabilities) == OK) instance.OtherEnabledCapabilities_isNULL = false; _L_; } void EthernetPort_OpenDRIM_EthernetPort_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_EthernetPort_RequestStateChange_In& args) { _E_; CMPIStatus rc; CMPIData data; unsigned short RequestedState; data = in->ft->getArg(in, "RequestedState", &rc); if (rc.rc == OK) { CT_ToC(data, RequestedState); args.setRequestedState(RequestedState); } Objectpath Job; data = in->ft->getArg(in, "Job", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Job); args.setJob(Job); } string TimeoutPeriod; data = in->ft->getArg(in, "TimeoutPeriod", &rc); if (rc.rc == OK) { CT_ToCDatetime(data, TimeoutPeriod); args.setTimeoutPeriod(TimeoutPeriod); } _L_; } void EthernetPort_OpenDRIM_EthernetPort_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_EthernetPort_RequestStateChange_Out& args) { _E_; CMPIValue value; int errorMessage; Objectpath Job; errorMessage = args.getJob(Job); if (errorMessage == OK) { value = CT_toCMPI(Job); out->ft->addArg(out, "Job", &value, CMPI_ref); } _L_; } void EthernetPort_OpenDRIM_EthernetPort_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_EthernetPort_SetPowerState_In& args) { _E_; CMPIStatus rc; CMPIData data; unsigned short PowerState; data = in->ft->getArg(in, "PowerState", &rc); if (rc.rc == OK) { CT_ToC(data, PowerState); args.setPowerState(PowerState); } string Time; data = in->ft->getArg(in, "Time", &rc); if (rc.rc == OK) { CT_ToCDatetime(data, Time); args.setTime(Time); } _L_; } void EthernetPort_OpenDRIM_EthernetPort_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_EthernetPort_EnableDevice_In& args) { _E_; CMPIStatus rc; CMPIData data; bool Enabled; data = in->ft->getArg(in, "Enabled", &rc); if (rc.rc == OK) { CT_ToC(data, Enabled); args.setEnabled(Enabled); } _L_; } void EthernetPort_OpenDRIM_EthernetPort_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_EthernetPort_OnlineDevice_In& args) { _E_; CMPIStatus rc; CMPIData data; bool Online; data = in->ft->getArg(in, "Online", &rc); if (rc.rc == OK) { CT_ToC(data, Online); args.setOnline(Online); } _L_; } void EthernetPort_OpenDRIM_EthernetPort_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_EthernetPort_QuiesceDevice_In& args) { _E_; CMPIStatus rc; CMPIData data; bool Quiesce; data = in->ft->getArg(in, "Quiesce", &rc); if (rc.rc == OK) { CT_ToC(data, Quiesce); args.setQuiesce(Quiesce); } _L_; } opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPort/OpenDRIM_EthernetPortProvider.cpp0000644000175000017500000004267011377664252032675 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_EthernetPort.h" #include "OpenDRIM_EthernetPortAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define EthernetPort_OpenDRIM_EthernetPortProviderSetInstance EthernetPort_OpenDRIM_EthernetPortProviderModifyInstance #endif int EthernetPort_OpenDRIM_EthernetPort_init(const CMPIBroker* broker); int EthernetPort_OpenDRIM_EthernetPort_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_EthernetPortProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_EthernetPort_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPort_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_EthernetPort_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPort_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = EthernetPort_OpenDRIM_EthernetPort_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPort instance; EthernetPort_OpenDRIM_EthernetPort_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPort_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = EthernetPort_OpenDRIM_EthernetPort_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPort newInstance, oldInstance; EthernetPort_OpenDRIM_EthernetPort_toCPP(_broker, ci, newInstance); EthernetPort_OpenDRIM_EthernetPort_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPort_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPort_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPort instance; EthernetPort_OpenDRIM_EthernetPort_toCPP(_broker, ci, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPort_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPort_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPort_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = EthernetPort_OpenDRIM_EthernetPort_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPort instance; EthernetPort_OpenDRIM_EthernetPort_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPort_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_EthernetPort_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Method Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_EthernetPortProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_EthernetPort_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_EthernetPortProviderInvokeMethod(CMPIMethodMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* methodName, const CMPIArgs* in, CMPIArgs* out) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_EthernetPort instance; EthernetPort_OpenDRIM_EthernetPort_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"DeviceID", "SystemCreationClassName", "SystemName", "CreationClassName"}; int errorCode = EthernetPort_OpenDRIM_EthernetPort_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="RequestStateChange") { unsigned int returnValue; OpenDRIM_EthernetPort_RequestStateChange_In inArgs; EthernetPort_OpenDRIM_EthernetPort_toCPP(_broker, in, inArgs); OpenDRIM_EthernetPort_RequestStateChange_Out outArgs; errorCode = EthernetPort_OpenDRIM_EthernetPort_RequestStateChange(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } EthernetPort_OpenDRIM_EthernetPort_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="SetPowerState") { unsigned int returnValue; OpenDRIM_EthernetPort_SetPowerState_In inArgs; EthernetPort_OpenDRIM_EthernetPort_toCPP(_broker, in, inArgs); errorCode = EthernetPort_OpenDRIM_EthernetPort_SetPowerState(_broker, ctx, instance, returnValue, inArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="Reset") { unsigned int returnValue; errorCode = EthernetPort_OpenDRIM_EthernetPort_Reset(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="EnableDevice") { unsigned int returnValue; OpenDRIM_EthernetPort_EnableDevice_In inArgs; EthernetPort_OpenDRIM_EthernetPort_toCPP(_broker, in, inArgs); errorCode = EthernetPort_OpenDRIM_EthernetPort_EnableDevice(_broker, ctx, instance, returnValue, inArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="OnlineDevice") { unsigned int returnValue; OpenDRIM_EthernetPort_OnlineDevice_In inArgs; EthernetPort_OpenDRIM_EthernetPort_toCPP(_broker, in, inArgs); errorCode = EthernetPort_OpenDRIM_EthernetPort_OnlineDevice(_broker, ctx, instance, returnValue, inArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="QuiesceDevice") { unsigned int returnValue; OpenDRIM_EthernetPort_QuiesceDevice_In inArgs; EthernetPort_OpenDRIM_EthernetPort_toCPP(_broker, in, inArgs); errorCode = EthernetPort_OpenDRIM_EthernetPort_QuiesceDevice(_broker, ctx, instance, returnValue, inArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="SaveProperties") { unsigned int returnValue; errorCode = EthernetPort_OpenDRIM_EthernetPort_SaveProperties(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="RestoreProperties") { unsigned int returnValue; errorCode = EthernetPort_OpenDRIM_EthernetPort_RestoreProperties(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else { errorMessage = (string) OpenDRIM_EthernetPort_classnames[0] + ": " + "The requested method (" + (string) methodName +") was not found."; CMSetStatusWithChars(_broker, &rc, (CMPIrc) NOT_SUPPORTED, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; CMReturn(CMPI_RC_OK); } /* ---------------------------------------------------------------------------*/ /* End of Method Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int EthernetPort_OpenDRIM_EthernetPort_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPort_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_EthernetPort_init FAILED: " + (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int EthernetPort_OpenDRIM_EthernetPort_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_EthernetPort_unload(errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_EthernetPort_unload FAILED: " + (string) OpenDRIM_EthernetPort_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define EthernetPort_OpenDRIM_EthernetPort_INIT if (EthernetPort_OpenDRIM_EthernetPort_init(_broker) < 0) return NULL CMInstanceMIStub(EthernetPort_OpenDRIM_EthernetPortProvider, EthernetPort_OpenDRIM_EthernetPortProvider, _broker, EthernetPort_OpenDRIM_EthernetPort_INIT); CMMethodMIStub(EthernetPort_OpenDRIM_EthernetPortProvider, EthernetPort_OpenDRIM_EthernetPortProvider, _broker, EthernetPort_OpenDRIM_EthernetPort_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_EthernetPort/OpenDRIM_EthernetPort.h0000644000175000017500000007062111377664252030624 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_ETHERNETPORT_H_ #define OPENDRIM_ETHERNETPORT_H_ #include const static char* OpenDRIM_EthernetPort_classnames[] = {"OpenDRIM_EthernetPort"}; static string OpenDRIM_EthernetPort_NAMESPACE = _NAMESPACE; class OpenDRIM_EthernetPort { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstallDate; bool InstallDate_isNULL; string Name; bool Name_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; unsigned short EnabledState; bool EnabledState_isNULL; string OtherEnabledState; bool OtherEnabledState_isNULL; unsigned short RequestedState; bool RequestedState_isNULL; unsigned short EnabledDefault; bool EnabledDefault_isNULL; string TimeOfLastStateChange; bool TimeOfLastStateChange_isNULL; vector AvailableRequestedStates; bool AvailableRequestedStates_isNULL; unsigned short TransitioningToState; bool TransitioningToState_isNULL; string SystemCreationClassName; bool SystemCreationClassName_isNULL; string SystemName; bool SystemName_isNULL; string CreationClassName; bool CreationClassName_isNULL; string DeviceID; bool DeviceID_isNULL; bool PowerManagementSupported; bool PowerManagementSupported_isNULL; vector PowerManagementCapabilities; bool PowerManagementCapabilities_isNULL; unsigned short Availability; bool Availability_isNULL; unsigned short StatusInfo; bool StatusInfo_isNULL; unsigned int LastErrorCode; bool LastErrorCode_isNULL; string ErrorDescription; bool ErrorDescription_isNULL; bool ErrorCleared; bool ErrorCleared_isNULL; vector OtherIdentifyingInfo; bool OtherIdentifyingInfo_isNULL; unsigned long long PowerOnHours; bool PowerOnHours_isNULL; unsigned long long TotalPowerOnHours; bool TotalPowerOnHours_isNULL; vector IdentifyingDescriptions; bool IdentifyingDescriptions_isNULL; vector AdditionalAvailability; bool AdditionalAvailability_isNULL; unsigned long long MaxQuiesceTime; bool MaxQuiesceTime_isNULL; unsigned short LocationIndicator; bool LocationIndicator_isNULL; unsigned long long MaxSpeed; bool MaxSpeed_isNULL; unsigned long long RequestedSpeed; bool RequestedSpeed_isNULL; unsigned short UsageRestriction; bool UsageRestriction_isNULL; string OtherPortType; bool OtherPortType_isNULL; unsigned long long Speed; bool Speed_isNULL; string OtherNetworkPortType; bool OtherNetworkPortType_isNULL; unsigned short PortNumber; bool PortNumber_isNULL; unsigned short LinkTechnology; bool LinkTechnology_isNULL; string OtherLinkTechnology; bool OtherLinkTechnology_isNULL; string PermanentAddress; bool PermanentAddress_isNULL; bool FullDuplex; bool FullDuplex_isNULL; bool AutoSense; bool AutoSense_isNULL; unsigned long long SupportedMaximumTransmissionUnit; bool SupportedMaximumTransmissionUnit_isNULL; unsigned long long ActiveMaximumTransmissionUnit; bool ActiveMaximumTransmissionUnit_isNULL; unsigned short PortType; bool PortType_isNULL; vector NetworkAddresses; bool NetworkAddresses_isNULL; unsigned int MaxDataSize; bool MaxDataSize_isNULL; vector Capabilities; bool Capabilities_isNULL; vector CapabilityDescriptions; bool CapabilityDescriptions_isNULL; vector EnabledCapabilities; bool EnabledCapabilities_isNULL; vector OtherEnabledCapabilities; bool OtherEnabledCapabilities_isNULL; OpenDRIM_EthernetPort() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstallDate_isNULL = true; Name_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; EnabledState_isNULL = true; OtherEnabledState_isNULL = true; RequestedState_isNULL = true; EnabledDefault_isNULL = true; TimeOfLastStateChange_isNULL = true; AvailableRequestedStates_isNULL = true; TransitioningToState_isNULL = true; SystemCreationClassName_isNULL = true; SystemName_isNULL = true; CreationClassName_isNULL = true; DeviceID_isNULL = true; PowerManagementSupported_isNULL = true; PowerManagementCapabilities_isNULL = true; Availability_isNULL = true; StatusInfo_isNULL = true; LastErrorCode_isNULL = true; ErrorDescription_isNULL = true; ErrorCleared_isNULL = true; OtherIdentifyingInfo_isNULL = true; PowerOnHours_isNULL = true; TotalPowerOnHours_isNULL = true; IdentifyingDescriptions_isNULL = true; AdditionalAvailability_isNULL = true; MaxQuiesceTime_isNULL = true; LocationIndicator_isNULL = true; MaxSpeed_isNULL = true; RequestedSpeed_isNULL = true; UsageRestriction_isNULL = true; OtherPortType_isNULL = true; Speed_isNULL = true; OtherNetworkPortType_isNULL = true; PortNumber_isNULL = true; LinkTechnology_isNULL = true; OtherLinkTechnology_isNULL = true; PermanentAddress_isNULL = true; FullDuplex_isNULL = true; AutoSense_isNULL = true; SupportedMaximumTransmissionUnit_isNULL = true; ActiveMaximumTransmissionUnit_isNULL = true; PortType_isNULL = true; NetworkAddresses_isNULL = true; MaxDataSize_isNULL = true; Capabilities_isNULL = true; CapabilityDescriptions_isNULL = true; EnabledCapabilities_isNULL = true; OtherEnabledCapabilities_isNULL = true; } ~OpenDRIM_EthernetPort() {} string getKeys() const { return CF_toLowCase(".SystemCreationClassName=\"" + CF_quoteString(SystemCreationClassName) + "\""".SystemName=\"" + CF_quoteString(SystemName) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""".DeviceID=\"" + CF_quoteString(DeviceID) + "\""); } int getCaption(string& value) const { if (Caption_isNULL==true) return NOT_FOUND; value = Caption; return OK; } int setCaption(const string& newValue) { Caption = newValue; Caption_isNULL = false; return OK; } int getDescription(string& value) const { if (Description_isNULL==true) return NOT_FOUND; value = Description; return OK; } int setDescription(const string& newValue) { Description = newValue; Description_isNULL = false; return OK; } int getElementName(string& value) const { if (ElementName_isNULL==true) return NOT_FOUND; value = ElementName; return OK; } int setElementName(const string& newValue) { ElementName = newValue; ElementName_isNULL = false; return OK; } int getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getEnabledState(unsigned short& value) const { if (EnabledState_isNULL==true) return NOT_FOUND; value = EnabledState; return OK; } int setEnabledState(const unsigned short& newValue) { EnabledState = newValue; EnabledState_isNULL = false; return OK; } int getOtherEnabledState(string& value) const { if (OtherEnabledState_isNULL==true) return NOT_FOUND; value = OtherEnabledState; return OK; } int setOtherEnabledState(const string& newValue) { OtherEnabledState = newValue; OtherEnabledState_isNULL = false; return OK; } int getRequestedState(unsigned short& value) const { if (RequestedState_isNULL==true) return NOT_FOUND; value = RequestedState; return OK; } int setRequestedState(const unsigned short& newValue) { RequestedState = newValue; RequestedState_isNULL = false; return OK; } int getEnabledDefault(unsigned short& value) const { if (EnabledDefault_isNULL==true) return NOT_FOUND; value = EnabledDefault; return OK; } int setEnabledDefault(const unsigned short& newValue) { EnabledDefault = newValue; EnabledDefault_isNULL = false; return OK; } int getTimeOfLastStateChange(string& value) const { if (TimeOfLastStateChange_isNULL==true) return NOT_FOUND; value = TimeOfLastStateChange; return OK; } int setTimeOfLastStateChange(const string& newValue) { TimeOfLastStateChange = newValue; TimeOfLastStateChange_isNULL = false; return OK; } int getAvailableRequestedStates(vector& value) const { if (AvailableRequestedStates_isNULL==true) return NOT_FOUND; value = AvailableRequestedStates; return OK; } int setAvailableRequestedStates(const vector& newValue) { AvailableRequestedStates = newValue; AvailableRequestedStates_isNULL = false; return OK; } int getTransitioningToState(unsigned short& value) const { if (TransitioningToState_isNULL==true) return NOT_FOUND; value = TransitioningToState; return OK; } int setTransitioningToState(const unsigned short& newValue) { TransitioningToState = newValue; TransitioningToState_isNULL = false; return OK; } int getSystemCreationClassName(string& value) const { if (SystemCreationClassName_isNULL==true) return NOT_FOUND; value = SystemCreationClassName; return OK; } int setSystemCreationClassName(const string& newValue) { SystemCreationClassName = newValue; SystemCreationClassName_isNULL = false; return OK; } int getSystemName(string& value) const { if (SystemName_isNULL==true) return NOT_FOUND; value = SystemName; return OK; } int setSystemName(const string& newValue) { SystemName = newValue; SystemName_isNULL = false; return OK; } int getCreationClassName(string& value) const { if (CreationClassName_isNULL==true) return NOT_FOUND; value = CreationClassName; return OK; } int setCreationClassName(const string& newValue) { CreationClassName = newValue; CreationClassName_isNULL = false; return OK; } int getDeviceID(string& value) const { if (DeviceID_isNULL==true) return NOT_FOUND; value = DeviceID; return OK; } int setDeviceID(const string& newValue) { DeviceID = newValue; DeviceID_isNULL = false; return OK; } int getPowerManagementSupported(bool& value) const { if (PowerManagementSupported_isNULL==true) return NOT_FOUND; value = PowerManagementSupported; return OK; } int setPowerManagementSupported(const bool& newValue) { PowerManagementSupported = newValue; PowerManagementSupported_isNULL = false; return OK; } int getPowerManagementCapabilities(vector& value) const { if (PowerManagementCapabilities_isNULL==true) return NOT_FOUND; value = PowerManagementCapabilities; return OK; } int setPowerManagementCapabilities(const vector& newValue) { PowerManagementCapabilities = newValue; PowerManagementCapabilities_isNULL = false; return OK; } int getAvailability(unsigned short& value) const { if (Availability_isNULL==true) return NOT_FOUND; value = Availability; return OK; } int setAvailability(const unsigned short& newValue) { Availability = newValue; Availability_isNULL = false; return OK; } int getStatusInfo(unsigned short& value) const { if (StatusInfo_isNULL==true) return NOT_FOUND; value = StatusInfo; return OK; } int setStatusInfo(const unsigned short& newValue) { StatusInfo = newValue; StatusInfo_isNULL = false; return OK; } int getLastErrorCode(unsigned int& value) const { if (LastErrorCode_isNULL==true) return NOT_FOUND; value = LastErrorCode; return OK; } int setLastErrorCode(const unsigned int& newValue) { LastErrorCode = newValue; LastErrorCode_isNULL = false; return OK; } int getErrorDescription(string& value) const { if (ErrorDescription_isNULL==true) return NOT_FOUND; value = ErrorDescription; return OK; } int setErrorDescription(const string& newValue) { ErrorDescription = newValue; ErrorDescription_isNULL = false; return OK; } int getErrorCleared(bool& value) const { if (ErrorCleared_isNULL==true) return NOT_FOUND; value = ErrorCleared; return OK; } int setErrorCleared(const bool& newValue) { ErrorCleared = newValue; ErrorCleared_isNULL = false; return OK; } int getOtherIdentifyingInfo(vector& value) const { if (OtherIdentifyingInfo_isNULL==true) return NOT_FOUND; value = OtherIdentifyingInfo; return OK; } int setOtherIdentifyingInfo(const vector& newValue) { OtherIdentifyingInfo = newValue; OtherIdentifyingInfo_isNULL = false; return OK; } int getPowerOnHours(unsigned long long& value) const { if (PowerOnHours_isNULL==true) return NOT_FOUND; value = PowerOnHours; return OK; } int setPowerOnHours(const unsigned long long& newValue) { PowerOnHours = newValue; PowerOnHours_isNULL = false; return OK; } int getTotalPowerOnHours(unsigned long long& value) const { if (TotalPowerOnHours_isNULL==true) return NOT_FOUND; value = TotalPowerOnHours; return OK; } int setTotalPowerOnHours(const unsigned long long& newValue) { TotalPowerOnHours = newValue; TotalPowerOnHours_isNULL = false; return OK; } int getIdentifyingDescriptions(vector& value) const { if (IdentifyingDescriptions_isNULL==true) return NOT_FOUND; value = IdentifyingDescriptions; return OK; } int setIdentifyingDescriptions(const vector& newValue) { IdentifyingDescriptions = newValue; IdentifyingDescriptions_isNULL = false; return OK; } int getAdditionalAvailability(vector& value) const { if (AdditionalAvailability_isNULL==true) return NOT_FOUND; value = AdditionalAvailability; return OK; } int setAdditionalAvailability(const vector& newValue) { AdditionalAvailability = newValue; AdditionalAvailability_isNULL = false; return OK; } int getMaxQuiesceTime(unsigned long long& value) const { if (MaxQuiesceTime_isNULL==true) return NOT_FOUND; value = MaxQuiesceTime; return OK; } int setMaxQuiesceTime(const unsigned long long& newValue) { MaxQuiesceTime = newValue; MaxQuiesceTime_isNULL = false; return OK; } int getLocationIndicator(unsigned short& value) const { if (LocationIndicator_isNULL==true) return NOT_FOUND; value = LocationIndicator; return OK; } int setLocationIndicator(const unsigned short& newValue) { LocationIndicator = newValue; LocationIndicator_isNULL = false; return OK; } int getMaxSpeed(unsigned long long& value) const { if (MaxSpeed_isNULL==true) return NOT_FOUND; value = MaxSpeed; return OK; } int setMaxSpeed(const unsigned long long& newValue) { MaxSpeed = newValue; MaxSpeed_isNULL = false; return OK; } int getRequestedSpeed(unsigned long long& value) const { if (RequestedSpeed_isNULL==true) return NOT_FOUND; value = RequestedSpeed; return OK; } int setRequestedSpeed(const unsigned long long& newValue) { RequestedSpeed = newValue; RequestedSpeed_isNULL = false; return OK; } int getUsageRestriction(unsigned short& value) const { if (UsageRestriction_isNULL==true) return NOT_FOUND; value = UsageRestriction; return OK; } int setUsageRestriction(const unsigned short& newValue) { UsageRestriction = newValue; UsageRestriction_isNULL = false; return OK; } int getOtherPortType(string& value) const { if (OtherPortType_isNULL==true) return NOT_FOUND; value = OtherPortType; return OK; } int setOtherPortType(const string& newValue) { OtherPortType = newValue; OtherPortType_isNULL = false; return OK; } int getSpeed(unsigned long long& value) const { if (Speed_isNULL==true) return NOT_FOUND; value = Speed; return OK; } int setSpeed(const unsigned long long& newValue) { Speed = newValue; Speed_isNULL = false; return OK; } int getOtherNetworkPortType(string& value) const { if (OtherNetworkPortType_isNULL==true) return NOT_FOUND; value = OtherNetworkPortType; return OK; } int setOtherNetworkPortType(const string& newValue) { OtherNetworkPortType = newValue; OtherNetworkPortType_isNULL = false; return OK; } int getPortNumber(unsigned short& value) const { if (PortNumber_isNULL==true) return NOT_FOUND; value = PortNumber; return OK; } int setPortNumber(const unsigned short& newValue) { PortNumber = newValue; PortNumber_isNULL = false; return OK; } int getLinkTechnology(unsigned short& value) const { if (LinkTechnology_isNULL==true) return NOT_FOUND; value = LinkTechnology; return OK; } int setLinkTechnology(const unsigned short& newValue) { LinkTechnology = newValue; LinkTechnology_isNULL = false; return OK; } int getOtherLinkTechnology(string& value) const { if (OtherLinkTechnology_isNULL==true) return NOT_FOUND; value = OtherLinkTechnology; return OK; } int setOtherLinkTechnology(const string& newValue) { OtherLinkTechnology = newValue; OtherLinkTechnology_isNULL = false; return OK; } int getPermanentAddress(string& value) const { if (PermanentAddress_isNULL==true) return NOT_FOUND; value = PermanentAddress; return OK; } int setPermanentAddress(const string& newValue) { PermanentAddress = newValue; PermanentAddress_isNULL = false; return OK; } int getFullDuplex(bool& value) const { if (FullDuplex_isNULL==true) return NOT_FOUND; value = FullDuplex; return OK; } int setFullDuplex(const bool& newValue) { FullDuplex = newValue; FullDuplex_isNULL = false; return OK; } int getAutoSense(bool& value) const { if (AutoSense_isNULL==true) return NOT_FOUND; value = AutoSense; return OK; } int setAutoSense(const bool& newValue) { AutoSense = newValue; AutoSense_isNULL = false; return OK; } int getSupportedMaximumTransmissionUnit(unsigned long long& value) const { if (SupportedMaximumTransmissionUnit_isNULL==true) return NOT_FOUND; value = SupportedMaximumTransmissionUnit; return OK; } int setSupportedMaximumTransmissionUnit(const unsigned long long& newValue) { SupportedMaximumTransmissionUnit = newValue; SupportedMaximumTransmissionUnit_isNULL = false; return OK; } int getActiveMaximumTransmissionUnit(unsigned long long& value) const { if (ActiveMaximumTransmissionUnit_isNULL==true) return NOT_FOUND; value = ActiveMaximumTransmissionUnit; return OK; } int setActiveMaximumTransmissionUnit(const unsigned long long& newValue) { ActiveMaximumTransmissionUnit = newValue; ActiveMaximumTransmissionUnit_isNULL = false; return OK; } int getPortType(unsigned short& value) const { if (PortType_isNULL==true) return NOT_FOUND; value = PortType; return OK; } int setPortType(const unsigned short& newValue) { PortType = newValue; PortType_isNULL = false; return OK; } int getNetworkAddresses(vector& value) const { if (NetworkAddresses_isNULL==true) return NOT_FOUND; value = NetworkAddresses; return OK; } int setNetworkAddresses(const vector& newValue) { NetworkAddresses = newValue; NetworkAddresses_isNULL = false; return OK; } int getMaxDataSize(unsigned int& value) const { if (MaxDataSize_isNULL==true) return NOT_FOUND; value = MaxDataSize; return OK; } int setMaxDataSize(const unsigned int& newValue) { MaxDataSize = newValue; MaxDataSize_isNULL = false; return OK; } int getCapabilities(vector& value) const { if (Capabilities_isNULL==true) return NOT_FOUND; value = Capabilities; return OK; } int setCapabilities(const vector& newValue) { Capabilities = newValue; Capabilities_isNULL = false; return OK; } int getCapabilityDescriptions(vector& value) const { if (CapabilityDescriptions_isNULL==true) return NOT_FOUND; value = CapabilityDescriptions; return OK; } int setCapabilityDescriptions(const vector& newValue) { CapabilityDescriptions = newValue; CapabilityDescriptions_isNULL = false; return OK; } int getEnabledCapabilities(vector& value) const { if (EnabledCapabilities_isNULL==true) return NOT_FOUND; value = EnabledCapabilities; return OK; } int setEnabledCapabilities(const vector& newValue) { EnabledCapabilities = newValue; EnabledCapabilities_isNULL = false; return OK; } int getOtherEnabledCapabilities(vector& value) const { if (OtherEnabledCapabilities_isNULL==true) return NOT_FOUND; value = OtherEnabledCapabilities; return OK; } int setOtherEnabledCapabilities(const vector& newValue) { OtherEnabledCapabilities = newValue; OtherEnabledCapabilities_isNULL = false; return OK; } }; class OpenDRIM_EthernetPort_RequestStateChange_In { public: unsigned short RequestedState; bool RequestedState_isNULL; Objectpath Job; bool Job_isNULL; string TimeoutPeriod; bool TimeoutPeriod_isNULL; OpenDRIM_EthernetPort_RequestStateChange_In() { RequestedState_isNULL = true; Job_isNULL = true; TimeoutPeriod_isNULL = true; } ~OpenDRIM_EthernetPort_RequestStateChange_In() {} int getRequestedState(unsigned short& value) const { if (RequestedState_isNULL == true) return NOT_FOUND; value = RequestedState; return OK; } int setRequestedState(const unsigned short& newValue) { RequestedState = newValue; RequestedState_isNULL = false; return OK; } int getJob(Objectpath& value) const { if (Job_isNULL == true) return NOT_FOUND; value = Job; return OK; } int setJob(const Objectpath& newValue) { Job = newValue; Job_isNULL = false; return OK; } int getTimeoutPeriod(string& value) const { if (TimeoutPeriod_isNULL == true) return NOT_FOUND; value = TimeoutPeriod; return OK; } int setTimeoutPeriod(const string& newValue) { TimeoutPeriod = newValue; TimeoutPeriod_isNULL = false; return OK; } }; class OpenDRIM_EthernetPort_RequestStateChange_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_EthernetPort_RequestStateChange_Out() { Job_isNULL = true; } ~OpenDRIM_EthernetPort_RequestStateChange_Out() {} int getJob(Objectpath& value) const { if (Job_isNULL == true) return NOT_FOUND; value = Job; return OK; } int setJob(const Objectpath& newValue) { Job = newValue; Job_isNULL = false; return OK; } }; class OpenDRIM_EthernetPort_SetPowerState_In { public: unsigned short PowerState; bool PowerState_isNULL; string Time; bool Time_isNULL; OpenDRIM_EthernetPort_SetPowerState_In() { PowerState_isNULL = true; Time_isNULL = true; } ~OpenDRIM_EthernetPort_SetPowerState_In() {} int getPowerState(unsigned short& value) const { if (PowerState_isNULL == true) return NOT_FOUND; value = PowerState; return OK; } int setPowerState(const unsigned short& newValue) { PowerState = newValue; PowerState_isNULL = false; return OK; } int getTime(string& value) const { if (Time_isNULL == true) return NOT_FOUND; value = Time; return OK; } int setTime(const string& newValue) { Time = newValue; Time_isNULL = false; return OK; } }; class OpenDRIM_EthernetPort_EnableDevice_In { public: bool Enabled; bool Enabled_isNULL; OpenDRIM_EthernetPort_EnableDevice_In() { Enabled_isNULL = true; } ~OpenDRIM_EthernetPort_EnableDevice_In() {} int getEnabled(bool& value) const { if (Enabled_isNULL == true) return NOT_FOUND; value = Enabled; return OK; } int setEnabled(const bool& newValue) { Enabled = newValue; Enabled_isNULL = false; return OK; } }; class OpenDRIM_EthernetPort_OnlineDevice_In { public: bool Online; bool Online_isNULL; OpenDRIM_EthernetPort_OnlineDevice_In() { Online_isNULL = true; } ~OpenDRIM_EthernetPort_OnlineDevice_In() {} int getOnline(bool& value) const { if (Online_isNULL == true) return NOT_FOUND; value = Online; return OK; } int setOnline(const bool& newValue) { Online = newValue; Online_isNULL = false; return OK; } }; class OpenDRIM_EthernetPort_QuiesceDevice_In { public: bool Quiesce; bool Quiesce_isNULL; OpenDRIM_EthernetPort_QuiesceDevice_In() { Quiesce_isNULL = true; } ~OpenDRIM_EthernetPort_QuiesceDevice_In() {} int getQuiesce(bool& value) const { if (Quiesce_isNULL == true) return NOT_FOUND; value = Quiesce; return OK; } int setQuiesce(const bool& newValue) { Quiesce = newValue; Quiesce_isNULL = false; return OK; } }; #endif /*OPENDRIM_ETHERNETPORT_H_*/ opendrim-lmp-ethernetport-1.1.2~ppa/COPYING0000644000175000017500000004310311377664252021341 0ustar guillaumeguillaume GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. opendrim-lmp-ethernetport-1.1.2~ppa/NEWS0000644000175000017500000000055511404314174020773 0ustar guillaumeguillaumeChanges in 1.1.2 ========================= - Code adjustement Changes in 1.1.0 ========================= Provider conformed to DMTF Record Log Profile 1.0.0 + Code update and fixes added + RPM spec file added + make pkg-src and pkg-rpm commands added Changes in 1.0.1 ========================= // TODO Initial Release 1.0.0 ========================= // TODO opendrim-lmp-ethernetport-1.1.2~ppa/LICENSE0000644000175000017500000000301611377664252021312 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2007 Ilsoo Byun # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2008 Guillaume BOTTEX, ETRI ################################################################################ opendrim-lmp-ethernetport-1.1.2~ppa/README0000644000175000017500000000103311377664252021162 0ustar guillaumeguillaume--------------------------------------------------------- REQUIREMENTS --------------------------------------------------------- For compliling: * gcc >= 3.2.0 * cmpi header files >= ver 86 * autoconf >= 2.57 * automake >= 1.5 * libtool (preferably >= 1.8.5) * OpenDRIM Common Library >= 1.1.1 For running: * OpenPegasus >= 2.5.2 OR SBLIM sfcb >= 1.2.0 OR OpenWBEM >= 3.2.2 * Interop package (for sfcb and OpenPegasus only) * In the case of pegasus installed from sources, the PEGASUS_HOME and PEGASUS_ROOT variable MUST be defined! opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpoint/0000755000175000017500000000000011377664252024055 5ustar guillaumeguillaumeopendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpoint/cmpiOpenDRIM_LANEndpoint.h0000644000175000017500000000467711377664252030665 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_LANENDPOINT_H_ #define CMPIOPENDRIM_LANENDPOINT_H_ #include "OpenDRIM_LANEndpoint.h" CMPIObjectPath* EthernetPort_OpenDRIM_LANEndpoint_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_LANEndpoint& instance); CMPIInstance* EthernetPort_OpenDRIM_LANEndpoint_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_LANEndpoint& instance); void EthernetPort_OpenDRIM_LANEndpoint_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_LANEndpoint& instance); void EthernetPort_OpenDRIM_LANEndpoint_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_LANEndpoint& instance); void EthernetPort_OpenDRIM_LANEndpoint_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_LANEndpoint_RequestStateChange_In& args); void EthernetPort_OpenDRIM_LANEndpoint_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_LANEndpoint_RequestStateChange_Out& args); #endif /*CMPIOPENDRIM_LANENDPOINT_H_*/ opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpoint/Makefile.am0000644000175000017500000000402311377664252026110 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiEthernetPort_OpenDRIM_LANEndpointProvider.la libcmpiEthernetPort_OpenDRIM_LANEndpointProvider_la_SOURCES = OpenDRIM_LANEndpointAccess.cpp OpenDRIM_LANEndpointProvider.cpp cmpiOpenDRIM_LANEndpoint.cpp libcmpiEthernetPort_OpenDRIM_LANEndpointProvider_la_LIBADD = ../Common/libcmpiEthernetPort_Common.la libcmpiEthernetPort_OpenDRIM_LANEndpointProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_LANEndpoint.h OpenDRIM_LANEndpoint.h OpenDRIM_LANEndpointAccess.h opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpoint/OpenDRIM_LANEndpointAccess.cpp0000644000175000017500000001462011377664252031456 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_LANEndpointAccess.h" static const string systemCreationClassName = "OpenDRIM_ComputerSystem"; static const string creationClassName = "OpenDRIM_LANEndpoint"; static string systemName; int EthernetPort_OpenDRIM_LANEndpoint_load(const CMPIBroker* broker, string& errorMessage) { _E_; CF_assert(CF_getSystemName(systemName, errorMessage)); _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpoint_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpoint_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; vector eth_names; CF_assert(CF_getEthernetPortNames(eth_names, errorMessage)); //Initialize an instance OpenDRIM_LANEndpoint instance; instance.setSystemCreationClassName(systemCreationClassName); instance.setSystemName(systemName); instance.setCreationClassName(creationClassName); for(unsigned int i=0;i eth_names; vector::size_type index; CF_assert(CF_getEthernetPortNames(eth_names, errorMessage)); if( instance.SystemCreationClassName == systemCreationClassName && instance.CreationClassName == creationClassName && instance.SystemName == systemName && CF_foundInList(instance.Name,eth_names,index)) { CF_assert(EthernetPort_OpenDRIM_LANEndpoint_populate(instance, errorMessage)); } else { errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpoint_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpoint& newInstance, const OpenDRIM_LANEndpoint& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_LANEndpoint_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpoint& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_LANEndpoint_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpoint& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_LANEndpoint_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpoint& instance, unsigned int& returnValue, const OpenDRIM_LANEndpoint_RequestStateChange_In& in, OpenDRIM_LANEndpoint_RequestStateChange_Out& out, string& errorMessage) { _E_; // Conditional requirement, so not yet supported _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_LANEndpoint_BroadcastReset(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpoint& instance, unsigned int& returnValue, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int EthernetPort_OpenDRIM_LANEndpoint_populate(OpenDRIM_LANEndpoint& instance, string& errorMessage) { _E_; /* * Properties to fill from profile * + Mandatory: * [X] SystemCreationClassName [KEY] * [X] CreationClassName [KEY] * [X] SystemName [KEY] * [X] Name [KEY] * [X] NameFormat * [X] ProtocolIFType * [X] MACAddress * [X] RequestedState * [X] EnabledState * [X] ElementName * + Optional: * [-] LANID * [-] AliasAddresses * [-] GroupAddresses * + Others: * [X] LANType */ string macaddr; unsigned int enabledState; unsigned int index; instance.setNameFormat("network-interface-name"); instance.setLANType(LEPT_ETHERNET); instance.setProtocolIFType(LEPIT_ETHERNET); // Setting the MAC Address CF_getHWaddress(instance.Name,macaddr,errorMessage); macaddr=CF_removeChar(macaddr,":\n"); instance.setMACAddress(macaddr); // Setting RequestedState as Not applicable, // as far as the RequestStateChange method is Not Supported. // (see: Network Port Profile) instance.setRequestedState(RS_NOT_APPLICABLE); // Setting EnabledState CF_getEthEnabledState(instance.Name,enabledState,errorMessage); instance.setEnabledState(enabledState); // Setting the ElementName instance.setElementName("Ethernet Interface " + instance.Name + " LAN Endpoint"); // Setting the ElementName index=instance.Name.find_first_of("0123456789"); if(index!=string::npos) instance.setElementName("Ethernet Interface " + instance.Name.substr(index,instance.Name.length()-index) + " LAN Endpoint"); else instance.setElementName("Ethernet Interface LAN Endpoint"); _L_; return OK; } opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpoint/OpenDRIM_LANEndpoint.h0000644000175000017500000004070611377664252030005 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_LANENDPOINT_H_ #define OPENDRIM_LANENDPOINT_H_ #include const static char* OpenDRIM_LANEndpoint_classnames[] = {"OpenDRIM_LANEndpoint"}; static string OpenDRIM_LANEndpoint_NAMESPACE = _NAMESPACE; class OpenDRIM_LANEndpoint { public: string Caption; bool Caption_isNULL; string ElementName; bool ElementName_isNULL; string InstallDate; bool InstallDate_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; string OtherEnabledState; bool OtherEnabledState_isNULL; unsigned short RequestedState; bool RequestedState_isNULL; unsigned short EnabledDefault; bool EnabledDefault_isNULL; vector AvailableRequestedStates; bool AvailableRequestedStates_isNULL; unsigned short TransitioningToState; bool TransitioningToState_isNULL; string SystemCreationClassName; bool SystemCreationClassName_isNULL; string SystemName; bool SystemName_isNULL; string CreationClassName; bool CreationClassName_isNULL; string Name; bool Name_isNULL; string Description; bool Description_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; unsigned short EnabledState; bool EnabledState_isNULL; string TimeOfLastStateChange; bool TimeOfLastStateChange_isNULL; string NameFormat; bool NameFormat_isNULL; unsigned short ProtocolType; bool ProtocolType_isNULL; string OtherTypeDescription; bool OtherTypeDescription_isNULL; bool BroadcastResetSupported; bool BroadcastResetSupported_isNULL; string LANID; bool LANID_isNULL; unsigned short LANType; bool LANType_isNULL; string OtherLANType; bool OtherLANType_isNULL; string MACAddress; bool MACAddress_isNULL; vector AliasAddresses; bool AliasAddresses_isNULL; vector GroupAddresses; bool GroupAddresses_isNULL; unsigned int MaxDataSize; bool MaxDataSize_isNULL; unsigned short ProtocolIFType; bool ProtocolIFType_isNULL; OpenDRIM_LANEndpoint() { Caption_isNULL = true; ElementName_isNULL = true; InstallDate_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; OtherEnabledState_isNULL = true; RequestedState_isNULL = true; EnabledDefault_isNULL = true; AvailableRequestedStates_isNULL = true; TransitioningToState_isNULL = true; SystemCreationClassName_isNULL = true; SystemName_isNULL = true; CreationClassName_isNULL = true; Name_isNULL = true; Description_isNULL = true; OperationalStatus_isNULL = true; EnabledState_isNULL = true; TimeOfLastStateChange_isNULL = true; NameFormat_isNULL = true; ProtocolType_isNULL = true; OtherTypeDescription_isNULL = true; BroadcastResetSupported_isNULL = true; LANID_isNULL = true; LANType_isNULL = true; OtherLANType_isNULL = true; MACAddress_isNULL = true; AliasAddresses_isNULL = true; GroupAddresses_isNULL = true; MaxDataSize_isNULL = true; ProtocolIFType_isNULL = true; } ~OpenDRIM_LANEndpoint() {} string getKeys() const { return CF_toLowCase(".SystemCreationClassName=\"" + CF_quoteString(SystemCreationClassName) + "\""".SystemName=\"" + CF_quoteString(SystemName) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""".Name=\"" + CF_quoteString(Name) + "\""); } int getCaption(string& value) const { if (Caption_isNULL==true) return NOT_FOUND; value = Caption; return OK; } int setCaption(const string& newValue) { Caption = newValue; Caption_isNULL = false; return OK; } int getElementName(string& value) const { if (ElementName_isNULL==true) return NOT_FOUND; value = ElementName; return OK; } int setElementName(const string& newValue) { ElementName = newValue; ElementName_isNULL = false; return OK; } int getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getOtherEnabledState(string& value) const { if (OtherEnabledState_isNULL==true) return NOT_FOUND; value = OtherEnabledState; return OK; } int setOtherEnabledState(const string& newValue) { OtherEnabledState = newValue; OtherEnabledState_isNULL = false; return OK; } int getRequestedState(unsigned short& value) const { if (RequestedState_isNULL==true) return NOT_FOUND; value = RequestedState; return OK; } int setRequestedState(const unsigned short& newValue) { RequestedState = newValue; RequestedState_isNULL = false; return OK; } int getEnabledDefault(unsigned short& value) const { if (EnabledDefault_isNULL==true) return NOT_FOUND; value = EnabledDefault; return OK; } int setEnabledDefault(const unsigned short& newValue) { EnabledDefault = newValue; EnabledDefault_isNULL = false; return OK; } int getAvailableRequestedStates(vector& value) const { if (AvailableRequestedStates_isNULL==true) return NOT_FOUND; value = AvailableRequestedStates; return OK; } int setAvailableRequestedStates(const vector& newValue) { AvailableRequestedStates = newValue; AvailableRequestedStates_isNULL = false; return OK; } int getTransitioningToState(unsigned short& value) const { if (TransitioningToState_isNULL==true) return NOT_FOUND; value = TransitioningToState; return OK; } int setTransitioningToState(const unsigned short& newValue) { TransitioningToState = newValue; TransitioningToState_isNULL = false; return OK; } int getSystemCreationClassName(string& value) const { if (SystemCreationClassName_isNULL==true) return NOT_FOUND; value = SystemCreationClassName; return OK; } int setSystemCreationClassName(const string& newValue) { SystemCreationClassName = newValue; SystemCreationClassName_isNULL = false; return OK; } int getSystemName(string& value) const { if (SystemName_isNULL==true) return NOT_FOUND; value = SystemName; return OK; } int setSystemName(const string& newValue) { SystemName = newValue; SystemName_isNULL = false; return OK; } int getCreationClassName(string& value) const { if (CreationClassName_isNULL==true) return NOT_FOUND; value = CreationClassName; return OK; } int setCreationClassName(const string& newValue) { CreationClassName = newValue; CreationClassName_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getDescription(string& value) const { if (Description_isNULL==true) return NOT_FOUND; value = Description; return OK; } int setDescription(const string& newValue) { Description = newValue; Description_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getEnabledState(unsigned short& value) const { if (EnabledState_isNULL==true) return NOT_FOUND; value = EnabledState; return OK; } int setEnabledState(const unsigned short& newValue) { EnabledState = newValue; EnabledState_isNULL = false; return OK; } int getTimeOfLastStateChange(string& value) const { if (TimeOfLastStateChange_isNULL==true) return NOT_FOUND; value = TimeOfLastStateChange; return OK; } int setTimeOfLastStateChange(const string& newValue) { TimeOfLastStateChange = newValue; TimeOfLastStateChange_isNULL = false; return OK; } int getNameFormat(string& value) const { if (NameFormat_isNULL==true) return NOT_FOUND; value = NameFormat; return OK; } int setNameFormat(const string& newValue) { NameFormat = newValue; NameFormat_isNULL = false; return OK; } int getProtocolType(unsigned short& value) const { if (ProtocolType_isNULL==true) return NOT_FOUND; value = ProtocolType; return OK; } int setProtocolType(const unsigned short& newValue) { ProtocolType = newValue; ProtocolType_isNULL = false; return OK; } int getOtherTypeDescription(string& value) const { if (OtherTypeDescription_isNULL==true) return NOT_FOUND; value = OtherTypeDescription; return OK; } int setOtherTypeDescription(const string& newValue) { OtherTypeDescription = newValue; OtherTypeDescription_isNULL = false; return OK; } int getBroadcastResetSupported(bool& value) const { if (BroadcastResetSupported_isNULL==true) return NOT_FOUND; value = BroadcastResetSupported; return OK; } int setBroadcastResetSupported(const bool& newValue) { BroadcastResetSupported = newValue; BroadcastResetSupported_isNULL = false; return OK; } int getLANID(string& value) const { if (LANID_isNULL==true) return NOT_FOUND; value = LANID; return OK; } int setLANID(const string& newValue) { LANID = newValue; LANID_isNULL = false; return OK; } int getLANType(unsigned short& value) const { if (LANType_isNULL==true) return NOT_FOUND; value = LANType; return OK; } int setLANType(const unsigned short& newValue) { LANType = newValue; LANType_isNULL = false; return OK; } int getOtherLANType(string& value) const { if (OtherLANType_isNULL==true) return NOT_FOUND; value = OtherLANType; return OK; } int setOtherLANType(const string& newValue) { OtherLANType = newValue; OtherLANType_isNULL = false; return OK; } int getMACAddress(string& value) const { if (MACAddress_isNULL==true) return NOT_FOUND; value = MACAddress; return OK; } int setMACAddress(const string& newValue) { MACAddress = newValue; MACAddress_isNULL = false; return OK; } int getAliasAddresses(vector& value) const { if (AliasAddresses_isNULL==true) return NOT_FOUND; value = AliasAddresses; return OK; } int setAliasAddresses(const vector& newValue) { AliasAddresses = newValue; AliasAddresses_isNULL = false; return OK; } int getGroupAddresses(vector& value) const { if (GroupAddresses_isNULL==true) return NOT_FOUND; value = GroupAddresses; return OK; } int setGroupAddresses(const vector& newValue) { GroupAddresses = newValue; GroupAddresses_isNULL = false; return OK; } int getMaxDataSize(unsigned int& value) const { if (MaxDataSize_isNULL==true) return NOT_FOUND; value = MaxDataSize; return OK; } int setMaxDataSize(const unsigned int& newValue) { MaxDataSize = newValue; MaxDataSize_isNULL = false; return OK; } int getProtocolIFType(unsigned short& value) const { if (ProtocolIFType_isNULL==true) return NOT_FOUND; value = ProtocolIFType; return OK; } int setProtocolIFType(const unsigned short& newValue) { ProtocolIFType = newValue; ProtocolIFType_isNULL = false; return OK; } }; class OpenDRIM_LANEndpoint_RequestStateChange_In { public: unsigned short RequestedState; bool RequestedState_isNULL; Objectpath Job; bool Job_isNULL; string TimeoutPeriod; bool TimeoutPeriod_isNULL; OpenDRIM_LANEndpoint_RequestStateChange_In() { RequestedState_isNULL = true; Job_isNULL = true; TimeoutPeriod_isNULL = true; } ~OpenDRIM_LANEndpoint_RequestStateChange_In() {} int getRequestedState(unsigned short& value) const { if (RequestedState_isNULL == true) return NOT_FOUND; value = RequestedState; return OK; } int setRequestedState(const unsigned short& newValue) { RequestedState = newValue; RequestedState_isNULL = false; return OK; } int getJob(Objectpath& value) const { if (Job_isNULL == true) return NOT_FOUND; value = Job; return OK; } int setJob(const Objectpath& newValue) { Job = newValue; Job_isNULL = false; return OK; } int getTimeoutPeriod(string& value) const { if (TimeoutPeriod_isNULL == true) return NOT_FOUND; value = TimeoutPeriod; return OK; } int setTimeoutPeriod(const string& newValue) { TimeoutPeriod = newValue; TimeoutPeriod_isNULL = false; return OK; } }; class OpenDRIM_LANEndpoint_RequestStateChange_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_LANEndpoint_RequestStateChange_Out() { Job_isNULL = true; } ~OpenDRIM_LANEndpoint_RequestStateChange_Out() {} int getJob(Objectpath& value) const { if (Job_isNULL == true) return NOT_FOUND; value = Job; return OK; } int setJob(const Objectpath& newValue) { Job = newValue; Job_isNULL = false; return OK; } }; #endif /*OPENDRIM_LANENDPOINT_H_*/ opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpoint/OpenDRIM_LANEndpointProvider.cpp0000644000175000017500000003362011377664252032050 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_LANEndpoint.h" #include "OpenDRIM_LANEndpointAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define EthernetPort_OpenDRIM_LANEndpointProviderSetInstance EthernetPort_OpenDRIM_LANEndpointProviderModifyInstance #endif int EthernetPort_OpenDRIM_LANEndpoint_init(const CMPIBroker* broker); int EthernetPort_OpenDRIM_LANEndpoint_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_LANEndpointProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_LANEndpoint_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpoint_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = EthernetPort_OpenDRIM_LANEndpoint_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpoint_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = EthernetPort_OpenDRIM_LANEndpoint_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LANEndpoint instance; EthernetPort_OpenDRIM_LANEndpoint_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpoint_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = EthernetPort_OpenDRIM_LANEndpoint_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LANEndpoint newInstance, oldInstance; EthernetPort_OpenDRIM_LANEndpoint_toCPP(_broker, ci, newInstance); EthernetPort_OpenDRIM_LANEndpoint_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpoint_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_LANEndpoint_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LANEndpoint instance; EthernetPort_OpenDRIM_LANEndpoint_toCPP(_broker, ci, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpoint_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_LANEndpoint_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_LANEndpoint_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = EthernetPort_OpenDRIM_LANEndpoint_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LANEndpoint instance; EthernetPort_OpenDRIM_LANEndpoint_toCPP(_broker, cop, instance); string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpoint_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = EthernetPort_OpenDRIM_LANEndpoint_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Method Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus EthernetPort_OpenDRIM_LANEndpointProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = EthernetPort_OpenDRIM_LANEndpoint_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus EthernetPort_OpenDRIM_LANEndpointProviderInvokeMethod(CMPIMethodMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* methodName, const CMPIArgs* in, CMPIArgs* out) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LANEndpoint instance; EthernetPort_OpenDRIM_LANEndpoint_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"SystemCreationClassName", "Name", "SystemName", "CreationClassName"}; int errorCode = EthernetPort_OpenDRIM_LANEndpoint_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="RequestStateChange") { unsigned int returnValue; OpenDRIM_LANEndpoint_RequestStateChange_In inArgs; EthernetPort_OpenDRIM_LANEndpoint_toCPP(_broker, in, inArgs); OpenDRIM_LANEndpoint_RequestStateChange_Out outArgs; errorCode = EthernetPort_OpenDRIM_LANEndpoint_RequestStateChange(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } EthernetPort_OpenDRIM_LANEndpoint_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="BroadcastReset") { unsigned int returnValue; errorCode = EthernetPort_OpenDRIM_LANEndpoint_BroadcastReset(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else { errorMessage = (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + "The requested method (" + (string) methodName +") was not found."; CMSetStatusWithChars(_broker, &rc, (CMPIrc) NOT_SUPPORTED, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; CMReturn(CMPI_RC_OK); } /* ---------------------------------------------------------------------------*/ /* End of Method Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int EthernetPort_OpenDRIM_LANEndpoint_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpoint_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_LANEndpoint_init FAILED: " + (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int EthernetPort_OpenDRIM_LANEndpoint_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = EthernetPort_OpenDRIM_LANEndpoint_unload(errorMessage); if (errorCode != OK) { errorMessage += "EthernetPort_OpenDRIM_LANEndpoint_unload FAILED: " + (string) OpenDRIM_LANEndpoint_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define EthernetPort_OpenDRIM_LANEndpoint_INIT if (EthernetPort_OpenDRIM_LANEndpoint_init(_broker) < 0) return NULL CMInstanceMIStub(EthernetPort_OpenDRIM_LANEndpointProvider, EthernetPort_OpenDRIM_LANEndpointProvider, _broker, EthernetPort_OpenDRIM_LANEndpoint_INIT); CMMethodMIStub(EthernetPort_OpenDRIM_LANEndpointProvider, EthernetPort_OpenDRIM_LANEndpointProvider, _broker, EthernetPort_OpenDRIM_LANEndpoint_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpoint/OpenDRIM_LANEndpointAccess.h0000644000175000017500000000655111377664252031127 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_LANENDPOINTACCESS_H_ #define OPENDRIM_LANENDPOINTACCESS_H_ #include "EthernetPort_Common.h" #include "OpenDRIM_LANEndpoint.h" int EthernetPort_OpenDRIM_LANEndpoint_load(const CMPIBroker* broker, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpoint_unload(string& errorMessage); int EthernetPort_OpenDRIM_LANEndpoint_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int EthernetPort_OpenDRIM_LANEndpoint_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_LANEndpoint& instance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpoint_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpoint& newInstance, const OpenDRIM_LANEndpoint& oldInstance, const char** properties, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpoint_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpoint& instance, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpoint_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpoint& instance, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpoint_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpoint& instance, unsigned int& returnValue, const OpenDRIM_LANEndpoint_RequestStateChange_In& in, OpenDRIM_LANEndpoint_RequestStateChange_Out& out, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpoint_BroadcastReset(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LANEndpoint& instance, unsigned int& returnValue, string& errorMessage); int EthernetPort_OpenDRIM_LANEndpoint_populate(OpenDRIM_LANEndpoint& instance, string& errorMessage); #endif /*OPENDRIM_LANENDPOINTACCESS_H_*/ opendrim-lmp-ethernetport-1.1.2~ppa/OpenDRIM_LANEndpoint/cmpiOpenDRIM_LANEndpoint.cpp0000644000175000017500000002630411377664252031207 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), EthernetPort provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_LANEndpoint.h" CMPIObjectPath* EthernetPort_OpenDRIM_LANEndpoint_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_LANEndpoint& instance) { _E_; Objectpath op(broker, OpenDRIM_LANEndpoint_classnames[0], OpenDRIM_LANEndpoint_NAMESPACE); if (!instance.SystemCreationClassName_isNULL) op.addKey("SystemCreationClassName", instance.SystemCreationClassName); if (!instance.SystemName_isNULL) op.addKey("SystemName", instance.SystemName); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); if (!instance.Name_isNULL) op.addKey("Name", instance.Name); _L_; return op.getHdl(); } CMPIInstance* EthernetPort_OpenDRIM_LANEndpoint_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_LANEndpoint& instance) { _E_; Objectpath op(broker, EthernetPort_OpenDRIM_LANEndpoint_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.OtherEnabledState_isNULL) ci.setProperty("OtherEnabledState", instance.OtherEnabledState); if (!instance.RequestedState_isNULL) ci.setProperty("RequestedState", instance.RequestedState); if (!instance.EnabledDefault_isNULL) ci.setProperty("EnabledDefault", instance.EnabledDefault); if (!instance.AvailableRequestedStates_isNULL) ci.setProperty("AvailableRequestedStates", instance.AvailableRequestedStates); if (!instance.TransitioningToState_isNULL) ci.setProperty("TransitioningToState", instance.TransitioningToState); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.EnabledState_isNULL) ci.setProperty("EnabledState", instance.EnabledState); if (!instance.TimeOfLastStateChange_isNULL) ci.setPropertyDatetime("TimeOfLastStateChange", instance.TimeOfLastStateChange); if (!instance.NameFormat_isNULL) ci.setProperty("NameFormat", instance.NameFormat); if (!instance.ProtocolType_isNULL) ci.setProperty("ProtocolType", instance.ProtocolType); if (!instance.OtherTypeDescription_isNULL) ci.setProperty("OtherTypeDescription", instance.OtherTypeDescription); if (!instance.BroadcastResetSupported_isNULL) ci.setProperty("BroadcastResetSupported", instance.BroadcastResetSupported); if (!instance.LANID_isNULL) ci.setProperty("LANID", instance.LANID); if (!instance.LANType_isNULL) ci.setProperty("LANType", instance.LANType); if (!instance.OtherLANType_isNULL) ci.setProperty("OtherLANType", instance.OtherLANType); if (!instance.MACAddress_isNULL) ci.setProperty("MACAddress", instance.MACAddress); if (!instance.AliasAddresses_isNULL) ci.setProperty("AliasAddresses", instance.AliasAddresses); if (!instance.GroupAddresses_isNULL) ci.setProperty("GroupAddresses", instance.GroupAddresses); if (!instance.MaxDataSize_isNULL) ci.setProperty("MaxDataSize", instance.MaxDataSize); if (!instance.ProtocolIFType_isNULL) ci.setProperty("ProtocolIFType", instance.ProtocolIFType); _L_; return ci.getHdl(); } void EthernetPort_OpenDRIM_LANEndpoint_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_LANEndpoint& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("SystemCreationClassName", instance.SystemCreationClassName) == OK) instance.SystemCreationClassName_isNULL = false; if (op.getKey("Name", instance.Name) == OK) instance.Name_isNULL = false; if (op.getKey("SystemName", instance.SystemName) == OK) instance.SystemName_isNULL = false; if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; _L_; } void EthernetPort_OpenDRIM_LANEndpoint_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_LANEndpoint& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("OtherEnabledState", instance.OtherEnabledState) == OK) instance.OtherEnabledState_isNULL = false; if (inst.getProperty("RequestedState", instance.RequestedState) == OK) instance.RequestedState_isNULL = false; if (inst.getProperty("EnabledDefault", instance.EnabledDefault) == OK) instance.EnabledDefault_isNULL = false; if (inst.getProperty("AvailableRequestedStates", instance.AvailableRequestedStates) == OK) instance.AvailableRequestedStates_isNULL = false; if (inst.getProperty("TransitioningToState", instance.TransitioningToState) == OK) instance.TransitioningToState_isNULL = false; if (inst.getProperty("SystemCreationClassName", instance.SystemCreationClassName) == OK) instance.SystemCreationClassName_isNULL = false; if (inst.getProperty("SystemName", instance.SystemName) == OK) instance.SystemName_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("EnabledState", instance.EnabledState) == OK) instance.EnabledState_isNULL = false; if (inst.getPropertyDatetime("TimeOfLastStateChange", instance.TimeOfLastStateChange) == OK) instance.TimeOfLastStateChange_isNULL = false; if (inst.getProperty("NameFormat", instance.NameFormat) == OK) instance.NameFormat_isNULL = false; if (inst.getProperty("ProtocolType", instance.ProtocolType) == OK) instance.ProtocolType_isNULL = false; if (inst.getProperty("OtherTypeDescription", instance.OtherTypeDescription) == OK) instance.OtherTypeDescription_isNULL = false; if (inst.getProperty("BroadcastResetSupported", instance.BroadcastResetSupported) == OK) instance.BroadcastResetSupported_isNULL = false; if (inst.getProperty("LANID", instance.LANID) == OK) instance.LANID_isNULL = false; if (inst.getProperty("LANType", instance.LANType) == OK) instance.LANType_isNULL = false; if (inst.getProperty("OtherLANType", instance.OtherLANType) == OK) instance.OtherLANType_isNULL = false; if (inst.getProperty("MACAddress", instance.MACAddress) == OK) instance.MACAddress_isNULL = false; if (inst.getProperty("AliasAddresses", instance.AliasAddresses) == OK) instance.AliasAddresses_isNULL = false; if (inst.getProperty("GroupAddresses", instance.GroupAddresses) == OK) instance.GroupAddresses_isNULL = false; if (inst.getProperty("MaxDataSize", instance.MaxDataSize) == OK) instance.MaxDataSize_isNULL = false; if (inst.getProperty("ProtocolIFType", instance.ProtocolIFType) == OK) instance.ProtocolIFType_isNULL = false; _L_; } void EthernetPort_OpenDRIM_LANEndpoint_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_LANEndpoint_RequestStateChange_In& args) { _E_; CMPIStatus rc; CMPIData data; unsigned short RequestedState; data = in->ft->getArg(in, "RequestedState", &rc); if (rc.rc == OK) { CT_ToC(data, RequestedState); args.setRequestedState(RequestedState); } Objectpath Job; data = in->ft->getArg(in, "Job", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Job); args.setJob(Job); } string TimeoutPeriod; data = in->ft->getArg(in, "TimeoutPeriod", &rc); if (rc.rc == OK) { CT_ToCDatetime(data, TimeoutPeriod); args.setTimeoutPeriod(TimeoutPeriod); } _L_; } void EthernetPort_OpenDRIM_LANEndpoint_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_LANEndpoint_RequestStateChange_Out& args) { _E_; CMPIValue value; int errorMessage; Objectpath Job; errorMessage = args.getJob(Job); if (errorMessage == OK) { value = CT_toCMPI(Job); out->ft->addArg(out, "Job", &value, CMPI_ref); } _L_; }