opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/0000755000175000017500000000000011401066117022637 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/0000755000175000017500000000000011401066117034573 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/Makefile.amopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/M0000644000175000017500000000475211401066117034722 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProvider.la libcmpiSimple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProvider_la_SOURCES = OpenDRIM_RegisteredSimpleIdentityManagementProfileAccess.cpp OpenDRIM_RegisteredSimpleIdentityManagementProfileProvider.cpp cmpiOpenDRIM_RegisteredSimpleIdentityManagementProfile.cpp libcmpiSimple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la libcmpiSimple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_RegisteredSimpleIdentityManagementProfile.h OpenDRIM_RegisteredSimpleIdentityManagementProfile.h OpenDRIM_RegisteredSimpleIdentityManagementProfileAccess.h ././@LongLink0000000000000000000000000000023400000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/cmpiOpenDRIM_RegisteredSimpleIdentityManagementProfile.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/c0000644000175000017500000000524011401066117034741 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_REGISTEREDSIMPLEIDENTITYMANAGEMENTPROFILE_H_ #define CMPIOPENDRIM_REGISTEREDSIMPLEIDENTITYMANAGEMENTPROFILE_H_ #include "OpenDRIM_RegisteredSimpleIdentityManagementProfile.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance); void Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance); void Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance); #endif /*CMPIOPENDRIM_REGISTEREDSIMPLEIDENTITYMANAGEMENTPROFILE_H_*/ ././@LongLink0000000000000000000000000000023600000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/cmpiOpenDRIM_RegisteredSimpleIdentityManagementProfile.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/c0000644000175000017500000001240711401066117034744 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_RegisteredSimpleIdentityManagementProfile.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_RegisteredSimpleIdentityManagementProfile_classnames[0], OpenDRIM_RegisteredSimpleIdentityManagementProfile_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_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 Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RegisteredSimpleIdentityManagementProfile& 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_; } ././@LongLink0000000000000000000000000000024000000000000011561 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/OpenDRIM_RegisteredSimpleIdentityManagementProfileAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/O0000644000175000017500000001103211401066117034711 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_RegisteredSimpleIdentityManagementProfileAccess.h" const string InstanceID="OpenDRIM:SimpleIdentityManagement:1.0.1"; int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; OpenDRIM_RegisteredSimpleIdentityManagementProfile instance; instance.setInstanceID(InstanceID); if (discriminant=="ei") CF_assert(Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_populate(instance,errorMessage)); result.push_back(instance); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance, const char** properties, string& errorMessage) { _E_; if (instance.InstanceID!=InstanceID) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_populate(instance,errorMessage)); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSimpleIdentityManagementProfile& newInstance, const OpenDRIM_RegisteredSimpleIdentityManagementProfile& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_populate(OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance, string& errorMessage) { _E_; vector AdvertiseTypes; instance.setRegisteredName("Simple Identity Management"); instance.setRegisteredVersion("1.0.1"); instance.setRegisteredOrganization(2); // DMTF AdvertiseTypes.push_back(2); // Not Advertised instance.setAdvertiseTypes(AdvertiseTypes); _L_; return OK; } ././@LongLink0000000000000000000000000000024200000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/OpenDRIM_RegisteredSimpleIdentityManagementProfileProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/O0000644000175000017500000003232111401066117034715 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_RegisteredSimpleIdentityManagementProfile.h" #include "OpenDRIM_RegisteredSimpleIdentityManagementProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProviderSetInstance Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSimpleIdentityManagementProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSimpleIdentityManagementProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredSimpleIdentityManagementProfile instance; Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSimpleIdentityManagementProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProviderSetInstance(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_RegisteredSimpleIdentityManagementProfile newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSimpleIdentityManagementProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSimpleIdentityManagementProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredSimpleIdentityManagementProfile instance; Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_RegisteredSimpleIdentityManagementProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSimpleIdentityManagementProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSimpleIdentityManagementProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredSimpleIdentityManagementProfile instance; Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSimpleIdentityManagementProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSimpleIdentityManagementProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_init FAILED: " + (string) OpenDRIM_RegisteredSimpleIdentityManagementProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_unload FAILED: " + (string) OpenDRIM_RegisteredSimpleIdentityManagementProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_INIT if (Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProvider, Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProvider, _broker, Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000023600000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/OpenDRIM_RegisteredSimpleIdentityManagementProfileAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/O0000644000175000017500000000723211401066117034720 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_REGISTEREDSIMPLEIDENTITYMANAGEMENTPROFILEACCESS_H_ #define OPENDRIM_REGISTEREDSIMPLEIDENTITYMANAGEMENTPROFILEACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_RegisteredSimpleIdentityManagementProfile.h" int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSimpleIdentityManagementProfile& newInstance, const OpenDRIM_RegisteredSimpleIdentityManagementProfile& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_populate(OpenDRIM_RegisteredSimpleIdentityManagementProfile& instance, string& errorMessage); #endif /*OPENDRIM_REGISTEREDSIMPLEIDENTITYMANAGEMENTPROFILEACCESS_H_*/ ././@LongLink0000000000000000000000000000023000000000000011560 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/OpenDRIM_RegisteredSimpleIdentityManagementProfile.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_RegisteredSimpleIdentityManagementProfile/O0000644000175000017500000001415711401066117034724 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_REGISTEREDSIMPLEIDENTITYMANAGEMENTPROFILE_H_ #define OPENDRIM_REGISTEREDSIMPLEIDENTITYMANAGEMENTPROFILE_H_ #include const static char* OpenDRIM_RegisteredSimpleIdentityManagementProfile_classnames[] = {"OpenDRIM_RegisteredSimpleIdentityManagementProfile"}; static string OpenDRIM_RegisteredSimpleIdentityManagementProfile_NAMESPACE = _INTEROP_NAMESPACE; class OpenDRIM_RegisteredSimpleIdentityManagementProfile { 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_RegisteredSimpleIdentityManagementProfile() { 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_RegisteredSimpleIdentityManagementProfile() {} 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_REGISTEREDSIMPLEIDENTITYMANAGEMENTPROFILE_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/0000755000175000017500000000000011401066117034541 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000024000000000000011561 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/OpenDRIM_AccountManagementServiceConformsToProfileAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/O0000644000175000017500000003042611401066117034667 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_AccountManagementServiceConformsToProfileAccess.h" int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_RegisteredProfile_load(broker, errorMessage)); CF_assert(Simple_Identity_Management_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_RegisteredProfile_unload(errorMessage)); CF_assert(Simple_Identity_Management_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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; Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_referenceConformantStandardToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountManagementServiceConformsToProfile& 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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_getConformantStandard(broker, ctx, ConformantStandard_objectpath, ConformantStandard_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_isAssociated(ConformantStandard_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceConformsToProfile& newInstance, const OpenDRIM_AccountManagementServiceConformsToProfile& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_AccountManagementServiceConformsToProfile_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_AccountManagementServiceConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); OpenDRIM_AccountManagementServiceConformsToProfile_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_AccountManagementServiceConformsToProfile_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_AccountManagementServiceConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); OpenDRIM_AccountManagementServiceConformsToProfile_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_populate(OpenDRIM_AccountManagementServiceConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/Makefile.amopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/M0000644000175000017500000000575311401066117034672 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProvider_la_SOURCES = OpenDRIM_AccountManagementServiceConformsToProfileAccess.cpp OpenDRIM_AccountManagementServiceConformsToProfileProvider.cpp cmpiOpenDRIM_AccountManagementServiceConformsToProfile.cpp assocOpenDRIM_AccountManagementServiceConformsToProfile.cpp # May have to be adjusted for direct invocation libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProvider_la_CPPFLAGS = -I../CIM_RegisteredProfile -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la #../CIM_RegisteredProfile/libcmpiSimple_Identity_Management_CIM_RegisteredProfileProvider.la ../CIM_ManagedElement/libcmpiSimple_Identity_Management_CIM_ManagedElementProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_AccountManagementServiceConformsToProfile.h OpenDRIM_AccountManagementServiceConformsToProfile.h OpenDRIM_AccountManagementServiceConformsToProfileAccess.h ././@LongLink0000000000000000000000000000023500000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/assocOpenDRIM_AccountManagementServiceConformsToProfile.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/a0000644000175000017500000000713011401066117034705 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef ASSOCOPENDRIM_ACCOUNTMANAGEMENTSERVICECONFORMSTOPROFILE_H_ #define ASSOCOPENDRIM_ACCOUNTMANAGEMENTSERVICECONFORMSTOPROFILE_H_ #include "OpenDRIM_AccountManagementServiceConformsToProfileAccess.h" int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_enumerateConformantStandards(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_getConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_ACCOUNTMANAGEMENTSERVICECONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000023000000000000011560 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/OpenDRIM_AccountManagementServiceConformsToProfile.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/O0000644000175000017500000000774011401066117034672 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTMANAGEMENTSERVICECONFORMSTOPROFILE_H_ #define OPENDRIM_ACCOUNTMANAGEMENTSERVICECONFORMSTOPROFILE_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_AccountManagementServiceConformsToProfile_classnames[] = {"OpenDRIM_AccountManagementServiceConformsToProfile"}; static string OpenDRIM_AccountManagementServiceConformsToProfile_NAMESPACE = _INTEROP_NAMESPACE; const static string ConformantStandard_role = "ConformantStandard"; const static char* ConformantStandard_classnames[] = {"OpenDRIM_RegisteredSimpleIdentityManagementProfile"}; const static string ConformantStandard_NAMESPACE = _INTEROP_NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_AccountManagementService"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_AccountManagementServiceConformsToProfile { public: Objectpath ConformantStandard; bool ConformantStandard_isNULL; Objectpath ManagedElement; bool ManagedElement_isNULL; OpenDRIM_AccountManagementServiceConformsToProfile() { ConformantStandard_isNULL = true; ManagedElement_isNULL = true; } ~OpenDRIM_AccountManagementServiceConformsToProfile() {} 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_ACCOUNTMANAGEMENTSERVICECONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000023700000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/assocOpenDRIM_AccountManagementServiceConformsToProfile.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/a0000644000175000017500000002314511401066117034711 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "assocOpenDRIM_AccountManagementServiceConformsToProfile.h" int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_associatorManagedElementToConformantStandard(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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(Simple_Identity_Management_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_RegisteredProfile_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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; Simple_Identity_Management_CIM_RegisteredProfile_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_RegisteredProfile_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_RegisteredProfile_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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; Simple_Identity_Management_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000023400000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/cmpiOpenDRIM_AccountManagementServiceConformsToProfile.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/c0000644000175000017500000000524011401066117034707 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_ACCOUNTMANAGEMENTSERVICECONFORMSTOPROFILE_H_ #define CMPIOPENDRIM_ACCOUNTMANAGEMENTSERVICECONFORMSTOPROFILE_H_ #include "OpenDRIM_AccountManagementServiceConformsToProfile.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountManagementServiceConformsToProfile& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountManagementServiceConformsToProfile& instance); void Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountManagementServiceConformsToProfile& instance); void Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountManagementServiceConformsToProfile& instance); #endif /*CMPIOPENDRIM_ACCOUNTMANAGEMENTSERVICECONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000023600000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/cmpiOpenDRIM_AccountManagementServiceConformsToProfile.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/c0000644000175000017500000000717211401066117034715 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementServiceConformsToProfile.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountManagementServiceConformsToProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0], OpenDRIM_AccountManagementServiceConformsToProfile_NAMESPACE); if (!instance.ConformantStandard_isNULL) op.addKey("ConformantStandard", instance.ConformantStandard); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountManagementServiceConformsToProfile& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountManagementServiceConformsToProfile& 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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountManagementServiceConformsToProfile& 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_; } ././@LongLink0000000000000000000000000000024200000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/OpenDRIM_AccountManagementServiceConformsToProfileProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/O0000644000175000017500000005036711401066117034675 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementServiceConformsToProfile.h" #include "OpenDRIM_AccountManagementServiceConformsToProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderSetInstance Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementServiceConformsToProfile instance; Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderSetInstance(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_AccountManagementServiceConformsToProfile newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementServiceConformsToProfile instance; Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementServiceConformsToProfile instance; Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderAssociatorNames(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderAssociators(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderReferenceNames(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProviderReferences(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_init FAILED: " + (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_unload FAILED: " + (string) OpenDRIM_AccountManagementServiceConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_INIT if (Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProvider, Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_INIT); CMAssociationMIStub(Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProvider, Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000023600000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/OpenDRIM_AccountManagementServiceConformsToProfileAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceConformsToProfile/O0000644000175000017500000001251511401066117034666 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTMANAGEMENTSERVICECONFORMSTOPROFILEACCESS_H_ #define OPENDRIM_ACCOUNTMANAGEMENTSERVICECONFORMSTOPROFILEACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_AccountManagementServiceConformsToProfile.h" #include "assocOpenDRIM_AccountManagementServiceConformsToProfile.h" int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountManagementServiceConformsToProfile& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceConformsToProfile& newInstance, const OpenDRIM_AccountManagementServiceConformsToProfile& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceConformsToProfile& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceConformsToProfile& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_associatorConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_associatorManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& ConformantStandard_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_referenceConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const vector& ManagedElement_instances, vector& OpenDRIM_AccountManagementServiceConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_AccountManagementServiceConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_populate(OpenDRIM_AccountManagementServiceConformsToProfile& instance, string& errorMessage); #endif /*OPENDRIM_ACCOUNTMANAGEMENTSERVICECONFORMSTOPROFILEACCESS_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/Makefile.am0000644000175000017500000001314611401066117024700 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# VENDOR = OpenDRIM VERSION = $(shell cat ./VERSION) APP_NAME = opendrim-lmp-simpleidentitymanagement RPM_PACKAGE_DIR = packaging PLATFORM = $(shell rpm --eval %_target_cpu) WORKING_DIR = $(shell pwd) SUBDIRS = Common OpenDRIM_Group OpenDRIM_Account OpenDRIM_AccountCapabilities OpenDRIM_AccountIdentity OpenDRIM_AccountManagementService OpenDRIM_RegisteredSimpleIdentityManagementProfile OpenDRIM_GroupIdentity OpenDRIM_AccountManagementCapabilities OpenDRIM_AccountOnSystem OpenDRIM_AccountAssignedIdentity OpenDRIM_GroupAssignedIdentity OpenDRIM_AccountManagementServiceAffectsIdentity OpenDRIM_HostedAccountManagementService OpenDRIM_AccountManagementServiceConformsToProfile OpenDRIM_AccountManagementServiceCapabilities OpenDRIM_AccountAssociatedCapabilities OpenDRIM_IdentityInGroup OpenDRIM_GroupOnSystem test postinstall: registration/Simple_Identity_Management.sh @CIMNAMESPACE@ $(VENDOR) @CIMSERVER@ @INTEROPNAMESPACE@ $(VERSION) . preuninstall: registration/Simple_Identity_Management-remove.sh @CIMNAMESPACE@ @CIMSERVER@ @INTEROPNAMESPACE@ . test-OpenDRIM_AccountOnSystem: all make -C test test-OpenDRIM_AccountOnSystem test-OpenDRIM_AccountCapabilities: all make -C test test-OpenDRIM_AccountCapabilities test-OpenDRIM_AccountIdentity: all make -C test test-OpenDRIM_AccountIdentity test-OpenDRIM_AccountAssignedIdentity: all make -C test test-OpenDRIM_AccountAssignedIdentity test-OpenDRIM_GroupAssignedIdentity: all make -C test test-OpenDRIM_GroupAssignedIdentity test-OpenDRIM_AccountManagementServiceAffectsIdentity: all make -C test test-OpenDRIM_AccountManagementServiceAffectsIdentity test-OpenDRIM_AccountManagementService: all make -C test test-OpenDRIM_AccountManagementService test-OpenDRIM_HostedAccountManagementService: all make -C test test-OpenDRIM_HostedAccountManagementService test-OpenDRIM_RegisteredSimpleIdentityManagementProfile: all make -C test test-OpenDRIM_RegisteredSimpleIdentityManagementProfile test-OpenDRIM_AccountManagementServiceConformsToProfile: all make -C test test-OpenDRIM_AccountManagementServiceConformsToProfile test-OpenDRIM_Group: all make -C test test-OpenDRIM_Group test-OpenDRIM_AccountManagementServiceCapabilities: all make -C test test-OpenDRIM_AccountManagementServiceCapabilities test-OpenDRIM_AccountAssociatedCapabilities: all make -C test test-OpenDRIM_AccountAssociatedCapabilities test-OpenDRIM_GroupIdentity: all make -C test test-OpenDRIM_GroupIdentity test-OpenDRIM_IdentityInGroup: all make -C test test-OpenDRIM_IdentityInGroup test-OpenDRIM_AccountManagementCapabilities: all make -C test test-OpenDRIM_AccountManagementCapabilities test-OpenDRIM_Account: all make -C test test-OpenDRIM_Account test-OpenDRIM_GroupOnSystem: all make -C test test-OpenDRIM_GroupOnSystem 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-simpleidentitymanagement-1.0.0~ppa/registration/0000755000175000017500000000000011401066117025351 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountAssignedIdentity-remove.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountAssignedIdentity-remove0000755000175000017500000000666611401066117035031 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityModule 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_AccountAssignedIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementService-remove.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementService-remov0000755000175000017500000000667411401066117035011 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_AccountManagementServiceModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_AccountManagementServiceModule 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_AccountManagementService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementServiceCapabilities-remove.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementServiceCapabi0000755000175000017500000000707011401066117034752 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesModule 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_AccountManagementServiceCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_GroupIdentity-remove.sh0000755000175000017500000000650611401066117033455 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_GroupIdentityModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_GroupIdentityModule 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_GroupIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementServiceAffectsIdentity-remove.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementServiceAffect0000755000175000017500000000712611401066117034765 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityModule 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_AccountManagementServiceAffectsIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementServiceConformsToProfile.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementServiceConfor0000755000175000017500000001027111401066117035016 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_AccountManagementServiceConformsToProfile.mof cimmof -aE -n $4 $6/mof/OpenDRIM_AccountManagementServiceConformsToProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_AccountManagementServiceConformsToProfile provider module"; Name = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_AccountManagementServiceConformsToProfile provider"; Name = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_AccountManagementServiceConformsToProfile provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProvider"; ClassName = "OpenDRIM_AccountManagementServiceConformsToProfile"; ProviderType = {2, 3}; Namespaces = {"$1", "$4"}; SupportedProperties = {"ConformantStandard", "ManagedElement"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_AccountManagementServiceConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_Account-remove.sh0000755000175000017500000000642111401066117032237 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_AccountModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_AccountModule 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_Account.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_Account.sh0000755000175000017500000001023511401066117030742 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_Account.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_Account provider module"; Name = "Simple_Identity_Management_OpenDRIM_AccountModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_AccountProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_Account provider"; Name = "Simple_Identity_Management_OpenDRIM_AccountProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_Account provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_AccountProvider"; ClassName = "OpenDRIM_Account"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstallDate", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "EnabledState", "OtherEnabledState", "RequestedState", "EnabledDefault", "TimeOfLastStateChange", "AvailableRequestedStates", "TransitioningToState", "SystemCreationClassName", "SystemName", "CreationClassName", "Name", "UserID", "ObjectClass", "Descriptions", "Host", "LocalityName", "OrganizationName", "OU", "SeeAlso", "UserCertificate", "UserPassword", "PasswordHistoryDepth", "PasswordExpiration", "ComplexPasswordRulesEnforced", "InactivityTimeout", "MaximumSuccessiveLoginFailures", "LastLogin", "PasswordLastChange", "AccountExpiration", "PrimaryGroup", "LoginShell", "HomeDirectory"}; SupportedMethods = {"RequestStateChange", "CreateHomeDirectory", "DeleteHomeDirectory"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_Account"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_Account.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_RegisteredSimpleIdentityManagementProfile.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_RegisteredSimpleIdentityManage0000755000175000017500000001015411401066117035027 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $4 $6/mof/OpenDRIM_RegisteredSimpleIdentityManagementProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_RegisteredSimpleIdentityManagementProfile provider module"; Name = "Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_RegisteredSimpleIdentityManagementProfile provider"; Name = "Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_RegisteredSimpleIdentityManagementProfile provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProvider"; ClassName = "OpenDRIM_RegisteredSimpleIdentityManagementProfile"; ProviderType = {2}; Namespaces = {"$4"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID", "RegisteredOrganization", "OtherRegisteredOrganization", "RegisteredName", "RegisteredVersion", "AdvertiseTypes", "AdvertiseTypeDescriptions"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_RegisteredSimpleIdentityManagementProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementCapabilities.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementCapabilities.0000755000175000017500000000772211401066117034725 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_AccountManagementCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_AccountManagementCapabilities provider module"; Name = "Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_AccountManagementCapabilities provider"; Name = "Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_AccountManagementCapabilities provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProvider"; ClassName = "OpenDRIM_AccountManagementCapabilities"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "InstanceID", "ElementName", "MaxElementNameLen", "RequestedStatesSupported", "ElementNameMask", "StateAwareness", "RequestedStateSupported", "ElementNameEditSupported", "OperationsSupported"}; SupportedMethods = {"CreateGoalSettings"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_AccountManagementCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_Group-remove.sh0000755000175000017500000000636611401066117031747 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_GroupModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_GroupModule 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_Group.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementServiceCapabilities.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementServiceCapabi0000755000175000017500000000761311401066117034755 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_AccountManagementServiceCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_AccountManagementServiceCapabilities provider module"; Name = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_AccountManagementServiceCapabilities provider"; Name = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_AccountManagementServiceCapabilities provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProvider"; ClassName = "OpenDRIM_AccountManagementServiceCapabilities"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"ManagedElement", "Capabilities", "Characteristics"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_AccountManagementServiceCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_Identity-remove.sh0000755000175000017500000000532211401066117032433 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then 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 sfcbunstage -n $1 OpenDRIM_Identity.mof sfcbrepos -f fi if test "$2" = openwbem then owmofc -u http://localhost/$1 -r $4/mof/OpenDRIM_Identity.mof fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_Group.sh0000755000175000017500000000655511401066117030454 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_Group.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_Group provider module"; Name = "Simple_Identity_Management_OpenDRIM_GroupModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_GroupProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_Group provider"; Name = "Simple_Identity_Management_OpenDRIM_GroupProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_GroupModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_Group provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_GroupModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_GroupProvider"; ClassName = "OpenDRIM_Group"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "CreationClassName", "Name", "BusinessCategory", "CommonName", "GroupID"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_Group"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_Group.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_GroupOnSystem-remove.sh0000755000175000017500000000652211401066117033443 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_GroupOnSystemModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_GroupOnSystemModule 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_GroupOnSystem.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_IdentityInGroup-remove.sh0000755000175000017500000000654611401066117033750 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_IdentityInGroupModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_IdentityInGroupModule 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_IdentityInGroup.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountAssociatedCapabilities.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountAssociatedCapabilities.0000755000175000017500000000740611401066117034727 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_AccountAssociatedCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_AccountAssociatedCapabilities provider module"; Name = "Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_AccountAssociatedCapabilities provider"; Name = "Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_AccountAssociatedCapabilities provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProvider"; ClassName = "OpenDRIM_AccountAssociatedCapabilities"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"ManagedElement", "Capabilities", "Characteristics"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_AccountAssociatedCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementServiceAffectsIdentity.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementServiceAffect0000755000175000017500000001002111401066117034751 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_AccountManagementServiceAffectsIdentity.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_AccountManagementServiceAffectsIdentity provider module"; Name = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_AccountManagementServiceAffectsIdentity provider"; Name = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_AccountManagementServiceAffectsIdentity provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProvider"; ClassName = "OpenDRIM_AccountManagementServiceAffectsIdentity"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"AffectedElement", "AffectingElement", "ElementEffects", "OtherElementEffectsDescriptions", "AssignedSequence", "ElementAffects"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_AccountManagementServiceAffectsIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_GroupAssignedIdentity.sh0000755000175000017500000000713311401066117033635 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_GroupAssignedIdentity.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_GroupAssignedIdentity provider module"; Name = "Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_GroupAssignedIdentityProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_GroupAssignedIdentity provider"; Name = "Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_GroupAssignedIdentity provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProvider"; ClassName = "OpenDRIM_GroupAssignedIdentity"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"IdentityInfo", "ManagedElement"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_GroupAssignedIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_HostedAccountManagementService.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_HostedAccountManagementService0000755000175000017500000000737711401066117035033 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_HostedAccountManagementService.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_HostedAccountManagementService provider module"; Name = "Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_HostedAccountManagementService provider"; Name = "Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_HostedAccountManagementService provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProvider"; ClassName = "OpenDRIM_HostedAccountManagementService"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_HostedAccountManagementService"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_HostedAccountManagementService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountIdentity.sh0000755000175000017500000000701111401066117032452 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_AccountIdentity.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_AccountIdentity provider module"; Name = "Simple_Identity_Management_OpenDRIM_AccountIdentityModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_AccountIdentityProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_AccountIdentity provider"; Name = "Simple_Identity_Management_OpenDRIM_AccountIdentityProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountIdentityModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_AccountIdentity provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountIdentityModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_AccountIdentityProvider"; ClassName = "OpenDRIM_AccountIdentity"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID", "CurrentlyAuthenticated"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_AccountIdentity"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_AccountIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementCapabilities-remove.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementCapabilities-0000755000175000017500000000675511401066117034731 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesModule 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_AccountManagementCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountIdentity-remove.sh0000755000175000017500000000653211401066117033754 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_AccountIdentityModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_AccountIdentityModule 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_AccountIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_IdentityInGroup.sh0000755000175000017500000000676111401066117032454 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_IdentityInGroup.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_IdentityInGroup provider module"; Name = "Simple_Identity_Management_OpenDRIM_IdentityInGroupModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_IdentityInGroupProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_IdentityInGroup provider"; Name = "Simple_Identity_Management_OpenDRIM_IdentityInGroupProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_IdentityInGroupModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_IdentityInGroup provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_IdentityInGroupModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_IdentityInGroupProvider"; ClassName = "OpenDRIM_IdentityInGroup"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Collection", "Member", "IsPrimaryGroup"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_IdentityInGroup"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_IdentityInGroup.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_GroupOnSystem.sh0000755000175000017500000000670211401066117032150 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_GroupOnSystem.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_GroupOnSystem provider module"; Name = "Simple_Identity_Management_OpenDRIM_GroupOnSystemModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_GroupOnSystemProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_GroupOnSystem provider"; Name = "Simple_Identity_Management_OpenDRIM_GroupOnSystemProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_GroupOnSystemModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_GroupOnSystem provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_GroupOnSystemModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_GroupOnSystemProvider"; ClassName = "OpenDRIM_GroupOnSystem"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"OwningElement", "OwnedElement"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_GroupOnSystem"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_GroupOnSystem.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountAssociatedCapabilities-remove.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountAssociatedCapabilities-0000755000175000017500000000676211401066117034732 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesModule 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_AccountAssociatedCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementService.sh0000755000175000017500000001033211401066117034256 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_AccountManagementService.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_AccountManagementService provider module"; Name = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_AccountManagementService provider"; Name = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_AccountManagementService provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_AccountManagementServiceProvider"; ClassName = "OpenDRIM_AccountManagementService"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstallDate", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "EnabledState", "OtherEnabledState", "RequestedState", "EnabledDefault", "TimeOfLastStateChange", "AvailableRequestedStates", "TransitioningToState", "SystemCreationClassName", "SystemName", "CreationClassName", "Name", "PrimaryOwnerName", "PrimaryOwnerContact", "StartMode", "Started"}; SupportedMethods = {"RequestStateChange", "StartService", "StopService", "ChangeAffectedElementsAssignedSequence", "CreateAccount"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_AccountManagementService"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_AccountManagementService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountOnSystem.sh0000755000175000017500000000675211401066117032455 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_AccountOnSystem.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_AccountOnSystem provider module"; Name = "Simple_Identity_Management_OpenDRIM_AccountOnSystemModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_AccountOnSystemProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_AccountOnSystem provider"; Name = "Simple_Identity_Management_OpenDRIM_AccountOnSystemProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountOnSystemModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_AccountOnSystem provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountOnSystemModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_AccountOnSystemProvider"; ClassName = "OpenDRIM_AccountOnSystem"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"GroupComponent", "PartComponent"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_AccountOnSystem"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_AccountOnSystem.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/Simple_Identity_Management.sh0000755000175000017500000000643111404352212033147 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # 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_Identity.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_AccountOnSystem.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_AccountCapabilities.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_AccountIdentity.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_AccountAssignedIdentity.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_GroupAssignedIdentity.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_AccountManagementServiceAffectsIdentity.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_AccountManagementService.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_HostedAccountManagementService.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_RegisteredSimpleIdentityManagementProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_AccountManagementServiceConformsToProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_Group.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_AccountManagementServiceCapabilities.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_AccountAssociatedCapabilities.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_GroupIdentity.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_IdentityInGroup.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_AccountManagementCapabilities.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_Account.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_GroupOnSystem.sh $1 $2 $3 $4 $5 $6 if test "$3" = sfcb then /etc/init.d/sfcb start fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/Simple_Identity_Management-remove.sh0000755000175000017500000000645411404352203034447 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # 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_GroupOnSystem-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_Account-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_AccountManagementCapabilities-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_IdentityInGroup-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_GroupIdentity-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_AccountAssociatedCapabilities-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_AccountManagementServiceCapabilities-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_Group-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_AccountManagementServiceConformsToProfile-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_RegisteredSimpleIdentityManagementProfile-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_HostedAccountManagementService-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_AccountManagementService-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_AccountManagementServiceAffectsIdentity-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_GroupAssignedIdentity-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_AccountAssignedIdentity-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_AccountIdentity-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_AccountCapabilities-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_AccountOnSystem-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_Identity-remove.sh $1 $2 $3 $4 if test "$2" = sfcb then /etc/init.d/sfcb start fi ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_RegisteredSimpleIdentityManagementProfile-remove.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_RegisteredSimpleIdentityManage0000755000175000017500000000713611401066117035035 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileModule 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_RegisteredSimpleIdentityManagementProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_GroupIdentity.sh0000755000175000017500000000674311401066117032165 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_GroupIdentity.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_GroupIdentity provider module"; Name = "Simple_Identity_Management_OpenDRIM_GroupIdentityModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_GroupIdentityProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_GroupIdentity provider"; Name = "Simple_Identity_Management_OpenDRIM_GroupIdentityProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_GroupIdentityModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_GroupIdentity provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_GroupIdentityModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_GroupIdentityProvider"; ClassName = "OpenDRIM_GroupIdentity"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID", "CurrentlyAuthenticated"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_GroupIdentity"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_GroupIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_Identity.sh0000755000175000017500000000357511401066117031150 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_Identity.mof fi if test "$3" = sfcb then sfcbstage -n $1 $6/mof/OpenDRIM_Identity.mof sfcbrepos -f fi if test "$3" = openwbem then owmofc -u http://localhost/$1 $6/mof/OpenDRIM_Identity.mof fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountCapabilities.sh0000755000175000017500000000760711401066117033265 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_AccountCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_AccountCapabilities provider module"; Name = "Simple_Identity_Management_OpenDRIM_AccountCapabilitiesModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_AccountCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_AccountCapabilities provider"; Name = "Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_AccountCapabilities provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountCapabilitiesModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProvider"; ClassName = "OpenDRIM_AccountCapabilities"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "InstanceID", "ElementName", "MaxElementNameLen", "RequestedStatesSupported", "ElementNameMask", "StateAwareness", "PasswordHistory", "MaximumPasswordAge", "ComplexPasswordRulesSupported", "DisableOnInactivity", "RequestedStateSupported", "ElementNameEditSupported", "DisableTimeoutAfterPasswordExpiration"}; SupportedMethods = {"CreateGoalSettings"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_AccountCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_AccountCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountOnSystem-remove.sh0000755000175000017500000000654611401066117033751 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_AccountOnSystemModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_AccountOnSystemModule 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_AccountOnSystem.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementServiceConformsToProfile-remove.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountManagementServiceConfor0000755000175000017500000001113211401066117035013 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileModule 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_AccountManagementServiceConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_HostedAccountManagementService-remove.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_HostedAccountManagementService0000755000175000017500000000677411401066117035033 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceModule 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_HostedAccountManagementService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountCapabilities-remove.sh0000755000175000017500000000661111401066117034552 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_AccountCapabilitiesModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_AccountCapabilitiesModule 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_AccountCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_GroupAssignedIdentity-remove.shopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_GroupAssignedIdentity-remove.s0000755000175000017500000000664211401066117034764 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$2" = pegasus then cimprovider -d -m Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityModule cimprovider -r -m Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityModule 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_GroupAssignedIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/registration/OpenDRIM_AccountAssignedIdentity.sh0000755000175000017500000000720111401066117034131 0ustar guillaumeguillaume#!/bin/bash ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_AccountAssignedIdentity.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_AccountAssignedIdentity provider module"; Name = "Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityModule"; Location = "cmpiSimple_Identity_Management_OpenDRIM_AccountAssignedIdentityProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_AccountAssignedIdentity provider"; Name = "Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProvider"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_AccountAssignedIdentity provider capabilities"; ProviderModuleName = "Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityModule"; ProviderName = "Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProvider"; ClassName = "OpenDRIM_AccountAssignedIdentity"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"IdentityInfo", "ManagedElement"}; CapabilityID = "Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_AccountAssignedIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/0000755000175000017500000000000011401066117032202 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/assocOpenDRIM_AccountAssociatedCapabilities.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/assocOpenDRIM0000644000175000017500000000672411401066117034544 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef ASSOCOPENDRIM_ACCOUNTASSOCIATEDCAPABILITIES_H_ #define ASSOCOPENDRIM_ACCOUNTASSOCIATEDCAPABILITIES_H_ #include "OpenDRIM_AccountAssociatedCapabilitiesAccess.h" int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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 Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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 Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_enumerateCapabilitiess(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_getCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_ACCOUNTASSOCIATEDCAPABILITIES_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/Makefile.am0000644000175000017500000000551411401066117034243 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProvider_la_SOURCES = OpenDRIM_AccountAssociatedCapabilitiesAccess.cpp OpenDRIM_AccountAssociatedCapabilitiesProvider.cpp cmpiOpenDRIM_AccountAssociatedCapabilities.cpp assocOpenDRIM_AccountAssociatedCapabilities.cpp # May have to be adjusted for direct invocation libcmpiSimple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProvider_la_CPPFLAGS = -I../CIM_Capabilities -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiSimple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la #../CIM_Capabilities/libcmpiSimple_Identity_Management_CIM_CapabilitiesProvider.la ../CIM_ManagedElement/libcmpiSimple_Identity_Management_CIM_ManagedElementProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_AccountAssociatedCapabilities.h OpenDRIM_AccountAssociatedCapabilities.h OpenDRIM_AccountAssociatedCapabilitiesAccess.h ././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/OpenDRIM_AccountAssociatedCapabilitiesAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/OpenDRIM_Acco0000644000175000017500000002766011401066117034442 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_AccountAssociatedCapabilitiesAccess.h" int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_Capabilities_load(broker, errorMessage)); CF_assert(Simple_Identity_Management_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_Capabilities_unload(errorMessage)); CF_assert(Simple_Identity_Management_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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 Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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; Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_referenceCapabilitiesToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountAssociatedCapabilities& 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(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_getCapabilities(broker, ctx, Capabilities_objectpath, Capabilities_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_isAssociated(Capabilities_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_populate(instance, errorMessage)); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountAssociatedCapabilities& newInstance, const OpenDRIM_AccountAssociatedCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountAssociatedCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountAssociatedCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_AccountAssociatedCapabilities_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_AccountAssociatedCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_populate(instance, errorMessage)); } OpenDRIM_AccountAssociatedCapabilities_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_AccountAssociatedCapabilities_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_AccountAssociatedCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_populate(instance, errorMessage)); } OpenDRIM_AccountAssociatedCapabilities_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_populate(OpenDRIM_AccountAssociatedCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/cmpiOpenDRIM_AccountAssociatedCapabilities.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/cmpiOpenDRIM_0000644000175000017500000000502011401066117034507 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_ACCOUNTASSOCIATEDCAPABILITIES_H_ #define CMPIOPENDRIM_ACCOUNTASSOCIATEDCAPABILITIES_H_ #include "OpenDRIM_AccountAssociatedCapabilities.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountAssociatedCapabilities& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountAssociatedCapabilities& instance); void Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountAssociatedCapabilities& instance); void Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountAssociatedCapabilities& instance); #endif /*CMPIOPENDRIM_ACCOUNTASSOCIATEDCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/assocOpenDRIM_AccountAssociatedCapabilities.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/assocOpenDRIM0000644000175000017500000002243511401066117034541 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "assocOpenDRIM_AccountAssociatedCapabilities.h" int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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 = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_associatorManagedElementToCapabilities(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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(Simple_Identity_Management_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_Capabilities_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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; Simple_Identity_Management_CIM_Capabilities_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_Capabilities_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_Capabilities_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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; Simple_Identity_Management_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/OpenDRIM_AccountAssociatedCapabilitiesProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/OpenDRIM_Acco0000644000175000017500000004624711401066117034444 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountAssociatedCapabilities.h" #include "OpenDRIM_AccountAssociatedCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderSetInstance Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountAssociatedCapabilities instance; Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderSetInstance(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_AccountAssociatedCapabilities newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountAssociatedCapabilities instance; Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountAssociatedCapabilities instance; Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderAssociatorNames(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 = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_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 Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderAssociators(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 = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_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 Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderReferenceNames(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 = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProviderReferences(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 = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_init FAILED: " + (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_unload FAILED: " + (string) OpenDRIM_AccountAssociatedCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_INIT if (Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProvider, Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_INIT); CMAssociationMIStub(Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProvider, Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/OpenDRIM_AccountAssociatedCapabilitiesAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/OpenDRIM_Acco0000644000175000017500000001171511401066117034434 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTASSOCIATEDCAPABILITIESACCESS_H_ #define OPENDRIM_ACCOUNTASSOCIATEDCAPABILITIESACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_AccountAssociatedCapabilities.h" #include "assocOpenDRIM_AccountAssociatedCapabilities.h" int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountAssociatedCapabilities& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountAssociatedCapabilities& newInstance, const OpenDRIM_AccountAssociatedCapabilities& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountAssociatedCapabilities& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountAssociatedCapabilities& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_associatorCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_associatorManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& Capabilities_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_referenceCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const vector& ManagedElement_instances, vector& OpenDRIM_AccountAssociatedCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_AccountAssociatedCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_populate(OpenDRIM_AccountAssociatedCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_ACCOUNTASSOCIATEDCAPABILITIESACCESS_H_*/ ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/cmpiOpenDRIM_AccountAssociatedCapabilities.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/cmpiOpenDRIM_0000644000175000017500000000722111401066117034514 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountAssociatedCapabilities.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountAssociatedCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_AccountAssociatedCapabilities_classnames[0], OpenDRIM_AccountAssociatedCapabilities_NAMESPACE); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); if (!instance.Capabilities_isNULL) op.addKey("Capabilities", instance.Capabilities); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountAssociatedCapabilities& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Characteristics_isNULL) ci.setProperty("Characteristics", instance.Characteristics); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountAssociatedCapabilities& 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 Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountAssociatedCapabilities& 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_; } ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/OpenDRIM_AccountAssociatedCapabilities.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssociatedCapabilities/OpenDRIM_Acco0000644000175000017500000001015711401066117034433 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTASSOCIATEDCAPABILITIES_H_ #define OPENDRIM_ACCOUNTASSOCIATEDCAPABILITIES_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_AccountAssociatedCapabilities_classnames[] = {"OpenDRIM_AccountAssociatedCapabilities"}; static string OpenDRIM_AccountAssociatedCapabilities_NAMESPACE = _NAMESPACE; const static string Capabilities_role = "Capabilities"; const static char* Capabilities_classnames[] = {"OpenDRIM_AccountCapabilities"}; const static string Capabilities_NAMESPACE = _NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_Account"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_AccountAssociatedCapabilities { public: Objectpath ManagedElement; bool ManagedElement_isNULL; Objectpath Capabilities; bool Capabilities_isNULL; vector Characteristics; bool Characteristics_isNULL; OpenDRIM_AccountAssociatedCapabilities() { ManagedElement_isNULL = true; Capabilities_isNULL = true; Characteristics_isNULL = true; } ~OpenDRIM_AccountAssociatedCapabilities() {} 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_ACCOUNTASSOCIATEDCAPABILITIES_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/VERSION0000644000175000017500000000000611401066117023703 0ustar guillaumeguillaume1.0.0 opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/0000755000175000017500000000000011401066117027372 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/OpenDRIM_AccountOnSystemAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/OpenDRIM_AccountOnSystemAcc0000644000175000017500000002566711401066117034477 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_AccountOnSystemAccess.h" int Simple_Identity_Management_OpenDRIM_AccountOnSystem_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_Account_load(broker, errorMessage)); CF_assert(Simple_Identity_Management_CIM_System_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountOnSystem_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_Account_unload(errorMessage)); CF_assert(Simple_Identity_Management_CIM_System_unload(errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountOnSystem_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 Simple_Identity_Management_OpenDRIM_AccountOnSystem_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(Simple_Identity_Management_OpenDRIM_AccountOnSystem_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(Simple_Identity_Management_OpenDRIM_AccountOnSystem_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; Simple_Identity_Management_OpenDRIM_AccountOnSystem_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(Simple_Identity_Management_OpenDRIM_AccountOnSystem_referencePartComponentToGroupComponent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountOnSystem_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountOnSystem& 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(Simple_Identity_Management_OpenDRIM_AccountOnSystem_getPartComponent(broker, ctx, PartComponent_objectpath, PartComponent_instance, NULL, errorMessage)); Objectpath GroupComponent_objectpath; instance.getGroupComponent(GroupComponent_objectpath); Instance GroupComponent_instance; CF_assert(Simple_Identity_Management_OpenDRIM_AccountOnSystem_getGroupComponent(broker, ctx, GroupComponent_objectpath, GroupComponent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Simple_Identity_Management_OpenDRIM_AccountOnSystem_isAssociated(PartComponent_instance, GroupComponent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountOnSystem_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountOnSystem& newInstance, const OpenDRIM_AccountOnSystem& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountOnSystem_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountOnSystem& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountOnSystem_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountOnSystem& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountOnSystem_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(Simple_Identity_Management_OpenDRIM_AccountOnSystem_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_AccountOnSystem_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(Simple_Identity_Management_OpenDRIM_AccountOnSystem_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(Simple_Identity_Management_OpenDRIM_AccountOnSystem_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_AccountOnSystem_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(Simple_Identity_Management_OpenDRIM_AccountOnSystem_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); } for (size_t i=0; i& GroupComponent_instances, vector& OpenDRIM_AccountOnSystem_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_AccountOnSystem instance; instance.setPartComponent(((Instance) PartComponent_instance).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instances[i]).getObjectpath()); OpenDRIM_AccountOnSystem_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountOnSystem_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_AccountOnSystem_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_AccountOnSystem instance; instance.setPartComponent(((Instance) PartComponent_instances[i]).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instance).getObjectpath()); OpenDRIM_AccountOnSystem_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountOnSystem_populate(OpenDRIM_AccountOnSystem& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/cmpiOpenDRIM_AccountOnSystem.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/cmpiOpenDRIM_AccountOnSyste0000644000175000017500000000642511401066117034553 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountOnSystem.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountOnSystem& instance) { _E_; Objectpath op(broker, OpenDRIM_AccountOnSystem_classnames[0], OpenDRIM_AccountOnSystem_NAMESPACE); if (!instance.GroupComponent_isNULL) op.addKey("GroupComponent", instance.GroupComponent); if (!instance.PartComponent_isNULL) op.addKey("PartComponent", instance.PartComponent); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountOnSystem& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountOnSystem& 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 Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountOnSystem& 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-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/Makefile.am0000644000175000017500000000517511401066117031436 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_AccountOnSystemProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountOnSystemProvider_la_SOURCES = OpenDRIM_AccountOnSystemAccess.cpp OpenDRIM_AccountOnSystemProvider.cpp cmpiOpenDRIM_AccountOnSystem.cpp assocOpenDRIM_AccountOnSystem.cpp # May have to be adjusted for direct invocation libcmpiSimple_Identity_Management_OpenDRIM_AccountOnSystemProvider_la_CPPFLAGS = -I../CIM_Account -I../CIM_System # Uncomment the end for direct invocation, may have to be adjusted libcmpiSimple_Identity_Management_OpenDRIM_AccountOnSystemProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la #../CIM_Account/libcmpiSimple_Identity_Management_CIM_AccountProvider.la ../CIM_System/libcmpiSimple_Identity_Management_CIM_SystemProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountOnSystemProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_AccountOnSystem.h OpenDRIM_AccountOnSystem.h OpenDRIM_AccountOnSystemAccess.h ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/assocOpenDRIM_AccountOnSystem.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/assocOpenDRIM_AccountOnSyst0000644000175000017500000002174511401066117034570 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "assocOpenDRIM_AccountOnSystem.h" int Simple_Identity_Management_OpenDRIM_AccountOnSystem_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 = Simple_Identity_Management_OpenDRIM_AccountOnSystem_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(Simple_Identity_Management_OpenDRIM_AccountOnSystem_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(Simple_Identity_Management_OpenDRIM_AccountOnSystem_associatorGroupComponentToPartComponent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountOnSystem_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(Simple_Identity_Management_CIM_Account_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_Account_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_Account_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountOnSystem_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_Account _instance; Simple_Identity_Management_CIM_Account_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_Account_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_Account_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountOnSystem_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(Simple_Identity_Management_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_System_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountOnSystem_getGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), GroupComponent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), GroupComponent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_System _instance; Simple_Identity_Management_CIM_System_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_System_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_System_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/OpenDRIM_AccountOnSystemProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/OpenDRIM_AccountOnSystemPro0000644000175000017500000004367711401066117034552 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountOnSystem.h" #include "OpenDRIM_AccountOnSystemAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderSetInstance Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_AccountOnSystem_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_AccountOnSystem_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountOnSystem instance; Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderSetInstance(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_AccountOnSystem newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountOnSystem instance; Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountOnSystem instance; Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderAssociatorNames(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 = Simple_Identity_Management_OpenDRIM_AccountOnSystem_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_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 Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderAssociators(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 = Simple_Identity_Management_OpenDRIM_AccountOnSystem_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_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 Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderReferenceNames(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 = Simple_Identity_Management_OpenDRIM_AccountOnSystem_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountOnSystemProviderReferences(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 = Simple_Identity_Management_OpenDRIM_AccountOnSystem_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Simple_Identity_Management_OpenDRIM_AccountOnSystem_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountOnSystem_init FAILED: " + (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountOnSystem_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountOnSystem_unload FAILED: " + (string) OpenDRIM_AccountOnSystem_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_AccountOnSystem_INIT if (Simple_Identity_Management_OpenDRIM_AccountOnSystem_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_AccountOnSystemProvider, Simple_Identity_Management_OpenDRIM_AccountOnSystemProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountOnSystem_INIT); CMAssociationMIStub(Simple_Identity_Management_OpenDRIM_AccountOnSystemProvider, Simple_Identity_Management_OpenDRIM_AccountOnSystemProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountOnSystem_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/OpenDRIM_AccountOnSystem.h0000644000175000017500000000710111401066117034275 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTONSYSTEM_H_ #define OPENDRIM_ACCOUNTONSYSTEM_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_Account.h" #include "CIM_AccountAccess.h" #include "cmpiCIM_System.h" #include "CIM_SystemAccess.h" */ const static char* OpenDRIM_AccountOnSystem_classnames[] = {"OpenDRIM_AccountOnSystem"}; static string OpenDRIM_AccountOnSystem_NAMESPACE = _NAMESPACE; const static string PartComponent_role = "PartComponent"; const static char* PartComponent_classnames[] = {"OpenDRIM_Account"}; const static string PartComponent_NAMESPACE = _NAMESPACE; const static string GroupComponent_role = "GroupComponent"; const static char* GroupComponent_classnames[] = {"OpenDRIM_ComputerSystem"}; const static string GroupComponent_NAMESPACE = _NAMESPACE; class OpenDRIM_AccountOnSystem { public: Objectpath GroupComponent; bool GroupComponent_isNULL; Objectpath PartComponent; bool PartComponent_isNULL; OpenDRIM_AccountOnSystem() { GroupComponent_isNULL = true; PartComponent_isNULL = true; } ~OpenDRIM_AccountOnSystem() {} 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_ACCOUNTONSYSTEM_H_*/ ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/assocOpenDRIM_AccountOnSystem.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/assocOpenDRIM_AccountOnSyst0000644000175000017500000000651211401066117034563 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef ASSOCOPENDRIM_ACCOUNTONSYSTEM_H_ #define ASSOCOPENDRIM_ACCOUNTONSYSTEM_H_ #include "OpenDRIM_AccountOnSystemAccess.h" int Simple_Identity_Management_OpenDRIM_AccountOnSystem_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 Simple_Identity_Management_OpenDRIM_AccountOnSystem_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 Simple_Identity_Management_OpenDRIM_AccountOnSystem_enumeratePartComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_getPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_enumerateGroupComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_getGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_ACCOUNTONSYSTEM_H_*/ ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/cmpiOpenDRIM_AccountOnSystem.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/cmpiOpenDRIM_AccountOnSyste0000644000175000017500000000455011401066117034550 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_ACCOUNTONSYSTEM_H_ #define CMPIOPENDRIM_ACCOUNTONSYSTEM_H_ #include "OpenDRIM_AccountOnSystem.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountOnSystem& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountOnSystem& instance); void Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountOnSystem& instance); void Simple_Identity_Management_OpenDRIM_AccountOnSystem_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountOnSystem& instance); #endif /*CMPIOPENDRIM_ACCOUNTONSYSTEM_H_*/ ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/OpenDRIM_AccountOnSystemAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountOnSystem/OpenDRIM_AccountOnSystemAcc0000644000175000017500000001111511401066117034456 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTONSYSTEMACCESS_H_ #define OPENDRIM_ACCOUNTONSYSTEMACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_AccountOnSystem.h" #include "assocOpenDRIM_AccountOnSystem.h" int Simple_Identity_Management_OpenDRIM_AccountOnSystem_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountOnSystem& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountOnSystem& newInstance, const OpenDRIM_AccountOnSystem& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountOnSystem& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountOnSystem& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_associatorPartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const char** properties, vector& GroupComponent_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_associatorGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const char** properties, vector& PartComponent_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_referencePartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const vector& GroupComponent_instances, vector& OpenDRIM_AccountOnSystem_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_AccountOnSystem_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountOnSystem_populate(OpenDRIM_AccountOnSystem& instance, string& errorMessage); #endif /*OPENDRIM_ACCOUNTONSYSTEMACCESS_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/0000755000175000017500000000000011401066117030560 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/Makefile.am0000644000175000017500000000534011401066117032616 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_GroupAssignedIdentityProvider.la libcmpiSimple_Identity_Management_OpenDRIM_GroupAssignedIdentityProvider_la_SOURCES = OpenDRIM_GroupAssignedIdentityAccess.cpp OpenDRIM_GroupAssignedIdentityProvider.cpp cmpiOpenDRIM_GroupAssignedIdentity.cpp assocOpenDRIM_GroupAssignedIdentity.cpp # May have to be adjusted for direct invocation libcmpiSimple_Identity_Management_OpenDRIM_GroupAssignedIdentityProvider_la_CPPFLAGS = -I../CIM_Identity -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiSimple_Identity_Management_OpenDRIM_GroupAssignedIdentityProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la #../CIM_Identity/libcmpiSimple_Identity_Management_CIM_IdentityProvider.la ../CIM_ManagedElement/libcmpiSimple_Identity_Management_CIM_ManagedElementProvider.la libcmpiSimple_Identity_Management_OpenDRIM_GroupAssignedIdentityProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_GroupAssignedIdentity.h OpenDRIM_GroupAssignedIdentity.h OpenDRIM_GroupAssignedIdentityAccess.h ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/OpenDRIM_GroupAssignedIdentityProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/OpenDRIM_GroupAssigne0000644000175000017500000004472711401066117034564 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_GroupAssignedIdentity.h" #include "OpenDRIM_GroupAssignedIdentityAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderSetInstance Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_GroupAssignedIdentity instance; Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderSetInstance(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_GroupAssignedIdentity newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_GroupAssignedIdentity instance; Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_GroupAssignedIdentity instance; Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderAssociatorNames(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 = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_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 Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderAssociators(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 = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_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 Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderReferenceNames(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 = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_referenceIdentityInfoToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_referenceManagedElementToIdentityInfo(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProviderReferences(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 = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_referenceIdentityInfoToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_referenceManagedElementToIdentityInfo(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_init FAILED: " + (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_unload FAILED: " + (string) OpenDRIM_GroupAssignedIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_INIT if (Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProvider, Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProvider, _broker, Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_INIT); CMAssociationMIStub(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProvider, Simple_Identity_Management_OpenDRIM_GroupAssignedIdentityProvider, _broker, Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/cmpiOpenDRIM_GroupAssignedIdentity.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/cmpiOpenDRIM_GroupAss0000644000175000017500000000652411401066117034563 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_GroupAssignedIdentity.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_GroupAssignedIdentity& instance) { _E_; Objectpath op(broker, OpenDRIM_GroupAssignedIdentity_classnames[0], OpenDRIM_GroupAssignedIdentity_NAMESPACE); if (!instance.IdentityInfo_isNULL) op.addKey("IdentityInfo", instance.IdentityInfo); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_GroupAssignedIdentity& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_GroupAssignedIdentity& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("IdentityInfo", instance.IdentityInfo) == OK) instance.IdentityInfo_isNULL = false; if (op.getKey("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } void Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_GroupAssignedIdentity& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("IdentityInfo", instance.IdentityInfo) == OK) instance.IdentityInfo_isNULL = false; if (inst.getProperty("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/OpenDRIM_GroupAssignedIdentityAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/OpenDRIM_GroupAssigne0000644000175000017500000001135511401066117034553 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_GROUPASSIGNEDIDENTITYACCESS_H_ #define OPENDRIM_GROUPASSIGNEDIDENTITYACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_GroupAssignedIdentity.h" #include "assocOpenDRIM_GroupAssignedIdentity.h" int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_GroupAssignedIdentity& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupAssignedIdentity& newInstance, const OpenDRIM_GroupAssignedIdentity& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupAssignedIdentity& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupAssignedIdentity& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_associatorIdentityInfoToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& IdentityInfo_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_associatorManagedElementToIdentityInfo(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& IdentityInfo_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_referenceIdentityInfoToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& IdentityInfo_instance, const vector& ManagedElement_instances, vector& OpenDRIM_GroupAssignedIdentity_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_referenceManagedElementToIdentityInfo(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& IdentityInfo_instances, vector& OpenDRIM_GroupAssignedIdentity_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_populate(OpenDRIM_GroupAssignedIdentity& instance, string& errorMessage); #endif /*OPENDRIM_GROUPASSIGNEDIDENTITYACCESS_H_*/ ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/OpenDRIM_GroupAssignedIdentityAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/OpenDRIM_GroupAssigne0000644000175000017500000002625211401066117034555 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_GroupAssignedIdentityAccess.h" int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_Identity_load(broker, errorMessage)); CF_assert(Simple_Identity_Management_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_Identity_unload(errorMessage)); CF_assert(Simple_Identity_Management_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_isAssociated(const Instance& IdentityInfo, const Instance& ManagedElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_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(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_enumerateIdentityInfos(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(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_enumerateIdentityInfos(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; Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), IdentityInfo_classnames[0], ManagedElement_classnames[0], IdentityInfo_role.c_str(), ManagedElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_referenceIdentityInfoToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_GroupAssignedIdentity& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath IdentityInfo_objectpath; instance.getIdentityInfo(IdentityInfo_objectpath); Instance IdentityInfo_instance; CF_assert(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_getIdentityInfo(broker, ctx, IdentityInfo_objectpath, IdentityInfo_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_isAssociated(IdentityInfo_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupAssignedIdentity& newInstance, const OpenDRIM_GroupAssignedIdentity& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupAssignedIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupAssignedIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_associatorIdentityInfoToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& IdentityInfo_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(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_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(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& IdentityInfo_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector IdentityInfo_instances; if (discriminant=="a") CF_assert(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_enumerateIdentityInfos(broker, ctx, IdentityInfo_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_enumerateIdentityInfos(broker, ctx, IdentityInfo_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(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_enumerateIdentityInfos(broker, ctx, IdentityInfo_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_GroupAssignedIdentity_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_GroupAssignedIdentity instance; instance.setIdentityInfo(((Instance) IdentityInfo_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); OpenDRIM_GroupAssignedIdentity_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_referenceManagedElementToIdentityInfo(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& IdentityInfo_instances, vector& OpenDRIM_GroupAssignedIdentity_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 < IdentityInfo_instances.size(); i++) { OpenDRIM_GroupAssignedIdentity instance; instance.setIdentityInfo(((Instance) IdentityInfo_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); OpenDRIM_GroupAssignedIdentity_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_populate(OpenDRIM_GroupAssignedIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/cmpiOpenDRIM_GroupAssignedIdentity.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/cmpiOpenDRIM_GroupAss0000644000175000017500000000466011401066117034562 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_GROUPASSIGNEDIDENTITY_H_ #define CMPIOPENDRIM_GROUPASSIGNEDIDENTITY_H_ #include "OpenDRIM_GroupAssignedIdentity.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_GroupAssignedIdentity& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_GroupAssignedIdentity& instance); void Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_GroupAssignedIdentity& instance); void Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_GroupAssignedIdentity& instance); #endif /*CMPIOPENDRIM_GROUPASSIGNEDIDENTITY_H_*/ ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/assocOpenDRIM_GroupAssignedIdentity.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/assocOpenDRIM_GroupAs0000644000175000017500000000660411401066117034557 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef ASSOCOPENDRIM_GROUPASSIGNEDIDENTITY_H_ #define ASSOCOPENDRIM_GROUPASSIGNEDIDENTITY_H_ #include "OpenDRIM_GroupAssignedIdentityAccess.h" int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_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 Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_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 Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_enumerateIdentityInfos(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_getIdentityInfo(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_GROUPASSIGNEDIDENTITY_H_*/ ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/OpenDRIM_GroupAssignedIdentity.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/OpenDRIM_GroupAssigne0000644000175000017500000000716511401066117034557 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_GROUPASSIGNEDIDENTITY_H_ #define OPENDRIM_GROUPASSIGNEDIDENTITY_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_Identity.h" #include "CIM_IdentityAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_GroupAssignedIdentity_classnames[] = {"OpenDRIM_GroupAssignedIdentity"}; static string OpenDRIM_GroupAssignedIdentity_NAMESPACE = _NAMESPACE; const static string IdentityInfo_role = "IdentityInfo"; const static char* IdentityInfo_classnames[] = {"OpenDRIM_GroupIdentity"}; const static string IdentityInfo_NAMESPACE = _NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_Group"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_GroupAssignedIdentity { public: Objectpath IdentityInfo; bool IdentityInfo_isNULL; Objectpath ManagedElement; bool ManagedElement_isNULL; OpenDRIM_GroupAssignedIdentity() { IdentityInfo_isNULL = true; ManagedElement_isNULL = true; } ~OpenDRIM_GroupAssignedIdentity() {} string getKeys() const { return CF_toLowCase(".IdentityInfo=\"" + CF_quoteString(IdentityInfo.toString()) + "\""".ManagedElement=\"" + CF_quoteString(ManagedElement.toString()) + "\""); } int getIdentityInfo(Objectpath& value) const { if (IdentityInfo_isNULL==true) return NOT_FOUND; value = IdentityInfo; return OK; } int setIdentityInfo(const Objectpath& newValue) { IdentityInfo = newValue; IdentityInfo.setNamespace(IdentityInfo_NAMESPACE); IdentityInfo_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_GROUPASSIGNEDIDENTITY_H_*/ ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/assocOpenDRIM_GroupAssignedIdentity.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupAssignedIdentity/assocOpenDRIM_GroupAs0000644000175000017500000002217511401066117034560 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "assocOpenDRIM_GroupAssignedIdentity.h" int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_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 = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_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, "IdentityInfo") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "ManagedElement") != 0) return OK; CF_assert(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_associatorIdentityInfoToManagedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "ManagedElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "IdentityInfo") != 0) return OK; CF_assert(Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_associatorManagedElementToIdentityInfo(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_enumerateIdentityInfos(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, IdentityInfo_NAMESPACE, IdentityInfo_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(Simple_Identity_Management_CIM_Identity_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_Identity_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_Identity_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_getIdentityInfo(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), IdentityInfo_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), IdentityInfo_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_Identity _instance; Simple_Identity_Management_CIM_Identity_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_Identity_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_Identity_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_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(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_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; Simple_Identity_Management_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Group/0000755000175000017500000000000011401066117025370 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Group/Makefile.am0000644000175000017500000000420211401066117027422 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_GroupProvider.la libcmpiSimple_Identity_Management_OpenDRIM_GroupProvider_la_SOURCES = OpenDRIM_GroupAccess.cpp OpenDRIM_GroupProvider.cpp cmpiOpenDRIM_Group.cpp libcmpiSimple_Identity_Management_OpenDRIM_GroupProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la libcmpiSimple_Identity_Management_OpenDRIM_GroupProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_Group.h OpenDRIM_Group.h OpenDRIM_GroupAccess.h opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Group/cmpiOpenDRIM_Group.h0000644000175000017500000000436011401066117031146 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_GROUP_H_ #define CMPIOPENDRIM_GROUP_H_ #include "OpenDRIM_Group.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_Group_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Group& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_Group_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Group& instance); void Simple_Identity_Management_OpenDRIM_Group_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Group& instance); void Simple_Identity_Management_OpenDRIM_Group_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Group& instance); #endif /*CMPIOPENDRIM_GROUP_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Group/OpenDRIM_Group.h0000644000175000017500000001123311401066117030272 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_GROUP_H_ #define OPENDRIM_GROUP_H_ #include const static char* OpenDRIM_Group_classnames[] = {"OpenDRIM_Group"}; static string OpenDRIM_Group_NAMESPACE = _NAMESPACE; class OpenDRIM_Group { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string CreationClassName; bool CreationClassName_isNULL; string Name; bool Name_isNULL; string BusinessCategory; bool BusinessCategory_isNULL; string CommonName; bool CommonName_isNULL; string GroupID; bool GroupID_isNULL; vector Members; OpenDRIM_Group() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; CreationClassName_isNULL = true; Name_isNULL = true; BusinessCategory_isNULL = true; CommonName_isNULL = true; GroupID_isNULL = true; } ~OpenDRIM_Group() {} string getKeys() const { return CF_toLowCase(".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""".Name=\"" + CF_quoteString(Name) + "\""); } int getCaption(string& value) const { if (Caption_isNULL==true) return NOT_FOUND; value = Caption; return OK; } int setCaption(const string& newValue) { Caption = newValue; Caption_isNULL = false; return OK; } int 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 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 getBusinessCategory(string& value) const { if (BusinessCategory_isNULL==true) return NOT_FOUND; value = BusinessCategory; return OK; } int setBusinessCategory(const string& newValue) { BusinessCategory = newValue; BusinessCategory_isNULL = false; return OK; } int getCommonName(string& value) const { if (CommonName_isNULL==true) return NOT_FOUND; value = CommonName; return OK; } int setCommonName(const string& newValue) { CommonName = newValue; CommonName_isNULL = false; return OK; } int getGroupID(string& value) const { if (GroupID_isNULL==true) return NOT_FOUND; value = GroupID; return OK; } int setGroupID(const string& newValue) { GroupID = newValue; GroupID_isNULL = false; return OK; } }; #endif /*OPENDRIM_GROUP_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Group/cmpiOpenDRIM_Group.cpp0000644000175000017500000001035511401066117031502 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_Group.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_Group_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Group& instance) { _E_; Objectpath op(broker, OpenDRIM_Group_classnames[0], OpenDRIM_Group_NAMESPACE); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); if (!instance.Name_isNULL) op.addKey("Name", instance.Name); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_Group_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Group& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_Group_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.BusinessCategory_isNULL) ci.setProperty("BusinessCategory", instance.BusinessCategory); if (!instance.CommonName_isNULL) ci.setProperty("CommonName", instance.CommonName); if (!instance.GroupID_isNULL) ci.setProperty("GroupID", instance.GroupID); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_Group_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Group& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Name", instance.Name) == OK) instance.Name_isNULL = false; if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; _L_; } void Simple_Identity_Management_OpenDRIM_Group_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Group& 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("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("BusinessCategory", instance.BusinessCategory) == OK) instance.BusinessCategory_isNULL = false; if (inst.getProperty("CommonName", instance.CommonName) == OK) instance.CommonName_isNULL = false; if (inst.getProperty("GroupID", instance.GroupID) == OK) instance.GroupID_isNULL = false; _L_; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Group/OpenDRIM_GroupAccess.h0000644000175000017500000000575611401066117031431 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_GROUPACCESS_H_ #define OPENDRIM_GROUPACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_Group.h" int Simple_Identity_Management_OpenDRIM_Group_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_Group_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_Group_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_Group_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Group& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_Group_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Group& newInstance, const OpenDRIM_Group& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_Group_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Group& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_Group_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Group& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_Group_populate(OpenDRIM_Group& instance, string& errorMessage); #endif /*OPENDRIM_GROUPACCESS_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Group/OpenDRIM_GroupProvider.cpp0000644000175000017500000002576511401066117032357 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_Group.h" #include "OpenDRIM_GroupAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_GroupProviderSetInstance Simple_Identity_Management_OpenDRIM_GroupProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_Group_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_Group_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_GroupProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_Group_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Group_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Group_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_Group_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_Group_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Group_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_Group_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Group instance; Simple_Identity_Management_OpenDRIM_Group_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Group_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Group_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_Group_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupProviderSetInstance(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_Group newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_Group_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_Group_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Group_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Group_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_Group_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Group_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Group instance; Simple_Identity_Management_OpenDRIM_Group_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Group_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_Group_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_Group_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Group_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_Group_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Group_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_Group_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Group instance; Simple_Identity_Management_OpenDRIM_Group_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Group_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Group_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_Group_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Group_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_Group_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Group_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_Group_init FAILED: " + (string) OpenDRIM_Group_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_Group_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Group_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_Group_unload FAILED: " + (string) OpenDRIM_Group_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_Group_INIT if (Simple_Identity_Management_OpenDRIM_Group_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_GroupProvider, Simple_Identity_Management_OpenDRIM_GroupProvider, _broker, Simple_Identity_Management_OpenDRIM_Group_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Group/OpenDRIM_GroupAccess.cpp0000644000175000017500000001414511401066117031754 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_GroupAccess.h" int Simple_Identity_Management_OpenDRIM_Group_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_Group_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_Group_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; // Read the /etc/group file string etc_group; CF_assert(CF_readTextFile("/etc/group", etc_group, errorMessage)); vector etc_group_lines; CF_splitText(etc_group_lines, etc_group, '\n'); // In gi (getInstance) mode the first instance in the vector contains // the objectpath of the instance we're supposed to get string gi_name; if (discriminant=="gi") result[0].getName(gi_name); // For each line of /etc/group for (size_t i=0; i current_etc_group_line; CF_splitText(current_etc_group_line, etc_group_lines[i], ':'); if (current_etc_group_line.size()!=4) { errorMessage="Wrong format (at line "+CF_intToStr((unsigned long) i+1)+"): /etc/group"; return FAILED; } // Assign the values of the properties OpenDRIM_Group instance; instance.setName(current_etc_group_line[0]); instance.setCreationClassName("OpenDRIM_Group"); instance.setElementName(current_etc_group_line[0]); instance.setGroupID(current_etc_group_line[2]); CF_splitText(instance.Members, current_etc_group_line[3], ','); // If we're in gi mode we check if we found the instance if (discriminant=="gi" && CF_strCmpNoCase(gi_name, current_etc_group_line[0])) { result[0]=instance; return OK; // We found the instance so we can exit here } // Add the instance to the vector if (discriminant=="ei" || discriminant=="ein") result.push_back(instance); } // If we get here it means we didn't find the instance if (discriminant=="gi") { errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_Group_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Group& instance, const char** properties, string& errorMessage) { _E_; string CreationClassName; instance.getCreationClassName(CreationClassName); if (!CF_strCmpNoCase(CreationClassName, "OpenDRIM_Group")) { errorMessage = "No instance"; return NOT_FOUND; } vector instances; instances.push_back(instance); // Get the instance (it also checks if it exists) CF_assert(Simple_Identity_Management_OpenDRIM_Group_retrieve(broker, ctx, instances, properties, errorMessage, "gi")); instance=instances[0]; _L_; return OK; } int Simple_Identity_Management_OpenDRIM_Group_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Group& newInstance, const OpenDRIM_Group& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_Group_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Group& instance, string& errorMessage) { _E_; string Name, GroupID, CreationClassName; instance.getCreationClassName(CreationClassName); if (!CF_strCmpNoCase(CreationClassName, "OpenDRIM_Group")) { errorMessage = "Wrong value: CreationClassName"; return FAILED; } instance.getName(Name); instance.getGroupID(GroupID); string command="/usr/sbin/groupadd "; if (instance.getGroupID(GroupID)!=NOT_FOUND) command+="-g "+GroupID+" "; string stdOut, stdErr; // Invoke groupadd to create a new group CF_assert(CF_runCommand(command+Name, stdOut, stdErr, errorMessage)); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_Group_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Group& instance, string& errorMessage) { _E_; string Name; instance.getName(Name); string stdOut, stdErr; // Invoke groupdel to delete a group // Only groups which are not primary for any user can be deleted int errorCode=CF_runCommand("/usr/sbin/groupdel "+Name, stdOut, stdErr, errorMessage); if (errorCode!=OK) { if (stdErr.find("cannot remove user's primary group")) errorMessage="Primary groups cannot be deleted."; return errorCode; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_Group_populate(OpenDRIM_Group& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/0000755000175000017500000000000011401066117023616 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/Makefile.am0000644000175000017500000002536611401066117025666 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# noinst_PROGRAMS = testOpenDRIM_AccountOnSystem testOpenDRIM_AccountCapabilities testOpenDRIM_AccountIdentity testOpenDRIM_AccountAssignedIdentity testOpenDRIM_GroupAssignedIdentity testOpenDRIM_AccountManagementServiceAffectsIdentity testOpenDRIM_AccountManagementService testOpenDRIM_HostedAccountManagementService testOpenDRIM_RegisteredSimpleIdentityManagementProfile testOpenDRIM_AccountManagementServiceConformsToProfile testOpenDRIM_Group testOpenDRIM_AccountManagementServiceCapabilities testOpenDRIM_AccountAssociatedCapabilities testOpenDRIM_GroupIdentity testOpenDRIM_IdentityInGroup testOpenDRIM_AccountManagementCapabilities testOpenDRIM_Account testOpenDRIM_GroupOnSystem # May have to be adjusted for direct invocation testOpenDRIM_AccountOnSystem_CPPFLAGS = -I../OpenDRIM_AccountOnSystem/ testOpenDRIM_AccountOnSystem_SOURCES = testOpenDRIM_AccountOnSystem.cpp testOpenDRIM_AccountOnSystem_LDADD = ../OpenDRIM_AccountOnSystem/libcmpiSimple_Identity_Management_OpenDRIM_AccountOnSystemProvider.la test-OpenDRIM_AccountOnSystem: testOpenDRIM_AccountOnSystem ./testOpenDRIM_AccountOnSystem testOpenDRIM_AccountCapabilities_CPPFLAGS = -I../OpenDRIM_AccountCapabilities/ testOpenDRIM_AccountCapabilities_SOURCES = testOpenDRIM_AccountCapabilities.cpp testOpenDRIM_AccountCapabilities_LDADD = ../OpenDRIM_AccountCapabilities/libcmpiSimple_Identity_Management_OpenDRIM_AccountCapabilitiesProvider.la test-OpenDRIM_AccountCapabilities: testOpenDRIM_AccountCapabilities ./testOpenDRIM_AccountCapabilities testOpenDRIM_AccountIdentity_CPPFLAGS = -I../OpenDRIM_AccountIdentity/ testOpenDRIM_AccountIdentity_SOURCES = testOpenDRIM_AccountIdentity.cpp testOpenDRIM_AccountIdentity_LDADD = ../OpenDRIM_AccountIdentity/libcmpiSimple_Identity_Management_OpenDRIM_AccountIdentityProvider.la test-OpenDRIM_AccountIdentity: testOpenDRIM_AccountIdentity ./testOpenDRIM_AccountIdentity # May have to be adjusted for direct invocation testOpenDRIM_AccountAssignedIdentity_CPPFLAGS = -I../OpenDRIM_AccountAssignedIdentity/ testOpenDRIM_AccountAssignedIdentity_SOURCES = testOpenDRIM_AccountAssignedIdentity.cpp testOpenDRIM_AccountAssignedIdentity_LDADD = ../OpenDRIM_AccountAssignedIdentity/libcmpiSimple_Identity_Management_OpenDRIM_AccountAssignedIdentityProvider.la test-OpenDRIM_AccountAssignedIdentity: testOpenDRIM_AccountAssignedIdentity ./testOpenDRIM_AccountAssignedIdentity # May have to be adjusted for direct invocation testOpenDRIM_GroupAssignedIdentity_CPPFLAGS = -I../OpenDRIM_GroupAssignedIdentity/ testOpenDRIM_GroupAssignedIdentity_SOURCES = testOpenDRIM_GroupAssignedIdentity.cpp testOpenDRIM_GroupAssignedIdentity_LDADD = ../OpenDRIM_GroupAssignedIdentity/libcmpiSimple_Identity_Management_OpenDRIM_GroupAssignedIdentityProvider.la test-OpenDRIM_GroupAssignedIdentity: testOpenDRIM_GroupAssignedIdentity ./testOpenDRIM_GroupAssignedIdentity # May have to be adjusted for direct invocation testOpenDRIM_AccountManagementServiceAffectsIdentity_CPPFLAGS = -I../OpenDRIM_AccountManagementServiceAffectsIdentity/ testOpenDRIM_AccountManagementServiceAffectsIdentity_SOURCES = testOpenDRIM_AccountManagementServiceAffectsIdentity.cpp testOpenDRIM_AccountManagementServiceAffectsIdentity_LDADD = ../OpenDRIM_AccountManagementServiceAffectsIdentity/libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProvider.la test-OpenDRIM_AccountManagementServiceAffectsIdentity: testOpenDRIM_AccountManagementServiceAffectsIdentity ./testOpenDRIM_AccountManagementServiceAffectsIdentity testOpenDRIM_AccountManagementService_CPPFLAGS = -I../OpenDRIM_AccountManagementService/ testOpenDRIM_AccountManagementService_SOURCES = testOpenDRIM_AccountManagementService.cpp testOpenDRIM_AccountManagementService_LDADD = ../OpenDRIM_AccountManagementService/libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceProvider.la test-OpenDRIM_AccountManagementService: testOpenDRIM_AccountManagementService ./testOpenDRIM_AccountManagementService # May have to be adjusted for direct invocation testOpenDRIM_HostedAccountManagementService_CPPFLAGS = -I../OpenDRIM_HostedAccountManagementService/ testOpenDRIM_HostedAccountManagementService_SOURCES = testOpenDRIM_HostedAccountManagementService.cpp testOpenDRIM_HostedAccountManagementService_LDADD = ../OpenDRIM_HostedAccountManagementService/libcmpiSimple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProvider.la test-OpenDRIM_HostedAccountManagementService: testOpenDRIM_HostedAccountManagementService ./testOpenDRIM_HostedAccountManagementService testOpenDRIM_RegisteredSimpleIdentityManagementProfile_CPPFLAGS = -I../OpenDRIM_RegisteredSimpleIdentityManagementProfile/ testOpenDRIM_RegisteredSimpleIdentityManagementProfile_SOURCES = testOpenDRIM_RegisteredSimpleIdentityManagementProfile.cpp testOpenDRIM_RegisteredSimpleIdentityManagementProfile_LDADD = ../OpenDRIM_RegisteredSimpleIdentityManagementProfile/libcmpiSimple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProvider.la test-OpenDRIM_RegisteredSimpleIdentityManagementProfile: testOpenDRIM_RegisteredSimpleIdentityManagementProfile ./testOpenDRIM_RegisteredSimpleIdentityManagementProfile # May have to be adjusted for direct invocation testOpenDRIM_AccountManagementServiceConformsToProfile_CPPFLAGS = -I../OpenDRIM_AccountManagementServiceConformsToProfile/ testOpenDRIM_AccountManagementServiceConformsToProfile_SOURCES = testOpenDRIM_AccountManagementServiceConformsToProfile.cpp testOpenDRIM_AccountManagementServiceConformsToProfile_LDADD = ../OpenDRIM_AccountManagementServiceConformsToProfile/libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProvider.la test-OpenDRIM_AccountManagementServiceConformsToProfile: testOpenDRIM_AccountManagementServiceConformsToProfile ./testOpenDRIM_AccountManagementServiceConformsToProfile testOpenDRIM_Group_CPPFLAGS = -I../OpenDRIM_Group/ testOpenDRIM_Group_SOURCES = testOpenDRIM_Group.cpp testOpenDRIM_Group_LDADD = ../OpenDRIM_Group/libcmpiSimple_Identity_Management_OpenDRIM_GroupProvider.la test-OpenDRIM_Group: testOpenDRIM_Group ./testOpenDRIM_Group # May have to be adjusted for direct invocation testOpenDRIM_AccountManagementServiceCapabilities_CPPFLAGS = -I../OpenDRIM_AccountManagementServiceCapabilities/ testOpenDRIM_AccountManagementServiceCapabilities_SOURCES = testOpenDRIM_AccountManagementServiceCapabilities.cpp testOpenDRIM_AccountManagementServiceCapabilities_LDADD = ../OpenDRIM_AccountManagementServiceCapabilities/libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProvider.la test-OpenDRIM_AccountManagementServiceCapabilities: testOpenDRIM_AccountManagementServiceCapabilities ./testOpenDRIM_AccountManagementServiceCapabilities # May have to be adjusted for direct invocation testOpenDRIM_AccountAssociatedCapabilities_CPPFLAGS = -I../OpenDRIM_AccountAssociatedCapabilities/ testOpenDRIM_AccountAssociatedCapabilities_SOURCES = testOpenDRIM_AccountAssociatedCapabilities.cpp testOpenDRIM_AccountAssociatedCapabilities_LDADD = ../OpenDRIM_AccountAssociatedCapabilities/libcmpiSimple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProvider.la test-OpenDRIM_AccountAssociatedCapabilities: testOpenDRIM_AccountAssociatedCapabilities ./testOpenDRIM_AccountAssociatedCapabilities testOpenDRIM_GroupIdentity_CPPFLAGS = -I../OpenDRIM_GroupIdentity/ testOpenDRIM_GroupIdentity_SOURCES = testOpenDRIM_GroupIdentity.cpp testOpenDRIM_GroupIdentity_LDADD = ../OpenDRIM_GroupIdentity/libcmpiSimple_Identity_Management_OpenDRIM_GroupIdentityProvider.la test-OpenDRIM_GroupIdentity: testOpenDRIM_GroupIdentity ./testOpenDRIM_GroupIdentity # May have to be adjusted for direct invocation testOpenDRIM_IdentityInGroup_CPPFLAGS = -I../OpenDRIM_IdentityInGroup/ testOpenDRIM_IdentityInGroup_SOURCES = testOpenDRIM_IdentityInGroup.cpp testOpenDRIM_IdentityInGroup_LDADD = ../OpenDRIM_IdentityInGroup/libcmpiSimple_Identity_Management_OpenDRIM_IdentityInGroupProvider.la test-OpenDRIM_IdentityInGroup: testOpenDRIM_IdentityInGroup ./testOpenDRIM_IdentityInGroup testOpenDRIM_AccountManagementCapabilities_CPPFLAGS = -I../OpenDRIM_AccountManagementCapabilities/ testOpenDRIM_AccountManagementCapabilities_SOURCES = testOpenDRIM_AccountManagementCapabilities.cpp testOpenDRIM_AccountManagementCapabilities_LDADD = ../OpenDRIM_AccountManagementCapabilities/libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProvider.la test-OpenDRIM_AccountManagementCapabilities: testOpenDRIM_AccountManagementCapabilities ./testOpenDRIM_AccountManagementCapabilities testOpenDRIM_Account_CPPFLAGS = -I../OpenDRIM_Account/ -I../OpenDRIM_Group testOpenDRIM_Account_SOURCES = testOpenDRIM_Account.cpp testOpenDRIM_Account_LDADD = ../OpenDRIM_Account/libcmpiSimple_Identity_Management_OpenDRIM_AccountProvider.la test-OpenDRIM_Account: testOpenDRIM_Account ./testOpenDRIM_Account # May have to be adjusted for direct invocation testOpenDRIM_GroupOnSystem_CPPFLAGS = -I../OpenDRIM_GroupOnSystem/ testOpenDRIM_GroupOnSystem_SOURCES = testOpenDRIM_GroupOnSystem.cpp testOpenDRIM_GroupOnSystem_LDADD = ../OpenDRIM_GroupOnSystem/libcmpiSimple_Identity_Management_OpenDRIM_GroupOnSystemProvider.la test-OpenDRIM_GroupOnSystem: testOpenDRIM_GroupOnSystem ./testOpenDRIM_GroupOnSystem opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_AccountAssociatedCapabilities.cpp0000644000175000017500000001205411401066117034567 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountAssociatedCapabilities.h" #include "OpenDRIM_AccountAssociatedCapabilitiesAccess.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_AccountAssociatedCapabilities& instance) { os << " [OpenDRIM_AccountAssociatedCapabilities]" << endl; ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); ToStringRef("Capabilities", Capabilities, Capabilities_isNULL); ToStringArrayInt("Characteristics", Characteristics, Characteristics_isNULL); os << " [\\OpenDRIM_AccountAssociatedCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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 = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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 = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_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 = Simple_Identity_Management_OpenDRIM_AccountAssociatedCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_Account.cpp0000644000175000017500000001715611401066117030265 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_Account.h" #include "OpenDRIM_AccountAccess.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_Account& instance) { os << " [OpenDRIM_Account]" << endl; 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("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToStringInt("EnabledState", EnabledState, EnabledState_isNULL); ToString("OtherEnabledState", OtherEnabledState, OtherEnabledState_isNULL); ToStringInt("RequestedState", RequestedState, RequestedState_isNULL); ToStringInt("EnabledDefault", EnabledDefault, EnabledDefault_isNULL); ToString("TimeOfLastStateChange", TimeOfLastStateChange, TimeOfLastStateChange_isNULL); ToStringArrayInt("AvailableRequestedStates", AvailableRequestedStates, AvailableRequestedStates_isNULL); ToStringInt("TransitioningToState", TransitioningToState, TransitioningToState_isNULL); ToString("SystemCreationClassName", SystemCreationClassName, SystemCreationClassName_isNULL); ToString("SystemName", SystemName, SystemName_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("Name", Name, Name_isNULL); ToString("UserID", UserID, UserID_isNULL); ToStringArray("ObjectClass", ObjectClass, ObjectClass_isNULL); ToStringArray("Descriptions", Descriptions, Descriptions_isNULL); ToStringArray("Host", Host, Host_isNULL); ToStringArray("LocalityName", LocalityName, LocalityName_isNULL); ToStringArray("OrganizationName", OrganizationName, OrganizationName_isNULL); ToStringArray("OU", OU, OU_isNULL); ToStringArray("SeeAlso", SeeAlso, SeeAlso_isNULL); ToStringArray("UserCertificate", UserCertificate, UserCertificate_isNULL); ToStringArray("UserPassword", UserPassword, UserPassword_isNULL); ToStringInt("PasswordHistoryDepth", PasswordHistoryDepth, PasswordHistoryDepth_isNULL); ToString("PasswordExpiration", PasswordExpiration, PasswordExpiration_isNULL); ToStringArrayInt("ComplexPasswordRulesEnforced", ComplexPasswordRulesEnforced, ComplexPasswordRulesEnforced_isNULL); ToString("InactivityTimeout", InactivityTimeout, InactivityTimeout_isNULL); ToStringInt("MaximumSuccessiveLoginFailures", MaximumSuccessiveLoginFailures, MaximumSuccessiveLoginFailures_isNULL); ToString("LastLogin", LastLogin, LastLogin_isNULL); ToString("PasswordLastChange", PasswordLastChange, PasswordLastChange_isNULL); ToString("AccountExpiration", AccountExpiration, AccountExpiration_isNULL); ToString("PrimaryGroup", PrimaryGroup, PrimaryGroup_isNULL); ToString("LoginShell", LoginShell, LoginShell_isNULL); ToString("HomeDirectory", HomeDirectory, HomeDirectory_isNULL); os << " [\\OpenDRIM_Account]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Account_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_Account_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 = Simple_Identity_Management_OpenDRIM_Account_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 = Simple_Identity_Management_OpenDRIM_Account_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 = Simple_Identity_Management_OpenDRIM_Account_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_HostedAccountManagementService.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_HostedAccountManagementService.cpp0000644000175000017500000001172411401066117034745 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_HostedAccountManagementService.h" #include "OpenDRIM_HostedAccountManagementServiceAccess.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_HostedAccountManagementService& instance) { os << " [OpenDRIM_HostedAccountManagementService]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); os << " [\\OpenDRIM_HostedAccountManagementService]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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 = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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 = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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 = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_AccountManagementServiceConformsToProfile.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_AccountManagementServiceConformsTo0000644000175000017500000001217711401066117035032 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementServiceConformsToProfile.h" #include "OpenDRIM_AccountManagementServiceConformsToProfileAccess.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_AccountManagementServiceConformsToProfile& instance) { os << " [OpenDRIM_AccountManagementServiceConformsToProfile]" << endl; ToStringRef("ConformantStandard", ConformantStandard, ConformantStandard_isNULL); ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); os << " [\\OpenDRIM_AccountManagementServiceConformsToProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_Group.cpp0000644000175000017500000001177611401066117027767 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_Group.h" #include "OpenDRIM_GroupAccess.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_Group& instance) { os << " [OpenDRIM_Group]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("Name", Name, Name_isNULL); ToString("BusinessCategory", BusinessCategory, BusinessCategory_isNULL); ToString("CommonName", CommonName, CommonName_isNULL); ToString("GroupID", GroupID, GroupID_isNULL); os << " [\\OpenDRIM_Group]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Group_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_Group_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 = Simple_Identity_Management_OpenDRIM_Group_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 = Simple_Identity_Management_OpenDRIM_Group_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 = Simple_Identity_Management_OpenDRIM_Group_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_AccountManagementServiceCapabilities.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_AccountManagementServiceCapabiliti0000644000175000017500000001220011401066117034765 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementServiceCapabilities.h" #include "OpenDRIM_AccountManagementServiceCapabilitiesAccess.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_AccountManagementServiceCapabilities& instance) { os << " [OpenDRIM_AccountManagementServiceCapabilities]" << endl; ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); ToStringRef("Capabilities", Capabilities, Capabilities_isNULL); ToStringArrayInt("Characteristics", Characteristics, Characteristics_isNULL); os << " [\\OpenDRIM_AccountManagementServiceCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_AccountOnSystem.cpp0000644000175000017500000001147011401066117031760 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountOnSystem.h" #include "OpenDRIM_AccountOnSystemAccess.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_AccountOnSystem& instance) { os << " [OpenDRIM_AccountOnSystem]" << endl; ToStringRef("GroupComponent", GroupComponent, GroupComponent_isNULL); ToStringRef("PartComponent", PartComponent, PartComponent_isNULL); os << " [\\OpenDRIM_AccountOnSystem]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_AccountOnSystem_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 = Simple_Identity_Management_OpenDRIM_AccountOnSystem_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 = Simple_Identity_Management_OpenDRIM_AccountOnSystem_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 = Simple_Identity_Management_OpenDRIM_AccountOnSystem_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_AccountAssignedIdentity.cpp0000644000175000017500000001162511401066117033450 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountAssignedIdentity.h" #include "OpenDRIM_AccountAssignedIdentityAccess.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_AccountAssignedIdentity& instance) { os << " [OpenDRIM_AccountAssignedIdentity]" << endl; ToStringRef("IdentityInfo", IdentityInfo, IdentityInfo_isNULL); ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); os << " [\\OpenDRIM_AccountAssignedIdentity]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_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 = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_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 = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_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 = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_AccountManagementServiceAffectsIdentity.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_AccountManagementServiceAffectsIde0000644000175000017500000001270511401066117034733 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementServiceAffectsIdentity.h" #include "OpenDRIM_AccountManagementServiceAffectsIdentityAccess.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_AccountManagementServiceAffectsIdentity& instance) { os << " [OpenDRIM_AccountManagementServiceAffectsIdentity]" << endl; ToStringRef("AffectedElement", AffectedElement, AffectedElement_isNULL); ToStringRef("AffectingElement", AffectingElement, AffectingElement_isNULL); ToStringArrayInt("ElementEffects", ElementEffects, ElementEffects_isNULL); ToStringArray("OtherElementEffectsDescriptions", OtherElementEffectsDescriptions, OtherElementEffectsDescriptions_isNULL); ToStringInt("AssignedSequence", AssignedSequence, AssignedSequence_isNULL); ToStringArrayInt("ElementAffects", ElementAffects, ElementAffects_isNULL); os << " [\\OpenDRIM_AccountManagementServiceAffectsIdentity]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_IdentityInGroup.cpp0000644000175000017500000001153311401066117031757 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_IdentityInGroup.h" #include "OpenDRIM_IdentityInGroupAccess.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_IdentityInGroup& instance) { os << " [OpenDRIM_IdentityInGroup]" << endl; ToStringRef("Collection", Collection, Collection_isNULL); ToStringRef("Member", Member, Member_isNULL); ToString("IsPrimaryGroup", IsPrimaryGroup, IsPrimaryGroup_isNULL); os << " [\\OpenDRIM_IdentityInGroup]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_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 = Simple_Identity_Management_OpenDRIM_IdentityInGroup_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 = Simple_Identity_Management_OpenDRIM_IdentityInGroup_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 = Simple_Identity_Management_OpenDRIM_IdentityInGroup_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_GroupAssignedIdentity.cpp0000644000175000017500000001157511401066117033154 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_GroupAssignedIdentity.h" #include "OpenDRIM_GroupAssignedIdentityAccess.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_GroupAssignedIdentity& instance) { os << " [OpenDRIM_GroupAssignedIdentity]" << endl; ToStringRef("IdentityInfo", IdentityInfo, IdentityInfo_isNULL); ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); os << " [\\OpenDRIM_GroupAssignedIdentity]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_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 = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_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 = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_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 = Simple_Identity_Management_OpenDRIM_GroupAssignedIdentity_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_AccountManagementService.cpp0000644000175000017500000001517311401066117033600 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementService.h" #include "OpenDRIM_AccountManagementServiceAccess.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_AccountManagementService& instance) { os << " [OpenDRIM_AccountManagementService]" << endl; 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("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToStringInt("EnabledState", EnabledState, EnabledState_isNULL); ToString("OtherEnabledState", OtherEnabledState, OtherEnabledState_isNULL); ToStringInt("RequestedState", RequestedState, RequestedState_isNULL); ToStringInt("EnabledDefault", EnabledDefault, EnabledDefault_isNULL); ToString("TimeOfLastStateChange", TimeOfLastStateChange, TimeOfLastStateChange_isNULL); ToStringArrayInt("AvailableRequestedStates", AvailableRequestedStates, AvailableRequestedStates_isNULL); ToStringInt("TransitioningToState", TransitioningToState, TransitioningToState_isNULL); ToString("SystemCreationClassName", SystemCreationClassName, SystemCreationClassName_isNULL); ToString("SystemName", SystemName, SystemName_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("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_AccountManagementService]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_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 = Simple_Identity_Management_OpenDRIM_AccountManagementService_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 = Simple_Identity_Management_OpenDRIM_AccountManagementService_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 = Simple_Identity_Management_OpenDRIM_AccountManagementService_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_AccountManagementCapabilities.cpp0000644000175000017500000001324311401066117034565 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementCapabilities.h" #include "OpenDRIM_AccountManagementCapabilitiesAccess.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_AccountManagementCapabilities& instance) { os << " [OpenDRIM_AccountManagementCapabilities]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToStringInt("MaxElementNameLen", MaxElementNameLen, MaxElementNameLen_isNULL); ToStringArrayInt("RequestedStatesSupported", RequestedStatesSupported, RequestedStatesSupported_isNULL); ToString("ElementNameMask", ElementNameMask, ElementNameMask_isNULL); ToStringArrayInt("StateAwareness", StateAwareness, StateAwareness_isNULL); ToStringArrayInt("RequestedStateSupported", RequestedStateSupported, RequestedStateSupported_isNULL); ToString("ElementNameEditSupported", ElementNameEditSupported, ElementNameEditSupported_isNULL); ToStringArrayInt("OperationsSupported", OperationsSupported, OperationsSupported_isNULL); os << " [\\OpenDRIM_AccountManagementCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_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 = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_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 = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_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 = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_AccountCapabilities.cpp0000644000175000017500000001367711401066117032603 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountCapabilities.h" #include "OpenDRIM_AccountCapabilitiesAccess.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_AccountCapabilities& instance) { os << " [OpenDRIM_AccountCapabilities]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToStringInt("MaxElementNameLen", MaxElementNameLen, MaxElementNameLen_isNULL); ToStringArrayInt("RequestedStatesSupported", RequestedStatesSupported, RequestedStatesSupported_isNULL); ToString("ElementNameMask", ElementNameMask, ElementNameMask_isNULL); ToStringArrayInt("StateAwareness", StateAwareness, StateAwareness_isNULL); ToStringInt("PasswordHistory", PasswordHistory, PasswordHistory_isNULL); ToString("MaximumPasswordAge", MaximumPasswordAge, MaximumPasswordAge_isNULL); ToStringArrayInt("ComplexPasswordRulesSupported", ComplexPasswordRulesSupported, ComplexPasswordRulesSupported_isNULL); ToString("DisableOnInactivity", DisableOnInactivity, DisableOnInactivity_isNULL); ToStringArrayInt("RequestedStateSupported", RequestedStateSupported, RequestedStateSupported_isNULL); ToString("ElementNameEditSupported", ElementNameEditSupported, ElementNameEditSupported_isNULL); ToString("DisableTimeoutAfterPasswordExpiration", DisableTimeoutAfterPasswordExpiration, DisableTimeoutAfterPasswordExpiration_isNULL); os << " [\\OpenDRIM_AccountCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_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 = Simple_Identity_Management_OpenDRIM_AccountCapabilities_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 = Simple_Identity_Management_OpenDRIM_AccountCapabilities_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 = Simple_Identity_Management_OpenDRIM_AccountCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_GroupIdentity.cpp0000644000175000017500000001171611401066117031473 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_GroupIdentity.h" #include "OpenDRIM_GroupIdentityAccess.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_GroupIdentity& instance) { os << " [OpenDRIM_GroupIdentity]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("CurrentlyAuthenticated", CurrentlyAuthenticated, CurrentlyAuthenticated_isNULL); os << " [\\OpenDRIM_GroupIdentity]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupIdentity_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_GroupIdentity_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 = Simple_Identity_Management_OpenDRIM_GroupIdentity_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 = Simple_Identity_Management_OpenDRIM_GroupIdentity_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 = Simple_Identity_Management_OpenDRIM_GroupIdentity_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_GroupOnSystem.cpp0000644000175000017500000001143211401066117031456 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_GroupOnSystem.h" #include "OpenDRIM_GroupOnSystemAccess.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_GroupOnSystem& instance) { os << " [OpenDRIM_GroupOnSystem]" << endl; ToStringRef("OwningElement", OwningElement, OwningElement_isNULL); ToStringRef("OwnedElement", OwnedElement, OwnedElement_isNULL); os << " [\\OpenDRIM_GroupOnSystem]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_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 = Simple_Identity_Management_OpenDRIM_GroupOnSystem_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 = Simple_Identity_Management_OpenDRIM_GroupOnSystem_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 = Simple_Identity_Management_OpenDRIM_GroupOnSystem_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_AccountIdentity.cpp0000644000175000017500000001174611401066117031776 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountIdentity.h" #include "OpenDRIM_AccountIdentityAccess.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_AccountIdentity& instance) { os << " [OpenDRIM_AccountIdentity]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("CurrentlyAuthenticated", CurrentlyAuthenticated, CurrentlyAuthenticated_isNULL); os << " [\\OpenDRIM_AccountIdentity]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountIdentity_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_AccountIdentity_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 = Simple_Identity_Management_OpenDRIM_AccountIdentity_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 = Simple_Identity_Management_OpenDRIM_AccountIdentity_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 = Simple_Identity_Management_OpenDRIM_AccountIdentity_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_RegisteredSimpleIdentityManagementProfile.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/test/testOpenDRIM_RegisteredSimpleIdentityManagement0000644000175000017500000001332311401066117035056 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_RegisteredSimpleIdentityManagementProfile.h" #include "OpenDRIM_RegisteredSimpleIdentityManagementProfileAccess.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_RegisteredSimpleIdentityManagementProfile& instance) { os << " [OpenDRIM_RegisteredSimpleIdentityManagementProfile]" << 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_RegisteredSimpleIdentityManagementProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_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 = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_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 = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_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 = Simple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/acinclude.m40000644000175000017500000002131711401066117025034 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# AC_DEFUN([SHOW_COPYRIGHT], [ echo "################################################################################# # Linux Management Providers (LMP), Simple_Identity_Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# " ] ) 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-simpleidentitymanagement-1.0.0~ppa/Common/0000755000175000017500000000000011401066117024067 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/Common/Simple_Identity_Management_Common.cpp0000644000175000017500000000322011401066117033336 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "Simple_Identity_Management_Common.h" opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/Common/Makefile.am0000644000175000017500000000373411401066117026132 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# commonlibdir = @COMMONLIBDIR@ commonlib_LTLIBRARIES = libcmpiSimple_Identity_Management_Common.la libcmpiSimple_Identity_Management_Common_la_SOURCES = Simple_Identity_Management_Common.cpp libcmpiSimple_Identity_Management_Common_la_LDFLAGS = -avoid-version libcmpiSimple_Identity_Management_Common_la_LIBADD = -lopendrim noinst_HEADERS = Simple_Identity_Management_Common.h opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/Common/Simple_Identity_Management_Common.h0000644000175000017500000000340111401066117033004 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef SIMPLE_IDENTITY_MANAGEMENT_COMMON_H_ #define SIMPLE_IDENTITY_MANAGEMENT_COMMON_H_ #include #endif /*SIMPLE_IDENTITY_MANAGEMENT_COMMON_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountCapabilities/0000755000175000017500000000000011401066117030202 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountCapabilities/Makefile.am0000644000175000017500000000474111401066117032244 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_AccountCapabilitiesProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountCapabilitiesProvider_la_CPPFLAGS = -I../OpenDRIM_Account/ -I../OpenDRIM_Group libcmpiSimple_Identity_Management_OpenDRIM_AccountCapabilitiesProvider_la_SOURCES = OpenDRIM_AccountCapabilitiesAccess.cpp OpenDRIM_AccountCapabilitiesProvider.cpp cmpiOpenDRIM_AccountCapabilities.cpp libcmpiSimple_Identity_Management_OpenDRIM_AccountCapabilitiesProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la ../OpenDRIM_Account/libcmpiSimple_Identity_Management_OpenDRIM_AccountProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_AccountCapabilities.h OpenDRIM_AccountCapabilities.h OpenDRIM_AccountCapabilitiesAccess.h ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountCapabilities/OpenDRIM_AccountCapabilitiesProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountCapabilities/OpenDRIM_AccountCapabil0000644000175000017500000003547011401066117034443 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountCapabilities.h" #include "OpenDRIM_AccountCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProviderSetInstance Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_AccountCapabilities_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_AccountCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_AccountCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountCapabilities instance; Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProviderSetInstance(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_AccountCapabilities newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountCapabilities instance; Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_AccountCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountCapabilities instance; Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProviderInvokeMethod(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_AccountCapabilities instance; Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"InstanceID"}; int errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="CreateGoalSettings") { unsigned short returnValue; OpenDRIM_AccountCapabilities_CreateGoalSettings_In inArgs; Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCPP(_broker, in, inArgs); OpenDRIM_AccountCapabilities_CreateGoalSettings_Out outArgs; errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_CreateGoalSettings(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint16, CMPI_uint16); } else { errorMessage = (string) OpenDRIM_AccountCapabilities_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 Simple_Identity_Management_OpenDRIM_AccountCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountCapabilities_init FAILED: " + (string) OpenDRIM_AccountCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountCapabilities_unload FAILED: " + (string) OpenDRIM_AccountCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_AccountCapabilities_INIT if (Simple_Identity_Management_OpenDRIM_AccountCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProvider, Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountCapabilities_INIT); CMMethodMIStub(Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProvider, Simple_Identity_Management_OpenDRIM_AccountCapabilitiesProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountCapabilities/OpenDRIM_AccountCapabilitiesAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountCapabilities/OpenDRIM_AccountCapabil0000644000175000017500000000751511401066117034442 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTCAPABILITIESACCESS_H_ #define OPENDRIM_ACCOUNTCAPABILITIESACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_AccountCapabilities.h" int Simple_Identity_Management_OpenDRIM_AccountCapabilities_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountCapabilities_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountCapabilities& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountCapabilities& newInstance, const OpenDRIM_AccountCapabilities& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountCapabilities& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountCapabilities& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountCapabilities_CreateGoalSettings(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountCapabilities& instance, unsigned short& returnValue, const OpenDRIM_AccountCapabilities_CreateGoalSettings_In& in, OpenDRIM_AccountCapabilities_CreateGoalSettings_Out& out, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountCapabilities_extractAccountCapabilitiesInfo(OpenDRIM_AccountCapabilities& instance, const vector& current_etc_passwd_line, const vector& current_etc_shadow_line, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountCapabilities_populate(OpenDRIM_AccountCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_ACCOUNTCAPABILITIESACCESS_H_*/ ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountCapabilities/cmpiOpenDRIM_AccountCapabilities.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountCapabilities/cmpiOpenDRIM_AccountCap0000644000175000017500000001674411401066117034467 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountCapabilities.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_AccountCapabilities_classnames[0], OpenDRIM_AccountCapabilities_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountCapabilities& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_AccountCapabilities_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.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.StateAwareness_isNULL) ci.setProperty("StateAwareness", instance.StateAwareness); if (!instance.PasswordHistory_isNULL) ci.setProperty("PasswordHistory", instance.PasswordHistory); if (!instance.MaximumPasswordAge_isNULL) ci.setPropertyDatetime("MaximumPasswordAge", instance.MaximumPasswordAge); if (!instance.ComplexPasswordRulesSupported_isNULL) ci.setProperty("ComplexPasswordRulesSupported", instance.ComplexPasswordRulesSupported); if (!instance.DisableOnInactivity_isNULL) ci.setProperty("DisableOnInactivity", instance.DisableOnInactivity); if (!instance.RequestedStateSupported_isNULL) ci.setProperty("RequestedStateSupported", instance.RequestedStateSupported); if (!instance.ElementNameEditSupported_isNULL) ci.setProperty("ElementNameEditSupported", instance.ElementNameEditSupported); if (!instance.DisableTimeoutAfterPasswordExpiration_isNULL) ci.setPropertyDatetime("DisableTimeoutAfterPasswordExpiration", instance.DisableTimeoutAfterPasswordExpiration); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountCapabilities& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountCapabilities& 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("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("StateAwareness", instance.StateAwareness) == OK) instance.StateAwareness_isNULL = false; if (inst.getProperty("PasswordHistory", instance.PasswordHistory) == OK) instance.PasswordHistory_isNULL = false; if (inst.getPropertyDatetime("MaximumPasswordAge", instance.MaximumPasswordAge) == OK) instance.MaximumPasswordAge_isNULL = false; if (inst.getProperty("ComplexPasswordRulesSupported", instance.ComplexPasswordRulesSupported) == OK) instance.ComplexPasswordRulesSupported_isNULL = false; if (inst.getProperty("DisableOnInactivity", instance.DisableOnInactivity) == OK) instance.DisableOnInactivity_isNULL = false; if (inst.getProperty("RequestedStateSupported", instance.RequestedStateSupported) == OK) instance.RequestedStateSupported_isNULL = false; if (inst.getProperty("ElementNameEditSupported", instance.ElementNameEditSupported) == OK) instance.ElementNameEditSupported_isNULL = false; if (inst.getPropertyDatetime("DisableTimeoutAfterPasswordExpiration", instance.DisableTimeoutAfterPasswordExpiration) == OK) instance.DisableTimeoutAfterPasswordExpiration_isNULL = false; _L_; } void Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_AccountCapabilities_CreateGoalSettings_In& args) { _E_; CMPIStatus rc; CMPIData data; vector TemplateGoalSettings; data = in->ft->getArg(in, "TemplateGoalSettings", &rc); if (rc.rc == OK) { CT_ToC(data, TemplateGoalSettings); args.setTemplateGoalSettings(TemplateGoalSettings); } vector SupportedGoalSettings; data = in->ft->getArg(in, "SupportedGoalSettings", &rc); if (rc.rc == OK) { CT_ToC(data, SupportedGoalSettings); args.setSupportedGoalSettings(SupportedGoalSettings); } _L_; } void Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_AccountCapabilities_CreateGoalSettings_Out& args) { _E_; CMPIValue value; int errorMessage; vector SupportedGoalSettings; errorMessage = args.getSupportedGoalSettings(SupportedGoalSettings); if (errorMessage == OK) { value = CT_toCMPI(broker, SupportedGoalSettings); out->ft->addArg(out, "SupportedGoalSettings", &value, CMPI_stringA); } _L_; } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountCapabilities/OpenDRIM_AccountCapabilities.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountCapabilities/OpenDRIM_AccountCapabil0000644000175000017500000002361211401066117034436 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTCAPABILITIES_H_ #define OPENDRIM_ACCOUNTCAPABILITIES_H_ #include const static char* OpenDRIM_AccountCapabilities_classnames[] = {"OpenDRIM_AccountCapabilities"}; static string OpenDRIM_AccountCapabilities_NAMESPACE = _NAMESPACE; class OpenDRIM_AccountCapabilities { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string InstanceID; bool InstanceID_isNULL; string ElementName; bool ElementName_isNULL; unsigned short MaxElementNameLen; bool MaxElementNameLen_isNULL; vector RequestedStatesSupported; bool RequestedStatesSupported_isNULL; string ElementNameMask; bool ElementNameMask_isNULL; vector StateAwareness; bool StateAwareness_isNULL; unsigned short PasswordHistory; bool PasswordHistory_isNULL; string MaximumPasswordAge; bool MaximumPasswordAge_isNULL; vector ComplexPasswordRulesSupported; bool ComplexPasswordRulesSupported_isNULL; bool DisableOnInactivity; bool DisableOnInactivity_isNULL; vector RequestedStateSupported; bool RequestedStateSupported_isNULL; bool ElementNameEditSupported; bool ElementNameEditSupported_isNULL; string DisableTimeoutAfterPasswordExpiration; bool DisableTimeoutAfterPasswordExpiration_isNULL; OpenDRIM_AccountCapabilities() { Caption_isNULL = true; Description_isNULL = true; InstanceID_isNULL = true; ElementName_isNULL = true; MaxElementNameLen_isNULL = true; RequestedStatesSupported_isNULL = true; ElementNameMask_isNULL = true; StateAwareness_isNULL = true; PasswordHistory_isNULL = true; MaximumPasswordAge_isNULL = true; ComplexPasswordRulesSupported_isNULL = true; DisableOnInactivity_isNULL = true; RequestedStateSupported_isNULL = true; ElementNameEditSupported_isNULL = true; DisableTimeoutAfterPasswordExpiration_isNULL = true; } ~OpenDRIM_AccountCapabilities() {} 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 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 getStateAwareness(vector& value) const { if (StateAwareness_isNULL==true) return NOT_FOUND; value = StateAwareness; return OK; } int setStateAwareness(const vector& newValue) { StateAwareness = newValue; StateAwareness_isNULL = false; return OK; } int getPasswordHistory(unsigned short& value) const { if (PasswordHistory_isNULL==true) return NOT_FOUND; value = PasswordHistory; return OK; } int setPasswordHistory(const unsigned short& newValue) { PasswordHistory = newValue; PasswordHistory_isNULL = false; return OK; } int getMaximumPasswordAge(string& value) const { if (MaximumPasswordAge_isNULL==true) return NOT_FOUND; value = MaximumPasswordAge; return OK; } int setMaximumPasswordAge(const string& newValue) { MaximumPasswordAge = newValue; MaximumPasswordAge_isNULL = false; return OK; } int getComplexPasswordRulesSupported(vector& value) const { if (ComplexPasswordRulesSupported_isNULL==true) return NOT_FOUND; value = ComplexPasswordRulesSupported; return OK; } int setComplexPasswordRulesSupported(const vector& newValue) { ComplexPasswordRulesSupported = newValue; ComplexPasswordRulesSupported_isNULL = false; return OK; } int getDisableOnInactivity(bool& value) const { if (DisableOnInactivity_isNULL==true) return NOT_FOUND; value = DisableOnInactivity; return OK; } int setDisableOnInactivity(const bool& newValue) { DisableOnInactivity = newValue; DisableOnInactivity_isNULL = false; return OK; } int getRequestedStateSupported(vector& value) const { if (RequestedStateSupported_isNULL==true) return NOT_FOUND; value = RequestedStateSupported; return OK; } int setRequestedStateSupported(const vector& newValue) { RequestedStateSupported = newValue; RequestedStateSupported_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 getDisableTimeoutAfterPasswordExpiration(string& value) const { if (DisableTimeoutAfterPasswordExpiration_isNULL==true) return NOT_FOUND; value = DisableTimeoutAfterPasswordExpiration; return OK; } int setDisableTimeoutAfterPasswordExpiration(const string& newValue) { DisableTimeoutAfterPasswordExpiration = newValue; DisableTimeoutAfterPasswordExpiration_isNULL = false; return OK; } }; class OpenDRIM_AccountCapabilities_CreateGoalSettings_In { public: vector TemplateGoalSettings; bool TemplateGoalSettings_isNULL; vector SupportedGoalSettings; bool SupportedGoalSettings_isNULL; OpenDRIM_AccountCapabilities_CreateGoalSettings_In() { TemplateGoalSettings_isNULL = true; SupportedGoalSettings_isNULL = true; } ~OpenDRIM_AccountCapabilities_CreateGoalSettings_In() {} int getTemplateGoalSettings(vector& value) const { if (TemplateGoalSettings_isNULL == true) return NOT_FOUND; value = TemplateGoalSettings; return OK; } int setTemplateGoalSettings(const vector& newValue) { TemplateGoalSettings = newValue; TemplateGoalSettings_isNULL = false; return OK; } int getSupportedGoalSettings(vector& value) const { if (SupportedGoalSettings_isNULL == true) return NOT_FOUND; value = SupportedGoalSettings; return OK; } int setSupportedGoalSettings(const vector& newValue) { SupportedGoalSettings = newValue; SupportedGoalSettings_isNULL = false; return OK; } }; class OpenDRIM_AccountCapabilities_CreateGoalSettings_Out { public: vector SupportedGoalSettings; bool SupportedGoalSettings_isNULL; OpenDRIM_AccountCapabilities_CreateGoalSettings_Out() { SupportedGoalSettings_isNULL = true; } ~OpenDRIM_AccountCapabilities_CreateGoalSettings_Out() {} int getSupportedGoalSettings(vector& value) const { if (SupportedGoalSettings_isNULL == true) return NOT_FOUND; value = SupportedGoalSettings; return OK; } int setSupportedGoalSettings(const vector& newValue) { SupportedGoalSettings = newValue; SupportedGoalSettings_isNULL = false; return OK; } }; #endif /*OPENDRIM_ACCOUNTCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountCapabilities/OpenDRIM_AccountCapabilitiesAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountCapabilities/OpenDRIM_AccountCapabil0000644000175000017500000002505011401066117034434 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_AccountCapabilitiesAccess.h" #include "OpenDRIM_AccountAccess.h" int Simple_Identity_Management_OpenDRIM_AccountCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountCapabilities_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; // Get the default minimum length for an account password vector etc_login_defs_entries, etc_login_defs_values; etc_login_defs_entries.push_back("PASS_MIN_LEN"); CF_assert(Simple_Identity_Management_OpenDRIM_Account_extractLoginDefsValue(etc_login_defs_values, etc_login_defs_entries, errorMessage)); vector ComplexPasswordRulesSupported; ComplexPasswordRulesSupported.push_back(2); // Read the /etc/passwd file string etc_passwd; CF_assert(CF_readTextFile("/etc/passwd", etc_passwd, errorMessage)); vector etc_passwd_lines; CF_splitText(etc_passwd_lines, etc_passwd, '\n'); // Read the /etc/shadow file string etc_shadow; vector etc_shadow_lines; if (discriminant=="ei" || discriminant=="gi") { CF_assert(CF_readTextFile("/etc/shadow", etc_shadow, errorMessage)); CF_splitText(etc_shadow_lines, etc_shadow, '\n'); if (etc_shadow_lines.size()!=etc_passwd_lines.size()) { errorMessage="Wrong format (missmatch with /etc/passwd): /etc/shadow"; return FAILED; } } // In gi (getInstance) mode the first instance in the vector contains // the objectpath of the instance we're supposed to get string gi_instance_id; if (discriminant=="gi") result[0].getInstanceID(gi_instance_id); // For each line of /etc/passwd and /etc/shadow for (size_t i=0; i current_etc_passwd_line; CF_splitText(current_etc_passwd_line, etc_passwd_lines[i], ':'); if (current_etc_passwd_line.size()!=7) { errorMessage="Wrong format (at line "+CF_intToStr((unsigned long) i+1)+"): /etc/passwd"; return FAILED; } // Assign the key values OpenDRIM_AccountCapabilities instance; instance.setInstanceID(current_etc_passwd_line[0]); // If we need the content of the instance(s) // We check if the current line matches with the requested instance (gi mode) if (discriminant=="ei" || (discriminant=="gi" && CF_strCmpNoCase(gi_instance_id, current_etc_passwd_line[0]))) { // Check the format of the line of /etc/shadow vector current_etc_shadow_line; CF_splitText(current_etc_shadow_line, etc_shadow_lines[i], ':'); if (current_etc_shadow_line.size()!=9) { errorMessage="Wrong format (at line "+CF_intToStr((unsigned long) i+1)+"): /etc/shadow"; return FAILED; } // If we're in gi mode, fill in the first instance of the vector if (discriminant=="gi") { if (etc_login_defs_values[0]!="") result[0].setComplexPasswordRulesSupported(ComplexPasswordRulesSupported); CF_assert(Simple_Identity_Management_OpenDRIM_AccountCapabilities_extractAccountCapabilitiesInfo(result[0], current_etc_passwd_line, current_etc_shadow_line, errorMessage)); // We found the instance so we can exit here return OK; } // Else we fill the current instance if (etc_login_defs_values[0]!="") instance.setComplexPasswordRulesSupported(ComplexPasswordRulesSupported); CF_assert(Simple_Identity_Management_OpenDRIM_AccountCapabilities_extractAccountCapabilitiesInfo(instance, current_etc_passwd_line, current_etc_shadow_line, errorMessage)); } // Add the instance to the vector if (discriminant=="ei" || discriminant=="ein") result.push_back(instance); } // If we get here it means we didn't find the instance if (discriminant=="gi") { errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountCapabilities& instance, const char** properties, string& errorMessage) { _E_; vector instances; instances.push_back(instance); // Get the instance (it also checks if it exists) CF_assert(Simple_Identity_Management_OpenDRIM_AccountCapabilities_retrieve(broker, ctx, instances, properties, errorMessage, "gi")); instance=instances[0]; _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountCapabilities& newInstance, const OpenDRIM_AccountCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // We are going to modify the instance by executing the 'passwd' command string InstanceID; oldInstance.getInstanceID(InstanceID); string command="passwd "; string newMaximumPasswordAge, oldMaximumPasswordAge; // Check which properties have been modified and form passwd options if (newInstance.getMaximumPasswordAge(newMaximumPasswordAge)!=NOT_FOUND) { if (oldInstance.getMaximumPasswordAge(oldMaximumPasswordAge)==NOT_FOUND || newMaximumPasswordAge!=oldMaximumPasswordAge) { if (newMaximumPasswordAge.substr(21,4)!=":000") { errorMessage="Maximum password age MUST be an interval."; return FAILED; } newMaximumPasswordAge=newMaximumPasswordAge.substr(0,8); while (newMaximumPasswordAge[0]=='0') newMaximumPasswordAge.erase(0,1); command+="-x "+newMaximumPasswordAge+" "; } } string newDisableTimeoutAfterPasswordExpiration, oldDisableTimeoutAfterPasswordExpiration; if (newInstance.getDisableTimeoutAfterPasswordExpiration(newDisableTimeoutAfterPasswordExpiration)!=NOT_FOUND) { if (oldInstance.getDisableTimeoutAfterPasswordExpiration(oldDisableTimeoutAfterPasswordExpiration)==NOT_FOUND || newDisableTimeoutAfterPasswordExpiration!=oldDisableTimeoutAfterPasswordExpiration) { if (newDisableTimeoutAfterPasswordExpiration.substr(21,4)!=":000") { errorMessage="Password disable timeout age MUST be an interval."; return FAILED; } newDisableTimeoutAfterPasswordExpiration=newDisableTimeoutAfterPasswordExpiration.substr(0,8); while (newDisableTimeoutAfterPasswordExpiration[0]=='0') newDisableTimeoutAfterPasswordExpiration.erase(0,1); command+="-i "+newDisableTimeoutAfterPasswordExpiration+" "; } } // Execute passwd if (command!="passwd ") { string stdOut, stdErr; CF_assert(CF_runCommand(command+InstanceID, stdOut, stdErr, errorMessage)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountCapabilities_CreateGoalSettings(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountCapabilities& instance, unsigned short& returnValue, const OpenDRIM_AccountCapabilities_CreateGoalSettings_In& in, OpenDRIM_AccountCapabilities_CreateGoalSettings_Out& out, string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountCapabilities_extractAccountCapabilitiesInfo(OpenDRIM_AccountCapabilities& instance, const vector& current_etc_passwd_line, const vector& current_etc_shadow_line, string& errorMessage) { _E_; // Assign account capabilities information instance.setDisableOnInactivity(false); string MaximumPasswordAge=current_etc_shadow_line[4]; if (MaximumPasswordAge.size()<=8 && MaximumPasswordAge!="99999" && MaximumPasswordAge!="") { unsigned long initial_size=MaximumPasswordAge.size(); for (size_t i=0; i<8-initial_size; i++) MaximumPasswordAge="0"+MaximumPasswordAge; MaximumPasswordAge+="000000.000000:000"; instance.setMaximumPasswordAge(MaximumPasswordAge); } if (current_etc_shadow_line[6]!="") { string DisableTimeoutAfterPasswordExpiration=current_etc_shadow_line[6]; unsigned long initial_size=DisableTimeoutAfterPasswordExpiration.size(); for (size_t i=0; i<8-initial_size; i++) DisableTimeoutAfterPasswordExpiration="0"+DisableTimeoutAfterPasswordExpiration; DisableTimeoutAfterPasswordExpiration+="000000.000000:000"; instance.setDisableTimeoutAfterPasswordExpiration(DisableTimeoutAfterPasswordExpiration); instance.setDisableOnInactivity(true); } // set ElementName instance.setElementName(instance.InstanceID+" account capabilities"); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountCapabilities_populate(OpenDRIM_AccountCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountCapabilities/cmpiOpenDRIM_AccountCapabilities.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountCapabilities/cmpiOpenDRIM_AccountCap0000644000175000017500000000537011401066117034460 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_ACCOUNTCAPABILITIES_H_ #define CMPIOPENDRIM_ACCOUNTCAPABILITIES_H_ #include "OpenDRIM_AccountCapabilities.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountCapabilities& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountCapabilities& instance); void Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountCapabilities& instance); void Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountCapabilities& instance); void Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_AccountCapabilities_CreateGoalSettings_In& args); void Simple_Identity_Management_OpenDRIM_AccountCapabilities_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_AccountCapabilities_CreateGoalSettings_Out& args); #endif /*CMPIOPENDRIM_ACCOUNTCAPABILITIES_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementCapabilities/0000755000175000017500000000000011401066117032177 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementCapabilities/Makefile.am0000644000175000017500000000456211401066117034242 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProvider_la_SOURCES = OpenDRIM_AccountManagementCapabilitiesAccess.cpp OpenDRIM_AccountManagementCapabilitiesProvider.cpp cmpiOpenDRIM_AccountManagementCapabilities.cpp libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_AccountManagementCapabilities.h OpenDRIM_AccountManagementCapabilities.h OpenDRIM_AccountManagementCapabilitiesAccess.h ././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementCapabilities/OpenDRIM_AccountManagementCapabilitiesProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementCapabilities/OpenDRIM_Acco0000644000175000017500000003713011401066117034430 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementCapabilities.h" #include "OpenDRIM_AccountManagementCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProviderSetInstance Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementCapabilities instance; Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProviderSetInstance(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_AccountManagementCapabilities newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementCapabilities instance; Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_AccountManagementCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementCapabilities instance; Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProviderInvokeMethod(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_AccountManagementCapabilities instance; Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"InstanceID"}; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="CreateGoalSettings") { unsigned short returnValue; OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_In inArgs; Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCPP(_broker, in, inArgs); OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_Out outArgs; errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_CreateGoalSettings(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint16, CMPI_uint16); } else { errorMessage = (string) OpenDRIM_AccountManagementCapabilities_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 Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_init FAILED: " + (string) OpenDRIM_AccountManagementCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_unload FAILED: " + (string) OpenDRIM_AccountManagementCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_INIT if (Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProvider, Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_INIT); CMMethodMIStub(Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProvider, Simple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementCapabilities/cmpiOpenDRIM_AccountManagementCapabilities.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementCapabilities/cmpiOpenDRIM_0000644000175000017500000001500611401066117034511 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementCapabilities.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountManagementCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_AccountManagementCapabilities_classnames[0], OpenDRIM_AccountManagementCapabilities_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountManagementCapabilities& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_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.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.StateAwareness_isNULL) ci.setProperty("StateAwareness", instance.StateAwareness); if (!instance.RequestedStateSupported_isNULL) ci.setProperty("RequestedStateSupported", instance.RequestedStateSupported); if (!instance.ElementNameEditSupported_isNULL) ci.setProperty("ElementNameEditSupported", instance.ElementNameEditSupported); if (!instance.OperationsSupported_isNULL) ci.setProperty("OperationsSupported", instance.OperationsSupported); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountManagementCapabilities& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountManagementCapabilities& 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("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("StateAwareness", instance.StateAwareness) == OK) instance.StateAwareness_isNULL = false; if (inst.getProperty("RequestedStateSupported", instance.RequestedStateSupported) == OK) instance.RequestedStateSupported_isNULL = false; if (inst.getProperty("ElementNameEditSupported", instance.ElementNameEditSupported) == OK) instance.ElementNameEditSupported_isNULL = false; if (inst.getProperty("OperationsSupported", instance.OperationsSupported) == OK) instance.OperationsSupported_isNULL = false; _L_; } void Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_In& args) { _E_; CMPIStatus rc; CMPIData data; vector TemplateGoalSettings; data = in->ft->getArg(in, "TemplateGoalSettings", &rc); if (rc.rc == OK) { CT_ToC(data, TemplateGoalSettings); args.setTemplateGoalSettings(TemplateGoalSettings); } vector SupportedGoalSettings; data = in->ft->getArg(in, "SupportedGoalSettings", &rc); if (rc.rc == OK) { CT_ToC(data, SupportedGoalSettings); args.setSupportedGoalSettings(SupportedGoalSettings); } _L_; } void Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_Out& args) { _E_; CMPIValue value; int errorMessage; vector SupportedGoalSettings; errorMessage = args.getSupportedGoalSettings(SupportedGoalSettings); if (errorMessage == OK) { value = CT_toCMPI(broker, SupportedGoalSettings); out->ft->addArg(out, "SupportedGoalSettings", &value, CMPI_stringA); } _L_; } ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementCapabilities/OpenDRIM_AccountManagementCapabilities.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementCapabilities/OpenDRIM_Acco0000644000175000017500000002034711401066117034432 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTMANAGEMENTCAPABILITIES_H_ #define OPENDRIM_ACCOUNTMANAGEMENTCAPABILITIES_H_ #include const static char* OpenDRIM_AccountManagementCapabilities_classnames[] = {"OpenDRIM_AccountManagementCapabilities"}; static string OpenDRIM_AccountManagementCapabilities_NAMESPACE = _NAMESPACE; class OpenDRIM_AccountManagementCapabilities { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string InstanceID; bool InstanceID_isNULL; string ElementName; bool ElementName_isNULL; unsigned short MaxElementNameLen; bool MaxElementNameLen_isNULL; vector RequestedStatesSupported; bool RequestedStatesSupported_isNULL; string ElementNameMask; bool ElementNameMask_isNULL; vector StateAwareness; bool StateAwareness_isNULL; vector RequestedStateSupported; bool RequestedStateSupported_isNULL; bool ElementNameEditSupported; bool ElementNameEditSupported_isNULL; vector OperationsSupported; bool OperationsSupported_isNULL; OpenDRIM_AccountManagementCapabilities() { Caption_isNULL = true; Description_isNULL = true; InstanceID_isNULL = true; ElementName_isNULL = true; MaxElementNameLen_isNULL = true; RequestedStatesSupported_isNULL = true; ElementNameMask_isNULL = true; StateAwareness_isNULL = true; RequestedStateSupported_isNULL = true; ElementNameEditSupported_isNULL = true; OperationsSupported_isNULL = true; } ~OpenDRIM_AccountManagementCapabilities() {} 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 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 getStateAwareness(vector& value) const { if (StateAwareness_isNULL==true) return NOT_FOUND; value = StateAwareness; return OK; } int setStateAwareness(const vector& newValue) { StateAwareness = newValue; StateAwareness_isNULL = false; return OK; } int getRequestedStateSupported(vector& value) const { if (RequestedStateSupported_isNULL==true) return NOT_FOUND; value = RequestedStateSupported; return OK; } int setRequestedStateSupported(const vector& newValue) { RequestedStateSupported = newValue; RequestedStateSupported_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 getOperationsSupported(vector& value) const { if (OperationsSupported_isNULL==true) return NOT_FOUND; value = OperationsSupported; return OK; } int setOperationsSupported(const vector& newValue) { OperationsSupported = newValue; OperationsSupported_isNULL = false; return OK; } }; class OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_In { public: vector TemplateGoalSettings; bool TemplateGoalSettings_isNULL; vector SupportedGoalSettings; bool SupportedGoalSettings_isNULL; OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_In() { TemplateGoalSettings_isNULL = true; SupportedGoalSettings_isNULL = true; } ~OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_In() {} int getTemplateGoalSettings(vector& value) const { if (TemplateGoalSettings_isNULL == true) return NOT_FOUND; value = TemplateGoalSettings; return OK; } int setTemplateGoalSettings(const vector& newValue) { TemplateGoalSettings = newValue; TemplateGoalSettings_isNULL = false; return OK; } int getSupportedGoalSettings(vector& value) const { if (SupportedGoalSettings_isNULL == true) return NOT_FOUND; value = SupportedGoalSettings; return OK; } int setSupportedGoalSettings(const vector& newValue) { SupportedGoalSettings = newValue; SupportedGoalSettings_isNULL = false; return OK; } }; class OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_Out { public: vector SupportedGoalSettings; bool SupportedGoalSettings_isNULL; OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_Out() { SupportedGoalSettings_isNULL = true; } ~OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_Out() {} int getSupportedGoalSettings(vector& value) const { if (SupportedGoalSettings_isNULL == true) return NOT_FOUND; value = SupportedGoalSettings; return OK; } int setSupportedGoalSettings(const vector& newValue) { SupportedGoalSettings = newValue; SupportedGoalSettings_isNULL = false; return OK; } }; #endif /*OPENDRIM_ACCOUNTMANAGEMENTCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementCapabilities/cmpiOpenDRIM_AccountManagementCapabilities.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementCapabilities/cmpiOpenDRIM_0000644000175000017500000000563011401066117034513 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_ACCOUNTMANAGEMENTCAPABILITIES_H_ #define CMPIOPENDRIM_ACCOUNTMANAGEMENTCAPABILITIES_H_ #include "OpenDRIM_AccountManagementCapabilities.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountManagementCapabilities& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountManagementCapabilities& instance); void Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountManagementCapabilities& instance); void Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountManagementCapabilities& instance); void Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_In& args); void Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_Out& args); #endif /*CMPIOPENDRIM_ACCOUNTMANAGEMENTCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementCapabilities/OpenDRIM_AccountManagementCapabilitiesAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementCapabilities/OpenDRIM_Acco0000644000175000017500000000747211401066117034436 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTMANAGEMENTCAPABILITIESACCESS_H_ #define OPENDRIM_ACCOUNTMANAGEMENTCAPABILITIESACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_AccountManagementCapabilities.h" int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountManagementCapabilities& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementCapabilities& newInstance, const OpenDRIM_AccountManagementCapabilities& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementCapabilities& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementCapabilities& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_CreateGoalSettings(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementCapabilities& instance, unsigned short& returnValue, const OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_In& in, OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_Out& out, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_populate(OpenDRIM_AccountManagementCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_ACCOUNTMANAGEMENTCAPABILITIESACCESS_H_*/ ././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementCapabilities/OpenDRIM_AccountManagementCapabilitiesAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementCapabilities/OpenDRIM_Acco0000644000175000017500000001134511401066117034430 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_AccountManagementCapabilitiesAccess.h" string InstanceID; int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; CF_assert(CF_getSystemName(InstanceID, errorMessage)); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; // Only one instance // The key properties are based on the system name OpenDRIM_AccountManagementCapabilities instance; instance.setInstanceID(InstanceID); if(discriminant=="ei") CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_populate(instance, errorMessage)); result.push_back(instance); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountManagementCapabilities& instance, const char** properties, string& errorMessage) { _E_; // Only one instance // The key properties are based on the system name if (instance.InstanceID!=InstanceID) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_populate(instance, errorMessage)); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementCapabilities& newInstance, const OpenDRIM_AccountManagementCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_CreateGoalSettings(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementCapabilities& instance, unsigned short& returnValue, const OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_In& in, OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_Out& out, string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_populate(OpenDRIM_AccountManagementCapabilities& instance, string& errorMessage) { _E_; instance.setElementName("Account Management Capabilities"); instance.setMaxElementNameLen(256); instance.setElementNameEditSupported(true); _L_; return OK; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/configure.ac0000644000175000017500000001367211401066117025136 0ustar guillaumeguillaume# Process this file with autoconf to produce a configure script. ################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # 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), Simple_Identity_Management provider package Copyright (C) 2007 Frederic Desmons, ETRI This program is being developed under the "OpenDRIM" project. The "OpenDRIM" project web page: http://opendrim.sourceforge.net The "OpenDRIM" project mailing list: opendrim@googlegroups.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ###############################################################################]]) AC_INIT(Simple_Identity_Management 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_AccountOnSystem/Makefile OpenDRIM_AccountCapabilities/Makefile OpenDRIM_AccountIdentity/Makefile OpenDRIM_AccountAssignedIdentity/Makefile OpenDRIM_GroupAssignedIdentity/Makefile OpenDRIM_AccountManagementServiceAffectsIdentity/Makefile OpenDRIM_AccountManagementService/Makefile OpenDRIM_HostedAccountManagementService/Makefile OpenDRIM_RegisteredSimpleIdentityManagementProfile/Makefile OpenDRIM_AccountManagementServiceConformsToProfile/Makefile OpenDRIM_Group/Makefile OpenDRIM_AccountManagementServiceCapabilities/Makefile OpenDRIM_AccountAssociatedCapabilities/Makefile OpenDRIM_GroupIdentity/Makefile OpenDRIM_IdentityInGroup/Makefile OpenDRIM_AccountManagementCapabilities/Makefile OpenDRIM_Account/Makefile OpenDRIM_GroupOnSystem/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-simpleidentitymanagement-1.0.0~ppa/TODO0000644000175000017500000000010111401066117023317 0ustar guillaumeguillaumeTODO for Major.Minor.Revision ========================= // TODO opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/INSTALL0000644000175000017500000000704011401066117023671 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# --------------------------------------------------------- BUILD --------------------------------------------------------- ./configure CIMSERVER= // For seeing the possible options: ./configure --help make --------------------------------------------------------- INSTALLATION --------------------------------------------------------- make install // Complile and copy the libraries to the provider library directory make postinstall // Register the providers --------------------------------------------------------- REMOVAL --------------------------------------------------------- make preuninstall // Deregister the providers make uninstall // Delete the libraries from the provider directory --------------------------------------------------------- CLEANUP --------------------------------------------------------- make clean --------------------------------------------------------- DEBUG --------------------------------------------------------- Configure (./configure) the source code with 'CPPFLAGS=-D__DEBUG__'. The debugging information is printed in a file called 'cmpi_prov_debug.txt'. OpenPegasus from source: ----------------------- The file is located in the directory where you executed 'cimserver' (to start the CIM server). OpenPegasus from RPM: -------------------- If Pegasus is installed from RPM the file is located in the '/var/lib/Pegasus/cache' directory. SBLIM sfcb: ---------- The file is located in the directory where you executed 'sfcbd' (to start the CIM server). OpenWBEM: -------- // TODO --------------------------------------------------------- OFFLINE TEST --------------------------------------------------------- make test- If you enabled the debugging information, 'cmpi_prov_debug.txt' is created in the 'test' directory. The test MAY BE impossible to run for associations. If it is the case you have to install the provider package and test the association providers online (CIM server running). opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupIdentity/0000755000175000017500000000000011401066117027102 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupIdentity/OpenDRIM_GroupIdentityAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupIdentity/OpenDRIM_GroupIdentityAccess.0000644000175000017500000000620611401066117034474 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_GROUPIDENTITYACCESS_H_ #define OPENDRIM_GROUPIDENTITYACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_GroupIdentity.h" int Simple_Identity_Management_OpenDRIM_GroupIdentity_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupIdentity_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_GroupIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_GroupIdentity& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupIdentity& newInstance, const OpenDRIM_GroupIdentity& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupIdentity& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupIdentity& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupIdentity_populate(OpenDRIM_GroupIdentity& instance, string& errorMessage); #endif /*OPENDRIM_GROUPIDENTITYACCESS_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupIdentity/Makefile.am0000644000175000017500000000432211401066117031137 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_GroupIdentityProvider.la libcmpiSimple_Identity_Management_OpenDRIM_GroupIdentityProvider_la_SOURCES = OpenDRIM_GroupIdentityAccess.cpp OpenDRIM_GroupIdentityProvider.cpp cmpiOpenDRIM_GroupIdentity.cpp libcmpiSimple_Identity_Management_OpenDRIM_GroupIdentityProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la libcmpiSimple_Identity_Management_OpenDRIM_GroupIdentityProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_GroupIdentity.h OpenDRIM_GroupIdentity.h OpenDRIM_GroupIdentityAccess.h ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupIdentity/cmpiOpenDRIM_GroupIdentity.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupIdentity/cmpiOpenDRIM_GroupIdentity.cp0000644000175000017500000000734211401066117034550 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_GroupIdentity.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_GroupIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_GroupIdentity& instance) { _E_; Objectpath op(broker, OpenDRIM_GroupIdentity_classnames[0], OpenDRIM_GroupIdentity_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_GroupIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_GroupIdentity& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_GroupIdentity_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.CurrentlyAuthenticated_isNULL) ci.setProperty("CurrentlyAuthenticated", instance.CurrentlyAuthenticated); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_GroupIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_GroupIdentity& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void Simple_Identity_Management_OpenDRIM_GroupIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_GroupIdentity& 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("CurrentlyAuthenticated", instance.CurrentlyAuthenticated) == OK) instance.CurrentlyAuthenticated_isNULL = false; _L_; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupIdentity/cmpiOpenDRIM_GroupIdentity.h0000644000175000017500000000452011401066117034370 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_GROUPIDENTITY_H_ #define CMPIOPENDRIM_GROUPIDENTITY_H_ #include "OpenDRIM_GroupIdentity.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_GroupIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_GroupIdentity& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_GroupIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_GroupIdentity& instance); void Simple_Identity_Management_OpenDRIM_GroupIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_GroupIdentity& instance); void Simple_Identity_Management_OpenDRIM_GroupIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_GroupIdentity& instance); #endif /*CMPIOPENDRIM_GROUPIDENTITY_H_*/ ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupIdentity/OpenDRIM_GroupIdentityProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupIdentity/OpenDRIM_GroupIdentityProvide0000644000175000017500000002675511401066117034640 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_GroupIdentity.h" #include "OpenDRIM_GroupIdentityAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_GroupIdentityProviderSetInstance Simple_Identity_Management_OpenDRIM_GroupIdentityProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_GroupIdentity_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_GroupIdentity_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_GroupIdentityProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_GroupIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupIdentityProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupIdentity_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_GroupIdentity_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupIdentityProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_GroupIdentity_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_GroupIdentity_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupIdentityProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_GroupIdentity instance; Simple_Identity_Management_OpenDRIM_GroupIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupIdentity_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_GroupIdentity_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupIdentityProviderSetInstance(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_GroupIdentity newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_GroupIdentity_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_GroupIdentity_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupIdentity_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_GroupIdentity_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupIdentityProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_GroupIdentity instance; Simple_Identity_Management_OpenDRIM_GroupIdentity_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_GroupIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_GroupIdentity_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_GroupIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_GroupIdentity_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupIdentityProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_GroupIdentity instance; Simple_Identity_Management_OpenDRIM_GroupIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_GroupIdentity_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupIdentityProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_GroupIdentity_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupIdentity_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_GroupIdentity_init FAILED: " + (string) OpenDRIM_GroupIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupIdentity_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupIdentity_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_GroupIdentity_unload FAILED: " + (string) OpenDRIM_GroupIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_GroupIdentity_INIT if (Simple_Identity_Management_OpenDRIM_GroupIdentity_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_GroupIdentityProvider, Simple_Identity_Management_OpenDRIM_GroupIdentityProvider, _broker, Simple_Identity_Management_OpenDRIM_GroupIdentity_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupIdentity/OpenDRIM_GroupIdentityAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupIdentity/OpenDRIM_GroupIdentityAccess.0000644000175000017500000001211611401066117034471 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_GroupIdentityAccess.h" int Simple_Identity_Management_OpenDRIM_GroupIdentity_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupIdentity_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; // Read the /etc/group file string etc_group; CF_assert(CF_readTextFile("/etc/group", etc_group, errorMessage)); vector etc_group_lines; CF_splitText(etc_group_lines, etc_group, '\n'); string gi_instance_id; // In gi (getInstance) mode the first instance in the vector contains // the objectpath of the instance we're supposed to get if (discriminant=="gi") result[0].getInstanceID(gi_instance_id); // For each line of /etc/group for (size_t i=0; i current_etc_group_line; CF_splitText(current_etc_group_line, etc_group_lines[i], ':'); if (current_etc_group_line.size()!=4) { errorMessage="Wrong format (at line "+CF_intToStr((unsigned long) i+1)+"): /etc/group"; return FAILED; } // Assign the values of the properties OpenDRIM_GroupIdentity instance; instance.setInstanceID("OpenDRIM:Group:"+current_etc_group_line[0]); instance.setElementName(current_etc_group_line[0]); // If we're in gi mode check if we found the requested instance if (discriminant=="gi" && CF_strCmpNoCase(gi_instance_id, "OpenDRIM:Group:"+current_etc_group_line[0])) { result[0]=instance; // We found the instance so we can exit here return OK; } // Add the instance to the vector if (discriminant=="ei" || discriminant=="ein") result.push_back(instance); } // If we get here it means we didn't find the instance if (discriminant=="gi") { errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_GroupIdentity& instance, const char** properties, string& errorMessage) { _E_; vector instances; instances.push_back(instance); // Get the instance (it also checks if it exists) CF_assert(Simple_Identity_Management_OpenDRIM_GroupIdentity_retrieve(broker, ctx, instances, properties, errorMessage, "gi")); instance=instances[0]; _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupIdentity& newInstance, const OpenDRIM_GroupIdentity& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_GroupIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_GroupIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_GroupIdentity_populate(OpenDRIM_GroupIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupIdentity/OpenDRIM_GroupIdentity.h0000644000175000017500000000740511401066117033524 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_GROUPIDENTITY_H_ #define OPENDRIM_GROUPIDENTITY_H_ #include const static char* OpenDRIM_GroupIdentity_classnames[] = {"OpenDRIM_GroupIdentity"}; static string OpenDRIM_GroupIdentity_NAMESPACE = _NAMESPACE; class OpenDRIM_GroupIdentity { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstanceID; bool InstanceID_isNULL; bool CurrentlyAuthenticated; bool CurrentlyAuthenticated_isNULL; OpenDRIM_GroupIdentity() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstanceID_isNULL = true; CurrentlyAuthenticated_isNULL = true; } ~OpenDRIM_GroupIdentity() {} 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 getCurrentlyAuthenticated(bool& value) const { if (CurrentlyAuthenticated_isNULL==true) return NOT_FOUND; value = CurrentlyAuthenticated; return OK; } int setCurrentlyAuthenticated(const bool& newValue) { CurrentlyAuthenticated = newValue; CurrentlyAuthenticated_isNULL = false; return OK; } }; #endif /*OPENDRIM_GROUPIDENTITY_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/AUTHORS0000644000175000017500000000024311401066117023706 0ustar guillaumeguillaumeFrederic Desmons, ETRI Khahramon NURIDDINOV Guillaume BOTTEX opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/0000755000175000017500000000000011401066117034214 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000023400000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/OpenDRIM_AccountManagementServiceAffectsIdentityAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/Ope0000644000175000017500000003107311401066117034666 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_AccountManagementServiceAffectsIdentityAccess.h" int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(Simple_Identity_Management_CIM_Service_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_ManagedElement_unload(errorMessage)); CF_assert(Simple_Identity_Management_CIM_Service_unload(errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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; Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_referenceAffectedElementToAffectingElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountManagementServiceAffectsIdentity& 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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_getAffectedElement(broker, ctx, AffectedElement_objectpath, AffectedElement_instance, NULL, errorMessage)); Objectpath AffectingElement_objectpath; instance.getAffectingElement(AffectingElement_objectpath); Instance AffectingElement_instance; CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_getAffectingElement(broker, ctx, AffectingElement_objectpath, AffectingElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_isAssociated(AffectedElement_instance, AffectingElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_populate(instance, errorMessage)); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceAffectsIdentity& newInstance, const OpenDRIM_AccountManagementServiceAffectsIdentity& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceAffectsIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceAffectsIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_enumerateAffectingElements(broker, ctx, AffectingElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_enumerateAffectedElements(broker, ctx, AffectedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_enumerateAffectedElements(broker, ctx, AffectedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& AffectingElement_instances, vector& OpenDRIM_AccountManagementServiceAffectsIdentity_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_AccountManagementServiceAffectsIdentity instance; instance.setAffectedElement(((Instance) AffectedElement_instance).getObjectpath()); instance.setAffectingElement(((Instance) AffectingElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_populate(instance, errorMessage)); } OpenDRIM_AccountManagementServiceAffectsIdentity_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_referenceAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const vector& AffectedElement_instances, vector& OpenDRIM_AccountManagementServiceAffectsIdentity_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_AccountManagementServiceAffectsIdentity instance; instance.setAffectedElement(((Instance) AffectedElement_instances[i]).getObjectpath()); instance.setAffectingElement(((Instance) AffectingElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_populate(instance, errorMessage)); } OpenDRIM_AccountManagementServiceAffectsIdentity_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_populate(OpenDRIM_AccountManagementServiceAffectsIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/Makefile.amopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/Mak0000644000175000017500000000566511401066117034663 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProvider_la_SOURCES = OpenDRIM_AccountManagementServiceAffectsIdentityAccess.cpp OpenDRIM_AccountManagementServiceAffectsIdentityProvider.cpp cmpiOpenDRIM_AccountManagementServiceAffectsIdentity.cpp assocOpenDRIM_AccountManagementServiceAffectsIdentity.cpp # May have to be adjusted for direct invocation libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_Service # Uncomment the end for direct invocation, may have to be adjusted libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la #../CIM_ManagedElement/libcmpiSimple_Identity_Management_CIM_ManagedElementProvider.la ../CIM_Service/libcmpiSimple_Identity_Management_CIM_ServiceProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_AccountManagementServiceAffectsIdentity.h OpenDRIM_AccountManagementServiceAffectsIdentity.h OpenDRIM_AccountManagementServiceAffectsIdentityAccess.h ././@LongLink0000000000000000000000000000023200000000000011562 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/OpenDRIM_AccountManagementServiceAffectsIdentityAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/Ope0000644000175000017500000001241511401066117034665 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTMANAGEMENTSERVICEAFFECTSIDENTITYACCESS_H_ #define OPENDRIM_ACCOUNTMANAGEMENTSERVICEAFFECTSIDENTITYACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_AccountManagementServiceAffectsIdentity.h" #include "assocOpenDRIM_AccountManagementServiceAffectsIdentity.h" int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountManagementServiceAffectsIdentity& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceAffectsIdentity& newInstance, const OpenDRIM_AccountManagementServiceAffectsIdentity& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceAffectsIdentity& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceAffectsIdentity& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_associatorAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const char** properties, vector& AffectingElement_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_associatorAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const char** properties, vector& AffectedElement_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_referenceAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const vector& AffectingElement_instances, vector& OpenDRIM_AccountManagementServiceAffectsIdentity_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_referenceAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const vector& AffectedElement_instances, vector& OpenDRIM_AccountManagementServiceAffectsIdentity_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_populate(OpenDRIM_AccountManagementServiceAffectsIdentity& instance, string& errorMessage); #endif /*OPENDRIM_ACCOUNTMANAGEMENTSERVICEAFFECTSIDENTITYACCESS_H_*/ ././@LongLink0000000000000000000000000000023200000000000011562 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/cmpiOpenDRIM_AccountManagementServiceAffectsIdentity.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/cmp0000644000175000017500000001104711401066117034721 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementServiceAffectsIdentity.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountManagementServiceAffectsIdentity& instance) { _E_; Objectpath op(broker, OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0], OpenDRIM_AccountManagementServiceAffectsIdentity_NAMESPACE); if (!instance.AffectedElement_isNULL) op.addKey("AffectedElement", instance.AffectedElement); if (!instance.AffectingElement_isNULL) op.addKey("AffectingElement", instance.AffectingElement); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountManagementServiceAffectsIdentity& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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); if (!instance.AssignedSequence_isNULL) ci.setProperty("AssignedSequence", instance.AssignedSequence); if (!instance.ElementAffects_isNULL) ci.setProperty("ElementAffects", instance.ElementAffects); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountManagementServiceAffectsIdentity& 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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountManagementServiceAffectsIdentity& 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; if (inst.getProperty("AssignedSequence", instance.AssignedSequence) == OK) instance.AssignedSequence_isNULL = false; if (inst.getProperty("ElementAffects", instance.ElementAffects) == OK) instance.ElementAffects_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000022400000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/OpenDRIM_AccountManagementServiceAffectsIdentity.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/Ope0000644000175000017500000001312711401066117034666 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTMANAGEMENTSERVICEAFFECTSIDENTITY_H_ #define OPENDRIM_ACCOUNTMANAGEMENTSERVICEAFFECTSIDENTITY_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_AccountManagementServiceAffectsIdentity_classnames[] = {"OpenDRIM_AccountManagementServiceAffectsIdentity"}; static string OpenDRIM_AccountManagementServiceAffectsIdentity_NAMESPACE = _NAMESPACE; const static string AffectedElement_role = "AffectedElement"; const static char* AffectedElement_classnames[] = {"OpenDRIM_Identity"}; const static string AffectedElement_NAMESPACE = _NAMESPACE; const static string AffectingElement_role = "AffectingElement"; const static char* AffectingElement_classnames[] = {"OpenDRIM_AccountManagementService"}; const static string AffectingElement_NAMESPACE = _NAMESPACE; class OpenDRIM_AccountManagementServiceAffectsIdentity { public: Objectpath AffectedElement; bool AffectedElement_isNULL; Objectpath AffectingElement; bool AffectingElement_isNULL; vector ElementEffects; bool ElementEffects_isNULL; vector OtherElementEffectsDescriptions; bool OtherElementEffectsDescriptions_isNULL; unsigned short AssignedSequence; bool AssignedSequence_isNULL; vector ElementAffects; bool ElementAffects_isNULL; OpenDRIM_AccountManagementServiceAffectsIdentity() { AffectedElement_isNULL = true; AffectingElement_isNULL = true; ElementEffects_isNULL = true; OtherElementEffectsDescriptions_isNULL = true; AssignedSequence_isNULL = true; ElementAffects_isNULL = true; } ~OpenDRIM_AccountManagementServiceAffectsIdentity() {} 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; } int getAssignedSequence(unsigned short& value) const { if (AssignedSequence_isNULL==true) return NOT_FOUND; value = AssignedSequence; return OK; } int setAssignedSequence(const unsigned short& newValue) { AssignedSequence = newValue; AssignedSequence_isNULL = false; return OK; } int getElementAffects(vector& value) const { if (ElementAffects_isNULL==true) return NOT_FOUND; value = ElementAffects; return OK; } int setElementAffects(const vector& newValue) { ElementAffects = newValue; ElementAffects_isNULL = false; return OK; } }; #endif /*OPENDRIM_ACCOUNTMANAGEMENTSERVICEAFFECTSIDENTITY_H_*/ ././@LongLink0000000000000000000000000000023000000000000011560 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/cmpiOpenDRIM_AccountManagementServiceAffectsIdentity.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/cmp0000644000175000017500000000521011401066117034714 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_ACCOUNTMANAGEMENTSERVICEAFFECTSIDENTITY_H_ #define CMPIOPENDRIM_ACCOUNTMANAGEMENTSERVICEAFFECTSIDENTITY_H_ #include "OpenDRIM_AccountManagementServiceAffectsIdentity.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountManagementServiceAffectsIdentity& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountManagementServiceAffectsIdentity& instance); void Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountManagementServiceAffectsIdentity& instance); void Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountManagementServiceAffectsIdentity& instance); #endif /*CMPIOPENDRIM_ACCOUNTMANAGEMENTSERVICEAFFECTSIDENTITY_H_*/ ././@LongLink0000000000000000000000000000023600000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/OpenDRIM_AccountManagementServiceAffectsIdentityProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/Ope0000644000175000017500000005007711401066117034673 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementServiceAffectsIdentity.h" #include "OpenDRIM_AccountManagementServiceAffectsIdentityAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderSetInstance Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementServiceAffectsIdentity instance; Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderSetInstance(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_AccountManagementServiceAffectsIdentity newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementServiceAffectsIdentity instance; Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementServiceAffectsIdentity instance; Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderAssociatorNames(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderAssociators(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderReferenceNames(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_referenceAffectedElementToAffectingElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_referenceAffectingElementToAffectedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProviderReferences(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_referenceAffectedElementToAffectingElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_referenceAffectingElementToAffectedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_init FAILED: " + (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_unload FAILED: " + (string) OpenDRIM_AccountManagementServiceAffectsIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_INIT if (Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProvider, Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_INIT); CMAssociationMIStub(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProvider, Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000023100000000000011561 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/assocOpenDRIM_AccountManagementServiceAffectsIdentity.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/ass0000644000175000017500000000710211401066117034725 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef ASSOCOPENDRIM_ACCOUNTMANAGEMENTSERVICEAFFECTSIDENTITY_H_ #define ASSOCOPENDRIM_ACCOUNTMANAGEMENTSERVICEAFFECTSIDENTITY_H_ #include "OpenDRIM_AccountManagementServiceAffectsIdentityAccess.h" int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_enumerateAffectedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_getAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_enumerateAffectingElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_getAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_ACCOUNTMANAGEMENTSERVICEAFFECTSIDENTITY_H_*/ ././@LongLink0000000000000000000000000000023300000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/assocOpenDRIM_AccountManagementServiceAffectsIdentity.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceAffectsIdentity/ass0000644000175000017500000002274511401066117034737 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "assocOpenDRIM_AccountManagementServiceAffectsIdentity.h" int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_associatorAffectingElementToAffectedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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; Simple_Identity_Management_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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(Simple_Identity_Management_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_Service_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentity_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; Simple_Identity_Management_CIM_Service_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_Service_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_Service_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/packaging/0000755000175000017500000000000011401066117024563 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/packaging/debian/0000755000175000017500000000000011404351776026020 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/packaging/debian/postrm0000644000175000017500000000434511404351776027275 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_AccountOnSystem rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_AccountCapabilities rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_AccountIdentity rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_AccountAssignedIdentity rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_GroupAssignedIdentity rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_AccountManagementServiceAffectsIdentity rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_AccountManagementService rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_HostedAccountManagementService rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_RegisteredSimpleIdentityManagementProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_AccountManagementServiceConformsToProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_Group rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_AccountManagementServiceCapabilities rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_AccountAssociatedCapabilities rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_GroupIdentity rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_IdentityInGroup rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_AccountManagementCapabilities rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_Account rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_GroupOnSystem ;; 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-simpleidentitymanagement-1.0.0~ppa/packaging/debian/source/0000755000175000017500000000000011401066117027305 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/packaging/debian/source/format0000644000175000017500000000001411401066117030513 0ustar guillaumeguillaume3.0 (quilt) opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/packaging/debian/copyright0000644000175000017500000000314311401066117027741 0ustar guillaumeguillaumeThis package was debianized by Guillaume BOTTEX on Tue, 1 Sep 2009 17:58:26 +0900. It was downloaded from http://opendrim.sourceforge.net/ Upstream Authors: Frederic Desmons Khahramon NURIDDINOV Guillaume BOTTEX Copyright: Copyright (C) 2007 ETRI Frederic Desmons Copyright (C) 2009 ETRI Khahramon NURIDDINOV Copyright (C) 2009 ETRI Guillaume BOTTEX License: Linux Management Providers (LMP), Simple Identity Management provider package This program is being developed under the "OpenDRIM" project. The "OpenDRIM" project web page: http://opendrim.sourceforge.net The "OpenDRIM" project mailing list: opendrim@googlegroups.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. The Debian packaging is copyright 2009, Guillaume BOTTEX and is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'. opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/packaging/debian/control0000644000175000017500000000137011404351771027417 0ustar guillaumeguillaumeSource: opendrim-lmp-simpleidentitymanagement 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-simpleidentitymanagement Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, sfcb, libopendrim0 (>= 1.1.3) Description: OpenDRIM Simple Identity Management provider Provides information about the computer system identity managementcapabilities. . Compliant with the DMTF Simple Identity Management Profile v1.0.1 (DSP1034). opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/packaging/debian/prerm0000644000175000017500000000250611401066117027060 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-simpleidentitymanagement VERSION=`cat /usr/share/doc/opendrim-lmp-simpleidentitymanagement/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=Simple_Identity_Management $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-simpleidentitymanagement-1.0.0~ppa/packaging/debian/changelog0000644000175000017500000000026611404351757027675 0ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement (1.0.0-0ubuntu1) lucid; urgency=low * Initial release -- Guillaume BOTTEX Fri, 11 Jun 2010 15:12:00 +0900 opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/packaging/debian/postinst0000644000175000017500000000266311401066117027622 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-simpleidentitymanagement VERSION=`cat /usr/share/doc/opendrim-lmp-simpleidentitymanagement/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=Simple_Identity_Management $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-simpleidentitymanagement-1.0.0~ppa/packaging/debian/install0000644000175000017500000000004711401066117027377 0ustar guillaumeguillaumeusr/lib/cmpi/*.so usr/share/OpenDRIM/* opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/packaging/debian/rules0000755000175000017500000000363211401066117027071 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-simpleidentitymanagement 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-simpleidentitymanagement.sgml > opendrim-lmp-simpleidentitymanagement.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-simpleidentitymanagement-1.0.0~ppa/packaging/debian/docs0000644000175000017500000000003111401066117026652 0ustar guillaumeguillaumeNEWS README TODO VERSION opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/packaging/debian/compat0000644000175000017500000000000211401066117027203 0ustar guillaumeguillaume5 ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/packaging/opendrim-lmp-simpleidentitymanagement.specopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/packaging/opendrim-lmp-simpleidentitymanagement.spec0000644000175000017500000000530611401066117035144 0ustar guillaumeguillaume#%///////////////////////////////////////////////////////////////////////////// # # Simple_Identity_Management RPM spec file # #%///////////////////////////////////////////////////////////////////////////// %define packageVersion 1 Version: %{version} Release: %{packageVersion}%{?dist} Vendor: OpenDRIM Summary: OpenDRIM Simple_Identity_Management Provider Name: opendrim-lmp-simpleidentitymanagement Group: Systems Management/Base License: GPL BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://opendrim.sourceforge.net Source: %{name}-%{version}.tar.gz BuildRequires: autoconf, tog-pegasus-devel, libopendrim >= 1.1.1 Requires: tog-pegasus, libopendrim >= 1.1.1 %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 Simple_Identity_Management %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-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/0000755000175000017500000000000011401066117033520 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000021600000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/OpenDRIM_AccountManagementServiceCapabilities.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/OpenDR0000644000175000017500000001031111401066117034566 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTMANAGEMENTSERVICECAPABILITIES_H_ #define OPENDRIM_ACCOUNTMANAGEMENTSERVICECAPABILITIES_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_AccountManagementServiceCapabilities_classnames[] = {"OpenDRIM_AccountManagementServiceCapabilities"}; static string OpenDRIM_AccountManagementServiceCapabilities_NAMESPACE = _NAMESPACE; const static string Capabilities_role = "Capabilities"; const static char* Capabilities_classnames[] = {"OpenDRIM_AccountManagementCapabilities"}; const static string Capabilities_NAMESPACE = _NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_AccountManagementService"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_AccountManagementServiceCapabilities { public: Objectpath ManagedElement; bool ManagedElement_isNULL; Objectpath Capabilities; bool Capabilities_isNULL; vector Characteristics; bool Characteristics_isNULL; OpenDRIM_AccountManagementServiceCapabilities() { ManagedElement_isNULL = true; Capabilities_isNULL = true; Characteristics_isNULL = true; } ~OpenDRIM_AccountManagementServiceCapabilities() {} 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_ACCOUNTMANAGEMENTSERVICECAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/Makefile.amopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/Makefi0000644000175000017500000000564011401066117034644 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProvider_la_SOURCES = OpenDRIM_AccountManagementServiceCapabilitiesAccess.cpp OpenDRIM_AccountManagementServiceCapabilitiesProvider.cpp cmpiOpenDRIM_AccountManagementServiceCapabilities.cpp assocOpenDRIM_AccountManagementServiceCapabilities.cpp # May have to be adjusted for direct invocation libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProvider_la_CPPFLAGS = -I../CIM_Capabilities -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la #../CIM_Capabilities/libcmpiSimple_Identity_Management_CIM_CapabilitiesProvider.la ../CIM_ManagedElement/libcmpiSimple_Identity_Management_CIM_ManagedElementProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_AccountManagementServiceCapabilities.h OpenDRIM_AccountManagementServiceCapabilities.h OpenDRIM_AccountManagementServiceCapabilitiesAccess.h ././@LongLink0000000000000000000000000000022200000000000011561 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/cmpiOpenDRIM_AccountManagementServiceCapabilities.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/cmpiOp0000644000175000017500000000514411401066117034676 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_ACCOUNTMANAGEMENTSERVICECAPABILITIES_H_ #define CMPIOPENDRIM_ACCOUNTMANAGEMENTSERVICECAPABILITIES_H_ #include "OpenDRIM_AccountManagementServiceCapabilities.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountManagementServiceCapabilities& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountManagementServiceCapabilities& instance); void Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountManagementServiceCapabilities& instance); void Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountManagementServiceCapabilities& instance); #endif /*CMPIOPENDRIM_ACCOUNTMANAGEMENTSERVICECAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000022400000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/OpenDRIM_AccountManagementServiceCapabilitiesAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/OpenDR0000644000175000017500000001222111401066117034570 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTMANAGEMENTSERVICECAPABILITIESACCESS_H_ #define OPENDRIM_ACCOUNTMANAGEMENTSERVICECAPABILITIESACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_AccountManagementServiceCapabilities.h" #include "assocOpenDRIM_AccountManagementServiceCapabilities.h" int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountManagementServiceCapabilities& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceCapabilities& newInstance, const OpenDRIM_AccountManagementServiceCapabilities& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceCapabilities& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceCapabilities& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_associatorCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_associatorManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& Capabilities_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_referenceCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const vector& ManagedElement_instances, vector& OpenDRIM_AccountManagementServiceCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_AccountManagementServiceCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_populate(OpenDRIM_AccountManagementServiceCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_ACCOUNTMANAGEMENTSERVICECAPABILITIESACCESS_H_*/ ././@LongLink0000000000000000000000000000022500000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/assocOpenDRIM_AccountManagementServiceCapabilities.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/assocO0000644000175000017500000002261511401066117034700 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "assocOpenDRIM_AccountManagementServiceCapabilities.h" int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_associatorManagedElementToCapabilities(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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(Simple_Identity_Management_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_Capabilities_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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; Simple_Identity_Management_CIM_Capabilities_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_Capabilities_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_Capabilities_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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; Simple_Identity_Management_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000022600000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/OpenDRIM_AccountManagementServiceCapabilitiesAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/OpenDR0000644000175000017500000003037111401066117034576 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_AccountManagementServiceCapabilitiesAccess.h" int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_Capabilities_load(broker, errorMessage)); CF_assert(Simple_Identity_Management_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_Capabilities_unload(errorMessage)); CF_assert(Simple_Identity_Management_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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; Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_referenceCapabilitiesToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountManagementServiceCapabilities& 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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_getCapabilities(broker, ctx, Capabilities_objectpath, Capabilities_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_isAssociated(Capabilities_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_populate(instance, errorMessage)); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceCapabilities& newInstance, const OpenDRIM_AccountManagementServiceCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementServiceCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_AccountManagementServiceCapabilities_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_AccountManagementServiceCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_populate(instance, errorMessage)); } OpenDRIM_AccountManagementServiceCapabilities_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_AccountManagementServiceCapabilities_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_AccountManagementServiceCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_populate(instance, errorMessage)); } OpenDRIM_AccountManagementServiceCapabilities_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_populate(OpenDRIM_AccountManagementServiceCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000022300000000000011562 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/assocOpenDRIM_AccountManagementServiceCapabilities.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/assocO0000644000175000017500000000703211401066117034674 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef ASSOCOPENDRIM_ACCOUNTMANAGEMENTSERVICECAPABILITIES_H_ #define ASSOCOPENDRIM_ACCOUNTMANAGEMENTSERVICECAPABILITIES_H_ #include "OpenDRIM_AccountManagementServiceCapabilitiesAccess.h" int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_enumerateCapabilitiess(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_getCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_ACCOUNTMANAGEMENTSERVICECAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000022400000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/cmpiOpenDRIM_AccountManagementServiceCapabilities.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/cmpiOp0000644000175000017500000000734511401066117034703 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementServiceCapabilities.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountManagementServiceCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_AccountManagementServiceCapabilities_classnames[0], OpenDRIM_AccountManagementServiceCapabilities_NAMESPACE); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); if (!instance.Capabilities_isNULL) op.addKey("Capabilities", instance.Capabilities); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountManagementServiceCapabilities& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Characteristics_isNULL) ci.setProperty("Characteristics", instance.Characteristics); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountManagementServiceCapabilities& 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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountManagementServiceCapabilities& 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_; } ././@LongLink0000000000000000000000000000023000000000000011560 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/OpenDRIM_AccountManagementServiceCapabilitiesProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementServiceCapabilities/OpenDR0000644000175000017500000004743511401066117034607 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementServiceCapabilities.h" #include "OpenDRIM_AccountManagementServiceCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderSetInstance Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementServiceCapabilities instance; Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderSetInstance(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_AccountManagementServiceCapabilities newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementServiceCapabilities instance; Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementServiceCapabilities instance; Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderAssociatorNames(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderAssociators(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderReferenceNames(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProviderReferences(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 = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_init FAILED: " + (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_unload FAILED: " + (string) OpenDRIM_AccountManagementServiceCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_INIT if (Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProvider, Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_INIT); CMAssociationMIStub(Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProvider, Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/0000755000175000017500000000000011401066117027072 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/OpenDRIM_GroupOnSystem.h0000644000175000017500000000704111401066117033500 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_GROUPONSYSTEM_H_ #define OPENDRIM_GROUPONSYSTEM_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_Collection.h" #include "CIM_CollectionAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_GroupOnSystem_classnames[] = {"OpenDRIM_GroupOnSystem"}; static string OpenDRIM_GroupOnSystem_NAMESPACE = _NAMESPACE; const static string OwnedElement_role = "OwnedElement"; const static char* OwnedElement_classnames[] = {"OpenDRIM_Group"}; const static string OwnedElement_NAMESPACE = _NAMESPACE; const static string OwningElement_role = "OwningElement"; const static char* OwningElement_classnames[] = {"OpenDRIM_ComputerSystem"}; const static string OwningElement_NAMESPACE = _NAMESPACE; class OpenDRIM_GroupOnSystem { public: Objectpath OwningElement; bool OwningElement_isNULL; Objectpath OwnedElement; bool OwnedElement_isNULL; OpenDRIM_GroupOnSystem() { OwningElement_isNULL = true; OwnedElement_isNULL = true; } ~OpenDRIM_GroupOnSystem() {} string getKeys() const { return CF_toLowCase(".OwningElement=\"" + CF_quoteString(OwningElement.toString()) + "\""".OwnedElement=\"" + CF_quoteString(OwnedElement.toString()) + "\""); } int getOwningElement(Objectpath& value) const { if (OwningElement_isNULL==true) return NOT_FOUND; value = OwningElement; return OK; } int setOwningElement(const Objectpath& newValue) { OwningElement = newValue; OwningElement.setNamespace(OwningElement_NAMESPACE); OwningElement_isNULL = false; return OK; } int getOwnedElement(Objectpath& value) const { if (OwnedElement_isNULL==true) return NOT_FOUND; value = OwnedElement; return OK; } int setOwnedElement(const Objectpath& newValue) { OwnedElement = newValue; OwnedElement.setNamespace(OwnedElement_NAMESPACE); OwnedElement_isNULL = false; return OK; } }; #endif /*OPENDRIM_GROUPONSYSTEM_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/Makefile.am0000644000175000017500000000520611401066117031131 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_GroupOnSystemProvider.la libcmpiSimple_Identity_Management_OpenDRIM_GroupOnSystemProvider_la_SOURCES = OpenDRIM_GroupOnSystemAccess.cpp OpenDRIM_GroupOnSystemProvider.cpp cmpiOpenDRIM_GroupOnSystem.cpp assocOpenDRIM_GroupOnSystem.cpp # May have to be adjusted for direct invocation libcmpiSimple_Identity_Management_OpenDRIM_GroupOnSystemProvider_la_CPPFLAGS = -I../CIM_Collection -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiSimple_Identity_Management_OpenDRIM_GroupOnSystemProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la #../CIM_Collection/libcmpiSimple_Identity_Management_CIM_CollectionProvider.la ../CIM_ManagedElement/libcmpiSimple_Identity_Management_CIM_ManagedElementProvider.la libcmpiSimple_Identity_Management_OpenDRIM_GroupOnSystemProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_GroupOnSystem.h OpenDRIM_GroupOnSystem.h OpenDRIM_GroupOnSystemAccess.h ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/cmpiOpenDRIM_GroupOnSystem.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/cmpiOpenDRIM_GroupOnSystem.cp0000644000175000017500000000635311401066117034531 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_GroupOnSystem.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_GroupOnSystem& instance) { _E_; Objectpath op(broker, OpenDRIM_GroupOnSystem_classnames[0], OpenDRIM_GroupOnSystem_NAMESPACE); if (!instance.OwningElement_isNULL) op.addKey("OwningElement", instance.OwningElement); if (!instance.OwnedElement_isNULL) op.addKey("OwnedElement", instance.OwnedElement); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_GroupOnSystem& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_GroupOnSystem& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("OwnedElement", instance.OwnedElement) == OK) instance.OwnedElement_isNULL = false; if (op.getKey("OwningElement", instance.OwningElement) == OK) instance.OwningElement_isNULL = false; _L_; } void Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_GroupOnSystem& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("OwningElement", instance.OwningElement) == OK) instance.OwningElement_isNULL = false; if (inst.getProperty("OwnedElement", instance.OwnedElement) == OK) instance.OwnedElement_isNULL = false; _L_; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/cmpiOpenDRIM_GroupOnSystem.h0000644000175000017500000000452011401066117034350 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_GROUPONSYSTEM_H_ #define CMPIOPENDRIM_GROUPONSYSTEM_H_ #include "OpenDRIM_GroupOnSystem.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_GroupOnSystem& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_GroupOnSystem& instance); void Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_GroupOnSystem& instance); void Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_GroupOnSystem& instance); #endif /*CMPIOPENDRIM_GROUPONSYSTEM_H_*/ ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/OpenDRIM_GroupOnSystemProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/OpenDRIM_GroupOnSystemProvide0000644000175000017500000004340311401066117034605 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_GroupOnSystem.h" #include "OpenDRIM_GroupOnSystemAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderSetInstance Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_GroupOnSystem_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_GroupOnSystem_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_GroupOnSystem instance; Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderSetInstance(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_GroupOnSystem newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_GroupOnSystem instance; Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_GroupOnSystem instance; Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderAssociatorNames(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 = Simple_Identity_Management_OpenDRIM_GroupOnSystem_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_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 Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderAssociators(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 = Simple_Identity_Management_OpenDRIM_GroupOnSystem_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_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 Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderReferenceNames(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 = Simple_Identity_Management_OpenDRIM_GroupOnSystem_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_referenceOwnedElementToOwningElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_referenceOwningElementToOwnedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_GroupOnSystemProviderReferences(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 = Simple_Identity_Management_OpenDRIM_GroupOnSystem_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_referenceOwnedElementToOwningElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_referenceOwningElementToOwnedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Simple_Identity_Management_OpenDRIM_GroupOnSystem_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Simple_Identity_Management_OpenDRIM_GroupOnSystem_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_GroupOnSystem_init FAILED: " + (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_GroupOnSystem_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_GroupOnSystem_unload FAILED: " + (string) OpenDRIM_GroupOnSystem_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_GroupOnSystem_INIT if (Simple_Identity_Management_OpenDRIM_GroupOnSystem_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_GroupOnSystemProvider, Simple_Identity_Management_OpenDRIM_GroupOnSystemProvider, _broker, Simple_Identity_Management_OpenDRIM_GroupOnSystem_INIT); CMAssociationMIStub(Simple_Identity_Management_OpenDRIM_GroupOnSystemProvider, Simple_Identity_Management_OpenDRIM_GroupOnSystemProvider, _broker, Simple_Identity_Management_OpenDRIM_GroupOnSystem_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/assocOpenDRIM_GroupOnSystem.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/assocOpenDRIM_GroupOnSystem.h0000644000175000017500000000646211401066117034537 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef ASSOCOPENDRIM_GROUPONSYSTEM_H_ #define ASSOCOPENDRIM_GROUPONSYSTEM_H_ #include "OpenDRIM_GroupOnSystemAccess.h" int Simple_Identity_Management_OpenDRIM_GroupOnSystem_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 Simple_Identity_Management_OpenDRIM_GroupOnSystem_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 Simple_Identity_Management_OpenDRIM_GroupOnSystem_enumerateOwnedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_getOwnedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_enumerateOwningElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_getOwningElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_GROUPONSYSTEM_H_*/ ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/assocOpenDRIM_GroupOnSystem.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/assocOpenDRIM_GroupOnSystem.c0000644000175000017500000002177511401066117034536 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "assocOpenDRIM_GroupOnSystem.h" int Simple_Identity_Management_OpenDRIM_GroupOnSystem_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 = Simple_Identity_Management_OpenDRIM_GroupOnSystem_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, "OwnedElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "OwningElement") != 0) return OK; CF_assert(Simple_Identity_Management_OpenDRIM_GroupOnSystem_associatorOwnedElementToOwningElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "OwningElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "OwnedElement") != 0) return OK; CF_assert(Simple_Identity_Management_OpenDRIM_GroupOnSystem_associatorOwningElementToOwnedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_enumerateOwnedElements(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, OwnedElement_NAMESPACE, OwnedElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(Simple_Identity_Management_CIM_Collection_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_Collection_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_Collection_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_getOwnedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), OwnedElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), OwnedElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_Collection _instance; Simple_Identity_Management_CIM_Collection_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_Collection_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_Collection_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_enumerateOwningElements(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, OwningElement_NAMESPACE, OwningElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_getOwningElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), OwningElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), OwningElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; Simple_Identity_Management_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/OpenDRIM_GroupOnSystemAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/OpenDRIM_GroupOnSystemAccess.0000644000175000017500000001100511401066117034445 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_GROUPONSYSTEMACCESS_H_ #define OPENDRIM_GROUPONSYSTEMACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_GroupOnSystem.h" #include "assocOpenDRIM_GroupOnSystem.h" int Simple_Identity_Management_OpenDRIM_GroupOnSystem_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_GroupOnSystem& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupOnSystem& newInstance, const OpenDRIM_GroupOnSystem& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupOnSystem& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupOnSystem& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_associatorOwnedElementToOwningElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& OwnedElement_instance, const char** properties, vector& OwningElement_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_associatorOwningElementToOwnedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& OwningElement_instance, const char** properties, vector& OwnedElement_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_referenceOwnedElementToOwningElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& OwnedElement_instance, const vector& OwningElement_instances, vector& OpenDRIM_GroupOnSystem_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_referenceOwningElementToOwnedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& OwningElement_instance, const vector& OwnedElement_instances, vector& OpenDRIM_GroupOnSystem_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_GroupOnSystem_populate(OpenDRIM_GroupOnSystem& instance, string& errorMessage); #endif /*OPENDRIM_GROUPONSYSTEMACCESS_H_*/ ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/OpenDRIM_GroupOnSystemAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_GroupOnSystem/OpenDRIM_GroupOnSystemAccess.0000644000175000017500000002545111401066117034457 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_GroupOnSystemAccess.h" int Simple_Identity_Management_OpenDRIM_GroupOnSystem_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_Collection_load(broker, errorMessage)); CF_assert(Simple_Identity_Management_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_Collection_unload(errorMessage)); CF_assert(Simple_Identity_Management_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_isAssociated(const Instance& OwnedElement, const Instance& OwningElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_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(Simple_Identity_Management_OpenDRIM_GroupOnSystem_enumerateOwnedElements(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(Simple_Identity_Management_OpenDRIM_GroupOnSystem_enumerateOwnedElements(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; Simple_Identity_Management_OpenDRIM_GroupOnSystem_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), OwnedElement_classnames[0], OwningElement_classnames[0], OwnedElement_role.c_str(), OwningElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(Simple_Identity_Management_OpenDRIM_GroupOnSystem_referenceOwnedElementToOwningElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_GroupOnSystem& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath OwnedElement_objectpath; instance.getOwnedElement(OwnedElement_objectpath); Instance OwnedElement_instance; CF_assert(Simple_Identity_Management_OpenDRIM_GroupOnSystem_getOwnedElement(broker, ctx, OwnedElement_objectpath, OwnedElement_instance, NULL, errorMessage)); Objectpath OwningElement_objectpath; instance.getOwningElement(OwningElement_objectpath); Instance OwningElement_instance; CF_assert(Simple_Identity_Management_OpenDRIM_GroupOnSystem_getOwningElement(broker, ctx, OwningElement_objectpath, OwningElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Simple_Identity_Management_OpenDRIM_GroupOnSystem_isAssociated(OwnedElement_instance, OwningElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupOnSystem& newInstance, const OpenDRIM_GroupOnSystem& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupOnSystem& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_GroupOnSystem& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_associatorOwnedElementToOwningElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& OwnedElement_instance, const char** properties, vector& OwningElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector OwningElement_instances; if (discriminant=="a") CF_assert(Simple_Identity_Management_OpenDRIM_GroupOnSystem_enumerateOwningElements(broker, ctx, OwningElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_GroupOnSystem_enumerateOwningElements(broker, ctx, OwningElement_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(Simple_Identity_Management_OpenDRIM_GroupOnSystem_enumerateOwningElements(broker, ctx, OwningElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& OwnedElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector OwnedElement_instances; if (discriminant=="a") CF_assert(Simple_Identity_Management_OpenDRIM_GroupOnSystem_enumerateOwnedElements(broker, ctx, OwnedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_GroupOnSystem_enumerateOwnedElements(broker, ctx, OwnedElement_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(Simple_Identity_Management_OpenDRIM_GroupOnSystem_enumerateOwnedElements(broker, ctx, OwnedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& OwningElement_instances, vector& OpenDRIM_GroupOnSystem_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 < OwningElement_instances.size(); i++) { OpenDRIM_GroupOnSystem instance; instance.setOwnedElement(((Instance) OwnedElement_instance).getObjectpath()); instance.setOwningElement(((Instance) OwningElement_instances[i]).getObjectpath()); OpenDRIM_GroupOnSystem_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_referenceOwningElementToOwnedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& OwningElement_instance, const vector& OwnedElement_instances, vector& OpenDRIM_GroupOnSystem_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 < OwnedElement_instances.size(); i++) { OpenDRIM_GroupOnSystem instance; instance.setOwnedElement(((Instance) OwnedElement_instances[i]).getObjectpath()); instance.setOwningElement(((Instance) OwningElement_instance).getObjectpath()); OpenDRIM_GroupOnSystem_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_GroupOnSystem_populate(OpenDRIM_GroupOnSystem& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Account/0000755000175000017500000000000011401066117025670 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Account/OpenDRIM_AccountAccess.cpp0000644000175000017500000004540511401066117032557 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_AccountAccess.h" #include string SystemName; vector GID; vector GNames; int Simple_Identity_Management_OpenDRIM_Account_load(const CMPIBroker* broker, string& errorMessage) { _E_; CF_assert(CF_getSystemName(SystemName, errorMessage)); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_Account_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_Account_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; // Read the /etc/passwd file string etc_passwd; CF_assert(CF_readTextFile("/etc/passwd", etc_passwd, errorMessage)); vector etc_passwd_lines; CF_splitText(etc_passwd_lines, etc_passwd, '\n'); // Read the /etc/shadow file string etc_shadow; vector etc_shadow_lines; if (discriminant=="ei" || discriminant=="gi") { CF_assert(CF_readTextFile("/etc/shadow", etc_shadow, errorMessage)); CF_splitText(etc_shadow_lines, etc_shadow, '\n'); if (etc_shadow_lines.size()!=etc_passwd_lines.size()) { errorMessage="Wrong format (missmatch with /etc/passwd): /etc/shadow"; return FAILED; } } // Get the lists of the groups vector groups; CF_assert(Simple_Identity_Management_OpenDRIM_Group_retrieve(broker, ctx, groups, NULL, errorMessage, "ei")); // In gi (getInstance) mode the first instance in the vector contains // the objectpath of the instance we're supposed to get string gi_name; if (discriminant=="gi") result[0].getName(gi_name); // For each line of /etc/passwd and /etc/shadow for (size_t i=0; i current_etc_passwd_line; CF_splitText(current_etc_passwd_line, etc_passwd_lines[i], ':'); if (current_etc_passwd_line.size()!=7) { errorMessage="Wrong format (at line "+CF_intToStr((unsigned long) i+1)+"): /etc/passwd"; return FAILED; } // Assign the key values OpenDRIM_Account instance; instance.setSystemName(SystemName); instance.setName(current_etc_passwd_line[0]); instance.setCreationClassName("OpenDRIM_Account"); instance.setSystemCreationClassName("OpenDRIM_ComputerSystem"); // Set OrganizationName vector organizationNames; organizationNames.push_back("unknown"); if(discriminant=="ei") instance.setOrganizationName(organizationNames); else if(discriminant=="gi") result[0].setOrganizationName(organizationNames); // If we need the content of the instance(s) // We check if the current line matches with the requested instance (gi mode) if (discriminant=="ei" || (discriminant=="gi" && CF_strCmpNoCase(gi_name, current_etc_passwd_line[0]))) { // Check the format of the line of /etc/shadow vector current_etc_shadow_line; CF_splitText(current_etc_shadow_line, etc_shadow_lines[i], ':'); if (current_etc_shadow_line.size()!=9) { errorMessage="Wrong format (at line "+CF_intToStr((unsigned long) i+1)+"): /etc/shadow"; return FAILED; } // If we're in gi mode, fill in the first instance of the vector if (discriminant=="gi") { CF_assert(Simple_Identity_Management_OpenDRIM_Account_extractAccountInfo(result[0], current_etc_passwd_line, current_etc_shadow_line, groups, errorMessage)); // We found the instance so we can exit here return OK; } // Else we fill the current instance CF_assert(Simple_Identity_Management_OpenDRIM_Account_extractAccountInfo(instance, current_etc_passwd_line, current_etc_shadow_line, groups, errorMessage)); } // Add the instance to the vector if (discriminant=="ei" || discriminant=="ein") result.push_back(instance); } // If we get here it means we didn't find the instance if (discriminant=="gi") { errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_Account_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Account& instance, const char** properties, string& errorMessage) { _E_; // Check the key values string _SystemName; string CreationClassName; string SystemCreationClassName; instance.getCreationClassName(CreationClassName); instance.getSystemCreationClassName(SystemCreationClassName); instance.getSystemName(_SystemName); if (!CF_strCmpNoCase(_SystemName, SystemName) || !CF_strCmpNoCase(CreationClassName, "OpenDRIM_Account") || !CF_strCmpNoCase(SystemCreationClassName, "OpenDRIM_ComputerSystem")) { errorMessage = "No instance"; return NOT_FOUND; } // Get the instance (it also checks if it exists) vector instances; instances.push_back(instance); CF_assert(Simple_Identity_Management_OpenDRIM_Account_retrieve(broker, ctx, instances, properties, errorMessage, "gi")); instance=instances[0]; _L_; return OK; } int Simple_Identity_Management_OpenDRIM_Account_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Account& newInstance, const OpenDRIM_Account& oldInstance, const char** properties, string& errorMessage) { _E_; // We are going to modify the instance by executing the 'usermod' command string usermod_command="/usr/sbin/usermod "; string newElementName, oldElementName; // Check which properties have been modified and form usermod options if (newInstance.getElementName(newElementName)!=NOT_FOUND) { if (oldInstance.getElementName(oldElementName)==NOT_FOUND || newElementName!=oldElementName) usermod_command+="-c \""+newElementName+"\" "; } string newPrimaryGroup, oldPrimaryGroup; if (newInstance.getPrimaryGroup(newPrimaryGroup)!=NOT_FOUND) { if (oldInstance.getPrimaryGroup(oldPrimaryGroup)==NOT_FOUND || newPrimaryGroup!=oldPrimaryGroup) usermod_command+="-g "+newPrimaryGroup+" "; } string newLoginShell, oldLoginShell; if (newInstance.getLoginShell(newLoginShell)!=NOT_FOUND) { if (oldInstance.getLoginShell(oldLoginShell)==NOT_FOUND || newLoginShell!=oldLoginShell) usermod_command+="-s "+newLoginShell+" "; } string newHomeDirectory, oldHomeDirectory; if (newInstance.getHomeDirectory(newHomeDirectory)!=NOT_FOUND) { if (oldInstance.getHomeDirectory(oldHomeDirectory)==NOT_FOUND || newHomeDirectory!=oldHomeDirectory) usermod_command+="-d "+newHomeDirectory+" -m "; } string newAccountExpiration, oldAccountExpiration; newInstance.getAccountExpiration(newAccountExpiration); if (newInstance.getAccountExpiration(newAccountExpiration)!=NOT_FOUND) { if (oldInstance.getAccountExpiration(oldAccountExpiration)==NOT_FOUND || newAccountExpiration!=oldAccountExpiration) usermod_command+="-e "+newAccountExpiration.substr(0,4)+"-"+newAccountExpiration.substr(4,2)+"-"+newAccountExpiration.substr(6,2)+" "; } // Get the default minimum length for the password vector newUserPassword; vector etc_login_defs_entries, etc_login_defs_values; etc_login_defs_entries.push_back("PASS_MIN_LEN"); CF_assert(Simple_Identity_Management_OpenDRIM_Account_extractLoginDefsValue(etc_login_defs_values, etc_login_defs_entries, errorMessage)); if (newInstance.getUserPassword(newUserPassword)!=NOT_FOUND && newUserPassword.size()>0) { // MD5 encryption string salt=Simple_Identity_Management_OpenDRIM_Account_generateMD5Salt(); string password; for (size_t i=0; i etc_login_defs_entries, etc_login_defs_values; etc_login_defs_entries.push_back("UMASK"); CF_assert(Simple_Identity_Management_OpenDRIM_Account_extractLoginDefsValue(etc_login_defs_values, etc_login_defs_entries, errorMessage)); // Security: no directory manipulation outside of '/home/' if (HomeDirectory.find("/home/")!=string::npos && HomeDirectory.find("..")==string::npos && HomeDirectory.size()>6) { string mode = "700"; if (etc_login_defs_values.size()==1) mode=CF_intToStr(777 - atoi(etc_login_defs_values[0].c_str())); // Copy the skeleton (default bash settings, etc.) from /etc/skel errorCode=CF_runCommand("cp -rf /etc/skel/ "+HomeDirectory+"/", stdOut, stdErr, errorMessage); if (errorCode!=OK) { DEBUG; returnValue=2; return OK; } // Change the permissions errorCode=CF_runCommand("chmod " + mode + " " + HomeDirectory, stdOut, stdErr, errorMessage); if (errorCode!=OK) { DEBUG; returnValue=2; return OK; } // Change the owner to the owner of the account errorCode=CF_runCommand("chown -R "+Name+" "+HomeDirectory, stdOut, stdErr, errorMessage); if (errorCode!=OK) { DEBUG; returnValue=2; return OK; } // Chance the group to the primary group of the account errorCode=CF_runCommand("chgrp -R "+PrimaryGroup+" "+HomeDirectory, stdOut, stdErr, errorMessage); if (errorCode!=OK) { DEBUG; returnValue=2; return OK; } } else { DEBUG; returnValue=2; return OK; } returnValue=0; _L_; return OK; } int Simple_Identity_Management_OpenDRIM_Account_DeleteHomeDirectory(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Account& instance, unsigned int& returnValue, string& errorMessage) { _E_; string HomeDirectory; instance.getHomeDirectory(HomeDirectory); string stdOut, stdErr; // Check if the directory exists int errorCode=CF_runCommand("test -d "+HomeDirectory, stdOut, stdErr, errorMessage); if (errorCode!=OK) { returnValue=1; return OK; } // If we're in '/home/'we can delete if (HomeDirectory.find("/home/")!=string::npos && HomeDirectory.find("..")==string::npos && HomeDirectory.size()>6) { errorCode=CF_runCommand("rm -r -f "+HomeDirectory, stdOut, stdErr, errorMessage); if (errorCode!=OK) { returnValue=2; return OK; } } else { returnValue=2; return OK; } returnValue=0; _L_; return OK; } int Simple_Identity_Management_OpenDRIM_Account_extractAccountInfo(OpenDRIM_Account& instance, const vector& current_etc_passwd_line, const vector& current_etc_shadow_line, const vector& groups, string& errorMessage) { _E_; // Assign account information instance.setUserID(current_etc_passwd_line[2]); instance.setHomeDirectory(current_etc_passwd_line[5]); instance.setLoginShell(current_etc_passwd_line[6]); // An account is disabled if the account expiration is set // or if the password has expired and the limit period // to change is passed. // The password is locked if it's marked as locked (invalid charater) // or if the password expiration date is reached // 2: Enabled // 3: Disabled // 11: Password locked unsigned short account_state=2; if (current_etc_shadow_line[1].size()==0 || current_etc_shadow_line[1].find('!')!=string::npos || current_etc_shadow_line[1].find('*')!=string::npos) { vector UserPassword; UserPassword.push_back("!"); instance.setUserPassword(UserPassword); account_state=11; } time_t current_time=CF_localTime(); time_t _PasswordLastChange=atol(current_etc_shadow_line[2].c_str())*24*3600; string PasswordLastChange=CF_timeToString(_PasswordLastChange); instance.setPasswordLastChange(PasswordLastChange); if (current_etc_shadow_line[7]!="") { time_t _AccountExpiration=atol(current_etc_shadow_line[7].c_str())*24*3600; string AccountExpiration=CF_timeToString(_AccountExpiration); instance.setAccountExpiration(AccountExpiration); if (current_time>_AccountExpiration) account_state=3; } if (current_etc_shadow_line[4]!="" && current_etc_shadow_line[4]!="99999") { time_t _PasswordExpiration=atol(current_etc_shadow_line[2].c_str())*24*3600+atol(current_etc_shadow_line[4].c_str())*24*3600; string PasswordExpiration=CF_timeToString(_PasswordExpiration); instance.setPasswordExpiration(PasswordExpiration); if (account_state!=3 && current_time>_PasswordExpiration) account_state=11; if (current_etc_shadow_line[6]!="") { time_t _AccountInactive=_PasswordExpiration+atol(current_etc_shadow_line[6].c_str())*24*3600; if (current_time>_AccountInactive) account_state=3; } } if (current_etc_passwd_line[4]!="") instance.setElementName(current_etc_passwd_line[4]); instance.setEnabledState(account_state); if (account_state==11) account_state=32768; instance.setRequestedState(account_state); string PrimaryGroup, stdErr; // More efficient for (vector::size_type i = 0; i < groups.size(); i++) { if (current_etc_passwd_line[3] == groups[i].GroupID) { PrimaryGroup = groups[i].Name; break; } } // Get the GroupID of the primary group //CF_assert(CF_runCommand("cat /etc/group | grep "+current_etc_passwd_line[3], PrimaryGroup, stdErr, errorMessage)); //PrimaryGroup=PrimaryGroup.substr(0, PrimaryGroup.find(':')); instance.setPrimaryGroup(PrimaryGroup); _L_; return OK; } // Extract information from /etc/login.defs int Simple_Identity_Management_OpenDRIM_Account_extractLoginDefsValue(vector& values, const vector& entries, string& errorMessage) { _E_; values.clear(); for (size_t j=0; j login_defs_lines; CF_splitText(login_defs_lines, login_defs, '\n'); for (size_t i=0; i login_defs_line_elements; CF_splitTextBySpace(login_defs_line_elements, login_defs_line); // If the line contains less than 2 elements, skip and go to the next line if (login_defs_line_elements.size()<2) continue; for (size_t j=0; j=46 && seed<=57 || seed>=65 && seed<=90 || seed>=97) _salt.push_back(seed); } _L_; return _salt="$1$" + _salt + "$"; } int Simple_Identity_Management_OpenDRIM_Account_populate(OpenDRIM_Account& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Account/Makefile.am0000644000175000017500000000451211401066117027726 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_AccountProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountProvider_la_CPPFLAGS = -I../OpenDRIM_Group libcmpiSimple_Identity_Management_OpenDRIM_AccountProvider_la_SOURCES = OpenDRIM_AccountAccess.cpp OpenDRIM_AccountProvider.cpp cmpiOpenDRIM_Account.cpp libcmpiSimple_Identity_Management_OpenDRIM_AccountProvider_la_LIBADD = -lcrypt ../Common/libcmpiSimple_Identity_Management_Common.la ../OpenDRIM_Group/libcmpiSimple_Identity_Management_OpenDRIM_GroupProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_Account.h OpenDRIM_Account.h OpenDRIM_AccountAccess.h opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Account/cmpiOpenDRIM_Account.h0000644000175000017500000000507011401066117031745 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_ACCOUNT_H_ #define CMPIOPENDRIM_ACCOUNT_H_ #include "OpenDRIM_Account.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_Account_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Account& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_Account_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Account& instance); void Simple_Identity_Management_OpenDRIM_Account_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Account& instance); void Simple_Identity_Management_OpenDRIM_Account_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Account& instance); void Simple_Identity_Management_OpenDRIM_Account_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_Account_RequestStateChange_In& args); void Simple_Identity_Management_OpenDRIM_Account_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_Account_RequestStateChange_Out& args); #endif /*CMPIOPENDRIM_ACCOUNT_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Account/OpenDRIM_Account.h0000644000175000017500000004766711401066117031116 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNT_H_ #define OPENDRIM_ACCOUNT_H_ #include const static char* OpenDRIM_Account_classnames[] = {"OpenDRIM_Account"}; static string OpenDRIM_Account_NAMESPACE = _NAMESPACE; class OpenDRIM_Account { public: 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 PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; unsigned short EnabledState; bool EnabledState_isNULL; string OtherEnabledState; bool OtherEnabledState_isNULL; unsigned short RequestedState; bool RequestedState_isNULL; unsigned short EnabledDefault; bool EnabledDefault_isNULL; string TimeOfLastStateChange; bool TimeOfLastStateChange_isNULL; vector AvailableRequestedStates; bool AvailableRequestedStates_isNULL; unsigned short TransitioningToState; bool TransitioningToState_isNULL; string SystemCreationClassName; bool SystemCreationClassName_isNULL; string SystemName; bool SystemName_isNULL; string CreationClassName; bool CreationClassName_isNULL; string Name; bool Name_isNULL; string UserID; bool UserID_isNULL; vector ObjectClass; bool ObjectClass_isNULL; vector Descriptions; bool Descriptions_isNULL; vector Host; bool Host_isNULL; vector LocalityName; bool LocalityName_isNULL; vector OrganizationName; bool OrganizationName_isNULL; vector OU; bool OU_isNULL; vector SeeAlso; bool SeeAlso_isNULL; vector UserCertificate; bool UserCertificate_isNULL; vector UserPassword; bool UserPassword_isNULL; unsigned short PasswordHistoryDepth; bool PasswordHistoryDepth_isNULL; string PasswordExpiration; bool PasswordExpiration_isNULL; vector ComplexPasswordRulesEnforced; bool ComplexPasswordRulesEnforced_isNULL; string InactivityTimeout; bool InactivityTimeout_isNULL; unsigned short MaximumSuccessiveLoginFailures; bool MaximumSuccessiveLoginFailures_isNULL; string LastLogin; bool LastLogin_isNULL; string PasswordLastChange; bool PasswordLastChange_isNULL; string AccountExpiration; bool AccountExpiration_isNULL; string PrimaryGroup; bool PrimaryGroup_isNULL; string LoginShell; bool LoginShell_isNULL; string HomeDirectory; bool HomeDirectory_isNULL; OpenDRIM_Account() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstallDate_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; EnabledState_isNULL = true; OtherEnabledState_isNULL = true; RequestedState_isNULL = true; EnabledDefault_isNULL = true; TimeOfLastStateChange_isNULL = true; AvailableRequestedStates_isNULL = true; TransitioningToState_isNULL = true; SystemCreationClassName_isNULL = true; SystemName_isNULL = true; CreationClassName_isNULL = true; Name_isNULL = true; UserID_isNULL = true; ObjectClass_isNULL = true; Descriptions_isNULL = true; Host_isNULL = true; LocalityName_isNULL = true; OrganizationName_isNULL = true; OU_isNULL = true; SeeAlso_isNULL = true; UserCertificate_isNULL = true; UserPassword_isNULL = true; PasswordHistoryDepth_isNULL = true; PasswordExpiration_isNULL = true; ComplexPasswordRulesEnforced_isNULL = true; InactivityTimeout_isNULL = true; MaximumSuccessiveLoginFailures_isNULL = true; LastLogin_isNULL = true; PasswordLastChange_isNULL = true; AccountExpiration_isNULL = true; PrimaryGroup_isNULL = true; LoginShell_isNULL = true; HomeDirectory_isNULL = true; } ~OpenDRIM_Account() {} string getKeys() const { return CF_toLowCase(".SystemCreationClassName=\"" + CF_quoteString(SystemCreationClassName) + "\""".SystemName=\"" + CF_quoteString(SystemName) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""".Name=\"" + CF_quoteString(Name) + "\""); } int getCaption(string& value) const { if (Caption_isNULL==true) return NOT_FOUND; value = Caption; return OK; } int setCaption(const string& newValue) { Caption = newValue; Caption_isNULL = false; return OK; } int 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 getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getEnabledState(unsigned short& value) const { if (EnabledState_isNULL==true) return NOT_FOUND; value = EnabledState; return OK; } int setEnabledState(const unsigned short& newValue) { EnabledState = newValue; EnabledState_isNULL = false; return OK; } int getOtherEnabledState(string& value) const { if (OtherEnabledState_isNULL==true) return NOT_FOUND; value = OtherEnabledState; return OK; } int setOtherEnabledState(const string& newValue) { OtherEnabledState = newValue; OtherEnabledState_isNULL = false; return OK; } int getRequestedState(unsigned short& value) const { if (RequestedState_isNULL==true) return NOT_FOUND; value = RequestedState; return OK; } int setRequestedState(const unsigned short& newValue) { RequestedState = newValue; RequestedState_isNULL = false; return OK; } int getEnabledDefault(unsigned short& value) const { if (EnabledDefault_isNULL==true) return NOT_FOUND; value = EnabledDefault; return OK; } int setEnabledDefault(const unsigned short& newValue) { EnabledDefault = newValue; EnabledDefault_isNULL = false; return OK; } int getTimeOfLastStateChange(string& value) const { if (TimeOfLastStateChange_isNULL==true) return NOT_FOUND; value = TimeOfLastStateChange; return OK; } int setTimeOfLastStateChange(const string& newValue) { TimeOfLastStateChange = newValue; TimeOfLastStateChange_isNULL = false; return OK; } int getAvailableRequestedStates(vector& value) const { if (AvailableRequestedStates_isNULL==true) return NOT_FOUND; value = AvailableRequestedStates; return OK; } int setAvailableRequestedStates(const vector& newValue) { AvailableRequestedStates = newValue; AvailableRequestedStates_isNULL = false; return OK; } int getTransitioningToState(unsigned short& value) const { if (TransitioningToState_isNULL==true) return NOT_FOUND; value = TransitioningToState; return OK; } int setTransitioningToState(const unsigned short& newValue) { TransitioningToState = newValue; TransitioningToState_isNULL = false; return OK; } int getSystemCreationClassName(string& value) const { if (SystemCreationClassName_isNULL==true) return NOT_FOUND; value = SystemCreationClassName; return OK; } int setSystemCreationClassName(const string& newValue) { SystemCreationClassName = newValue; SystemCreationClassName_isNULL = false; return OK; } int getSystemName(string& value) const { if (SystemName_isNULL==true) return NOT_FOUND; value = SystemName; return OK; } int setSystemName(const string& newValue) { SystemName = newValue; SystemName_isNULL = false; return OK; } int getCreationClassName(string& value) const { if (CreationClassName_isNULL==true) return NOT_FOUND; value = CreationClassName; return OK; } int setCreationClassName(const string& newValue) { CreationClassName = newValue; CreationClassName_isNULL = false; return OK; } int 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 getUserID(string& value) const { if (UserID_isNULL==true) return NOT_FOUND; value = UserID; return OK; } int setUserID(const string& newValue) { UserID = newValue; UserID_isNULL = false; return OK; } int getObjectClass(vector& value) const { if (ObjectClass_isNULL==true) return NOT_FOUND; value = ObjectClass; return OK; } int setObjectClass(const vector& newValue) { ObjectClass = newValue; ObjectClass_isNULL = false; return OK; } int getDescriptions(vector& value) const { if (Descriptions_isNULL==true) return NOT_FOUND; value = Descriptions; return OK; } int setDescriptions(const vector& newValue) { Descriptions = newValue; Descriptions_isNULL = false; return OK; } int getHost(vector& value) const { if (Host_isNULL==true) return NOT_FOUND; value = Host; return OK; } int setHost(const vector& newValue) { Host = newValue; Host_isNULL = false; return OK; } int getLocalityName(vector& value) const { if (LocalityName_isNULL==true) return NOT_FOUND; value = LocalityName; return OK; } int setLocalityName(const vector& newValue) { LocalityName = newValue; LocalityName_isNULL = false; return OK; } int getOrganizationName(vector& value) const { if (OrganizationName_isNULL==true) return NOT_FOUND; value = OrganizationName; return OK; } int setOrganizationName(const vector& newValue) { OrganizationName = newValue; OrganizationName_isNULL = false; return OK; } int getOU(vector& value) const { if (OU_isNULL==true) return NOT_FOUND; value = OU; return OK; } int setOU(const vector& newValue) { OU = newValue; OU_isNULL = false; return OK; } int getSeeAlso(vector& value) const { if (SeeAlso_isNULL==true) return NOT_FOUND; value = SeeAlso; return OK; } int setSeeAlso(const vector& newValue) { SeeAlso = newValue; SeeAlso_isNULL = false; return OK; } int getUserCertificate(vector& value) const { if (UserCertificate_isNULL==true) return NOT_FOUND; value = UserCertificate; return OK; } int setUserCertificate(const vector& newValue) { UserCertificate = newValue; UserCertificate_isNULL = false; return OK; } int getUserPassword(vector& value) const { if (UserPassword_isNULL==true) return NOT_FOUND; value = UserPassword; return OK; } int setUserPassword(const vector& newValue) { UserPassword = newValue; UserPassword_isNULL = false; return OK; } int getPasswordHistoryDepth(unsigned short& value) const { if (PasswordHistoryDepth_isNULL==true) return NOT_FOUND; value = PasswordHistoryDepth; return OK; } int setPasswordHistoryDepth(const unsigned short& newValue) { PasswordHistoryDepth = newValue; PasswordHistoryDepth_isNULL = false; return OK; } int getPasswordExpiration(string& value) const { if (PasswordExpiration_isNULL==true) return NOT_FOUND; value = PasswordExpiration; return OK; } int setPasswordExpiration(const string& newValue) { PasswordExpiration = newValue; PasswordExpiration_isNULL = false; return OK; } int getComplexPasswordRulesEnforced(vector& value) const { if (ComplexPasswordRulesEnforced_isNULL==true) return NOT_FOUND; value = ComplexPasswordRulesEnforced; return OK; } int setComplexPasswordRulesEnforced(const vector& newValue) { ComplexPasswordRulesEnforced = newValue; ComplexPasswordRulesEnforced_isNULL = false; return OK; } int getInactivityTimeout(string& value) const { if (InactivityTimeout_isNULL==true) return NOT_FOUND; value = InactivityTimeout; return OK; } int setInactivityTimeout(const string& newValue) { InactivityTimeout = newValue; InactivityTimeout_isNULL = false; return OK; } int getMaximumSuccessiveLoginFailures(unsigned short& value) const { if (MaximumSuccessiveLoginFailures_isNULL==true) return NOT_FOUND; value = MaximumSuccessiveLoginFailures; return OK; } int setMaximumSuccessiveLoginFailures(const unsigned short& newValue) { MaximumSuccessiveLoginFailures = newValue; MaximumSuccessiveLoginFailures_isNULL = false; return OK; } int getLastLogin(string& value) const { if (LastLogin_isNULL==true) return NOT_FOUND; value = LastLogin; return OK; } int setLastLogin(const string& newValue) { LastLogin = newValue; LastLogin_isNULL = false; return OK; } int getPasswordLastChange(string& value) const { if (PasswordLastChange_isNULL==true) return NOT_FOUND; value = PasswordLastChange; return OK; } int setPasswordLastChange(const string& newValue) { PasswordLastChange = newValue; PasswordLastChange_isNULL = false; return OK; } int getAccountExpiration(string& value) const { if (AccountExpiration_isNULL==true) return NOT_FOUND; value = AccountExpiration; return OK; } int setAccountExpiration(const string& newValue) { AccountExpiration = newValue; AccountExpiration_isNULL = false; return OK; } int getPrimaryGroup(string& value) const { if (PrimaryGroup_isNULL==true) return NOT_FOUND; value = PrimaryGroup; return OK; } int setPrimaryGroup(const string& newValue) { PrimaryGroup = newValue; PrimaryGroup_isNULL = false; return OK; } int getLoginShell(string& value) const { if (LoginShell_isNULL==true) return NOT_FOUND; value = LoginShell; return OK; } int setLoginShell(const string& newValue) { LoginShell = newValue; LoginShell_isNULL = false; return OK; } int getHomeDirectory(string& value) const { if (HomeDirectory_isNULL==true) return NOT_FOUND; value = HomeDirectory; return OK; } int setHomeDirectory(const string& newValue) { HomeDirectory = newValue; HomeDirectory_isNULL = false; return OK; } }; class OpenDRIM_Account_RequestStateChange_In { public: unsigned short RequestedState; bool RequestedState_isNULL; Objectpath Job; bool Job_isNULL; string TimeoutPeriod; bool TimeoutPeriod_isNULL; OpenDRIM_Account_RequestStateChange_In() { RequestedState_isNULL = true; Job_isNULL = true; TimeoutPeriod_isNULL = true; } ~OpenDRIM_Account_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_Account_RequestStateChange_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_Account_RequestStateChange_Out() { Job_isNULL = true; } ~OpenDRIM_Account_RequestStateChange_Out() {} int getJob(Objectpath& value) const { if (Job_isNULL == true) return NOT_FOUND; value = Job; return OK; } int setJob(const Objectpath& newValue) { Job = newValue; Job_isNULL = false; return OK; } }; #endif /*OPENDRIM_ACCOUNT_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Account/cmpiOpenDRIM_Account.cpp0000644000175000017500000003254611401066117032310 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_Account.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_Account_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Account& instance) { _E_; Objectpath op(broker, OpenDRIM_Account_classnames[0], OpenDRIM_Account_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* Simple_Identity_Management_OpenDRIM_Account_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Account& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_Account_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.EnabledState_isNULL) ci.setProperty("EnabledState", instance.EnabledState); if (!instance.OtherEnabledState_isNULL) ci.setProperty("OtherEnabledState", instance.OtherEnabledState); if (!instance.RequestedState_isNULL) ci.setProperty("RequestedState", instance.RequestedState); if (!instance.EnabledDefault_isNULL) ci.setProperty("EnabledDefault", instance.EnabledDefault); if (!instance.TimeOfLastStateChange_isNULL) ci.setPropertyDatetime("TimeOfLastStateChange", instance.TimeOfLastStateChange); if (!instance.AvailableRequestedStates_isNULL) ci.setProperty("AvailableRequestedStates", instance.AvailableRequestedStates); if (!instance.TransitioningToState_isNULL) ci.setProperty("TransitioningToState", instance.TransitioningToState); if (!instance.UserID_isNULL) ci.setProperty("UserID", instance.UserID); if (!instance.ObjectClass_isNULL) ci.setProperty("ObjectClass", instance.ObjectClass); if (!instance.Descriptions_isNULL) ci.setProperty("Descriptions", instance.Descriptions); if (!instance.Host_isNULL) ci.setProperty("Host", instance.Host); if (!instance.LocalityName_isNULL) ci.setProperty("LocalityName", instance.LocalityName); if (!instance.OrganizationName_isNULL) ci.setProperty("OrganizationName", instance.OrganizationName); if (!instance.OU_isNULL) ci.setProperty("OU", instance.OU); if (!instance.SeeAlso_isNULL) ci.setProperty("SeeAlso", instance.SeeAlso); if (!instance.UserCertificate_isNULL) ci.setProperty("UserCertificate", instance.UserCertificate); if (!instance.UserPassword_isNULL) ci.setProperty("UserPassword", instance.UserPassword); if (!instance.PasswordHistoryDepth_isNULL) ci.setProperty("PasswordHistoryDepth", instance.PasswordHistoryDepth); if (!instance.PasswordExpiration_isNULL) ci.setPropertyDatetime("PasswordExpiration", instance.PasswordExpiration); if (!instance.ComplexPasswordRulesEnforced_isNULL) ci.setProperty("ComplexPasswordRulesEnforced", instance.ComplexPasswordRulesEnforced); if (!instance.InactivityTimeout_isNULL) ci.setPropertyDatetime("InactivityTimeout", instance.InactivityTimeout); if (!instance.MaximumSuccessiveLoginFailures_isNULL) ci.setProperty("MaximumSuccessiveLoginFailures", instance.MaximumSuccessiveLoginFailures); if (!instance.LastLogin_isNULL) ci.setPropertyDatetime("LastLogin", instance.LastLogin); if (!instance.PasswordLastChange_isNULL) ci.setPropertyDatetime("PasswordLastChange", instance.PasswordLastChange); if (!instance.AccountExpiration_isNULL) ci.setPropertyDatetime("AccountExpiration", instance.AccountExpiration); if (!instance.PrimaryGroup_isNULL) ci.setProperty("PrimaryGroup", instance.PrimaryGroup); if (!instance.LoginShell_isNULL) ci.setProperty("LoginShell", instance.LoginShell); if (!instance.HomeDirectory_isNULL) ci.setProperty("HomeDirectory", instance.HomeDirectory); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_Account_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Account& 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 Simple_Identity_Management_OpenDRIM_Account_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Account& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("EnabledState", instance.EnabledState) == OK) instance.EnabledState_isNULL = false; if (inst.getProperty("OtherEnabledState", instance.OtherEnabledState) == OK) instance.OtherEnabledState_isNULL = false; if (inst.getProperty("RequestedState", instance.RequestedState) == OK) instance.RequestedState_isNULL = false; if (inst.getProperty("EnabledDefault", instance.EnabledDefault) == OK) instance.EnabledDefault_isNULL = false; if (inst.getPropertyDatetime("TimeOfLastStateChange", instance.TimeOfLastStateChange) == OK) instance.TimeOfLastStateChange_isNULL = false; if (inst.getProperty("AvailableRequestedStates", instance.AvailableRequestedStates) == OK) instance.AvailableRequestedStates_isNULL = false; if (inst.getProperty("TransitioningToState", instance.TransitioningToState) == OK) instance.TransitioningToState_isNULL = false; if (inst.getProperty("SystemCreationClassName", instance.SystemCreationClassName) == OK) instance.SystemCreationClassName_isNULL = false; if (inst.getProperty("SystemName", instance.SystemName) == OK) instance.SystemName_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("UserID", instance.UserID) == OK) instance.UserID_isNULL = false; if (inst.getProperty("ObjectClass", instance.ObjectClass) == OK) instance.ObjectClass_isNULL = false; if (inst.getProperty("Descriptions", instance.Descriptions) == OK) instance.Descriptions_isNULL = false; if (inst.getProperty("Host", instance.Host) == OK) instance.Host_isNULL = false; if (inst.getProperty("LocalityName", instance.LocalityName) == OK) instance.LocalityName_isNULL = false; if (inst.getProperty("OrganizationName", instance.OrganizationName) == OK) instance.OrganizationName_isNULL = false; if (inst.getProperty("OU", instance.OU) == OK) instance.OU_isNULL = false; if (inst.getProperty("SeeAlso", instance.SeeAlso) == OK) instance.SeeAlso_isNULL = false; if (inst.getProperty("UserCertificate", instance.UserCertificate) == OK) instance.UserCertificate_isNULL = false; if (inst.getProperty("UserPassword", instance.UserPassword) == OK) instance.UserPassword_isNULL = false; if (inst.getProperty("PasswordHistoryDepth", instance.PasswordHistoryDepth) == OK) instance.PasswordHistoryDepth_isNULL = false; if (inst.getPropertyDatetime("PasswordExpiration", instance.PasswordExpiration) == OK) instance.PasswordExpiration_isNULL = false; if (inst.getProperty("ComplexPasswordRulesEnforced", instance.ComplexPasswordRulesEnforced) == OK) instance.ComplexPasswordRulesEnforced_isNULL = false; if (inst.getPropertyDatetime("InactivityTimeout", instance.InactivityTimeout) == OK) instance.InactivityTimeout_isNULL = false; if (inst.getProperty("MaximumSuccessiveLoginFailures", instance.MaximumSuccessiveLoginFailures) == OK) instance.MaximumSuccessiveLoginFailures_isNULL = false; if (inst.getPropertyDatetime("LastLogin", instance.LastLogin) == OK) instance.LastLogin_isNULL = false; if (inst.getPropertyDatetime("PasswordLastChange", instance.PasswordLastChange) == OK) instance.PasswordLastChange_isNULL = false; if (inst.getPropertyDatetime("AccountExpiration", instance.AccountExpiration) == OK) instance.AccountExpiration_isNULL = false; if (inst.getProperty("PrimaryGroup", instance.PrimaryGroup) == OK) instance.PrimaryGroup_isNULL = false; if (inst.getProperty("LoginShell", instance.LoginShell) == OK) instance.LoginShell_isNULL = false; if (inst.getProperty("HomeDirectory", instance.HomeDirectory) == OK) instance.HomeDirectory_isNULL = false; _L_; } void Simple_Identity_Management_OpenDRIM_Account_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_Account_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 Simple_Identity_Management_OpenDRIM_Account_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_Account_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_; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Account/OpenDRIM_AccountAccess.h0000644000175000017500000001031411401066117032213 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTACCESS_H_ #define OPENDRIM_ACCOUNTACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_Account.h" #include "OpenDRIM_GroupAccess.h" int Simple_Identity_Management_OpenDRIM_Account_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_Account_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_Account_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_Account_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Account& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_Account_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Account& newInstance, const OpenDRIM_Account& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_Account_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Account& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_Account_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Account& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_Account_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Account& instance, unsigned int& returnValue, const OpenDRIM_Account_RequestStateChange_In& in, OpenDRIM_Account_RequestStateChange_Out& out, string& errorMessage); int Simple_Identity_Management_OpenDRIM_Account_CreateHomeDirectory(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Account& instance, unsigned int& returnValue, string& errorMessage); int Simple_Identity_Management_OpenDRIM_Account_DeleteHomeDirectory(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Account& instance, unsigned int& returnValue, string& errorMessage); int Simple_Identity_Management_OpenDRIM_Account_extractAccountInfo(OpenDRIM_Account& instance, const vector& current_etc_passwd_line, const vector& current_etc_shadow_line, const vector& groups,string& errorMessage); int Simple_Identity_Management_OpenDRIM_Account_extractLoginDefsValue(vector& values, const vector& entries, string& errorMessage); string Simple_Identity_Management_OpenDRIM_Account_generateMD5Salt(); int Simple_Identity_Management_OpenDRIM_Account_populate(OpenDRIM_Account& instance, string& errorMessage); #endif /*OPENDRIM_ACCOUNTACCESS_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_Account/OpenDRIM_AccountProvider.cpp0000644000175000017500000003570411401066117033151 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_Account.h" #include "OpenDRIM_AccountAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_AccountProviderSetInstance Simple_Identity_Management_OpenDRIM_AccountProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_Account_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_Account_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_AccountProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_Account_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Account_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Account_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_Account_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_Account_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Account_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_Account_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Account instance; Simple_Identity_Management_OpenDRIM_Account_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Account_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Account_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_Account_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountProviderSetInstance(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_Account newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_Account_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_Account_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Account_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Account_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_Account_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Account_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Account instance; Simple_Identity_Management_OpenDRIM_Account_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Account_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_Account_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_Account_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Account_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_Account_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Account_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_Account_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Account instance; Simple_Identity_Management_OpenDRIM_Account_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Account_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Account_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_Account_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Account_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_AccountProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_Account_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountProviderInvokeMethod(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_Account instance; Simple_Identity_Management_OpenDRIM_Account_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"SystemCreationClassName", "Name", "SystemName", "CreationClassName"}; int errorCode = Simple_Identity_Management_OpenDRIM_Account_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Account_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="RequestStateChange") { unsigned int returnValue; OpenDRIM_Account_RequestStateChange_In inArgs; Simple_Identity_Management_OpenDRIM_Account_toCPP(_broker, in, inArgs); OpenDRIM_Account_RequestStateChange_Out outArgs; errorCode = Simple_Identity_Management_OpenDRIM_Account_RequestStateChange(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Account_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } Simple_Identity_Management_OpenDRIM_Account_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="CreateHomeDirectory") { unsigned int returnValue; errorCode = Simple_Identity_Management_OpenDRIM_Account_CreateHomeDirectory(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Account_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 =="DeleteHomeDirectory") { unsigned int returnValue; errorCode = Simple_Identity_Management_OpenDRIM_Account_DeleteHomeDirectory(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Account_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_Account_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 Simple_Identity_Management_OpenDRIM_Account_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Account_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_Account_init FAILED: " + (string) OpenDRIM_Account_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_Account_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_Account_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_Account_unload FAILED: " + (string) OpenDRIM_Account_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_Account_INIT if (Simple_Identity_Management_OpenDRIM_Account_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_AccountProvider, Simple_Identity_Management_OpenDRIM_AccountProvider, _broker, Simple_Identity_Management_OpenDRIM_Account_INIT); CMMethodMIStub(Simple_Identity_Management_OpenDRIM_AccountProvider, Simple_Identity_Management_OpenDRIM_AccountProvider, _broker, Simple_Identity_Management_OpenDRIM_Account_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/0000755000175000017500000000000011401066117023420 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_GroupOnSystem.mof0000644000175000017500000000343111401066117030357 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_GroupOnSystemProvider")] class OpenDRIM_GroupOnSystem:CIM_OwningCollectionElement { }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_AccountManagementService.mof0000644000175000017500000000344211401066117032475 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceProvider")] class OpenDRIM_AccountManagementService:CIM_AccountManagementService { }; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_RegisteredSimpleIdentityManagementProfile.mofopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_RegisteredSimpleIdentityManagementProfi0000644000175000017500000000347511401066117034767 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_RegisteredSimpleIdentityManagementProfileProvider")] class OpenDRIM_RegisteredSimpleIdentityManagementProfile:CIM_RegisteredProfile { }; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_AccountManagementServiceCapabilities.mofopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_AccountManagementServiceCapabilities.mo0000644000175000017500000000350311401066117034637 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceCapabilitiesProvider")] class OpenDRIM_AccountManagementServiceCapabilities:CIM_ElementCapabilities { }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_HostedAccountManagementService.mof0000644000175000017500000000346111401066117033645 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProvider")] class OpenDRIM_HostedAccountManagementService:CIM_HostedService { }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_AccountCapabilities.mof0000644000175000017500000000427111401066117031472 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_AccountCapabilitiesProvider")] class OpenDRIM_AccountCapabilities:CIM_AccountCapabilities { [Override("RequestedStateSupported")] uint16 RequestedStateSupported[] = {2, 32768}; [Override("ElementNameEditCapabilities")] boolean ElementNameEditSupported = true; [Description("The time between the expiration of the password " "and when the account is disabled if the password " "is not modified. A NULL value means the account is never " "disabled.")] datetime DisableTimeoutAfterPasswordExpiration; }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_AccountOnSystem.mof0000644000175000017500000000345111401066117030661 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Aggregation(true), Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_AccountOnSystemProvider")] class OpenDRIM_AccountOnSystem:CIM_AccountOnSystem { }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_IdentityInGroup.mof0000644000175000017500000000350711401066117030662 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Aggregation(true), Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_IdentityInGroupProvider")] class OpenDRIM_IdentityInGroup:CIM_MemberOfCollection { boolean IsPrimaryGroup; }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_Account.mof0000644000175000017500000000601611401066117027157 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_AccountProvider")] class OpenDRIM_Account:CIM_Account { [Description("The last time the password was changed")] datetime PasswordLastChange; [Description("The account expiration date. A NULL value means " "the account never expires.")] datetime AccountExpiration; [Description("The identifier (GroupID) of the Group " "which is the primary group of this account")] string PrimaryGroup; [Description("The path to the account login shell " "within the local filesystem")] string LoginShell; [Description("The path to the account home directory " "withing the local filesystem")] string HomeDirectory; [Description("When an account is created the associated " "home directory is NOT created. This method creates " "the user home directory whose path is set in 'HomeDirectory'"), ModelCorrespondence("OpenDRIM_Account.HomeDirectory"), ValueMap{"0", "1", "2"}, Values{"Completed with No Error", "Already existing directory", "Failed"} ] uint32 CreateHomeDirectory(); [Description("when an account is deleted the associated " "home directory is NOT deleted. This method deletes " "the user home directory whose path is set in 'HomeDirectory'"), ModelCorrespondence("OpenDRIM_Account.HomeDirectory"), ValueMap{"0", "1", "2"}, Values{"Completed with No Error", "Not existing directory", "Failed"} ] uint32 DeleteHomeDirectory(); }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_AccountAssignedIdentity.mof0000644000175000017500000000344611401066117032353 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_AccountAssignedIdentityProvider")] class OpenDRIM_AccountAssignedIdentity:CIM_AssignedIdentity { }; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_AccountManagementServiceConformsToProfile.mofopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_AccountManagementServiceConformsToProfi0000644000175000017500000000352211401066117034726 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceConformsToProfileProvider")] class OpenDRIM_AccountManagementServiceConformsToProfile:CIM_ElementConformsToProfile { }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_AccountManagementCapabilities.mof0000644000175000017500000000404611401066117033467 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_AccountManagementCapabilitiesProvider")] class OpenDRIM_AccountManagementCapabilities:CIM_AccountManagementCapabilities { [Override("RequestedStateSupported")] uint16 RequestedStateSupported[] = {5}; [Override("ElementNameEditSupported")] boolean ElementNameEditSupported = false; [Override("OperationsSupported")] uint16 OperationsSupported[] = {2, 3, 4}; }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_Identity.mof0000644000175000017500000000326111401066117027353 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Abstract] class OpenDRIM_Identity:CIM_Identity { }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_GroupIdentity.mof0000644000175000017500000000340111401066117030364 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_GroupIdentityProvider")] class OpenDRIM_GroupIdentity:OpenDRIM_Identity { }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_Group.mof0000644000175000017500000000351211401066117026655 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_GroupProvider")] class OpenDRIM_Group:CIM_Group { [Description("The group ID uniquely identifies a group within the system.")] string GroupID; }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_AccountAssociatedCapabilities.mof0000644000175000017500000000346511401066117033476 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_AccountAssociatedCapabilitiesProvider")] class OpenDRIM_AccountAssociatedCapabilities:CIM_ElementCapabilities { }; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_AccountManagementServiceAffectsIdentity.mofopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_AccountManagementServiceAffectsIdentity0000644000175000017500000000361311401066117034723 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceAffectsIdentityProvider")] class OpenDRIM_AccountManagementServiceAffectsIdentity:CIM_ServiceAffectsElement { [Override("ElementAffects")] uint16 ElementAffects[] = {5}; }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_AccountIdentity.mof0000644000175000017500000000340511401066117030670 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_AccountIdentityProvider")] class OpenDRIM_AccountIdentity:OpenDRIM_Identity { }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof/OpenDRIM_GroupAssignedIdentity.mof0000644000175000017500000000344211401066117032047 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Simple Identity Management provider package // Copyright (C) 2007 Frederic Desmons, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Khahramon NURIDDINOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiSimple_Identity_Management_OpenDRIM_GroupAssignedIdentityProvider")] class OpenDRIM_GroupAssignedIdentity:CIM_AssignedIdentity { }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/0000755000175000017500000000000011401066117025552 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_GroupOnSystem.mof0000644000175000017500000000036111401066117032510 0ustar guillaumeguillaume[Association] class OpenDRIM_GroupOnSystem : CIM_OwningCollectionElement { // Properties and methods inherited from CIM_OwningCollectionElement [Key] CIM_ManagedElement REF OwningElement; [Key] CIM_Collection REF OwnedElement; }; ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountManagementService.mofopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountManagementService.mof0000644000175000017500000000103511401066117034623 0ustar guillaumeguillaumeclass OpenDRIM_AccountManagementService : CIM_AccountManagementService { // Properties and methods inherited from CIM_AccountManagementService [Key] string SystemCreationClassName = "OpenDRIM_ComputerSystem"; [Key] string SystemName; [Key] string CreationClassName = "OpenDRIM_AccountManagementService"; [Key] string Name; // uint16 RequestedState; // uint16 EnabledState; string ElementName; uint32 CreateAccount([IN] CIM_ComputerSystem REF System, [IN] string AccountTemplate, [IN] CIM_Account REF Account); }; ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_RegisteredSimpleIdentityManagementProfile.mofopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_RegisteredSimpleIdentityMana0000644000175000017500000000044611401066117034714 0ustar guillaumeguillaumeclass OpenDRIM_RegisteredSimpleIdentityManagementProfile : CIM_RegisteredProfile { // Properties and methods inherited from CIM_RegisteredProfile [Key] string InstanceID; string RegisteredName; string RegisteredVersion; uint16 RegisteredOrganization; uint16 AdvertiseTypes[]; }; ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountManagementServiceCapabilities.mofopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountManagementServiceCapa0000644000175000017500000000040311401066117034626 0ustar guillaumeguillaume[Association] class OpenDRIM_AccountManagementServiceCapabilities : CIM_ElementCapabilities { // Properties and methods inherited from CIM_ElementCapabilities [Key] CIM_ManagedElement REF ManagedElement; [Key] CIM_Capabilities REF Capabilities; }; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_HostedAccountManagementService.mofopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_HostedAccountManagementServi0000644000175000017500000000033511401066117034704 0ustar guillaumeguillaume[Association] class OpenDRIM_HostedAccountManagementService : CIM_HostedService { // Properties and methods inherited from CIM_HostedService [Key] CIM_System REF Antecedent; [Key] CIM_Service REF Dependent; }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountCapabilities.mof0000644000175000017500000000140211401066117033615 0ustar guillaumeguillaumeclass OpenDRIM_AccountCapabilities : CIM_AccountCapabilities { // Properties and methods inherited from CIM_AccountCapabilities [Key] string InstanceID; boolean DisableOnInactivity; datetime MaximumPasswordAge; // [Override("RequestedStateSupported")] // uint16 RequestedStateSupported[] = {2, 32768}; // [Override("ElementNameEditCapabilities")] // boolean ElementNameEditSupported = true; uint16 ComplexPasswordRulesSupported[]; // Properties and methods added in OpenDRIM_AccountCapabilities [Description("The time between the expiration of the password " "and when the account is disabled if the password " "is not modified. A NULL value means the account is never " "disabled.")] datetime DisableTimeoutAfterPasswordExpiration; }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountOnSystem.mof0000644000175000017500000000036211401066117033011 0ustar guillaumeguillaume[Association, Aggregation] class OpenDRIM_AccountOnSystem : CIM_AccountOnSystem { // Properties and methods inherited from CIM_AccountOnSystem [Key, Aggregate] CIM_System REF GroupComponent; [Key] CIM_Account REF PartComponent; }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_IdentityInGroup.mof0000644000175000017500000000052211401066117033006 0ustar guillaumeguillaume[Association, Aggregation] class OpenDRIM_IdentityInGroup : CIM_MemberOfCollection { // Properties and methods inherited from CIM_MemberOfCollection [Key, Aggregate] CIM_Collection REF Collection; [Key] CIM_ManagedElement REF Member; // Properties and methods added in OpenDRIM_IdentityInGroup boolean IsPrimaryGroup; }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_Account.mof0000644000175000017500000000363611401066117031316 0ustar guillaumeguillaumeclass OpenDRIM_Account : CIM_Account { // Properties and methods inherited from CIM_Account [Key] string Name; [Key] string SystemCreationClassName; [Key] string SystemName; [Key] string CreationClassName; string UserID; datetime PasswordExpiration; string OrganizationName[]; string ElementName; string UserPassword[]; uint16 RequestedState; uint16 EnabledState; uint32 RequestStateChange([IN] uint16 RequestedState, [OUT] CIM_ConcreteJob REF Job, [IN] datetime TimeoutPeriod); // Properties and methods added in OpenDRIM_Account [Description("The last time the password was changed")] datetime PasswordLastChange; [Description("The account expiration date. A NULL value means " "the account never expires.")] datetime AccountExpiration; [Description("The identifier (GroupID) of the Group " "which is the primary group of this account")] string PrimaryGroup; [Description("The path to the account login shell " "within the local filesystem")] string LoginShell; [Description("The path to the account home directory " "withing the local filesystem")] string HomeDirectory; [Description("When an account is created the associated " "home directory is NOT created. This method creates " "the user home directory whose path is set in 'HomeDirectory'"), ModelCorrespondence("OpenDRIM_Account.HomeDirectory"), ValueMap{"0", "1", "2"}, Values{"Completed with No Error", "Already existing directory", "Failed"} ] uint32 CreateHomeDirectory(); [Description("when an account is deleted the associated " "home directory is NOT deleted. This method deletes " "the user home directory whose path is set in 'HomeDirectory'"), ModelCorrespondence("OpenDRIM_Account.HomeDirectory"), ValueMap{"0", "1", "2"}, Values{"Completed with No Error", "Not existing directory", "Failed"} ] uint32 DeleteHomeDirectory(); }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountAssignedIdentity.mof0000644000175000017500000000035411401066117034500 0ustar guillaumeguillaume[Association] class OpenDRIM_AccountAssignedIdentity : CIM_AssignedIdentity { // Properties and methods inherited from CIM_AssignedIdentity [Key] CIM_Identity REF IdentityInfo; [Key] CIM_ManagedElement REF ManagedElement; }; ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountManagementServiceConformsToProfile.mofopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountManagementServiceConf0000644000175000017500000000043411401066117034653 0ustar guillaumeguillaume[Association] class OpenDRIM_AccountManagementServiceConformsToProfile : CIM_ElementConformsToProfile { // Properties and methods inherited from CIM_ElementConformsToProfile [Key] CIM_RegisteredProfile REF ConformantStandard; [Key] CIM_ManagedElement REF ManagedElement; }; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountManagementCapabilities.mofopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountManagementCapabilitie0000644000175000017500000000073411401066117034656 0ustar guillaumeguillaumeclass OpenDRIM_AccountManagementCapabilities : CIM_AccountManagementCapabilities { // Properties and methods inherited from CIM_AccountManagementCapabilities [Key] string InstanceID; // [Override("RequestedStateSupported")] // uint16 RequestedStateSupported[] = {5}; // [Override("ElementNameEditSupported")] // boolean ElementNameEditSupported = false; string ElementName; // [Override("OperationsSupported")] // uint16 OperationsSupported[] = {2, 3, 4}; }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_Identity.mof0000644000175000017500000000006711401066117031506 0ustar guillaumeguillaume[Abstract] class OpenDRIM_Identity : CIM_Identity { }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_GroupIdentity.mof0000644000175000017500000000025111401066117032516 0ustar guillaumeguillaumeclass OpenDRIM_GroupIdentity : OpenDRIM_Identity { // Properties and methods inherited from CIM_AccountIdentity [Key] string InstanceID; string ElementName; }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_Group.mof0000644000175000017500000000054011401066117031005 0ustar guillaumeguillaumeclass OpenDRIM_Group : CIM_Group { // Properties and methods inherited from CIM_Group [Key, Override("CreationClassName")] string CreationClassName; [Key] string Name; string ElementName; // Properties and methods added in OpenDRIM_Group [Description("The group ID uniquely identifies a group within the system.")] string GroupID; }; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountAssociatedCapabilities.mofopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountAssociatedCapabilitie0000644000175000017500000000037411401066117034661 0ustar guillaumeguillaume[Association] class OpenDRIM_AccountAssociatedCapabilities : CIM_ElementCapabilities { // Properties and methods inherited from CIM_ElementCapabilities [Key] CIM_ManagedElement REF ManagedElement; [Key] CIM_Capabilities REF Capabilities; }; ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountManagementServiceAffectsIdentity.mofopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountManagementServiceAffe0000644000175000017500000000051711401066117034631 0ustar guillaumeguillaume[Association] class OpenDRIM_AccountManagementServiceAffectsIdentity : CIM_ServiceAffectsElement { // Properties and methods inherited from CIM_ServiceAffectsElement [Key] CIM_Service REF AffectingElement; [Key] CIM_ManagedElement REF AffectedElement; // [Override("ElementAffects")] // uint16 ElementAffects[] = {5}; }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/Simple_Identity_Management.mof0000644000175000017500000000205511401066117033515 0ustar guillaumeguillaume#pragma include ("OpenDRIM_Account.mof") #pragma include ("OpenDRIM_AccountCapabilities.mof") #pragma include ("OpenDRIM_Group.mof") #pragma include ("OpenDRIM_Identity.mof") #pragma include ("OpenDRIM_AccountIdentity.mof") #pragma include ("OpenDRIM_GroupIdentity.mof") #pragma include ("OpenDRIM_AccountManagementCapabilities.mof") #pragma include ("OpenDRIM_AccountManagementService.mof") #pragma include ("OpenDRIM_AccountManagementServiceCapabilities.mof") #pragma include ("OpenDRIM_RegisteredSimpleIdentityManagementProfile.mof") #pragma include ("OpenDRIM_AccountAssociatedCapabilities.mof") #pragma include ("OpenDRIM_AccountAssignedIdentity.mof") #pragma include ("OpenDRIM_GroupAssignedIdentity.mof") #pragma include ("OpenDRIM_IdentityInGroup.mof") #pragma include ("OpenDRIM_AccountOnSystem.mof") #pragma include ("OpenDRIM_GroupOnSystem.mof") #pragma include ("OpenDRIM_AccountManagementServiceAffectsIdentity.mof") #pragma include ("OpenDRIM_HostedAccountManagementService.mof") #pragma include ("OpenDRIM_AccountManagementServiceConformsToProfile.mof") opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_AccountIdentity.mof0000644000175000017500000000025311401066117033020 0ustar guillaumeguillaumeclass OpenDRIM_AccountIdentity : OpenDRIM_Identity { // Properties and methods inherited from CIM_AccountIdentity [Key] string InstanceID; string ElementName; }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/mof.generation/OpenDRIM_GroupAssignedIdentity.mof0000644000175000017500000000035211401066117034176 0ustar guillaumeguillaume[Association] class OpenDRIM_GroupAssignedIdentity : CIM_AssignedIdentity { // Properties and methods inherited from CIM_AssignedIdentity [Key] CIM_Identity REF IdentityInfo; [Key] CIM_ManagedElement REF ManagedElement; }; opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/COPYING0000644000175000017500000004310311401066117023673 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-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountIdentity/0000755000175000017500000000000011401066117027402 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountIdentity/Makefile.am0000644000175000017500000000434611401066117031445 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_AccountIdentityProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountIdentityProvider_la_SOURCES = OpenDRIM_AccountIdentityAccess.cpp OpenDRIM_AccountIdentityProvider.cpp cmpiOpenDRIM_AccountIdentity.cpp libcmpiSimple_Identity_Management_OpenDRIM_AccountIdentityProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la libcmpiSimple_Identity_Management_OpenDRIM_AccountIdentityProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_AccountIdentity.h OpenDRIM_AccountIdentity.h OpenDRIM_AccountIdentityAccess.h ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountIdentity/OpenDRIM_AccountIdentityAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountIdentity/OpenDRIM_AccountIdentityAcc0000644000175000017500000001224211401066117034500 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_AccountIdentityAccess.h" int Simple_Identity_Management_OpenDRIM_AccountIdentity_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountIdentity_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; // Read the /etc/passwd file string etc_passwd; CF_assert(CF_readTextFile("/etc/passwd", etc_passwd, errorMessage)); vector etc_passwd_lines; CF_splitText(etc_passwd_lines, etc_passwd, '\n'); // In gi (getInstance) mode the first instance in the vector contains // the objectpath of the instance we're supposed to get string gi_instance_id; if (discriminant=="gi") result[0].getInstanceID(gi_instance_id); // For each line of /etc/passwd and /etc/shadow for (size_t i=0; i current_etc_passwd_line; CF_splitText(current_etc_passwd_line, etc_passwd_lines[i], ':'); if (current_etc_passwd_line.size()!=7) { errorMessage="Wrong format (at line "+CF_intToStr((unsigned long) i+1)+"): /etc/passwd"; return FAILED; } // Assign the properties values OpenDRIM_AccountIdentity instance; instance.setInstanceID("OpenDRIM:Account:"+current_etc_passwd_line[0]); instance.setElementName(current_etc_passwd_line[0]); // We check if the current line matches with the requested instance (gi mode) if (discriminant=="gi" && CF_strCmpNoCase(gi_instance_id, "OpenDRIM:Account:"+current_etc_passwd_line[0])) { result[0]=instance; // We found the instance so we can exit here return OK; } // Add the instance to the vector if (discriminant=="ei" || discriminant=="ein") result.push_back(instance); } // If we get here it means we didn't find the instance if (discriminant=="gi") { errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountIdentity& instance, const char** properties, string& errorMessage) { _E_; vector instances; instances.push_back(instance); // Get the instance (it also checks if it exists) CF_assert(Simple_Identity_Management_OpenDRIM_AccountIdentity_retrieve(broker, ctx, instances, properties, errorMessage, "gi")); instance=instances[0]; _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountIdentity& newInstance, const OpenDRIM_AccountIdentity& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountIdentity_populate(OpenDRIM_AccountIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountIdentity/cmpiOpenDRIM_AccountIdentity.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountIdentity/cmpiOpenDRIM_AccountIdentit0000644000175000017500000000737211401066117034561 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountIdentity.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountIdentity& instance) { _E_; Objectpath op(broker, OpenDRIM_AccountIdentity_classnames[0], OpenDRIM_AccountIdentity_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountIdentity& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_AccountIdentity_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.CurrentlyAuthenticated_isNULL) ci.setProperty("CurrentlyAuthenticated", instance.CurrentlyAuthenticated); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_AccountIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountIdentity& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void Simple_Identity_Management_OpenDRIM_AccountIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountIdentity& 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("CurrentlyAuthenticated", instance.CurrentlyAuthenticated) == OK) instance.CurrentlyAuthenticated_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountIdentity/OpenDRIM_AccountIdentityAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountIdentity/OpenDRIM_AccountIdentityAcc0000644000175000017500000000625411401066117034506 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTIDENTITYACCESS_H_ #define OPENDRIM_ACCOUNTIDENTITYACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_AccountIdentity.h" int Simple_Identity_Management_OpenDRIM_AccountIdentity_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountIdentity_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountIdentity& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountIdentity& newInstance, const OpenDRIM_AccountIdentity& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountIdentity& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountIdentity& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountIdentity_populate(OpenDRIM_AccountIdentity& instance, string& errorMessage); #endif /*OPENDRIM_ACCOUNTIDENTITYACCESS_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountIdentity/OpenDRIM_AccountIdentity.h0000644000175000017500000000742711401066117034330 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTIDENTITY_H_ #define OPENDRIM_ACCOUNTIDENTITY_H_ #include const static char* OpenDRIM_AccountIdentity_classnames[] = {"OpenDRIM_AccountIdentity"}; static string OpenDRIM_AccountIdentity_NAMESPACE = _NAMESPACE; class OpenDRIM_AccountIdentity { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstanceID; bool InstanceID_isNULL; bool CurrentlyAuthenticated; bool CurrentlyAuthenticated_isNULL; OpenDRIM_AccountIdentity() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstanceID_isNULL = true; CurrentlyAuthenticated_isNULL = true; } ~OpenDRIM_AccountIdentity() {} 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 getCurrentlyAuthenticated(bool& value) const { if (CurrentlyAuthenticated_isNULL==true) return NOT_FOUND; value = CurrentlyAuthenticated; return OK; } int setCurrentlyAuthenticated(const bool& newValue) { CurrentlyAuthenticated = newValue; CurrentlyAuthenticated_isNULL = false; return OK; } }; #endif /*OPENDRIM_ACCOUNTIDENTITY_H_*/ ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountIdentity/cmpiOpenDRIM_AccountIdentity.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountIdentity/cmpiOpenDRIM_AccountIdentit0000644000175000017500000000455011401066117034554 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_ACCOUNTIDENTITY_H_ #define CMPIOPENDRIM_ACCOUNTIDENTITY_H_ #include "OpenDRIM_AccountIdentity.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountIdentity& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountIdentity& instance); void Simple_Identity_Management_OpenDRIM_AccountIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountIdentity& instance); void Simple_Identity_Management_OpenDRIM_AccountIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountIdentity& instance); #endif /*CMPIOPENDRIM_ACCOUNTIDENTITY_H_*/ ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountIdentity/OpenDRIM_AccountIdentityProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountIdentity/OpenDRIM_AccountIdentityPro0000644000175000017500000002715311401066117034561 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountIdentity.h" #include "OpenDRIM_AccountIdentityAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_AccountIdentityProviderSetInstance Simple_Identity_Management_OpenDRIM_AccountIdentityProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_AccountIdentity_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_AccountIdentity_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_AccountIdentityProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountIdentityProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountIdentity_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountIdentity_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountIdentityProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_AccountIdentity_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountIdentity_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountIdentityProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountIdentity instance; Simple_Identity_Management_OpenDRIM_AccountIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountIdentity_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountIdentity_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountIdentityProviderSetInstance(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_AccountIdentity newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_AccountIdentity_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_AccountIdentity_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountIdentity_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountIdentity_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountIdentityProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountIdentity instance; Simple_Identity_Management_OpenDRIM_AccountIdentity_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_AccountIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountIdentity_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_AccountIdentity_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountIdentityProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountIdentity instance; Simple_Identity_Management_OpenDRIM_AccountIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountIdentity_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountIdentityProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_AccountIdentity_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountIdentity_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountIdentity_init FAILED: " + (string) OpenDRIM_AccountIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountIdentity_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountIdentity_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountIdentity_unload FAILED: " + (string) OpenDRIM_AccountIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_AccountIdentity_INIT if (Simple_Identity_Management_OpenDRIM_AccountIdentity_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_AccountIdentityProvider, Simple_Identity_Management_OpenDRIM_AccountIdentityProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountIdentity_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementService/0000755000175000017500000000000011401066117031206 5ustar guillaumeguillaumeopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementService/Makefile.am0000644000175000017500000000503011401066117033240 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceProvider_la_CPPFLAGS = -I../OpenDRIM_Account/ -I../OpenDRIM_Group libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceProvider_la_SOURCES = OpenDRIM_AccountManagementServiceAccess.cpp OpenDRIM_AccountManagementServiceProvider.cpp cmpiOpenDRIM_AccountManagementService.cpp libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la ../OpenDRIM_Account/libcmpiSimple_Identity_Management_OpenDRIM_AccountProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountManagementServiceProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_AccountManagementService.h OpenDRIM_AccountManagementService.h OpenDRIM_AccountManagementServiceAccess.h ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementService/OpenDRIM_AccountManagementServiceAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementService/OpenDRIM_AccountMa0000644000175000017500000001163111401066117034442 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTMANAGEMENTSERVICEACCESS_H_ #define OPENDRIM_ACCOUNTMANAGEMENTSERVICEACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_AccountManagementService.h" int Simple_Identity_Management_OpenDRIM_AccountManagementService_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementService_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementService_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountManagementService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountManagementService& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& newInstance, const OpenDRIM_AccountManagementService& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementService_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& instance, unsigned int& returnValue, const OpenDRIM_AccountManagementService_RequestStateChange_In& in, OpenDRIM_AccountManagementService_RequestStateChange_Out& out, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementService_StartService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& instance, unsigned int& returnValue, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementService_StopService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& instance, unsigned int& returnValue, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& instance, unsigned int& returnValue, const OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence_In& in, OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence_Out& out, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementService_CreateAccount(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& instance, unsigned int& returnValue, const OpenDRIM_AccountManagementService_CreateAccount_In& in, OpenDRIM_AccountManagementService_CreateAccount_Out& out, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountManagementService_populate(OpenDRIM_AccountManagementService& instance, string& errorMessage); #endif /*OPENDRIM_ACCOUNTMANAGEMENTSERVICEACCESS_H_*/ ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementService/cmpiOpenDRIM_AccountManagementService.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementService/cmpiOpenDRIM_Accou0000644000175000017500000003117311401066117034476 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementService.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountManagementService& instance) { _E_; Objectpath op(broker, OpenDRIM_AccountManagementService_classnames[0], OpenDRIM_AccountManagementService_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* Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountManagementService& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.EnabledState_isNULL) ci.setProperty("EnabledState", instance.EnabledState); if (!instance.OtherEnabledState_isNULL) ci.setProperty("OtherEnabledState", instance.OtherEnabledState); if (!instance.RequestedState_isNULL) ci.setProperty("RequestedState", instance.RequestedState); if (!instance.EnabledDefault_isNULL) ci.setProperty("EnabledDefault", instance.EnabledDefault); if (!instance.TimeOfLastStateChange_isNULL) ci.setPropertyDatetime("TimeOfLastStateChange", instance.TimeOfLastStateChange); if (!instance.AvailableRequestedStates_isNULL) ci.setProperty("AvailableRequestedStates", instance.AvailableRequestedStates); if (!instance.TransitioningToState_isNULL) ci.setProperty("TransitioningToState", instance.TransitioningToState); if (!instance.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 Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountManagementService& 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 Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountManagementService& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("EnabledState", instance.EnabledState) == OK) instance.EnabledState_isNULL = false; if (inst.getProperty("OtherEnabledState", instance.OtherEnabledState) == OK) instance.OtherEnabledState_isNULL = false; if (inst.getProperty("RequestedState", instance.RequestedState) == OK) instance.RequestedState_isNULL = false; if (inst.getProperty("EnabledDefault", instance.EnabledDefault) == OK) instance.EnabledDefault_isNULL = false; if (inst.getPropertyDatetime("TimeOfLastStateChange", instance.TimeOfLastStateChange) == OK) instance.TimeOfLastStateChange_isNULL = false; if (inst.getProperty("AvailableRequestedStates", instance.AvailableRequestedStates) == OK) instance.AvailableRequestedStates_isNULL = false; if (inst.getProperty("TransitioningToState", instance.TransitioningToState) == OK) instance.TransitioningToState_isNULL = false; if (inst.getProperty("SystemCreationClassName", instance.SystemCreationClassName) == OK) instance.SystemCreationClassName_isNULL = false; if (inst.getProperty("SystemName", instance.SystemName) == OK) instance.SystemName_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("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 Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_AccountManagementService_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 Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_AccountManagementService_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 Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence_In& args) { _E_; CMPIStatus rc; CMPIData data; vector ManagedElements; data = in->ft->getArg(in, "ManagedElements", &rc); if (rc.rc == OK) { CT_ToC(broker, data, ManagedElements); args.setManagedElements(ManagedElements); } vector AssignedSequence; data = in->ft->getArg(in, "AssignedSequence", &rc); if (rc.rc == OK) { CT_ToC(data, AssignedSequence); args.setAssignedSequence(AssignedSequence); } Objectpath Job; data = in->ft->getArg(in, "Job", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Job); args.setJob(Job); } _L_; } void Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence_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 Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_AccountManagementService_CreateAccount_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath System; data = in->ft->getArg(in, "System", &rc); if (rc.rc == OK) { CT_ToC(broker, data, System); args.setSystem(System); } string AccountTemplate; data = in->ft->getArg(in, "AccountTemplate", &rc); if (rc.rc == OK) { CT_ToC(data, AccountTemplate); args.setAccountTemplate(AccountTemplate); } Objectpath Account; data = in->ft->getArg(in, "Account", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Account); args.setAccount(Account); } vector Identities; data = in->ft->getArg(in, "Identities", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Identities); args.setIdentities(Identities); } _L_; } void Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_AccountManagementService_CreateAccount_Out& args) { _E_; CMPIValue value; int errorMessage; Objectpath Account; errorMessage = args.getAccount(Account); if (errorMessage == OK) { value = CT_toCMPI(Account); out->ft->addArg(out, "Account", &value, CMPI_ref); } vector Identities; errorMessage = args.getIdentities(Identities); if (errorMessage == OK) { value = CT_toCMPI(broker, Identities); out->ft->addArg(out, "Identities", &value, CMPI_refA); } _L_; } ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementService/OpenDRIM_AccountManagementService.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementService/OpenDRIM_AccountMa0000644000175000017500000004413511401066117034447 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTMANAGEMENTSERVICE_H_ #define OPENDRIM_ACCOUNTMANAGEMENTSERVICE_H_ #include const static char* OpenDRIM_AccountManagementService_classnames[] = {"OpenDRIM_AccountManagementService"}; static string OpenDRIM_AccountManagementService_NAMESPACE = _NAMESPACE; class OpenDRIM_AccountManagementService { public: 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 PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; unsigned short EnabledState; bool EnabledState_isNULL; string OtherEnabledState; bool OtherEnabledState_isNULL; unsigned short RequestedState; bool RequestedState_isNULL; unsigned short EnabledDefault; bool EnabledDefault_isNULL; string TimeOfLastStateChange; bool TimeOfLastStateChange_isNULL; vector AvailableRequestedStates; bool AvailableRequestedStates_isNULL; unsigned short TransitioningToState; bool TransitioningToState_isNULL; string SystemCreationClassName; bool SystemCreationClassName_isNULL; string SystemName; bool SystemName_isNULL; string CreationClassName; bool CreationClassName_isNULL; string 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_AccountManagementService() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstallDate_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; EnabledState_isNULL = true; OtherEnabledState_isNULL = true; RequestedState_isNULL = true; EnabledDefault_isNULL = true; TimeOfLastStateChange_isNULL = true; AvailableRequestedStates_isNULL = true; TransitioningToState_isNULL = true; SystemCreationClassName_isNULL = true; SystemName_isNULL = true; CreationClassName_isNULL = true; Name_isNULL = true; PrimaryOwnerName_isNULL = true; PrimaryOwnerContact_isNULL = true; StartMode_isNULL = true; Started_isNULL = true; } ~OpenDRIM_AccountManagementService() {} string getKeys() const { return CF_toLowCase(".SystemCreationClassName=\"" + CF_quoteString(SystemCreationClassName) + "\""".SystemName=\"" + CF_quoteString(SystemName) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""".Name=\"" + CF_quoteString(Name) + "\""); } int getCaption(string& value) const { if (Caption_isNULL==true) return NOT_FOUND; value = Caption; return OK; } int setCaption(const string& newValue) { Caption = newValue; Caption_isNULL = false; return OK; } int 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 getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getEnabledState(unsigned short& value) const { if (EnabledState_isNULL==true) return NOT_FOUND; value = EnabledState; return OK; } int setEnabledState(const unsigned short& newValue) { EnabledState = newValue; EnabledState_isNULL = false; return OK; } int getOtherEnabledState(string& value) const { if (OtherEnabledState_isNULL==true) return NOT_FOUND; value = OtherEnabledState; return OK; } int setOtherEnabledState(const string& newValue) { OtherEnabledState = newValue; OtherEnabledState_isNULL = false; return OK; } int getRequestedState(unsigned short& value) const { if (RequestedState_isNULL==true) return NOT_FOUND; value = RequestedState; return OK; } int setRequestedState(const unsigned short& newValue) { RequestedState = newValue; RequestedState_isNULL = false; return OK; } int getEnabledDefault(unsigned short& value) const { if (EnabledDefault_isNULL==true) return NOT_FOUND; value = EnabledDefault; return OK; } int setEnabledDefault(const unsigned short& newValue) { EnabledDefault = newValue; EnabledDefault_isNULL = false; return OK; } int getTimeOfLastStateChange(string& value) const { if (TimeOfLastStateChange_isNULL==true) return NOT_FOUND; value = TimeOfLastStateChange; return OK; } int setTimeOfLastStateChange(const string& newValue) { TimeOfLastStateChange = newValue; TimeOfLastStateChange_isNULL = false; return OK; } int getAvailableRequestedStates(vector& value) const { if (AvailableRequestedStates_isNULL==true) return NOT_FOUND; value = AvailableRequestedStates; return OK; } int setAvailableRequestedStates(const vector& newValue) { AvailableRequestedStates = newValue; AvailableRequestedStates_isNULL = false; return OK; } int getTransitioningToState(unsigned short& value) const { if (TransitioningToState_isNULL==true) return NOT_FOUND; value = TransitioningToState; return OK; } int setTransitioningToState(const unsigned short& newValue) { TransitioningToState = newValue; TransitioningToState_isNULL = false; return OK; } int getSystemCreationClassName(string& value) const { if (SystemCreationClassName_isNULL==true) return NOT_FOUND; value = SystemCreationClassName; return OK; } int setSystemCreationClassName(const string& newValue) { SystemCreationClassName = newValue; SystemCreationClassName_isNULL = false; return OK; } int getSystemName(string& value) const { if (SystemName_isNULL==true) return NOT_FOUND; value = SystemName; return OK; } int setSystemName(const string& newValue) { SystemName = newValue; SystemName_isNULL = false; return OK; } int getCreationClassName(string& value) const { if (CreationClassName_isNULL==true) return NOT_FOUND; value = CreationClassName; return OK; } int setCreationClassName(const string& newValue) { CreationClassName = newValue; CreationClassName_isNULL = false; return OK; } int 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_AccountManagementService_RequestStateChange_In { public: unsigned short RequestedState; bool RequestedState_isNULL; Objectpath Job; bool Job_isNULL; string TimeoutPeriod; bool TimeoutPeriod_isNULL; OpenDRIM_AccountManagementService_RequestStateChange_In() { RequestedState_isNULL = true; Job_isNULL = true; TimeoutPeriod_isNULL = true; } ~OpenDRIM_AccountManagementService_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_AccountManagementService_RequestStateChange_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_AccountManagementService_RequestStateChange_Out() { Job_isNULL = true; } ~OpenDRIM_AccountManagementService_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_AccountManagementService_ChangeAffectedElementsAssignedSequence_In { public: vector ManagedElements; bool ManagedElements_isNULL; vector AssignedSequence; bool AssignedSequence_isNULL; Objectpath Job; bool Job_isNULL; OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence_In() { ManagedElements_isNULL = true; AssignedSequence_isNULL = true; Job_isNULL = true; } ~OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence_In() {} int getManagedElements(vector& value) const { if (ManagedElements_isNULL == true) return NOT_FOUND; value = ManagedElements; return OK; } int setManagedElements(const vector& newValue) { ManagedElements = newValue; ManagedElements_isNULL = false; return OK; } int getAssignedSequence(vector& value) const { if (AssignedSequence_isNULL == true) return NOT_FOUND; value = AssignedSequence; return OK; } int setAssignedSequence(const vector& newValue) { AssignedSequence = newValue; AssignedSequence_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_AccountManagementService_ChangeAffectedElementsAssignedSequence_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence_Out() { Job_isNULL = true; } ~OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence_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_AccountManagementService_CreateAccount_In { public: Objectpath System; bool System_isNULL; string AccountTemplate; bool AccountTemplate_isNULL; Objectpath Account; bool Account_isNULL; vector Identities; bool Identities_isNULL; OpenDRIM_AccountManagementService_CreateAccount_In() { System_isNULL = true; AccountTemplate_isNULL = true; Account_isNULL = true; Identities_isNULL = true; } ~OpenDRIM_AccountManagementService_CreateAccount_In() {} int getSystem(Objectpath& value) const { if (System_isNULL == true) return NOT_FOUND; value = System; return OK; } int setSystem(const Objectpath& newValue) { System = newValue; System_isNULL = false; return OK; } int getAccountTemplate(string& value) const { if (AccountTemplate_isNULL == true) return NOT_FOUND; value = AccountTemplate; return OK; } int setAccountTemplate(const string& newValue) { AccountTemplate = newValue; AccountTemplate_isNULL = false; return OK; } int getAccount(Objectpath& value) const { if (Account_isNULL == true) return NOT_FOUND; value = Account; return OK; } int setAccount(const Objectpath& newValue) { Account = newValue; Account_isNULL = false; return OK; } int getIdentities(vector& value) const { if (Identities_isNULL == true) return NOT_FOUND; value = Identities; return OK; } int setIdentities(const vector& newValue) { Identities = newValue; Identities_isNULL = false; return OK; } }; class OpenDRIM_AccountManagementService_CreateAccount_Out { public: Objectpath Account; bool Account_isNULL; vector Identities; bool Identities_isNULL; OpenDRIM_AccountManagementService_CreateAccount_Out() { Account_isNULL = true; Identities_isNULL = true; } ~OpenDRIM_AccountManagementService_CreateAccount_Out() {} int getAccount(Objectpath& value) const { if (Account_isNULL == true) return NOT_FOUND; value = Account; return OK; } int setAccount(const Objectpath& newValue) { Account = newValue; Account_isNULL = false; return OK; } int getIdentities(vector& value) const { if (Identities_isNULL == true) return NOT_FOUND; value = Identities; return OK; } int setIdentities(const vector& newValue) { Identities = newValue; Identities_isNULL = false; return OK; } }; #endif /*OPENDRIM_ACCOUNTMANAGEMENTSERVICE_H_*/ ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementService/OpenDRIM_AccountManagementServiceAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementService/OpenDRIM_AccountMa0000644000175000017500000002173711401066117034452 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_AccountManagementServiceAccess.h" #include "OpenDRIM_AccountAccess.h" #include "cmpiOpenDRIM_Account.h" string SystemName; const string Name="shadow-utils"; const string CreationClassName="OpenDRIM_AccountManagementService"; const string SystemCreationClassName="OpenDRIM_ComputerSystem"; int Simple_Identity_Management_OpenDRIM_AccountManagementService_load(const CMPIBroker* broker, string& errorMessage) { _E_; CF_assert(CF_getSystemName(SystemName, errorMessage)); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementService_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementService_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; // Only one instance // The key properties are based on the system name OpenDRIM_AccountManagementService instance; instance.setCreationClassName(CreationClassName); instance.setSystemCreationClassName(SystemCreationClassName); instance.setSystemName(SystemName); instance.setName(Name); if(discriminant=="ei") CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementService_populate(instance,errorMessage)); result.push_back(instance); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountManagementService& instance, const char** properties, string& errorMessage) { _E_; // Only one instance // The key properties are based on the system name if (instance.CreationClassName!=CreationClassName || instance.SystemCreationClassName!=SystemCreationClassName || instance.SystemName!=SystemName || instance.Name!=Name) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementService_populate(instance,errorMessage)); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& newInstance, const OpenDRIM_AccountManagementService& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementService_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& instance, unsigned int& returnValue, const OpenDRIM_AccountManagementService_RequestStateChange_In& in, OpenDRIM_AccountManagementService_RequestStateChange_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementService_StartService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& instance, unsigned int& returnValue, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementService_StopService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& instance, unsigned int& returnValue, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& instance, unsigned int& returnValue, const OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence_In& in, OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountManagementService_CreateAccount(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementService& instance, unsigned int& returnValue, const OpenDRIM_AccountManagementService_CreateAccount_In& in, OpenDRIM_AccountManagementService_CreateAccount_Out& out, string& errorMessage) { _E_; // AccountTemplate must be null string AccountTemplate; if (in.getAccountTemplate(AccountTemplate)!=NOT_FOUND) { returnValue=32768; return OK; } // System must exist and point the the OpenDRIM_ComputerSystem unique instance Objectpath System; if (in.getSystem(System)==NOT_FOUND) { // let's do nothing... //returnValue=32769; //return OK; } else { string creationClassName, name; if (System.getKey("CreationClassName",creationClassName)!=OK) { errorMessage="Wrong value (null): System.CreationClassName"; return FAILED; } if (System.getKey("Name",name)!=OK) { errorMessage="Wrong value (null): System.Name"; return FAILED; } if ((!CF_strCmpNoCase(creationClassName, "OpenDRIM_ComputerSystem") && !CF_strCmpNoCase(creationClassName, "CIM_ComputerSystem")) || !CF_strCmpNoCase(name, SystemName)) { returnValue=32769; return OK; } } // The account objectpath must be valid. // We check the different keys. Objectpath Account; if (in.getAccount(Account)==NOT_FOUND) { returnValue=32770; return OK; } string systemCreationClassName, systemName, creationClassName, name; if (Account.getKey("SystemCreationClassName", systemCreationClassName)!=OK) { errorMessage="Wrong value (null): Account.SystemCreationClassName"; return FAILED; } if (Account.getKey("SystemName", systemName)!=OK) { errorMessage="Wrong value (null): Account.SystemName"; return FAILED; } if (Account.getKey("Name", name)!=OK) { errorMessage="Wrong value (null): Account.Name"; return FAILED; } if (Account.getKey("CreationClassName", creationClassName)!=OK) { errorMessage="Wrong value (null): Account.CreationClassName"; return FAILED; } if (!CF_strCmpNoCase(systemName, SystemName) || !CF_strCmpNoCase(creationClassName, "OpenDRIM_Account") || (!CF_strCmpNoCase(systemCreationClassName, "OpenDRIM_ComputerSystem") && !CF_strCmpNoCase(systemCreationClassName, "CIM_ComputerSystem"))) { returnValue=32770; return OK; } OpenDRIM_Account account_instance; Simple_Identity_Management_OpenDRIM_Account_toCPP(broker, Account.getHdl(), account_instance); // Check if the account already exists int errorCode=Simple_Identity_Management_OpenDRIM_Account_getInstance(broker, ctx, account_instance, NULL, errorMessage); if (errorCode==OK) { returnValue=32771; return OK; } string stdOut, stdErr; // If everything is ok we created the account using useradd errorCode=CF_runCommand("/usr/sbin/useradd "+name, stdOut, stdErr, errorMessage); if (errorCode!=OK) { returnValue=2; return OK; } returnValue=0; _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementService_populate(OpenDRIM_AccountManagementService& instance, string& errorMessage) { _E_; instance.setRequestedState(12); instance.setEnabledState(2); instance.setElementName("shadow tool suite"); _L_; return OK; } ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementService/cmpiOpenDRIM_AccountManagementService.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementService/cmpiOpenDRIM_Accou0000644000175000017500000000711611401066117034476 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_ACCOUNTMANAGEMENTSERVICE_H_ #define CMPIOPENDRIM_ACCOUNTMANAGEMENTSERVICE_H_ #include "OpenDRIM_AccountManagementService.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountManagementService& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountManagementService& instance); void Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountManagementService& instance); void Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountManagementService& instance); void Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_AccountManagementService_RequestStateChange_In& args); void Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_AccountManagementService_RequestStateChange_Out& args); void Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence_In& args); void Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence_Out& args); void Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_AccountManagementService_CreateAccount_In& args); void Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_AccountManagementService_CreateAccount_Out& args); #endif /*CMPIOPENDRIM_ACCOUNTMANAGEMENTSERVICE_H_*/ ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementService/OpenDRIM_AccountManagementServiceProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountManagementService/OpenDRIM_AccountMa0000644000175000017500000004416211401066117034447 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountManagementService.h" #include "OpenDRIM_AccountManagementServiceAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_AccountManagementServiceProviderSetInstance Simple_Identity_Management_OpenDRIM_AccountManagementServiceProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_AccountManagementService_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_AccountManagementService_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_AccountManagementService_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementService instance; Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceProviderSetInstance(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_AccountManagementService newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementService instance; Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountManagementService instance; Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_AccountManagementServiceProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountManagementServiceProviderInvokeMethod(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_AccountManagementService instance; Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"SystemCreationClassName", "Name", "SystemName", "CreationClassName"}; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="RequestStateChange") { unsigned int returnValue; OpenDRIM_AccountManagementService_RequestStateChange_In inArgs; Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(_broker, in, inArgs); OpenDRIM_AccountManagementService_RequestStateChange_Out outArgs; errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_RequestStateChange(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="StartService") { unsigned int returnValue; errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_StartService(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_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 = Simple_Identity_Management_OpenDRIM_AccountManagementService_StopService(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_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 =="ChangeAffectedElementsAssignedSequence") { unsigned int returnValue; OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence_In inArgs; Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(_broker, in, inArgs); OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence_Out outArgs; errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_ChangeAffectedElementsAssignedSequence(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="CreateAccount") { unsigned int returnValue; OpenDRIM_AccountManagementService_CreateAccount_In inArgs; Simple_Identity_Management_OpenDRIM_AccountManagementService_toCPP(_broker, in, inArgs); OpenDRIM_AccountManagementService_CreateAccount_Out outArgs; errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_CreateAccount(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } Simple_Identity_Management_OpenDRIM_AccountManagementService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else { errorMessage = (string) OpenDRIM_AccountManagementService_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 Simple_Identity_Management_OpenDRIM_AccountManagementService_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountManagementService_init FAILED: " + (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountManagementService_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountManagementService_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountManagementService_unload FAILED: " + (string) OpenDRIM_AccountManagementService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_AccountManagementService_INIT if (Simple_Identity_Management_OpenDRIM_AccountManagementService_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_AccountManagementServiceProvider, Simple_Identity_Management_OpenDRIM_AccountManagementServiceProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountManagementService_INIT); CMMethodMIStub(Simple_Identity_Management_OpenDRIM_AccountManagementServiceProvider, Simple_Identity_Management_OpenDRIM_AccountManagementServiceProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountManagementService_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/0000755000175000017500000000000011401066117032355 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/OpenDRIM_HostedAccountManagementServiceAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/OpenDRIM_Hos0000644000175000017500000002643511401066117034500 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_HostedAccountManagementServiceAccess.h" int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_System_load(broker, errorMessage)); CF_assert(Simple_Identity_Management_CIM_Service_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_System_unload(errorMessage)); CF_assert(Simple_Identity_Management_CIM_Service_unload(errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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 Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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(Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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(Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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; Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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(Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_HostedAccountManagementService& 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(Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_HostedAccountManagementService& newInstance, const OpenDRIM_HostedAccountManagementService& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_HostedAccountManagementService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_HostedAccountManagementService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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(Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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(Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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(Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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(Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_HostedAccountManagementService_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_HostedAccountManagementService instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); OpenDRIM_HostedAccountManagementService_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_HostedAccountManagementService_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_HostedAccountManagementService instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); OpenDRIM_HostedAccountManagementService_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_populate(OpenDRIM_HostedAccountManagementService& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/Makefile.am0000644000175000017500000000546111401066117034417 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProvider.la libcmpiSimple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProvider_la_SOURCES = OpenDRIM_HostedAccountManagementServiceAccess.cpp OpenDRIM_HostedAccountManagementServiceProvider.cpp cmpiOpenDRIM_HostedAccountManagementService.cpp assocOpenDRIM_HostedAccountManagementService.cpp # May have to be adjusted for direct invocation libcmpiSimple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProvider_la_CPPFLAGS = -I../CIM_System -I../CIM_Service # Uncomment the end for direct invocation, may have to be adjusted libcmpiSimple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la #../CIM_System/libcmpiSimple_Identity_Management_CIM_SystemProvider.la ../CIM_Service/libcmpiSimple_Identity_Management_CIM_ServiceProvider.la libcmpiSimple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_HostedAccountManagementService.h OpenDRIM_HostedAccountManagementService.h OpenDRIM_HostedAccountManagementServiceAccess.h ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/cmpiOpenDRIM_HostedAccountManagementService.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/cmpiOpenDRIM0000644000175000017500000000503411401066117034530 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_HOSTEDACCOUNTMANAGEMENTSERVICE_H_ #define CMPIOPENDRIM_HOSTEDACCOUNTMANAGEMENTSERVICE_H_ #include "OpenDRIM_HostedAccountManagementService.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_HostedAccountManagementService& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_HostedAccountManagementService& instance); void Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_HostedAccountManagementService& instance); void Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_HostedAccountManagementService& instance); #endif /*CMPIOPENDRIM_HOSTEDACCOUNTMANAGEMENTSERVICE_H_*/ ././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/OpenDRIM_HostedAccountManagementService.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/OpenDRIM_Hos0000644000175000017500000000712111401066117034467 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_HOSTEDACCOUNTMANAGEMENTSERVICE_H_ #define OPENDRIM_HOSTEDACCOUNTMANAGEMENTSERVICE_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_HostedAccountManagementService_classnames[] = {"OpenDRIM_HostedAccountManagementService"}; static string OpenDRIM_HostedAccountManagementService_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_AccountManagementService"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_HostedAccountManagementService { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; OpenDRIM_HostedAccountManagementService() { Antecedent_isNULL = true; Dependent_isNULL = true; } ~OpenDRIM_HostedAccountManagementService() {} 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_HOSTEDACCOUNTMANAGEMENTSERVICE_H_*/ ././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/cmpiOpenDRIM_HostedAccountManagementService.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/cmpiOpenDRIM0000644000175000017500000000660111401066117034531 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_HostedAccountManagementService.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_HostedAccountManagementService& instance) { _E_; Objectpath op(broker, OpenDRIM_HostedAccountManagementService_classnames[0], OpenDRIM_HostedAccountManagementService_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_HostedAccountManagementService& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_HostedAccountManagementService& 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 Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_HostedAccountManagementService& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (inst.getProperty("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/assocOpenDRIM_HostedAccountManagementService.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/assocOpenDRI0000644000175000017500000000672011401066117034576 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef ASSOCOPENDRIM_HOSTEDACCOUNTMANAGEMENTSERVICE_H_ #define ASSOCOPENDRIM_HOSTEDACCOUNTMANAGEMENTSERVICE_H_ #include "OpenDRIM_HostedAccountManagementServiceAccess.h" int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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 Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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 Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_HOSTEDACCOUNTMANAGEMENTSERVICE_H_*/ ././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/OpenDRIM_HostedAccountManagementServiceAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/OpenDRIM_Hos0000644000175000017500000001166111401066117034473 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_HOSTEDACCOUNTMANAGEMENTSERVICEACCESS_H_ #define OPENDRIM_HOSTEDACCOUNTMANAGEMENTSERVICEACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_HostedAccountManagementService.h" #include "assocOpenDRIM_HostedAccountManagementService.h" int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_HostedAccountManagementService& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_HostedAccountManagementService& newInstance, const OpenDRIM_HostedAccountManagementService& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_HostedAccountManagementService& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_HostedAccountManagementService& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_HostedAccountManagementService_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_HostedAccountManagementService_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_populate(OpenDRIM_HostedAccountManagementService& instance, string& errorMessage); #endif /*OPENDRIM_HOSTEDACCOUNTMANAGEMENTSERVICEACCESS_H_*/ ././@LongLink0000000000000000000000000000021100000000000011557 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/assocOpenDRIM_HostedAccountManagementService.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/assocOpenDRI0000644000175000017500000002212511401066117034573 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "assocOpenDRIM_HostedAccountManagementService.h" int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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 = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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(Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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(Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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(Simple_Identity_Management_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_System_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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; Simple_Identity_Management_CIM_System_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_System_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_System_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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(Simple_Identity_Management_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_Service_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_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; Simple_Identity_Management_CIM_Service_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_Service_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_Service_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000021400000000000011562 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/OpenDRIM_HostedAccountManagementServiceProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_HostedAccountManagementService/OpenDRIM_Hos0000644000175000017500000004634511401066117034502 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_HostedAccountManagementService.h" #include "OpenDRIM_HostedAccountManagementServiceAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderSetInstance Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_HostedAccountManagementService instance; Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderSetInstance(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_HostedAccountManagementService newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_HostedAccountManagementService instance; Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_HostedAccountManagementService instance; Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderAssociatorNames(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 = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_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 Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderAssociators(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 = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_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 Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderReferenceNames(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 = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProviderReferences(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 = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_init FAILED: " + (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_unload FAILED: " + (string) OpenDRIM_HostedAccountManagementService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_INIT if (Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProvider, Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProvider, _broker, Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_INIT); CMAssociationMIStub(Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProvider, Simple_Identity_Management_OpenDRIM_HostedAccountManagementServiceProvider, _broker, Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/NEWS0000644000175000017500000000024311401066117023335 0ustar guillaumeguillaumeChanges in 1.0.0 ========================= // TODO Changes in 0.9.5 ========================= // TODO Initial Release 0.9.0 ========================= // TODO opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/LICENSE0000644000175000017500000000313611401066117023647 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/0000755000175000017500000000000011401066117031060 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/OpenDRIM_AccountAssignedIdentity.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/OpenDRIM_AccountAss0000644000175000017500000000721311401066117034506 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTASSIGNEDIDENTITY_H_ #define OPENDRIM_ACCOUNTASSIGNEDIDENTITY_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_Identity.h" #include "CIM_IdentityAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_AccountAssignedIdentity_classnames[] = {"OpenDRIM_AccountAssignedIdentity"}; static string OpenDRIM_AccountAssignedIdentity_NAMESPACE = _NAMESPACE; const static string IdentityInfo_role = "IdentityInfo"; const static char* IdentityInfo_classnames[] = {"OpenDRIM_AccountIdentity"}; const static string IdentityInfo_NAMESPACE = _NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_Account"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_AccountAssignedIdentity { public: Objectpath IdentityInfo; bool IdentityInfo_isNULL; Objectpath ManagedElement; bool ManagedElement_isNULL; OpenDRIM_AccountAssignedIdentity() { IdentityInfo_isNULL = true; ManagedElement_isNULL = true; } ~OpenDRIM_AccountAssignedIdentity() {} string getKeys() const { return CF_toLowCase(".IdentityInfo=\"" + CF_quoteString(IdentityInfo.toString()) + "\""".ManagedElement=\"" + CF_quoteString(ManagedElement.toString()) + "\""); } int getIdentityInfo(Objectpath& value) const { if (IdentityInfo_isNULL==true) return NOT_FOUND; value = IdentityInfo; return OK; } int setIdentityInfo(const Objectpath& newValue) { IdentityInfo = newValue; IdentityInfo.setNamespace(IdentityInfo_NAMESPACE); IdentityInfo_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_ACCOUNTASSIGNEDIDENTITY_H_*/ ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/assocOpenDRIM_AccountAssignedIdentity.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/assocOpenDRIM_Accou0000644000175000017500000000663011401066117034530 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef ASSOCOPENDRIM_ACCOUNTASSIGNEDIDENTITY_H_ #define ASSOCOPENDRIM_ACCOUNTASSIGNEDIDENTITY_H_ #include "OpenDRIM_AccountAssignedIdentityAccess.h" int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_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 Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_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 Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_enumerateIdentityInfos(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_getIdentityInfo(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_ACCOUNTASSIGNEDIDENTITY_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/Makefile.am0000644000175000017500000000537011401066117033121 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_AccountAssignedIdentityProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountAssignedIdentityProvider_la_SOURCES = OpenDRIM_AccountAssignedIdentityAccess.cpp OpenDRIM_AccountAssignedIdentityProvider.cpp cmpiOpenDRIM_AccountAssignedIdentity.cpp assocOpenDRIM_AccountAssignedIdentity.cpp # May have to be adjusted for direct invocation libcmpiSimple_Identity_Management_OpenDRIM_AccountAssignedIdentityProvider_la_CPPFLAGS = -I../CIM_Identity -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiSimple_Identity_Management_OpenDRIM_AccountAssignedIdentityProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la #../CIM_Identity/libcmpiSimple_Identity_Management_CIM_IdentityProvider.la ../CIM_ManagedElement/libcmpiSimple_Identity_Management_CIM_ManagedElementProvider.la libcmpiSimple_Identity_Management_OpenDRIM_AccountAssignedIdentityProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_AccountAssignedIdentity.h OpenDRIM_AccountAssignedIdentity.h OpenDRIM_AccountAssignedIdentityAccess.h ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/OpenDRIM_AccountAssignedIdentityAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/OpenDRIM_AccountAss0000644000175000017500000002640211401066117034507 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_AccountAssignedIdentityAccess.h" int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_Identity_load(broker, errorMessage)); CF_assert(Simple_Identity_Management_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_Identity_unload(errorMessage)); CF_assert(Simple_Identity_Management_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_isAssociated(const Instance& IdentityInfo, const Instance& ManagedElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_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(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_enumerateIdentityInfos(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(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_enumerateIdentityInfos(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; Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), IdentityInfo_classnames[0], ManagedElement_classnames[0], IdentityInfo_role.c_str(), ManagedElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_referenceIdentityInfoToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountAssignedIdentity& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath IdentityInfo_objectpath; instance.getIdentityInfo(IdentityInfo_objectpath); Instance IdentityInfo_instance; CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_getIdentityInfo(broker, ctx, IdentityInfo_objectpath, IdentityInfo_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_isAssociated(IdentityInfo_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountAssignedIdentity& newInstance, const OpenDRIM_AccountAssignedIdentity& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountAssignedIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountAssignedIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_associatorIdentityInfoToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& IdentityInfo_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(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_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(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& IdentityInfo_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector IdentityInfo_instances; if (discriminant=="a") CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_enumerateIdentityInfos(broker, ctx, IdentityInfo_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_enumerateIdentityInfos(broker, ctx, IdentityInfo_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(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_enumerateIdentityInfos(broker, ctx, IdentityInfo_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_AccountAssignedIdentity_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_AccountAssignedIdentity instance; instance.setIdentityInfo(((Instance) IdentityInfo_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); OpenDRIM_AccountAssignedIdentity_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_referenceManagedElementToIdentityInfo(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& IdentityInfo_instances, vector& OpenDRIM_AccountAssignedIdentity_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 < IdentityInfo_instances.size(); i++) { OpenDRIM_AccountAssignedIdentity instance; instance.setIdentityInfo(((Instance) IdentityInfo_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); OpenDRIM_AccountAssignedIdentity_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_populate(OpenDRIM_AccountAssignedIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/cmpiOpenDRIM_AccountAssignedIdentity.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/cmpiOpenDRIM_Accoun0000644000175000017500000000471011401066117034523 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_ACCOUNTASSIGNEDIDENTITY_H_ #define CMPIOPENDRIM_ACCOUNTASSIGNEDIDENTITY_H_ #include "OpenDRIM_AccountAssignedIdentity.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountAssignedIdentity& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountAssignedIdentity& instance); void Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountAssignedIdentity& instance); void Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountAssignedIdentity& instance); #endif /*CMPIOPENDRIM_ACCOUNTASSIGNEDIDENTITY_H_*/ ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/OpenDRIM_AccountAssignedIdentityProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/OpenDRIM_AccountAss0000644000175000017500000004521311401066117034510 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountAssignedIdentity.h" #include "OpenDRIM_AccountAssignedIdentityAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderSetInstance Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountAssignedIdentity instance; Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderSetInstance(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_AccountAssignedIdentity newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountAssignedIdentity instance; Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_AccountAssignedIdentity instance; Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderAssociatorNames(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 = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_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 Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderAssociators(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 = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_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 Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderReferenceNames(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 = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_referenceIdentityInfoToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_referenceManagedElementToIdentityInfo(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProviderReferences(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 = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_referenceIdentityInfoToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_referenceManagedElementToIdentityInfo(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_init FAILED: " + (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_unload FAILED: " + (string) OpenDRIM_AccountAssignedIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_INIT if (Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProvider, Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_INIT); CMAssociationMIStub(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProvider, Simple_Identity_Management_OpenDRIM_AccountAssignedIdentityProvider, _broker, Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/assocOpenDRIM_AccountAssignedIdentity.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/assocOpenDRIM_Accou0000644000175000017500000002223511401066117034527 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "assocOpenDRIM_AccountAssignedIdentity.h" int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_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 = Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_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, "IdentityInfo") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "ManagedElement") != 0) return OK; CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_associatorIdentityInfoToManagedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "ManagedElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "IdentityInfo") != 0) return OK; CF_assert(Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_associatorManagedElementToIdentityInfo(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_enumerateIdentityInfos(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, IdentityInfo_NAMESPACE, IdentityInfo_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(Simple_Identity_Management_CIM_Identity_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_Identity_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_Identity_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_getIdentityInfo(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), IdentityInfo_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), IdentityInfo_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_Identity _instance; Simple_Identity_Management_CIM_Identity_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_Identity_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_Identity_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_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(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_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; Simple_Identity_Management_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/cmpiOpenDRIM_AccountAssignedIdentity.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/cmpiOpenDRIM_Accoun0000644000175000017500000000655411401066117034533 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_AccountAssignedIdentity.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_AccountAssignedIdentity& instance) { _E_; Objectpath op(broker, OpenDRIM_AccountAssignedIdentity_classnames[0], OpenDRIM_AccountAssignedIdentity_NAMESPACE); if (!instance.IdentityInfo_isNULL) op.addKey("IdentityInfo", instance.IdentityInfo); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_AccountAssignedIdentity& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_AccountAssignedIdentity& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("IdentityInfo", instance.IdentityInfo) == OK) instance.IdentityInfo_isNULL = false; if (op.getKey("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } void Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_AccountAssignedIdentity& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("IdentityInfo", instance.IdentityInfo) == OK) instance.IdentityInfo_isNULL = false; if (inst.getProperty("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/OpenDRIM_AccountAssignedIdentityAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_AccountAssignedIdentity/OpenDRIM_AccountAss0000644000175000017500000001144511401066117034510 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_ACCOUNTASSIGNEDIDENTITYACCESS_H_ #define OPENDRIM_ACCOUNTASSIGNEDIDENTITYACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_AccountAssignedIdentity.h" #include "assocOpenDRIM_AccountAssignedIdentity.h" int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountAssignedIdentity& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountAssignedIdentity& newInstance, const OpenDRIM_AccountAssignedIdentity& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountAssignedIdentity& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountAssignedIdentity& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_associatorIdentityInfoToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& IdentityInfo_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_associatorManagedElementToIdentityInfo(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& IdentityInfo_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_referenceIdentityInfoToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& IdentityInfo_instance, const vector& ManagedElement_instances, vector& OpenDRIM_AccountAssignedIdentity_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_referenceManagedElementToIdentityInfo(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& IdentityInfo_instances, vector& OpenDRIM_AccountAssignedIdentity_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_AccountAssignedIdentity_populate(OpenDRIM_AccountAssignedIdentity& instance, string& errorMessage); #endif /*OPENDRIM_ACCOUNTASSIGNEDIDENTITYACCESS_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/0000755000175000017500000000000011401066117027371 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/cmpiOpenDRIM_IdentityInGroup.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/cmpiOpenDRIM_IdentityInGrou0000644000175000017500000000661111401066117034543 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_IdentityInGroup.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_IdentityInGroup& instance) { _E_; Objectpath op(broker, OpenDRIM_IdentityInGroup_classnames[0], OpenDRIM_IdentityInGroup_NAMESPACE); if (!instance.Collection_isNULL) op.addKey("Collection", instance.Collection); if (!instance.Member_isNULL) op.addKey("Member", instance.Member); _L_; return op.getHdl(); } CMPIInstance* Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_IdentityInGroup& instance) { _E_; Objectpath op(broker, Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.IsPrimaryGroup_isNULL) ci.setProperty("IsPrimaryGroup", instance.IsPrimaryGroup); _L_; return ci.getHdl(); } void Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_IdentityInGroup& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Member", instance.Member) == OK) instance.Member_isNULL = false; if (op.getKey("Collection", instance.Collection) == OK) instance.Collection_isNULL = false; _L_; } void Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_IdentityInGroup& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Collection", instance.Collection) == OK) instance.Collection_isNULL = false; if (inst.getProperty("Member", instance.Member) == OK) instance.Member_isNULL = false; if (inst.getProperty("IsPrimaryGroup", instance.IsPrimaryGroup) == OK) instance.IsPrimaryGroup_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/OpenDRIM_IdentityInGroupAccess.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/OpenDRIM_IdentityInGroupAcc0000644000175000017500000002563411401066117034467 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "OpenDRIM_IdentityInGroupAccess.h" int Simple_Identity_Management_OpenDRIM_IdentityInGroup_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(Simple_Identity_Management_CIM_Collection_load(broker, errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(Simple_Identity_Management_CIM_ManagedElement_unload(errorMessage)); CF_assert(Simple_Identity_Management_CIM_Collection_unload(errorMessage)); */ // TODO _L_; return OK; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_isAssociated(const Instance& Member, const Instance& Collection, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_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(Simple_Identity_Management_OpenDRIM_IdentityInGroup_enumerateMembers(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(Simple_Identity_Management_OpenDRIM_IdentityInGroup_enumerateMembers(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; Simple_Identity_Management_OpenDRIM_IdentityInGroup_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), Member_classnames[0], Collection_classnames[0], Member_role.c_str(), Collection_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(Simple_Identity_Management_OpenDRIM_IdentityInGroup_referenceMemberToCollection(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_IdentityInGroup& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath Member_objectpath; instance.getMember(Member_objectpath); Instance Member_instance; CF_assert(Simple_Identity_Management_OpenDRIM_IdentityInGroup_getMember(broker, ctx, Member_objectpath, Member_instance, NULL, errorMessage)); Objectpath Collection_objectpath; instance.getCollection(Collection_objectpath); Instance Collection_instance; CF_assert(Simple_Identity_Management_OpenDRIM_IdentityInGroup_getCollection(broker, ctx, Collection_objectpath, Collection_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(Simple_Identity_Management_OpenDRIM_IdentityInGroup_isAssociated(Member_instance, Collection_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(Simple_Identity_Management_OpenDRIM_IdentityInGroup_populate(instance, errorMessage)); _L_; return OK; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_IdentityInGroup& newInstance, const OpenDRIM_IdentityInGroup& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_IdentityInGroup& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_IdentityInGroup& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_associatorMemberToCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Member_instance, const char** properties, vector& Collection_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Collection_instances; if (discriminant=="a") CF_assert(Simple_Identity_Management_OpenDRIM_IdentityInGroup_enumerateCollections(broker, ctx, Collection_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_IdentityInGroup_enumerateCollections(broker, ctx, Collection_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(Simple_Identity_Management_OpenDRIM_IdentityInGroup_enumerateCollections(broker, ctx, Collection_instances, properties, false, errorMessage)); } for (size_t i=0; i& Member_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Member_instances; if (discriminant=="a") CF_assert(Simple_Identity_Management_OpenDRIM_IdentityInGroup_enumerateMembers(broker, ctx, Member_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(Simple_Identity_Management_OpenDRIM_IdentityInGroup_enumerateMembers(broker, ctx, Member_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(Simple_Identity_Management_OpenDRIM_IdentityInGroup_enumerateMembers(broker, ctx, Member_instances, properties, false, errorMessage)); } for (size_t i=0; i& Collection_instances, vector& OpenDRIM_IdentityInGroup_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 < Collection_instances.size(); i++) { OpenDRIM_IdentityInGroup instance; instance.setMember(((Instance) Member_instance).getObjectpath()); instance.setCollection(((Instance) Collection_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(Simple_Identity_Management_OpenDRIM_IdentityInGroup_populate(instance, errorMessage)); } OpenDRIM_IdentityInGroup_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_referenceCollectionToMember(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Collection_instance, const vector& Member_instances, vector& OpenDRIM_IdentityInGroup_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 < Member_instances.size(); i++) { OpenDRIM_IdentityInGroup instance; instance.setMember(((Instance) Member_instances[i]).getObjectpath()); instance.setCollection(((Instance) Collection_instance).getObjectpath()); if (discriminant == "r") { CF_assert(Simple_Identity_Management_OpenDRIM_IdentityInGroup_populate(instance, errorMessage)); } OpenDRIM_IdentityInGroup_instances.push_back(instance); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_populate(OpenDRIM_IdentityInGroup& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/OpenDRIM_IdentityInGroupProvider.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/OpenDRIM_IdentityInGroupPro0000644000175000017500000004362311401066117034537 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "cmpiOpenDRIM_IdentityInGroup.h" #include "OpenDRIM_IdentityInGroupAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderSetInstance Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderModifyInstance #endif int Simple_Identity_Management_OpenDRIM_IdentityInGroup_init(const CMPIBroker* broker); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderEnumInstances(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 = Simple_Identity_Management_OpenDRIM_IdentityInGroup_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_IdentityInGroup instance; Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderSetInstance(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_IdentityInGroup newInstance, oldInstance; Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCPP(_broker, ci, newInstance); Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_IdentityInGroup instance; Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCPP(_broker, ci, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_IdentityInGroup instance; Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCPP(_broker, cop, instance); string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderExecQuery(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 Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderAssociatorNames(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 = Simple_Identity_Management_OpenDRIM_IdentityInGroup_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_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 Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderAssociators(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 = Simple_Identity_Management_OpenDRIM_IdentityInGroup_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_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 Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderReferenceNames(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 = Simple_Identity_Management_OpenDRIM_IdentityInGroup_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_referenceMemberToCollection(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_referenceCollectionToMember(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus Simple_Identity_Management_OpenDRIM_IdentityInGroupProviderReferences(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 = Simple_Identity_Management_OpenDRIM_IdentityInGroup_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_referenceMemberToCollection(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_referenceCollectionToMember(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int Simple_Identity_Management_OpenDRIM_IdentityInGroup_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_IdentityInGroup_init FAILED: " + (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = Simple_Identity_Management_OpenDRIM_IdentityInGroup_unload(errorMessage); if (errorCode != OK) { errorMessage += "Simple_Identity_Management_OpenDRIM_IdentityInGroup_unload FAILED: " + (string) OpenDRIM_IdentityInGroup_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define Simple_Identity_Management_OpenDRIM_IdentityInGroup_INIT if (Simple_Identity_Management_OpenDRIM_IdentityInGroup_init(_broker) < 0) return NULL CMInstanceMIStub(Simple_Identity_Management_OpenDRIM_IdentityInGroupProvider, Simple_Identity_Management_OpenDRIM_IdentityInGroupProvider, _broker, Simple_Identity_Management_OpenDRIM_IdentityInGroup_INIT); CMAssociationMIStub(Simple_Identity_Management_OpenDRIM_IdentityInGroupProvider, Simple_Identity_Management_OpenDRIM_IdentityInGroupProvider, _broker, Simple_Identity_Management_OpenDRIM_IdentityInGroup_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/Makefile.am0000644000175000017500000000523611401066117031433 0ustar guillaumeguillaume################################################################################# # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################# providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSimple_Identity_Management_OpenDRIM_IdentityInGroupProvider.la libcmpiSimple_Identity_Management_OpenDRIM_IdentityInGroupProvider_la_SOURCES = OpenDRIM_IdentityInGroupAccess.cpp OpenDRIM_IdentityInGroupProvider.cpp cmpiOpenDRIM_IdentityInGroup.cpp assocOpenDRIM_IdentityInGroup.cpp # May have to be adjusted for direct invocation libcmpiSimple_Identity_Management_OpenDRIM_IdentityInGroupProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_Collection # Uncomment the end for direct invocation, may have to be adjusted libcmpiSimple_Identity_Management_OpenDRIM_IdentityInGroupProvider_la_LIBADD = ../Common/libcmpiSimple_Identity_Management_Common.la #../CIM_ManagedElement/libcmpiSimple_Identity_Management_CIM_ManagedElementProvider.la ../CIM_Collection/libcmpiSimple_Identity_Management_CIM_CollectionProvider.la libcmpiSimple_Identity_Management_OpenDRIM_IdentityInGroupProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_IdentityInGroup.h OpenDRIM_IdentityInGroup.h OpenDRIM_IdentityInGroupAccess.h ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/assocOpenDRIM_IdentityInGroup.cppopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/assocOpenDRIM_IdentityInGro0000644000175000017500000002161511401066117034537 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #include "assocOpenDRIM_IdentityInGroup.h" int Simple_Identity_Management_OpenDRIM_IdentityInGroup_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 = Simple_Identity_Management_OpenDRIM_IdentityInGroup_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, "Member") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Collection") != 0) return OK; CF_assert(Simple_Identity_Management_OpenDRIM_IdentityInGroup_associatorMemberToCollection(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "Collection") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Member") != 0) return OK; CF_assert(Simple_Identity_Management_OpenDRIM_IdentityInGroup_associatorCollectionToMember(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_enumerateMembers(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, Member_NAMESPACE, Member_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_getMember(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Member_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Member_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; Simple_Identity_Management_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_enumerateCollections(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, Collection_NAMESPACE, Collection_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(Simple_Identity_Management_CIM_Collection_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(Simple_Identity_Management_CIM_Collection_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, Simple_Identity_Management_CIM_Collection_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int Simple_Identity_Management_OpenDRIM_IdentityInGroup_getCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Collection_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Collection_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_Collection _instance; Simple_Identity_Management_CIM_Collection_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(Simple_Identity_Management_CIM_Collection_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, Simple_Identity_Management_CIM_Collection_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/cmpiOpenDRIM_IdentityInGroup.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/cmpiOpenDRIM_IdentityInGrou0000644000175000017500000000455011401066117034543 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef CMPIOPENDRIM_IDENTITYINGROUP_H_ #define CMPIOPENDRIM_IDENTITYINGROUP_H_ #include "OpenDRIM_IdentityInGroup.h" CMPIObjectPath* Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_IdentityInGroup& instance); CMPIInstance* Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_IdentityInGroup& instance); void Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_IdentityInGroup& instance); void Simple_Identity_Management_OpenDRIM_IdentityInGroup_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_IdentityInGroup& instance); #endif /*CMPIOPENDRIM_IDENTITYINGROUP_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/OpenDRIM_IdentityInGroup.h0000644000175000017500000000737611401066117034311 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_IDENTITYINGROUP_H_ #define OPENDRIM_IDENTITYINGROUP_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" #include "cmpiCIM_Collection.h" #include "CIM_CollectionAccess.h" */ const static char* OpenDRIM_IdentityInGroup_classnames[] = {"OpenDRIM_IdentityInGroup"}; static string OpenDRIM_IdentityInGroup_NAMESPACE = _NAMESPACE; const static string Member_role = "Member"; const static char* Member_classnames[] = {"OpenDRIM_AccountIdentity"}; const static string Member_NAMESPACE = _NAMESPACE; const static string Collection_role = "Collection"; const static char* Collection_classnames[] = {"OpenDRIM_Group"}; const static string Collection_NAMESPACE = _NAMESPACE; class OpenDRIM_IdentityInGroup { public: Objectpath Collection; bool Collection_isNULL; Objectpath Member; bool Member_isNULL; bool IsPrimaryGroup; bool IsPrimaryGroup_isNULL; OpenDRIM_IdentityInGroup() { Collection_isNULL = true; Member_isNULL = true; IsPrimaryGroup_isNULL = true; } ~OpenDRIM_IdentityInGroup() {} string getKeys() const { return CF_toLowCase(".Collection=\"" + CF_quoteString(Collection.toString()) + "\""".Member=\"" + CF_quoteString(Member.toString()) + "\""); } int getCollection(Objectpath& value) const { if (Collection_isNULL==true) return NOT_FOUND; value = Collection; return OK; } int setCollection(const Objectpath& newValue) { Collection = newValue; Collection.setNamespace(Collection_NAMESPACE); Collection_isNULL = false; return OK; } int getMember(Objectpath& value) const { if (Member_isNULL==true) return NOT_FOUND; value = Member; return OK; } int setMember(const Objectpath& newValue) { Member = newValue; Member.setNamespace(Member_NAMESPACE); Member_isNULL = false; return OK; } int getIsPrimaryGroup(bool& value) const { if (IsPrimaryGroup_isNULL==true) return NOT_FOUND; value = IsPrimaryGroup; return OK; } int setIsPrimaryGroup(const bool& newValue) { IsPrimaryGroup = newValue; IsPrimaryGroup_isNULL = false; return OK; } }; #endif /*OPENDRIM_IDENTITYINGROUP_H_*/ ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/assocOpenDRIM_IdentityInGroup.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/assocOpenDRIM_IdentityInGro0000644000175000017500000000646411401066117034544 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef ASSOCOPENDRIM_IDENTITYINGROUP_H_ #define ASSOCOPENDRIM_IDENTITYINGROUP_H_ #include "OpenDRIM_IdentityInGroupAccess.h" int Simple_Identity_Management_OpenDRIM_IdentityInGroup_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 Simple_Identity_Management_OpenDRIM_IdentityInGroup_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 Simple_Identity_Management_OpenDRIM_IdentityInGroup_enumerateMembers(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_getMember(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_enumerateCollections(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_getCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_IDENTITYINGROUP_H_*/ ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/OpenDRIM_IdentityInGroupAccess.hopendrim-lmp-simpleidentitymanagement-1.0.0~ppa/OpenDRIM_IdentityInGroup/OpenDRIM_IdentityInGroupAcc0000644000175000017500000001076511401066117034466 0ustar guillaumeguillaume/*################################################################################ # Linux Management Providers (LMP), Simple Identity Management provider package # Copyright (C) 2007 Frederic Desmons, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Khahramon NURIDDINOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################*/ #ifndef OPENDRIM_IDENTITYINGROUPACCESS_H_ #define OPENDRIM_IDENTITYINGROUPACCESS_H_ #include "Simple_Identity_Management_Common.h" #include "OpenDRIM_IdentityInGroup.h" #include "assocOpenDRIM_IdentityInGroup.h" int Simple_Identity_Management_OpenDRIM_IdentityInGroup_load(const CMPIBroker* broker, string& errorMessage); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_unload(string& errorMessage); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_IdentityInGroup& instance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_IdentityInGroup& newInstance, const OpenDRIM_IdentityInGroup& oldInstance, const char** properties, string& errorMessage); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_IdentityInGroup& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_IdentityInGroup& instance, string& errorMessage); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_associatorMemberToCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Member_instance, const char** properties, vector& Collection_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_associatorCollectionToMember(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Collection_instance, const char** properties, vector& Member_associatedInstances, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_referenceMemberToCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Member_instance, const vector& Collection_instances, vector& OpenDRIM_IdentityInGroup_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_referenceCollectionToMember(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Collection_instance, const vector& Member_instances, vector& OpenDRIM_IdentityInGroup_instances, const char** properties, string& errorMessage, const string& discriminant); int Simple_Identity_Management_OpenDRIM_IdentityInGroup_populate(OpenDRIM_IdentityInGroup& instance, string& errorMessage); #endif /*OPENDRIM_IDENTITYINGROUPACCESS_H_*/ opendrim-lmp-simpleidentitymanagement-1.0.0~ppa/README0000644000175000017500000000110311401066117023512 0ustar guillaumeguillaume--------------------------------------------------------- REQUIREMENTS --------------------------------------------------------- For compliling: * gcc >= 3.2.0 * cmpi header files >= ver 86 * autoconf >= 2.57 * automake >= 1.5 * libtool (preferably >= 1.8.5) * OpenDRIM Common Library >= 1.1.1 For running: * OpenPegasus >= 2.5.2 OR SBLIM sfcb >= 1.2.0 OR OpenWBEM >= 3.2.2 * Interop package (for sfcb and OpenPegasus only) * In the case of pegasus installed from sources, the PEGASUS_HOME and PEGASUS_ROOT variable MUST be defined! * OpenDRIM Base_Server Package >= 1.0.0