opendrim-lmp-boot-0.1.0~ppa/0000755000175000017500000000000011400666205016505 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_RegisteredBootProfile/0000755000175000017500000000000011400666205024404 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_RegisteredBootProfile/Makefile.am0000644000175000017500000000406611400666205026446 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_RegisteredBootProfileProvider.la libcmpiBoot_OpenDRIM_RegisteredBootProfileProvider_la_SOURCES = OpenDRIM_RegisteredBootProfileAccess.cpp OpenDRIM_RegisteredBootProfileProvider.cpp cmpiOpenDRIM_RegisteredBootProfile.cpp libcmpiBoot_OpenDRIM_RegisteredBootProfileProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la libcmpiBoot_OpenDRIM_RegisteredBootProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_RegisteredBootProfile.h OpenDRIM_RegisteredBootProfile.h OpenDRIM_RegisteredBootProfileAccess.h opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_RegisteredBootProfile/OpenDRIM_RegisteredBootProfileAccess.cpp0000644000175000017500000000744211400666205034140 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_RegisteredBootProfileAccess.h" const string InstanceID="OpenDRIM:BootControl:1.0.1"; int Boot_OpenDRIM_RegisteredBootProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int Boot_OpenDRIM_RegisteredBootProfile_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int Boot_OpenDRIM_RegisteredBootProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; OpenDRIM_RegisteredBootProfile instance; instance.setInstanceID(InstanceID); if(discriminant=="ei") CF_assert(Boot_OpenDRIM_RegisteredBootProfile_populate(instance,errorMessage)); result.push_back(instance); _L_; return OK; } int Boot_OpenDRIM_RegisteredBootProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RegisteredBootProfile& instance, const char** properties, string& errorMessage) { _E_; if (instance.InstanceID!=InstanceID) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(Boot_OpenDRIM_RegisteredBootProfile_populate(instance,errorMessage)); _L_; return OK; } int Boot_OpenDRIM_RegisteredBootProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredBootProfile& newInstance, const OpenDRIM_RegisteredBootProfile& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_RegisteredBootProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredBootProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_RegisteredBootProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredBootProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_RegisteredBootProfile_populate(OpenDRIM_RegisteredBootProfile& instance, string& errorMessage) { _E_; vector AdvertiseTypes; instance.setRegisteredName("Boot Control"); instance.setRegisteredVersion("1.0.1"); instance.setRegisteredOrganization(2); // DMTF AdvertiseTypes.push_back(2); // Not Advertised instance.setAdvertiseTypes(AdvertiseTypes); _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_RegisteredBootProfile/cmpiOpenDRIM_RegisteredBootProfile.cpp0000644000175000017500000001144611400666205033666 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RegisteredBootProfile.h" CMPIObjectPath* Boot_OpenDRIM_RegisteredBootProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RegisteredBootProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_RegisteredBootProfile_classnames[0], OpenDRIM_RegisteredBootProfile_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* Boot_OpenDRIM_RegisteredBootProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RegisteredBootProfile& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_RegisteredBootProfile_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 Boot_OpenDRIM_RegisteredBootProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RegisteredBootProfile& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void Boot_OpenDRIM_RegisteredBootProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RegisteredBootProfile& 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_; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_RegisteredBootProfile/OpenDRIM_RegisteredBootProfile.h0000644000175000017500000001347011400666205032461 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_REGISTEREDBOOTPROFILE_H_ #define OPENDRIM_REGISTEREDBOOTPROFILE_H_ #include const static char* OpenDRIM_RegisteredBootProfile_classnames[] = {"OpenDRIM_RegisteredBootProfile"}; static string OpenDRIM_RegisteredBootProfile_NAMESPACE = _INTEROP_NAMESPACE; class OpenDRIM_RegisteredBootProfile { 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_RegisteredBootProfile() { 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_RegisteredBootProfile() {} 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_REGISTEREDBOOTPROFILE_H_*/ ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_RegisteredBootProfile/OpenDRIM_RegisteredBootProfileProvider.cppopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_RegisteredBootProfile/OpenDRIM_RegisteredBootProfileProvider.cp0000644000175000017500000002566011400666205034353 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RegisteredBootProfile.h" #include "OpenDRIM_RegisteredBootProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_RegisteredBootProfileProviderSetInstance Boot_OpenDRIM_RegisteredBootProfileProviderModifyInstance #endif int Boot_OpenDRIM_RegisteredBootProfile_init(const CMPIBroker* broker); int Boot_OpenDRIM_RegisteredBootProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_RegisteredBootProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_RegisteredBootProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_RegisteredBootProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_RegisteredBootProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredBootProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_RegisteredBootProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_RegisteredBootProfileProviderEnumInstances(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 = Boot_OpenDRIM_RegisteredBootProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredBootProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_RegisteredBootProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_RegisteredBootProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredBootProfile instance; Boot_OpenDRIM_RegisteredBootProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_RegisteredBootProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredBootProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_RegisteredBootProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_RegisteredBootProfileProviderSetInstance(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_RegisteredBootProfile newInstance, oldInstance; Boot_OpenDRIM_RegisteredBootProfile_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_RegisteredBootProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_RegisteredBootProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredBootProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_RegisteredBootProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredBootProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_RegisteredBootProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredBootProfile instance; Boot_OpenDRIM_RegisteredBootProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_RegisteredBootProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_RegisteredBootProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_RegisteredBootProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredBootProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_RegisteredBootProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredBootProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_RegisteredBootProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_RegisteredBootProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredBootProfile instance; Boot_OpenDRIM_RegisteredBootProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_RegisteredBootProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredBootProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_RegisteredBootProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredBootProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_RegisteredBootProfileProviderExecQuery(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 Boot_OpenDRIM_RegisteredBootProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_RegisteredBootProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_RegisteredBootProfile_init FAILED: " + (string) OpenDRIM_RegisteredBootProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_RegisteredBootProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_RegisteredBootProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_RegisteredBootProfile_unload FAILED: " + (string) OpenDRIM_RegisteredBootProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_RegisteredBootProfile_INIT if (Boot_OpenDRIM_RegisteredBootProfile_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_RegisteredBootProfileProvider, Boot_OpenDRIM_RegisteredBootProfileProvider, _broker, Boot_OpenDRIM_RegisteredBootProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_RegisteredBootProfile/cmpiOpenDRIM_RegisteredBootProfile.h0000644000175000017500000000432511400666205033331 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_REGISTEREDBOOTPROFILE_H_ #define CMPIOPENDRIM_REGISTEREDBOOTPROFILE_H_ #include "OpenDRIM_RegisteredBootProfile.h" CMPIObjectPath* Boot_OpenDRIM_RegisteredBootProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RegisteredBootProfile& instance); CMPIInstance* Boot_OpenDRIM_RegisteredBootProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RegisteredBootProfile& instance); void Boot_OpenDRIM_RegisteredBootProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RegisteredBootProfile& instance); void Boot_OpenDRIM_RegisteredBootProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RegisteredBootProfile& instance); #endif /*CMPIOPENDRIM_REGISTEREDBOOTPROFILE_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_RegisteredBootProfile/OpenDRIM_RegisteredBootProfileAccess.h0000644000175000017500000000572511400666205033607 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_REGISTEREDBOOTPROFILEACCESS_H_ #define OPENDRIM_REGISTEREDBOOTPROFILEACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_RegisteredBootProfile.h" int Boot_OpenDRIM_RegisteredBootProfile_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_RegisteredBootProfile_unload(string& errorMessage); int Boot_OpenDRIM_RegisteredBootProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_RegisteredBootProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RegisteredBootProfile& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_RegisteredBootProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredBootProfile& newInstance, const OpenDRIM_RegisteredBootProfile& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_RegisteredBootProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredBootProfile& instance, string& errorMessage); int Boot_OpenDRIM_RegisteredBootProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredBootProfile& instance, string& errorMessage); int Boot_OpenDRIM_RegisteredBootProfile_populate(OpenDRIM_RegisteredBootProfile& instance, string& errorMessage); #endif /*OPENDRIM_REGISTEREDBOOTPROFILEACCESS_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootHostedService/0000755000175000017500000000000011400666205023535 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootHostedService/Makefile.am0000644000175000017500000000454711400666205025603 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_BootHostedServiceProvider.la libcmpiBoot_OpenDRIM_BootHostedServiceProvider_la_SOURCES = OpenDRIM_BootHostedServiceAccess.cpp OpenDRIM_BootHostedServiceProvider.cpp cmpiOpenDRIM_BootHostedService.cpp assocOpenDRIM_BootHostedService.cpp # May have to be adjusted for direct invocation libcmpiBoot_OpenDRIM_BootHostedServiceProvider_la_CPPFLAGS = -I../CIM_System -I../CIM_Service # Uncomment the end for direct invocation, may have to be adjusted libcmpiBoot_OpenDRIM_BootHostedServiceProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la #../CIM_System/libcmpiBoot_CIM_SystemProvider.la ../CIM_Service/libcmpiBoot_CIM_ServiceProvider.la libcmpiBoot_OpenDRIM_BootHostedServiceProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BootHostedService.h OpenDRIM_BootHostedService.h OpenDRIM_BootHostedServiceAccess.h opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootHostedService/assocOpenDRIM_BootHostedService.h0000644000175000017500000000610711400666205031773 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_BOOTHOSTEDSERVICE_H_ #define ASSOCOPENDRIM_BOOTHOSTEDSERVICE_H_ #include "OpenDRIM_BootHostedServiceAccess.h" int Boot_OpenDRIM_BootHostedService_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 Boot_OpenDRIM_BootHostedService_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 Boot_OpenDRIM_BootHostedService_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootHostedService_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootHostedService_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootHostedService_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_BOOTHOSTEDSERVICE_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootHostedService/assocOpenDRIM_BootHostedService.cpp0000644000175000017500000002041011400666205032317 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_BootHostedService.h" int Boot_OpenDRIM_BootHostedService_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 = Boot_OpenDRIM_BootHostedService_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(Boot_OpenDRIM_BootHostedService_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(Boot_OpenDRIM_BootHostedService_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootHostedService_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(Boot_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_System_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootHostedService_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; Boot_CIM_System_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_System_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_System_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Boot_OpenDRIM_BootHostedService_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(Boot_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_Service_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootHostedService_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_Service _instance; Boot_CIM_Service_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_Service_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_Service_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootHostedService/OpenDRIM_BootHostedServiceAccess.h0000644000175000017500000001024411400666205032061 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTHOSTEDSERVICEACCESS_H_ #define OPENDRIM_BOOTHOSTEDSERVICEACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_BootHostedService.h" #include "assocOpenDRIM_BootHostedService.h" int Boot_OpenDRIM_BootHostedService_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_BootHostedService_unload(string& errorMessage); int Boot_OpenDRIM_BootHostedService_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootHostedService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootHostedService& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootHostedService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootHostedService& newInstance, const OpenDRIM_BootHostedService& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootHostedService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootHostedService& instance, string& errorMessage); int Boot_OpenDRIM_BootHostedService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootHostedService& instance, string& errorMessage); int Boot_OpenDRIM_BootHostedService_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootHostedService_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootHostedService_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_BootHostedService_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootHostedService_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_BootHostedService_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootHostedService_populate(OpenDRIM_BootHostedService& instance, string& errorMessage); #endif /*OPENDRIM_BOOTHOSTEDSERVICEACCESS_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootHostedService/cmpiOpenDRIM_BootHostedService.h0000644000175000017500000000424511400666205031614 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_BOOTHOSTEDSERVICE_H_ #define CMPIOPENDRIM_BOOTHOSTEDSERVICE_H_ #include "OpenDRIM_BootHostedService.h" CMPIObjectPath* Boot_OpenDRIM_BootHostedService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootHostedService& instance); CMPIInstance* Boot_OpenDRIM_BootHostedService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootHostedService& instance); void Boot_OpenDRIM_BootHostedService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootHostedService& instance); void Boot_OpenDRIM_BootHostedService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootHostedService& instance); #endif /*CMPIOPENDRIM_BOOTHOSTEDSERVICE_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootHostedService/OpenDRIM_BootHostedServiceProvider.cpp0000644000175000017500000004117411400666205033013 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootHostedService.h" #include "OpenDRIM_BootHostedServiceAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_BootHostedServiceProviderSetInstance Boot_OpenDRIM_BootHostedServiceProviderModifyInstance #endif int Boot_OpenDRIM_BootHostedService_init(const CMPIBroker* broker); int Boot_OpenDRIM_BootHostedService_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_BootHostedServiceProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootHostedService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootHostedServiceProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_BootHostedService_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootHostedService_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootHostedServiceProviderEnumInstances(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 = Boot_OpenDRIM_BootHostedService_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_BootHostedService_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootHostedServiceProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootHostedService instance; Boot_OpenDRIM_BootHostedService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootHostedService_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_BootHostedService_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootHostedServiceProviderSetInstance(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_BootHostedService newInstance, oldInstance; Boot_OpenDRIM_BootHostedService_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_BootHostedService_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_BootHostedService_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootHostedService_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootHostedServiceProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootHostedService instance; Boot_OpenDRIM_BootHostedService_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootHostedService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootHostedService_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootHostedService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_BootHostedService_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootHostedServiceProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootHostedService instance; Boot_OpenDRIM_BootHostedService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootHostedService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootHostedService_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootHostedServiceProviderExecQuery(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 Boot_OpenDRIM_BootHostedServiceProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootHostedService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootHostedServiceProviderAssociatorNames(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 = Boot_OpenDRIM_BootHostedService_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_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 Boot_OpenDRIM_BootHostedServiceProviderAssociators(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 = Boot_OpenDRIM_BootHostedService_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_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 Boot_OpenDRIM_BootHostedServiceProviderReferenceNames(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 = Boot_OpenDRIM_BootHostedService_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootHostedService_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Boot_OpenDRIM_BootHostedService_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootHostedService_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootHostedServiceProviderReferences(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 = Boot_OpenDRIM_BootHostedService_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootHostedService_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Boot_OpenDRIM_BootHostedService_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Boot_OpenDRIM_BootHostedService_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Boot_OpenDRIM_BootHostedService_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootHostedService_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootHostedService_init FAILED: " + (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_BootHostedService_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootHostedService_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootHostedService_unload FAILED: " + (string) OpenDRIM_BootHostedService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_BootHostedService_INIT if (Boot_OpenDRIM_BootHostedService_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_BootHostedServiceProvider, Boot_OpenDRIM_BootHostedServiceProvider, _broker, Boot_OpenDRIM_BootHostedService_INIT); CMAssociationMIStub(Boot_OpenDRIM_BootHostedServiceProvider, Boot_OpenDRIM_BootHostedServiceProvider, _broker, Boot_OpenDRIM_BootHostedService_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootHostedService/cmpiOpenDRIM_BootHostedService.cpp0000644000175000017500000000576411400666205032156 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootHostedService.h" CMPIObjectPath* Boot_OpenDRIM_BootHostedService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootHostedService& instance) { _E_; Objectpath op(broker, OpenDRIM_BootHostedService_classnames[0], OpenDRIM_BootHostedService_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* Boot_OpenDRIM_BootHostedService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootHostedService& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_BootHostedService_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void Boot_OpenDRIM_BootHostedService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootHostedService& 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 Boot_OpenDRIM_BootHostedService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootHostedService& 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_; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootHostedService/OpenDRIM_BootHostedServiceAccess.cpp0000644000175000017500000002363611400666205032425 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_BootHostedServiceAccess.h" int Boot_OpenDRIM_BootHostedService_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_System_load(broker, errorMessage)); CF_assert(Boot_CIM_Service_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootHostedService_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_System_unload(errorMessage)); CF_assert(Boot_CIM_Service_unload(errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootHostedService_isAssociated(const Instance& Antecedent, const Instance& Dependent, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int Boot_OpenDRIM_BootHostedService_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(Boot_OpenDRIM_BootHostedService_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(Boot_OpenDRIM_BootHostedService_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; Boot_OpenDRIM_BootHostedService_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(Boot_OpenDRIM_BootHostedService_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootHostedService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootHostedService& 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(Boot_OpenDRIM_BootHostedService_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(Boot_OpenDRIM_BootHostedService_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Boot_OpenDRIM_BootHostedService_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Boot_OpenDRIM_BootHostedService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootHostedService& newInstance, const OpenDRIM_BootHostedService& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootHostedService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootHostedService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootHostedService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootHostedService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootHostedService_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(Boot_OpenDRIM_BootHostedService_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootHostedService_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(Boot_OpenDRIM_BootHostedService_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(Boot_OpenDRIM_BootHostedService_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootHostedService_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(Boot_OpenDRIM_BootHostedService_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_BootHostedService_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_BootHostedService instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); OpenDRIM_BootHostedService_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootHostedService_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_BootHostedService_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_BootHostedService instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); OpenDRIM_BootHostedService_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootHostedService_populate(OpenDRIM_BootHostedService& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootHostedService/OpenDRIM_BootHostedService.h0000644000175000017500000000651411400666205030744 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTHOSTEDSERVICE_H_ #define OPENDRIM_BOOTHOSTEDSERVICE_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_System.h" #include "CIM_SystemAccess.h" #include "cmpiCIM_Service.h" #include "CIM_ServiceAccess.h" */ const static char* OpenDRIM_BootHostedService_classnames[] = {"OpenDRIM_BootHostedService"}; static string OpenDRIM_BootHostedService_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_BootService"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_BootHostedService { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; OpenDRIM_BootHostedService() { Antecedent_isNULL = true; Dependent_isNULL = true; } ~OpenDRIM_BootHostedService() {} 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_BOOTHOSTEDSERVICE_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_ServiceAffectsBoot/0000755000175000017500000000000011400666205023662 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_ServiceAffectsBoot/Makefile.am0000644000175000017500000000461311400666205025722 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_ServiceAffectsBootProvider.la libcmpiBoot_OpenDRIM_ServiceAffectsBootProvider_la_SOURCES = OpenDRIM_ServiceAffectsBootAccess.cpp OpenDRIM_ServiceAffectsBootProvider.cpp cmpiOpenDRIM_ServiceAffectsBoot.cpp assocOpenDRIM_ServiceAffectsBoot.cpp # May have to be adjusted for direct invocation libcmpiBoot_OpenDRIM_ServiceAffectsBootProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_Service # Uncomment the end for direct invocation, may have to be adjusted libcmpiBoot_OpenDRIM_ServiceAffectsBootProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la #../CIM_ManagedElement/libcmpiBoot_CIM_ManagedElementProvider.la ../CIM_Service/libcmpiBoot_CIM_ServiceProvider.la libcmpiBoot_OpenDRIM_ServiceAffectsBootProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_ServiceAffectsBoot.h OpenDRIM_ServiceAffectsBoot.h OpenDRIM_ServiceAffectsBootAccess.h opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_ServiceAffectsBoot/OpenDRIM_ServiceAffectsBootAccess.h0000644000175000017500000001044011400666205032331 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SERVICEAFFECTSBOOTACCESS_H_ #define OPENDRIM_SERVICEAFFECTSBOOTACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_ServiceAffectsBoot.h" #include "assocOpenDRIM_ServiceAffectsBoot.h" int Boot_OpenDRIM_ServiceAffectsBoot_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_ServiceAffectsBoot_unload(string& errorMessage); int Boot_OpenDRIM_ServiceAffectsBoot_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_ServiceAffectsBoot_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ServiceAffectsBoot& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_ServiceAffectsBoot_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsBoot& newInstance, const OpenDRIM_ServiceAffectsBoot& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_ServiceAffectsBoot_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsBoot& instance, string& errorMessage); int Boot_OpenDRIM_ServiceAffectsBoot_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsBoot& instance, string& errorMessage); int Boot_OpenDRIM_ServiceAffectsBoot_associatorAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const char** properties, vector& AffectingElement_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_ServiceAffectsBoot_associatorAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const char** properties, vector& AffectedElement_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_ServiceAffectsBoot_referenceAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const vector& AffectingElement_instances, vector& OpenDRIM_ServiceAffectsBoot_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_ServiceAffectsBoot_referenceAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const vector& AffectedElement_instances, vector& OpenDRIM_ServiceAffectsBoot_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_ServiceAffectsBoot_populate(OpenDRIM_ServiceAffectsBoot& instance, string& errorMessage); #endif /*OPENDRIM_SERVICEAFFECTSBOOTACCESS_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_ServiceAffectsBoot/assocOpenDRIM_ServiceAffectsBoot.cpp0000644000175000017500000002103011400666205032570 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_ServiceAffectsBoot.h" int Boot_OpenDRIM_ServiceAffectsBoot_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 = Boot_OpenDRIM_ServiceAffectsBoot_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, "AffectedElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "AffectingElement") != 0) return OK; CF_assert(Boot_OpenDRIM_ServiceAffectsBoot_associatorAffectedElementToAffectingElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "AffectingElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "AffectedElement") != 0) return OK; CF_assert(Boot_OpenDRIM_ServiceAffectsBoot_associatorAffectingElementToAffectedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Boot_OpenDRIM_ServiceAffectsBoot_enumerateAffectedElements(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, AffectedElement_NAMESPACE, AffectedElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_ServiceAffectsBoot_getAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), AffectedElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), AffectedElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; Boot_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Boot_OpenDRIM_ServiceAffectsBoot_enumerateAffectingElements(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, AffectingElement_NAMESPACE, AffectingElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(Boot_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_Service_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_ServiceAffectsBoot_getAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), AffectingElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), AffectingElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_Service _instance; Boot_CIM_Service_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_Service_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_Service_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_ServiceAffectsBoot/assocOpenDRIM_ServiceAffectsBoot.h0000644000175000017500000000615111400666205032244 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_SERVICEAFFECTSBOOT_H_ #define ASSOCOPENDRIM_SERVICEAFFECTSBOOT_H_ #include "OpenDRIM_ServiceAffectsBootAccess.h" int Boot_OpenDRIM_ServiceAffectsBoot_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 Boot_OpenDRIM_ServiceAffectsBoot_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 Boot_OpenDRIM_ServiceAffectsBoot_enumerateAffectedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_ServiceAffectsBoot_getAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_ServiceAffectsBoot_enumerateAffectingElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_ServiceAffectsBoot_getAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_SERVICEAFFECTSBOOT_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_ServiceAffectsBoot/OpenDRIM_ServiceAffectsBootAccess.cpp0000644000175000017500000002552011400666205032671 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_ServiceAffectsBootAccess.h" int Boot_OpenDRIM_ServiceAffectsBoot_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(Boot_CIM_Service_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_ServiceAffectsBoot_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_ManagedElement_unload(errorMessage)); CF_assert(Boot_CIM_Service_unload(errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_ServiceAffectsBoot_isAssociated(const Instance& AffectedElement, const Instance& AffectingElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int Boot_OpenDRIM_ServiceAffectsBoot_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(Boot_OpenDRIM_ServiceAffectsBoot_enumerateAffectedElements(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(Boot_OpenDRIM_ServiceAffectsBoot_enumerateAffectedElements(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; Boot_OpenDRIM_ServiceAffectsBoot_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), AffectedElement_classnames[0], AffectingElement_classnames[0], AffectedElement_role.c_str(), AffectingElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(Boot_OpenDRIM_ServiceAffectsBoot_referenceAffectedElementToAffectingElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Boot_OpenDRIM_ServiceAffectsBoot_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ServiceAffectsBoot& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath AffectedElement_objectpath; instance.getAffectedElement(AffectedElement_objectpath); Instance AffectedElement_instance; CF_assert(Boot_OpenDRIM_ServiceAffectsBoot_getAffectedElement(broker, ctx, AffectedElement_objectpath, AffectedElement_instance, NULL, errorMessage)); Objectpath AffectingElement_objectpath; instance.getAffectingElement(AffectingElement_objectpath); Instance AffectingElement_instance; CF_assert(Boot_OpenDRIM_ServiceAffectsBoot_getAffectingElement(broker, ctx, AffectingElement_objectpath, AffectingElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Boot_OpenDRIM_ServiceAffectsBoot_isAssociated(AffectedElement_instance, AffectingElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(Boot_OpenDRIM_ServiceAffectsBoot_populate(instance, errorMessage)); _L_; return OK; } int Boot_OpenDRIM_ServiceAffectsBoot_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsBoot& newInstance, const OpenDRIM_ServiceAffectsBoot& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_ServiceAffectsBoot_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsBoot& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_ServiceAffectsBoot_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsBoot& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_ServiceAffectsBoot_associatorAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const char** properties, vector& AffectingElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector AffectingElement_instances; if (discriminant=="a") CF_assert(Boot_OpenDRIM_ServiceAffectsBoot_enumerateAffectingElements(broker, ctx, AffectingElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_ServiceAffectsBoot_enumerateAffectingElements(broker, ctx, AffectingElement_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(Boot_OpenDRIM_ServiceAffectsBoot_enumerateAffectingElements(broker, ctx, AffectingElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& AffectedElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector AffectedElement_instances; if (discriminant=="a") CF_assert(Boot_OpenDRIM_ServiceAffectsBoot_enumerateAffectedElements(broker, ctx, AffectedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_ServiceAffectsBoot_enumerateAffectedElements(broker, ctx, AffectedElement_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(Boot_OpenDRIM_ServiceAffectsBoot_enumerateAffectedElements(broker, ctx, AffectedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& AffectingElement_instances, vector& OpenDRIM_ServiceAffectsBoot_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 < AffectingElement_instances.size(); i++) { OpenDRIM_ServiceAffectsBoot instance; instance.setAffectedElement(((Instance) AffectedElement_instance).getObjectpath()); instance.setAffectingElement(((Instance) AffectingElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(Boot_OpenDRIM_ServiceAffectsBoot_populate(instance, errorMessage)); } OpenDRIM_ServiceAffectsBoot_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_ServiceAffectsBoot_referenceAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const vector& AffectedElement_instances, vector& OpenDRIM_ServiceAffectsBoot_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 < AffectedElement_instances.size(); i++) { OpenDRIM_ServiceAffectsBoot instance; instance.setAffectedElement(((Instance) AffectedElement_instances[i]).getObjectpath()); instance.setAffectingElement(((Instance) AffectingElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(Boot_OpenDRIM_ServiceAffectsBoot_populate(instance, errorMessage)); } OpenDRIM_ServiceAffectsBoot_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_ServiceAffectsBoot_populate(OpenDRIM_ServiceAffectsBoot& instance, string& errorMessage) { _E_; vector elementEffects; elementEffects.push_back(5); // Manages instance.setElementEffects(elementEffects); _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_ServiceAffectsBoot/OpenDRIM_ServiceAffectsBootProvider.cpp0000644000175000017500000004140611400666205033263 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_ServiceAffectsBoot.h" #include "OpenDRIM_ServiceAffectsBootAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_ServiceAffectsBootProviderSetInstance Boot_OpenDRIM_ServiceAffectsBootProviderModifyInstance #endif int Boot_OpenDRIM_ServiceAffectsBoot_init(const CMPIBroker* broker); int Boot_OpenDRIM_ServiceAffectsBoot_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_ServiceAffectsBootProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_ServiceAffectsBoot_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_ServiceAffectsBootProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_ServiceAffectsBoot_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_ServiceAffectsBoot_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_ServiceAffectsBootProviderEnumInstances(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 = Boot_OpenDRIM_ServiceAffectsBoot_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_ServiceAffectsBoot_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_ServiceAffectsBootProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsBoot instance; Boot_OpenDRIM_ServiceAffectsBoot_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_ServiceAffectsBoot_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_ServiceAffectsBoot_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_ServiceAffectsBootProviderSetInstance(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_ServiceAffectsBoot newInstance, oldInstance; Boot_OpenDRIM_ServiceAffectsBoot_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_ServiceAffectsBoot_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_ServiceAffectsBoot_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_ServiceAffectsBoot_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_ServiceAffectsBootProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsBoot instance; Boot_OpenDRIM_ServiceAffectsBoot_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_ServiceAffectsBoot_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_ServiceAffectsBoot_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_ServiceAffectsBoot_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_ServiceAffectsBoot_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_ServiceAffectsBootProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsBoot instance; Boot_OpenDRIM_ServiceAffectsBoot_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_ServiceAffectsBoot_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_ServiceAffectsBoot_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_ServiceAffectsBootProviderExecQuery(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 Boot_OpenDRIM_ServiceAffectsBootProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_ServiceAffectsBoot_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_ServiceAffectsBootProviderAssociatorNames(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 = Boot_OpenDRIM_ServiceAffectsBoot_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_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 Boot_OpenDRIM_ServiceAffectsBootProviderAssociators(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 = Boot_OpenDRIM_ServiceAffectsBoot_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_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 Boot_OpenDRIM_ServiceAffectsBootProviderReferenceNames(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 = Boot_OpenDRIM_ServiceAffectsBoot_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_ServiceAffectsBoot_referenceAffectedElementToAffectingElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Boot_OpenDRIM_ServiceAffectsBoot_referenceAffectingElementToAffectedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_ServiceAffectsBoot_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Boot_OpenDRIM_ServiceAffectsBootProviderReferences(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 = Boot_OpenDRIM_ServiceAffectsBoot_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_ServiceAffectsBoot_referenceAffectedElementToAffectingElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Boot_OpenDRIM_ServiceAffectsBoot_referenceAffectingElementToAffectedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Boot_OpenDRIM_ServiceAffectsBoot_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Boot_OpenDRIM_ServiceAffectsBoot_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_ServiceAffectsBoot_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_ServiceAffectsBoot_init FAILED: " + (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_ServiceAffectsBoot_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_ServiceAffectsBoot_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_ServiceAffectsBoot_unload FAILED: " + (string) OpenDRIM_ServiceAffectsBoot_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_ServiceAffectsBoot_INIT if (Boot_OpenDRIM_ServiceAffectsBoot_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_ServiceAffectsBootProvider, Boot_OpenDRIM_ServiceAffectsBootProvider, _broker, Boot_OpenDRIM_ServiceAffectsBoot_INIT); CMAssociationMIStub(Boot_OpenDRIM_ServiceAffectsBootProvider, Boot_OpenDRIM_ServiceAffectsBootProvider, _broker, Boot_OpenDRIM_ServiceAffectsBoot_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_ServiceAffectsBoot/cmpiOpenDRIM_ServiceAffectsBoot.cpp0000644000175000017500000000720011400666205032413 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_ServiceAffectsBoot.h" CMPIObjectPath* Boot_OpenDRIM_ServiceAffectsBoot_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsBoot& instance) { _E_; Objectpath op(broker, OpenDRIM_ServiceAffectsBoot_classnames[0], OpenDRIM_ServiceAffectsBoot_NAMESPACE); if (!instance.AffectedElement_isNULL) op.addKey("AffectedElement", instance.AffectedElement); if (!instance.AffectingElement_isNULL) op.addKey("AffectingElement", instance.AffectingElement); _L_; return op.getHdl(); } CMPIInstance* Boot_OpenDRIM_ServiceAffectsBoot_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsBoot& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_ServiceAffectsBoot_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.ElementEffects_isNULL) ci.setProperty("ElementEffects", instance.ElementEffects); if (!instance.OtherElementEffectsDescriptions_isNULL) ci.setProperty("OtherElementEffectsDescriptions", instance.OtherElementEffectsDescriptions); _L_; return ci.getHdl(); } void Boot_OpenDRIM_ServiceAffectsBoot_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ServiceAffectsBoot& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("AffectedElement", instance.AffectedElement) == OK) instance.AffectedElement_isNULL = false; if (op.getKey("AffectingElement", instance.AffectingElement) == OK) instance.AffectingElement_isNULL = false; _L_; } void Boot_OpenDRIM_ServiceAffectsBoot_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ServiceAffectsBoot& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("AffectedElement", instance.AffectedElement) == OK) instance.AffectedElement_isNULL = false; if (inst.getProperty("AffectingElement", instance.AffectingElement) == OK) instance.AffectingElement_isNULL = false; if (inst.getProperty("ElementEffects", instance.ElementEffects) == OK) instance.ElementEffects_isNULL = false; if (inst.getProperty("OtherElementEffectsDescriptions", instance.OtherElementEffectsDescriptions) == OK) instance.OtherElementEffectsDescriptions_isNULL = false; _L_; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_ServiceAffectsBoot/OpenDRIM_ServiceAffectsBoot.h0000644000175000017500000001074511400666205031217 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SERVICEAFFECTSBOOT_H_ #define OPENDRIM_SERVICEAFFECTSBOOT_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" #include "cmpiCIM_Service.h" #include "CIM_ServiceAccess.h" */ const static char* OpenDRIM_ServiceAffectsBoot_classnames[] = {"OpenDRIM_ServiceAffectsBoot"}; static string OpenDRIM_ServiceAffectsBoot_NAMESPACE = _NAMESPACE; const static string AffectedElement_role = "AffectedElement"; const static char* AffectedElement_classnames[] = {"Open_DRIM_ComputerSystem"}; const static string AffectedElement_NAMESPACE = _NAMESPACE; const static string AffectingElement_role = "AffectingElement"; const static char* AffectingElement_classnames[] = {"OpenDRIM_BootService"}; const static string AffectingElement_NAMESPACE = _NAMESPACE; class OpenDRIM_ServiceAffectsBoot { public: Objectpath AffectedElement; bool AffectedElement_isNULL; Objectpath AffectingElement; bool AffectingElement_isNULL; vector ElementEffects; bool ElementEffects_isNULL; vector OtherElementEffectsDescriptions; bool OtherElementEffectsDescriptions_isNULL; OpenDRIM_ServiceAffectsBoot() { AffectedElement_isNULL = true; AffectingElement_isNULL = true; ElementEffects_isNULL = true; OtherElementEffectsDescriptions_isNULL = true; } ~OpenDRIM_ServiceAffectsBoot() {} string getKeys() const { return CF_toLowCase(".AffectedElement=\"" + CF_quoteString(AffectedElement.toString()) + "\""".AffectingElement=\"" + CF_quoteString(AffectingElement.toString()) + "\""); } int getAffectedElement(Objectpath& value) const { if (AffectedElement_isNULL==true) return NOT_FOUND; value = AffectedElement; return OK; } int setAffectedElement(const Objectpath& newValue) { AffectedElement = newValue; AffectedElement.setNamespace(AffectedElement_NAMESPACE); AffectedElement_isNULL = false; return OK; } int getAffectingElement(Objectpath& value) const { if (AffectingElement_isNULL==true) return NOT_FOUND; value = AffectingElement; return OK; } int setAffectingElement(const Objectpath& newValue) { AffectingElement = newValue; AffectingElement.setNamespace(AffectingElement_NAMESPACE); AffectingElement_isNULL = false; return OK; } int getElementEffects(vector& value) const { if (ElementEffects_isNULL==true) return NOT_FOUND; value = ElementEffects; return OK; } int setElementEffects(const vector& newValue) { ElementEffects = newValue; ElementEffects_isNULL = false; return OK; } int getOtherElementEffectsDescriptions(vector& value) const { if (OtherElementEffectsDescriptions_isNULL==true) return NOT_FOUND; value = OtherElementEffectsDescriptions; return OK; } int setOtherElementEffectsDescriptions(const vector& newValue) { OtherElementEffectsDescriptions = newValue; OtherElementEffectsDescriptions_isNULL = false; return OK; } }; #endif /*OPENDRIM_SERVICEAFFECTSBOOT_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_ServiceAffectsBoot/cmpiOpenDRIM_ServiceAffectsBoot.h0000644000175000017500000000426111400666205032064 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_SERVICEAFFECTSBOOT_H_ #define CMPIOPENDRIM_SERVICEAFFECTSBOOT_H_ #include "OpenDRIM_ServiceAffectsBoot.h" CMPIObjectPath* Boot_OpenDRIM_ServiceAffectsBoot_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsBoot& instance); CMPIInstance* Boot_OpenDRIM_ServiceAffectsBoot_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsBoot& instance); void Boot_OpenDRIM_ServiceAffectsBoot_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ServiceAffectsBoot& instance); void Boot_OpenDRIM_ServiceAffectsBoot_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ServiceAffectsBoot& instance); #endif /*CMPIOPENDRIM_SERVICEAFFECTSBOOT_H_*/ opendrim-lmp-boot-0.1.0~ppa/Makefile.am0000644000175000017500000001153111400666205020542 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ VENDOR = OpenDRIM VERSION = $(shell cat ./VERSION) APP_NAME = opendrim-lmp-boot RPM_PACKAGE_DIR = packaging PLATFORM = $(shell rpm --eval %_target_cpu) WORKING_DIR = $(shell pwd) SUBDIRS = Common OpenDRIM_BootConformsToProfile OpenDRIM_RegisteredBootProfile OpenDRIM_BootConfigSetting OpenDRIM_BootSourceSetting OpenDRIM_BootServiceCapabilities OpenDRIM_BootService OpenDRIM_BootSettingData OpenDRIM_BootCapabilities OpenDRIM_BootOrderedComponent OpenDRIM_BootConcreteDependency OpenDRIM_BootHostedService OpenDRIM_BootConfigSettingData OpenDRIM_BootLogicalIdentity OpenDRIM_ServiceAffectsBoot OpenDRIM_BootConcreteComponent test postinstall: registration/Boot.sh @CIMNAMESPACE@ $(VENDOR) @CIMSERVER@ @INTEROPNAMESPACE@ $(VERSION) . preuninstall: registration/Boot-remove.sh @CIMNAMESPACE@ @CIMSERVER@ @INTEROPNAMESPACE@ . test-OpenDRIM_BootConformsToProfile: all make -C test test-OpenDRIM_BootConformsToProfile test-OpenDRIM_BootCapabilities: all make -C test test-OpenDRIM_BootCapabilities test-OpenDRIM_BootOrderedComponent: all make -C test test-OpenDRIM_BootOrderedComponent test-OpenDRIM_BootConcreteDependency: all make -C test test-OpenDRIM_BootConcreteDependency test-OpenDRIM_RegisteredBootProfile: all make -C test test-OpenDRIM_RegisteredBootProfile test-OpenDRIM_BootConfigSetting: all make -C test test-OpenDRIM_BootConfigSetting test-OpenDRIM_BootHostedService: all make -C test test-OpenDRIM_BootHostedService test-OpenDRIM_BootSourceSetting: all make -C test test-OpenDRIM_BootSourceSetting test-OpenDRIM_BootConfigSettingData: all make -C test test-OpenDRIM_BootConfigSettingData test-OpenDRIM_BootServiceCapabilities: all make -C test test-OpenDRIM_BootServiceCapabilities test-OpenDRIM_BootService: all make -C test test-OpenDRIM_BootService test-OpenDRIM_BootLogicalIdentity: all make -C test test-OpenDRIM_BootLogicalIdentity test-OpenDRIM_BootSettingData: all make -C test test-OpenDRIM_BootSettingData test-OpenDRIM_ServiceAffectsBoot: all make -C test test-OpenDRIM_ServiceAffectsBoot test-OpenDRIM_BootConcreteComponent: all make -C test test-OpenDRIM_BootConcreteComponent 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-boot-0.1.0~ppa/OpenDRIM_BootSourceSetting/0000755000175000017500000000000011400666205023564 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSourceSetting/cmpiOpenDRIM_BootSourceSetting.cpp0000644000175000017500000001024611400666205032223 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootSourceSetting.h" CMPIObjectPath* Boot_OpenDRIM_BootSourceSetting_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootSourceSetting& instance) { _E_; Objectpath op(broker, OpenDRIM_BootSourceSetting_classnames[0], OpenDRIM_BootSourceSetting_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* Boot_OpenDRIM_BootSourceSetting_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootSourceSetting& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_BootSourceSetting_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.BootString_isNULL) ci.setProperty("BootString", instance.BootString); if (!instance.BIOSBootString_isNULL) ci.setProperty("BIOSBootString", instance.BIOSBootString); if (!instance.StructuredBootString_isNULL) ci.setProperty("StructuredBootString", instance.StructuredBootString); if (!instance.FailThroughSupported_isNULL) ci.setProperty("FailThroughSupported", instance.FailThroughSupported); _L_; return ci.getHdl(); } void Boot_OpenDRIM_BootSourceSetting_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootSourceSetting& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void Boot_OpenDRIM_BootSourceSetting_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootSourceSetting& 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("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("BootString", instance.BootString) == OK) instance.BootString_isNULL = false; if (inst.getProperty("BIOSBootString", instance.BIOSBootString) == OK) instance.BIOSBootString_isNULL = false; if (inst.getProperty("StructuredBootString", instance.StructuredBootString) == OK) instance.StructuredBootString_isNULL = false; if (inst.getProperty("FailThroughSupported", instance.FailThroughSupported) == OK) instance.FailThroughSupported_isNULL = false; _L_; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSourceSetting/Makefile.am0000644000175000017500000000401611400666205025621 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_BootSourceSettingProvider.la libcmpiBoot_OpenDRIM_BootSourceSettingProvider_la_SOURCES = OpenDRIM_BootSourceSettingAccess.cpp OpenDRIM_BootSourceSettingProvider.cpp cmpiOpenDRIM_BootSourceSetting.cpp libcmpiBoot_OpenDRIM_BootSourceSettingProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la libcmpiBoot_OpenDRIM_BootSourceSettingProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BootSourceSetting.h OpenDRIM_BootSourceSetting.h OpenDRIM_BootSourceSettingAccess.h opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSourceSetting/OpenDRIM_BootSourceSettingProvider.cpp0000644000175000017500000002526411400666205033073 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootSourceSetting.h" #include "OpenDRIM_BootSourceSettingAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_BootSourceSettingProviderSetInstance Boot_OpenDRIM_BootSourceSettingProviderModifyInstance #endif int Boot_OpenDRIM_BootSourceSetting_init(const CMPIBroker* broker); int Boot_OpenDRIM_BootSourceSetting_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_BootSourceSettingProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootSourceSetting_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootSourceSettingProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_BootSourceSetting_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSourceSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootSourceSetting_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootSourceSettingProviderEnumInstances(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 = Boot_OpenDRIM_BootSourceSetting_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSourceSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_BootSourceSetting_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootSourceSettingProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootSourceSetting instance; Boot_OpenDRIM_BootSourceSetting_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootSourceSetting_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSourceSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_BootSourceSetting_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootSourceSettingProviderSetInstance(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_BootSourceSetting newInstance, oldInstance; Boot_OpenDRIM_BootSourceSetting_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_BootSourceSetting_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_BootSourceSetting_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSourceSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootSourceSetting_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSourceSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootSourceSettingProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootSourceSetting instance; Boot_OpenDRIM_BootSourceSetting_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootSourceSetting_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BootSourceSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootSourceSetting_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSourceSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootSourceSetting_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSourceSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_BootSourceSetting_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootSourceSettingProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootSourceSetting instance; Boot_OpenDRIM_BootSourceSetting_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootSourceSetting_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSourceSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootSourceSetting_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSourceSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootSourceSettingProviderExecQuery(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 Boot_OpenDRIM_BootSourceSetting_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootSourceSetting_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootSourceSetting_init FAILED: " + (string) OpenDRIM_BootSourceSetting_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_BootSourceSetting_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootSourceSetting_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootSourceSetting_unload FAILED: " + (string) OpenDRIM_BootSourceSetting_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_BootSourceSetting_INIT if (Boot_OpenDRIM_BootSourceSetting_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_BootSourceSettingProvider, Boot_OpenDRIM_BootSourceSettingProvider, _broker, Boot_OpenDRIM_BootSourceSetting_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSourceSetting/OpenDRIM_BootSourceSettingAccess.h0000644000175000017500000000561111400666205032141 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTSOURCESETTINGACCESS_H_ #define OPENDRIM_BOOTSOURCESETTINGACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_BootSourceSetting.h" int Boot_OpenDRIM_BootSourceSetting_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_BootSourceSetting_unload(string& errorMessage); int Boot_OpenDRIM_BootSourceSetting_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootSourceSetting_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootSourceSetting& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootSourceSetting_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootSourceSetting& newInstance, const OpenDRIM_BootSourceSetting& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootSourceSetting_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootSourceSetting& instance, string& errorMessage); int Boot_OpenDRIM_BootSourceSetting_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootSourceSetting& instance, string& errorMessage); int Boot_OpenDRIM_BootSourceSetting_populate(OpenDRIM_BootSourceSetting& instance, string& errorMessage); #endif /*OPENDRIM_BOOTSOURCESETTINGACCESS_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSourceSetting/OpenDRIM_BootSourceSetting.h0000644000175000017500000001137711400666205031025 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTSOURCESETTING_H_ #define OPENDRIM_BOOTSOURCESETTING_H_ #include const static char* OpenDRIM_BootSourceSetting_classnames[] = {"OpenDRIM_BootSourceSetting"}; static string OpenDRIM_BootSourceSetting_NAMESPACE = _NAMESPACE; class OpenDRIM_BootSourceSetting { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string InstanceID; bool InstanceID_isNULL; string ElementName; bool ElementName_isNULL; string BootString; bool BootString_isNULL; string BIOSBootString; bool BIOSBootString_isNULL; string StructuredBootString; bool StructuredBootString_isNULL; unsigned short FailThroughSupported; bool FailThroughSupported_isNULL; OpenDRIM_BootSourceSetting() { Caption_isNULL = true; Description_isNULL = true; InstanceID_isNULL = true; ElementName_isNULL = true; BootString_isNULL = true; BIOSBootString_isNULL = true; StructuredBootString_isNULL = true; FailThroughSupported_isNULL = true; } ~OpenDRIM_BootSourceSetting() {} 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 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 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 getBootString(string& value) const { if (BootString_isNULL==true) return NOT_FOUND; value = BootString; return OK; } int setBootString(const string& newValue) { BootString = newValue; BootString_isNULL = false; return OK; } int getBIOSBootString(string& value) const { if (BIOSBootString_isNULL==true) return NOT_FOUND; value = BIOSBootString; return OK; } int setBIOSBootString(const string& newValue) { BIOSBootString = newValue; BIOSBootString_isNULL = false; return OK; } int getStructuredBootString(string& value) const { if (StructuredBootString_isNULL==true) return NOT_FOUND; value = StructuredBootString; return OK; } int setStructuredBootString(const string& newValue) { StructuredBootString = newValue; StructuredBootString_isNULL = false; return OK; } int getFailThroughSupported(unsigned short& value) const { if (FailThroughSupported_isNULL==true) return NOT_FOUND; value = FailThroughSupported; return OK; } int setFailThroughSupported(const unsigned short& newValue) { FailThroughSupported = newValue; FailThroughSupported_isNULL = false; return OK; } }; #endif /*OPENDRIM_BOOTSOURCESETTING_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSourceSetting/cmpiOpenDRIM_BootSourceSetting.h0000644000175000017500000000424511400666205031672 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_BOOTSOURCESETTING_H_ #define CMPIOPENDRIM_BOOTSOURCESETTING_H_ #include "OpenDRIM_BootSourceSetting.h" CMPIObjectPath* Boot_OpenDRIM_BootSourceSetting_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootSourceSetting& instance); CMPIInstance* Boot_OpenDRIM_BootSourceSetting_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootSourceSetting& instance); void Boot_OpenDRIM_BootSourceSetting_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootSourceSetting& instance); void Boot_OpenDRIM_BootSourceSetting_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootSourceSetting& instance); #endif /*CMPIOPENDRIM_BOOTSOURCESETTING_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSourceSetting/OpenDRIM_BootSourceSettingAccess.cpp0000644000175000017500000001051611400666205032474 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_BootSourceSettingAccess.h" vector InstanceID; int Boot_OpenDRIM_BootSourceSetting_load(const CMPIBroker* broker, string& errorMessage) { _E_; vector output; CF_assert(CF_runCommandToLines("ls -1 /dev", output, 0, errorMessage)); // FIXME: to improve for(unsigned int i=0;i2 && line.find("fd")==0) id << "Floppy Drive " << atoi(line.substr(2).c_str()); else if(line.length()>3 && line.find("scd")==0) id << "CD_ROM Drive " << atoi(line.substr(3).c_str()); else if(line.length()==3 && (line.find("hd")==0 || line.find("sd")==0)) id << "Hard Drive " << *line.substr(2).c_str()-'a'; if(!id.str().empty()) InstanceID.push_back(id.str()); } _L_; return OK; } int Boot_OpenDRIM_BootSourceSetting_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int Boot_OpenDRIM_BootSourceSetting_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; for(unsigned int i=0;i::size_type index; if(!CF_foundInList(instance.InstanceID, InstanceID, index)) { errorMessage="No instance"; return NOT_FOUND; } CF_assert(Boot_OpenDRIM_BootSourceSetting_populate(instance,errorMessage)); _L_; return OK; } int Boot_OpenDRIM_BootSourceSetting_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootSourceSetting& newInstance, const OpenDRIM_BootSourceSetting& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootSourceSetting_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootSourceSetting& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootSourceSetting_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootSourceSetting& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootSourceSetting_populate(OpenDRIM_BootSourceSetting& instance, string& errorMessage) { _E_; instance.setElementName(instance.InstanceID.substr(0,instance.InstanceID.find("Drive")+5)+" source setting"); instance.setFailThroughSupported(1); // Is Supported _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/registration/0000755000175000017500000000000011400666205021217 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootOrderedComponent-remove.sh0000755000175000017500000000630211400666205030602 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_BootOrderedComponentModule cimprovider -r -m Boot_OpenDRIM_BootOrderedComponentModule 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_BootOrderedComponent.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootHostedService-remove.sh0000755000175000017500000000624411400666205030107 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_BootHostedServiceModule cimprovider -r -m Boot_OpenDRIM_BootHostedServiceModule 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_BootHostedService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootCapabilities-remove.sh0000755000175000017500000000623211400666205027726 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_BootCapabilitiesModule cimprovider -r -m Boot_OpenDRIM_BootCapabilitiesModule 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_BootCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootOrderedComponent.sh0000755000175000017500000000643011400666205027311 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_BootOrderedComponent.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BootOrderedComponent provider module"; Name = "Boot_OpenDRIM_BootOrderedComponentModule"; Location = "cmpiBoot_OpenDRIM_BootOrderedComponentProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BootOrderedComponent provider"; Name = "Boot_OpenDRIM_BootOrderedComponentProvider"; ProviderModuleName = "Boot_OpenDRIM_BootOrderedComponentModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BootOrderedComponent provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_BootOrderedComponentModule"; ProviderName = "Boot_OpenDRIM_BootOrderedComponentProvider"; ClassName = "OpenDRIM_BootOrderedComponent"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"GroupComponent", "PartComponent", "AssignedSequence"}; CapabilityID = "Boot_OpenDRIM_BootOrderedComponent"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BootOrderedComponent.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootConformsToProfile.sh0000755000175000017500000000672011400666205027456 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_BootConformsToProfile.mof cimmof -aE -n $4 $6/mof/OpenDRIM_BootConformsToProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BootConformsToProfile provider module"; Name = "Boot_OpenDRIM_BootConformsToProfileModule"; Location = "cmpiBoot_OpenDRIM_BootConformsToProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BootConformsToProfile provider"; Name = "Boot_OpenDRIM_BootConformsToProfileProvider"; ProviderModuleName = "Boot_OpenDRIM_BootConformsToProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BootConformsToProfile provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_BootConformsToProfileModule"; ProviderName = "Boot_OpenDRIM_BootConformsToProfileProvider"; ClassName = "OpenDRIM_BootConformsToProfile"; ProviderType = {2, 3}; Namespaces = {"$1", "$4"}; SupportedProperties = {"ConformantStandard", "ManagedElement"}; CapabilityID = "Boot_OpenDRIM_BootConformsToProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BootConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootSourceSetting-remove.sh0000755000175000017500000000623011400666205030131 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_BootSourceSettingModule cimprovider -r -m Boot_OpenDRIM_BootSourceSettingModule 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_BootSourceSetting.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_RegisteredBootProfile.sh0000755000175000017500000000665311400666205027467 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $4 $6/mof/OpenDRIM_RegisteredBootProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_RegisteredBootProfile provider module"; Name = "Boot_OpenDRIM_RegisteredBootProfileModule"; Location = "cmpiBoot_OpenDRIM_RegisteredBootProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_RegisteredBootProfile provider"; Name = "Boot_OpenDRIM_RegisteredBootProfileProvider"; ProviderModuleName = "Boot_OpenDRIM_RegisteredBootProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_RegisteredBootProfile provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_RegisteredBootProfileModule"; ProviderName = "Boot_OpenDRIM_RegisteredBootProfileProvider"; ClassName = "OpenDRIM_RegisteredBootProfile"; ProviderType = {2}; Namespaces = {"$4"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID", "RegisteredOrganization", "OtherRegisteredOrganization", "RegisteredName", "RegisteredVersion", "AdvertiseTypes", "AdvertiseTypeDescriptions"}; CapabilityID = "Boot_OpenDRIM_RegisteredBootProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_RegisteredBootProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootLogicalIdentity-remove.sh0000755000175000017500000000627011400666205030423 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_BootLogicalIdentityModule cimprovider -r -m Boot_OpenDRIM_BootLogicalIdentityModule 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_BootLogicalIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootConformsToProfile-remove.sh0000755000175000017500000001022411400666205030743 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_BootConformsToProfileModule cimprovider -r -m Boot_OpenDRIM_BootConformsToProfileModule 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_BootConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootHostedService.sh0000755000175000017500000000630311400666205026610 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_BootHostedService.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BootHostedService provider module"; Name = "Boot_OpenDRIM_BootHostedServiceModule"; Location = "cmpiBoot_OpenDRIM_BootHostedServiceProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BootHostedService provider"; Name = "Boot_OpenDRIM_BootHostedServiceProvider"; ProviderModuleName = "Boot_OpenDRIM_BootHostedServiceModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BootHostedService provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_BootHostedServiceModule"; ProviderName = "Boot_OpenDRIM_BootHostedServiceProvider"; ClassName = "OpenDRIM_BootHostedService"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent"}; CapabilityID = "Boot_OpenDRIM_BootHostedService"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BootHostedService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootService-remove.sh0000755000175000017500000000614311400666205026736 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_BootServiceModule cimprovider -r -m Boot_OpenDRIM_BootServiceModule 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_BootService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootConcreteDependency-remove.sh0000755000175000017500000000632611400666205031102 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_BootConcreteDependencyModule cimprovider -r -m Boot_OpenDRIM_BootConcreteDependencyModule 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_BootConcreteDependency.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootConfigSetting-remove.sh0000755000175000017500000000623711400666205030105 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_BootConfigSettingModule cimprovider -r -m Boot_OpenDRIM_BootConfigSettingModule 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_BootConfigSetting.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootSettingData.sh0000755000175000017500000000627211400666205026255 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_BootSettingData.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BootSettingData provider module"; Name = "Boot_OpenDRIM_BootSettingDataModule"; Location = "cmpiBoot_OpenDRIM_BootSettingDataProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BootSettingData provider"; Name = "Boot_OpenDRIM_BootSettingDataProvider"; ProviderModuleName = "Boot_OpenDRIM_BootSettingDataModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BootSettingData provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_BootSettingDataModule"; ProviderName = "Boot_OpenDRIM_BootSettingDataProvider"; ClassName = "OpenDRIM_BootSettingData"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "InstanceID", "ElementName", "OwningEntity"}; CapabilityID = "Boot_OpenDRIM_BootSettingData"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BootSettingData.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_ServiceAffectsBoot.sh0000755000175000017500000000642711400666205026744 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_ServiceAffectsBoot.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_ServiceAffectsBoot provider module"; Name = "Boot_OpenDRIM_ServiceAffectsBootModule"; Location = "cmpiBoot_OpenDRIM_ServiceAffectsBootProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_ServiceAffectsBoot provider"; Name = "Boot_OpenDRIM_ServiceAffectsBootProvider"; ProviderModuleName = "Boot_OpenDRIM_ServiceAffectsBootModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_ServiceAffectsBoot provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_ServiceAffectsBootModule"; ProviderName = "Boot_OpenDRIM_ServiceAffectsBootProvider"; ClassName = "OpenDRIM_ServiceAffectsBoot"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"AffectedElement", "AffectingElement", "ElementEffects", "OtherElementEffectsDescriptions"}; CapabilityID = "Boot_OpenDRIM_ServiceAffectsBoot"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_ServiceAffectsBoot.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootConcreteDependency.sh0000755000175000017500000000644211400666205027606 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_BootConcreteDependency.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BootConcreteDependency provider module"; Name = "Boot_OpenDRIM_BootConcreteDependencyModule"; Location = "cmpiBoot_OpenDRIM_BootConcreteDependencyProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BootConcreteDependency provider"; Name = "Boot_OpenDRIM_BootConcreteDependencyProvider"; ProviderModuleName = "Boot_OpenDRIM_BootConcreteDependencyModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BootConcreteDependency provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_BootConcreteDependencyModule"; ProviderName = "Boot_OpenDRIM_BootConcreteDependencyProvider"; ClassName = "OpenDRIM_BootConcreteDependency"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent"}; CapabilityID = "Boot_OpenDRIM_BootConcreteDependency"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BootConcreteDependency.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootLogicalIdentity.sh0000755000175000017500000000635611400666205027135 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_BootLogicalIdentity.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BootLogicalIdentity provider module"; Name = "Boot_OpenDRIM_BootLogicalIdentityModule"; Location = "cmpiBoot_OpenDRIM_BootLogicalIdentityProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BootLogicalIdentity provider"; Name = "Boot_OpenDRIM_BootLogicalIdentityProvider"; ProviderModuleName = "Boot_OpenDRIM_BootLogicalIdentityModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BootLogicalIdentity provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_BootLogicalIdentityModule"; ProviderName = "Boot_OpenDRIM_BootLogicalIdentityProvider"; ClassName = "OpenDRIM_BootLogicalIdentity"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"SystemElement", "SameElement"}; CapabilityID = "Boot_OpenDRIM_BootLogicalIdentity"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BootLogicalIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootConcreteComponent.sh0000755000175000017500000000642711400666205027475 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_BootConcreteComponent.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BootConcreteComponent provider module"; Name = "Boot_OpenDRIM_BootConcreteComponentModule"; Location = "cmpiBoot_OpenDRIM_BootConcreteComponentProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BootConcreteComponent provider"; Name = "Boot_OpenDRIM_BootConcreteComponentProvider"; ProviderModuleName = "Boot_OpenDRIM_BootConcreteComponentModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BootConcreteComponent provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_BootConcreteComponentModule"; ProviderName = "Boot_OpenDRIM_BootConcreteComponentProvider"; ClassName = "OpenDRIM_BootConcreteComponent"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"GroupComponent", "PartComponent"}; CapabilityID = "Boot_OpenDRIM_BootConcreteComponent"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BootConcreteComponent.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootConfigSetting.sh0000755000175000017500000000642611400666205026612 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_BootConfigSetting.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BootConfigSetting provider module"; Name = "Boot_OpenDRIM_BootConfigSettingModule"; Location = "cmpiBoot_OpenDRIM_BootConfigSettingProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BootConfigSetting provider"; Name = "Boot_OpenDRIM_BootConfigSettingProvider"; ProviderModuleName = "Boot_OpenDRIM_BootConfigSettingModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BootConfigSetting provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_BootConfigSettingModule"; ProviderName = "Boot_OpenDRIM_BootConfigSettingProvider"; ClassName = "OpenDRIM_BootConfigSetting"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "InstanceID", "ElementName"}; SupportedMethods = {"ChangeBootOrder", "ValidateSettings"}; CapabilityID = "Boot_OpenDRIM_BootConfigSetting"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BootConfigSetting.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootSourceSetting.sh0000755000175000017500000000644011400666205026641 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_BootSourceSetting.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BootSourceSetting provider module"; Name = "Boot_OpenDRIM_BootSourceSettingModule"; Location = "cmpiBoot_OpenDRIM_BootSourceSettingProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BootSourceSetting provider"; Name = "Boot_OpenDRIM_BootSourceSettingProvider"; ProviderModuleName = "Boot_OpenDRIM_BootSourceSettingModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BootSourceSetting provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_BootSourceSettingModule"; ProviderName = "Boot_OpenDRIM_BootSourceSettingProvider"; ClassName = "OpenDRIM_BootSourceSetting"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "InstanceID", "ElementName", "BootString", "BIOSBootString", "StructuredBootString", "FailThroughSupported"}; CapabilityID = "Boot_OpenDRIM_BootSourceSetting"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BootSourceSetting.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootConfigSettingData.sh0000755000175000017500000000647111400666205027404 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_BootConfigSettingData.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BootConfigSettingData provider module"; Name = "Boot_OpenDRIM_BootConfigSettingDataModule"; Location = "cmpiBoot_OpenDRIM_BootConfigSettingDataProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BootConfigSettingData provider"; Name = "Boot_OpenDRIM_BootConfigSettingDataProvider"; ProviderModuleName = "Boot_OpenDRIM_BootConfigSettingDataModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BootConfigSettingData provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_BootConfigSettingDataModule"; ProviderName = "Boot_OpenDRIM_BootConfigSettingDataProvider"; ClassName = "OpenDRIM_BootConfigSettingData"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"ManagedElement", "SettingData", "IsDefault", "IsCurrent", "IsNext"}; CapabilityID = "Boot_OpenDRIM_BootConfigSettingData"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BootConfigSettingData.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootConcreteComponent-remove.sh0000755000175000017500000000631411400666205030763 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_BootConcreteComponentModule cimprovider -r -m Boot_OpenDRIM_BootConcreteComponentModule 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_BootConcreteComponent.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_RegisteredBootProfile-remove.sh0000755000175000017500000000630011400666205030747 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_RegisteredBootProfileModule cimprovider -r -m Boot_OpenDRIM_RegisteredBootProfileModule 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_RegisteredBootProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootServiceCapabilities.sh0000755000175000017500000000706211400666205027756 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_BootServiceCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BootServiceCapabilities provider module"; Name = "Boot_OpenDRIM_BootServiceCapabilitiesModule"; Location = "cmpiBoot_OpenDRIM_BootServiceCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BootServiceCapabilities provider"; Name = "Boot_OpenDRIM_BootServiceCapabilitiesProvider"; ProviderModuleName = "Boot_OpenDRIM_BootServiceCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BootServiceCapabilities provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_BootServiceCapabilitiesModule"; ProviderName = "Boot_OpenDRIM_BootServiceCapabilitiesProvider"; ClassName = "OpenDRIM_BootServiceCapabilities"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "InstanceID", "ElementName", "ElementNameEditSupported", "MaxElementNameLen", "RequestedStatesSupported", "ElementNameMask", "BootConfigCapabilities", "OtherBootConfigCapabilities", "BootStringsSupported", "BootCapabilitiesSupported", "OtherBootCapabilitiesSupported"}; CapabilityID = "Boot_OpenDRIM_BootServiceCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BootServiceCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootCapabilities.sh0000755000175000017500000000631211400666205026432 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_BootCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BootCapabilities provider module"; Name = "Boot_OpenDRIM_BootCapabilitiesModule"; Location = "cmpiBoot_OpenDRIM_BootCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BootCapabilities provider"; Name = "Boot_OpenDRIM_BootCapabilitiesProvider"; ProviderModuleName = "Boot_OpenDRIM_BootCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BootCapabilities provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_BootCapabilitiesModule"; ProviderName = "Boot_OpenDRIM_BootCapabilitiesProvider"; ClassName = "OpenDRIM_BootCapabilities"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"ManagedElement", "Capabilities", "Characteristics"}; CapabilityID = "Boot_OpenDRIM_BootCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BootCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_ServiceAffectsBoot-remove.sh0000755000175000017500000000625611400666205030237 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_ServiceAffectsBootModule cimprovider -r -m Boot_OpenDRIM_ServiceAffectsBootModule 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_ServiceAffectsBoot.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootService.sh0000755000175000017500000000732111400666205025442 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_BootService.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BootService provider module"; Name = "Boot_OpenDRIM_BootServiceModule"; Location = "cmpiBoot_OpenDRIM_BootServiceProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BootService provider"; Name = "Boot_OpenDRIM_BootServiceProvider"; ProviderModuleName = "Boot_OpenDRIM_BootServiceModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BootService provider capabilities"; ProviderModuleName = "Boot_OpenDRIM_BootServiceModule"; ProviderName = "Boot_OpenDRIM_BootServiceProvider"; ClassName = "OpenDRIM_BootService"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"InstanceID", "Caption", "Description", "ElementName", "InstallDate", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "CommunicationStatus", "DetailedStatus", "OperatingStatus", "PrimaryStatus", "EnabledState", "OtherEnabledState", "RequestedState", "EnabledDefault", "TimeOfLastStateChange", "AvailableRequestedStates", "TransitioningToState", "SystemCreationClassName", "SystemName", "CreationClassName", "Name", "PrimaryOwnerName", "PrimaryOwnerContact", "StartMode", "Started"}; SupportedMethods = {"RequestStateChange", "StartService", "StopService", "CreateBootConfigSetting", "SetBootConfigRole", "SetBootConfigUsage", "ApplyBootConfigSetting"}; CapabilityID = "Boot_OpenDRIM_BootService"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BootService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootConfigSettingData-remove.sh0000755000175000017500000000631411400666205030673 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_BootConfigSettingDataModule cimprovider -r -m Boot_OpenDRIM_BootConfigSettingDataModule 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_BootConfigSettingData.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/Boot-remove.sh0000755000175000017500000000553611400666205023765 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 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_BootConcreteComponent-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_ServiceAffectsBoot-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BootSettingData-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BootLogicalIdentity-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BootService-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BootServiceCapabilities-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BootConfigSettingData-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BootSourceSetting-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BootHostedService-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BootConfigSetting-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_RegisteredBootProfile-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BootConcreteDependency-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BootOrderedComponent-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BootCapabilities-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BootConformsToProfile-remove.sh $1 $2 $3 $4 if test "$2" = sfcb then /etc/init.d/sfcb start fi opendrim-lmp-boot-0.1.0~ppa/registration/Boot.sh0000755000175000017500000000551711400666205022471 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 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_BootConformsToProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BootCapabilities.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BootOrderedComponent.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BootConcreteDependency.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_RegisteredBootProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BootConfigSetting.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BootHostedService.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BootSourceSetting.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BootConfigSettingData.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BootServiceCapabilities.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BootService.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BootLogicalIdentity.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BootSettingData.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_ServiceAffectsBoot.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BootConcreteComponent.sh $1 $2 $3 $4 $5 $6 if test "$3" = sfcb then /etc/init.d/sfcb start fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootSettingData-remove.sh0000755000175000017500000000620411400666205027543 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_BootSettingDataModule cimprovider -r -m Boot_OpenDRIM_BootSettingDataModule 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_BootSettingData.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/registration/OpenDRIM_BootServiceCapabilities-remove.sh0000755000175000017500000000632411400666205031251 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m Boot_OpenDRIM_BootServiceCapabilitiesModule cimprovider -r -m Boot_OpenDRIM_BootServiceCapabilitiesModule 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_BootServiceCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteDependency/0000755000175000017500000000000011400666205024527 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteDependency/OpenDRIM_BootConcreteDependencyAccess.cppopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteDependency/OpenDRIM_BootConcreteDependencyAccess.cp0000644000175000017500000002423011400666205034220 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_BootConcreteDependencyAccess.h" int Boot_OpenDRIM_BootConcreteDependency_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(Boot_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootConcreteDependency_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_ManagedElement_unload(errorMessage)); CF_assert(Boot_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootConcreteDependency_isAssociated(const Instance& Antecedent, const Instance& Dependent, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int Boot_OpenDRIM_BootConcreteDependency_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(Boot_OpenDRIM_BootConcreteDependency_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(Boot_OpenDRIM_BootConcreteDependency_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; Boot_OpenDRIM_BootConcreteDependency_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(Boot_OpenDRIM_BootConcreteDependency_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootConcreteDependency_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootConcreteDependency& 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(Boot_OpenDRIM_BootConcreteDependency_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(Boot_OpenDRIM_BootConcreteDependency_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Boot_OpenDRIM_BootConcreteDependency_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Boot_OpenDRIM_BootConcreteDependency_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConcreteDependency& newInstance, const OpenDRIM_BootConcreteDependency& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConcreteDependency_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConcreteDependency& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConcreteDependency_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConcreteDependency& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConcreteDependency_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(Boot_OpenDRIM_BootConcreteDependency_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootConcreteDependency_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(Boot_OpenDRIM_BootConcreteDependency_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(Boot_OpenDRIM_BootConcreteDependency_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootConcreteDependency_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(Boot_OpenDRIM_BootConcreteDependency_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_BootConcreteDependency_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_BootConcreteDependency instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); OpenDRIM_BootConcreteDependency_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootConcreteDependency_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_BootConcreteDependency_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_BootConcreteDependency instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); OpenDRIM_BootConcreteDependency_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootConcreteDependency_populate(OpenDRIM_BootConcreteDependency& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteDependency/Makefile.am0000644000175000017500000000472011400666205026566 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_BootConcreteDependencyProvider.la libcmpiBoot_OpenDRIM_BootConcreteDependencyProvider_la_SOURCES = OpenDRIM_BootConcreteDependencyAccess.cpp OpenDRIM_BootConcreteDependencyProvider.cpp cmpiOpenDRIM_BootConcreteDependency.cpp assocOpenDRIM_BootConcreteDependency.cpp # May have to be adjusted for direct invocation libcmpiBoot_OpenDRIM_BootConcreteDependencyProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiBoot_OpenDRIM_BootConcreteDependencyProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la #../CIM_ManagedElement/libcmpiBoot_CIM_ManagedElementProvider.la ../CIM_ManagedElement/libcmpiBoot_CIM_ManagedElementProvider.la libcmpiBoot_OpenDRIM_BootConcreteDependencyProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BootConcreteDependency.h OpenDRIM_BootConcreteDependency.h OpenDRIM_BootConcreteDependencyAccess.h opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteDependency/OpenDRIM_BootConcreteDependency.h0000644000175000017500000000662711400666205032735 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTCONCRETEDEPENDENCY_H_ #define OPENDRIM_BOOTCONCRETEDEPENDENCY_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_BootConcreteDependency_classnames[] = {"OpenDRIM_BootConcreteDependency"}; static string OpenDRIM_BootConcreteDependency_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"CIM_LogicalDevice"}; const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"OpenDRIM_BootSourceSetting"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_BootConcreteDependency { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; OpenDRIM_BootConcreteDependency() { Antecedent_isNULL = true; Dependent_isNULL = true; } ~OpenDRIM_BootConcreteDependency() {} 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_BOOTCONCRETEDEPENDENCY_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteDependency/cmpiOpenDRIM_BootConcreteDependency.cpp0000644000175000017500000000606011400666205034130 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConcreteDependency.h" CMPIObjectPath* Boot_OpenDRIM_BootConcreteDependency_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootConcreteDependency& instance) { _E_; Objectpath op(broker, OpenDRIM_BootConcreteDependency_classnames[0], OpenDRIM_BootConcreteDependency_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* Boot_OpenDRIM_BootConcreteDependency_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootConcreteDependency& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_BootConcreteDependency_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void Boot_OpenDRIM_BootConcreteDependency_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootConcreteDependency& 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 Boot_OpenDRIM_BootConcreteDependency_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootConcreteDependency& 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_; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteDependency/OpenDRIM_BootConcreteDependencyAccess.h0000644000175000017500000001046011400666205034045 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTCONCRETEDEPENDENCYACCESS_H_ #define OPENDRIM_BOOTCONCRETEDEPENDENCYACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_BootConcreteDependency.h" #include "assocOpenDRIM_BootConcreteDependency.h" int Boot_OpenDRIM_BootConcreteDependency_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_BootConcreteDependency_unload(string& errorMessage); int Boot_OpenDRIM_BootConcreteDependency_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConcreteDependency_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootConcreteDependency& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootConcreteDependency_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConcreteDependency& newInstance, const OpenDRIM_BootConcreteDependency& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootConcreteDependency_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConcreteDependency& instance, string& errorMessage); int Boot_OpenDRIM_BootConcreteDependency_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConcreteDependency& instance, string& errorMessage); int Boot_OpenDRIM_BootConcreteDependency_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConcreteDependency_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConcreteDependency_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_BootConcreteDependency_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConcreteDependency_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_BootConcreteDependency_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConcreteDependency_populate(OpenDRIM_BootConcreteDependency& instance, string& errorMessage); #endif /*OPENDRIM_BOOTCONCRETEDEPENDENCYACCESS_H_*/ ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteDependency/OpenDRIM_BootConcreteDependencyProvider.cppopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteDependency/OpenDRIM_BootConcreteDependencyProvider.0000644000175000017500000004207611400666205034276 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConcreteDependency.h" #include "OpenDRIM_BootConcreteDependencyAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_BootConcreteDependencyProviderSetInstance Boot_OpenDRIM_BootConcreteDependencyProviderModifyInstance #endif int Boot_OpenDRIM_BootConcreteDependency_init(const CMPIBroker* broker); int Boot_OpenDRIM_BootConcreteDependency_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_BootConcreteDependencyProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootConcreteDependency_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteDependencyProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteDependency_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootConcreteDependency_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteDependencyProviderEnumInstances(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 = Boot_OpenDRIM_BootConcreteDependency_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_BootConcreteDependency_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteDependencyProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConcreteDependency instance; Boot_OpenDRIM_BootConcreteDependency_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteDependency_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_BootConcreteDependency_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteDependencyProviderSetInstance(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_BootConcreteDependency newInstance, oldInstance; Boot_OpenDRIM_BootConcreteDependency_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_BootConcreteDependency_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteDependency_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConcreteDependency_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteDependencyProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConcreteDependency instance; Boot_OpenDRIM_BootConcreteDependency_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteDependency_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConcreteDependency_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConcreteDependency_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_BootConcreteDependency_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteDependencyProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConcreteDependency instance; Boot_OpenDRIM_BootConcreteDependency_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteDependency_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConcreteDependency_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteDependencyProviderExecQuery(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 Boot_OpenDRIM_BootConcreteDependencyProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootConcreteDependency_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteDependencyProviderAssociatorNames(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 = Boot_OpenDRIM_BootConcreteDependency_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_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 Boot_OpenDRIM_BootConcreteDependencyProviderAssociators(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 = Boot_OpenDRIM_BootConcreteDependency_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_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 Boot_OpenDRIM_BootConcreteDependencyProviderReferenceNames(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 = Boot_OpenDRIM_BootConcreteDependency_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootConcreteDependency_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Boot_OpenDRIM_BootConcreteDependency_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootConcreteDependency_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteDependencyProviderReferences(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 = Boot_OpenDRIM_BootConcreteDependency_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootConcreteDependency_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Boot_OpenDRIM_BootConcreteDependency_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Boot_OpenDRIM_BootConcreteDependency_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Boot_OpenDRIM_BootConcreteDependency_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteDependency_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootConcreteDependency_init FAILED: " + (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_BootConcreteDependency_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteDependency_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootConcreteDependency_unload FAILED: " + (string) OpenDRIM_BootConcreteDependency_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_BootConcreteDependency_INIT if (Boot_OpenDRIM_BootConcreteDependency_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_BootConcreteDependencyProvider, Boot_OpenDRIM_BootConcreteDependencyProvider, _broker, Boot_OpenDRIM_BootConcreteDependency_INIT); CMAssociationMIStub(Boot_OpenDRIM_BootConcreteDependencyProvider, Boot_OpenDRIM_BootConcreteDependencyProvider, _broker, Boot_OpenDRIM_BootConcreteDependency_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteDependency/assocOpenDRIM_BootConcreteDependency.h0000644000175000017500000000617111400666205033760 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_BOOTCONCRETEDEPENDENCY_H_ #define ASSOCOPENDRIM_BOOTCONCRETEDEPENDENCY_H_ #include "OpenDRIM_BootConcreteDependencyAccess.h" int Boot_OpenDRIM_BootConcreteDependency_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 Boot_OpenDRIM_BootConcreteDependency_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 Boot_OpenDRIM_BootConcreteDependency_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootConcreteDependency_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootConcreteDependency_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootConcreteDependency_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_BOOTCONCRETEDEPENDENCY_H_*/ ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteDependency/assocOpenDRIM_BootConcreteDependency.cppopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteDependency/assocOpenDRIM_BootConcreteDependency.cpp0000644000175000017500000002072011400666205034307 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_BootConcreteDependency.h" int Boot_OpenDRIM_BootConcreteDependency_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 = Boot_OpenDRIM_BootConcreteDependency_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(Boot_OpenDRIM_BootConcreteDependency_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(Boot_OpenDRIM_BootConcreteDependency_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootConcreteDependency_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(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootConcreteDependency_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_ManagedElement _instance; Boot_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Boot_OpenDRIM_BootConcreteDependency_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(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootConcreteDependency_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_ManagedElement _instance; Boot_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteDependency/cmpiOpenDRIM_BootConcreteDependency.h0000644000175000017500000000434111400666205033575 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_BOOTCONCRETEDEPENDENCY_H_ #define CMPIOPENDRIM_BOOTCONCRETEDEPENDENCY_H_ #include "OpenDRIM_BootConcreteDependency.h" CMPIObjectPath* Boot_OpenDRIM_BootConcreteDependency_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootConcreteDependency& instance); CMPIInstance* Boot_OpenDRIM_BootConcreteDependency_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootConcreteDependency& instance); void Boot_OpenDRIM_BootConcreteDependency_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootConcreteDependency& instance); void Boot_OpenDRIM_BootConcreteDependency_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootConcreteDependency& instance); #endif /*CMPIOPENDRIM_BOOTCONCRETEDEPENDENCY_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootServiceCapabilities/0000755000175000017500000000000011400666205024700 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootServiceCapabilities/OpenDRIM_BootServiceCapabilitiesAccess.cppopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootServiceCapabilities/OpenDRIM_BootServiceCapabilitiesAccess.0000644000175000017500000000617111400666205034223 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_BootServiceCapabilitiesAccess.h" int Boot_OpenDRIM_BootServiceCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int Boot_OpenDRIM_BootServiceCapabilities_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int Boot_OpenDRIM_BootServiceCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int Boot_OpenDRIM_BootServiceCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootServiceCapabilities& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int Boot_OpenDRIM_BootServiceCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootServiceCapabilities& newInstance, const OpenDRIM_BootServiceCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootServiceCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootServiceCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootServiceCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootServiceCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootServiceCapabilities_populate(OpenDRIM_BootServiceCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootServiceCapabilities/Makefile.am0000644000175000017500000000411211400666205026732 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_BootServiceCapabilitiesProvider.la libcmpiBoot_OpenDRIM_BootServiceCapabilitiesProvider_la_SOURCES = OpenDRIM_BootServiceCapabilitiesAccess.cpp OpenDRIM_BootServiceCapabilitiesProvider.cpp cmpiOpenDRIM_BootServiceCapabilities.cpp libcmpiBoot_OpenDRIM_BootServiceCapabilitiesProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la libcmpiBoot_OpenDRIM_BootServiceCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BootServiceCapabilities.h OpenDRIM_BootServiceCapabilities.h OpenDRIM_BootServiceCapabilitiesAccess.h ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootServiceCapabilities/OpenDRIM_BootServiceCapabilitiesProvider.cppopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootServiceCapabilities/OpenDRIM_BootServiceCapabilitiesProvide0000644000175000017500000002605611400666205034360 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootServiceCapabilities.h" #include "OpenDRIM_BootServiceCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_BootServiceCapabilitiesProviderSetInstance Boot_OpenDRIM_BootServiceCapabilitiesProviderModifyInstance #endif int Boot_OpenDRIM_BootServiceCapabilities_init(const CMPIBroker* broker); int Boot_OpenDRIM_BootServiceCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_BootServiceCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootServiceCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_BootServiceCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootServiceCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceCapabilitiesProviderEnumInstances(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 = Boot_OpenDRIM_BootServiceCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_BootServiceCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootServiceCapabilities instance; Boot_OpenDRIM_BootServiceCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootServiceCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_BootServiceCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceCapabilitiesProviderSetInstance(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_BootServiceCapabilities newInstance, oldInstance; Boot_OpenDRIM_BootServiceCapabilities_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_BootServiceCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_BootServiceCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootServiceCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootServiceCapabilities instance; Boot_OpenDRIM_BootServiceCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootServiceCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BootServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootServiceCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootServiceCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_BootServiceCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootServiceCapabilities instance; Boot_OpenDRIM_BootServiceCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootServiceCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootServiceCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceCapabilitiesProviderExecQuery(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 Boot_OpenDRIM_BootServiceCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootServiceCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootServiceCapabilities_init FAILED: " + (string) OpenDRIM_BootServiceCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_BootServiceCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootServiceCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootServiceCapabilities_unload FAILED: " + (string) OpenDRIM_BootServiceCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_BootServiceCapabilities_INIT if (Boot_OpenDRIM_BootServiceCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_BootServiceCapabilitiesProvider, Boot_OpenDRIM_BootServiceCapabilitiesProvider, _broker, Boot_OpenDRIM_BootServiceCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootServiceCapabilities/OpenDRIM_BootServiceCapabilities.h0000644000175000017500000001664211400666205033255 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTSERVICECAPABILITIES_H_ #define OPENDRIM_BOOTSERVICECAPABILITIES_H_ #include const static char* OpenDRIM_BootServiceCapabilities_classnames[] = {"OpenDRIM_BootServiceCapabilities"}; static string OpenDRIM_BootServiceCapabilities_NAMESPACE = _NAMESPACE; class OpenDRIM_BootServiceCapabilities { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string InstanceID; bool InstanceID_isNULL; string ElementName; bool ElementName_isNULL; bool ElementNameEditSupported; bool ElementNameEditSupported_isNULL; unsigned short MaxElementNameLen; bool MaxElementNameLen_isNULL; vector RequestedStatesSupported; bool RequestedStatesSupported_isNULL; string ElementNameMask; bool ElementNameMask_isNULL; vector BootConfigCapabilities; bool BootConfigCapabilities_isNULL; vector OtherBootConfigCapabilities; bool OtherBootConfigCapabilities_isNULL; vector BootStringsSupported; bool BootStringsSupported_isNULL; vector BootCapabilitiesSupported; bool BootCapabilitiesSupported_isNULL; vector OtherBootCapabilitiesSupported; bool OtherBootCapabilitiesSupported_isNULL; OpenDRIM_BootServiceCapabilities() { Caption_isNULL = true; Description_isNULL = true; InstanceID_isNULL = true; ElementName_isNULL = true; ElementNameEditSupported_isNULL = true; MaxElementNameLen_isNULL = true; RequestedStatesSupported_isNULL = true; ElementNameMask_isNULL = true; BootConfigCapabilities_isNULL = true; OtherBootConfigCapabilities_isNULL = true; BootStringsSupported_isNULL = true; BootCapabilitiesSupported_isNULL = true; OtherBootCapabilitiesSupported_isNULL = true; } ~OpenDRIM_BootServiceCapabilities() {} 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 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 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 getElementNameEditSupported(bool& value) const { if (ElementNameEditSupported_isNULL==true) return NOT_FOUND; value = ElementNameEditSupported; return OK; } int setElementNameEditSupported(const bool& newValue) { ElementNameEditSupported = newValue; ElementNameEditSupported_isNULL = false; return OK; } int getMaxElementNameLen(unsigned short& value) const { if (MaxElementNameLen_isNULL==true) return NOT_FOUND; value = MaxElementNameLen; return OK; } int setMaxElementNameLen(const unsigned short& newValue) { MaxElementNameLen = newValue; MaxElementNameLen_isNULL = false; return OK; } int getRequestedStatesSupported(vector& value) const { if (RequestedStatesSupported_isNULL==true) return NOT_FOUND; value = RequestedStatesSupported; return OK; } int setRequestedStatesSupported(const vector& newValue) { RequestedStatesSupported = newValue; RequestedStatesSupported_isNULL = false; return OK; } int getElementNameMask(string& value) const { if (ElementNameMask_isNULL==true) return NOT_FOUND; value = ElementNameMask; return OK; } int setElementNameMask(const string& newValue) { ElementNameMask = newValue; ElementNameMask_isNULL = false; return OK; } int getBootConfigCapabilities(vector& value) const { if (BootConfigCapabilities_isNULL==true) return NOT_FOUND; value = BootConfigCapabilities; return OK; } int setBootConfigCapabilities(const vector& newValue) { BootConfigCapabilities = newValue; BootConfigCapabilities_isNULL = false; return OK; } int getOtherBootConfigCapabilities(vector& value) const { if (OtherBootConfigCapabilities_isNULL==true) return NOT_FOUND; value = OtherBootConfigCapabilities; return OK; } int setOtherBootConfigCapabilities(const vector& newValue) { OtherBootConfigCapabilities = newValue; OtherBootConfigCapabilities_isNULL = false; return OK; } int getBootStringsSupported(vector& value) const { if (BootStringsSupported_isNULL==true) return NOT_FOUND; value = BootStringsSupported; return OK; } int setBootStringsSupported(const vector& newValue) { BootStringsSupported = newValue; BootStringsSupported_isNULL = false; return OK; } int getBootCapabilitiesSupported(vector& value) const { if (BootCapabilitiesSupported_isNULL==true) return NOT_FOUND; value = BootCapabilitiesSupported; return OK; } int setBootCapabilitiesSupported(const vector& newValue) { BootCapabilitiesSupported = newValue; BootCapabilitiesSupported_isNULL = false; return OK; } int getOtherBootCapabilitiesSupported(vector& value) const { if (OtherBootCapabilitiesSupported_isNULL==true) return NOT_FOUND; value = OtherBootCapabilitiesSupported; return OK; } int setOtherBootCapabilitiesSupported(const vector& newValue) { OtherBootCapabilitiesSupported = newValue; OtherBootCapabilitiesSupported_isNULL = false; return OK; } }; #endif /*OPENDRIM_BOOTSERVICECAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootServiceCapabilities/cmpiOpenDRIM_BootServiceCapabilities.cppopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootServiceCapabilities/cmpiOpenDRIM_BootServiceCapabilities.cp0000644000175000017500000001330511400666205034272 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootServiceCapabilities.h" CMPIObjectPath* Boot_OpenDRIM_BootServiceCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootServiceCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_BootServiceCapabilities_classnames[0], OpenDRIM_BootServiceCapabilities_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* Boot_OpenDRIM_BootServiceCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootServiceCapabilities& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_BootServiceCapabilities_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.ElementNameEditSupported_isNULL) ci.setProperty("ElementNameEditSupported", instance.ElementNameEditSupported); if (!instance.MaxElementNameLen_isNULL) ci.setProperty("MaxElementNameLen", instance.MaxElementNameLen); if (!instance.RequestedStatesSupported_isNULL) ci.setProperty("RequestedStatesSupported", instance.RequestedStatesSupported); if (!instance.ElementNameMask_isNULL) ci.setProperty("ElementNameMask", instance.ElementNameMask); if (!instance.BootConfigCapabilities_isNULL) ci.setProperty("BootConfigCapabilities", instance.BootConfigCapabilities); if (!instance.OtherBootConfigCapabilities_isNULL) ci.setProperty("OtherBootConfigCapabilities", instance.OtherBootConfigCapabilities); if (!instance.BootStringsSupported_isNULL) ci.setProperty("BootStringsSupported", instance.BootStringsSupported); if (!instance.BootCapabilitiesSupported_isNULL) ci.setProperty("BootCapabilitiesSupported", instance.BootCapabilitiesSupported); if (!instance.OtherBootCapabilitiesSupported_isNULL) ci.setProperty("OtherBootCapabilitiesSupported", instance.OtherBootCapabilitiesSupported); _L_; return ci.getHdl(); } void Boot_OpenDRIM_BootServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootServiceCapabilities& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void Boot_OpenDRIM_BootServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootServiceCapabilities& 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("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("ElementNameEditSupported", instance.ElementNameEditSupported) == OK) instance.ElementNameEditSupported_isNULL = false; if (inst.getProperty("MaxElementNameLen", instance.MaxElementNameLen) == OK) instance.MaxElementNameLen_isNULL = false; if (inst.getProperty("RequestedStatesSupported", instance.RequestedStatesSupported) == OK) instance.RequestedStatesSupported_isNULL = false; if (inst.getProperty("ElementNameMask", instance.ElementNameMask) == OK) instance.ElementNameMask_isNULL = false; if (inst.getProperty("BootConfigCapabilities", instance.BootConfigCapabilities) == OK) instance.BootConfigCapabilities_isNULL = false; if (inst.getProperty("OtherBootConfigCapabilities", instance.OtherBootConfigCapabilities) == OK) instance.OtherBootConfigCapabilities_isNULL = false; if (inst.getProperty("BootStringsSupported", instance.BootStringsSupported) == OK) instance.BootStringsSupported_isNULL = false; if (inst.getProperty("BootCapabilitiesSupported", instance.BootCapabilitiesSupported) == OK) instance.BootCapabilitiesSupported_isNULL = false; if (inst.getProperty("OtherBootCapabilitiesSupported", instance.OtherBootCapabilitiesSupported) == OK) instance.OtherBootCapabilitiesSupported_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootServiceCapabilities/OpenDRIM_BootServiceCapabilitiesAccess.hopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootServiceCapabilities/OpenDRIM_BootServiceCapabilitiesAccess.0000644000175000017500000000577311400666205034232 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTSERVICECAPABILITIESACCESS_H_ #define OPENDRIM_BOOTSERVICECAPABILITIESACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_BootServiceCapabilities.h" int Boot_OpenDRIM_BootServiceCapabilities_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_BootServiceCapabilities_unload(string& errorMessage); int Boot_OpenDRIM_BootServiceCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootServiceCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootServiceCapabilities& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootServiceCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootServiceCapabilities& newInstance, const OpenDRIM_BootServiceCapabilities& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootServiceCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootServiceCapabilities& instance, string& errorMessage); int Boot_OpenDRIM_BootServiceCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootServiceCapabilities& instance, string& errorMessage); int Boot_OpenDRIM_BootServiceCapabilities_populate(OpenDRIM_BootServiceCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_BOOTSERVICECAPABILITIESACCESS_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootServiceCapabilities/cmpiOpenDRIM_BootServiceCapabilities.h0000644000175000017500000000435511400666205034124 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_BOOTSERVICECAPABILITIES_H_ #define CMPIOPENDRIM_BOOTSERVICECAPABILITIES_H_ #include "OpenDRIM_BootServiceCapabilities.h" CMPIObjectPath* Boot_OpenDRIM_BootServiceCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootServiceCapabilities& instance); CMPIInstance* Boot_OpenDRIM_BootServiceCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootServiceCapabilities& instance); void Boot_OpenDRIM_BootServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootServiceCapabilities& instance); void Boot_OpenDRIM_BootServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootServiceCapabilities& instance); #endif /*CMPIOPENDRIM_BOOTSERVICECAPABILITIES_H_*/ opendrim-lmp-boot-0.1.0~ppa/VERSION0000644000175000017500000000000611400666205017551 0ustar guillaumeguillaume0.1.0 opendrim-lmp-boot-0.1.0~ppa/test/0000755000175000017500000000000011400666205017464 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_BootConcreteDependency.cpp0000644000175000017500000001120311400666205027107 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConcreteDependency.h" #include "OpenDRIM_BootConcreteDependencyAccess.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_BootConcreteDependency& instance) { os << " [OpenDRIM_BootConcreteDependency]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); os << " [\\OpenDRIM_BootConcreteDependency]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteDependency_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_BootConcreteDependency_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 = Boot_OpenDRIM_BootConcreteDependency_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 = Boot_OpenDRIM_BootConcreteDependency_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 = Boot_OpenDRIM_BootConcreteDependency_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_BootConfigSetting.cpp0000644000175000017500000001126111400666205026115 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConfigSetting.h" #include "OpenDRIM_BootConfigSettingAccess.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_BootConfigSetting& instance) { os << " [OpenDRIM_BootConfigSetting]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); os << " [\\OpenDRIM_BootConfigSetting]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSetting_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_BootConfigSetting_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 = Boot_OpenDRIM_BootConfigSetting_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 = Boot_OpenDRIM_BootConfigSetting_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 = Boot_OpenDRIM_BootConfigSetting_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_BootService.cpp0000644000175000017500000001444611400666205024762 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootService.h" #include "OpenDRIM_BootServiceAccess.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_BootService& instance) { os << " [OpenDRIM_BootService]" << endl; ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_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("Name", Name, Name_isNULL); ToString("PrimaryOwnerName", PrimaryOwnerName, PrimaryOwnerName_isNULL); ToString("PrimaryOwnerContact", PrimaryOwnerContact, PrimaryOwnerContact_isNULL); ToString("StartMode", StartMode, StartMode_isNULL); ToString("Started", Started, Started_isNULL); os << " [\\OpenDRIM_BootService]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_BootService_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_BootService_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 = Boot_OpenDRIM_BootService_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 = Boot_OpenDRIM_BootService_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 = Boot_OpenDRIM_BootService_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_BootConfigSettingData.cpp0000644000175000017500000001145011400666205026707 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConfigSettingData.h" #include "OpenDRIM_BootConfigSettingDataAccess.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_BootConfigSettingData& instance) { os << " [OpenDRIM_BootConfigSettingData]" << endl; ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); ToStringRef("SettingData", SettingData, SettingData_isNULL); ToStringInt("IsDefault", IsDefault, IsDefault_isNULL); ToStringInt("IsCurrent", IsCurrent, IsCurrent_isNULL); ToStringInt("IsNext", IsNext, IsNext_isNULL); os << " [\\OpenDRIM_BootConfigSettingData]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSettingData_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_BootConfigSettingData_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 = Boot_OpenDRIM_BootConfigSettingData_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 = Boot_OpenDRIM_BootConfigSettingData_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 = Boot_OpenDRIM_BootConfigSettingData_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/test/Makefile.am0000644000175000017500000002031011400666205021514 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ noinst_PROGRAMS = testOpenDRIM_BootConformsToProfile testOpenDRIM_BootCapabilities testOpenDRIM_BootOrderedComponent testOpenDRIM_BootConcreteDependency testOpenDRIM_RegisteredBootProfile testOpenDRIM_BootConfigSetting testOpenDRIM_BootHostedService testOpenDRIM_BootSourceSetting testOpenDRIM_BootConfigSettingData testOpenDRIM_BootServiceCapabilities testOpenDRIM_BootService testOpenDRIM_BootLogicalIdentity testOpenDRIM_BootSettingData testOpenDRIM_ServiceAffectsBoot testOpenDRIM_BootConcreteComponent testOpenDRIM_BootConformsToProfile_CPPFLAGS = -I../OpenDRIM_BootConformsToProfile/ testOpenDRIM_BootConformsToProfile_SOURCES = testOpenDRIM_BootConformsToProfile.cpp testOpenDRIM_BootConformsToProfile_LDADD = ../OpenDRIM_BootConformsToProfile/libcmpiBoot_OpenDRIM_BootConformsToProfileProvider.la test-OpenDRIM_BootConformsToProfile: testOpenDRIM_BootConformsToProfile ./testOpenDRIM_BootConformsToProfile # May have to be adjusted for direct invocation testOpenDRIM_BootCapabilities_CPPFLAGS = -I../OpenDRIM_BootCapabilities/ -I../null/ -I../null/ testOpenDRIM_BootCapabilities_SOURCES = testOpenDRIM_BootCapabilities.cpp testOpenDRIM_BootCapabilities_LDADD = ../OpenDRIM_BootCapabilities/libcmpiBoot_OpenDRIM_BootCapabilitiesProvider.la test-OpenDRIM_BootCapabilities: testOpenDRIM_BootCapabilities ./testOpenDRIM_BootCapabilities # May have to be adjusted for direct invocation testOpenDRIM_BootOrderedComponent_CPPFLAGS = -I../OpenDRIM_BootOrderedComponent/ -I../null/ -I../null/ testOpenDRIM_BootOrderedComponent_SOURCES = testOpenDRIM_BootOrderedComponent.cpp testOpenDRIM_BootOrderedComponent_LDADD = ../OpenDRIM_BootOrderedComponent/libcmpiBoot_OpenDRIM_BootOrderedComponentProvider.la test-OpenDRIM_BootOrderedComponent: testOpenDRIM_BootOrderedComponent ./testOpenDRIM_BootOrderedComponent # May have to be adjusted for direct invocation testOpenDRIM_BootConcreteDependency_CPPFLAGS = -I../OpenDRIM_BootConcreteDependency/ -I../null/ -I../null/ testOpenDRIM_BootConcreteDependency_SOURCES = testOpenDRIM_BootConcreteDependency.cpp testOpenDRIM_BootConcreteDependency_LDADD = ../OpenDRIM_BootConcreteDependency/libcmpiBoot_OpenDRIM_BootConcreteDependencyProvider.la test-OpenDRIM_BootConcreteDependency: testOpenDRIM_BootConcreteDependency ./testOpenDRIM_BootConcreteDependency testOpenDRIM_RegisteredBootProfile_CPPFLAGS = -I../OpenDRIM_RegisteredBootProfile/ testOpenDRIM_RegisteredBootProfile_SOURCES = testOpenDRIM_RegisteredBootProfile.cpp testOpenDRIM_RegisteredBootProfile_LDADD = ../OpenDRIM_RegisteredBootProfile/libcmpiBoot_OpenDRIM_RegisteredBootProfileProvider.la test-OpenDRIM_RegisteredBootProfile: testOpenDRIM_RegisteredBootProfile ./testOpenDRIM_RegisteredBootProfile testOpenDRIM_BootConfigSetting_CPPFLAGS = -I../OpenDRIM_BootConfigSetting/ testOpenDRIM_BootConfigSetting_SOURCES = testOpenDRIM_BootConfigSetting.cpp testOpenDRIM_BootConfigSetting_LDADD = ../OpenDRIM_BootConfigSetting/libcmpiBoot_OpenDRIM_BootConfigSettingProvider.la test-OpenDRIM_BootConfigSetting: testOpenDRIM_BootConfigSetting ./testOpenDRIM_BootConfigSetting # May have to be adjusted for direct invocation testOpenDRIM_BootHostedService_CPPFLAGS = -I../OpenDRIM_BootHostedService/ -I../null/ -I../null/ testOpenDRIM_BootHostedService_SOURCES = testOpenDRIM_BootHostedService.cpp testOpenDRIM_BootHostedService_LDADD = ../OpenDRIM_BootHostedService/libcmpiBoot_OpenDRIM_BootHostedServiceProvider.la test-OpenDRIM_BootHostedService: testOpenDRIM_BootHostedService ./testOpenDRIM_BootHostedService testOpenDRIM_BootSourceSetting_CPPFLAGS = -I../OpenDRIM_BootSourceSetting/ testOpenDRIM_BootSourceSetting_SOURCES = testOpenDRIM_BootSourceSetting.cpp testOpenDRIM_BootSourceSetting_LDADD = ../OpenDRIM_BootSourceSetting/libcmpiBoot_OpenDRIM_BootSourceSettingProvider.la test-OpenDRIM_BootSourceSetting: testOpenDRIM_BootSourceSetting ./testOpenDRIM_BootSourceSetting # May have to be adjusted for direct invocation testOpenDRIM_BootConfigSettingData_CPPFLAGS = -I../OpenDRIM_BootConfigSettingData/ -I../null/ -I../null/ testOpenDRIM_BootConfigSettingData_SOURCES = testOpenDRIM_BootConfigSettingData.cpp testOpenDRIM_BootConfigSettingData_LDADD = ../OpenDRIM_BootConfigSettingData/libcmpiBoot_OpenDRIM_BootConfigSettingDataProvider.la test-OpenDRIM_BootConfigSettingData: testOpenDRIM_BootConfigSettingData ./testOpenDRIM_BootConfigSettingData testOpenDRIM_BootServiceCapabilities_CPPFLAGS = -I../OpenDRIM_BootServiceCapabilities/ testOpenDRIM_BootServiceCapabilities_SOURCES = testOpenDRIM_BootServiceCapabilities.cpp testOpenDRIM_BootServiceCapabilities_LDADD = ../OpenDRIM_BootServiceCapabilities/libcmpiBoot_OpenDRIM_BootServiceCapabilitiesProvider.la test-OpenDRIM_BootServiceCapabilities: testOpenDRIM_BootServiceCapabilities ./testOpenDRIM_BootServiceCapabilities testOpenDRIM_BootService_CPPFLAGS = -I../OpenDRIM_BootService/ testOpenDRIM_BootService_SOURCES = testOpenDRIM_BootService.cpp testOpenDRIM_BootService_LDADD = ../OpenDRIM_BootService/libcmpiBoot_OpenDRIM_BootServiceProvider.la test-OpenDRIM_BootService: testOpenDRIM_BootService ./testOpenDRIM_BootService # May have to be adjusted for direct invocation testOpenDRIM_BootLogicalIdentity_CPPFLAGS = -I../OpenDRIM_BootLogicalIdentity/ -I../null/ -I../null/ testOpenDRIM_BootLogicalIdentity_SOURCES = testOpenDRIM_BootLogicalIdentity.cpp testOpenDRIM_BootLogicalIdentity_LDADD = ../OpenDRIM_BootLogicalIdentity/libcmpiBoot_OpenDRIM_BootLogicalIdentityProvider.la test-OpenDRIM_BootLogicalIdentity: testOpenDRIM_BootLogicalIdentity ./testOpenDRIM_BootLogicalIdentity testOpenDRIM_BootSettingData_CPPFLAGS = -I../OpenDRIM_BootSettingData/ testOpenDRIM_BootSettingData_SOURCES = testOpenDRIM_BootSettingData.cpp testOpenDRIM_BootSettingData_LDADD = ../OpenDRIM_BootSettingData/libcmpiBoot_OpenDRIM_BootSettingDataProvider.la test-OpenDRIM_BootSettingData: testOpenDRIM_BootSettingData ./testOpenDRIM_BootSettingData # May have to be adjusted for direct invocation testOpenDRIM_ServiceAffectsBoot_CPPFLAGS = -I../OpenDRIM_ServiceAffectsBoot/ -I../null/ -I../null/ testOpenDRIM_ServiceAffectsBoot_SOURCES = testOpenDRIM_ServiceAffectsBoot.cpp testOpenDRIM_ServiceAffectsBoot_LDADD = ../OpenDRIM_ServiceAffectsBoot/libcmpiBoot_OpenDRIM_ServiceAffectsBootProvider.la test-OpenDRIM_ServiceAffectsBoot: testOpenDRIM_ServiceAffectsBoot ./testOpenDRIM_ServiceAffectsBoot # May have to be adjusted for direct invocation testOpenDRIM_BootConcreteComponent_CPPFLAGS = -I../OpenDRIM_BootConcreteComponent/ -I../null/ -I../null/ testOpenDRIM_BootConcreteComponent_SOURCES = testOpenDRIM_BootConcreteComponent.cpp testOpenDRIM_BootConcreteComponent_LDADD = ../OpenDRIM_BootConcreteComponent/libcmpiBoot_OpenDRIM_BootConcreteComponentProvider.la test-OpenDRIM_BootConcreteComponent: testOpenDRIM_BootConcreteComponent ./testOpenDRIM_BootConcreteComponent opendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_BootCapabilities.cpp0000644000175000017500000001123711400666205025746 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootCapabilities.h" #include "OpenDRIM_BootCapabilitiesAccess.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_BootCapabilities& instance) { os << " [OpenDRIM_BootCapabilities]" << endl; ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); ToStringRef("Capabilities", Capabilities, Capabilities_isNULL); ToStringArrayInt("Characteristics", Characteristics, Characteristics_isNULL); os << " [\\OpenDRIM_BootCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_BootCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_BootCapabilities_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 = Boot_OpenDRIM_BootCapabilities_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 = Boot_OpenDRIM_BootCapabilities_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 = Boot_OpenDRIM_BootCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_BootOrderedComponent.cpp0000644000175000017500000001131511400666205026621 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootOrderedComponent.h" #include "OpenDRIM_BootOrderedComponentAccess.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_BootOrderedComponent& instance) { os << " [OpenDRIM_BootOrderedComponent]" << endl; ToStringRef("GroupComponent", GroupComponent, GroupComponent_isNULL); ToStringRef("PartComponent", PartComponent, PartComponent_isNULL); ToString("AssignedSequence", AssignedSequence, AssignedSequence_isNULL); os << " [\\OpenDRIM_BootOrderedComponent]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_BootOrderedComponent_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_BootOrderedComponent_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 = Boot_OpenDRIM_BootOrderedComponent_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 = Boot_OpenDRIM_BootOrderedComponent_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 = Boot_OpenDRIM_BootOrderedComponent_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_BootConformsToProfile.cpp0000644000175000017500000001123611400666205026766 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConformsToProfile.h" #include "OpenDRIM_BootConformsToProfileAccess.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_BootConformsToProfile& instance) { os << " [OpenDRIM_BootConformsToProfile]" << endl; ToStringRef("ConformantStandard", ConformantStandard, ConformantStandard_isNULL); ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); os << " [\\OpenDRIM_BootConformsToProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_BootConformsToProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_BootConformsToProfile_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 = Boot_OpenDRIM_BootConformsToProfile_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 = Boot_OpenDRIM_BootConformsToProfile_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 = Boot_OpenDRIM_BootConformsToProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_BootLogicalIdentity.cpp0000644000175000017500000001115611400666205026441 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootLogicalIdentity.h" #include "OpenDRIM_BootLogicalIdentityAccess.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_BootLogicalIdentity& instance) { os << " [OpenDRIM_BootLogicalIdentity]" << endl; ToStringRef("SystemElement", SystemElement, SystemElement_isNULL); ToStringRef("SameElement", SameElement, SameElement_isNULL); os << " [\\OpenDRIM_BootLogicalIdentity]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_BootLogicalIdentity_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_BootLogicalIdentity_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 = Boot_OpenDRIM_BootLogicalIdentity_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 = Boot_OpenDRIM_BootLogicalIdentity_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 = Boot_OpenDRIM_BootLogicalIdentity_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_BootServiceCapabilities.cpp0000644000175000017500000001316411400666205027270 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootServiceCapabilities.h" #include "OpenDRIM_BootServiceCapabilitiesAccess.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_BootServiceCapabilities& instance) { os << " [OpenDRIM_BootServiceCapabilities]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("ElementNameEditSupported", ElementNameEditSupported, ElementNameEditSupported_isNULL); ToStringInt("MaxElementNameLen", MaxElementNameLen, MaxElementNameLen_isNULL); ToStringArrayInt("RequestedStatesSupported", RequestedStatesSupported, RequestedStatesSupported_isNULL); ToString("ElementNameMask", ElementNameMask, ElementNameMask_isNULL); ToStringArrayInt("BootConfigCapabilities", BootConfigCapabilities, BootConfigCapabilities_isNULL); ToStringArray("OtherBootConfigCapabilities", OtherBootConfigCapabilities, OtherBootConfigCapabilities_isNULL); ToStringArrayInt("BootStringsSupported", BootStringsSupported, BootStringsSupported_isNULL); ToStringArrayInt("BootCapabilitiesSupported", BootCapabilitiesSupported, BootCapabilitiesSupported_isNULL); ToStringArray("OtherBootCapabilitiesSupported", OtherBootCapabilitiesSupported, OtherBootCapabilitiesSupported_isNULL); os << " [\\OpenDRIM_BootServiceCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_BootServiceCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_BootServiceCapabilities_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 = Boot_OpenDRIM_BootServiceCapabilities_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 = Boot_OpenDRIM_BootServiceCapabilities_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 = Boot_OpenDRIM_BootServiceCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_RegisteredBootProfile.cpp0000644000175000017500000001236211400666205026773 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RegisteredBootProfile.h" #include "OpenDRIM_RegisteredBootProfileAccess.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_RegisteredBootProfile& instance) { os << " [OpenDRIM_RegisteredBootProfile]" << 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_RegisteredBootProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_RegisteredBootProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_RegisteredBootProfile_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 = Boot_OpenDRIM_RegisteredBootProfile_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 = Boot_OpenDRIM_RegisteredBootProfile_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 = Boot_OpenDRIM_RegisteredBootProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_BootHostedService.cpp0000644000175000017500000001110711400666205026120 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootHostedService.h" #include "OpenDRIM_BootHostedServiceAccess.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_BootHostedService& instance) { os << " [OpenDRIM_BootHostedService]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); os << " [\\OpenDRIM_BootHostedService]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_BootHostedService_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_BootHostedService_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 = Boot_OpenDRIM_BootHostedService_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 = Boot_OpenDRIM_BootHostedService_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 = Boot_OpenDRIM_BootHostedService_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_BootConcreteComponent.cpp0000644000175000017500000001121711400666205027000 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConcreteComponent.h" #include "OpenDRIM_BootConcreteComponentAccess.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_BootConcreteComponent& instance) { os << " [OpenDRIM_BootConcreteComponent]" << endl; ToStringRef("GroupComponent", GroupComponent, GroupComponent_isNULL); ToStringRef("PartComponent", PartComponent, PartComponent_isNULL); os << " [\\OpenDRIM_BootConcreteComponent]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteComponent_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_BootConcreteComponent_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 = Boot_OpenDRIM_BootConcreteComponent_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 = Boot_OpenDRIM_BootConcreteComponent_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 = Boot_OpenDRIM_BootConcreteComponent_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_BootSourceSetting.cpp0000644000175000017500000001173411400666205026155 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootSourceSetting.h" #include "OpenDRIM_BootSourceSettingAccess.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_BootSourceSetting& instance) { os << " [OpenDRIM_BootSourceSetting]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("BootString", BootString, BootString_isNULL); ToString("BIOSBootString", BIOSBootString, BIOSBootString_isNULL); ToString("StructuredBootString", StructuredBootString, StructuredBootString_isNULL); ToStringInt("FailThroughSupported", FailThroughSupported, FailThroughSupported_isNULL); os << " [\\OpenDRIM_BootSourceSetting]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_BootSourceSetting_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_BootSourceSetting_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 = Boot_OpenDRIM_BootSourceSetting_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 = Boot_OpenDRIM_BootSourceSetting_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 = Boot_OpenDRIM_BootSourceSetting_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_BootSettingData.cpp0000644000175000017500000001132711400666205025564 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootSettingData.h" #include "OpenDRIM_BootSettingDataAccess.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_BootSettingData& instance) { os << " [OpenDRIM_BootSettingData]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("OwningEntity", OwningEntity, OwningEntity_isNULL); os << " [\\OpenDRIM_BootSettingData]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_BootSettingData_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_BootSettingData_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 = Boot_OpenDRIM_BootSettingData_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 = Boot_OpenDRIM_BootSettingData_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 = Boot_OpenDRIM_BootSettingData_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/test/testOpenDRIM_ServiceAffectsBoot.cpp0000644000175000017500000001147711400666205026257 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_ServiceAffectsBoot.h" #include "OpenDRIM_ServiceAffectsBootAccess.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_ServiceAffectsBoot& instance) { os << " [OpenDRIM_ServiceAffectsBoot]" << endl; ToStringRef("AffectedElement", AffectedElement, AffectedElement_isNULL); ToStringRef("AffectingElement", AffectingElement, AffectingElement_isNULL); ToStringArrayInt("ElementEffects", ElementEffects, ElementEffects_isNULL); ToStringArray("OtherElementEffectsDescriptions", OtherElementEffectsDescriptions, OtherElementEffectsDescriptions_isNULL); os << " [\\OpenDRIM_ServiceAffectsBoot]" << endl; return os; } int main() { string errorMessage; int errorCode = Boot_OpenDRIM_ServiceAffectsBoot_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Boot_OpenDRIM_ServiceAffectsBoot_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 = Boot_OpenDRIM_ServiceAffectsBoot_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 = Boot_OpenDRIM_ServiceAffectsBoot_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 = Boot_OpenDRIM_ServiceAffectsBoot_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootCapabilities/0000755000175000017500000000000011400666205023357 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootCapabilities/OpenDRIM_BootCapabilitiesProvider.cpp0000644000175000017500000004107611400666205032460 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootCapabilities.h" #include "OpenDRIM_BootCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_BootCapabilitiesProviderSetInstance Boot_OpenDRIM_BootCapabilitiesProviderModifyInstance #endif int Boot_OpenDRIM_BootCapabilities_init(const CMPIBroker* broker); int Boot_OpenDRIM_BootCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_BootCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_BootCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootCapabilitiesProviderEnumInstances(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 = Boot_OpenDRIM_BootCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_BootCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootCapabilities instance; Boot_OpenDRIM_BootCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_BootCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootCapabilitiesProviderSetInstance(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_BootCapabilities newInstance, oldInstance; Boot_OpenDRIM_BootCapabilities_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_BootCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_BootCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootCapabilities instance; Boot_OpenDRIM_BootCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_BootCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootCapabilities instance; Boot_OpenDRIM_BootCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootCapabilitiesProviderExecQuery(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 Boot_OpenDRIM_BootCapabilitiesProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootCapabilitiesProviderAssociatorNames(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 = Boot_OpenDRIM_BootCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_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 Boot_OpenDRIM_BootCapabilitiesProviderAssociators(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 = Boot_OpenDRIM_BootCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_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 Boot_OpenDRIM_BootCapabilitiesProviderReferenceNames(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 = Boot_OpenDRIM_BootCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Boot_OpenDRIM_BootCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootCapabilities_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootCapabilitiesProviderReferences(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 = Boot_OpenDRIM_BootCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Boot_OpenDRIM_BootCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Boot_OpenDRIM_BootCapabilities_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Boot_OpenDRIM_BootCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootCapabilities_init FAILED: " + (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_BootCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootCapabilities_unload FAILED: " + (string) OpenDRIM_BootCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_BootCapabilities_INIT if (Boot_OpenDRIM_BootCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_BootCapabilitiesProvider, Boot_OpenDRIM_BootCapabilitiesProvider, _broker, Boot_OpenDRIM_BootCapabilities_INIT); CMAssociationMIStub(Boot_OpenDRIM_BootCapabilitiesProvider, Boot_OpenDRIM_BootCapabilitiesProvider, _broker, Boot_OpenDRIM_BootCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootCapabilities/Makefile.am0000644000175000017500000000460211400666205025415 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_BootCapabilitiesProvider.la libcmpiBoot_OpenDRIM_BootCapabilitiesProvider_la_SOURCES = OpenDRIM_BootCapabilitiesAccess.cpp OpenDRIM_BootCapabilitiesProvider.cpp cmpiOpenDRIM_BootCapabilities.cpp assocOpenDRIM_BootCapabilities.cpp # May have to be adjusted for direct invocation libcmpiBoot_OpenDRIM_BootCapabilitiesProvider_la_CPPFLAGS = -I../CIM_Capabilities -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiBoot_OpenDRIM_BootCapabilitiesProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la #../CIM_Capabilities/libcmpiBoot_CIM_CapabilitiesProvider.la ../CIM_ManagedElement/libcmpiBoot_CIM_ManagedElementProvider.la libcmpiBoot_OpenDRIM_BootCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BootCapabilities.h OpenDRIM_BootCapabilities.h OpenDRIM_BootCapabilitiesAccess.h opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootCapabilities/assocOpenDRIM_BootCapabilities.cpp0000644000175000017500000002072011400666205031767 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_BootCapabilities.h" int Boot_OpenDRIM_BootCapabilities_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 = Boot_OpenDRIM_BootCapabilities_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(Boot_OpenDRIM_BootCapabilities_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(Boot_OpenDRIM_BootCapabilities_associatorManagedElementToCapabilities(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootCapabilities_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(Boot_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_Capabilities_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootCapabilities_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; Boot_CIM_Capabilities_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_Capabilities_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_Capabilities_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Boot_OpenDRIM_BootCapabilities_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(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootCapabilities_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; Boot_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootCapabilities/assocOpenDRIM_BootCapabilities.h0000644000175000017500000000611311400666205031434 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_BOOTCAPABILITIES_H_ #define ASSOCOPENDRIM_BOOTCAPABILITIES_H_ #include "OpenDRIM_BootCapabilitiesAccess.h" int Boot_OpenDRIM_BootCapabilities_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 Boot_OpenDRIM_BootCapabilities_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 Boot_OpenDRIM_BootCapabilities_enumerateCapabilitiess(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootCapabilities_getCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootCapabilities_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootCapabilities_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_BOOTCAPABILITIES_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootCapabilities/OpenDRIM_BootCapabilitiesAccess.cpp0000644000175000017500000002471011400666205032063 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_BootCapabilitiesAccess.h" int Boot_OpenDRIM_BootCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_Capabilities_load(broker, errorMessage)); CF_assert(Boot_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootCapabilities_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_Capabilities_unload(errorMessage)); CF_assert(Boot_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootCapabilities_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 Boot_OpenDRIM_BootCapabilities_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(Boot_OpenDRIM_BootCapabilities_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(Boot_OpenDRIM_BootCapabilities_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; Boot_OpenDRIM_BootCapabilities_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(Boot_OpenDRIM_BootCapabilities_referenceCapabilitiesToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootCapabilities& 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(Boot_OpenDRIM_BootCapabilities_getCapabilities(broker, ctx, Capabilities_objectpath, Capabilities_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(Boot_OpenDRIM_BootCapabilities_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Boot_OpenDRIM_BootCapabilities_isAssociated(Capabilities_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(Boot_OpenDRIM_BootCapabilities_populate(instance, errorMessage)); _L_; return OK; } int Boot_OpenDRIM_BootCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootCapabilities& newInstance, const OpenDRIM_BootCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootCapabilities_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(Boot_OpenDRIM_BootCapabilities_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootCapabilities_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(Boot_OpenDRIM_BootCapabilities_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(Boot_OpenDRIM_BootCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootCapabilities_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(Boot_OpenDRIM_BootCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_BootCapabilities_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_BootCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(Boot_OpenDRIM_BootCapabilities_populate(instance, errorMessage)); } OpenDRIM_BootCapabilities_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_BootCapabilities_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_BootCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(Boot_OpenDRIM_BootCapabilities_populate(instance, errorMessage)); } OpenDRIM_BootCapabilities_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootCapabilities_populate(OpenDRIM_BootCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootCapabilities/cmpiOpenDRIM_BootCapabilities.h0000644000175000017500000000423111400666205031253 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_BOOTCAPABILITIES_H_ #define CMPIOPENDRIM_BOOTCAPABILITIES_H_ #include "OpenDRIM_BootCapabilities.h" CMPIObjectPath* Boot_OpenDRIM_BootCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootCapabilities& instance); CMPIInstance* Boot_OpenDRIM_BootCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootCapabilities& instance); void Boot_OpenDRIM_BootCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootCapabilities& instance); void Boot_OpenDRIM_BootCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootCapabilities& instance); #endif /*CMPIOPENDRIM_BOOTCAPABILITIES_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootCapabilities/OpenDRIM_BootCapabilitiesAccess.h0000644000175000017500000001030011400666205031516 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTCAPABILITIESACCESS_H_ #define OPENDRIM_BOOTCAPABILITIESACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_BootCapabilities.h" #include "assocOpenDRIM_BootCapabilities.h" int Boot_OpenDRIM_BootCapabilities_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_BootCapabilities_unload(string& errorMessage); int Boot_OpenDRIM_BootCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootCapabilities& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootCapabilities& newInstance, const OpenDRIM_BootCapabilities& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootCapabilities& instance, string& errorMessage); int Boot_OpenDRIM_BootCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootCapabilities& instance, string& errorMessage); int Boot_OpenDRIM_BootCapabilities_associatorCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootCapabilities_associatorManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& Capabilities_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootCapabilities_referenceCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const vector& ManagedElement_instances, vector& OpenDRIM_BootCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_BootCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootCapabilities_populate(OpenDRIM_BootCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_BOOTCAPABILITIESACCESS_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootCapabilities/OpenDRIM_BootCapabilities.h0000644000175000017500000000757711400666205030422 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTCAPABILITIES_H_ #define OPENDRIM_BOOTCAPABILITIES_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_BootCapabilities_classnames[] = {"OpenDRIM_BootCapabilities"}; static string OpenDRIM_BootCapabilities_NAMESPACE = _NAMESPACE; const static string Capabilities_role = "Capabilities"; const static char* Capabilities_classnames[] = {"OpenDRIM_BootServiceCapabilities"}; const static string Capabilities_NAMESPACE = _NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_BootService"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_BootCapabilities { public: Objectpath ManagedElement; bool ManagedElement_isNULL; Objectpath Capabilities; bool Capabilities_isNULL; vector Characteristics; bool Characteristics_isNULL; OpenDRIM_BootCapabilities() { ManagedElement_isNULL = true; Capabilities_isNULL = true; Characteristics_isNULL = true; } ~OpenDRIM_BootCapabilities() {} 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_BOOTCAPABILITIES_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootCapabilities/cmpiOpenDRIM_BootCapabilities.cpp0000644000175000017500000000640411400666205031612 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootCapabilities.h" CMPIObjectPath* Boot_OpenDRIM_BootCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_BootCapabilities_classnames[0], OpenDRIM_BootCapabilities_NAMESPACE); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); if (!instance.Capabilities_isNULL) op.addKey("Capabilities", instance.Capabilities); _L_; return op.getHdl(); } CMPIInstance* Boot_OpenDRIM_BootCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootCapabilities& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_BootCapabilities_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Characteristics_isNULL) ci.setProperty("Characteristics", instance.Characteristics); _L_; return ci.getHdl(); } void Boot_OpenDRIM_BootCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootCapabilities& 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 Boot_OpenDRIM_BootCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootCapabilities& 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-boot-0.1.0~ppa/OpenDRIM_BootConfigSetting/0000755000175000017500000000000011400666205023531 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSetting/Makefile.am0000644000175000017500000000401611400666205025566 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_BootConfigSettingProvider.la libcmpiBoot_OpenDRIM_BootConfigSettingProvider_la_SOURCES = OpenDRIM_BootConfigSettingAccess.cpp OpenDRIM_BootConfigSettingProvider.cpp cmpiOpenDRIM_BootConfigSetting.cpp libcmpiBoot_OpenDRIM_BootConfigSettingProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la libcmpiBoot_OpenDRIM_BootConfigSettingProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BootConfigSetting.h OpenDRIM_BootConfigSetting.h OpenDRIM_BootConfigSettingAccess.h opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSetting/OpenDRIM_BootConfigSettingAccess.h0000644000175000017500000000660211400666205032054 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTCONFIGSETTINGACCESS_H_ #define OPENDRIM_BOOTCONFIGSETTINGACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_BootConfigSetting.h" int Boot_OpenDRIM_BootConfigSetting_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_BootConfigSetting_unload(string& errorMessage); int Boot_OpenDRIM_BootConfigSetting_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConfigSetting_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootConfigSetting& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootConfigSetting_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSetting& newInstance, const OpenDRIM_BootConfigSetting& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootConfigSetting_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSetting& instance, string& errorMessage); int Boot_OpenDRIM_BootConfigSetting_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSetting& instance, string& errorMessage); int Boot_OpenDRIM_BootConfigSetting_ChangeBootOrder(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSetting& instance, unsigned int& returnValue, const OpenDRIM_BootConfigSetting_ChangeBootOrder_In& in, OpenDRIM_BootConfigSetting_ChangeBootOrder_Out& out, string& errorMessage); int Boot_OpenDRIM_BootConfigSetting_ValidateSettings(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSetting& instance, unsigned int& returnValue, string& errorMessage); int Boot_OpenDRIM_BootConfigSetting_populate(OpenDRIM_BootConfigSetting& instance, string& errorMessage); #endif /*OPENDRIM_BOOTCONFIGSETTINGACCESS_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSetting/OpenDRIM_BootConfigSettingAccess.cpp0000644000175000017500000001016011400666205032401 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_BootConfigSettingAccess.h" const string instanceID="Default"; string systemName; int Boot_OpenDRIM_BootConfigSetting_load(const CMPIBroker* broker, string& errorMessage) { _E_; CF_assert(CF_getSystemName(systemName, errorMessage)); _L_; return OK; } int Boot_OpenDRIM_BootConfigSetting_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int Boot_OpenDRIM_BootConfigSetting_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; OpenDRIM_BootConfigSetting instance; instance.setInstanceID(instanceID); if(discriminant=="ei") CF_assert(Boot_OpenDRIM_BootConfigSetting_populate(instance,errorMessage)); result.push_back(instance); _L_; return OK; } int Boot_OpenDRIM_BootConfigSetting_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootConfigSetting& instance, const char** properties, string& errorMessage) { _E_; if (instance.InstanceID!=instanceID) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(Boot_OpenDRIM_BootConfigSetting_populate(instance,errorMessage)); _L_; return OK; } int Boot_OpenDRIM_BootConfigSetting_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSetting& newInstance, const OpenDRIM_BootConfigSetting& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConfigSetting_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSetting& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConfigSetting_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSetting& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConfigSetting_ChangeBootOrder(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSetting& instance, unsigned int& returnValue, const OpenDRIM_BootConfigSetting_ChangeBootOrder_In& in, OpenDRIM_BootConfigSetting_ChangeBootOrder_Out& out, string& errorMessage) { _E_; // TODO _L_; return OK; } int Boot_OpenDRIM_BootConfigSetting_ValidateSettings(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSetting& instance, unsigned int& returnValue, string& errorMessage) { _E_; // TODO _L_; return OK; } int Boot_OpenDRIM_BootConfigSetting_populate(OpenDRIM_BootConfigSetting& instance, string& errorMessage) { _E_; instance.setElementName("Default Boot configuration"); _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSetting/cmpiOpenDRIM_BootConfigSetting.h0000644000175000017500000000471311400666205031604 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_BOOTCONFIGSETTING_H_ #define CMPIOPENDRIM_BOOTCONFIGSETTING_H_ #include "OpenDRIM_BootConfigSetting.h" CMPIObjectPath* Boot_OpenDRIM_BootConfigSetting_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootConfigSetting& instance); CMPIInstance* Boot_OpenDRIM_BootConfigSetting_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootConfigSetting& instance); void Boot_OpenDRIM_BootConfigSetting_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootConfigSetting& instance); void Boot_OpenDRIM_BootConfigSetting_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootConfigSetting& instance); void Boot_OpenDRIM_BootConfigSetting_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BootConfigSetting_ChangeBootOrder_In& args); void Boot_OpenDRIM_BootConfigSetting_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BootConfigSetting_ChangeBootOrder_Out& args); #endif /*CMPIOPENDRIM_BOOTCONFIGSETTING_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSetting/OpenDRIM_BootConfigSetting.h0000644000175000017500000001071111400666205030726 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTCONFIGSETTING_H_ #define OPENDRIM_BOOTCONFIGSETTING_H_ #include const static char* OpenDRIM_BootConfigSetting_classnames[] = {"OpenDRIM_BootConfigSetting"}; static string OpenDRIM_BootConfigSetting_NAMESPACE = _NAMESPACE; class OpenDRIM_BootConfigSetting { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string InstanceID; bool InstanceID_isNULL; string ElementName; bool ElementName_isNULL; OpenDRIM_BootConfigSetting() { Caption_isNULL = true; Description_isNULL = true; InstanceID_isNULL = true; ElementName_isNULL = true; } ~OpenDRIM_BootConfigSetting() {} 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 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 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; } }; class OpenDRIM_BootConfigSetting_ChangeBootOrder_In { public: vector Source; bool Source_isNULL; Objectpath Job; bool Job_isNULL; OpenDRIM_BootConfigSetting_ChangeBootOrder_In() { Source_isNULL = true; Job_isNULL = true; } ~OpenDRIM_BootConfigSetting_ChangeBootOrder_In() {} int getSource(vector& value) const { if (Source_isNULL == true) return NOT_FOUND; value = Source; return OK; } int setSource(const vector& newValue) { Source = newValue; Source_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; } }; class OpenDRIM_BootConfigSetting_ChangeBootOrder_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_BootConfigSetting_ChangeBootOrder_Out() { Job_isNULL = true; } ~OpenDRIM_BootConfigSetting_ChangeBootOrder_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_BOOTCONFIGSETTING_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSetting/OpenDRIM_BootConfigSettingProvider.cpp0000644000175000017500000003354611400666205033007 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConfigSetting.h" #include "OpenDRIM_BootConfigSettingAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_BootConfigSettingProviderSetInstance Boot_OpenDRIM_BootConfigSettingProviderModifyInstance #endif int Boot_OpenDRIM_BootConfigSetting_init(const CMPIBroker* broker); int Boot_OpenDRIM_BootConfigSetting_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_BootConfigSettingProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootConfigSetting_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSetting_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootConfigSetting_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingProviderEnumInstances(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 = Boot_OpenDRIM_BootConfigSetting_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_BootConfigSetting_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConfigSetting instance; Boot_OpenDRIM_BootConfigSetting_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSetting_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_BootConfigSetting_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingProviderSetInstance(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_BootConfigSetting newInstance, oldInstance; Boot_OpenDRIM_BootConfigSetting_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_BootConfigSetting_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSetting_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConfigSetting_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConfigSetting instance; Boot_OpenDRIM_BootConfigSetting_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSetting_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BootConfigSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConfigSetting_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConfigSetting_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_BootConfigSetting_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConfigSetting instance; Boot_OpenDRIM_BootConfigSetting_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSetting_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConfigSetting_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingProviderExecQuery(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 Boot_OpenDRIM_BootConfigSettingProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootConfigSetting_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingProviderInvokeMethod(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_BootConfigSetting instance; Boot_OpenDRIM_BootConfigSetting_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"InstanceID"}; int errorCode = Boot_OpenDRIM_BootConfigSetting_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="ChangeBootOrder") { unsigned int returnValue; OpenDRIM_BootConfigSetting_ChangeBootOrder_In inArgs; Boot_OpenDRIM_BootConfigSetting_toCPP(_broker, in, inArgs); OpenDRIM_BootConfigSetting_ChangeBootOrder_Out outArgs; errorCode = Boot_OpenDRIM_BootConfigSetting_ChangeBootOrder(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSetting_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } Boot_OpenDRIM_BootConfigSetting_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="ValidateSettings") { unsigned int returnValue; errorCode = Boot_OpenDRIM_BootConfigSetting_ValidateSettings(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSetting_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_BootConfigSetting_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 Boot_OpenDRIM_BootConfigSetting_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSetting_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootConfigSetting_init FAILED: " + (string) OpenDRIM_BootConfigSetting_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_BootConfigSetting_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSetting_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootConfigSetting_unload FAILED: " + (string) OpenDRIM_BootConfigSetting_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_BootConfigSetting_INIT if (Boot_OpenDRIM_BootConfigSetting_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_BootConfigSettingProvider, Boot_OpenDRIM_BootConfigSettingProvider, _broker, Boot_OpenDRIM_BootConfigSetting_INIT); CMMethodMIStub(Boot_OpenDRIM_BootConfigSettingProvider, Boot_OpenDRIM_BootConfigSettingProvider, _broker, Boot_OpenDRIM_BootConfigSetting_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSetting/cmpiOpenDRIM_BootConfigSetting.cpp0000644000175000017500000001014411400666205032132 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConfigSetting.h" CMPIObjectPath* Boot_OpenDRIM_BootConfigSetting_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootConfigSetting& instance) { _E_; Objectpath op(broker, OpenDRIM_BootConfigSetting_classnames[0], OpenDRIM_BootConfigSetting_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* Boot_OpenDRIM_BootConfigSetting_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootConfigSetting& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_BootConfigSetting_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); _L_; return ci.getHdl(); } void Boot_OpenDRIM_BootConfigSetting_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootConfigSetting& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void Boot_OpenDRIM_BootConfigSetting_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootConfigSetting& 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("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; _L_; } void Boot_OpenDRIM_BootConfigSetting_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BootConfigSetting_ChangeBootOrder_In& args) { _E_; CMPIStatus rc; CMPIData data; vector Source; data = in->ft->getArg(in, "Source", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Source); args.setSource(Source); } Objectpath Job; data = in->ft->getArg(in, "Job", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Job); args.setJob(Job); } _L_; } void Boot_OpenDRIM_BootConfigSetting_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BootConfigSetting_ChangeBootOrder_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_; } opendrim-lmp-boot-0.1.0~ppa/acinclude.m40000644000175000017500000002103411400666205020676 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ AC_DEFUN([SHOW_COPYRIGHT], [ echo "################################################################################# # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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-boot-0.1.0~ppa/Common/0000755000175000017500000000000011400666205017735 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/Common/Makefile.am0000644000175000017500000000333211400666205021772 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ commonlibdir = @COMMONLIBDIR@ commonlib_LTLIBRARIES = libcmpiBoot_Common.la libcmpiBoot_Common_la_SOURCES = Boot_Common.cpp libcmpiBoot_Common_la_LDFLAGS = -avoid-version libcmpiBoot_Common_la_LIBADD = -lopendrim noinst_HEADERS = Boot_Common.h opendrim-lmp-boot-0.1.0~ppa/Common/Boot_Common.cpp0000644000175000017500000000276711400666205022670 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "Boot_Common.h" opendrim-lmp-boot-0.1.0~ppa/Common/Boot_Common.h0000644000175000017500000000307411400666205022325 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef BOOT_COMMON_H_ #define BOOT_COMMON_H_ #include #endif /*BOOT_COMMON_H_*/ opendrim-lmp-boot-0.1.0~ppa/configure.ac0000644000175000017500000001306011400666205020773 0ustar guillaumeguillaume# Process this file with autoconf to produce a configure script. ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 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), Boot provider package Copyright (C) 2009 Nodir Nazarov 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(Boot 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_BootConformsToProfile/Makefile OpenDRIM_BootCapabilities/Makefile OpenDRIM_BootOrderedComponent/Makefile OpenDRIM_BootConcreteDependency/Makefile OpenDRIM_RegisteredBootProfile/Makefile OpenDRIM_BootConfigSetting/Makefile OpenDRIM_BootHostedService/Makefile OpenDRIM_BootSourceSetting/Makefile OpenDRIM_BootConfigSettingData/Makefile OpenDRIM_BootServiceCapabilities/Makefile OpenDRIM_BootService/Makefile OpenDRIM_BootLogicalIdentity/Makefile OpenDRIM_BootSettingData/Makefile OpenDRIM_ServiceAffectsBoot/Makefile OpenDRIM_BootConcreteComponent/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-boot-0.1.0~ppa/OpenDRIM_BootLogicalIdentity/0000755000175000017500000000000011400666205024052 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootLogicalIdentity/Makefile.am0000644000175000017500000000465411400666205026117 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_BootLogicalIdentityProvider.la libcmpiBoot_OpenDRIM_BootLogicalIdentityProvider_la_SOURCES = OpenDRIM_BootLogicalIdentityAccess.cpp OpenDRIM_BootLogicalIdentityProvider.cpp cmpiOpenDRIM_BootLogicalIdentity.cpp assocOpenDRIM_BootLogicalIdentity.cpp # May have to be adjusted for direct invocation libcmpiBoot_OpenDRIM_BootLogicalIdentityProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiBoot_OpenDRIM_BootLogicalIdentityProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la #../CIM_ManagedElement/libcmpiBoot_CIM_ManagedElementProvider.la ../CIM_ManagedElement/libcmpiBoot_CIM_ManagedElementProvider.la libcmpiBoot_OpenDRIM_BootLogicalIdentityProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BootLogicalIdentity.h OpenDRIM_BootLogicalIdentity.h OpenDRIM_BootLogicalIdentityAccess.h opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootLogicalIdentity/OpenDRIM_BootLogicalIdentity.h0000644000175000017500000000673211400666205031600 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTLOGICALIDENTITY_H_ #define OPENDRIM_BOOTLOGICALIDENTITY_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_BootLogicalIdentity_classnames[] = {"OpenDRIM_BootLogicalIdentity"}; static string OpenDRIM_BootLogicalIdentity_NAMESPACE = _NAMESPACE; const static string SystemElement_role = "SystemElement"; const static char* SystemElement_classnames[] = {"OpenDRIM_BootSourceSetting"}; const static string SystemElement_NAMESPACE = _NAMESPACE; const static string SameElement_role = "SameElement"; const static char* SameElement_classnames[] = {"OpenDRIM_BootConfigSetting"}; const static string SameElement_NAMESPACE = _NAMESPACE; class OpenDRIM_BootLogicalIdentity { public: Objectpath SystemElement; bool SystemElement_isNULL; Objectpath SameElement; bool SameElement_isNULL; OpenDRIM_BootLogicalIdentity() { SystemElement_isNULL = true; SameElement_isNULL = true; } ~OpenDRIM_BootLogicalIdentity() {} string getKeys() const { return CF_toLowCase(".SystemElement=\"" + CF_quoteString(SystemElement.toString()) + "\""".SameElement=\"" + CF_quoteString(SameElement.toString()) + "\""); } int getSystemElement(Objectpath& value) const { if (SystemElement_isNULL==true) return NOT_FOUND; value = SystemElement; return OK; } int setSystemElement(const Objectpath& newValue) { SystemElement = newValue; SystemElement.setNamespace(SystemElement_NAMESPACE); SystemElement_isNULL = false; return OK; } int getSameElement(Objectpath& value) const { if (SameElement_isNULL==true) return NOT_FOUND; value = SameElement; return OK; } int setSameElement(const Objectpath& newValue) { SameElement = newValue; SameElement.setNamespace(SameElement_NAMESPACE); SameElement_isNULL = false; return OK; } }; #endif /*OPENDRIM_BOOTLOGICALIDENTITY_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootLogicalIdentity/assocOpenDRIM_BootLogicalIdentity.cpp0000644000175000017500000002076011400666205033161 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_BootLogicalIdentity.h" int Boot_OpenDRIM_BootLogicalIdentity_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 = Boot_OpenDRIM_BootLogicalIdentity_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, "SystemElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "SameElement") != 0) return OK; CF_assert(Boot_OpenDRIM_BootLogicalIdentity_associatorSystemElementToSameElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "SameElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "SystemElement") != 0) return OK; CF_assert(Boot_OpenDRIM_BootLogicalIdentity_associatorSameElementToSystemElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootLogicalIdentity_enumerateSystemElements(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, SystemElement_NAMESPACE, SystemElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootLogicalIdentity_getSystemElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), SystemElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), SystemElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; Boot_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Boot_OpenDRIM_BootLogicalIdentity_enumerateSameElements(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, SameElement_NAMESPACE, SameElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootLogicalIdentity_getSameElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), SameElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), SameElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; Boot_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootLogicalIdentity/OpenDRIM_BootLogicalIdentityProvider.cpp0000644000175000017500000004150411400666205033642 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootLogicalIdentity.h" #include "OpenDRIM_BootLogicalIdentityAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_BootLogicalIdentityProviderSetInstance Boot_OpenDRIM_BootLogicalIdentityProviderModifyInstance #endif int Boot_OpenDRIM_BootLogicalIdentity_init(const CMPIBroker* broker); int Boot_OpenDRIM_BootLogicalIdentity_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_BootLogicalIdentityProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootLogicalIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootLogicalIdentityProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_BootLogicalIdentity_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootLogicalIdentity_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootLogicalIdentityProviderEnumInstances(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 = Boot_OpenDRIM_BootLogicalIdentity_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_BootLogicalIdentity_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootLogicalIdentityProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootLogicalIdentity instance; Boot_OpenDRIM_BootLogicalIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootLogicalIdentity_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_BootLogicalIdentity_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootLogicalIdentityProviderSetInstance(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_BootLogicalIdentity newInstance, oldInstance; Boot_OpenDRIM_BootLogicalIdentity_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_BootLogicalIdentity_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_BootLogicalIdentity_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootLogicalIdentity_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootLogicalIdentityProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootLogicalIdentity instance; Boot_OpenDRIM_BootLogicalIdentity_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootLogicalIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootLogicalIdentity_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootLogicalIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_BootLogicalIdentity_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootLogicalIdentityProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootLogicalIdentity instance; Boot_OpenDRIM_BootLogicalIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootLogicalIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootLogicalIdentity_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootLogicalIdentityProviderExecQuery(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 Boot_OpenDRIM_BootLogicalIdentityProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootLogicalIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootLogicalIdentityProviderAssociatorNames(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 = Boot_OpenDRIM_BootLogicalIdentity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_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 Boot_OpenDRIM_BootLogicalIdentityProviderAssociators(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 = Boot_OpenDRIM_BootLogicalIdentity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_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 Boot_OpenDRIM_BootLogicalIdentityProviderReferenceNames(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 = Boot_OpenDRIM_BootLogicalIdentity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootLogicalIdentity_referenceSystemElementToSameElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Boot_OpenDRIM_BootLogicalIdentity_referenceSameElementToSystemElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootLogicalIdentity_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootLogicalIdentityProviderReferences(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 = Boot_OpenDRIM_BootLogicalIdentity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootLogicalIdentity_referenceSystemElementToSameElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Boot_OpenDRIM_BootLogicalIdentity_referenceSameElementToSystemElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Boot_OpenDRIM_BootLogicalIdentity_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Boot_OpenDRIM_BootLogicalIdentity_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootLogicalIdentity_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootLogicalIdentity_init FAILED: " + (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_BootLogicalIdentity_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootLogicalIdentity_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootLogicalIdentity_unload FAILED: " + (string) OpenDRIM_BootLogicalIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_BootLogicalIdentity_INIT if (Boot_OpenDRIM_BootLogicalIdentity_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_BootLogicalIdentityProvider, Boot_OpenDRIM_BootLogicalIdentityProvider, _broker, Boot_OpenDRIM_BootLogicalIdentity_INIT); CMAssociationMIStub(Boot_OpenDRIM_BootLogicalIdentityProvider, Boot_OpenDRIM_BootLogicalIdentityProvider, _broker, Boot_OpenDRIM_BootLogicalIdentity_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootLogicalIdentity/OpenDRIM_BootLogicalIdentityAccess.h0000644000175000017500000001040411400666205032711 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTLOGICALIDENTITYACCESS_H_ #define OPENDRIM_BOOTLOGICALIDENTITYACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_BootLogicalIdentity.h" #include "assocOpenDRIM_BootLogicalIdentity.h" int Boot_OpenDRIM_BootLogicalIdentity_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_BootLogicalIdentity_unload(string& errorMessage); int Boot_OpenDRIM_BootLogicalIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootLogicalIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootLogicalIdentity& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootLogicalIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootLogicalIdentity& newInstance, const OpenDRIM_BootLogicalIdentity& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootLogicalIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootLogicalIdentity& instance, string& errorMessage); int Boot_OpenDRIM_BootLogicalIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootLogicalIdentity& instance, string& errorMessage); int Boot_OpenDRIM_BootLogicalIdentity_associatorSystemElementToSameElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& SystemElement_instance, const char** properties, vector& SameElement_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootLogicalIdentity_associatorSameElementToSystemElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& SameElement_instance, const char** properties, vector& SystemElement_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootLogicalIdentity_referenceSystemElementToSameElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& SystemElement_instance, const vector& SameElement_instances, vector& OpenDRIM_BootLogicalIdentity_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootLogicalIdentity_referenceSameElementToSystemElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& SameElement_instance, const vector& SystemElement_instances, vector& OpenDRIM_BootLogicalIdentity_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootLogicalIdentity_populate(OpenDRIM_BootLogicalIdentity& instance, string& errorMessage); #endif /*OPENDRIM_BOOTLOGICALIDENTITYACCESS_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootLogicalIdentity/OpenDRIM_BootLogicalIdentityAccess.cpp0000644000175000017500000002432311400666205033251 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_BootLogicalIdentityAccess.h" int Boot_OpenDRIM_BootLogicalIdentity_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(Boot_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootLogicalIdentity_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_ManagedElement_unload(errorMessage)); CF_assert(Boot_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootLogicalIdentity_isAssociated(const Instance& SystemElement, const Instance& SameElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int Boot_OpenDRIM_BootLogicalIdentity_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(Boot_OpenDRIM_BootLogicalIdentity_enumerateSystemElements(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(Boot_OpenDRIM_BootLogicalIdentity_enumerateSystemElements(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; Boot_OpenDRIM_BootLogicalIdentity_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), SystemElement_classnames[0], SameElement_classnames[0], SystemElement_role.c_str(), SameElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(Boot_OpenDRIM_BootLogicalIdentity_referenceSystemElementToSameElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootLogicalIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootLogicalIdentity& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath SystemElement_objectpath; instance.getSystemElement(SystemElement_objectpath); Instance SystemElement_instance; CF_assert(Boot_OpenDRIM_BootLogicalIdentity_getSystemElement(broker, ctx, SystemElement_objectpath, SystemElement_instance, NULL, errorMessage)); Objectpath SameElement_objectpath; instance.getSameElement(SameElement_objectpath); Instance SameElement_instance; CF_assert(Boot_OpenDRIM_BootLogicalIdentity_getSameElement(broker, ctx, SameElement_objectpath, SameElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Boot_OpenDRIM_BootLogicalIdentity_isAssociated(SystemElement_instance, SameElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Boot_OpenDRIM_BootLogicalIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootLogicalIdentity& newInstance, const OpenDRIM_BootLogicalIdentity& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootLogicalIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootLogicalIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootLogicalIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootLogicalIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootLogicalIdentity_associatorSystemElementToSameElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& SystemElement_instance, const char** properties, vector& SameElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector SameElement_instances; if (discriminant=="a") CF_assert(Boot_OpenDRIM_BootLogicalIdentity_enumerateSameElements(broker, ctx, SameElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootLogicalIdentity_enumerateSameElements(broker, ctx, SameElement_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(Boot_OpenDRIM_BootLogicalIdentity_enumerateSameElements(broker, ctx, SameElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& SystemElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector SystemElement_instances; if (discriminant=="a") CF_assert(Boot_OpenDRIM_BootLogicalIdentity_enumerateSystemElements(broker, ctx, SystemElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootLogicalIdentity_enumerateSystemElements(broker, ctx, SystemElement_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(Boot_OpenDRIM_BootLogicalIdentity_enumerateSystemElements(broker, ctx, SystemElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& SameElement_instances, vector& OpenDRIM_BootLogicalIdentity_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 < SameElement_instances.size(); i++) { OpenDRIM_BootLogicalIdentity instance; instance.setSystemElement(((Instance) SystemElement_instance).getObjectpath()); instance.setSameElement(((Instance) SameElement_instances[i]).getObjectpath()); OpenDRIM_BootLogicalIdentity_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootLogicalIdentity_referenceSameElementToSystemElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& SameElement_instance, const vector& SystemElement_instances, vector& OpenDRIM_BootLogicalIdentity_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 < SystemElement_instances.size(); i++) { OpenDRIM_BootLogicalIdentity instance; instance.setSystemElement(((Instance) SystemElement_instances[i]).getObjectpath()); instance.setSameElement(((Instance) SameElement_instance).getObjectpath()); OpenDRIM_BootLogicalIdentity_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootLogicalIdentity_populate(OpenDRIM_BootLogicalIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootLogicalIdentity/cmpiOpenDRIM_BootLogicalIdentity.h0000644000175000017500000000427511400666205032451 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_BOOTLOGICALIDENTITY_H_ #define CMPIOPENDRIM_BOOTLOGICALIDENTITY_H_ #include "OpenDRIM_BootLogicalIdentity.h" CMPIObjectPath* Boot_OpenDRIM_BootLogicalIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootLogicalIdentity& instance); CMPIInstance* Boot_OpenDRIM_BootLogicalIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootLogicalIdentity& instance); void Boot_OpenDRIM_BootLogicalIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootLogicalIdentity& instance); void Boot_OpenDRIM_BootLogicalIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootLogicalIdentity& instance); #endif /*CMPIOPENDRIM_BOOTLOGICALIDENTITY_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootLogicalIdentity/assocOpenDRIM_BootLogicalIdentity.h0000644000175000017500000000614511400666205032627 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_BOOTLOGICALIDENTITY_H_ #define ASSOCOPENDRIM_BOOTLOGICALIDENTITY_H_ #include "OpenDRIM_BootLogicalIdentityAccess.h" int Boot_OpenDRIM_BootLogicalIdentity_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 Boot_OpenDRIM_BootLogicalIdentity_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 Boot_OpenDRIM_BootLogicalIdentity_enumerateSystemElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootLogicalIdentity_getSystemElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootLogicalIdentity_enumerateSameElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootLogicalIdentity_getSameElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_BOOTLOGICALIDENTITY_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootLogicalIdentity/cmpiOpenDRIM_BootLogicalIdentity.cpp0000644000175000017500000000607111400666205033000 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootLogicalIdentity.h" CMPIObjectPath* Boot_OpenDRIM_BootLogicalIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootLogicalIdentity& instance) { _E_; Objectpath op(broker, OpenDRIM_BootLogicalIdentity_classnames[0], OpenDRIM_BootLogicalIdentity_NAMESPACE); if (!instance.SystemElement_isNULL) op.addKey("SystemElement", instance.SystemElement); if (!instance.SameElement_isNULL) op.addKey("SameElement", instance.SameElement); _L_; return op.getHdl(); } CMPIInstance* Boot_OpenDRIM_BootLogicalIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootLogicalIdentity& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_BootLogicalIdentity_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void Boot_OpenDRIM_BootLogicalIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootLogicalIdentity& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("SystemElement", instance.SystemElement) == OK) instance.SystemElement_isNULL = false; if (op.getKey("SameElement", instance.SameElement) == OK) instance.SameElement_isNULL = false; _L_; } void Boot_OpenDRIM_BootLogicalIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootLogicalIdentity& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("SystemElement", instance.SystemElement) == OK) instance.SystemElement_isNULL = false; if (inst.getProperty("SameElement", instance.SameElement) == OK) instance.SameElement_isNULL = false; _L_; } opendrim-lmp-boot-0.1.0~ppa/TODO0000644000175000017500000000010111400666205017165 0ustar guillaumeguillaumeTODO for Major.Minor.Revision ========================= // TODO opendrim-lmp-boot-0.1.0~ppa/INSTALL0000644000175000017500000000370211400666205017540 0ustar guillaumeguillaume --------------------------------------------------------- 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-boot-0.1.0~ppa/AUTHORS0000644000175000017500000000017711400666205017562 0ustar guillaumeguillaumeNodir Nazarov Shakhrom Rustamov Guillaume BOTTEX opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConformsToProfile/0000755000175000017500000000000011400666205024400 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConformsToProfile/OpenDRIM_BootConformsToProfileAccess.cpp0000644000175000017500000002514311400666205034126 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_BootConformsToProfileAccess.h" int Boot_OpenDRIM_BootConformsToProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_RegisteredProfile_load(broker, errorMessage)); CF_assert(Boot_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootConformsToProfile_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_RegisteredProfile_unload(errorMessage)); CF_assert(Boot_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootConformsToProfile_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 Boot_OpenDRIM_BootConformsToProfile_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(Boot_OpenDRIM_BootConformsToProfile_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(Boot_OpenDRIM_BootConformsToProfile_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; Boot_OpenDRIM_BootConformsToProfile_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(Boot_OpenDRIM_BootConformsToProfile_referenceConformantStandardToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootConformsToProfile& 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(Boot_OpenDRIM_BootConformsToProfile_getConformantStandard(broker, ctx, ConformantStandard_objectpath, ConformantStandard_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(Boot_OpenDRIM_BootConformsToProfile_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Boot_OpenDRIM_BootConformsToProfile_isAssociated(ConformantStandard_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Boot_OpenDRIM_BootConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConformsToProfile& newInstance, const OpenDRIM_BootConformsToProfile& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConformsToProfile_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(Boot_OpenDRIM_BootConformsToProfile_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootConformsToProfile_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(Boot_OpenDRIM_BootConformsToProfile_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(Boot_OpenDRIM_BootConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootConformsToProfile_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(Boot_OpenDRIM_BootConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_BootConformsToProfile_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_BootConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); OpenDRIM_BootConformsToProfile_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_BootConformsToProfile_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_BootConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); OpenDRIM_BootConformsToProfile_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootConformsToProfile_populate(OpenDRIM_BootConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConformsToProfile/Makefile.am0000644000175000017500000000471511400666205026443 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_BootConformsToProfileProvider.la libcmpiBoot_OpenDRIM_BootConformsToProfileProvider_la_SOURCES = OpenDRIM_BootConformsToProfileAccess.cpp OpenDRIM_BootConformsToProfileProvider.cpp cmpiOpenDRIM_BootConformsToProfile.cpp assocOpenDRIM_BootConformsToProfile.cpp # May have to be adjusted for direct invocation libcmpiBoot_OpenDRIM_BootConformsToProfileProvider_la_CPPFLAGS = -I../CIM_RegisteredProfile -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiBoot_OpenDRIM_BootConformsToProfileProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la #../CIM_RegisteredProfile/libcmpiBoot_CIM_RegisteredProfileProvider.la ../CIM_ManagedElement/libcmpiBoot_CIM_ManagedElementProvider.la libcmpiBoot_OpenDRIM_BootConformsToProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BootConformsToProfile.h OpenDRIM_BootConformsToProfile.h OpenDRIM_BootConformsToProfileAccess.h opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConformsToProfile/cmpiOpenDRIM_BootConformsToProfile.cpp0000644000175000017500000000623111400666205033652 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConformsToProfile.h" CMPIObjectPath* Boot_OpenDRIM_BootConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootConformsToProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_BootConformsToProfile_classnames[0], OpenDRIM_BootConformsToProfile_NAMESPACE); if (!instance.ConformantStandard_isNULL) op.addKey("ConformantStandard", instance.ConformantStandard); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); _L_; return op.getHdl(); } CMPIInstance* Boot_OpenDRIM_BootConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootConformsToProfile& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_BootConformsToProfile_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void Boot_OpenDRIM_BootConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootConformsToProfile& 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 Boot_OpenDRIM_BootConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootConformsToProfile& 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_; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConformsToProfile/assocOpenDRIM_BootConformsToProfile.h0000644000175000017500000000621111400666205033475 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_BOOTCONFORMSTOPROFILE_H_ #define ASSOCOPENDRIM_BOOTCONFORMSTOPROFILE_H_ #include "OpenDRIM_BootConformsToProfileAccess.h" int Boot_OpenDRIM_BootConformsToProfile_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 Boot_OpenDRIM_BootConformsToProfile_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 Boot_OpenDRIM_BootConformsToProfile_enumerateConformantStandards(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootConformsToProfile_getConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootConformsToProfile_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootConformsToProfile_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_BOOTCONFORMSTOPROFILE_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConformsToProfile/assocOpenDRIM_BootConformsToProfile.cpp0000644000175000017500000002125011400666205034030 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_BootConformsToProfile.h" int Boot_OpenDRIM_BootConformsToProfile_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 = Boot_OpenDRIM_BootConformsToProfile_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(Boot_OpenDRIM_BootConformsToProfile_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(Boot_OpenDRIM_BootConformsToProfile_associatorManagedElementToConformantStandard(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootConformsToProfile_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(Boot_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_RegisteredProfile_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootConformsToProfile_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; Boot_CIM_RegisteredProfile_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_RegisteredProfile_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_RegisteredProfile_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Boot_OpenDRIM_BootConformsToProfile_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(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootConformsToProfile_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; Boot_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConformsToProfile/OpenDRIM_BootConformsToProfileProvider.cppopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConformsToProfile/OpenDRIM_BootConformsToProfileProvider.cp0000644000175000017500000004203011400666205034331 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConformsToProfile.h" #include "OpenDRIM_BootConformsToProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_BootConformsToProfileProviderSetInstance Boot_OpenDRIM_BootConformsToProfileProviderModifyInstance #endif int Boot_OpenDRIM_BootConformsToProfile_init(const CMPIBroker* broker); int Boot_OpenDRIM_BootConformsToProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_BootConformsToProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConformsToProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_BootConformsToProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootConformsToProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConformsToProfileProviderEnumInstances(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 = Boot_OpenDRIM_BootConformsToProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_BootConformsToProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConformsToProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConformsToProfile instance; Boot_OpenDRIM_BootConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConformsToProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_BootConformsToProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConformsToProfileProviderSetInstance(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_BootConformsToProfile newInstance, oldInstance; Boot_OpenDRIM_BootConformsToProfile_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_BootConformsToProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConformsToProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConformsToProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConformsToProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConformsToProfile instance; Boot_OpenDRIM_BootConformsToProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConformsToProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_BootConformsToProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConformsToProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConformsToProfile instance; Boot_OpenDRIM_BootConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConformsToProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConformsToProfileProviderExecQuery(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 Boot_OpenDRIM_BootConformsToProfileProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConformsToProfileProviderAssociatorNames(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 = Boot_OpenDRIM_BootConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_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 Boot_OpenDRIM_BootConformsToProfileProviderAssociators(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 = Boot_OpenDRIM_BootConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_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 Boot_OpenDRIM_BootConformsToProfileProviderReferenceNames(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 = Boot_OpenDRIM_BootConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Boot_OpenDRIM_BootConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootConformsToProfile_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConformsToProfileProviderReferences(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 = Boot_OpenDRIM_BootConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Boot_OpenDRIM_BootConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Boot_OpenDRIM_BootConformsToProfile_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Boot_OpenDRIM_BootConformsToProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootConformsToProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootConformsToProfile_init FAILED: " + (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_BootConformsToProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootConformsToProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootConformsToProfile_unload FAILED: " + (string) OpenDRIM_BootConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_BootConformsToProfile_INIT if (Boot_OpenDRIM_BootConformsToProfile_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_BootConformsToProfileProvider, Boot_OpenDRIM_BootConformsToProfileProvider, _broker, Boot_OpenDRIM_BootConformsToProfile_INIT); CMAssociationMIStub(Boot_OpenDRIM_BootConformsToProfileProvider, Boot_OpenDRIM_BootConformsToProfileProvider, _broker, Boot_OpenDRIM_BootConformsToProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConformsToProfile/OpenDRIM_BootConformsToProfile.h0000644000175000017500000000721011400666205032444 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTCONFORMSTOPROFILE_H_ #define OPENDRIM_BOOTCONFORMSTOPROFILE_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_BootConformsToProfile_classnames[] = {"OpenDRIM_BootConformsToProfile"}; static string OpenDRIM_BootConformsToProfile_NAMESPACE = _INTEROP_NAMESPACE; const static string ConformantStandard_role = "ConformantStandard"; const static char* ConformantStandard_classnames[] = {"OpenDRIM_RegisteredBootProfile"}; const static string ConformantStandard_NAMESPACE = _INTEROP_NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_BootService"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_BootConformsToProfile { public: Objectpath ConformantStandard; bool ConformantStandard_isNULL; Objectpath ManagedElement; bool ManagedElement_isNULL; OpenDRIM_BootConformsToProfile() { ConformantStandard_isNULL = true; ManagedElement_isNULL = true; } ~OpenDRIM_BootConformsToProfile() {} 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_BOOTCONFORMSTOPROFILE_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConformsToProfile/OpenDRIM_BootConformsToProfileAccess.h0000644000175000017500000001057411400666205033575 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTCONFORMSTOPROFILEACCESS_H_ #define OPENDRIM_BOOTCONFORMSTOPROFILEACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_BootConformsToProfile.h" #include "assocOpenDRIM_BootConformsToProfile.h" int Boot_OpenDRIM_BootConformsToProfile_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_BootConformsToProfile_unload(string& errorMessage); int Boot_OpenDRIM_BootConformsToProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootConformsToProfile& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConformsToProfile& newInstance, const OpenDRIM_BootConformsToProfile& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConformsToProfile& instance, string& errorMessage); int Boot_OpenDRIM_BootConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConformsToProfile& instance, string& errorMessage); int Boot_OpenDRIM_BootConformsToProfile_associatorConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConformsToProfile_associatorManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& ConformantStandard_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConformsToProfile_referenceConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const vector& ManagedElement_instances, vector& OpenDRIM_BootConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_BootConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConformsToProfile_populate(OpenDRIM_BootConformsToProfile& instance, string& errorMessage); #endif /*OPENDRIM_BOOTCONFORMSTOPROFILEACCESS_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConformsToProfile/cmpiOpenDRIM_BootConformsToProfile.h0000644000175000017500000000432511400666205033321 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_BOOTCONFORMSTOPROFILE_H_ #define CMPIOPENDRIM_BOOTCONFORMSTOPROFILE_H_ #include "OpenDRIM_BootConformsToProfile.h" CMPIObjectPath* Boot_OpenDRIM_BootConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootConformsToProfile& instance); CMPIInstance* Boot_OpenDRIM_BootConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootConformsToProfile& instance); void Boot_OpenDRIM_BootConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootConformsToProfile& instance); void Boot_OpenDRIM_BootConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootConformsToProfile& instance); #endif /*CMPIOPENDRIM_BOOTCONFORMSTOPROFILE_H_*/ opendrim-lmp-boot-0.1.0~ppa/packaging/0000755000175000017500000000000011400666205020431 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/packaging/opendrim-lmp-boot.spec0000644000175000017500000000516011400666205024653 0ustar guillaumeguillaume#%///////////////////////////////////////////////////////////////////////////// # # Boot RPM spec file # #%///////////////////////////////////////////////////////////////////////////// %define packageVersion 1 Version: %{version} Release: %{packageVersion}%{?dist} Vendor: OpenDRIM Summary: OpenDRIM Boot Provider Name: opendrim-lmp-boot 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.2 Requires: tog-pegasus, libopendrim >= 1.1.2 %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 Boot %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-boot-0.1.0~ppa/packaging/debian/0000755000175000017500000000000011404346772021663 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/packaging/debian/postrm0000644000175000017500000000367311404346772023143 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_BootConformsToProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BootCapabilities rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BootOrderedComponent rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BootConcreteDependency rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_RegisteredBootProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BootConfigSetting rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BootHostedService rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BootSourceSetting rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BootConfigSettingData rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BootServiceCapabilities rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BootService rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BootLogicalIdentity rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BootSettingData rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_ServiceAffectsBoot rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BootConcreteComponent ;; 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-boot-0.1.0~ppa/packaging/debian/source/0000755000175000017500000000000011400666270023155 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/packaging/debian/source/format0000644000175000017500000000001411400666270024363 0ustar guillaumeguillaume3.0 (quilt) opendrim-lmp-boot-0.1.0~ppa/packaging/debian/copyright0000644000175000017500000000275211400666205023614 0ustar guillaumeguillaumeThis package was debianized by Guillaume BOTTEX on Tue, 23 Feb 2010 11:47:19 +0900. It was downloaded from http://opendrim.sourceforge.net/ Upstream Authors: Nodir Nazarov Guillaume BOTTEX Copyright: Copyright (C) 2009 ETRI Nodir Nazarov Copyright (C) 2010 ETRI Guillaume BOTTEX License: Linux Management Providers (LMP), Boot 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 2010, Guillaume BOTTEX and is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'. opendrim-lmp-boot-0.1.0~ppa/packaging/debian/control0000644000175000017500000000124011404346762023262 0ustar guillaumeguillaumeSource: opendrim-lmp-boot 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-boot Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, sfcb, libopendrim0 (>= 1.1.3) Description: OpenDRIM Boot provider Provides information about the computer system boot configurations. . Compliant with the DMTF Boot Control Profile v1.0.1 (DSP1012). opendrim-lmp-boot-0.1.0~ppa/packaging/debian/prerm0000644000175000017500000000241011400666205022720 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-boot VERSION=`cat /usr/share/doc/opendrim-lmp-boot/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=Boot $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-boot-0.1.0~ppa/packaging/debian/changelog0000644000175000017500000000024211404346747023535 0ustar guillaumeguillaumeopendrim-lmp-boot (0.1.0-0ubuntu1) lucid; urgency=low * Initial release -- Guillaume BOTTEX Fri, 11 Jun 2010 14:47:00 +0900 opendrim-lmp-boot-0.1.0~ppa/packaging/debian/postinst0000644000175000017500000000256511400666205023471 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-boot VERSION=`cat /usr/share/doc/opendrim-lmp-boot/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=Boot $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-boot-0.1.0~ppa/packaging/debian/install0000644000175000017500000000004711400666205023245 0ustar guillaumeguillaumeusr/lib/cmpi/*.so usr/share/OpenDRIM/* opendrim-lmp-boot-0.1.0~ppa/packaging/debian/rules0000755000175000017500000000353611400666205022742 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-boot 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-boot.sgml > opendrim-lmp-boot.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-boot-0.1.0~ppa/packaging/debian/docs0000644000175000017500000000003111400666205022520 0ustar guillaumeguillaumeNEWS README TODO VERSION opendrim-lmp-boot-0.1.0~ppa/packaging/debian/compat0000644000175000017500000000000211400666205023051 0ustar guillaumeguillaume5 opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootService/0000755000175000017500000000000011400666205022366 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootService/Makefile.am0000644000175000017500000000372211400666205024426 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_BootServiceProvider.la libcmpiBoot_OpenDRIM_BootServiceProvider_la_SOURCES = OpenDRIM_BootServiceAccess.cpp OpenDRIM_BootServiceProvider.cpp cmpiOpenDRIM_BootService.cpp libcmpiBoot_OpenDRIM_BootServiceProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la libcmpiBoot_OpenDRIM_BootServiceProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BootService.h OpenDRIM_BootService.h OpenDRIM_BootServiceAccess.h opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootService/OpenDRIM_BootServiceAccess.cpp0000644000175000017500000001412711400666205030102 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_BootServiceAccess.h" const string systemCreationClassName = "OpenDRIM_ComputerSystem"; const string creationClassName = "OpenDRIM_BootService"; const string Name = "/usr/sbin/grub"; string systemName; int Boot_OpenDRIM_BootService_load(const CMPIBroker* broker, string& errorMessage) { _E_; CF_assert(CF_getSystemName(systemName, errorMessage)); _L_; return OK; } int Boot_OpenDRIM_BootService_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int Boot_OpenDRIM_BootService_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; if(!CF_isExist(Name)) return OK; OpenDRIM_BootService instance; instance.setSystemCreationClassName(systemCreationClassName); instance.setSystemName(systemName); instance.setCreationClassName(creationClassName); instance.setName(Name); if(discriminant=="ei") CF_assert(Boot_OpenDRIM_BootService_populate(instance, errorMessage)); result.push_back(instance); _L_; return OK; } int Boot_OpenDRIM_BootService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootService& instance, const char** properties, string& errorMessage) { _E_; if (instance.SystemCreationClassName != systemCreationClassName || instance.CreationClassName != creationClassName || instance.SystemName != systemName || instance.Name != Name || !CF_isExist(Name)) { errorMessage = "Invalid path"; return NOT_FOUND; } CF_assert(Boot_OpenDRIM_BootService_populate(instance, errorMessage)); _L_; return OK; } int Boot_OpenDRIM_BootService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& newInstance, const OpenDRIM_BootService& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootService_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, unsigned int& returnValue, const OpenDRIM_BootService_RequestStateChange_In& in, OpenDRIM_BootService_RequestStateChange_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootService_StartService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, unsigned int& returnValue, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootService_StopService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, unsigned int& returnValue, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootService_CreateBootConfigSetting(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, unsigned int& returnValue, const OpenDRIM_BootService_CreateBootConfigSetting_In& in, OpenDRIM_BootService_CreateBootConfigSetting_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootService_SetBootConfigRole(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, unsigned int& returnValue, const OpenDRIM_BootService_SetBootConfigRole_In& in, OpenDRIM_BootService_SetBootConfigRole_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootService_SetBootConfigUsage(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, unsigned int& returnValue, const OpenDRIM_BootService_SetBootConfigUsage_In& in, OpenDRIM_BootService_SetBootConfigUsage_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootService_ApplyBootConfigSetting(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, unsigned int& returnValue, const OpenDRIM_BootService_ApplyBootConfigSetting_In& in, OpenDRIM_BootService_ApplyBootConfigSetting_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootService_populate(OpenDRIM_BootService& instance, string& errorMessage) { _E_; string elementName; CF_getWhatisFL("grub", elementName, errorMessage);; instance.setElementName(elementName); _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootService/OpenDRIM_BootService.h0000644000175000017500000005300311400666205026421 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTSERVICE_H_ #define OPENDRIM_BOOTSERVICE_H_ #include const static char* OpenDRIM_BootService_classnames[] = {"OpenDRIM_BootService"}; static string OpenDRIM_BootService_NAMESPACE = _NAMESPACE; class OpenDRIM_BootService { public: string InstanceID; bool InstanceID_isNULL; string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstallDate; bool InstallDate_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_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 Name; bool Name_isNULL; string PrimaryOwnerName; bool PrimaryOwnerName_isNULL; string PrimaryOwnerContact; bool PrimaryOwnerContact_isNULL; string StartMode; bool StartMode_isNULL; bool Started; bool Started_isNULL; OpenDRIM_BootService() { InstanceID_isNULL = true; Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstallDate_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; CommunicationStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; PrimaryStatus_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; Name_isNULL = true; PrimaryOwnerName_isNULL = true; PrimaryOwnerContact_isNULL = true; StartMode_isNULL = true; Started_isNULL = true; } ~OpenDRIM_BootService() {} string getKeys() const { return CF_toLowCase(".SystemCreationClassName=\"" + CF_quoteString(SystemCreationClassName) + "\""".SystemName=\"" + CF_quoteString(SystemName) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""".Name=\"" + CF_quoteString(Name) + "\""); } 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 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 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 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 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 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 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 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 getPrimaryOwnerName(string& value) const { if (PrimaryOwnerName_isNULL==true) return NOT_FOUND; value = PrimaryOwnerName; return OK; } int setPrimaryOwnerName(const string& newValue) { PrimaryOwnerName = newValue; PrimaryOwnerName_isNULL = false; return OK; } int getPrimaryOwnerContact(string& value) const { if (PrimaryOwnerContact_isNULL==true) return NOT_FOUND; value = PrimaryOwnerContact; return OK; } int setPrimaryOwnerContact(const string& newValue) { PrimaryOwnerContact = newValue; PrimaryOwnerContact_isNULL = false; return OK; } int getStartMode(string& value) const { if (StartMode_isNULL==true) return NOT_FOUND; value = StartMode; return OK; } int setStartMode(const string& newValue) { StartMode = newValue; StartMode_isNULL = false; return OK; } int getStarted(bool& value) const { if (Started_isNULL==true) return NOT_FOUND; value = Started; return OK; } int setStarted(const bool& newValue) { Started = newValue; Started_isNULL = false; return OK; } }; class OpenDRIM_BootService_RequestStateChange_In { public: unsigned short RequestedState; bool RequestedState_isNULL; Objectpath Job; bool Job_isNULL; string TimeoutPeriod; bool TimeoutPeriod_isNULL; OpenDRIM_BootService_RequestStateChange_In() { RequestedState_isNULL = true; Job_isNULL = true; TimeoutPeriod_isNULL = true; } ~OpenDRIM_BootService_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_BootService_RequestStateChange_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_BootService_RequestStateChange_Out() { Job_isNULL = true; } ~OpenDRIM_BootService_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_BootService_CreateBootConfigSetting_In { public: Objectpath StartingBootConfig; bool StartingBootConfig_isNULL; Objectpath ScopingComputerSystem; bool ScopingComputerSystem_isNULL; Objectpath NewBootConfig; bool NewBootConfig_isNULL; Objectpath Job; bool Job_isNULL; OpenDRIM_BootService_CreateBootConfigSetting_In() { StartingBootConfig_isNULL = true; ScopingComputerSystem_isNULL = true; NewBootConfig_isNULL = true; Job_isNULL = true; } ~OpenDRIM_BootService_CreateBootConfigSetting_In() {} int getStartingBootConfig(Objectpath& value) const { if (StartingBootConfig_isNULL == true) return NOT_FOUND; value = StartingBootConfig; return OK; } int setStartingBootConfig(const Objectpath& newValue) { StartingBootConfig = newValue; StartingBootConfig_isNULL = false; return OK; } int getScopingComputerSystem(Objectpath& value) const { if (ScopingComputerSystem_isNULL == true) return NOT_FOUND; value = ScopingComputerSystem; return OK; } int setScopingComputerSystem(const Objectpath& newValue) { ScopingComputerSystem = newValue; ScopingComputerSystem_isNULL = false; return OK; } int getNewBootConfig(Objectpath& value) const { if (NewBootConfig_isNULL == true) return NOT_FOUND; value = NewBootConfig; return OK; } int setNewBootConfig(const Objectpath& newValue) { NewBootConfig = newValue; NewBootConfig_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; } }; class OpenDRIM_BootService_CreateBootConfigSetting_Out { public: Objectpath NewBootConfig; bool NewBootConfig_isNULL; Objectpath Job; bool Job_isNULL; OpenDRIM_BootService_CreateBootConfigSetting_Out() { NewBootConfig_isNULL = true; Job_isNULL = true; } ~OpenDRIM_BootService_CreateBootConfigSetting_Out() {} int getNewBootConfig(Objectpath& value) const { if (NewBootConfig_isNULL == true) return NOT_FOUND; value = NewBootConfig; return OK; } int setNewBootConfig(const Objectpath& newValue) { NewBootConfig = newValue; NewBootConfig_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; } }; class OpenDRIM_BootService_SetBootConfigRole_In { public: Objectpath BootConfigSetting; bool BootConfigSetting_isNULL; unsigned short Role; bool Role_isNULL; Objectpath Job; bool Job_isNULL; OpenDRIM_BootService_SetBootConfigRole_In() { BootConfigSetting_isNULL = true; Role_isNULL = true; Job_isNULL = true; } ~OpenDRIM_BootService_SetBootConfigRole_In() {} int getBootConfigSetting(Objectpath& value) const { if (BootConfigSetting_isNULL == true) return NOT_FOUND; value = BootConfigSetting; return OK; } int setBootConfigSetting(const Objectpath& newValue) { BootConfigSetting = newValue; BootConfigSetting_isNULL = false; return OK; } int getRole(unsigned short& value) const { if (Role_isNULL == true) return NOT_FOUND; value = Role; return OK; } int setRole(const unsigned short& newValue) { Role = newValue; Role_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; } }; class OpenDRIM_BootService_SetBootConfigRole_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_BootService_SetBootConfigRole_Out() { Job_isNULL = true; } ~OpenDRIM_BootService_SetBootConfigRole_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_BootService_SetBootConfigUsage_In { public: Objectpath BootConfigSetting; bool BootConfigSetting_isNULL; Objectpath ScopingComputerSystem; bool ScopingComputerSystem_isNULL; unsigned short Role; bool Role_isNULL; Objectpath Job; bool Job_isNULL; OpenDRIM_BootService_SetBootConfigUsage_In() { BootConfigSetting_isNULL = true; ScopingComputerSystem_isNULL = true; Role_isNULL = true; Job_isNULL = true; } ~OpenDRIM_BootService_SetBootConfigUsage_In() {} int getBootConfigSetting(Objectpath& value) const { if (BootConfigSetting_isNULL == true) return NOT_FOUND; value = BootConfigSetting; return OK; } int setBootConfigSetting(const Objectpath& newValue) { BootConfigSetting = newValue; BootConfigSetting_isNULL = false; return OK; } int getScopingComputerSystem(Objectpath& value) const { if (ScopingComputerSystem_isNULL == true) return NOT_FOUND; value = ScopingComputerSystem; return OK; } int setScopingComputerSystem(const Objectpath& newValue) { ScopingComputerSystem = newValue; ScopingComputerSystem_isNULL = false; return OK; } int getRole(unsigned short& value) const { if (Role_isNULL == true) return NOT_FOUND; value = Role; return OK; } int setRole(const unsigned short& newValue) { Role = newValue; Role_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; } }; class OpenDRIM_BootService_SetBootConfigUsage_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_BootService_SetBootConfigUsage_Out() { Job_isNULL = true; } ~OpenDRIM_BootService_SetBootConfigUsage_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_BootService_ApplyBootConfigSetting_In { public: Objectpath ScopingComputerSystem; bool ScopingComputerSystem_isNULL; Objectpath ApplyBootConfig; bool ApplyBootConfig_isNULL; Objectpath Job; bool Job_isNULL; OpenDRIM_BootService_ApplyBootConfigSetting_In() { ScopingComputerSystem_isNULL = true; ApplyBootConfig_isNULL = true; Job_isNULL = true; } ~OpenDRIM_BootService_ApplyBootConfigSetting_In() {} int getScopingComputerSystem(Objectpath& value) const { if (ScopingComputerSystem_isNULL == true) return NOT_FOUND; value = ScopingComputerSystem; return OK; } int setScopingComputerSystem(const Objectpath& newValue) { ScopingComputerSystem = newValue; ScopingComputerSystem_isNULL = false; return OK; } int getApplyBootConfig(Objectpath& value) const { if (ApplyBootConfig_isNULL == true) return NOT_FOUND; value = ApplyBootConfig; return OK; } int setApplyBootConfig(const Objectpath& newValue) { ApplyBootConfig = newValue; ApplyBootConfig_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; } }; class OpenDRIM_BootService_ApplyBootConfigSetting_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_BootService_ApplyBootConfigSetting_Out() { Job_isNULL = true; } ~OpenDRIM_BootService_ApplyBootConfigSetting_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_BOOTSERVICE_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootService/cmpiOpenDRIM_BootService.h0000644000175000017500000000672111400666205027277 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_BOOTSERVICE_H_ #define CMPIOPENDRIM_BOOTSERVICE_H_ #include "OpenDRIM_BootService.h" CMPIObjectPath* Boot_OpenDRIM_BootService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootService& instance); CMPIInstance* Boot_OpenDRIM_BootService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootService& instance); void Boot_OpenDRIM_BootService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootService& instance); void Boot_OpenDRIM_BootService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootService& instance); void Boot_OpenDRIM_BootService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BootService_RequestStateChange_In& args); void Boot_OpenDRIM_BootService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BootService_RequestStateChange_Out& args); void Boot_OpenDRIM_BootService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BootService_CreateBootConfigSetting_In& args); void Boot_OpenDRIM_BootService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BootService_CreateBootConfigSetting_Out& args); void Boot_OpenDRIM_BootService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BootService_SetBootConfigRole_In& args); void Boot_OpenDRIM_BootService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BootService_SetBootConfigRole_Out& args); void Boot_OpenDRIM_BootService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BootService_SetBootConfigUsage_In& args); void Boot_OpenDRIM_BootService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BootService_SetBootConfigUsage_Out& args); void Boot_OpenDRIM_BootService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BootService_ApplyBootConfigSetting_In& args); void Boot_OpenDRIM_BootService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BootService_ApplyBootConfigSetting_Out& args); #endif /*CMPIOPENDRIM_BOOTSERVICE_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootService/OpenDRIM_BootServiceProvider.cpp0000644000175000017500000004157311400666205030500 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootService.h" #include "OpenDRIM_BootServiceAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_BootServiceProviderSetInstance Boot_OpenDRIM_BootServiceProviderModifyInstance #endif int Boot_OpenDRIM_BootService_init(const CMPIBroker* broker); int Boot_OpenDRIM_BootService_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_BootServiceProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_BootService_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootService_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceProviderEnumInstances(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 = Boot_OpenDRIM_BootService_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_BootService_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootService instance; Boot_OpenDRIM_BootService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootService_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_BootService_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceProviderSetInstance(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_BootService newInstance, oldInstance; Boot_OpenDRIM_BootService_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_BootService_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_BootService_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootService_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootService instance; Boot_OpenDRIM_BootService_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootService_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_BootService_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootService instance; Boot_OpenDRIM_BootService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootService_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceProviderExecQuery(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 Boot_OpenDRIM_BootServiceProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootServiceProviderInvokeMethod(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_BootService instance; Boot_OpenDRIM_BootService_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"SystemCreationClassName", "Name", "SystemName", "CreationClassName"}; int errorCode = Boot_OpenDRIM_BootService_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="RequestStateChange") { unsigned int returnValue; OpenDRIM_BootService_RequestStateChange_In inArgs; Boot_OpenDRIM_BootService_toCPP(_broker, in, inArgs); OpenDRIM_BootService_RequestStateChange_Out outArgs; errorCode = Boot_OpenDRIM_BootService_RequestStateChange(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } Boot_OpenDRIM_BootService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="StartService") { unsigned int returnValue; errorCode = Boot_OpenDRIM_BootService_StartService(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_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 =="StopService") { unsigned int returnValue; errorCode = Boot_OpenDRIM_BootService_StopService(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_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 =="CreateBootConfigSetting") { unsigned int returnValue; OpenDRIM_BootService_CreateBootConfigSetting_In inArgs; Boot_OpenDRIM_BootService_toCPP(_broker, in, inArgs); OpenDRIM_BootService_CreateBootConfigSetting_Out outArgs; errorCode = Boot_OpenDRIM_BootService_CreateBootConfigSetting(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } Boot_OpenDRIM_BootService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="SetBootConfigRole") { unsigned int returnValue; OpenDRIM_BootService_SetBootConfigRole_In inArgs; Boot_OpenDRIM_BootService_toCPP(_broker, in, inArgs); OpenDRIM_BootService_SetBootConfigRole_Out outArgs; errorCode = Boot_OpenDRIM_BootService_SetBootConfigRole(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } Boot_OpenDRIM_BootService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="SetBootConfigUsage") { unsigned int returnValue; OpenDRIM_BootService_SetBootConfigUsage_In inArgs; Boot_OpenDRIM_BootService_toCPP(_broker, in, inArgs); OpenDRIM_BootService_SetBootConfigUsage_Out outArgs; errorCode = Boot_OpenDRIM_BootService_SetBootConfigUsage(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } Boot_OpenDRIM_BootService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="ApplyBootConfigSetting") { unsigned int returnValue; OpenDRIM_BootService_ApplyBootConfigSetting_In inArgs; Boot_OpenDRIM_BootService_toCPP(_broker, in, inArgs); OpenDRIM_BootService_ApplyBootConfigSetting_Out outArgs; errorCode = Boot_OpenDRIM_BootService_ApplyBootConfigSetting(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } Boot_OpenDRIM_BootService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else { errorMessage = (string) OpenDRIM_BootService_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 Boot_OpenDRIM_BootService_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootService_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootService_init FAILED: " + (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_BootService_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootService_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootService_unload FAILED: " + (string) OpenDRIM_BootService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_BootService_INIT if (Boot_OpenDRIM_BootService_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_BootServiceProvider, Boot_OpenDRIM_BootServiceProvider, _broker, Boot_OpenDRIM_BootService_INIT); CMMethodMIStub(Boot_OpenDRIM_BootServiceProvider, Boot_OpenDRIM_BootServiceProvider, _broker, Boot_OpenDRIM_BootService_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootService/cmpiOpenDRIM_BootService.cpp0000644000175000017500000003462311400666205027634 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootService.h" CMPIObjectPath* Boot_OpenDRIM_BootService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootService& instance) { _E_; Objectpath op(broker, OpenDRIM_BootService_classnames[0], OpenDRIM_BootService_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* Boot_OpenDRIM_BootService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootService& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_BootService_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.InstanceID_isNULL) ci.setProperty("InstanceID", instance.InstanceID); 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.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.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); 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.PrimaryOwnerName_isNULL) ci.setProperty("PrimaryOwnerName", instance.PrimaryOwnerName); if (!instance.PrimaryOwnerContact_isNULL) ci.setProperty("PrimaryOwnerContact", instance.PrimaryOwnerContact); if (!instance.StartMode_isNULL) ci.setProperty("StartMode", instance.StartMode); if (!instance.Started_isNULL) ci.setProperty("Started", instance.Started); _L_; return ci.getHdl(); } void Boot_OpenDRIM_BootService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootService& 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 Boot_OpenDRIM_BootService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootService& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; 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("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("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_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("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_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("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("PrimaryOwnerName", instance.PrimaryOwnerName) == OK) instance.PrimaryOwnerName_isNULL = false; if (inst.getProperty("PrimaryOwnerContact", instance.PrimaryOwnerContact) == OK) instance.PrimaryOwnerContact_isNULL = false; if (inst.getProperty("StartMode", instance.StartMode) == OK) instance.StartMode_isNULL = false; if (inst.getProperty("Started", instance.Started) == OK) instance.Started_isNULL = false; _L_; } void Boot_OpenDRIM_BootService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BootService_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 Boot_OpenDRIM_BootService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BootService_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 Boot_OpenDRIM_BootService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BootService_CreateBootConfigSetting_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath StartingBootConfig; data = in->ft->getArg(in, "StartingBootConfig", &rc); if (rc.rc == OK) { CT_ToC(broker, data, StartingBootConfig); args.setStartingBootConfig(StartingBootConfig); } Objectpath ScopingComputerSystem; data = in->ft->getArg(in, "ScopingComputerSystem", &rc); if (rc.rc == OK) { CT_ToC(broker, data, ScopingComputerSystem); args.setScopingComputerSystem(ScopingComputerSystem); } Objectpath NewBootConfig; data = in->ft->getArg(in, "NewBootConfig", &rc); if (rc.rc == OK) { CT_ToC(broker, data, NewBootConfig); args.setNewBootConfig(NewBootConfig); } Objectpath Job; data = in->ft->getArg(in, "Job", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Job); args.setJob(Job); } _L_; } void Boot_OpenDRIM_BootService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BootService_CreateBootConfigSetting_Out& args) { _E_; CMPIValue value; int errorMessage; Objectpath NewBootConfig; errorMessage = args.getNewBootConfig(NewBootConfig); if (errorMessage == OK) { value = CT_toCMPI(NewBootConfig); out->ft->addArg(out, "NewBootConfig", &value, CMPI_ref); } Objectpath Job; errorMessage = args.getJob(Job); if (errorMessage == OK) { value = CT_toCMPI(Job); out->ft->addArg(out, "Job", &value, CMPI_ref); } _L_; } void Boot_OpenDRIM_BootService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BootService_SetBootConfigRole_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath BootConfigSetting; data = in->ft->getArg(in, "BootConfigSetting", &rc); if (rc.rc == OK) { CT_ToC(broker, data, BootConfigSetting); args.setBootConfigSetting(BootConfigSetting); } unsigned short Role; data = in->ft->getArg(in, "Role", &rc); if (rc.rc == OK) { CT_ToC(data, Role); args.setRole(Role); } Objectpath Job; data = in->ft->getArg(in, "Job", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Job); args.setJob(Job); } _L_; } void Boot_OpenDRIM_BootService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BootService_SetBootConfigRole_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 Boot_OpenDRIM_BootService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BootService_SetBootConfigUsage_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath BootConfigSetting; data = in->ft->getArg(in, "BootConfigSetting", &rc); if (rc.rc == OK) { CT_ToC(broker, data, BootConfigSetting); args.setBootConfigSetting(BootConfigSetting); } Objectpath ScopingComputerSystem; data = in->ft->getArg(in, "ScopingComputerSystem", &rc); if (rc.rc == OK) { CT_ToC(broker, data, ScopingComputerSystem); args.setScopingComputerSystem(ScopingComputerSystem); } unsigned short Role; data = in->ft->getArg(in, "Role", &rc); if (rc.rc == OK) { CT_ToC(data, Role); args.setRole(Role); } Objectpath Job; data = in->ft->getArg(in, "Job", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Job); args.setJob(Job); } _L_; } void Boot_OpenDRIM_BootService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BootService_SetBootConfigUsage_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 Boot_OpenDRIM_BootService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BootService_ApplyBootConfigSetting_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath ScopingComputerSystem; data = in->ft->getArg(in, "ScopingComputerSystem", &rc); if (rc.rc == OK) { CT_ToC(broker, data, ScopingComputerSystem); args.setScopingComputerSystem(ScopingComputerSystem); } Objectpath ApplyBootConfig; data = in->ft->getArg(in, "ApplyBootConfig", &rc); if (rc.rc == OK) { CT_ToC(broker, data, ApplyBootConfig); args.setApplyBootConfig(ApplyBootConfig); } Objectpath Job; data = in->ft->getArg(in, "Job", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Job); args.setJob(Job); } _L_; } void Boot_OpenDRIM_BootService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BootService_ApplyBootConfigSetting_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_; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootService/OpenDRIM_BootServiceAccess.h0000644000175000017500000001111611400666205027542 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTSERVICEACCESS_H_ #define OPENDRIM_BOOTSERVICEACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_BootService.h" int Boot_OpenDRIM_BootService_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_BootService_unload(string& errorMessage); int Boot_OpenDRIM_BootService_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootService& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& newInstance, const OpenDRIM_BootService& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, string& errorMessage); int Boot_OpenDRIM_BootService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, string& errorMessage); int Boot_OpenDRIM_BootService_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, unsigned int& returnValue, const OpenDRIM_BootService_RequestStateChange_In& in, OpenDRIM_BootService_RequestStateChange_Out& out, string& errorMessage); int Boot_OpenDRIM_BootService_StartService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, unsigned int& returnValue, string& errorMessage); int Boot_OpenDRIM_BootService_StopService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, unsigned int& returnValue, string& errorMessage); int Boot_OpenDRIM_BootService_CreateBootConfigSetting(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, unsigned int& returnValue, const OpenDRIM_BootService_CreateBootConfigSetting_In& in, OpenDRIM_BootService_CreateBootConfigSetting_Out& out, string& errorMessage); int Boot_OpenDRIM_BootService_SetBootConfigRole(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, unsigned int& returnValue, const OpenDRIM_BootService_SetBootConfigRole_In& in, OpenDRIM_BootService_SetBootConfigRole_Out& out, string& errorMessage); int Boot_OpenDRIM_BootService_SetBootConfigUsage(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, unsigned int& returnValue, const OpenDRIM_BootService_SetBootConfigUsage_In& in, OpenDRIM_BootService_SetBootConfigUsage_Out& out, string& errorMessage); int Boot_OpenDRIM_BootService_ApplyBootConfigSetting(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootService& instance, unsigned int& returnValue, const OpenDRIM_BootService_ApplyBootConfigSetting_In& in, OpenDRIM_BootService_ApplyBootConfigSetting_Out& out, string& errorMessage); int Boot_OpenDRIM_BootService_populate(OpenDRIM_BootService& instance, string& errorMessage); #endif /*OPENDRIM_BOOTSERVICEACCESS_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootOrderedComponent/0000755000175000017500000000000011400666205024235 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootOrderedComponent/Makefile.am0000644000175000017500000000467011400666205026300 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_BootOrderedComponentProvider.la libcmpiBoot_OpenDRIM_BootOrderedComponentProvider_la_SOURCES = OpenDRIM_BootOrderedComponentAccess.cpp OpenDRIM_BootOrderedComponentProvider.cpp cmpiOpenDRIM_BootOrderedComponent.cpp assocOpenDRIM_BootOrderedComponent.cpp # May have to be adjusted for direct invocation libcmpiBoot_OpenDRIM_BootOrderedComponentProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiBoot_OpenDRIM_BootOrderedComponentProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la #../CIM_ManagedElement/libcmpiBoot_CIM_ManagedElementProvider.la ../CIM_ManagedElement/libcmpiBoot_CIM_ManagedElementProvider.la libcmpiBoot_OpenDRIM_BootOrderedComponentProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BootOrderedComponent.h OpenDRIM_BootOrderedComponent.h OpenDRIM_BootOrderedComponentAccess.h opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootOrderedComponent/cmpiOpenDRIM_BootOrderedComponent.cpp0000644000175000017500000000650311400666205033346 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootOrderedComponent.h" CMPIObjectPath* Boot_OpenDRIM_BootOrderedComponent_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootOrderedComponent& instance) { _E_; Objectpath op(broker, OpenDRIM_BootOrderedComponent_classnames[0], OpenDRIM_BootOrderedComponent_NAMESPACE); if (!instance.GroupComponent_isNULL) op.addKey("GroupComponent", instance.GroupComponent); if (!instance.PartComponent_isNULL) op.addKey("PartComponent", instance.PartComponent); _L_; return op.getHdl(); } CMPIInstance* Boot_OpenDRIM_BootOrderedComponent_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootOrderedComponent& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_BootOrderedComponent_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.AssignedSequence_isNULL) ci.setProperty("AssignedSequence", instance.AssignedSequence); _L_; return ci.getHdl(); } void Boot_OpenDRIM_BootOrderedComponent_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootOrderedComponent& 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 Boot_OpenDRIM_BootOrderedComponent_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootOrderedComponent& 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; if (inst.getProperty("AssignedSequence", instance.AssignedSequence) == OK) instance.AssignedSequence_isNULL = false; _L_; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootOrderedComponent/OpenDRIM_BootOrderedComponent.h0000644000175000017500000000766511400666205032154 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTORDEREDCOMPONENT_H_ #define OPENDRIM_BOOTORDEREDCOMPONENT_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_BootOrderedComponent_classnames[] = {"OpenDRIM_BootOrderedComponent"}; static string OpenDRIM_BootOrderedComponent_NAMESPACE = _NAMESPACE; const static string PartComponent_role = "PartComponent"; const static char* PartComponent_classnames[] = {"OpenDRIM_BootSourceSetting"}; const static string PartComponent_NAMESPACE = _NAMESPACE; const static string GroupComponent_role = "GroupComponent"; const static char* GroupComponent_classnames[] = {"OpenDRIM_BootConfigSetting"}; const static string GroupComponent_NAMESPACE = _NAMESPACE; class OpenDRIM_BootOrderedComponent { public: Objectpath GroupComponent; bool GroupComponent_isNULL; Objectpath PartComponent; bool PartComponent_isNULL; unsigned long long AssignedSequence; bool AssignedSequence_isNULL; OpenDRIM_BootOrderedComponent() { GroupComponent_isNULL = true; PartComponent_isNULL = true; AssignedSequence_isNULL = true; } ~OpenDRIM_BootOrderedComponent() {} 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; } int getAssignedSequence(unsigned long long& value) const { if (AssignedSequence_isNULL==true) return NOT_FOUND; value = AssignedSequence; return OK; } int setAssignedSequence(const unsigned long long& newValue) { AssignedSequence = newValue; AssignedSequence_isNULL = false; return OK; } }; #endif /*OPENDRIM_BOOTORDEREDCOMPONENT_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootOrderedComponent/OpenDRIM_BootOrderedComponentAccess.cpp0000644000175000017500000002533611400666205033624 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_BootOrderedComponentAccess.h" int Boot_OpenDRIM_BootOrderedComponent_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(Boot_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootOrderedComponent_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_ManagedElement_unload(errorMessage)); CF_assert(Boot_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootOrderedComponent_isAssociated(const Instance& PartComponent, const Instance& GroupComponent, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int Boot_OpenDRIM_BootOrderedComponent_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(Boot_OpenDRIM_BootOrderedComponent_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(Boot_OpenDRIM_BootOrderedComponent_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; Boot_OpenDRIM_BootOrderedComponent_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(Boot_OpenDRIM_BootOrderedComponent_referencePartComponentToGroupComponent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootOrderedComponent_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootOrderedComponent& 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(Boot_OpenDRIM_BootOrderedComponent_getPartComponent(broker, ctx, PartComponent_objectpath, PartComponent_instance, NULL, errorMessage)); Objectpath GroupComponent_objectpath; instance.getGroupComponent(GroupComponent_objectpath); Instance GroupComponent_instance; CF_assert(Boot_OpenDRIM_BootOrderedComponent_getGroupComponent(broker, ctx, GroupComponent_objectpath, GroupComponent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Boot_OpenDRIM_BootOrderedComponent_isAssociated(PartComponent_instance, GroupComponent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(Boot_OpenDRIM_BootOrderedComponent_populate(instance, errorMessage)); _L_; return OK; } int Boot_OpenDRIM_BootOrderedComponent_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootOrderedComponent& newInstance, const OpenDRIM_BootOrderedComponent& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootOrderedComponent_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootOrderedComponent& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootOrderedComponent_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootOrderedComponent& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootOrderedComponent_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(Boot_OpenDRIM_BootOrderedComponent_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootOrderedComponent_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(Boot_OpenDRIM_BootOrderedComponent_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(Boot_OpenDRIM_BootOrderedComponent_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootOrderedComponent_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(Boot_OpenDRIM_BootOrderedComponent_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); } for (size_t i=0; i& GroupComponent_instances, vector& OpenDRIM_BootOrderedComponent_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_BootOrderedComponent instance; instance.setPartComponent(((Instance) PartComponent_instance).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(Boot_OpenDRIM_BootOrderedComponent_populate(instance, errorMessage)); } OpenDRIM_BootOrderedComponent_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootOrderedComponent_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_BootOrderedComponent_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_BootOrderedComponent instance; instance.setPartComponent(((Instance) PartComponent_instances[i]).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instance).getObjectpath()); if (discriminant == "r") { CF_assert(Boot_OpenDRIM_BootOrderedComponent_populate(instance, errorMessage)); } OpenDRIM_BootOrderedComponent_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootOrderedComponent_populate(OpenDRIM_BootOrderedComponent& instance, string& errorMessage) { _E_; instance.setAssignedSequence(0); // FIXME: Dont't care _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootOrderedComponent/OpenDRIM_BootOrderedComponentProvider.cpp0000644000175000017500000004165211400666205034214 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootOrderedComponent.h" #include "OpenDRIM_BootOrderedComponentAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_BootOrderedComponentProviderSetInstance Boot_OpenDRIM_BootOrderedComponentProviderModifyInstance #endif int Boot_OpenDRIM_BootOrderedComponent_init(const CMPIBroker* broker); int Boot_OpenDRIM_BootOrderedComponent_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_BootOrderedComponentProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootOrderedComponent_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootOrderedComponentProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_BootOrderedComponent_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootOrderedComponent_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootOrderedComponentProviderEnumInstances(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 = Boot_OpenDRIM_BootOrderedComponent_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_BootOrderedComponent_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootOrderedComponentProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootOrderedComponent instance; Boot_OpenDRIM_BootOrderedComponent_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootOrderedComponent_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_BootOrderedComponent_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootOrderedComponentProviderSetInstance(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_BootOrderedComponent newInstance, oldInstance; Boot_OpenDRIM_BootOrderedComponent_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_BootOrderedComponent_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_BootOrderedComponent_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootOrderedComponent_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootOrderedComponentProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootOrderedComponent instance; Boot_OpenDRIM_BootOrderedComponent_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootOrderedComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootOrderedComponent_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootOrderedComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_BootOrderedComponent_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootOrderedComponentProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootOrderedComponent instance; Boot_OpenDRIM_BootOrderedComponent_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootOrderedComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootOrderedComponent_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootOrderedComponentProviderExecQuery(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 Boot_OpenDRIM_BootOrderedComponentProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootOrderedComponent_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootOrderedComponentProviderAssociatorNames(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 = Boot_OpenDRIM_BootOrderedComponent_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_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 Boot_OpenDRIM_BootOrderedComponentProviderAssociators(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 = Boot_OpenDRIM_BootOrderedComponent_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_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 Boot_OpenDRIM_BootOrderedComponentProviderReferenceNames(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 = Boot_OpenDRIM_BootOrderedComponent_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootOrderedComponent_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Boot_OpenDRIM_BootOrderedComponent_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootOrderedComponent_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootOrderedComponentProviderReferences(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 = Boot_OpenDRIM_BootOrderedComponent_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootOrderedComponent_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Boot_OpenDRIM_BootOrderedComponent_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Boot_OpenDRIM_BootOrderedComponent_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Boot_OpenDRIM_BootOrderedComponent_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootOrderedComponent_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootOrderedComponent_init FAILED: " + (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_BootOrderedComponent_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootOrderedComponent_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootOrderedComponent_unload FAILED: " + (string) OpenDRIM_BootOrderedComponent_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_BootOrderedComponent_INIT if (Boot_OpenDRIM_BootOrderedComponent_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_BootOrderedComponentProvider, Boot_OpenDRIM_BootOrderedComponentProvider, _broker, Boot_OpenDRIM_BootOrderedComponent_INIT); CMAssociationMIStub(Boot_OpenDRIM_BootOrderedComponentProvider, Boot_OpenDRIM_BootOrderedComponentProvider, _broker, Boot_OpenDRIM_BootOrderedComponent_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootOrderedComponent/cmpiOpenDRIM_BootOrderedComponent.h0000644000175000017500000000431111400666205033006 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_BOOTORDEREDCOMPONENT_H_ #define CMPIOPENDRIM_BOOTORDEREDCOMPONENT_H_ #include "OpenDRIM_BootOrderedComponent.h" CMPIObjectPath* Boot_OpenDRIM_BootOrderedComponent_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootOrderedComponent& instance); CMPIInstance* Boot_OpenDRIM_BootOrderedComponent_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootOrderedComponent& instance); void Boot_OpenDRIM_BootOrderedComponent_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootOrderedComponent& instance); void Boot_OpenDRIM_BootOrderedComponent_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootOrderedComponent& instance); #endif /*CMPIOPENDRIM_BOOTORDEREDCOMPONENT_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootOrderedComponent/assocOpenDRIM_BootOrderedComponent.cpp0000644000175000017500000002106011400666205033521 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_BootOrderedComponent.h" int Boot_OpenDRIM_BootOrderedComponent_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 = Boot_OpenDRIM_BootOrderedComponent_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(Boot_OpenDRIM_BootOrderedComponent_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(Boot_OpenDRIM_BootOrderedComponent_associatorGroupComponentToPartComponent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootOrderedComponent_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(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootOrderedComponent_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_ManagedElement _instance; Boot_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Boot_OpenDRIM_BootOrderedComponent_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(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootOrderedComponent_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_ManagedElement _instance; Boot_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootOrderedComponent/assocOpenDRIM_BootOrderedComponent.h0000644000175000017500000000616511400666205033177 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_BOOTORDEREDCOMPONENT_H_ #define ASSOCOPENDRIM_BOOTORDEREDCOMPONENT_H_ #include "OpenDRIM_BootOrderedComponentAccess.h" int Boot_OpenDRIM_BootOrderedComponent_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 Boot_OpenDRIM_BootOrderedComponent_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 Boot_OpenDRIM_BootOrderedComponent_enumeratePartComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootOrderedComponent_getPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootOrderedComponent_enumerateGroupComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootOrderedComponent_getGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_BOOTORDEREDCOMPONENT_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootOrderedComponent/OpenDRIM_BootOrderedComponentAccess.h0000644000175000017500000001047011400666205033262 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTORDEREDCOMPONENTACCESS_H_ #define OPENDRIM_BOOTORDEREDCOMPONENTACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_BootOrderedComponent.h" #include "assocOpenDRIM_BootOrderedComponent.h" int Boot_OpenDRIM_BootOrderedComponent_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_BootOrderedComponent_unload(string& errorMessage); int Boot_OpenDRIM_BootOrderedComponent_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootOrderedComponent_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootOrderedComponent& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootOrderedComponent_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootOrderedComponent& newInstance, const OpenDRIM_BootOrderedComponent& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootOrderedComponent_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootOrderedComponent& instance, string& errorMessage); int Boot_OpenDRIM_BootOrderedComponent_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootOrderedComponent& instance, string& errorMessage); int Boot_OpenDRIM_BootOrderedComponent_associatorPartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const char** properties, vector& GroupComponent_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootOrderedComponent_associatorGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const char** properties, vector& PartComponent_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootOrderedComponent_referencePartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const vector& GroupComponent_instances, vector& OpenDRIM_BootOrderedComponent_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootOrderedComponent_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_BootOrderedComponent_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootOrderedComponent_populate(OpenDRIM_BootOrderedComponent& instance, string& errorMessage); #endif /*OPENDRIM_BOOTORDEREDCOMPONENTACCESS_H_*/ opendrim-lmp-boot-0.1.0~ppa/mof/0000755000175000017500000000000011400666205017266 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_BootConcreteDependency.mof0000644000175000017500000000316211400666205026015 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Association, Provider("cmpi:cmpiBoot_OpenDRIM_BootConcreteDependencyProvider")] class OpenDRIM_BootConcreteDependency:CIM_ConcreteDependency { }; opendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_BootConfigSettingData.mof0000644000175000017500000000316011400666205025607 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Association, Provider("cmpi:cmpiBoot_OpenDRIM_BootConfigSettingDataProvider")] class OpenDRIM_BootConfigSettingData:CIM_ElementSettingData { }; opendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_BootSettingData.mof0000644000175000017500000000312311400666205024460 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Provider("cmpi:cmpiBoot_OpenDRIM_BootSettingDataProvider")] class OpenDRIM_BootSettingData:CIM_BootSettingData { }; opendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_BootServiceCapabilities.mof0000644000175000017500000000315311400666205026166 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Provider("cmpi:cmpiBoot_OpenDRIM_BootServiceCapabilitiesProvider")] class OpenDRIM_BootServiceCapabilities:CIM_BootServiceCapabilities { }; opendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_BootSourceSetting.mof0000644000175000017500000000313111400666205025046 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Provider("cmpi:cmpiBoot_OpenDRIM_BootSourceSettingProvider")] class OpenDRIM_BootSourceSetting:CIM_BootSourceSetting { }; opendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_BootConcreteComponent.mof0000644000175000017500000000315711400666205025705 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Association, Provider("cmpi:cmpiBoot_OpenDRIM_BootConcreteComponentProvider")] class OpenDRIM_BootConcreteComponent:CIM_ConcreteComponent { }; opendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_BootHostedService.mof0000644000175000017500000000314311400666205025022 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Association, Provider("cmpi:cmpiBoot_OpenDRIM_BootHostedServiceProvider")] class OpenDRIM_BootHostedService:CIM_HostedService { }; opendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_BootLogicalIdentity.mof0000644000175000017500000000315111400666205025336 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Association, Provider("cmpi:cmpiBoot_OpenDRIM_BootLogicalIdentityProvider")] class OpenDRIM_BootLogicalIdentity:CIM_LogicalIdentity { }; opendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_BootOrderedComponent.mof0000644000175000017500000000315411400666205025524 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Association, Provider("cmpi:cmpiBoot_OpenDRIM_BootOrderedComponentProvider")] class OpenDRIM_BootOrderedComponent:CIM_OrderedComponent { }; opendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_BootCapabilities.mof0000644000175000017500000000314711400666205024650 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Association, Provider("cmpi:cmpiBoot_OpenDRIM_BootCapabilitiesProvider")] class OpenDRIM_BootCapabilities:CIM_ElementCapabilities { }; opendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_ServiceAffectsBoot.mof0000644000175000017500000000315511400666205025152 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Association, Provider("cmpi:cmpiBoot_OpenDRIM_ServiceAffectsBootProvider")] class OpenDRIM_ServiceAffectsBoot:CIM_ServiceAffectsElement { }; opendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_BootConfigSetting.mof0000644000175000017500000000313111400666205025013 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Provider("cmpi:cmpiBoot_OpenDRIM_BootConfigSettingProvider")] class OpenDRIM_BootConfigSetting:CIM_BootConfigSetting { }; opendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_BootConformsToProfile.mof0000644000175000017500000000315011400666205025663 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Provider("cmpi:cmpiBoot_OpenDRIM_BootConformsToProfileProvider")] class OpenDRIM_BootConformsToProfile:CIM_ElementConformsToProfile { }; opendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_BootService.mof0000644000175000017500000000310711400666205023653 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Provider("cmpi:cmpiBoot_OpenDRIM_BootServiceProvider")] class OpenDRIM_BootService:CIM_BootService { }; opendrim-lmp-boot-0.1.0~ppa/mof/OpenDRIM_RegisteredBootProfile.mof0000644000175000017500000000314111400666205025667 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ [Provider("cmpi:cmpiBoot_OpenDRIM_RegisteredBootProfileProvider")] class OpenDRIM_RegisteredBootProfile:CIM_RegisteredProfile { }; opendrim-lmp-boot-0.1.0~ppa/COPYING0000644000175000017500000004310311400666205017541 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-boot-0.1.0~ppa/NEWS0000644000175000017500000000017511400666205017207 0ustar guillaumeguillaumeInitial Release 0.1.0 ========================= // TODO Changes in Major.Minor.Revision ========================= // TODO opendrim-lmp-boot-0.1.0~ppa/LICENSE0000644000175000017500000000274111400666205017516 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteComponent/0000755000175000017500000000000011400666205024413 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteComponent/Makefile.am0000644000175000017500000000470411400666205026454 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_BootConcreteComponentProvider.la libcmpiBoot_OpenDRIM_BootConcreteComponentProvider_la_SOURCES = OpenDRIM_BootConcreteComponentAccess.cpp OpenDRIM_BootConcreteComponentProvider.cpp cmpiOpenDRIM_BootConcreteComponent.cpp assocOpenDRIM_BootConcreteComponent.cpp # May have to be adjusted for direct invocation libcmpiBoot_OpenDRIM_BootConcreteComponentProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiBoot_OpenDRIM_BootConcreteComponentProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la #../CIM_ManagedElement/libcmpiBoot_CIM_ManagedElementProvider.la ../CIM_ManagedElement/libcmpiBoot_CIM_ManagedElementProvider.la libcmpiBoot_OpenDRIM_BootConcreteComponentProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BootConcreteComponent.h OpenDRIM_BootConcreteComponent.h OpenDRIM_BootConcreteComponentAccess.h opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteComponent/assocOpenDRIM_BootConcreteComponent.h0000644000175000017500000000617711400666205033536 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_BOOTCONCRETECOMPONENT_H_ #define ASSOCOPENDRIM_BOOTCONCRETECOMPONENT_H_ #include "OpenDRIM_BootConcreteComponentAccess.h" int Boot_OpenDRIM_BootConcreteComponent_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 Boot_OpenDRIM_BootConcreteComponent_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 Boot_OpenDRIM_BootConcreteComponent_enumeratePartComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootConcreteComponent_getPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootConcreteComponent_enumerateGroupComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootConcreteComponent_getGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_BOOTCONCRETECOMPONENT_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteComponent/OpenDRIM_BootConcreteComponentAccess.h0000644000175000017500000001052411400666205033616 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTCONCRETECOMPONENTACCESS_H_ #define OPENDRIM_BOOTCONCRETECOMPONENTACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_BootConcreteComponent.h" #include "assocOpenDRIM_BootConcreteComponent.h" int Boot_OpenDRIM_BootConcreteComponent_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_BootConcreteComponent_unload(string& errorMessage); int Boot_OpenDRIM_BootConcreteComponent_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConcreteComponent_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootConcreteComponent& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootConcreteComponent_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConcreteComponent& newInstance, const OpenDRIM_BootConcreteComponent& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootConcreteComponent_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConcreteComponent& instance, string& errorMessage); int Boot_OpenDRIM_BootConcreteComponent_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConcreteComponent& instance, string& errorMessage); int Boot_OpenDRIM_BootConcreteComponent_associatorPartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const char** properties, vector& GroupComponent_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConcreteComponent_associatorGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const char** properties, vector& PartComponent_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConcreteComponent_referencePartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const vector& GroupComponent_instances, vector& OpenDRIM_BootConcreteComponent_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConcreteComponent_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_BootConcreteComponent_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConcreteComponent_populate(OpenDRIM_BootConcreteComponent& instance, string& errorMessage); #endif /*OPENDRIM_BOOTCONCRETECOMPONENTACCESS_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteComponent/cmpiOpenDRIM_BootConcreteComponent.cpp0000644000175000017500000000615411400666205033704 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConcreteComponent.h" CMPIObjectPath* Boot_OpenDRIM_BootConcreteComponent_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootConcreteComponent& instance) { _E_; Objectpath op(broker, OpenDRIM_BootConcreteComponent_classnames[0], OpenDRIM_BootConcreteComponent_NAMESPACE); if (!instance.GroupComponent_isNULL) op.addKey("GroupComponent", instance.GroupComponent); if (!instance.PartComponent_isNULL) op.addKey("PartComponent", instance.PartComponent); _L_; return op.getHdl(); } CMPIInstance* Boot_OpenDRIM_BootConcreteComponent_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootConcreteComponent& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_BootConcreteComponent_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void Boot_OpenDRIM_BootConcreteComponent_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootConcreteComponent& 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 Boot_OpenDRIM_BootConcreteComponent_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootConcreteComponent& 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_; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteComponent/OpenDRIM_BootConcreteComponentAccess.cpp0000644000175000017500000002522611400666205034156 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_BootConcreteComponentAccess.h" int Boot_OpenDRIM_BootConcreteComponent_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(Boot_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootConcreteComponent_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_ManagedElement_unload(errorMessage)); CF_assert(Boot_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootConcreteComponent_isAssociated(const Instance& PartComponent, const Instance& GroupComponent, bool& isAssociated, string& errorMessage) { _E_; // Determine if the association can be established or not string groupComponentName = GroupComponent.getClassname(); // BootConfigSetting, BootSourceSetting if (groupComponentName.find("OpenDRIM_BootConfigSetting")==0 || groupComponentName.find("OpenDRIM_BootSourceSetting")==0) isAssociated=true; else isAssociated=false; _L_; return OK; } int Boot_OpenDRIM_BootConcreteComponent_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(Boot_OpenDRIM_BootConcreteComponent_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(Boot_OpenDRIM_BootConcreteComponent_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; Boot_OpenDRIM_BootConcreteComponent_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(Boot_OpenDRIM_BootConcreteComponent_referencePartComponentToGroupComponent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootConcreteComponent_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootConcreteComponent& 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(Boot_OpenDRIM_BootConcreteComponent_getPartComponent(broker, ctx, PartComponent_objectpath, PartComponent_instance, NULL, errorMessage)); Objectpath GroupComponent_objectpath; instance.getGroupComponent(GroupComponent_objectpath); Instance GroupComponent_instance; CF_assert(Boot_OpenDRIM_BootConcreteComponent_getGroupComponent(broker, ctx, GroupComponent_objectpath, GroupComponent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Boot_OpenDRIM_BootConcreteComponent_isAssociated(PartComponent_instance, GroupComponent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Boot_OpenDRIM_BootConcreteComponent_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConcreteComponent& newInstance, const OpenDRIM_BootConcreteComponent& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConcreteComponent_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConcreteComponent& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConcreteComponent_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConcreteComponent& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConcreteComponent_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(Boot_OpenDRIM_BootConcreteComponent_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootConcreteComponent_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(Boot_OpenDRIM_BootConcreteComponent_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(Boot_OpenDRIM_BootConcreteComponent_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootConcreteComponent_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(Boot_OpenDRIM_BootConcreteComponent_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); } for (size_t i=0; i& GroupComponent_instances, vector& OpenDRIM_BootConcreteComponent_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_BootConcreteComponent instance; instance.setPartComponent(((Instance) PartComponent_instance).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instances[i]).getObjectpath()); OpenDRIM_BootConcreteComponent_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootConcreteComponent_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_BootConcreteComponent_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_BootConcreteComponent instance; instance.setPartComponent(((Instance) PartComponent_instances[i]).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instance).getObjectpath()); OpenDRIM_BootConcreteComponent_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootConcreteComponent_populate(OpenDRIM_BootConcreteComponent& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteComponent/OpenDRIM_BootConcreteComponentProvider.cppopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteComponent/OpenDRIM_BootConcreteComponentProvider.cp0000644000175000017500000004200411400666205034360 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConcreteComponent.h" #include "OpenDRIM_BootConcreteComponentAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_BootConcreteComponentProviderSetInstance Boot_OpenDRIM_BootConcreteComponentProviderModifyInstance #endif int Boot_OpenDRIM_BootConcreteComponent_init(const CMPIBroker* broker); int Boot_OpenDRIM_BootConcreteComponent_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_BootConcreteComponentProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootConcreteComponent_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteComponentProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteComponent_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootConcreteComponent_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteComponentProviderEnumInstances(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 = Boot_OpenDRIM_BootConcreteComponent_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_BootConcreteComponent_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteComponentProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConcreteComponent instance; Boot_OpenDRIM_BootConcreteComponent_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteComponent_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_BootConcreteComponent_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteComponentProviderSetInstance(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_BootConcreteComponent newInstance, oldInstance; Boot_OpenDRIM_BootConcreteComponent_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_BootConcreteComponent_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteComponent_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConcreteComponent_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteComponentProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConcreteComponent instance; Boot_OpenDRIM_BootConcreteComponent_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConcreteComponent_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConcreteComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_BootConcreteComponent_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteComponentProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConcreteComponent instance; Boot_OpenDRIM_BootConcreteComponent_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConcreteComponent_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteComponentProviderExecQuery(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 Boot_OpenDRIM_BootConcreteComponentProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootConcreteComponent_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteComponentProviderAssociatorNames(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 = Boot_OpenDRIM_BootConcreteComponent_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_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 Boot_OpenDRIM_BootConcreteComponentProviderAssociators(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 = Boot_OpenDRIM_BootConcreteComponent_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_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 Boot_OpenDRIM_BootConcreteComponentProviderReferenceNames(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 = Boot_OpenDRIM_BootConcreteComponent_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootConcreteComponent_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Boot_OpenDRIM_BootConcreteComponent_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootConcreteComponent_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConcreteComponentProviderReferences(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 = Boot_OpenDRIM_BootConcreteComponent_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootConcreteComponent_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Boot_OpenDRIM_BootConcreteComponent_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Boot_OpenDRIM_BootConcreteComponent_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Boot_OpenDRIM_BootConcreteComponent_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteComponent_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootConcreteComponent_init FAILED: " + (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_BootConcreteComponent_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootConcreteComponent_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootConcreteComponent_unload FAILED: " + (string) OpenDRIM_BootConcreteComponent_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_BootConcreteComponent_INIT if (Boot_OpenDRIM_BootConcreteComponent_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_BootConcreteComponentProvider, Boot_OpenDRIM_BootConcreteComponentProvider, _broker, Boot_OpenDRIM_BootConcreteComponent_INIT); CMAssociationMIStub(Boot_OpenDRIM_BootConcreteComponentProvider, Boot_OpenDRIM_BootConcreteComponentProvider, _broker, Boot_OpenDRIM_BootConcreteComponent_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteComponent/cmpiOpenDRIM_BootConcreteComponent.h0000644000175000017500000000432511400666205033347 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_BOOTCONCRETECOMPONENT_H_ #define CMPIOPENDRIM_BOOTCONCRETECOMPONENT_H_ #include "OpenDRIM_BootConcreteComponent.h" CMPIObjectPath* Boot_OpenDRIM_BootConcreteComponent_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootConcreteComponent& instance); CMPIInstance* Boot_OpenDRIM_BootConcreteComponent_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootConcreteComponent& instance); void Boot_OpenDRIM_BootConcreteComponent_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootConcreteComponent& instance); void Boot_OpenDRIM_BootConcreteComponent_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootConcreteComponent& instance); #endif /*CMPIOPENDRIM_BOOTCONCRETECOMPONENT_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteComponent/OpenDRIM_BootConcreteComponent.h0000644000175000017500000000707511400666205032503 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTCONCRETECOMPONENT_H_ #define OPENDRIM_BOOTCONCRETECOMPONENT_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_BootConcreteComponent_classnames[] = {"OpenDRIM_BootConcreteComponent"}; static string OpenDRIM_BootConcreteComponent_NAMESPACE = _NAMESPACE; const static string PartComponent_role = "PartComponent"; const static char* PartComponent_classnames[] = {"OpenDRIM_BootSettingData"}; const static string PartComponent_NAMESPACE = _NAMESPACE; const static string GroupComponent_role = "GroupComponent"; const static char* GroupComponent_classnames[] = {"CIM_ManagedElement"}; // BootConfigSetting, BootSourceSetting const static string GroupComponent_NAMESPACE = _NAMESPACE; class OpenDRIM_BootConcreteComponent { public: Objectpath GroupComponent; bool GroupComponent_isNULL; Objectpath PartComponent; bool PartComponent_isNULL; OpenDRIM_BootConcreteComponent() { GroupComponent_isNULL = true; PartComponent_isNULL = true; } ~OpenDRIM_BootConcreteComponent() {} 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_BOOTCONCRETECOMPONENT_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConcreteComponent/assocOpenDRIM_BootConcreteComponent.cpp0000644000175000017500000002110011400666205034050 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_BootConcreteComponent.h" int Boot_OpenDRIM_BootConcreteComponent_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 = Boot_OpenDRIM_BootConcreteComponent_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(Boot_OpenDRIM_BootConcreteComponent_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(Boot_OpenDRIM_BootConcreteComponent_associatorGroupComponentToPartComponent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootConcreteComponent_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(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootConcreteComponent_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_ManagedElement _instance; Boot_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Boot_OpenDRIM_BootConcreteComponent_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(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootConcreteComponent_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_ManagedElement _instance; Boot_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSettingData/0000755000175000017500000000000011400666205024323 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSettingData/Makefile.am0000644000175000017500000000467311400666205026371 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_BootConfigSettingDataProvider.la libcmpiBoot_OpenDRIM_BootConfigSettingDataProvider_la_SOURCES = OpenDRIM_BootConfigSettingDataAccess.cpp OpenDRIM_BootConfigSettingDataProvider.cpp cmpiOpenDRIM_BootConfigSettingData.cpp assocOpenDRIM_BootConfigSettingData.cpp # May have to be adjusted for direct invocation libcmpiBoot_OpenDRIM_BootConfigSettingDataProvider_la_CPPFLAGS = -I../CIM_SettingData -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiBoot_OpenDRIM_BootConfigSettingDataProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la #../CIM_SettingData/libcmpiBoot_CIM_SettingDataProvider.la ../CIM_ManagedElement/libcmpiBoot_CIM_ManagedElementProvider.la libcmpiBoot_OpenDRIM_BootConfigSettingDataProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BootConfigSettingData.h OpenDRIM_BootConfigSettingData.h OpenDRIM_BootConfigSettingDataAccess.h opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSettingData/OpenDRIM_BootConfigSettingData.h0000644000175000017500000001072511400666205032317 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTCONFIGSETTINGDATA_H_ #define OPENDRIM_BOOTCONFIGSETTINGDATA_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_SettingData.h" #include "CIM_SettingDataAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_BootConfigSettingData_classnames[] = {"OpenDRIM_BootConfigSettingData"}; static string OpenDRIM_BootConfigSettingData_NAMESPACE = _NAMESPACE; const static string SettingData_role = "SettingData"; const static char* SettingData_classnames[] = {"OpenDRIM_BootConfigSetting"}; const static string SettingData_NAMESPACE = _NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_ComputerSystem"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_BootConfigSettingData { public: Objectpath ManagedElement; bool ManagedElement_isNULL; Objectpath SettingData; bool SettingData_isNULL; unsigned short IsDefault; bool IsDefault_isNULL; unsigned short IsCurrent; bool IsCurrent_isNULL; unsigned short IsNext; bool IsNext_isNULL; OpenDRIM_BootConfigSettingData() { ManagedElement_isNULL = true; SettingData_isNULL = true; IsDefault_isNULL = true; IsCurrent_isNULL = true; IsNext_isNULL = true; } ~OpenDRIM_BootConfigSettingData() {} string getKeys() const { return CF_toLowCase(".ManagedElement=\"" + CF_quoteString(ManagedElement.toString()) + "\""".SettingData=\"" + CF_quoteString(SettingData.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 getSettingData(Objectpath& value) const { if (SettingData_isNULL==true) return NOT_FOUND; value = SettingData; return OK; } int setSettingData(const Objectpath& newValue) { SettingData = newValue; SettingData.setNamespace(SettingData_NAMESPACE); SettingData_isNULL = false; return OK; } int getIsDefault(unsigned short& value) const { if (IsDefault_isNULL==true) return NOT_FOUND; value = IsDefault; return OK; } int setIsDefault(const unsigned short& newValue) { IsDefault = newValue; IsDefault_isNULL = false; return OK; } int getIsCurrent(unsigned short& value) const { if (IsCurrent_isNULL==true) return NOT_FOUND; value = IsCurrent; return OK; } int setIsCurrent(const unsigned short& newValue) { IsCurrent = newValue; IsCurrent_isNULL = false; return OK; } int getIsNext(unsigned short& value) const { if (IsNext_isNULL==true) return NOT_FOUND; value = IsNext; return OK; } int setIsNext(const unsigned short& newValue) { IsNext = newValue; IsNext_isNULL = false; return OK; } }; #endif /*OPENDRIM_BOOTCONFIGSETTINGDATA_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSettingData/OpenDRIM_BootConfigSettingDataAccess.h0000644000175000017500000001055211400666205033437 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTCONFIGSETTINGDATAACCESS_H_ #define OPENDRIM_BOOTCONFIGSETTINGDATAACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_BootConfigSettingData.h" #include "assocOpenDRIM_BootConfigSettingData.h" int Boot_OpenDRIM_BootConfigSettingData_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_BootConfigSettingData_unload(string& errorMessage); int Boot_OpenDRIM_BootConfigSettingData_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConfigSettingData_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootConfigSettingData& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootConfigSettingData_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSettingData& newInstance, const OpenDRIM_BootConfigSettingData& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootConfigSettingData_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSettingData& instance, string& errorMessage); int Boot_OpenDRIM_BootConfigSettingData_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSettingData& instance, string& errorMessage); int Boot_OpenDRIM_BootConfigSettingData_associatorSettingDataToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& SettingData_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConfigSettingData_associatorManagedElementToSettingData(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& SettingData_associatedInstances, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConfigSettingData_referenceSettingDataToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& SettingData_instance, const vector& ManagedElement_instances, vector& OpenDRIM_BootConfigSettingData_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConfigSettingData_referenceManagedElementToSettingData(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& SettingData_instances, vector& OpenDRIM_BootConfigSettingData_instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootConfigSettingData_populate(OpenDRIM_BootConfigSettingData& instance, const Instance& SettingData_instance, string& errorMessage); #endif /*OPENDRIM_BOOTCONFIGSETTINGDATAACCESS_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSettingData/cmpiOpenDRIM_BootConfigSettingData.cpp0000644000175000017500000000716311400666205033525 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConfigSettingData.h" CMPIObjectPath* Boot_OpenDRIM_BootConfigSettingData_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootConfigSettingData& instance) { _E_; Objectpath op(broker, OpenDRIM_BootConfigSettingData_classnames[0], OpenDRIM_BootConfigSettingData_NAMESPACE); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); if (!instance.SettingData_isNULL) op.addKey("SettingData", instance.SettingData); _L_; return op.getHdl(); } CMPIInstance* Boot_OpenDRIM_BootConfigSettingData_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootConfigSettingData& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_BootConfigSettingData_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.IsDefault_isNULL) ci.setProperty("IsDefault", instance.IsDefault); if (!instance.IsCurrent_isNULL) ci.setProperty("IsCurrent", instance.IsCurrent); if (!instance.IsNext_isNULL) ci.setProperty("IsNext", instance.IsNext); _L_; return ci.getHdl(); } void Boot_OpenDRIM_BootConfigSettingData_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootConfigSettingData& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("SettingData", instance.SettingData) == OK) instance.SettingData_isNULL = false; if (op.getKey("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } void Boot_OpenDRIM_BootConfigSettingData_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootConfigSettingData& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; if (inst.getProperty("SettingData", instance.SettingData) == OK) instance.SettingData_isNULL = false; if (inst.getProperty("IsDefault", instance.IsDefault) == OK) instance.IsDefault_isNULL = false; if (inst.getProperty("IsCurrent", instance.IsCurrent) == OK) instance.IsCurrent_isNULL = false; if (inst.getProperty("IsNext", instance.IsNext) == OK) instance.IsNext_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSettingData/OpenDRIM_BootConfigSettingDataProvider.cppopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSettingData/OpenDRIM_BootConfigSettingDataProvider.cp0000644000175000017500000004177411400666205034215 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootConfigSettingData.h" #include "OpenDRIM_BootConfigSettingDataAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_BootConfigSettingDataProviderSetInstance Boot_OpenDRIM_BootConfigSettingDataProviderModifyInstance #endif int Boot_OpenDRIM_BootConfigSettingData_init(const CMPIBroker* broker); int Boot_OpenDRIM_BootConfigSettingData_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_BootConfigSettingDataProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootConfigSettingData_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingDataProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSettingData_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootConfigSettingData_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingDataProviderEnumInstances(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 = Boot_OpenDRIM_BootConfigSettingData_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_BootConfigSettingData_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingDataProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConfigSettingData instance; Boot_OpenDRIM_BootConfigSettingData_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSettingData_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_BootConfigSettingData_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingDataProviderSetInstance(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_BootConfigSettingData newInstance, oldInstance; Boot_OpenDRIM_BootConfigSettingData_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_BootConfigSettingData_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSettingData_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConfigSettingData_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingDataProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConfigSettingData instance; Boot_OpenDRIM_BootConfigSettingData_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSettingData_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConfigSettingData_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConfigSettingData_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_BootConfigSettingData_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingDataProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootConfigSettingData instance; Boot_OpenDRIM_BootConfigSettingData_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSettingData_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootConfigSettingData_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingDataProviderExecQuery(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 Boot_OpenDRIM_BootConfigSettingDataProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootConfigSettingData_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingDataProviderAssociatorNames(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 = Boot_OpenDRIM_BootConfigSettingData_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_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 Boot_OpenDRIM_BootConfigSettingDataProviderAssociators(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 = Boot_OpenDRIM_BootConfigSettingData_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_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 Boot_OpenDRIM_BootConfigSettingDataProviderReferenceNames(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 = Boot_OpenDRIM_BootConfigSettingData_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootConfigSettingData_referenceSettingDataToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Boot_OpenDRIM_BootConfigSettingData_referenceManagedElementToSettingData(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootConfigSettingData_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootConfigSettingDataProviderReferences(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 = Boot_OpenDRIM_BootConfigSettingData_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Boot_OpenDRIM_BootConfigSettingData_referenceSettingDataToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Boot_OpenDRIM_BootConfigSettingData_referenceManagedElementToSettingData(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Boot_OpenDRIM_BootConfigSettingData_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Boot_OpenDRIM_BootConfigSettingData_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSettingData_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootConfigSettingData_init FAILED: " + (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_BootConfigSettingData_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootConfigSettingData_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootConfigSettingData_unload FAILED: " + (string) OpenDRIM_BootConfigSettingData_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_BootConfigSettingData_INIT if (Boot_OpenDRIM_BootConfigSettingData_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_BootConfigSettingDataProvider, Boot_OpenDRIM_BootConfigSettingDataProvider, _broker, Boot_OpenDRIM_BootConfigSettingData_INIT); CMAssociationMIStub(Boot_OpenDRIM_BootConfigSettingDataProvider, Boot_OpenDRIM_BootConfigSettingDataProvider, _broker, Boot_OpenDRIM_BootConfigSettingData_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSettingData/assocOpenDRIM_BootConfigSettingData.cpp0000644000175000017500000002101011400666205033670 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_BootConfigSettingData.h" int Boot_OpenDRIM_BootConfigSettingData_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 = Boot_OpenDRIM_BootConfigSettingData_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, "SettingData") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "ManagedElement") != 0) return OK; CF_assert(Boot_OpenDRIM_BootConfigSettingData_associatorSettingDataToManagedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "ManagedElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "SettingData") != 0) return OK; CF_assert(Boot_OpenDRIM_BootConfigSettingData_associatorManagedElementToSettingData(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootConfigSettingData_enumerateSettingDatas(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, SettingData_NAMESPACE, SettingData_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(Boot_CIM_SettingData_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_SettingData_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_SettingData_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootConfigSettingData_getSettingData(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), SettingData_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), SettingData_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_SettingData _instance; Boot_CIM_SettingData_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_SettingData_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_SettingData_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Boot_OpenDRIM_BootConfigSettingData_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(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Boot_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Boot_OpenDRIM_BootConfigSettingData_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; Boot_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Boot_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Boot_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSettingData/OpenDRIM_BootConfigSettingDataAccess.cpp0000644000175000017500000002603611400666205033776 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_BootConfigSettingDataAccess.h" int Boot_OpenDRIM_BootConfigSettingData_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_SettingData_load(broker, errorMessage)); CF_assert(Boot_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootConfigSettingData_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Boot_CIM_SettingData_unload(errorMessage)); CF_assert(Boot_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int Boot_OpenDRIM_BootConfigSettingData_isAssociated(const Instance& SettingData, const Instance& ManagedElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int Boot_OpenDRIM_BootConfigSettingData_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(Boot_OpenDRIM_BootConfigSettingData_enumerateSettingDatas(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(Boot_OpenDRIM_BootConfigSettingData_enumerateSettingDatas(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; Boot_OpenDRIM_BootConfigSettingData_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), SettingData_classnames[0], ManagedElement_classnames[0], SettingData_role.c_str(), ManagedElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(Boot_OpenDRIM_BootConfigSettingData_referenceSettingDataToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Boot_OpenDRIM_BootConfigSettingData_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootConfigSettingData& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath SettingData_objectpath; instance.getSettingData(SettingData_objectpath); Instance SettingData_instance; CF_assert(Boot_OpenDRIM_BootConfigSettingData_getSettingData(broker, ctx, SettingData_objectpath, SettingData_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(Boot_OpenDRIM_BootConfigSettingData_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Boot_OpenDRIM_BootConfigSettingData_isAssociated(SettingData_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(Boot_OpenDRIM_BootConfigSettingData_populate(instance, SettingData_instance, errorMessage)); _L_; return OK; } int Boot_OpenDRIM_BootConfigSettingData_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSettingData& newInstance, const OpenDRIM_BootConfigSettingData& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConfigSettingData_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSettingData& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConfigSettingData_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootConfigSettingData& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootConfigSettingData_associatorSettingDataToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& SettingData_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(Boot_OpenDRIM_BootConfigSettingData_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootConfigSettingData_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(Boot_OpenDRIM_BootConfigSettingData_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& SettingData_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector SettingData_instances; if (discriminant=="a") CF_assert(Boot_OpenDRIM_BootConfigSettingData_enumerateSettingDatas(broker, ctx, SettingData_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Boot_OpenDRIM_BootConfigSettingData_enumerateSettingDatas(broker, ctx, SettingData_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(Boot_OpenDRIM_BootConfigSettingData_enumerateSettingDatas(broker, ctx, SettingData_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_BootConfigSettingData_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_BootConfigSettingData instance; instance.setSettingData(((Instance) SettingData_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(Boot_OpenDRIM_BootConfigSettingData_populate(instance, SettingData_instance, errorMessage)); } OpenDRIM_BootConfigSettingData_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootConfigSettingData_referenceManagedElementToSettingData(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& SettingData_instances, vector& OpenDRIM_BootConfigSettingData_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 < SettingData_instances.size(); i++) { OpenDRIM_BootConfigSettingData instance; instance.setSettingData(((Instance) SettingData_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(Boot_OpenDRIM_BootConfigSettingData_populate(instance, SettingData_instances[i], errorMessage)); } OpenDRIM_BootConfigSettingData_instances.push_back(instance); } _L_; return OK; } int Boot_OpenDRIM_BootConfigSettingData_populate(OpenDRIM_BootConfigSettingData& instance, const Instance& SettingData_instance, string& errorMessage) { _E_; string settingData_InstanceID; CF_assert(SettingData_instance.getProperty("InstanceID",settingData_InstanceID)); if(settingData_InstanceID.find("Default")==0) instance.setIsDefault(1); // Is Default instance.setIsCurrent(1); // FIXME: Is Current instance.setIsNext(2); // FIXME: Is Not Next _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSettingData/assocOpenDRIM_BootConfigSettingData.h0000644000175000017500000000617311400666205033352 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_BOOTCONFIGSETTINGDATA_H_ #define ASSOCOPENDRIM_BOOTCONFIGSETTINGDATA_H_ #include "OpenDRIM_BootConfigSettingDataAccess.h" int Boot_OpenDRIM_BootConfigSettingData_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 Boot_OpenDRIM_BootConfigSettingData_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 Boot_OpenDRIM_BootConfigSettingData_enumerateSettingDatas(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootConfigSettingData_getSettingData(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootConfigSettingData_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Boot_OpenDRIM_BootConfigSettingData_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_BOOTCONFIGSETTINGDATA_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootConfigSettingData/cmpiOpenDRIM_BootConfigSettingData.h0000644000175000017500000000432511400666205033167 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_BOOTCONFIGSETTINGDATA_H_ #define CMPIOPENDRIM_BOOTCONFIGSETTINGDATA_H_ #include "OpenDRIM_BootConfigSettingData.h" CMPIObjectPath* Boot_OpenDRIM_BootConfigSettingData_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootConfigSettingData& instance); CMPIInstance* Boot_OpenDRIM_BootConfigSettingData_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootConfigSettingData& instance); void Boot_OpenDRIM_BootConfigSettingData_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootConfigSettingData& instance); void Boot_OpenDRIM_BootConfigSettingData_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootConfigSettingData& instance); #endif /*CMPIOPENDRIM_BOOTCONFIGSETTINGDATA_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSettingData/0000755000175000017500000000000011400666205023175 5ustar guillaumeguillaumeopendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSettingData/cmpiOpenDRIM_BootSettingData.cpp0000644000175000017500000000671511400666205031253 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootSettingData.h" CMPIObjectPath* Boot_OpenDRIM_BootSettingData_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootSettingData& instance) { _E_; Objectpath op(broker, OpenDRIM_BootSettingData_classnames[0], OpenDRIM_BootSettingData_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* Boot_OpenDRIM_BootSettingData_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootSettingData& instance) { _E_; Objectpath op(broker, Boot_OpenDRIM_BootSettingData_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.OwningEntity_isNULL) ci.setProperty("OwningEntity", instance.OwningEntity); _L_; return ci.getHdl(); } void Boot_OpenDRIM_BootSettingData_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootSettingData& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void Boot_OpenDRIM_BootSettingData_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootSettingData& 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("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("OwningEntity", instance.OwningEntity) == OK) instance.OwningEntity_isNULL = false; _L_; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSettingData/Makefile.am0000644000175000017500000000377211400666205025242 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiBoot_OpenDRIM_BootSettingDataProvider.la libcmpiBoot_OpenDRIM_BootSettingDataProvider_la_SOURCES = OpenDRIM_BootSettingDataAccess.cpp OpenDRIM_BootSettingDataProvider.cpp cmpiOpenDRIM_BootSettingData.cpp libcmpiBoot_OpenDRIM_BootSettingDataProvider_la_LIBADD = ../Common/libcmpiBoot_Common.la libcmpiBoot_OpenDRIM_BootSettingDataProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BootSettingData.h OpenDRIM_BootSettingData.h OpenDRIM_BootSettingDataAccess.h opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSettingData/OpenDRIM_BootSettingData.h0000644000175000017500000000710011400666205030034 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTSETTINGDATA_H_ #define OPENDRIM_BOOTSETTINGDATA_H_ #include const static char* OpenDRIM_BootSettingData_classnames[] = {"OpenDRIM_BootSettingData"}; static string OpenDRIM_BootSettingData_NAMESPACE = _NAMESPACE; class OpenDRIM_BootSettingData { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string InstanceID; bool InstanceID_isNULL; string ElementName; bool ElementName_isNULL; string OwningEntity; bool OwningEntity_isNULL; OpenDRIM_BootSettingData() { Caption_isNULL = true; Description_isNULL = true; InstanceID_isNULL = true; ElementName_isNULL = true; OwningEntity_isNULL = true; } ~OpenDRIM_BootSettingData() {} 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 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 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 getOwningEntity(string& value) const { if (OwningEntity_isNULL==true) return NOT_FOUND; value = OwningEntity; return OK; } int setOwningEntity(const string& newValue) { OwningEntity = newValue; OwningEntity_isNULL = false; return OK; } }; #endif /*OPENDRIM_BOOTSETTINGDATA_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSettingData/OpenDRIM_BootSettingDataAccess.cpp0000644000175000017500000000577111400666205031525 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_BootSettingDataAccess.h" int Boot_OpenDRIM_BootSettingData_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int Boot_OpenDRIM_BootSettingData_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int Boot_OpenDRIM_BootSettingData_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int Boot_OpenDRIM_BootSettingData_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootSettingData& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int Boot_OpenDRIM_BootSettingData_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootSettingData& newInstance, const OpenDRIM_BootSettingData& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootSettingData_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootSettingData& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootSettingData_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootSettingData& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Boot_OpenDRIM_BootSettingData_populate(OpenDRIM_BootSettingData& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSettingData/OpenDRIM_BootSettingDataAccess.h0000644000175000017500000000554311400666205031167 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_BOOTSETTINGDATAACCESS_H_ #define OPENDRIM_BOOTSETTINGDATAACCESS_H_ #include "Boot_Common.h" #include "OpenDRIM_BootSettingData.h" int Boot_OpenDRIM_BootSettingData_load(const CMPIBroker* broker, string& errorMessage); int Boot_OpenDRIM_BootSettingData_unload(string& errorMessage); int Boot_OpenDRIM_BootSettingData_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Boot_OpenDRIM_BootSettingData_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BootSettingData& instance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootSettingData_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootSettingData& newInstance, const OpenDRIM_BootSettingData& oldInstance, const char** properties, string& errorMessage); int Boot_OpenDRIM_BootSettingData_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootSettingData& instance, string& errorMessage); int Boot_OpenDRIM_BootSettingData_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BootSettingData& instance, string& errorMessage); int Boot_OpenDRIM_BootSettingData_populate(OpenDRIM_BootSettingData& instance, string& errorMessage); #endif /*OPENDRIM_BOOTSETTINGDATAACCESS_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSettingData/cmpiOpenDRIM_BootSettingData.h0000644000175000017500000000421511400666205030711 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_BOOTSETTINGDATA_H_ #define CMPIOPENDRIM_BOOTSETTINGDATA_H_ #include "OpenDRIM_BootSettingData.h" CMPIObjectPath* Boot_OpenDRIM_BootSettingData_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BootSettingData& instance); CMPIInstance* Boot_OpenDRIM_BootSettingData_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BootSettingData& instance); void Boot_OpenDRIM_BootSettingData_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BootSettingData& instance); void Boot_OpenDRIM_BootSettingData_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BootSettingData& instance); #endif /*CMPIOPENDRIM_BOOTSETTINGDATA_H_*/ opendrim-lmp-boot-0.1.0~ppa/OpenDRIM_BootSettingData/OpenDRIM_BootSettingDataProvider.cpp0000644000175000017500000002506611400666205032115 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Boot provider package # Copyright (C) 2009 Nodir Nazarov # # 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 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_BootSettingData.h" #include "OpenDRIM_BootSettingDataAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Boot_OpenDRIM_BootSettingDataProviderSetInstance Boot_OpenDRIM_BootSettingDataProviderModifyInstance #endif int Boot_OpenDRIM_BootSettingData_init(const CMPIBroker* broker); int Boot_OpenDRIM_BootSettingData_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Boot_OpenDRIM_BootSettingDataProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Boot_OpenDRIM_BootSettingData_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootSettingDataProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Boot_OpenDRIM_BootSettingData_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Boot_OpenDRIM_BootSettingData_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootSettingDataProviderEnumInstances(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 = Boot_OpenDRIM_BootSettingData_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Boot_OpenDRIM_BootSettingData_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootSettingDataProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootSettingData instance; Boot_OpenDRIM_BootSettingData_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootSettingData_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Boot_OpenDRIM_BootSettingData_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootSettingDataProviderSetInstance(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_BootSettingData newInstance, oldInstance; Boot_OpenDRIM_BootSettingData_toCPP(_broker, ci, newInstance); Boot_OpenDRIM_BootSettingData_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Boot_OpenDRIM_BootSettingData_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootSettingData_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootSettingDataProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootSettingData instance; Boot_OpenDRIM_BootSettingData_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootSettingData_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BootSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootSettingData_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootSettingData_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Boot_OpenDRIM_BootSettingData_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootSettingDataProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BootSettingData instance; Boot_OpenDRIM_BootSettingData_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Boot_OpenDRIM_BootSettingData_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Boot_OpenDRIM_BootSettingData_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BootSettingData_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Boot_OpenDRIM_BootSettingDataProviderExecQuery(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 Boot_OpenDRIM_BootSettingData_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootSettingData_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootSettingData_init FAILED: " + (string) OpenDRIM_BootSettingData_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Boot_OpenDRIM_BootSettingData_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Boot_OpenDRIM_BootSettingData_unload(errorMessage); if (errorCode != OK) { errorMessage += "Boot_OpenDRIM_BootSettingData_unload FAILED: " + (string) OpenDRIM_BootSettingData_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Boot_OpenDRIM_BootSettingData_INIT if (Boot_OpenDRIM_BootSettingData_init(_broker) < 0) return NULL CMInstanceMIStub(Boot_OpenDRIM_BootSettingDataProvider, Boot_OpenDRIM_BootSettingDataProvider, _broker, Boot_OpenDRIM_BootSettingData_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-boot-0.1.0~ppa/README0000644000175000017500000000103311400666205017362 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.2 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!