opendrim-lmp-physicalasset-0.1.2~ppa/0000755000175000017500000000000011404316552020421 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalFrame/0000755000175000017500000000000011377667226024625 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalFrame/OpenDRIM_PhysicalFrameAccess.cpp0000644000175000017500000000652511377667226032647 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_PhysicalFrameAccess.h" int PhysicalAsset_OpenDRIM_PhysicalFrame_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalFrame_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalFrame_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalFrame_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalFrame& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalFrame_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalFrame& newInstance, const OpenDRIM_PhysicalFrame& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalFrame_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalFrame& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalFrame_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalFrame& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalFrame_IsCompatible(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalFrame& instance, unsigned int& returnValue, const OpenDRIM_PhysicalFrame_IsCompatible_In& in, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalFrame_populate(OpenDRIM_PhysicalFrame& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalFrame/Makefile.am0000644000175000017500000000405611377667226026666 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_PhysicalFrameProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalFrameProvider_la_SOURCES = OpenDRIM_PhysicalFrameAccess.cpp OpenDRIM_PhysicalFrameProvider.cpp cmpiOpenDRIM_PhysicalFrame.cpp libcmpiPhysicalAsset_OpenDRIM_PhysicalFrameProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la libcmpiPhysicalAsset_OpenDRIM_PhysicalFrameProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_PhysicalFrame.h OpenDRIM_PhysicalFrame.h OpenDRIM_PhysicalFrameAccess.h opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalFrame/cmpiOpenDRIM_PhysicalFrame.h0000644000175000017500000000450211377667226032034 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_PHYSICALFRAME_H_ #define CMPIOPENDRIM_PHYSICALFRAME_H_ #include "OpenDRIM_PhysicalFrame.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalFrame_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalFrame& instance); CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalFrame_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalFrame& instance); void PhysicalAsset_OpenDRIM_PhysicalFrame_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalFrame& instance); void PhysicalAsset_OpenDRIM_PhysicalFrame_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalFrame& instance); void PhysicalAsset_OpenDRIM_PhysicalFrame_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_PhysicalFrame_IsCompatible_In& args); #endif /*CMPIOPENDRIM_PHYSICALFRAME_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalFrame/OpenDRIM_PhysicalFrame.h0000644000175000017500000004515711377667226031176 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALFRAME_H_ #define OPENDRIM_PHYSICALFRAME_H_ #include const static char* OpenDRIM_PhysicalFrame_classnames[] = {"OpenDRIM_PhysicalFrame"}; static string OpenDRIM_PhysicalFrame_NAMESPACE = _NAMESPACE; class OpenDRIM_PhysicalFrame { public: string Caption; bool Caption_isNULL; string InstallDate; bool InstallDate_isNULL; string Name; bool Name_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; string Tag; bool Tag_isNULL; string Description; bool Description_isNULL; string CreationClassName; bool CreationClassName_isNULL; string ElementName; bool ElementName_isNULL; string Manufacturer; bool Manufacturer_isNULL; string Model; bool Model_isNULL; string SKU; bool SKU_isNULL; string SerialNumber; bool SerialNumber_isNULL; string Version; bool Version_isNULL; string PartNumber; bool PartNumber_isNULL; string OtherIdentifyingInfo; bool OtherIdentifyingInfo_isNULL; bool PoweredOn; bool PoweredOn_isNULL; string ManufactureDate; bool ManufactureDate_isNULL; string VendorEquipmentType; bool VendorEquipmentType_isNULL; string UserTracking; bool UserTracking_isNULL; bool CanBeFRUed; bool CanBeFRUed_isNULL; unsigned short RemovalConditions; bool RemovalConditions_isNULL; bool Removable; bool Removable_isNULL; bool Replaceable; bool Replaceable_isNULL; bool HotSwappable; bool HotSwappable_isNULL; float Height; bool Height_isNULL; float Depth; bool Depth_isNULL; float Width; bool Width_isNULL; float Weight; bool Weight_isNULL; unsigned short PackageType; bool PackageType_isNULL; string OtherPackageType; bool OtherPackageType_isNULL; vector VendorCompatibilityStrings; bool VendorCompatibilityStrings_isNULL; string CableManagementStrategy; bool CableManagementStrategy_isNULL; vector ServicePhilosophy; bool ServicePhilosophy_isNULL; vector ServiceDescriptions; bool ServiceDescriptions_isNULL; bool LockPresent; bool LockPresent_isNULL; bool AudibleAlarm; bool AudibleAlarm_isNULL; bool VisibleAlarm; bool VisibleAlarm_isNULL; unsigned short SecurityBreach; bool SecurityBreach_isNULL; string BreachDescription; bool BreachDescription_isNULL; bool IsLocked; bool IsLocked_isNULL; OpenDRIM_PhysicalFrame() { Caption_isNULL = true; InstallDate_isNULL = true; Name_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; Tag_isNULL = true; Description_isNULL = true; CreationClassName_isNULL = true; ElementName_isNULL = true; Manufacturer_isNULL = true; Model_isNULL = true; SKU_isNULL = true; SerialNumber_isNULL = true; Version_isNULL = true; PartNumber_isNULL = true; OtherIdentifyingInfo_isNULL = true; PoweredOn_isNULL = true; ManufactureDate_isNULL = true; VendorEquipmentType_isNULL = true; UserTracking_isNULL = true; CanBeFRUed_isNULL = true; RemovalConditions_isNULL = true; Removable_isNULL = true; Replaceable_isNULL = true; HotSwappable_isNULL = true; Height_isNULL = true; Depth_isNULL = true; Width_isNULL = true; Weight_isNULL = true; PackageType_isNULL = true; OtherPackageType_isNULL = true; VendorCompatibilityStrings_isNULL = true; CableManagementStrategy_isNULL = true; ServicePhilosophy_isNULL = true; ServiceDescriptions_isNULL = true; LockPresent_isNULL = true; AudibleAlarm_isNULL = true; VisibleAlarm_isNULL = true; SecurityBreach_isNULL = true; BreachDescription_isNULL = true; IsLocked_isNULL = true; } ~OpenDRIM_PhysicalFrame() {} string getKeys() const { return CF_toLowCase(".Tag=\"" + CF_quoteString(Tag) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""); } 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 getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getTag(string& value) const { if (Tag_isNULL==true) return NOT_FOUND; value = Tag; return OK; } int setTag(const string& newValue) { Tag = newValue; Tag_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 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 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 getManufacturer(string& value) const { if (Manufacturer_isNULL==true) return NOT_FOUND; value = Manufacturer; return OK; } int setManufacturer(const string& newValue) { Manufacturer = newValue; Manufacturer_isNULL = false; return OK; } int getModel(string& value) const { if (Model_isNULL==true) return NOT_FOUND; value = Model; return OK; } int setModel(const string& newValue) { Model = newValue; Model_isNULL = false; return OK; } int getSKU(string& value) const { if (SKU_isNULL==true) return NOT_FOUND; value = SKU; return OK; } int setSKU(const string& newValue) { SKU = newValue; SKU_isNULL = false; return OK; } int getSerialNumber(string& value) const { if (SerialNumber_isNULL==true) return NOT_FOUND; value = SerialNumber; return OK; } int setSerialNumber(const string& newValue) { SerialNumber = newValue; SerialNumber_isNULL = false; return OK; } int getVersion(string& value) const { if (Version_isNULL==true) return NOT_FOUND; value = Version; return OK; } int setVersion(const string& newValue) { Version = newValue; Version_isNULL = false; return OK; } int getPartNumber(string& value) const { if (PartNumber_isNULL==true) return NOT_FOUND; value = PartNumber; return OK; } int setPartNumber(const string& newValue) { PartNumber = newValue; PartNumber_isNULL = false; return OK; } int getOtherIdentifyingInfo(string& value) const { if (OtherIdentifyingInfo_isNULL==true) return NOT_FOUND; value = OtherIdentifyingInfo; return OK; } int setOtherIdentifyingInfo(const string& newValue) { OtherIdentifyingInfo = newValue; OtherIdentifyingInfo_isNULL = false; return OK; } int getPoweredOn(bool& value) const { if (PoweredOn_isNULL==true) return NOT_FOUND; value = PoweredOn; return OK; } int setPoweredOn(const bool& newValue) { PoweredOn = newValue; PoweredOn_isNULL = false; return OK; } int getManufactureDate(string& value) const { if (ManufactureDate_isNULL==true) return NOT_FOUND; value = ManufactureDate; return OK; } int setManufactureDate(const string& newValue) { ManufactureDate = newValue; ManufactureDate_isNULL = false; return OK; } int getVendorEquipmentType(string& value) const { if (VendorEquipmentType_isNULL==true) return NOT_FOUND; value = VendorEquipmentType; return OK; } int setVendorEquipmentType(const string& newValue) { VendorEquipmentType = newValue; VendorEquipmentType_isNULL = false; return OK; } int getUserTracking(string& value) const { if (UserTracking_isNULL==true) return NOT_FOUND; value = UserTracking; return OK; } int setUserTracking(const string& newValue) { UserTracking = newValue; UserTracking_isNULL = false; return OK; } int getCanBeFRUed(bool& value) const { if (CanBeFRUed_isNULL==true) return NOT_FOUND; value = CanBeFRUed; return OK; } int setCanBeFRUed(const bool& newValue) { CanBeFRUed = newValue; CanBeFRUed_isNULL = false; return OK; } int getRemovalConditions(unsigned short& value) const { if (RemovalConditions_isNULL==true) return NOT_FOUND; value = RemovalConditions; return OK; } int setRemovalConditions(const unsigned short& newValue) { RemovalConditions = newValue; RemovalConditions_isNULL = false; return OK; } int getRemovable(bool& value) const { if (Removable_isNULL==true) return NOT_FOUND; value = Removable; return OK; } int setRemovable(const bool& newValue) { Removable = newValue; Removable_isNULL = false; return OK; } int getReplaceable(bool& value) const { if (Replaceable_isNULL==true) return NOT_FOUND; value = Replaceable; return OK; } int setReplaceable(const bool& newValue) { Replaceable = newValue; Replaceable_isNULL = false; return OK; } int getHotSwappable(bool& value) const { if (HotSwappable_isNULL==true) return NOT_FOUND; value = HotSwappable; return OK; } int setHotSwappable(const bool& newValue) { HotSwappable = newValue; HotSwappable_isNULL = false; return OK; } int getHeight(float& value) const { if (Height_isNULL==true) return NOT_FOUND; value = Height; return OK; } int setHeight(const float& newValue) { Height = newValue; Height_isNULL = false; return OK; } int getDepth(float& value) const { if (Depth_isNULL==true) return NOT_FOUND; value = Depth; return OK; } int setDepth(const float& newValue) { Depth = newValue; Depth_isNULL = false; return OK; } int getWidth(float& value) const { if (Width_isNULL==true) return NOT_FOUND; value = Width; return OK; } int setWidth(const float& newValue) { Width = newValue; Width_isNULL = false; return OK; } int getWeight(float& value) const { if (Weight_isNULL==true) return NOT_FOUND; value = Weight; return OK; } int setWeight(const float& newValue) { Weight = newValue; Weight_isNULL = false; return OK; } int getPackageType(unsigned short& value) const { if (PackageType_isNULL==true) return NOT_FOUND; value = PackageType; return OK; } int setPackageType(const unsigned short& newValue) { PackageType = newValue; PackageType_isNULL = false; return OK; } int getOtherPackageType(string& value) const { if (OtherPackageType_isNULL==true) return NOT_FOUND; value = OtherPackageType; return OK; } int setOtherPackageType(const string& newValue) { OtherPackageType = newValue; OtherPackageType_isNULL = false; return OK; } int getVendorCompatibilityStrings(vector& value) const { if (VendorCompatibilityStrings_isNULL==true) return NOT_FOUND; value = VendorCompatibilityStrings; return OK; } int setVendorCompatibilityStrings(const vector& newValue) { VendorCompatibilityStrings = newValue; VendorCompatibilityStrings_isNULL = false; return OK; } int getCableManagementStrategy(string& value) const { if (CableManagementStrategy_isNULL==true) return NOT_FOUND; value = CableManagementStrategy; return OK; } int setCableManagementStrategy(const string& newValue) { CableManagementStrategy = newValue; CableManagementStrategy_isNULL = false; return OK; } int getServicePhilosophy(vector& value) const { if (ServicePhilosophy_isNULL==true) return NOT_FOUND; value = ServicePhilosophy; return OK; } int setServicePhilosophy(const vector& newValue) { ServicePhilosophy = newValue; ServicePhilosophy_isNULL = false; return OK; } int getServiceDescriptions(vector& value) const { if (ServiceDescriptions_isNULL==true) return NOT_FOUND; value = ServiceDescriptions; return OK; } int setServiceDescriptions(const vector& newValue) { ServiceDescriptions = newValue; ServiceDescriptions_isNULL = false; return OK; } int getLockPresent(bool& value) const { if (LockPresent_isNULL==true) return NOT_FOUND; value = LockPresent; return OK; } int setLockPresent(const bool& newValue) { LockPresent = newValue; LockPresent_isNULL = false; return OK; } int getAudibleAlarm(bool& value) const { if (AudibleAlarm_isNULL==true) return NOT_FOUND; value = AudibleAlarm; return OK; } int setAudibleAlarm(const bool& newValue) { AudibleAlarm = newValue; AudibleAlarm_isNULL = false; return OK; } int getVisibleAlarm(bool& value) const { if (VisibleAlarm_isNULL==true) return NOT_FOUND; value = VisibleAlarm; return OK; } int setVisibleAlarm(const bool& newValue) { VisibleAlarm = newValue; VisibleAlarm_isNULL = false; return OK; } int getSecurityBreach(unsigned short& value) const { if (SecurityBreach_isNULL==true) return NOT_FOUND; value = SecurityBreach; return OK; } int setSecurityBreach(const unsigned short& newValue) { SecurityBreach = newValue; SecurityBreach_isNULL = false; return OK; } int getBreachDescription(string& value) const { if (BreachDescription_isNULL==true) return NOT_FOUND; value = BreachDescription; return OK; } int setBreachDescription(const string& newValue) { BreachDescription = newValue; BreachDescription_isNULL = false; return OK; } int getIsLocked(bool& value) const { if (IsLocked_isNULL==true) return NOT_FOUND; value = IsLocked; return OK; } int setIsLocked(const bool& newValue) { IsLocked = newValue; IsLocked_isNULL = false; return OK; } }; class OpenDRIM_PhysicalFrame_IsCompatible_In { public: Objectpath ElementToCheck; bool ElementToCheck_isNULL; OpenDRIM_PhysicalFrame_IsCompatible_In() { ElementToCheck_isNULL = true; } ~OpenDRIM_PhysicalFrame_IsCompatible_In() {} int getElementToCheck(Objectpath& value) const { if (ElementToCheck_isNULL == true) return NOT_FOUND; value = ElementToCheck; return OK; } int setElementToCheck(const Objectpath& newValue) { ElementToCheck = newValue; ElementToCheck_isNULL = false; return OK; } }; #endif /*OPENDRIM_PHYSICALFRAME_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalFrame/cmpiOpenDRIM_PhysicalFrame.cpp0000644000175000017500000003061711377667226032375 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalFrame.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalFrame_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalFrame& instance) { _E_; Objectpath op(broker, OpenDRIM_PhysicalFrame_classnames[0], OpenDRIM_PhysicalFrame_NAMESPACE); if (!instance.Tag_isNULL) op.addKey("Tag", instance.Tag); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalFrame_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalFrame& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_PhysicalFrame_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.Name_isNULL) ci.setProperty("Name", instance.Name); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.Manufacturer_isNULL) ci.setProperty("Manufacturer", instance.Manufacturer); if (!instance.Model_isNULL) ci.setProperty("Model", instance.Model); if (!instance.SKU_isNULL) ci.setProperty("SKU", instance.SKU); if (!instance.SerialNumber_isNULL) ci.setProperty("SerialNumber", instance.SerialNumber); if (!instance.Version_isNULL) ci.setProperty("Version", instance.Version); if (!instance.PartNumber_isNULL) ci.setProperty("PartNumber", instance.PartNumber); if (!instance.OtherIdentifyingInfo_isNULL) ci.setProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo); if (!instance.PoweredOn_isNULL) ci.setProperty("PoweredOn", instance.PoweredOn); if (!instance.ManufactureDate_isNULL) ci.setPropertyDatetime("ManufactureDate", instance.ManufactureDate); if (!instance.VendorEquipmentType_isNULL) ci.setProperty("VendorEquipmentType", instance.VendorEquipmentType); if (!instance.UserTracking_isNULL) ci.setProperty("UserTracking", instance.UserTracking); if (!instance.CanBeFRUed_isNULL) ci.setProperty("CanBeFRUed", instance.CanBeFRUed); if (!instance.RemovalConditions_isNULL) ci.setProperty("RemovalConditions", instance.RemovalConditions); if (!instance.Removable_isNULL) ci.setProperty("Removable", instance.Removable); if (!instance.Replaceable_isNULL) ci.setProperty("Replaceable", instance.Replaceable); if (!instance.HotSwappable_isNULL) ci.setProperty("HotSwappable", instance.HotSwappable); if (!instance.Height_isNULL) ci.setProperty("Height", instance.Height); if (!instance.Depth_isNULL) ci.setProperty("Depth", instance.Depth); if (!instance.Width_isNULL) ci.setProperty("Width", instance.Width); if (!instance.Weight_isNULL) ci.setProperty("Weight", instance.Weight); if (!instance.PackageType_isNULL) ci.setProperty("PackageType", instance.PackageType); if (!instance.OtherPackageType_isNULL) ci.setProperty("OtherPackageType", instance.OtherPackageType); if (!instance.VendorCompatibilityStrings_isNULL) ci.setProperty("VendorCompatibilityStrings", instance.VendorCompatibilityStrings); if (!instance.CableManagementStrategy_isNULL) ci.setProperty("CableManagementStrategy", instance.CableManagementStrategy); if (!instance.ServicePhilosophy_isNULL) ci.setProperty("ServicePhilosophy", instance.ServicePhilosophy); if (!instance.ServiceDescriptions_isNULL) ci.setProperty("ServiceDescriptions", instance.ServiceDescriptions); if (!instance.LockPresent_isNULL) ci.setProperty("LockPresent", instance.LockPresent); if (!instance.AudibleAlarm_isNULL) ci.setProperty("AudibleAlarm", instance.AudibleAlarm); if (!instance.VisibleAlarm_isNULL) ci.setProperty("VisibleAlarm", instance.VisibleAlarm); if (!instance.SecurityBreach_isNULL) ci.setProperty("SecurityBreach", instance.SecurityBreach); if (!instance.BreachDescription_isNULL) ci.setProperty("BreachDescription", instance.BreachDescription); if (!instance.IsLocked_isNULL) ci.setProperty("IsLocked", instance.IsLocked); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_PhysicalFrame_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalFrame& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (op.getKey("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_PhysicalFrame_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalFrame& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("Manufacturer", instance.Manufacturer) == OK) instance.Manufacturer_isNULL = false; if (inst.getProperty("Model", instance.Model) == OK) instance.Model_isNULL = false; if (inst.getProperty("SKU", instance.SKU) == OK) instance.SKU_isNULL = false; if (inst.getProperty("SerialNumber", instance.SerialNumber) == OK) instance.SerialNumber_isNULL = false; if (inst.getProperty("Version", instance.Version) == OK) instance.Version_isNULL = false; if (inst.getProperty("PartNumber", instance.PartNumber) == OK) instance.PartNumber_isNULL = false; if (inst.getProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo) == OK) instance.OtherIdentifyingInfo_isNULL = false; if (inst.getProperty("PoweredOn", instance.PoweredOn) == OK) instance.PoweredOn_isNULL = false; if (inst.getPropertyDatetime("ManufactureDate", instance.ManufactureDate) == OK) instance.ManufactureDate_isNULL = false; if (inst.getProperty("VendorEquipmentType", instance.VendorEquipmentType) == OK) instance.VendorEquipmentType_isNULL = false; if (inst.getProperty("UserTracking", instance.UserTracking) == OK) instance.UserTracking_isNULL = false; if (inst.getProperty("CanBeFRUed", instance.CanBeFRUed) == OK) instance.CanBeFRUed_isNULL = false; if (inst.getProperty("RemovalConditions", instance.RemovalConditions) == OK) instance.RemovalConditions_isNULL = false; if (inst.getProperty("Removable", instance.Removable) == OK) instance.Removable_isNULL = false; if (inst.getProperty("Replaceable", instance.Replaceable) == OK) instance.Replaceable_isNULL = false; if (inst.getProperty("HotSwappable", instance.HotSwappable) == OK) instance.HotSwappable_isNULL = false; if (inst.getProperty("Height", instance.Height) == OK) instance.Height_isNULL = false; if (inst.getProperty("Depth", instance.Depth) == OK) instance.Depth_isNULL = false; if (inst.getProperty("Width", instance.Width) == OK) instance.Width_isNULL = false; if (inst.getProperty("Weight", instance.Weight) == OK) instance.Weight_isNULL = false; if (inst.getProperty("PackageType", instance.PackageType) == OK) instance.PackageType_isNULL = false; if (inst.getProperty("OtherPackageType", instance.OtherPackageType) == OK) instance.OtherPackageType_isNULL = false; if (inst.getProperty("VendorCompatibilityStrings", instance.VendorCompatibilityStrings) == OK) instance.VendorCompatibilityStrings_isNULL = false; if (inst.getProperty("CableManagementStrategy", instance.CableManagementStrategy) == OK) instance.CableManagementStrategy_isNULL = false; if (inst.getProperty("ServicePhilosophy", instance.ServicePhilosophy) == OK) instance.ServicePhilosophy_isNULL = false; if (inst.getProperty("ServiceDescriptions", instance.ServiceDescriptions) == OK) instance.ServiceDescriptions_isNULL = false; if (inst.getProperty("LockPresent", instance.LockPresent) == OK) instance.LockPresent_isNULL = false; if (inst.getProperty("AudibleAlarm", instance.AudibleAlarm) == OK) instance.AudibleAlarm_isNULL = false; if (inst.getProperty("VisibleAlarm", instance.VisibleAlarm) == OK) instance.VisibleAlarm_isNULL = false; if (inst.getProperty("SecurityBreach", instance.SecurityBreach) == OK) instance.SecurityBreach_isNULL = false; if (inst.getProperty("BreachDescription", instance.BreachDescription) == OK) instance.BreachDescription_isNULL = false; if (inst.getProperty("IsLocked", instance.IsLocked) == OK) instance.IsLocked_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_PhysicalFrame_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_PhysicalFrame_IsCompatible_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath ElementToCheck; data = in->ft->getArg(in, "ElementToCheck", &rc); if (rc.rc == OK) { CT_ToC(broker, data, ElementToCheck); args.setElementToCheck(ElementToCheck); } _L_; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalFrame/OpenDRIM_PhysicalFrameProvider.cpp0000644000175000017500000003264111377667226033236 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalFrame.h" #include "OpenDRIM_PhysicalFrameAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_PhysicalFrameProviderSetInstance PhysicalAsset_OpenDRIM_PhysicalFrameProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_PhysicalFrame_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_PhysicalFrame_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_PhysicalFrameProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalFrameProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalFrame_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalFrame_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalFrameProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_PhysicalFrame_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalFrame_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalFrame_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalFrameProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalFrame instance; PhysicalAsset_OpenDRIM_PhysicalFrame_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalFrame_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalFrame_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalFrameProviderSetInstance(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_PhysicalFrame newInstance, oldInstance; PhysicalAsset_OpenDRIM_PhysicalFrame_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_PhysicalFrame_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalFrame_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalFrame_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalFrameProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalFrame instance; PhysicalAsset_OpenDRIM_PhysicalFrame_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_PhysicalFrame_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalFrame_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalFrame_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_PhysicalFrame_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalFrameProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalFrame instance; PhysicalAsset_OpenDRIM_PhysicalFrame_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalFrame_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalFrame_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalFrameProviderExecQuery(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 PhysicalAsset_OpenDRIM_PhysicalFrameProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalFrameProviderInvokeMethod(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_PhysicalFrame instance; PhysicalAsset_OpenDRIM_PhysicalFrame_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"CreationClassName", "Tag"}; int errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalFrame_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="IsCompatible") { unsigned int returnValue; OpenDRIM_PhysicalFrame_IsCompatible_In inArgs; PhysicalAsset_OpenDRIM_PhysicalFrame_toCPP(_broker, in, inArgs); errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_IsCompatible(_broker, ctx, instance, returnValue, inArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalFrame_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_PhysicalFrame_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 PhysicalAsset_OpenDRIM_PhysicalFrame_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalFrame_init FAILED: " + (string) OpenDRIM_PhysicalFrame_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalFrame_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalFrame_unload FAILED: " + (string) OpenDRIM_PhysicalFrame_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_PhysicalFrame_INIT if (PhysicalAsset_OpenDRIM_PhysicalFrame_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_PhysicalFrameProvider, PhysicalAsset_OpenDRIM_PhysicalFrameProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalFrame_INIT); CMMethodMIStub(PhysicalAsset_OpenDRIM_PhysicalFrameProvider, PhysicalAsset_OpenDRIM_PhysicalFrameProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalFrame_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalFrame/OpenDRIM_PhysicalFrameAccess.h0000644000175000017500000000623611377667226032313 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALFRAMEACCESS_H_ #define OPENDRIM_PHYSICALFRAMEACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_PhysicalFrame.h" int PhysicalAsset_OpenDRIM_PhysicalFrame_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalFrame_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalFrame_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalFrame_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalFrame& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalFrame_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalFrame& newInstance, const OpenDRIM_PhysicalFrame& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalFrame_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalFrame& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalFrame_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalFrame& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalFrame_IsCompatible(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalFrame& instance, unsigned int& returnValue, const OpenDRIM_PhysicalFrame_IsCompatible_In& in, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalFrame_populate(OpenDRIM_PhysicalFrame& instance, string& errorMessage); #endif /*OPENDRIM_PHYSICALFRAMEACCESS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalMemory/0000755000175000017500000000000011377667226025043 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalMemory/cmpiOpenDRIM_PhysicalMemory.h0000644000175000017500000000430011377667226032464 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_PHYSICALMEMORY_H_ #define CMPIOPENDRIM_PHYSICALMEMORY_H_ #include "OpenDRIM_PhysicalMemory.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalMemory_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalMemory& instance); CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalMemory_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalMemory& instance); void PhysicalAsset_OpenDRIM_PhysicalMemory_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalMemory& instance); void PhysicalAsset_OpenDRIM_PhysicalMemory_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalMemory& instance); #endif /*CMPIOPENDRIM_PHYSICALMEMORY_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalMemory/Makefile.am0000644000175000017500000000407011377667226027100 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_PhysicalMemoryProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalMemoryProvider_la_SOURCES = OpenDRIM_PhysicalMemoryAccess.cpp OpenDRIM_PhysicalMemoryProvider.cpp cmpiOpenDRIM_PhysicalMemory.cpp libcmpiPhysicalAsset_OpenDRIM_PhysicalMemoryProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la libcmpiPhysicalAsset_OpenDRIM_PhysicalMemoryProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_PhysicalMemory.h OpenDRIM_PhysicalMemory.h OpenDRIM_PhysicalMemoryAccess.h opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalMemory/OpenDRIM_PhysicalMemory.h0000644000175000017500000003706411377667226031630 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALMEMORY_H_ #define OPENDRIM_PHYSICALMEMORY_H_ #include const static char* OpenDRIM_PhysicalMemory_classnames[] = {"OpenDRIM_PhysicalMemory"}; static string OpenDRIM_PhysicalMemory_NAMESPACE = _NAMESPACE; class OpenDRIM_PhysicalMemory { public: string Caption; bool Caption_isNULL; string InstallDate; bool InstallDate_isNULL; string Name; bool Name_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; string Tag; bool Tag_isNULL; string Description; bool Description_isNULL; string CreationClassName; bool CreationClassName_isNULL; string ElementName; bool ElementName_isNULL; string Manufacturer; bool Manufacturer_isNULL; string Model; bool Model_isNULL; string SKU; bool SKU_isNULL; string SerialNumber; bool SerialNumber_isNULL; string Version; bool Version_isNULL; string PartNumber; bool PartNumber_isNULL; string OtherIdentifyingInfo; bool OtherIdentifyingInfo_isNULL; bool PoweredOn; bool PoweredOn_isNULL; string ManufactureDate; bool ManufactureDate_isNULL; string VendorEquipmentType; bool VendorEquipmentType_isNULL; string UserTracking; bool UserTracking_isNULL; bool CanBeFRUed; bool CanBeFRUed_isNULL; unsigned short RemovalConditions; bool RemovalConditions_isNULL; bool Removable; bool Removable_isNULL; bool Replaceable; bool Replaceable_isNULL; bool HotSwappable; bool HotSwappable_isNULL; unsigned short FormFactor; bool FormFactor_isNULL; unsigned short MemoryType; bool MemoryType_isNULL; unsigned short TotalWidth; bool TotalWidth_isNULL; unsigned short DataWidth; bool DataWidth_isNULL; unsigned int Speed; bool Speed_isNULL; unsigned long long Capacity; bool Capacity_isNULL; string BankLabel; bool BankLabel_isNULL; unsigned int PositionInRow; bool PositionInRow_isNULL; unsigned int InterleavePosition; bool InterleavePosition_isNULL; OpenDRIM_PhysicalMemory() { Caption_isNULL = true; InstallDate_isNULL = true; Name_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; Tag_isNULL = true; Description_isNULL = true; CreationClassName_isNULL = true; ElementName_isNULL = true; Manufacturer_isNULL = true; Model_isNULL = true; SKU_isNULL = true; SerialNumber_isNULL = true; Version_isNULL = true; PartNumber_isNULL = true; OtherIdentifyingInfo_isNULL = true; PoweredOn_isNULL = true; ManufactureDate_isNULL = true; VendorEquipmentType_isNULL = true; UserTracking_isNULL = true; CanBeFRUed_isNULL = true; RemovalConditions_isNULL = true; Removable_isNULL = true; Replaceable_isNULL = true; HotSwappable_isNULL = true; FormFactor_isNULL = true; MemoryType_isNULL = true; TotalWidth_isNULL = true; DataWidth_isNULL = true; Speed_isNULL = true; Capacity_isNULL = true; BankLabel_isNULL = true; PositionInRow_isNULL = true; InterleavePosition_isNULL = true; } ~OpenDRIM_PhysicalMemory() {} string getKeys() const { return CF_toLowCase(".Tag=\"" + CF_quoteString(Tag) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""); } 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 getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getTag(string& value) const { if (Tag_isNULL==true) return NOT_FOUND; value = Tag; return OK; } int setTag(const string& newValue) { Tag = newValue; Tag_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 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 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 getManufacturer(string& value) const { if (Manufacturer_isNULL==true) return NOT_FOUND; value = Manufacturer; return OK; } int setManufacturer(const string& newValue) { Manufacturer = newValue; Manufacturer_isNULL = false; return OK; } int getModel(string& value) const { if (Model_isNULL==true) return NOT_FOUND; value = Model; return OK; } int setModel(const string& newValue) { Model = newValue; Model_isNULL = false; return OK; } int getSKU(string& value) const { if (SKU_isNULL==true) return NOT_FOUND; value = SKU; return OK; } int setSKU(const string& newValue) { SKU = newValue; SKU_isNULL = false; return OK; } int getSerialNumber(string& value) const { if (SerialNumber_isNULL==true) return NOT_FOUND; value = SerialNumber; return OK; } int setSerialNumber(const string& newValue) { SerialNumber = newValue; SerialNumber_isNULL = false; return OK; } int getVersion(string& value) const { if (Version_isNULL==true) return NOT_FOUND; value = Version; return OK; } int setVersion(const string& newValue) { Version = newValue; Version_isNULL = false; return OK; } int getPartNumber(string& value) const { if (PartNumber_isNULL==true) return NOT_FOUND; value = PartNumber; return OK; } int setPartNumber(const string& newValue) { PartNumber = newValue; PartNumber_isNULL = false; return OK; } int getOtherIdentifyingInfo(string& value) const { if (OtherIdentifyingInfo_isNULL==true) return NOT_FOUND; value = OtherIdentifyingInfo; return OK; } int setOtherIdentifyingInfo(const string& newValue) { OtherIdentifyingInfo = newValue; OtherIdentifyingInfo_isNULL = false; return OK; } int getPoweredOn(bool& value) const { if (PoweredOn_isNULL==true) return NOT_FOUND; value = PoweredOn; return OK; } int setPoweredOn(const bool& newValue) { PoweredOn = newValue; PoweredOn_isNULL = false; return OK; } int getManufactureDate(string& value) const { if (ManufactureDate_isNULL==true) return NOT_FOUND; value = ManufactureDate; return OK; } int setManufactureDate(const string& newValue) { ManufactureDate = newValue; ManufactureDate_isNULL = false; return OK; } int getVendorEquipmentType(string& value) const { if (VendorEquipmentType_isNULL==true) return NOT_FOUND; value = VendorEquipmentType; return OK; } int setVendorEquipmentType(const string& newValue) { VendorEquipmentType = newValue; VendorEquipmentType_isNULL = false; return OK; } int getUserTracking(string& value) const { if (UserTracking_isNULL==true) return NOT_FOUND; value = UserTracking; return OK; } int setUserTracking(const string& newValue) { UserTracking = newValue; UserTracking_isNULL = false; return OK; } int getCanBeFRUed(bool& value) const { if (CanBeFRUed_isNULL==true) return NOT_FOUND; value = CanBeFRUed; return OK; } int setCanBeFRUed(const bool& newValue) { CanBeFRUed = newValue; CanBeFRUed_isNULL = false; return OK; } int getRemovalConditions(unsigned short& value) const { if (RemovalConditions_isNULL==true) return NOT_FOUND; value = RemovalConditions; return OK; } int setRemovalConditions(const unsigned short& newValue) { RemovalConditions = newValue; RemovalConditions_isNULL = false; return OK; } int getRemovable(bool& value) const { if (Removable_isNULL==true) return NOT_FOUND; value = Removable; return OK; } int setRemovable(const bool& newValue) { Removable = newValue; Removable_isNULL = false; return OK; } int getReplaceable(bool& value) const { if (Replaceable_isNULL==true) return NOT_FOUND; value = Replaceable; return OK; } int setReplaceable(const bool& newValue) { Replaceable = newValue; Replaceable_isNULL = false; return OK; } int getHotSwappable(bool& value) const { if (HotSwappable_isNULL==true) return NOT_FOUND; value = HotSwappable; return OK; } int setHotSwappable(const bool& newValue) { HotSwappable = newValue; HotSwappable_isNULL = false; return OK; } int getFormFactor(unsigned short& value) const { if (FormFactor_isNULL==true) return NOT_FOUND; value = FormFactor; return OK; } int setFormFactor(const unsigned short& newValue) { FormFactor = newValue; FormFactor_isNULL = false; return OK; } int getMemoryType(unsigned short& value) const { if (MemoryType_isNULL==true) return NOT_FOUND; value = MemoryType; return OK; } int setMemoryType(const unsigned short& newValue) { MemoryType = newValue; MemoryType_isNULL = false; return OK; } int getTotalWidth(unsigned short& value) const { if (TotalWidth_isNULL==true) return NOT_FOUND; value = TotalWidth; return OK; } int setTotalWidth(const unsigned short& newValue) { TotalWidth = newValue; TotalWidth_isNULL = false; return OK; } int getDataWidth(unsigned short& value) const { if (DataWidth_isNULL==true) return NOT_FOUND; value = DataWidth; return OK; } int setDataWidth(const unsigned short& newValue) { DataWidth = newValue; DataWidth_isNULL = false; return OK; } int getSpeed(unsigned int& value) const { if (Speed_isNULL==true) return NOT_FOUND; value = Speed; return OK; } int setSpeed(const unsigned int& newValue) { Speed = newValue; Speed_isNULL = false; return OK; } int getCapacity(unsigned long long& value) const { if (Capacity_isNULL==true) return NOT_FOUND; value = Capacity; return OK; } int setCapacity(const unsigned long long& newValue) { Capacity = newValue; Capacity_isNULL = false; return OK; } int getBankLabel(string& value) const { if (BankLabel_isNULL==true) return NOT_FOUND; value = BankLabel; return OK; } int setBankLabel(const string& newValue) { BankLabel = newValue; BankLabel_isNULL = false; return OK; } int getPositionInRow(unsigned int& value) const { if (PositionInRow_isNULL==true) return NOT_FOUND; value = PositionInRow; return OK; } int setPositionInRow(const unsigned int& newValue) { PositionInRow = newValue; PositionInRow_isNULL = false; return OK; } int getInterleavePosition(unsigned int& value) const { if (InterleavePosition_isNULL==true) return NOT_FOUND; value = InterleavePosition; return OK; } int setInterleavePosition(const unsigned int& newValue) { InterleavePosition = newValue; InterleavePosition_isNULL = false; return OK; } }; #endif /*OPENDRIM_PHYSICALMEMORY_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalMemory/OpenDRIM_PhysicalMemoryAccess.h0000644000175000017500000000567411377667226032754 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALMEMORYACCESS_H_ #define OPENDRIM_PHYSICALMEMORYACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_PhysicalMemory.h" int PhysicalAsset_OpenDRIM_PhysicalMemory_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalMemory_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalMemory_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalMemory_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalMemory& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalMemory_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalMemory& newInstance, const OpenDRIM_PhysicalMemory& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalMemory_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalMemory& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalMemory_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalMemory& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalMemory_populate(OpenDRIM_PhysicalMemory& instance, string& errorMessage); #endif /*OPENDRIM_PHYSICALMEMORYACCESS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalMemory/OpenDRIM_PhysicalMemoryProvider.cpp0000644000175000017500000002562511377667226033676 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalMemory.h" #include "OpenDRIM_PhysicalMemoryAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_PhysicalMemoryProviderSetInstance PhysicalAsset_OpenDRIM_PhysicalMemoryProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_PhysicalMemory_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_PhysicalMemory_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_PhysicalMemoryProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalMemory_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalMemoryProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalMemory_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalMemory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalMemory_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalMemoryProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_PhysicalMemory_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalMemory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalMemory_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalMemoryProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalMemory instance; PhysicalAsset_OpenDRIM_PhysicalMemory_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalMemory_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalMemory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalMemory_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalMemoryProviderSetInstance(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_PhysicalMemory newInstance, oldInstance; PhysicalAsset_OpenDRIM_PhysicalMemory_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_PhysicalMemory_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalMemory_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalMemory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalMemory_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalMemory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalMemoryProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalMemory instance; PhysicalAsset_OpenDRIM_PhysicalMemory_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalMemory_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_PhysicalMemory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalMemory_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalMemory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalMemory_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalMemory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_PhysicalMemory_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalMemoryProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalMemory instance; PhysicalAsset_OpenDRIM_PhysicalMemory_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalMemory_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalMemory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalMemory_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalMemory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalMemoryProviderExecQuery(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 PhysicalAsset_OpenDRIM_PhysicalMemory_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalMemory_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalMemory_init FAILED: " + (string) OpenDRIM_PhysicalMemory_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalMemory_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalMemory_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalMemory_unload FAILED: " + (string) OpenDRIM_PhysicalMemory_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_PhysicalMemory_INIT if (PhysicalAsset_OpenDRIM_PhysicalMemory_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_PhysicalMemoryProvider, PhysicalAsset_OpenDRIM_PhysicalMemoryProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalMemory_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalMemory/OpenDRIM_PhysicalMemoryAccess.cpp0000644000175000017500000000611411377667226033275 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_PhysicalMemoryAccess.h" int PhysicalAsset_OpenDRIM_PhysicalMemory_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalMemory_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalMemory_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalMemory_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalMemory& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalMemory_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalMemory& newInstance, const OpenDRIM_PhysicalMemory& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalMemory_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalMemory& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalMemory_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalMemory& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalMemory_populate(OpenDRIM_PhysicalMemory& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalMemory/cmpiOpenDRIM_PhysicalMemory.cpp0000644000175000017500000002472311377667226033032 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalMemory.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalMemory_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalMemory& instance) { _E_; Objectpath op(broker, OpenDRIM_PhysicalMemory_classnames[0], OpenDRIM_PhysicalMemory_NAMESPACE); if (!instance.Tag_isNULL) op.addKey("Tag", instance.Tag); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalMemory_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalMemory& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_PhysicalMemory_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.Name_isNULL) ci.setProperty("Name", instance.Name); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.Manufacturer_isNULL) ci.setProperty("Manufacturer", instance.Manufacturer); if (!instance.Model_isNULL) ci.setProperty("Model", instance.Model); if (!instance.SKU_isNULL) ci.setProperty("SKU", instance.SKU); if (!instance.SerialNumber_isNULL) ci.setProperty("SerialNumber", instance.SerialNumber); if (!instance.Version_isNULL) ci.setProperty("Version", instance.Version); if (!instance.PartNumber_isNULL) ci.setProperty("PartNumber", instance.PartNumber); if (!instance.OtherIdentifyingInfo_isNULL) ci.setProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo); if (!instance.PoweredOn_isNULL) ci.setProperty("PoweredOn", instance.PoweredOn); if (!instance.ManufactureDate_isNULL) ci.setPropertyDatetime("ManufactureDate", instance.ManufactureDate); if (!instance.VendorEquipmentType_isNULL) ci.setProperty("VendorEquipmentType", instance.VendorEquipmentType); if (!instance.UserTracking_isNULL) ci.setProperty("UserTracking", instance.UserTracking); if (!instance.CanBeFRUed_isNULL) ci.setProperty("CanBeFRUed", instance.CanBeFRUed); if (!instance.RemovalConditions_isNULL) ci.setProperty("RemovalConditions", instance.RemovalConditions); if (!instance.Removable_isNULL) ci.setProperty("Removable", instance.Removable); if (!instance.Replaceable_isNULL) ci.setProperty("Replaceable", instance.Replaceable); if (!instance.HotSwappable_isNULL) ci.setProperty("HotSwappable", instance.HotSwappable); if (!instance.FormFactor_isNULL) ci.setProperty("FormFactor", instance.FormFactor); if (!instance.MemoryType_isNULL) ci.setProperty("MemoryType", instance.MemoryType); if (!instance.TotalWidth_isNULL) ci.setProperty("TotalWidth", instance.TotalWidth); if (!instance.DataWidth_isNULL) ci.setProperty("DataWidth", instance.DataWidth); if (!instance.Speed_isNULL) ci.setProperty("Speed", instance.Speed); if (!instance.Capacity_isNULL) ci.setProperty("Capacity", instance.Capacity); if (!instance.BankLabel_isNULL) ci.setProperty("BankLabel", instance.BankLabel); if (!instance.PositionInRow_isNULL) ci.setProperty("PositionInRow", instance.PositionInRow); if (!instance.InterleavePosition_isNULL) ci.setProperty("InterleavePosition", instance.InterleavePosition); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_PhysicalMemory_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalMemory& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (op.getKey("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_PhysicalMemory_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalMemory& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("Manufacturer", instance.Manufacturer) == OK) instance.Manufacturer_isNULL = false; if (inst.getProperty("Model", instance.Model) == OK) instance.Model_isNULL = false; if (inst.getProperty("SKU", instance.SKU) == OK) instance.SKU_isNULL = false; if (inst.getProperty("SerialNumber", instance.SerialNumber) == OK) instance.SerialNumber_isNULL = false; if (inst.getProperty("Version", instance.Version) == OK) instance.Version_isNULL = false; if (inst.getProperty("PartNumber", instance.PartNumber) == OK) instance.PartNumber_isNULL = false; if (inst.getProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo) == OK) instance.OtherIdentifyingInfo_isNULL = false; if (inst.getProperty("PoweredOn", instance.PoweredOn) == OK) instance.PoweredOn_isNULL = false; if (inst.getPropertyDatetime("ManufactureDate", instance.ManufactureDate) == OK) instance.ManufactureDate_isNULL = false; if (inst.getProperty("VendorEquipmentType", instance.VendorEquipmentType) == OK) instance.VendorEquipmentType_isNULL = false; if (inst.getProperty("UserTracking", instance.UserTracking) == OK) instance.UserTracking_isNULL = false; if (inst.getProperty("CanBeFRUed", instance.CanBeFRUed) == OK) instance.CanBeFRUed_isNULL = false; if (inst.getProperty("RemovalConditions", instance.RemovalConditions) == OK) instance.RemovalConditions_isNULL = false; if (inst.getProperty("Removable", instance.Removable) == OK) instance.Removable_isNULL = false; if (inst.getProperty("Replaceable", instance.Replaceable) == OK) instance.Replaceable_isNULL = false; if (inst.getProperty("HotSwappable", instance.HotSwappable) == OK) instance.HotSwappable_isNULL = false; if (inst.getProperty("FormFactor", instance.FormFactor) == OK) instance.FormFactor_isNULL = false; if (inst.getProperty("MemoryType", instance.MemoryType) == OK) instance.MemoryType_isNULL = false; if (inst.getProperty("TotalWidth", instance.TotalWidth) == OK) instance.TotalWidth_isNULL = false; if (inst.getProperty("DataWidth", instance.DataWidth) == OK) instance.DataWidth_isNULL = false; if (inst.getProperty("Speed", instance.Speed) == OK) instance.Speed_isNULL = false; if (inst.getProperty("Capacity", instance.Capacity) == OK) instance.Capacity_isNULL = false; if (inst.getProperty("BankLabel", instance.BankLabel) == OK) instance.BankLabel_isNULL = false; if (inst.getProperty("PositionInRow", instance.PositionInRow) == OK) instance.PositionInRow_isNULL = false; if (inst.getProperty("InterleavePosition", instance.InterleavePosition) == OK) instance.InterleavePosition_isNULL = false; _L_; } opendrim-lmp-physicalasset-0.1.2~ppa/Makefile.am0000644000175000017500000001312411377667226022476 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ VENDOR = OpenDRIM VERSION = $(shell cat ./VERSION) APP_NAME = opendrim-lmp-physicalasset RPM_PACKAGE_DIR = packaging PLATFORM = $(shell rpm --eval %_target_cpu) WORKING_DIR = $(shell pwd) SUBDIRS = Common OpenDRIM_PhysicalComponent OpenDRIM_PhysicalFrame OpenDRIM_ConfigurationCapacity OpenDRIM_PhysicalPackage OpenDRIM_PhysicalMemory OpenDRIM_PhysicalAssetCapabilities OpenDRIM_Chip OpenDRIM_PhysicalAssetRegisteredProfile OpenDRIM_Chassis OpenDRIM_PhysicalConnector OpenDRIM_Rack OpenDRIM_Card OpenDRIM_Slot OpenDRIM_ConnectedTo OpenDRIM_ComputerSystemPackage OpenDRIM_Realizes OpenDRIM_PhysicalPackageCapacity OpenDRIM_PhysicalElementInConnector OpenDRIM_SystemPackaging OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement OpenDRIM_PhysicalAssetConformsToProfile OpenDRIM_PhysicalElementPackage test postinstall: registration/PhysicalAsset.sh @CIMNAMESPACE@ $(VENDOR) @CIMSERVER@ @INTEROPNAMESPACE@ $(VERSION) . preuninstall: registration/PhysicalAsset-remove.sh @CIMNAMESPACE@ @CIMSERVER@ @INTEROPNAMESPACE@ . test-OpenDRIM_PhysicalComponent: all make -C test test-OpenDRIM_PhysicalComponent test-OpenDRIM_ConnectedTo: all make -C test test-OpenDRIM_ConnectedTo test-OpenDRIM_PhysicalFrame: all make -C test test-OpenDRIM_PhysicalFrame test-OpenDRIM_ComputerSystemPackage: all make -C test test-OpenDRIM_ComputerSystemPackage test-OpenDRIM_Realizes: all make -C test test-OpenDRIM_Realizes test-OpenDRIM_PhysicalPackageCapacity: all make -C test test-OpenDRIM_PhysicalPackageCapacity test-OpenDRIM_ConfigurationCapacity: all make -C test test-OpenDRIM_ConfigurationCapacity test-OpenDRIM_PhysicalPackage: all make -C test test-OpenDRIM_PhysicalPackage test-OpenDRIM_PhysicalMemory: all make -C test test-OpenDRIM_PhysicalMemory test-OpenDRIM_PhysicalAssetCapabilities: all make -C test test-OpenDRIM_PhysicalAssetCapabilities test-OpenDRIM_PhysicalElementInConnector: all make -C test test-OpenDRIM_PhysicalElementInConnector test-OpenDRIM_SystemPackaging: all make -C test test-OpenDRIM_SystemPackaging test-OpenDRIM_Chip: all make -C test test-OpenDRIM_Chip test-OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement: all make -C test test-OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement test-OpenDRIM_PhysicalAssetRegisteredProfile: all make -C test test-OpenDRIM_PhysicalAssetRegisteredProfile test-OpenDRIM_Chassis: all make -C test test-OpenDRIM_Chassis test-OpenDRIM_PhysicalAssetConformsToProfile: all make -C test test-OpenDRIM_PhysicalAssetConformsToProfile test-OpenDRIM_PhysicalElementPackage: all make -C test test-OpenDRIM_PhysicalElementPackage test-OpenDRIM_PhysicalConnector: all make -C test test-OpenDRIM_PhysicalConnector test-OpenDRIM_Rack: all make -C test test-OpenDRIM_Rack test-OpenDRIM_Card: all make -C test test-OpenDRIM_Card test-OpenDRIM_Slot: all make -C test test-OpenDRIM_Slot 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-physicalasset-0.1.2~ppa/registration/0000755000175000017500000000000011377667226023153 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_ComputerSystemPackage-remove.sh0000755000175000017500000000641111377667226032723 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_ComputerSystemPackageModule cimprovider -r -m PhysicalAsset_OpenDRIM_ComputerSystemPackageModule 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_ComputerSystemPackage.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalPackage-remove.sh0000755000175000017500000000631011377667226031472 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_PhysicalPackageModule cimprovider -r -m PhysicalAsset_OpenDRIM_PhysicalPackageModule 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_PhysicalPackage.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalElementPackage-remove.sh0000755000175000017500000000642311377667226033011 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_PhysicalElementPackageModule cimprovider -r -m PhysicalAsset_OpenDRIM_PhysicalElementPackageModule 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_PhysicalElementPackage.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_Card.sh0000755000175000017500000000743011377667226026024 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_Card.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_Card provider module"; Name = "PhysicalAsset_OpenDRIM_CardModule"; Location = "cmpiPhysicalAsset_OpenDRIM_CardProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_Card provider"; Name = "PhysicalAsset_OpenDRIM_CardProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_CardModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_Card provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_CardModule"; ProviderName = "PhysicalAsset_OpenDRIM_CardProvider"; ClassName = "OpenDRIM_Card"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "InstallDate", "Name", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "Tag", "Description", "CreationClassName", "ElementName", "Manufacturer", "Model", "SKU", "SerialNumber", "Version", "PartNumber", "OtherIdentifyingInfo", "PoweredOn", "ManufactureDate", "VendorEquipmentType", "UserTracking", "CanBeFRUed", "RemovalConditions", "Removable", "Replaceable", "HotSwappable", "Height", "Depth", "Width", "Weight", "PackageType", "OtherPackageType", "VendorCompatibilityStrings", "HostingBoard", "SlotLayout", "RequiresDaughterBoard", "SpecialRequirements", "RequirementsDescription", "OperatingVoltages"}; SupportedMethods = {"IsCompatible", "ConnectorPower"}; CapabilityID = "PhysicalAsset_OpenDRIM_Card"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_Card.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/PhysicalAsset-remove.sh0000755000175000017500000000644711377667226027574 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then 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_Slot-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_Card-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_Rack-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_PhysicalConnector-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_PhysicalElementPackage-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_PhysicalAssetConformsToProfile-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_Chassis-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_PhysicalAssetRegisteredProfile-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_Chip-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_SystemPackaging-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_PhysicalElementInConnector-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_PhysicalAssetCapabilities-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_PhysicalMemory-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_PhysicalPackage-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_ConfigurationCapacity-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_PhysicalPackageCapacity-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_Realizes-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_ComputerSystemPackage-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_PhysicalFrame-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_ConnectedTo-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_PhysicalComponent-remove.sh $1 $2 $3 $4 if test "$2" = sfcb then /etc/init.d/sfcb start fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalFrame.sh0000755000175000017500000000773411377667226027711 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_PhysicalFrame.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_PhysicalFrame provider module"; Name = "PhysicalAsset_OpenDRIM_PhysicalFrameModule"; Location = "cmpiPhysicalAsset_OpenDRIM_PhysicalFrameProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_PhysicalFrame provider"; Name = "PhysicalAsset_OpenDRIM_PhysicalFrameProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalFrameModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_PhysicalFrame provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalFrameModule"; ProviderName = "PhysicalAsset_OpenDRIM_PhysicalFrameProvider"; ClassName = "OpenDRIM_PhysicalFrame"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "InstallDate", "Name", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "Tag", "Description", "CreationClassName", "ElementName", "Manufacturer", "Model", "SKU", "SerialNumber", "Version", "PartNumber", "OtherIdentifyingInfo", "PoweredOn", "ManufactureDate", "VendorEquipmentType", "UserTracking", "CanBeFRUed", "RemovalConditions", "Removable", "Replaceable", "HotSwappable", "Height", "Depth", "Width", "Weight", "PackageType", "OtherPackageType", "VendorCompatibilityStrings", "CableManagementStrategy", "ServicePhilosophy", "ServiceDescriptions", "LockPresent", "AudibleAlarm", "VisibleAlarm", "SecurityBreach", "BreachDescription", "IsLocked"}; SupportedMethods = {"IsCompatible"}; CapabilityID = "PhysicalAsset_OpenDRIM_PhysicalFrame"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_PhysicalFrame.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_ConnectedTo.sh0000755000175000017500000000627511377667226027366 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_ConnectedTo.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_ConnectedTo provider module"; Name = "PhysicalAsset_OpenDRIM_ConnectedToModule"; Location = "cmpiPhysicalAsset_OpenDRIM_ConnectedToProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_ConnectedTo provider"; Name = "PhysicalAsset_OpenDRIM_ConnectedToProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_ConnectedToModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_ConnectedTo provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_ConnectedToModule"; ProviderName = "PhysicalAsset_OpenDRIM_ConnectedToProvider"; ClassName = "OpenDRIM_ConnectedTo"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent"}; CapabilityID = "PhysicalAsset_OpenDRIM_ConnectedTo"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_ConnectedTo.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_Realizes-remove.sh0000755000175000017500000000620711377667226030225 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_RealizesModule cimprovider -r -m PhysicalAsset_OpenDRIM_RealizesModule 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_Realizes.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_Rack.sh0000755000175000017500000000752511377667226026040 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_Rack.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_Rack provider module"; Name = "PhysicalAsset_OpenDRIM_RackModule"; Location = "cmpiPhysicalAsset_OpenDRIM_RackProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_Rack provider"; Name = "PhysicalAsset_OpenDRIM_RackProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_RackModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_Rack provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_RackModule"; ProviderName = "PhysicalAsset_OpenDRIM_RackProvider"; ClassName = "OpenDRIM_Rack"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "InstallDate", "Name", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "Tag", "Description", "CreationClassName", "ElementName", "Manufacturer", "Model", "SKU", "SerialNumber", "Version", "PartNumber", "OtherIdentifyingInfo", "PoweredOn", "ManufactureDate", "VendorEquipmentType", "UserTracking", "CanBeFRUed", "RemovalConditions", "Removable", "Replaceable", "HotSwappable", "Depth", "Width", "Weight", "PackageType", "OtherPackageType", "VendorCompatibilityStrings", "CableManagementStrategy", "ServicePhilosophy", "ServiceDescriptions", "LockPresent", "AudibleAlarm", "VisibleAlarm", "SecurityBreach", "BreachDescription", "IsLocked", "Height", "TypeOfRack", "CountryDesignation"}; SupportedMethods = {"IsCompatible"}; CapabilityID = "PhysicalAsset_OpenDRIM_Rack"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_Rack.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalComponent-remove.sh0000755000175000017500000000632511377667226032107 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_PhysicalComponentModule cimprovider -r -m PhysicalAsset_OpenDRIM_PhysicalComponentModule 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_PhysicalComponent.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_SystemPackaging.sh0000755000175000017500000000641111377667226030242 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_SystemPackaging.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_SystemPackaging provider module"; Name = "PhysicalAsset_OpenDRIM_SystemPackagingModule"; Location = "cmpiPhysicalAsset_OpenDRIM_SystemPackagingProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_SystemPackaging provider"; Name = "PhysicalAsset_OpenDRIM_SystemPackagingProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_SystemPackagingModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_SystemPackaging provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_SystemPackagingModule"; ProviderName = "PhysicalAsset_OpenDRIM_SystemPackagingProvider"; ClassName = "OpenDRIM_SystemPackaging"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent"}; CapabilityID = "PhysicalAsset_OpenDRIM_SystemPackaging"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_SystemPackaging.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalAssetConformsToProfile-remove.sh0000755000175000017500000001047511377667226034560 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileModule cimprovider -r -m PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileModule 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_PhysicalAssetConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalAssetCapabilities.sh0000755000175000017500000000703511377667226032242 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_PhysicalAssetCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_PhysicalAssetCapabilities provider module"; Name = "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesModule"; Location = "cmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_PhysicalAssetCapabilities provider"; Name = "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_PhysicalAssetCapabilities provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesModule"; ProviderName = "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProvider"; ClassName = "OpenDRIM_PhysicalAssetCapabilities"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "InstanceID", "ElementName", "FRUInfoSupported"}; SupportedMethods = {"CreateGoalSettings"}; CapabilityID = "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_PhysicalAssetCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_Slot.sh0000755000175000017500000000761111377667226026075 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_Slot.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_Slot provider module"; Name = "PhysicalAsset_OpenDRIM_SlotModule"; Location = "cmpiPhysicalAsset_OpenDRIM_SlotProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_Slot provider"; Name = "PhysicalAsset_OpenDRIM_SlotProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_SlotModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_Slot provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_SlotModule"; ProviderName = "PhysicalAsset_OpenDRIM_SlotProvider"; ClassName = "OpenDRIM_Slot"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "InstallDate", "Name", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "Tag", "Description", "CreationClassName", "ElementName", "Manufacturer", "Model", "SKU", "SerialNumber", "Version", "PartNumber", "OtherIdentifyingInfo", "ManufactureDate", "VendorEquipmentType", "UserTracking", "CanBeFRUed", "ConnectorPinout", "OtherTypeDescription", "ConnectorGender", "ConnectorElectricalCharacteristics", "OtherElectricalCharacteristics", "NumPhysicalPins", "ConnectorLayout", "ConnectorDescription", "ConnectorType", "PoweredOn", "SupportsHotPlug", "HeightAllowed", "LengthAllowed", "MaxDataWidth", "VccMixedVoltageSupport", "VppMixedVoltageSupport", "ThermalRating", "SpecialPurpose", "PurposeDescription", "Number", "Powered", "OpenSwitch", "MaxLinkWidth", "VendorCompatibilityStrings"}; CapabilityID = "PhysicalAsset_OpenDRIM_Slot"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_Slot.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalConnector-remove.sh0000755000175000017500000000632511377667226032077 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_PhysicalConnectorModule cimprovider -r -m PhysicalAsset_OpenDRIM_PhysicalConnectorModule 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_PhysicalConnector.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_ConfigurationCapacity-remove.sh0000755000175000017500000000637511377667226032742 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_ConfigurationCapacityModule cimprovider -r -m PhysicalAsset_OpenDRIM_ConfigurationCapacityModule 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_ConfigurationCapacity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalAssetConformsToProfile.sh0000755000175000017500000000737111377667226033266 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_PhysicalAssetConformsToProfile.mof cimmof -aE -n $4 $6/mof/OpenDRIM_PhysicalAssetConformsToProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_PhysicalAssetConformsToProfile provider module"; Name = "PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileModule"; Location = "cmpiPhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_PhysicalAssetConformsToProfile provider"; Name = "PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_PhysicalAssetConformsToProfile provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileModule"; ProviderName = "PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProvider"; ClassName = "OpenDRIM_PhysicalAssetConformsToProfile"; ProviderType = {2, 3}; Namespaces = {"$1", "$4"}; SupportedProperties = {"ConformantStandard", "ManagedElement"}; CapabilityID = "PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_PhysicalAssetConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_ConnectedTo-remove.sh0000755000175000017500000000624511377667226030656 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_ConnectedToModule cimprovider -r -m PhysicalAsset_OpenDRIM_ConnectedToModule 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_ConnectedTo.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.shopendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElemen0000755000175000017500000000744411377667226034763 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement provider module"; Name = "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementModule"; Location = "cmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement provider"; Name = "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementModule"; ProviderName = "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider"; ClassName = "OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"ManagedElement", "Capabilities", "Characteristics"}; CapabilityID = "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalFrame-remove.sh0000755000175000017500000000626411377667226031201 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_PhysicalFrameModule cimprovider -r -m PhysicalAsset_OpenDRIM_PhysicalFrameModule 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_PhysicalFrame.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalAssetRegisteredProfile-remove.sh0000755000175000017500000000652711377667226034567 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileModule cimprovider -r -m PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileModule 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_PhysicalAssetRegisteredProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalElementPackage.sh0000755000175000017500000000666111377667226031522 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_PhysicalElementPackage.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_PhysicalElementPackage provider module"; Name = "PhysicalAsset_OpenDRIM_PhysicalElementPackageModule"; Location = "cmpiPhysicalAsset_OpenDRIM_PhysicalElementPackageProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_PhysicalElementPackage provider"; Name = "PhysicalAsset_OpenDRIM_PhysicalElementPackageProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalElementPackageModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_PhysicalElementPackage provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalElementPackageModule"; ProviderName = "PhysicalAsset_OpenDRIM_PhysicalElementPackageProvider"; ClassName = "OpenDRIM_PhysicalElementPackage"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"GroupComponent", "PartComponent", "LocationWithinContainer"}; CapabilityID = "PhysicalAsset_OpenDRIM_PhysicalElementPackage"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_PhysicalElementPackage.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalMemory-remove.sh0000755000175000017500000000626711377667226031422 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_PhysicalMemoryModule cimprovider -r -m PhysicalAsset_OpenDRIM_PhysicalMemoryModule 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_PhysicalMemory.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_Slot-remove.sh0000755000175000017500000000612311377667226027365 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_SlotModule cimprovider -r -m PhysicalAsset_OpenDRIM_SlotModule 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_Slot.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_Rack-remove.sh0000755000175000017500000000613211377667226027324 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_RackModule cimprovider -r -m PhysicalAsset_OpenDRIM_RackModule 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_Rack.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalComponent.sh0000755000175000017500000000735111377667226030614 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_PhysicalComponent.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_PhysicalComponent provider module"; Name = "PhysicalAsset_OpenDRIM_PhysicalComponentModule"; Location = "cmpiPhysicalAsset_OpenDRIM_PhysicalComponentProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_PhysicalComponent provider"; Name = "PhysicalAsset_OpenDRIM_PhysicalComponentProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalComponentModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_PhysicalComponent provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalComponentModule"; ProviderName = "PhysicalAsset_OpenDRIM_PhysicalComponentProvider"; ClassName = "OpenDRIM_PhysicalComponent"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "InstallDate", "Name", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "Tag", "Description", "CreationClassName", "ElementName", "Manufacturer", "Model", "SKU", "SerialNumber", "Version", "PartNumber", "OtherIdentifyingInfo", "PoweredOn", "ManufactureDate", "VendorEquipmentType", "UserTracking", "CanBeFRUed", "RemovalConditions", "Removable", "Replaceable", "HotSwappable"}; CapabilityID = "PhysicalAsset_OpenDRIM_PhysicalComponent"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_PhysicalComponent.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalPackageCapacity-remove.sh0000755000175000017500000000643511377667226033160 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_PhysicalPackageCapacityModule cimprovider -r -m PhysicalAsset_OpenDRIM_PhysicalPackageCapacityModule 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_PhysicalPackageCapacity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalElementInConnector-remove.sh0000755000175000017500000000647311377667226033704 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_PhysicalElementInConnectorModule cimprovider -r -m PhysicalAsset_OpenDRIM_PhysicalElementInConnectorModule 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_PhysicalElementInConnector.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/PhysicalAsset.sh0000755000175000017500000000642111377667226026271 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then 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_PhysicalComponent.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_ConnectedTo.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_PhysicalFrame.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_ComputerSystemPackage.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_Realizes.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_PhysicalPackageCapacity.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_ConfigurationCapacity.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_PhysicalPackage.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_PhysicalMemory.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_PhysicalAssetCapabilities.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_PhysicalElementInConnector.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_SystemPackaging.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_Chip.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_PhysicalAssetRegisteredProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_Chassis.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_PhysicalAssetConformsToProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_PhysicalElementPackage.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_PhysicalConnector.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_Rack.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_Card.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_Slot.sh $1 $2 $3 $4 $5 $6 if test "$3" = sfcb then /etc/init.d/sfcb start fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalMemory.sh0000755000175000017500000000746011377667226030123 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_PhysicalMemory.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_PhysicalMemory provider module"; Name = "PhysicalAsset_OpenDRIM_PhysicalMemoryModule"; Location = "cmpiPhysicalAsset_OpenDRIM_PhysicalMemoryProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_PhysicalMemory provider"; Name = "PhysicalAsset_OpenDRIM_PhysicalMemoryProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalMemoryModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_PhysicalMemory provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalMemoryModule"; ProviderName = "PhysicalAsset_OpenDRIM_PhysicalMemoryProvider"; ClassName = "OpenDRIM_PhysicalMemory"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "InstallDate", "Name", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "Tag", "Description", "CreationClassName", "ElementName", "Manufacturer", "Model", "SKU", "SerialNumber", "Version", "PartNumber", "OtherIdentifyingInfo", "PoweredOn", "ManufactureDate", "VendorEquipmentType", "UserTracking", "CanBeFRUed", "RemovalConditions", "Removable", "Replaceable", "HotSwappable", "FormFactor", "MemoryType", "TotalWidth", "DataWidth", "Speed", "Capacity", "BankLabel", "PositionInRow", "InterleavePosition"}; CapabilityID = "PhysicalAsset_OpenDRIM_PhysicalMemory"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_PhysicalMemory.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalPackage.sh0000755000175000017500000000753111377667226030205 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_PhysicalPackage.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_PhysicalPackage provider module"; Name = "PhysicalAsset_OpenDRIM_PhysicalPackageModule"; Location = "cmpiPhysicalAsset_OpenDRIM_PhysicalPackageProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_PhysicalPackage provider"; Name = "PhysicalAsset_OpenDRIM_PhysicalPackageProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalPackageModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_PhysicalPackage provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalPackageModule"; ProviderName = "PhysicalAsset_OpenDRIM_PhysicalPackageProvider"; ClassName = "OpenDRIM_PhysicalPackage"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "InstallDate", "Name", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "Tag", "Description", "CreationClassName", "ElementName", "Manufacturer", "Model", "SKU", "SerialNumber", "Version", "PartNumber", "OtherIdentifyingInfo", "PoweredOn", "ManufactureDate", "VendorEquipmentType", "UserTracking", "CanBeFRUed", "RemovalConditions", "Removable", "Replaceable", "HotSwappable", "Height", "Depth", "Width", "Weight", "PackageType", "OtherPackageType", "VendorCompatibilityStrings"}; SupportedMethods = {"IsCompatible"}; CapabilityID = "PhysicalAsset_OpenDRIM_PhysicalPackage"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_PhysicalPackage.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalElementInConnector.sh0000755000175000017500000000673211377667226032407 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_PhysicalElementInConnector.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_PhysicalElementInConnector provider module"; Name = "PhysicalAsset_OpenDRIM_PhysicalElementInConnectorModule"; Location = "cmpiPhysicalAsset_OpenDRIM_PhysicalElementInConnectorProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_PhysicalElementInConnector provider"; Name = "PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalElementInConnectorModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_PhysicalElementInConnector provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalElementInConnectorModule"; ProviderName = "PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProvider"; ClassName = "OpenDRIM_PhysicalElementInConnector"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent"}; CapabilityID = "PhysicalAsset_OpenDRIM_PhysicalElementInConnector"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_PhysicalElementInConnector.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_Chassis-remove.sh0000755000175000017500000000617011377667226030043 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_ChassisModule cimprovider -r -m PhysicalAsset_OpenDRIM_ChassisModule 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_Chassis.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_Chip-remove.sh0000755000175000017500000000612311377667226027327 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_ChipModule cimprovider -r -m PhysicalAsset_OpenDRIM_ChipModule 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_Chip.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_SystemPackaging-remove.sh0000755000175000017500000000631511377667226031540 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_SystemPackagingModule cimprovider -r -m PhysicalAsset_OpenDRIM_SystemPackagingModule 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_SystemPackaging.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_ConfigurationCapacity.sh0000755000175000017500000000677111377667226031447 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_ConfigurationCapacity.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_ConfigurationCapacity provider module"; Name = "PhysicalAsset_OpenDRIM_ConfigurationCapacityModule"; Location = "cmpiPhysicalAsset_OpenDRIM_ConfigurationCapacityProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_ConfigurationCapacity provider"; Name = "PhysicalAsset_OpenDRIM_ConfigurationCapacityProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_ConfigurationCapacityModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_ConfigurationCapacity provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_ConfigurationCapacityModule"; ProviderName = "PhysicalAsset_OpenDRIM_ConfigurationCapacityProvider"; ClassName = "OpenDRIM_ConfigurationCapacity"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "Name", "ObjectType", "OtherTypeDescription", "MinimumCapacity", "MaximumCapacity", "Increment", "VendorCompatibilityStrings"}; CapabilityID = "PhysicalAsset_OpenDRIM_ConfigurationCapacity"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_ConfigurationCapacity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_Card-remove.sh0000755000175000017500000000613211377667226027315 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_CardModule cimprovider -r -m PhysicalAsset_OpenDRIM_CardModule 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_Card.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_Realizes.sh0000755000175000017500000000620411377667226026727 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_Realizes.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_Realizes provider module"; Name = "PhysicalAsset_OpenDRIM_RealizesModule"; Location = "cmpiPhysicalAsset_OpenDRIM_RealizesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_Realizes provider"; Name = "PhysicalAsset_OpenDRIM_RealizesProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_RealizesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_Realizes provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_RealizesModule"; ProviderName = "PhysicalAsset_OpenDRIM_RealizesProvider"; ClassName = "OpenDRIM_Realizes"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent"}; CapabilityID = "PhysicalAsset_OpenDRIM_Realizes"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_Realizes.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalConnector.sh0000755000175000017500000000757511377667226030614 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_PhysicalConnector.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_PhysicalConnector provider module"; Name = "PhysicalAsset_OpenDRIM_PhysicalConnectorModule"; Location = "cmpiPhysicalAsset_OpenDRIM_PhysicalConnectorProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_PhysicalConnector provider"; Name = "PhysicalAsset_OpenDRIM_PhysicalConnectorProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalConnectorModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_PhysicalConnector provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalConnectorModule"; ProviderName = "PhysicalAsset_OpenDRIM_PhysicalConnectorProvider"; ClassName = "OpenDRIM_PhysicalConnector"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "InstallDate", "Name", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "Tag", "Description", "CreationClassName", "ElementName", "Manufacturer", "Model", "SKU", "SerialNumber", "Version", "PartNumber", "OtherIdentifyingInfo", "PoweredOn", "ManufactureDate", "VendorEquipmentType", "UserTracking", "CanBeFRUed", "ConnectorPinout", "ConnectorType", "OtherTypeDescription", "ConnectorGender", "ConnectorElectricalCharacteristics", "OtherElectricalCharacteristics", "NumPhysicalPins", "ConnectorLayout", "ConnectorDescription"}; CapabilityID = "PhysicalAsset_OpenDRIM_PhysicalConnector"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_PhysicalConnector.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_ComputerSystemPackage.sh0000755000175000017500000000661311377667226031434 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_ComputerSystemPackage.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_ComputerSystemPackage provider module"; Name = "PhysicalAsset_OpenDRIM_ComputerSystemPackageModule"; Location = "cmpiPhysicalAsset_OpenDRIM_ComputerSystemPackageProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_ComputerSystemPackage provider"; Name = "PhysicalAsset_OpenDRIM_ComputerSystemPackageProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_ComputerSystemPackageModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_ComputerSystemPackage provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_ComputerSystemPackageModule"; ProviderName = "PhysicalAsset_OpenDRIM_ComputerSystemPackageProvider"; ClassName = "OpenDRIM_ComputerSystemPackage"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent", "PlatformGUID"}; CapabilityID = "PhysicalAsset_OpenDRIM_ComputerSystemPackage"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_ComputerSystemPackage.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalAssetCapabilities-remove.sh0000755000175000017500000000645411377667226033541 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesModule cimprovider -r -m PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesModule 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_PhysicalAssetCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalAssetRegisteredProfile.sh0000755000175000017500000000730211377667226033264 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $4 $6/mof/OpenDRIM_PhysicalAssetRegisteredProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_PhysicalAssetRegisteredProfile provider module"; Name = "PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileModule"; Location = "cmpiPhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_PhysicalAssetRegisteredProfile provider"; Name = "PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_PhysicalAssetRegisteredProfile provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileModule"; ProviderName = "PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProvider"; ClassName = "OpenDRIM_PhysicalAssetRegisteredProfile"; ProviderType = {2}; Namespaces = {"$4"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID", "RegisteredOrganization", "OtherRegisteredOrganization", "RegisteredName", "RegisteredVersion", "AdvertiseTypes", "AdvertiseTypeDescriptions"}; CapabilityID = "PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_PhysicalAssetRegisteredProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_Chassis.sh0000755000175000017500000001015211377667226026543 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_Chassis.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_Chassis provider module"; Name = "PhysicalAsset_OpenDRIM_ChassisModule"; Location = "cmpiPhysicalAsset_OpenDRIM_ChassisProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_Chassis provider"; Name = "PhysicalAsset_OpenDRIM_ChassisProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_ChassisModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_Chassis provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_ChassisModule"; ProviderName = "PhysicalAsset_OpenDRIM_ChassisProvider"; ClassName = "OpenDRIM_Chassis"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "InstallDate", "Name", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "Tag", "Description", "CreationClassName", "ElementName", "Manufacturer", "Model", "SKU", "SerialNumber", "Version", "PartNumber", "OtherIdentifyingInfo", "PoweredOn", "ManufactureDate", "VendorEquipmentType", "UserTracking", "CanBeFRUed", "RemovalConditions", "Removable", "Replaceable", "HotSwappable", "Height", "Depth", "Width", "Weight", "PackageType", "OtherPackageType", "VendorCompatibilityStrings", "CableManagementStrategy", "ServicePhilosophy", "ServiceDescriptions", "LockPresent", "AudibleAlarm", "VisibleAlarm", "SecurityBreach", "BreachDescription", "IsLocked", "NumberOfPowerCords", "CurrentRequiredOrProduced", "HeatGeneration", "ChassisTypes", "TypeDescriptions", "ChassisPackageType", "ChassisTypeDescription", "MultipleSystemSupport", "RackMountable", "InputCurrentType", "OtherInputCurrentType", "InputVoltage"}; SupportedMethods = {"IsCompatible"}; CapabilityID = "PhysicalAsset_OpenDRIM_Chassis"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_Chassis.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement-remove.shopendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElemen0000755000175000017500000000673311377667226034763 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementModule cimprovider -r -m PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementModule 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_PhysicalAssetCapabilitiesToPhysicalElement.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_Chip.sh0000755000175000017500000000700011377667226026027 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_Chip.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_Chip provider module"; Name = "PhysicalAsset_OpenDRIM_ChipModule"; Location = "cmpiPhysicalAsset_OpenDRIM_ChipProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_Chip provider"; Name = "PhysicalAsset_OpenDRIM_ChipProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_ChipModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_Chip provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_ChipModule"; ProviderName = "PhysicalAsset_OpenDRIM_ChipProvider"; ClassName = "OpenDRIM_Chip"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "InstallDate", "Name", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "Tag", "Description", "CreationClassName", "ElementName", "Manufacturer", "Model", "SKU", "SerialNumber", "Version", "PartNumber", "OtherIdentifyingInfo", "PoweredOn", "ManufactureDate", "VendorEquipmentType", "UserTracking", "CanBeFRUed", "RemovalConditions", "Removable", "Replaceable", "HotSwappable", "FormFactor"}; CapabilityID = "PhysicalAsset_OpenDRIM_Chip"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_Chip.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/registration/OpenDRIM_PhysicalPackageCapacity.sh0000755000175000017500000000663511377667226031667 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_PhysicalPackageCapacity.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_PhysicalPackageCapacity provider module"; Name = "PhysicalAsset_OpenDRIM_PhysicalPackageCapacityModule"; Location = "cmpiPhysicalAsset_OpenDRIM_PhysicalPackageCapacityProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_PhysicalPackageCapacity provider"; Name = "PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProvider"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalPackageCapacityModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_PhysicalPackageCapacity provider capabilities"; ProviderModuleName = "PhysicalAsset_OpenDRIM_PhysicalPackageCapacityModule"; ProviderName = "PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProvider"; ClassName = "OpenDRIM_PhysicalPackageCapacity"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Capacity", "Element"}; CapabilityID = "PhysicalAsset_OpenDRIM_PhysicalPackageCapacity"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_PhysicalPackageCapacity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalConnector/0000755000175000017500000000000011377667226025525 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalConnector/Makefile.am0000644000175000017500000000412611377667226027564 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_PhysicalConnectorProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalConnectorProvider_la_SOURCES = OpenDRIM_PhysicalConnectorAccess.cpp OpenDRIM_PhysicalConnectorProvider.cpp cmpiOpenDRIM_PhysicalConnector.cpp libcmpiPhysicalAsset_OpenDRIM_PhysicalConnectorProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la libcmpiPhysicalAsset_OpenDRIM_PhysicalConnectorProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_PhysicalConnector.h OpenDRIM_PhysicalConnector.h OpenDRIM_PhysicalConnectorAccess.h opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalConnector/OpenDRIM_PhysicalConnector.h0000644000175000017500000003574111377667226032774 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALCONNECTOR_H_ #define OPENDRIM_PHYSICALCONNECTOR_H_ #include const static char* OpenDRIM_PhysicalConnector_classnames[] = {"OpenDRIM_PhysicalConnector"}; static string OpenDRIM_PhysicalConnector_NAMESPACE = _NAMESPACE; class OpenDRIM_PhysicalConnector { public: string Caption; bool Caption_isNULL; string InstallDate; bool InstallDate_isNULL; string Name; bool Name_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; string Tag; bool Tag_isNULL; string Description; bool Description_isNULL; string CreationClassName; bool CreationClassName_isNULL; string ElementName; bool ElementName_isNULL; string Manufacturer; bool Manufacturer_isNULL; string Model; bool Model_isNULL; string SKU; bool SKU_isNULL; string SerialNumber; bool SerialNumber_isNULL; string Version; bool Version_isNULL; string PartNumber; bool PartNumber_isNULL; string OtherIdentifyingInfo; bool OtherIdentifyingInfo_isNULL; bool PoweredOn; bool PoweredOn_isNULL; string ManufactureDate; bool ManufactureDate_isNULL; string VendorEquipmentType; bool VendorEquipmentType_isNULL; string UserTracking; bool UserTracking_isNULL; bool CanBeFRUed; bool CanBeFRUed_isNULL; string ConnectorPinout; bool ConnectorPinout_isNULL; vector ConnectorType; bool ConnectorType_isNULL; string OtherTypeDescription; bool OtherTypeDescription_isNULL; unsigned short ConnectorGender; bool ConnectorGender_isNULL; vector ConnectorElectricalCharacteristics; bool ConnectorElectricalCharacteristics_isNULL; vector OtherElectricalCharacteristics; bool OtherElectricalCharacteristics_isNULL; unsigned int NumPhysicalPins; bool NumPhysicalPins_isNULL; unsigned short ConnectorLayout; bool ConnectorLayout_isNULL; string ConnectorDescription; bool ConnectorDescription_isNULL; OpenDRIM_PhysicalConnector() { Caption_isNULL = true; InstallDate_isNULL = true; Name_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; Tag_isNULL = true; Description_isNULL = true; CreationClassName_isNULL = true; ElementName_isNULL = true; Manufacturer_isNULL = true; Model_isNULL = true; SKU_isNULL = true; SerialNumber_isNULL = true; Version_isNULL = true; PartNumber_isNULL = true; OtherIdentifyingInfo_isNULL = true; PoweredOn_isNULL = true; ManufactureDate_isNULL = true; VendorEquipmentType_isNULL = true; UserTracking_isNULL = true; CanBeFRUed_isNULL = true; ConnectorPinout_isNULL = true; ConnectorType_isNULL = true; OtherTypeDescription_isNULL = true; ConnectorGender_isNULL = true; ConnectorElectricalCharacteristics_isNULL = true; OtherElectricalCharacteristics_isNULL = true; NumPhysicalPins_isNULL = true; ConnectorLayout_isNULL = true; ConnectorDescription_isNULL = true; } ~OpenDRIM_PhysicalConnector() {} string getKeys() const { return CF_toLowCase(".Tag=\"" + CF_quoteString(Tag) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""); } 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 getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getTag(string& value) const { if (Tag_isNULL==true) return NOT_FOUND; value = Tag; return OK; } int setTag(const string& newValue) { Tag = newValue; Tag_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 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 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 getManufacturer(string& value) const { if (Manufacturer_isNULL==true) return NOT_FOUND; value = Manufacturer; return OK; } int setManufacturer(const string& newValue) { Manufacturer = newValue; Manufacturer_isNULL = false; return OK; } int getModel(string& value) const { if (Model_isNULL==true) return NOT_FOUND; value = Model; return OK; } int setModel(const string& newValue) { Model = newValue; Model_isNULL = false; return OK; } int getSKU(string& value) const { if (SKU_isNULL==true) return NOT_FOUND; value = SKU; return OK; } int setSKU(const string& newValue) { SKU = newValue; SKU_isNULL = false; return OK; } int getSerialNumber(string& value) const { if (SerialNumber_isNULL==true) return NOT_FOUND; value = SerialNumber; return OK; } int setSerialNumber(const string& newValue) { SerialNumber = newValue; SerialNumber_isNULL = false; return OK; } int getVersion(string& value) const { if (Version_isNULL==true) return NOT_FOUND; value = Version; return OK; } int setVersion(const string& newValue) { Version = newValue; Version_isNULL = false; return OK; } int getPartNumber(string& value) const { if (PartNumber_isNULL==true) return NOT_FOUND; value = PartNumber; return OK; } int setPartNumber(const string& newValue) { PartNumber = newValue; PartNumber_isNULL = false; return OK; } int getOtherIdentifyingInfo(string& value) const { if (OtherIdentifyingInfo_isNULL==true) return NOT_FOUND; value = OtherIdentifyingInfo; return OK; } int setOtherIdentifyingInfo(const string& newValue) { OtherIdentifyingInfo = newValue; OtherIdentifyingInfo_isNULL = false; return OK; } int getPoweredOn(bool& value) const { if (PoweredOn_isNULL==true) return NOT_FOUND; value = PoweredOn; return OK; } int setPoweredOn(const bool& newValue) { PoweredOn = newValue; PoweredOn_isNULL = false; return OK; } int getManufactureDate(string& value) const { if (ManufactureDate_isNULL==true) return NOT_FOUND; value = ManufactureDate; return OK; } int setManufactureDate(const string& newValue) { ManufactureDate = newValue; ManufactureDate_isNULL = false; return OK; } int getVendorEquipmentType(string& value) const { if (VendorEquipmentType_isNULL==true) return NOT_FOUND; value = VendorEquipmentType; return OK; } int setVendorEquipmentType(const string& newValue) { VendorEquipmentType = newValue; VendorEquipmentType_isNULL = false; return OK; } int getUserTracking(string& value) const { if (UserTracking_isNULL==true) return NOT_FOUND; value = UserTracking; return OK; } int setUserTracking(const string& newValue) { UserTracking = newValue; UserTracking_isNULL = false; return OK; } int getCanBeFRUed(bool& value) const { if (CanBeFRUed_isNULL==true) return NOT_FOUND; value = CanBeFRUed; return OK; } int setCanBeFRUed(const bool& newValue) { CanBeFRUed = newValue; CanBeFRUed_isNULL = false; return OK; } int getConnectorPinout(string& value) const { if (ConnectorPinout_isNULL==true) return NOT_FOUND; value = ConnectorPinout; return OK; } int setConnectorPinout(const string& newValue) { ConnectorPinout = newValue; ConnectorPinout_isNULL = false; return OK; } int getConnectorType(vector& value) const { if (ConnectorType_isNULL==true) return NOT_FOUND; value = ConnectorType; return OK; } int setConnectorType(const vector& newValue) { ConnectorType = newValue; ConnectorType_isNULL = false; return OK; } int getOtherTypeDescription(string& value) const { if (OtherTypeDescription_isNULL==true) return NOT_FOUND; value = OtherTypeDescription; return OK; } int setOtherTypeDescription(const string& newValue) { OtherTypeDescription = newValue; OtherTypeDescription_isNULL = false; return OK; } int getConnectorGender(unsigned short& value) const { if (ConnectorGender_isNULL==true) return NOT_FOUND; value = ConnectorGender; return OK; } int setConnectorGender(const unsigned short& newValue) { ConnectorGender = newValue; ConnectorGender_isNULL = false; return OK; } int getConnectorElectricalCharacteristics(vector& value) const { if (ConnectorElectricalCharacteristics_isNULL==true) return NOT_FOUND; value = ConnectorElectricalCharacteristics; return OK; } int setConnectorElectricalCharacteristics(const vector& newValue) { ConnectorElectricalCharacteristics = newValue; ConnectorElectricalCharacteristics_isNULL = false; return OK; } int getOtherElectricalCharacteristics(vector& value) const { if (OtherElectricalCharacteristics_isNULL==true) return NOT_FOUND; value = OtherElectricalCharacteristics; return OK; } int setOtherElectricalCharacteristics(const vector& newValue) { OtherElectricalCharacteristics = newValue; OtherElectricalCharacteristics_isNULL = false; return OK; } int getNumPhysicalPins(unsigned int& value) const { if (NumPhysicalPins_isNULL==true) return NOT_FOUND; value = NumPhysicalPins; return OK; } int setNumPhysicalPins(const unsigned int& newValue) { NumPhysicalPins = newValue; NumPhysicalPins_isNULL = false; return OK; } int getConnectorLayout(unsigned short& value) const { if (ConnectorLayout_isNULL==true) return NOT_FOUND; value = ConnectorLayout; return OK; } int setConnectorLayout(const unsigned short& newValue) { ConnectorLayout = newValue; ConnectorLayout_isNULL = false; return OK; } int getConnectorDescription(string& value) const { if (ConnectorDescription_isNULL==true) return NOT_FOUND; value = ConnectorDescription; return OK; } int setConnectorDescription(const string& newValue) { ConnectorDescription = newValue; ConnectorDescription_isNULL = false; return OK; } }; #endif /*OPENDRIM_PHYSICALCONNECTOR_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalConnector/cmpiOpenDRIM_PhysicalConnector.cpp0000644000175000017500000002430311377667226034170 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalConnector.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalConnector_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalConnector& instance) { _E_; Objectpath op(broker, OpenDRIM_PhysicalConnector_classnames[0], OpenDRIM_PhysicalConnector_NAMESPACE); if (!instance.Tag_isNULL) op.addKey("Tag", instance.Tag); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalConnector_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalConnector& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_PhysicalConnector_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.Name_isNULL) ci.setProperty("Name", instance.Name); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.Manufacturer_isNULL) ci.setProperty("Manufacturer", instance.Manufacturer); if (!instance.Model_isNULL) ci.setProperty("Model", instance.Model); if (!instance.SKU_isNULL) ci.setProperty("SKU", instance.SKU); if (!instance.SerialNumber_isNULL) ci.setProperty("SerialNumber", instance.SerialNumber); if (!instance.Version_isNULL) ci.setProperty("Version", instance.Version); if (!instance.PartNumber_isNULL) ci.setProperty("PartNumber", instance.PartNumber); if (!instance.OtherIdentifyingInfo_isNULL) ci.setProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo); if (!instance.PoweredOn_isNULL) ci.setProperty("PoweredOn", instance.PoweredOn); if (!instance.ManufactureDate_isNULL) ci.setPropertyDatetime("ManufactureDate", instance.ManufactureDate); if (!instance.VendorEquipmentType_isNULL) ci.setProperty("VendorEquipmentType", instance.VendorEquipmentType); if (!instance.UserTracking_isNULL) ci.setProperty("UserTracking", instance.UserTracking); if (!instance.CanBeFRUed_isNULL) ci.setProperty("CanBeFRUed", instance.CanBeFRUed); if (!instance.ConnectorPinout_isNULL) ci.setProperty("ConnectorPinout", instance.ConnectorPinout); if (!instance.ConnectorType_isNULL) ci.setProperty("ConnectorType", instance.ConnectorType); if (!instance.OtherTypeDescription_isNULL) ci.setProperty("OtherTypeDescription", instance.OtherTypeDescription); if (!instance.ConnectorGender_isNULL) ci.setProperty("ConnectorGender", instance.ConnectorGender); if (!instance.ConnectorElectricalCharacteristics_isNULL) ci.setProperty("ConnectorElectricalCharacteristics", instance.ConnectorElectricalCharacteristics); if (!instance.OtherElectricalCharacteristics_isNULL) ci.setProperty("OtherElectricalCharacteristics", instance.OtherElectricalCharacteristics); if (!instance.NumPhysicalPins_isNULL) ci.setProperty("NumPhysicalPins", instance.NumPhysicalPins); if (!instance.ConnectorLayout_isNULL) ci.setProperty("ConnectorLayout", instance.ConnectorLayout); if (!instance.ConnectorDescription_isNULL) ci.setProperty("ConnectorDescription", instance.ConnectorDescription); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_PhysicalConnector_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalConnector& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (op.getKey("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_PhysicalConnector_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalConnector& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("Manufacturer", instance.Manufacturer) == OK) instance.Manufacturer_isNULL = false; if (inst.getProperty("Model", instance.Model) == OK) instance.Model_isNULL = false; if (inst.getProperty("SKU", instance.SKU) == OK) instance.SKU_isNULL = false; if (inst.getProperty("SerialNumber", instance.SerialNumber) == OK) instance.SerialNumber_isNULL = false; if (inst.getProperty("Version", instance.Version) == OK) instance.Version_isNULL = false; if (inst.getProperty("PartNumber", instance.PartNumber) == OK) instance.PartNumber_isNULL = false; if (inst.getProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo) == OK) instance.OtherIdentifyingInfo_isNULL = false; if (inst.getProperty("PoweredOn", instance.PoweredOn) == OK) instance.PoweredOn_isNULL = false; if (inst.getPropertyDatetime("ManufactureDate", instance.ManufactureDate) == OK) instance.ManufactureDate_isNULL = false; if (inst.getProperty("VendorEquipmentType", instance.VendorEquipmentType) == OK) instance.VendorEquipmentType_isNULL = false; if (inst.getProperty("UserTracking", instance.UserTracking) == OK) instance.UserTracking_isNULL = false; if (inst.getProperty("CanBeFRUed", instance.CanBeFRUed) == OK) instance.CanBeFRUed_isNULL = false; if (inst.getProperty("ConnectorPinout", instance.ConnectorPinout) == OK) instance.ConnectorPinout_isNULL = false; if (inst.getProperty("ConnectorType", instance.ConnectorType) == OK) instance.ConnectorType_isNULL = false; if (inst.getProperty("OtherTypeDescription", instance.OtherTypeDescription) == OK) instance.OtherTypeDescription_isNULL = false; if (inst.getProperty("ConnectorGender", instance.ConnectorGender) == OK) instance.ConnectorGender_isNULL = false; if (inst.getProperty("ConnectorElectricalCharacteristics", instance.ConnectorElectricalCharacteristics) == OK) instance.ConnectorElectricalCharacteristics_isNULL = false; if (inst.getProperty("OtherElectricalCharacteristics", instance.OtherElectricalCharacteristics) == OK) instance.OtherElectricalCharacteristics_isNULL = false; if (inst.getProperty("NumPhysicalPins", instance.NumPhysicalPins) == OK) instance.NumPhysicalPins_isNULL = false; if (inst.getProperty("ConnectorLayout", instance.ConnectorLayout) == OK) instance.ConnectorLayout_isNULL = false; if (inst.getProperty("ConnectorDescription", instance.ConnectorDescription) == OK) instance.ConnectorDescription_isNULL = false; _L_; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalConnector/cmpiOpenDRIM_PhysicalConnector.h0000644000175000017500000000434411377667226033640 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_PHYSICALCONNECTOR_H_ #define CMPIOPENDRIM_PHYSICALCONNECTOR_H_ #include "OpenDRIM_PhysicalConnector.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalConnector_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalConnector& instance); CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalConnector_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalConnector& instance); void PhysicalAsset_OpenDRIM_PhysicalConnector_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalConnector& instance); void PhysicalAsset_OpenDRIM_PhysicalConnector_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalConnector& instance); #endif /*CMPIOPENDRIM_PHYSICALCONNECTOR_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalConnector/OpenDRIM_PhysicalConnectorAccess.h0000644000175000017500000000576511377667226034121 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALCONNECTORACCESS_H_ #define OPENDRIM_PHYSICALCONNECTORACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_PhysicalConnector.h" int PhysicalAsset_OpenDRIM_PhysicalConnector_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalConnector_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalConnector_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalConnector_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalConnector& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalConnector_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalConnector& newInstance, const OpenDRIM_PhysicalConnector& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalConnector_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalConnector& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalConnector_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalConnector& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalConnector_populate(OpenDRIM_PhysicalConnector& instance, string& errorMessage); #endif /*OPENDRIM_PHYSICALCONNECTORACCESS_H_*/ ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalConnector/OpenDRIM_PhysicalConnectorProvider.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalConnector/OpenDRIM_PhysicalConnectorProvider.c0000644000175000017500000002612211377667226034473 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalConnector.h" #include "OpenDRIM_PhysicalConnectorAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_PhysicalConnectorProviderSetInstance PhysicalAsset_OpenDRIM_PhysicalConnectorProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_PhysicalConnector_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_PhysicalConnector_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_PhysicalConnectorProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalConnector_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalConnectorProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalConnector_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalConnector_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalConnectorProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_PhysicalConnector_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalConnector_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalConnectorProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalConnector instance; PhysicalAsset_OpenDRIM_PhysicalConnector_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalConnector_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalConnector_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalConnectorProviderSetInstance(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_PhysicalConnector newInstance, oldInstance; PhysicalAsset_OpenDRIM_PhysicalConnector_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_PhysicalConnector_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalConnector_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalConnector_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalConnectorProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalConnector instance; PhysicalAsset_OpenDRIM_PhysicalConnector_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalConnector_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_PhysicalConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalConnector_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalConnector_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_PhysicalConnector_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalConnectorProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalConnector instance; PhysicalAsset_OpenDRIM_PhysicalConnector_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalConnector_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalConnector_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalConnectorProviderExecQuery(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 PhysicalAsset_OpenDRIM_PhysicalConnector_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalConnector_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalConnector_init FAILED: " + (string) OpenDRIM_PhysicalConnector_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalConnector_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalConnector_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalConnector_unload FAILED: " + (string) OpenDRIM_PhysicalConnector_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_PhysicalConnector_INIT if (PhysicalAsset_OpenDRIM_PhysicalConnector_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_PhysicalConnectorProvider, PhysicalAsset_OpenDRIM_PhysicalConnectorProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalConnector_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalConnector/OpenDRIM_PhysicalConnectorAccess.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalConnector/OpenDRIM_PhysicalConnectorAccess.cpp0000644000175000017500000000617411377667226034447 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_PhysicalConnectorAccess.h" int PhysicalAsset_OpenDRIM_PhysicalConnector_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalConnector_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalConnector_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalConnector_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalConnector& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalConnector_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalConnector& newInstance, const OpenDRIM_PhysicalConnector& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalConnector_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalConnector& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalConnector_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalConnector& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalConnector_populate(OpenDRIM_PhysicalConnector& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetRegisteredProfile/0000755000175000017500000000000011377667226030211 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetRegisteredProfile/OpenDRIM_PhysicalAssetRegisteredProfileProvider.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetRegisteredProfile/OpenDRIM_PhysicalAssetR0000644000175000017500000002760511377667226034501 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalAssetRegisteredProfile.h" #include "OpenDRIM_PhysicalAssetRegisteredProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProviderSetInstance PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalAssetRegisteredProfile instance; PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProviderSetInstance(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_PhysicalAssetRegisteredProfile newInstance, oldInstance; PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalAssetRegisteredProfile instance; PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_PhysicalAssetRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalAssetRegisteredProfile instance; PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProviderExecQuery(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 PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_init FAILED: " + (string) OpenDRIM_PhysicalAssetRegisteredProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_unload FAILED: " + (string) OpenDRIM_PhysicalAssetRegisteredProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_INIT if (PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProvider, PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetRegisteredProfile/Makefile.am0000644000175000017500000000433011377667226032245 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProvider_la_SOURCES = OpenDRIM_PhysicalAssetRegisteredProfileAccess.cpp OpenDRIM_PhysicalAssetRegisteredProfileProvider.cpp cmpiOpenDRIM_PhysicalAssetRegisteredProfile.cpp libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_PhysicalAssetRegisteredProfile.h OpenDRIM_PhysicalAssetRegisteredProfile.h OpenDRIM_PhysicalAssetRegisteredProfileAccess.h ././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetRegisteredProfile/OpenDRIM_PhysicalAssetRegisteredProfileAccess.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetRegisteredProfile/OpenDRIM_PhysicalAssetR0000644000175000017500000001003611377667226034467 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_PhysicalAssetRegisteredProfileAccess.h" const string InstanceID="OpenDRIM:PhysicalAsset:1.0.2"; int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_unload(string& errorMessage) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; OpenDRIM_PhysicalAssetRegisteredProfile instance; instance.setInstanceID(InstanceID); if(discriminant=="ei") CF_assert(PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_populate(instance,errorMessage)); result.push_back(instance); _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalAssetRegisteredProfile& instance, const char** properties, string& errorMessage) { _E_; if (instance.InstanceID!=InstanceID) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_populate(instance,errorMessage)); _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetRegisteredProfile& newInstance, const OpenDRIM_PhysicalAssetRegisteredProfile& oldInstance, const char** properties, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetRegisteredProfile& instance, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetRegisteredProfile& instance, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_populate(OpenDRIM_PhysicalAssetRegisteredProfile& instance, string& errorMessage) { _E_; vector AdvertiseTypes; instance.setRegisteredName("Physical Asset"); instance.setRegisteredVersion("1.0.2"); instance.setRegisteredOrganization(2); // DMTF AdvertiseTypes.push_back(2); // Not Advertised instance.setAdvertiseTypes(AdvertiseTypes); _L_; return OK; } ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetRegisteredProfile/OpenDRIM_PhysicalAssetRegisteredProfileAccess.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetRegisteredProfile/OpenDRIM_PhysicalAssetR0000644000175000017500000000635411377667226034477 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALASSETREGISTEREDPROFILEACCESS_H_ #define OPENDRIM_PHYSICALASSETREGISTEREDPROFILEACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_PhysicalAssetRegisteredProfile.h" int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalAssetRegisteredProfile& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetRegisteredProfile& newInstance, const OpenDRIM_PhysicalAssetRegisteredProfile& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetRegisteredProfile& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetRegisteredProfile& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_populate(OpenDRIM_PhysicalAssetRegisteredProfile& instance, string& errorMessage); #endif /*OPENDRIM_PHYSICALASSETREGISTEREDPROFILEACCESS_H_*/ ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetRegisteredProfile/cmpiOpenDRIM_PhysicalAssetRegisteredProfile.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetRegisteredProfile/cmpiOpenDRIM_PhysicalAs0000644000175000017500000000460011377667226034502 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_PHYSICALASSETREGISTEREDPROFILE_H_ #define CMPIOPENDRIM_PHYSICALASSETREGISTEREDPROFILE_H_ #include "OpenDRIM_PhysicalAssetRegisteredProfile.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetRegisteredProfile& instance); CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetRegisteredProfile& instance); void PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalAssetRegisteredProfile& instance); void PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalAssetRegisteredProfile& instance); #endif /*CMPIOPENDRIM_PHYSICALASSETREGISTEREDPROFILE_H_*/ ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetRegisteredProfile/cmpiOpenDRIM_PhysicalAssetRegisteredProfile.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetRegisteredProfile/cmpiOpenDRIM_PhysicalAs0000644000175000017500000001173211377667226034506 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalAssetRegisteredProfile.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetRegisteredProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_PhysicalAssetRegisteredProfile_classnames[0], OpenDRIM_PhysicalAssetRegisteredProfile_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetRegisteredProfile& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_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 PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalAssetRegisteredProfile& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalAssetRegisteredProfile& 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_; } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetRegisteredProfile/OpenDRIM_PhysicalAssetRegisteredProfile.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetRegisteredProfile/OpenDRIM_PhysicalAssetR0000644000175000017500000001364411377667226034477 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALASSETREGISTEREDPROFILE_H_ #define OPENDRIM_PHYSICALASSETREGISTEREDPROFILE_H_ #include const static char* OpenDRIM_PhysicalAssetRegisteredProfile_classnames[] = {"OpenDRIM_PhysicalAssetRegisteredProfile"}; static string OpenDRIM_PhysicalAssetRegisteredProfile_NAMESPACE = _INTEROP_NAMESPACE; class OpenDRIM_PhysicalAssetRegisteredProfile { 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_PhysicalAssetRegisteredProfile() { 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_PhysicalAssetRegisteredProfile() {} 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_PHYSICALASSETREGISTEREDPROFILE_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/0000755000175000017500000000000011377667226027326 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/OpenDRIM_PhysicalElementInConnectorProvider.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/OpenDRIM_PhysicalElementInC0000644000175000017500000004375711377667226034406 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalElementInConnector.h" #include "OpenDRIM_PhysicalElementInConnectorAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderSetInstance PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalElementInConnector instance; PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderSetInstance(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_PhysicalElementInConnector newInstance, oldInstance; PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalElementInConnector instance; PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalElementInConnector instance; PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderExecQuery(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 PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderAssociatorNames(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 = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_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 PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderAssociators(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 = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_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 PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderReferenceNames(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 = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProviderReferences(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 = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalElementInConnector_init FAILED: " + (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalElementInConnector_unload FAILED: " + (string) OpenDRIM_PhysicalElementInConnector_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_PhysicalElementInConnector_INIT if (PhysicalAsset_OpenDRIM_PhysicalElementInConnector_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProvider, PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalElementInConnector_INIT); CMAssociationMIStub(PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProvider, PhysicalAsset_OpenDRIM_PhysicalElementInConnectorProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalElementInConnector_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/Makefile.am0000644000175000017500000000515711377667226031372 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_PhysicalElementInConnectorProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalElementInConnectorProvider_la_SOURCES = OpenDRIM_PhysicalElementInConnectorAccess.cpp OpenDRIM_PhysicalElementInConnectorProvider.cpp cmpiOpenDRIM_PhysicalElementInConnector.cpp assocOpenDRIM_PhysicalElementInConnector.cpp # May have to be adjusted for direct invocation libcmpiPhysicalAsset_OpenDRIM_PhysicalElementInConnectorProvider_la_CPPFLAGS = -I../CIM_PhysicalConnector -I../CIM_PhysicalElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiPhysicalAsset_OpenDRIM_PhysicalElementInConnectorProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la #../CIM_PhysicalConnector/libcmpiPhysicalAsset_CIM_PhysicalConnectorProvider.la ../CIM_PhysicalElement/libcmpiPhysicalAsset_CIM_PhysicalElementProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalElementInConnectorProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_PhysicalElementInConnector.h OpenDRIM_PhysicalElementInConnector.h OpenDRIM_PhysicalElementInConnectorAccess.h ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/assocOpenDRIM_PhysicalElementInConnector.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/assocOpenDRIM_PhysicalEleme0000644000175000017500000000636211377667226034472 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_PHYSICALELEMENTINCONNECTOR_H_ #define ASSOCOPENDRIM_PHYSICALELEMENTINCONNECTOR_H_ #include "OpenDRIM_PhysicalElementInConnectorAccess.h" int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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 PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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 PhysicalAsset_OpenDRIM_PhysicalElementInConnector_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_PHYSICALELEMENTINCONNECTOR_H_*/ ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/cmpiOpenDRIM_PhysicalElementInConnector.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/cmpiOpenDRIM_PhysicalElemen0000644000175000017500000000625011377667226034464 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalElementInConnector.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalElementInConnector& instance) { _E_; Objectpath op(broker, OpenDRIM_PhysicalElementInConnector_classnames[0], OpenDRIM_PhysicalElementInConnector_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalElementInConnector& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalElementInConnector& 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 PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalElementInConnector& 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_; } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/cmpiOpenDRIM_PhysicalElementInConnector.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/cmpiOpenDRIM_PhysicalElemen0000644000175000017500000000452011377667226034462 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_PHYSICALELEMENTINCONNECTOR_H_ #define CMPIOPENDRIM_PHYSICALELEMENTINCONNECTOR_H_ #include "OpenDRIM_PhysicalElementInConnector.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalElementInConnector& instance); CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalElementInConnector& instance); void PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalElementInConnector& instance); void PhysicalAsset_OpenDRIM_PhysicalElementInConnector_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalElementInConnector& instance); #endif /*CMPIOPENDRIM_PHYSICALELEMENTINCONNECTOR_H_*/ ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/OpenDRIM_PhysicalElementInConnectorAccess.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/OpenDRIM_PhysicalElementInC0000644000175000017500000001106011377667226034364 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALELEMENTINCONNECTORACCESS_H_ #define OPENDRIM_PHYSICALELEMENTINCONNECTORACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_PhysicalElementInConnector.h" #include "assocOpenDRIM_PhysicalElementInConnector.h" int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalElementInConnector& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalElementInConnector& newInstance, const OpenDRIM_PhysicalElementInConnector& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalElementInConnector& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalElementInConnector& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_PhysicalElementInConnector_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_PhysicalElementInConnector_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_populate(OpenDRIM_PhysicalElementInConnector& instance, string& errorMessage); #endif /*OPENDRIM_PHYSICALELEMENTINCONNECTORACCESS_H_*/ ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/OpenDRIM_PhysicalElementInConnectorAccess.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/OpenDRIM_PhysicalElementInC0000644000175000017500000002521311377667226034371 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_PhysicalElementInConnectorAccess.h" int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_PhysicalConnector_load(broker, errorMessage)); CF_assert(PhysicalAsset_CIM_PhysicalElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_PhysicalConnector_unload(errorMessage)); CF_assert(PhysicalAsset_CIM_PhysicalElement_unload(errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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 PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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(PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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(PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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; PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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(PhysicalAsset_OpenDRIM_PhysicalElementInConnector_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalElementInConnector& 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(PhysicalAsset_OpenDRIM_PhysicalElementInConnector_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(PhysicalAsset_OpenDRIM_PhysicalElementInConnector_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(PhysicalAsset_OpenDRIM_PhysicalElementInConnector_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalElementInConnector& newInstance, const OpenDRIM_PhysicalElementInConnector& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalElementInConnector& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalElementInConnector& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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(PhysicalAsset_OpenDRIM_PhysicalElementInConnector_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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(PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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(PhysicalAsset_OpenDRIM_PhysicalElementInConnector_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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(PhysicalAsset_OpenDRIM_PhysicalElementInConnector_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_PhysicalElementInConnector_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_PhysicalElementInConnector instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); OpenDRIM_PhysicalElementInConnector_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_PhysicalElementInConnector_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_PhysicalElementInConnector instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); OpenDRIM_PhysicalElementInConnector_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_populate(OpenDRIM_PhysicalElementInConnector& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/assocOpenDRIM_PhysicalElementInConnector.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/assocOpenDRIM_PhysicalEleme0000644000175000017500000002143211377667226034465 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "assocOpenDRIM_PhysicalElementInConnector.h" int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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 = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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(PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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(PhysicalAsset_OpenDRIM_PhysicalElementInConnector_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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(PhysicalAsset_CIM_PhysicalConnector_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_PhysicalConnector_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_PhysicalConnector_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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_PhysicalConnector _instance; PhysicalAsset_CIM_PhysicalConnector_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_PhysicalConnector_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_PhysicalConnector_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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(PhysicalAsset_CIM_PhysicalElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_PhysicalElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_PhysicalElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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_PhysicalElement _instance; PhysicalAsset_CIM_PhysicalElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_PhysicalElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_PhysicalElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/OpenDRIM_PhysicalElementInConnector.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementInConnector/OpenDRIM_PhysicalElementInC0000644000175000017500000000673311377667226034377 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALELEMENTINCONNECTOR_H_ #define OPENDRIM_PHYSICALELEMENTINCONNECTOR_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_PhysicalConnector.h" #include "CIM_PhysicalConnectorAccess.h" #include "cmpiCIM_PhysicalElement.h" #include "CIM_PhysicalElementAccess.h" */ const static char* OpenDRIM_PhysicalElementInConnector_classnames[] = {"OpenDRIM_PhysicalElementInConnector"}; static string OpenDRIM_PhysicalElementInConnector_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"CIM_PhysicalConnector"}; const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"CIM_PhysicalElement"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_PhysicalElementInConnector { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; OpenDRIM_PhysicalElementInConnector() { Antecedent_isNULL = true; Dependent_isNULL = true; } ~OpenDRIM_PhysicalElementInConnector() {} 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_PHYSICALELEMENTINCONNECTOR_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/0000755000175000017500000000000011377667226030205 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/OpenDRIM_PhysicalAssetConformsToProfileProvider.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/OpenDRIM_PhysicalAssetC0000644000175000017500000004461311377667226034454 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalAssetConformsToProfile.h" #include "OpenDRIM_PhysicalAssetConformsToProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderSetInstance PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalAssetConformsToProfile instance; PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderSetInstance(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_PhysicalAssetConformsToProfile newInstance, oldInstance; PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalAssetConformsToProfile instance; PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalAssetConformsToProfile instance; PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderExecQuery(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 PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderAssociatorNames(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 = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_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 PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderAssociators(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 = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_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 PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderReferenceNames(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 = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProviderReferences(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 = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_init FAILED: " + (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_unload FAILED: " + (string) OpenDRIM_PhysicalAssetConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_INIT if (PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProvider, PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_INIT); CMAssociationMIStub(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProvider, PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/Makefile.am0000644000175000017500000000523411377667226032245 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProvider_la_SOURCES = OpenDRIM_PhysicalAssetConformsToProfileAccess.cpp OpenDRIM_PhysicalAssetConformsToProfileProvider.cpp cmpiOpenDRIM_PhysicalAssetConformsToProfile.cpp assocOpenDRIM_PhysicalAssetConformsToProfile.cpp # May have to be adjusted for direct invocation libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProvider_la_CPPFLAGS = -I../CIM_RegisteredProfile -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la #../CIM_RegisteredProfile/libcmpiPhysicalAsset_CIM_RegisteredProfileProvider.la ../CIM_ManagedElement/libcmpiPhysicalAsset_CIM_ManagedElementProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_PhysicalAssetConformsToProfile.h OpenDRIM_PhysicalAssetConformsToProfile.h OpenDRIM_PhysicalAssetConformsToProfileAccess.h ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/OpenDRIM_PhysicalAssetConformsToProfileAccess.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/OpenDRIM_PhysicalAssetC0000644000175000017500000001141011377667226034441 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALASSETCONFORMSTOPROFILEACCESS_H_ #define OPENDRIM_PHYSICALASSETCONFORMSTOPROFILEACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_PhysicalAssetConformsToProfile.h" #include "assocOpenDRIM_PhysicalAssetConformsToProfile.h" int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalAssetConformsToProfile& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetConformsToProfile& newInstance, const OpenDRIM_PhysicalAssetConformsToProfile& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetConformsToProfile& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetConformsToProfile& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_associatorConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_associatorManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& ConformantStandard_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_referenceConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const vector& ManagedElement_instances, vector& OpenDRIM_PhysicalAssetConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_PhysicalAssetConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_populate(OpenDRIM_PhysicalAssetConformsToProfile& instance, string& errorMessage); #endif /*OPENDRIM_PHYSICALASSETCONFORMSTOPROFILEACCESS_H_*/ ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/OpenDRIM_PhysicalAssetConformsToProfile.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/OpenDRIM_PhysicalAssetC0000644000175000017500000000742511377667226034454 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALASSETCONFORMSTOPROFILE_H_ #define OPENDRIM_PHYSICALASSETCONFORMSTOPROFILE_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_PhysicalAssetConformsToProfile_classnames[] = {"OpenDRIM_PhysicalAssetConformsToProfile"}; static string OpenDRIM_PhysicalAssetConformsToProfile_NAMESPACE = _INTEROP_NAMESPACE; const static string ConformantStandard_role = "ConformantStandard"; const static char* ConformantStandard_classnames[] = {"OpenDRIM_PhysicalAssetRegisteredProfile"}; const static string ConformantStandard_NAMESPACE = _INTEROP_NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_ComputerSystem"}; //CIM_ManagedElement const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_PhysicalAssetConformsToProfile { public: Objectpath ConformantStandard; bool ConformantStandard_isNULL; Objectpath ManagedElement; bool ManagedElement_isNULL; OpenDRIM_PhysicalAssetConformsToProfile() { ConformantStandard_isNULL = true; ManagedElement_isNULL = true; } ~OpenDRIM_PhysicalAssetConformsToProfile() {} 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_PHYSICALASSETCONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/cmpiOpenDRIM_PhysicalAssetConformsToProfile.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/cmpiOpenDRIM_PhysicalAs0000644000175000017500000000651511377667226034505 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalAssetConformsToProfile.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetConformsToProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_PhysicalAssetConformsToProfile_classnames[0], OpenDRIM_PhysicalAssetConformsToProfile_NAMESPACE); if (!instance.ConformantStandard_isNULL) op.addKey("ConformantStandard", instance.ConformantStandard); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetConformsToProfile& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalAssetConformsToProfile& 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 PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalAssetConformsToProfile& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("ConformantStandard", instance.ConformantStandard) == OK) instance.ConformantStandard_isNULL = false; if (inst.getProperty("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/assocOpenDRIM_PhysicalAssetConformsToProfile.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/assocOpenDRIM_PhysicalA0000644000175000017500000000646411377667226034505 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_PHYSICALASSETCONFORMSTOPROFILE_H_ #define ASSOCOPENDRIM_PHYSICALASSETCONFORMSTOPROFILE_H_ #include "OpenDRIM_PhysicalAssetConformsToProfileAccess.h" int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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 PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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 PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_enumerateConformantStandards(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_getConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_PHYSICALASSETCONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/cmpiOpenDRIM_PhysicalAssetConformsToProfile.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/cmpiOpenDRIM_PhysicalAs0000644000175000017500000000460011377667226034476 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_PHYSICALASSETCONFORMSTOPROFILE_H_ #define CMPIOPENDRIM_PHYSICALASSETCONFORMSTOPROFILE_H_ #include "OpenDRIM_PhysicalAssetConformsToProfile.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetConformsToProfile& instance); CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetConformsToProfile& instance); void PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalAssetConformsToProfile& instance); void PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalAssetConformsToProfile& instance); #endif /*CMPIOPENDRIM_PHYSICALASSETCONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/OpenDRIM_PhysicalAssetConformsToProfileAccess.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/OpenDRIM_PhysicalAssetC0000644000175000017500000002645211377667226034455 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_PhysicalAssetConformsToProfileAccess.h" int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_RegisteredProfile_load(broker, errorMessage)); CF_assert(PhysicalAsset_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_RegisteredProfile_unload(errorMessage)); CF_assert(PhysicalAsset_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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 PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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; PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_referenceConformantStandardToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalAssetConformsToProfile& 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(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_getConformantStandard(broker, ctx, ConformantStandard_objectpath, ConformantStandard_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_isAssociated(ConformantStandard_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetConformsToProfile& newInstance, const OpenDRIM_PhysicalAssetConformsToProfile& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_PhysicalAssetConformsToProfile_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_PhysicalAssetConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); OpenDRIM_PhysicalAssetConformsToProfile_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_PhysicalAssetConformsToProfile_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_PhysicalAssetConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); OpenDRIM_PhysicalAssetConformsToProfile_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_populate(OpenDRIM_PhysicalAssetConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/assocOpenDRIM_PhysicalAssetConformsToProfile.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetConformsToProfile/assocOpenDRIM_PhysicalA0000644000175000017500000002204211377667226034473 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "assocOpenDRIM_PhysicalAssetConformsToProfile.h" int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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 = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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(PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_associatorManagedElementToConformantStandard(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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(PhysicalAsset_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_RegisteredProfile_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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; PhysicalAsset_CIM_RegisteredProfile_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_RegisteredProfile_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_RegisteredProfile_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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(PhysicalAsset_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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; PhysicalAsset_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/VERSION0000644000175000017500000000000611377667226021505 0ustar guillaumeguillaume0.1.2 opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Card/0000755000175000017500000000000011377667226022747 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Card/Makefile.am0000644000175000017500000000372411377667226025011 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_CardProvider.la libcmpiPhysicalAsset_OpenDRIM_CardProvider_la_SOURCES = OpenDRIM_CardAccess.cpp OpenDRIM_CardProvider.cpp cmpiOpenDRIM_Card.cpp libcmpiPhysicalAsset_OpenDRIM_CardProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la libcmpiPhysicalAsset_OpenDRIM_CardProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_Card.h OpenDRIM_Card.h OpenDRIM_CardAccess.h opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Card/OpenDRIM_Card.h0000644000175000017500000004435311377667226025437 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_CARD_H_ #define OPENDRIM_CARD_H_ #include const static char* OpenDRIM_Card_classnames[] = {"OpenDRIM_Card"}; static string OpenDRIM_Card_NAMESPACE = _NAMESPACE; class OpenDRIM_Card { public: string Caption; bool Caption_isNULL; string InstallDate; bool InstallDate_isNULL; string Name; bool Name_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; string Tag; bool Tag_isNULL; string Description; bool Description_isNULL; string CreationClassName; bool CreationClassName_isNULL; string ElementName; bool ElementName_isNULL; string Manufacturer; bool Manufacturer_isNULL; string Model; bool Model_isNULL; string SKU; bool SKU_isNULL; string SerialNumber; bool SerialNumber_isNULL; string Version; bool Version_isNULL; string PartNumber; bool PartNumber_isNULL; string OtherIdentifyingInfo; bool OtherIdentifyingInfo_isNULL; bool PoweredOn; bool PoweredOn_isNULL; string ManufactureDate; bool ManufactureDate_isNULL; string VendorEquipmentType; bool VendorEquipmentType_isNULL; string UserTracking; bool UserTracking_isNULL; bool CanBeFRUed; bool CanBeFRUed_isNULL; unsigned short RemovalConditions; bool RemovalConditions_isNULL; bool Removable; bool Removable_isNULL; bool Replaceable; bool Replaceable_isNULL; bool HotSwappable; bool HotSwappable_isNULL; float Height; bool Height_isNULL; float Depth; bool Depth_isNULL; float Width; bool Width_isNULL; float Weight; bool Weight_isNULL; unsigned short PackageType; bool PackageType_isNULL; string OtherPackageType; bool OtherPackageType_isNULL; vector VendorCompatibilityStrings; bool VendorCompatibilityStrings_isNULL; bool HostingBoard; bool HostingBoard_isNULL; string SlotLayout; bool SlotLayout_isNULL; bool RequiresDaughterBoard; bool RequiresDaughterBoard_isNULL; bool SpecialRequirements; bool SpecialRequirements_isNULL; string RequirementsDescription; bool RequirementsDescription_isNULL; vector OperatingVoltages; bool OperatingVoltages_isNULL; OpenDRIM_Card() { Caption_isNULL = true; InstallDate_isNULL = true; Name_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; Tag_isNULL = true; Description_isNULL = true; CreationClassName_isNULL = true; ElementName_isNULL = true; Manufacturer_isNULL = true; Model_isNULL = true; SKU_isNULL = true; SerialNumber_isNULL = true; Version_isNULL = true; PartNumber_isNULL = true; OtherIdentifyingInfo_isNULL = true; PoweredOn_isNULL = true; ManufactureDate_isNULL = true; VendorEquipmentType_isNULL = true; UserTracking_isNULL = true; CanBeFRUed_isNULL = true; RemovalConditions_isNULL = true; Removable_isNULL = true; Replaceable_isNULL = true; HotSwappable_isNULL = true; Height_isNULL = true; Depth_isNULL = true; Width_isNULL = true; Weight_isNULL = true; PackageType_isNULL = true; OtherPackageType_isNULL = true; VendorCompatibilityStrings_isNULL = true; HostingBoard_isNULL = true; SlotLayout_isNULL = true; RequiresDaughterBoard_isNULL = true; SpecialRequirements_isNULL = true; RequirementsDescription_isNULL = true; OperatingVoltages_isNULL = true; } ~OpenDRIM_Card() {} string getKeys() const { return CF_toLowCase(".Tag=\"" + CF_quoteString(Tag) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""); } 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 getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getTag(string& value) const { if (Tag_isNULL==true) return NOT_FOUND; value = Tag; return OK; } int setTag(const string& newValue) { Tag = newValue; Tag_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 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 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 getManufacturer(string& value) const { if (Manufacturer_isNULL==true) return NOT_FOUND; value = Manufacturer; return OK; } int setManufacturer(const string& newValue) { Manufacturer = newValue; Manufacturer_isNULL = false; return OK; } int getModel(string& value) const { if (Model_isNULL==true) return NOT_FOUND; value = Model; return OK; } int setModel(const string& newValue) { Model = newValue; Model_isNULL = false; return OK; } int getSKU(string& value) const { if (SKU_isNULL==true) return NOT_FOUND; value = SKU; return OK; } int setSKU(const string& newValue) { SKU = newValue; SKU_isNULL = false; return OK; } int getSerialNumber(string& value) const { if (SerialNumber_isNULL==true) return NOT_FOUND; value = SerialNumber; return OK; } int setSerialNumber(const string& newValue) { SerialNumber = newValue; SerialNumber_isNULL = false; return OK; } int getVersion(string& value) const { if (Version_isNULL==true) return NOT_FOUND; value = Version; return OK; } int setVersion(const string& newValue) { Version = newValue; Version_isNULL = false; return OK; } int getPartNumber(string& value) const { if (PartNumber_isNULL==true) return NOT_FOUND; value = PartNumber; return OK; } int setPartNumber(const string& newValue) { PartNumber = newValue; PartNumber_isNULL = false; return OK; } int getOtherIdentifyingInfo(string& value) const { if (OtherIdentifyingInfo_isNULL==true) return NOT_FOUND; value = OtherIdentifyingInfo; return OK; } int setOtherIdentifyingInfo(const string& newValue) { OtherIdentifyingInfo = newValue; OtherIdentifyingInfo_isNULL = false; return OK; } int getPoweredOn(bool& value) const { if (PoweredOn_isNULL==true) return NOT_FOUND; value = PoweredOn; return OK; } int setPoweredOn(const bool& newValue) { PoweredOn = newValue; PoweredOn_isNULL = false; return OK; } int getManufactureDate(string& value) const { if (ManufactureDate_isNULL==true) return NOT_FOUND; value = ManufactureDate; return OK; } int setManufactureDate(const string& newValue) { ManufactureDate = newValue; ManufactureDate_isNULL = false; return OK; } int getVendorEquipmentType(string& value) const { if (VendorEquipmentType_isNULL==true) return NOT_FOUND; value = VendorEquipmentType; return OK; } int setVendorEquipmentType(const string& newValue) { VendorEquipmentType = newValue; VendorEquipmentType_isNULL = false; return OK; } int getUserTracking(string& value) const { if (UserTracking_isNULL==true) return NOT_FOUND; value = UserTracking; return OK; } int setUserTracking(const string& newValue) { UserTracking = newValue; UserTracking_isNULL = false; return OK; } int getCanBeFRUed(bool& value) const { if (CanBeFRUed_isNULL==true) return NOT_FOUND; value = CanBeFRUed; return OK; } int setCanBeFRUed(const bool& newValue) { CanBeFRUed = newValue; CanBeFRUed_isNULL = false; return OK; } int getRemovalConditions(unsigned short& value) const { if (RemovalConditions_isNULL==true) return NOT_FOUND; value = RemovalConditions; return OK; } int setRemovalConditions(const unsigned short& newValue) { RemovalConditions = newValue; RemovalConditions_isNULL = false; return OK; } int getRemovable(bool& value) const { if (Removable_isNULL==true) return NOT_FOUND; value = Removable; return OK; } int setRemovable(const bool& newValue) { Removable = newValue; Removable_isNULL = false; return OK; } int getReplaceable(bool& value) const { if (Replaceable_isNULL==true) return NOT_FOUND; value = Replaceable; return OK; } int setReplaceable(const bool& newValue) { Replaceable = newValue; Replaceable_isNULL = false; return OK; } int getHotSwappable(bool& value) const { if (HotSwappable_isNULL==true) return NOT_FOUND; value = HotSwappable; return OK; } int setHotSwappable(const bool& newValue) { HotSwappable = newValue; HotSwappable_isNULL = false; return OK; } int getHeight(float& value) const { if (Height_isNULL==true) return NOT_FOUND; value = Height; return OK; } int setHeight(const float& newValue) { Height = newValue; Height_isNULL = false; return OK; } int getDepth(float& value) const { if (Depth_isNULL==true) return NOT_FOUND; value = Depth; return OK; } int setDepth(const float& newValue) { Depth = newValue; Depth_isNULL = false; return OK; } int getWidth(float& value) const { if (Width_isNULL==true) return NOT_FOUND; value = Width; return OK; } int setWidth(const float& newValue) { Width = newValue; Width_isNULL = false; return OK; } int getWeight(float& value) const { if (Weight_isNULL==true) return NOT_FOUND; value = Weight; return OK; } int setWeight(const float& newValue) { Weight = newValue; Weight_isNULL = false; return OK; } int getPackageType(unsigned short& value) const { if (PackageType_isNULL==true) return NOT_FOUND; value = PackageType; return OK; } int setPackageType(const unsigned short& newValue) { PackageType = newValue; PackageType_isNULL = false; return OK; } int getOtherPackageType(string& value) const { if (OtherPackageType_isNULL==true) return NOT_FOUND; value = OtherPackageType; return OK; } int setOtherPackageType(const string& newValue) { OtherPackageType = newValue; OtherPackageType_isNULL = false; return OK; } int getVendorCompatibilityStrings(vector& value) const { if (VendorCompatibilityStrings_isNULL==true) return NOT_FOUND; value = VendorCompatibilityStrings; return OK; } int setVendorCompatibilityStrings(const vector& newValue) { VendorCompatibilityStrings = newValue; VendorCompatibilityStrings_isNULL = false; return OK; } int getHostingBoard(bool& value) const { if (HostingBoard_isNULL==true) return NOT_FOUND; value = HostingBoard; return OK; } int setHostingBoard(const bool& newValue) { HostingBoard = newValue; HostingBoard_isNULL = false; return OK; } int getSlotLayout(string& value) const { if (SlotLayout_isNULL==true) return NOT_FOUND; value = SlotLayout; return OK; } int setSlotLayout(const string& newValue) { SlotLayout = newValue; SlotLayout_isNULL = false; return OK; } int getRequiresDaughterBoard(bool& value) const { if (RequiresDaughterBoard_isNULL==true) return NOT_FOUND; value = RequiresDaughterBoard; return OK; } int setRequiresDaughterBoard(const bool& newValue) { RequiresDaughterBoard = newValue; RequiresDaughterBoard_isNULL = false; return OK; } int getSpecialRequirements(bool& value) const { if (SpecialRequirements_isNULL==true) return NOT_FOUND; value = SpecialRequirements; return OK; } int setSpecialRequirements(const bool& newValue) { SpecialRequirements = newValue; SpecialRequirements_isNULL = false; return OK; } int getRequirementsDescription(string& value) const { if (RequirementsDescription_isNULL==true) return NOT_FOUND; value = RequirementsDescription; return OK; } int setRequirementsDescription(const string& newValue) { RequirementsDescription = newValue; RequirementsDescription_isNULL = false; return OK; } int getOperatingVoltages(vector& value) const { if (OperatingVoltages_isNULL==true) return NOT_FOUND; value = OperatingVoltages; return OK; } int setOperatingVoltages(const vector& newValue) { OperatingVoltages = newValue; OperatingVoltages_isNULL = false; return OK; } }; class OpenDRIM_Card_IsCompatible_In { public: Objectpath ElementToCheck; bool ElementToCheck_isNULL; OpenDRIM_Card_IsCompatible_In() { ElementToCheck_isNULL = true; } ~OpenDRIM_Card_IsCompatible_In() {} int getElementToCheck(Objectpath& value) const { if (ElementToCheck_isNULL == true) return NOT_FOUND; value = ElementToCheck; return OK; } int setElementToCheck(const Objectpath& newValue) { ElementToCheck = newValue; ElementToCheck_isNULL = false; return OK; } }; class OpenDRIM_Card_ConnectorPower_In { public: Objectpath Connector; bool Connector_isNULL; bool PoweredOn; bool PoweredOn_isNULL; OpenDRIM_Card_ConnectorPower_In() { Connector_isNULL = true; PoweredOn_isNULL = true; } ~OpenDRIM_Card_ConnectorPower_In() {} int getConnector(Objectpath& value) const { if (Connector_isNULL == true) return NOT_FOUND; value = Connector; return OK; } int setConnector(const Objectpath& newValue) { Connector = newValue; Connector_isNULL = false; return OK; } int getPoweredOn(bool& value) const { if (PoweredOn_isNULL == true) return NOT_FOUND; value = PoweredOn; return OK; } int setPoweredOn(const bool& newValue) { PoweredOn = newValue; PoweredOn_isNULL = false; return OK; } }; #endif /*OPENDRIM_CARD_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Card/cmpiOpenDRIM_Card.cpp0000644000175000017500000003026611377667226026641 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Card.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_Card_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Card& instance) { _E_; Objectpath op(broker, OpenDRIM_Card_classnames[0], OpenDRIM_Card_NAMESPACE); if (!instance.Tag_isNULL) op.addKey("Tag", instance.Tag); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_Card_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Card& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_Card_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.Name_isNULL) ci.setProperty("Name", instance.Name); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.Manufacturer_isNULL) ci.setProperty("Manufacturer", instance.Manufacturer); if (!instance.Model_isNULL) ci.setProperty("Model", instance.Model); if (!instance.SKU_isNULL) ci.setProperty("SKU", instance.SKU); if (!instance.SerialNumber_isNULL) ci.setProperty("SerialNumber", instance.SerialNumber); if (!instance.Version_isNULL) ci.setProperty("Version", instance.Version); if (!instance.PartNumber_isNULL) ci.setProperty("PartNumber", instance.PartNumber); if (!instance.OtherIdentifyingInfo_isNULL) ci.setProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo); if (!instance.PoweredOn_isNULL) ci.setProperty("PoweredOn", instance.PoweredOn); if (!instance.ManufactureDate_isNULL) ci.setPropertyDatetime("ManufactureDate", instance.ManufactureDate); if (!instance.VendorEquipmentType_isNULL) ci.setProperty("VendorEquipmentType", instance.VendorEquipmentType); if (!instance.UserTracking_isNULL) ci.setProperty("UserTracking", instance.UserTracking); if (!instance.CanBeFRUed_isNULL) ci.setProperty("CanBeFRUed", instance.CanBeFRUed); if (!instance.RemovalConditions_isNULL) ci.setProperty("RemovalConditions", instance.RemovalConditions); if (!instance.Removable_isNULL) ci.setProperty("Removable", instance.Removable); if (!instance.Replaceable_isNULL) ci.setProperty("Replaceable", instance.Replaceable); if (!instance.HotSwappable_isNULL) ci.setProperty("HotSwappable", instance.HotSwappable); if (!instance.Height_isNULL) ci.setProperty("Height", instance.Height); if (!instance.Depth_isNULL) ci.setProperty("Depth", instance.Depth); if (!instance.Width_isNULL) ci.setProperty("Width", instance.Width); if (!instance.Weight_isNULL) ci.setProperty("Weight", instance.Weight); if (!instance.PackageType_isNULL) ci.setProperty("PackageType", instance.PackageType); if (!instance.OtherPackageType_isNULL) ci.setProperty("OtherPackageType", instance.OtherPackageType); if (!instance.VendorCompatibilityStrings_isNULL) ci.setProperty("VendorCompatibilityStrings", instance.VendorCompatibilityStrings); if (!instance.HostingBoard_isNULL) ci.setProperty("HostingBoard", instance.HostingBoard); if (!instance.SlotLayout_isNULL) ci.setProperty("SlotLayout", instance.SlotLayout); if (!instance.RequiresDaughterBoard_isNULL) ci.setProperty("RequiresDaughterBoard", instance.RequiresDaughterBoard); if (!instance.SpecialRequirements_isNULL) ci.setProperty("SpecialRequirements", instance.SpecialRequirements); if (!instance.RequirementsDescription_isNULL) ci.setProperty("RequirementsDescription", instance.RequirementsDescription); if (!instance.OperatingVoltages_isNULL) ci.setProperty("OperatingVoltages", instance.OperatingVoltages); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_Card_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Card& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (op.getKey("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_Card_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Card& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("Manufacturer", instance.Manufacturer) == OK) instance.Manufacturer_isNULL = false; if (inst.getProperty("Model", instance.Model) == OK) instance.Model_isNULL = false; if (inst.getProperty("SKU", instance.SKU) == OK) instance.SKU_isNULL = false; if (inst.getProperty("SerialNumber", instance.SerialNumber) == OK) instance.SerialNumber_isNULL = false; if (inst.getProperty("Version", instance.Version) == OK) instance.Version_isNULL = false; if (inst.getProperty("PartNumber", instance.PartNumber) == OK) instance.PartNumber_isNULL = false; if (inst.getProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo) == OK) instance.OtherIdentifyingInfo_isNULL = false; if (inst.getProperty("PoweredOn", instance.PoweredOn) == OK) instance.PoweredOn_isNULL = false; if (inst.getPropertyDatetime("ManufactureDate", instance.ManufactureDate) == OK) instance.ManufactureDate_isNULL = false; if (inst.getProperty("VendorEquipmentType", instance.VendorEquipmentType) == OK) instance.VendorEquipmentType_isNULL = false; if (inst.getProperty("UserTracking", instance.UserTracking) == OK) instance.UserTracking_isNULL = false; if (inst.getProperty("CanBeFRUed", instance.CanBeFRUed) == OK) instance.CanBeFRUed_isNULL = false; if (inst.getProperty("RemovalConditions", instance.RemovalConditions) == OK) instance.RemovalConditions_isNULL = false; if (inst.getProperty("Removable", instance.Removable) == OK) instance.Removable_isNULL = false; if (inst.getProperty("Replaceable", instance.Replaceable) == OK) instance.Replaceable_isNULL = false; if (inst.getProperty("HotSwappable", instance.HotSwappable) == OK) instance.HotSwappable_isNULL = false; if (inst.getProperty("Height", instance.Height) == OK) instance.Height_isNULL = false; if (inst.getProperty("Depth", instance.Depth) == OK) instance.Depth_isNULL = false; if (inst.getProperty("Width", instance.Width) == OK) instance.Width_isNULL = false; if (inst.getProperty("Weight", instance.Weight) == OK) instance.Weight_isNULL = false; if (inst.getProperty("PackageType", instance.PackageType) == OK) instance.PackageType_isNULL = false; if (inst.getProperty("OtherPackageType", instance.OtherPackageType) == OK) instance.OtherPackageType_isNULL = false; if (inst.getProperty("VendorCompatibilityStrings", instance.VendorCompatibilityStrings) == OK) instance.VendorCompatibilityStrings_isNULL = false; if (inst.getProperty("HostingBoard", instance.HostingBoard) == OK) instance.HostingBoard_isNULL = false; if (inst.getProperty("SlotLayout", instance.SlotLayout) == OK) instance.SlotLayout_isNULL = false; if (inst.getProperty("RequiresDaughterBoard", instance.RequiresDaughterBoard) == OK) instance.RequiresDaughterBoard_isNULL = false; if (inst.getProperty("SpecialRequirements", instance.SpecialRequirements) == OK) instance.SpecialRequirements_isNULL = false; if (inst.getProperty("RequirementsDescription", instance.RequirementsDescription) == OK) instance.RequirementsDescription_isNULL = false; if (inst.getProperty("OperatingVoltages", instance.OperatingVoltages) == OK) instance.OperatingVoltages_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_Card_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_Card_IsCompatible_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath ElementToCheck; data = in->ft->getArg(in, "ElementToCheck", &rc); if (rc.rc == OK) { CT_ToC(broker, data, ElementToCheck); args.setElementToCheck(ElementToCheck); } _L_; } void PhysicalAsset_OpenDRIM_Card_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_Card_ConnectorPower_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath Connector; data = in->ft->getArg(in, "Connector", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Connector); args.setConnector(Connector); } bool PoweredOn; data = in->ft->getArg(in, "PoweredOn", &rc); if (rc.rc == OK) { CT_ToC(data, PoweredOn); args.setPoweredOn(PoweredOn); } _L_; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Card/OpenDRIM_CardAccess.h0000644000175000017500000000626611377667226026562 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_CARDACCESS_H_ #define OPENDRIM_CARDACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_Card.h" int PhysicalAsset_OpenDRIM_Card_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_Card_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_Card_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_Card_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Card& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_Card_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Card& newInstance, const OpenDRIM_Card& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_Card_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Card& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_Card_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Card& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_Card_IsCompatible(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Card& instance, unsigned int& returnValue, const OpenDRIM_Card_IsCompatible_In& in, string& errorMessage); int PhysicalAsset_OpenDRIM_Card_ConnectorPower(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Card& instance, unsigned int& returnValue, const OpenDRIM_Card_ConnectorPower_In& in, string& errorMessage); int PhysicalAsset_OpenDRIM_Card_populate(OpenDRIM_Card& instance, string& errorMessage); #endif /*OPENDRIM_CARDACCESS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Card/OpenDRIM_CardAccess.cpp0000644000175000017500000000665411377667226027116 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_CardAccess.h" int PhysicalAsset_OpenDRIM_Card_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Card_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Card_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_Card_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Card& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_Card_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Card& newInstance, const OpenDRIM_Card& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Card_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Card& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Card_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Card& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Card_IsCompatible(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Card& instance, unsigned int& returnValue, const OpenDRIM_Card_IsCompatible_In& in, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Card_ConnectorPower(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Card& instance, unsigned int& returnValue, const OpenDRIM_Card_ConnectorPower_In& in, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Card_populate(OpenDRIM_Card& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Card/OpenDRIM_CardProvider.cpp0000644000175000017500000003247511377667226027507 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Card.h" #include "OpenDRIM_CardAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_CardProviderSetInstance PhysicalAsset_OpenDRIM_CardProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_Card_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_Card_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_CardProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_Card_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_CardProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Card_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Card_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_Card_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_CardProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_Card_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Card_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_Card_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_CardProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Card instance; PhysicalAsset_OpenDRIM_Card_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Card_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Card_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_Card_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_CardProviderSetInstance(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_Card newInstance, oldInstance; PhysicalAsset_OpenDRIM_Card_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_Card_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Card_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Card_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Card_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Card_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_CardProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Card instance; PhysicalAsset_OpenDRIM_Card_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Card_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_Card_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Card_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Card_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Card_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Card_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_Card_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_CardProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Card instance; PhysicalAsset_OpenDRIM_Card_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Card_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Card_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Card_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Card_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_CardProviderExecQuery(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 PhysicalAsset_OpenDRIM_CardProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_Card_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_CardProviderInvokeMethod(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_Card instance; PhysicalAsset_OpenDRIM_Card_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"CreationClassName", "Tag"}; int errorCode = PhysicalAsset_OpenDRIM_Card_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Card_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="IsCompatible") { unsigned int returnValue; OpenDRIM_Card_IsCompatible_In inArgs; PhysicalAsset_OpenDRIM_Card_toCPP(_broker, in, inArgs); errorCode = PhysicalAsset_OpenDRIM_Card_IsCompatible(_broker, ctx, instance, returnValue, inArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Card_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 =="ConnectorPower") { unsigned int returnValue; OpenDRIM_Card_ConnectorPower_In inArgs; PhysicalAsset_OpenDRIM_Card_toCPP(_broker, in, inArgs); errorCode = PhysicalAsset_OpenDRIM_Card_ConnectorPower(_broker, ctx, instance, returnValue, inArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Card_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_Card_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 PhysicalAsset_OpenDRIM_Card_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Card_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_Card_init FAILED: " + (string) OpenDRIM_Card_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_Card_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Card_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_Card_unload FAILED: " + (string) OpenDRIM_Card_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_Card_INIT if (PhysicalAsset_OpenDRIM_Card_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_CardProvider, PhysicalAsset_OpenDRIM_CardProvider, _broker, PhysicalAsset_OpenDRIM_Card_INIT); CMMethodMIStub(PhysicalAsset_OpenDRIM_CardProvider, PhysicalAsset_OpenDRIM_CardProvider, _broker, PhysicalAsset_OpenDRIM_Card_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Card/cmpiOpenDRIM_Card.h0000644000175000017500000000450211377667226026300 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_CARD_H_ #define CMPIOPENDRIM_CARD_H_ #include "OpenDRIM_Card.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_Card_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Card& instance); CMPIInstance* PhysicalAsset_OpenDRIM_Card_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Card& instance); void PhysicalAsset_OpenDRIM_Card_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Card& instance); void PhysicalAsset_OpenDRIM_Card_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Card& instance); void PhysicalAsset_OpenDRIM_Card_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_Card_IsCompatible_In& args); void PhysicalAsset_OpenDRIM_Card_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_Card_ConnectorPower_In& args); #endif /*CMPIOPENDRIM_CARD_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/test/0000755000175000017500000000000011377667226021420 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_ComputerSystemPackage.cpp0000644000175000017500000001137511377667226030747 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_ComputerSystemPackage.h" #include "OpenDRIM_ComputerSystemPackageAccess.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_ComputerSystemPackage& instance) { os << " [OpenDRIM_ComputerSystemPackage]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); ToString("PlatformGUID", PlatformGUID, PlatformGUID_isNULL); os << " [\\OpenDRIM_ComputerSystemPackage]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_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 = PhysicalAsset_OpenDRIM_ComputerSystemPackage_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 = PhysicalAsset_OpenDRIM_ComputerSystemPackage_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 = PhysicalAsset_OpenDRIM_ComputerSystemPackage_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_Realizes.cpp0000644000175000017500000001104311377667226026236 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Realizes.h" #include "OpenDRIM_RealizesAccess.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_Realizes& instance) { os << " [OpenDRIM_Realizes]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); os << " [\\OpenDRIM_Realizes]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Realizes_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_Realizes_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 = PhysicalAsset_OpenDRIM_Realizes_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 = PhysicalAsset_OpenDRIM_Realizes_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 = PhysicalAsset_OpenDRIM_Realizes_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_Card.cpp0000644000175000017500000001616211377667226025340 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Card.h" #include "OpenDRIM_CardAccess.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_Card& instance) { os << " [OpenDRIM_Card]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToString("Name", Name, Name_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToString("Tag", Tag, Tag_isNULL); ToString("Description", Description, Description_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("Manufacturer", Manufacturer, Manufacturer_isNULL); ToString("Model", Model, Model_isNULL); ToString("SKU", SKU, SKU_isNULL); ToString("SerialNumber", SerialNumber, SerialNumber_isNULL); ToString("Version", Version, Version_isNULL); ToString("PartNumber", PartNumber, PartNumber_isNULL); ToString("OtherIdentifyingInfo", OtherIdentifyingInfo, OtherIdentifyingInfo_isNULL); ToString("PoweredOn", PoweredOn, PoweredOn_isNULL); ToString("ManufactureDate", ManufactureDate, ManufactureDate_isNULL); ToString("VendorEquipmentType", VendorEquipmentType, VendorEquipmentType_isNULL); ToString("UserTracking", UserTracking, UserTracking_isNULL); ToString("CanBeFRUed", CanBeFRUed, CanBeFRUed_isNULL); ToStringInt("RemovalConditions", RemovalConditions, RemovalConditions_isNULL); ToString("Removable", Removable, Removable_isNULL); ToString("Replaceable", Replaceable, Replaceable_isNULL); ToString("HotSwappable", HotSwappable, HotSwappable_isNULL); ToString("Height", Height, Height_isNULL); ToString("Depth", Depth, Depth_isNULL); ToString("Width", Width, Width_isNULL); ToString("Weight", Weight, Weight_isNULL); ToStringInt("PackageType", PackageType, PackageType_isNULL); ToString("OtherPackageType", OtherPackageType, OtherPackageType_isNULL); ToStringArray("VendorCompatibilityStrings", VendorCompatibilityStrings, VendorCompatibilityStrings_isNULL); ToString("HostingBoard", HostingBoard, HostingBoard_isNULL); ToString("SlotLayout", SlotLayout, SlotLayout_isNULL); ToString("RequiresDaughterBoard", RequiresDaughterBoard, RequiresDaughterBoard_isNULL); ToString("SpecialRequirements", SpecialRequirements, SpecialRequirements_isNULL); ToString("RequirementsDescription", RequirementsDescription, RequirementsDescription_isNULL); ToStringArrayInt("OperatingVoltages", OperatingVoltages, OperatingVoltages_isNULL); os << " [\\OpenDRIM_Card]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Card_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_Card_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 = PhysicalAsset_OpenDRIM_Card_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 = PhysicalAsset_OpenDRIM_Card_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 = PhysicalAsset_OpenDRIM_Card_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/Makefile.am0000644000175000017500000002574111377667226023465 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ noinst_PROGRAMS = testOpenDRIM_PhysicalComponent testOpenDRIM_ConnectedTo testOpenDRIM_PhysicalFrame testOpenDRIM_ComputerSystemPackage testOpenDRIM_Realizes testOpenDRIM_PhysicalPackageCapacity testOpenDRIM_ConfigurationCapacity testOpenDRIM_PhysicalPackage testOpenDRIM_PhysicalMemory testOpenDRIM_PhysicalAssetCapabilities testOpenDRIM_PhysicalElementInConnector testOpenDRIM_SystemPackaging testOpenDRIM_Chip testOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement testOpenDRIM_PhysicalAssetRegisteredProfile testOpenDRIM_Chassis testOpenDRIM_PhysicalAssetConformsToProfile testOpenDRIM_PhysicalElementPackage testOpenDRIM_PhysicalConnector testOpenDRIM_Rack testOpenDRIM_Card testOpenDRIM_Slot testOpenDRIM_PhysicalComponent_CPPFLAGS = -I../OpenDRIM_PhysicalComponent/ testOpenDRIM_PhysicalComponent_SOURCES = testOpenDRIM_PhysicalComponent.cpp testOpenDRIM_PhysicalComponent_LDADD = ../OpenDRIM_PhysicalComponent/libcmpiPhysicalAsset_OpenDRIM_PhysicalComponentProvider.la test-OpenDRIM_PhysicalComponent: testOpenDRIM_PhysicalComponent ./testOpenDRIM_PhysicalComponent # May have to be adjusted for direct invocation testOpenDRIM_ConnectedTo_CPPFLAGS = -I../OpenDRIM_ConnectedTo/ -I../null/ -I../null/ testOpenDRIM_ConnectedTo_SOURCES = testOpenDRIM_ConnectedTo.cpp testOpenDRIM_ConnectedTo_LDADD = ../OpenDRIM_ConnectedTo/libcmpiPhysicalAsset_OpenDRIM_ConnectedToProvider.la test-OpenDRIM_ConnectedTo: testOpenDRIM_ConnectedTo ./testOpenDRIM_ConnectedTo testOpenDRIM_PhysicalFrame_CPPFLAGS = -I../OpenDRIM_PhysicalFrame/ testOpenDRIM_PhysicalFrame_SOURCES = testOpenDRIM_PhysicalFrame.cpp testOpenDRIM_PhysicalFrame_LDADD = ../OpenDRIM_PhysicalFrame/libcmpiPhysicalAsset_OpenDRIM_PhysicalFrameProvider.la test-OpenDRIM_PhysicalFrame: testOpenDRIM_PhysicalFrame ./testOpenDRIM_PhysicalFrame # May have to be adjusted for direct invocation testOpenDRIM_ComputerSystemPackage_CPPFLAGS = -I../OpenDRIM_ComputerSystemPackage/ -I../null/ -I../null/ testOpenDRIM_ComputerSystemPackage_SOURCES = testOpenDRIM_ComputerSystemPackage.cpp testOpenDRIM_ComputerSystemPackage_LDADD = ../OpenDRIM_ComputerSystemPackage/libcmpiPhysicalAsset_OpenDRIM_ComputerSystemPackageProvider.la test-OpenDRIM_ComputerSystemPackage: testOpenDRIM_ComputerSystemPackage ./testOpenDRIM_ComputerSystemPackage # May have to be adjusted for direct invocation testOpenDRIM_Realizes_CPPFLAGS = -I../OpenDRIM_Realizes/ -I../null/ -I../null/ testOpenDRIM_Realizes_SOURCES = testOpenDRIM_Realizes.cpp testOpenDRIM_Realizes_LDADD = ../OpenDRIM_Realizes/libcmpiPhysicalAsset_OpenDRIM_RealizesProvider.la test-OpenDRIM_Realizes: testOpenDRIM_Realizes ./testOpenDRIM_Realizes # May have to be adjusted for direct invocation testOpenDRIM_PhysicalPackageCapacity_CPPFLAGS = -I../OpenDRIM_PhysicalPackageCapacity/ -I../null/ -I../null/ testOpenDRIM_PhysicalPackageCapacity_SOURCES = testOpenDRIM_PhysicalPackageCapacity.cpp testOpenDRIM_PhysicalPackageCapacity_LDADD = ../OpenDRIM_PhysicalPackageCapacity/libcmpiPhysicalAsset_OpenDRIM_PhysicalPackageCapacityProvider.la test-OpenDRIM_PhysicalPackageCapacity: testOpenDRIM_PhysicalPackageCapacity ./testOpenDRIM_PhysicalPackageCapacity testOpenDRIM_ConfigurationCapacity_CPPFLAGS = -I../OpenDRIM_ConfigurationCapacity/ testOpenDRIM_ConfigurationCapacity_SOURCES = testOpenDRIM_ConfigurationCapacity.cpp testOpenDRIM_ConfigurationCapacity_LDADD = ../OpenDRIM_ConfigurationCapacity/libcmpiPhysicalAsset_OpenDRIM_ConfigurationCapacityProvider.la test-OpenDRIM_ConfigurationCapacity: testOpenDRIM_ConfigurationCapacity ./testOpenDRIM_ConfigurationCapacity testOpenDRIM_PhysicalPackage_CPPFLAGS = -I../OpenDRIM_PhysicalPackage/ testOpenDRIM_PhysicalPackage_SOURCES = testOpenDRIM_PhysicalPackage.cpp testOpenDRIM_PhysicalPackage_LDADD = ../OpenDRIM_PhysicalPackage/libcmpiPhysicalAsset_OpenDRIM_PhysicalPackageProvider.la test-OpenDRIM_PhysicalPackage: testOpenDRIM_PhysicalPackage ./testOpenDRIM_PhysicalPackage testOpenDRIM_PhysicalMemory_CPPFLAGS = -I../OpenDRIM_PhysicalMemory/ testOpenDRIM_PhysicalMemory_SOURCES = testOpenDRIM_PhysicalMemory.cpp testOpenDRIM_PhysicalMemory_LDADD = ../OpenDRIM_PhysicalMemory/libcmpiPhysicalAsset_OpenDRIM_PhysicalMemoryProvider.la test-OpenDRIM_PhysicalMemory: testOpenDRIM_PhysicalMemory ./testOpenDRIM_PhysicalMemory testOpenDRIM_PhysicalAssetCapabilities_CPPFLAGS = -I../OpenDRIM_PhysicalAssetCapabilities/ testOpenDRIM_PhysicalAssetCapabilities_SOURCES = testOpenDRIM_PhysicalAssetCapabilities.cpp testOpenDRIM_PhysicalAssetCapabilities_LDADD = ../OpenDRIM_PhysicalAssetCapabilities/libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProvider.la test-OpenDRIM_PhysicalAssetCapabilities: testOpenDRIM_PhysicalAssetCapabilities ./testOpenDRIM_PhysicalAssetCapabilities # May have to be adjusted for direct invocation testOpenDRIM_PhysicalElementInConnector_CPPFLAGS = -I../OpenDRIM_PhysicalElementInConnector/ -I../null/ -I../null/ testOpenDRIM_PhysicalElementInConnector_SOURCES = testOpenDRIM_PhysicalElementInConnector.cpp testOpenDRIM_PhysicalElementInConnector_LDADD = ../OpenDRIM_PhysicalElementInConnector/libcmpiPhysicalAsset_OpenDRIM_PhysicalElementInConnectorProvider.la test-OpenDRIM_PhysicalElementInConnector: testOpenDRIM_PhysicalElementInConnector ./testOpenDRIM_PhysicalElementInConnector # May have to be adjusted for direct invocation testOpenDRIM_SystemPackaging_CPPFLAGS = -I../OpenDRIM_SystemPackaging/ -I../null/ -I../null/ testOpenDRIM_SystemPackaging_SOURCES = testOpenDRIM_SystemPackaging.cpp testOpenDRIM_SystemPackaging_LDADD = ../OpenDRIM_SystemPackaging/libcmpiPhysicalAsset_OpenDRIM_SystemPackagingProvider.la test-OpenDRIM_SystemPackaging: testOpenDRIM_SystemPackaging ./testOpenDRIM_SystemPackaging testOpenDRIM_Chip_CPPFLAGS = -I../OpenDRIM_Chip/ testOpenDRIM_Chip_SOURCES = testOpenDRIM_Chip.cpp testOpenDRIM_Chip_LDADD = ../OpenDRIM_Chip/libcmpiPhysicalAsset_OpenDRIM_ChipProvider.la test-OpenDRIM_Chip: testOpenDRIM_Chip ./testOpenDRIM_Chip # May have to be adjusted for direct invocation testOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_CPPFLAGS = -I../OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/ -I../null/ -I../null/ testOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_SOURCES = testOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.cpp testOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_LDADD = ../OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider.la test-OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement: testOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement ./testOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement testOpenDRIM_PhysicalAssetRegisteredProfile_CPPFLAGS = -I../OpenDRIM_PhysicalAssetRegisteredProfile/ testOpenDRIM_PhysicalAssetRegisteredProfile_SOURCES = testOpenDRIM_PhysicalAssetRegisteredProfile.cpp testOpenDRIM_PhysicalAssetRegisteredProfile_LDADD = ../OpenDRIM_PhysicalAssetRegisteredProfile/libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProvider.la test-OpenDRIM_PhysicalAssetRegisteredProfile: testOpenDRIM_PhysicalAssetRegisteredProfile ./testOpenDRIM_PhysicalAssetRegisteredProfile testOpenDRIM_Chassis_CPPFLAGS = -I../OpenDRIM_Chassis/ testOpenDRIM_Chassis_SOURCES = testOpenDRIM_Chassis.cpp testOpenDRIM_Chassis_LDADD = ../OpenDRIM_Chassis/libcmpiPhysicalAsset_OpenDRIM_ChassisProvider.la test-OpenDRIM_Chassis: testOpenDRIM_Chassis ./testOpenDRIM_Chassis # May have to be adjusted for direct invocation testOpenDRIM_PhysicalAssetConformsToProfile_CPPFLAGS = -I../OpenDRIM_PhysicalAssetConformsToProfile/ -I../null/ -I../null/ testOpenDRIM_PhysicalAssetConformsToProfile_SOURCES = testOpenDRIM_PhysicalAssetConformsToProfile.cpp testOpenDRIM_PhysicalAssetConformsToProfile_LDADD = ../OpenDRIM_PhysicalAssetConformsToProfile/libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProvider.la test-OpenDRIM_PhysicalAssetConformsToProfile: testOpenDRIM_PhysicalAssetConformsToProfile ./testOpenDRIM_PhysicalAssetConformsToProfile # May have to be adjusted for direct invocation testOpenDRIM_PhysicalElementPackage_CPPFLAGS = -I../OpenDRIM_PhysicalElementPackage/ -I../null/ -I../null/ testOpenDRIM_PhysicalElementPackage_SOURCES = testOpenDRIM_PhysicalElementPackage.cpp testOpenDRIM_PhysicalElementPackage_LDADD = ../OpenDRIM_PhysicalElementPackage/libcmpiPhysicalAsset_OpenDRIM_PhysicalElementPackageProvider.la test-OpenDRIM_PhysicalElementPackage: testOpenDRIM_PhysicalElementPackage ./testOpenDRIM_PhysicalElementPackage testOpenDRIM_PhysicalConnector_CPPFLAGS = -I../OpenDRIM_PhysicalConnector/ testOpenDRIM_PhysicalConnector_SOURCES = testOpenDRIM_PhysicalConnector.cpp testOpenDRIM_PhysicalConnector_LDADD = ../OpenDRIM_PhysicalConnector/libcmpiPhysicalAsset_OpenDRIM_PhysicalConnectorProvider.la test-OpenDRIM_PhysicalConnector: testOpenDRIM_PhysicalConnector ./testOpenDRIM_PhysicalConnector testOpenDRIM_Rack_CPPFLAGS = -I../OpenDRIM_Rack/ testOpenDRIM_Rack_SOURCES = testOpenDRIM_Rack.cpp testOpenDRIM_Rack_LDADD = ../OpenDRIM_Rack/libcmpiPhysicalAsset_OpenDRIM_RackProvider.la test-OpenDRIM_Rack: testOpenDRIM_Rack ./testOpenDRIM_Rack testOpenDRIM_Card_CPPFLAGS = -I../OpenDRIM_Card/ testOpenDRIM_Card_SOURCES = testOpenDRIM_Card.cpp testOpenDRIM_Card_LDADD = ../OpenDRIM_Card/libcmpiPhysicalAsset_OpenDRIM_CardProvider.la test-OpenDRIM_Card: testOpenDRIM_Card ./testOpenDRIM_Card testOpenDRIM_Slot_CPPFLAGS = -I../OpenDRIM_Slot/ testOpenDRIM_Slot_SOURCES = testOpenDRIM_Slot.cpp testOpenDRIM_Slot_LDADD = ../OpenDRIM_Slot/libcmpiPhysicalAsset_OpenDRIM_SlotProvider.la test-OpenDRIM_Slot: testOpenDRIM_Slot ./testOpenDRIM_Slot opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_Slot.cpp0000644000175000017500000001740211377667226025406 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Slot.h" #include "OpenDRIM_SlotAccess.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_Slot& instance) { os << " [OpenDRIM_Slot]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToString("Name", Name, Name_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToString("Tag", Tag, Tag_isNULL); ToString("Description", Description, Description_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("Manufacturer", Manufacturer, Manufacturer_isNULL); ToString("Model", Model, Model_isNULL); ToString("SKU", SKU, SKU_isNULL); ToString("SerialNumber", SerialNumber, SerialNumber_isNULL); ToString("Version", Version, Version_isNULL); ToString("PartNumber", PartNumber, PartNumber_isNULL); ToString("OtherIdentifyingInfo", OtherIdentifyingInfo, OtherIdentifyingInfo_isNULL); ToString("ManufactureDate", ManufactureDate, ManufactureDate_isNULL); ToString("VendorEquipmentType", VendorEquipmentType, VendorEquipmentType_isNULL); ToString("UserTracking", UserTracking, UserTracking_isNULL); ToString("CanBeFRUed", CanBeFRUed, CanBeFRUed_isNULL); ToString("ConnectorPinout", ConnectorPinout, ConnectorPinout_isNULL); ToString("OtherTypeDescription", OtherTypeDescription, OtherTypeDescription_isNULL); ToStringInt("ConnectorGender", ConnectorGender, ConnectorGender_isNULL); ToStringArrayInt("ConnectorElectricalCharacteristics", ConnectorElectricalCharacteristics, ConnectorElectricalCharacteristics_isNULL); ToStringArray("OtherElectricalCharacteristics", OtherElectricalCharacteristics, OtherElectricalCharacteristics_isNULL); ToString("NumPhysicalPins", NumPhysicalPins, NumPhysicalPins_isNULL); ToStringInt("ConnectorLayout", ConnectorLayout, ConnectorLayout_isNULL); ToString("ConnectorDescription", ConnectorDescription, ConnectorDescription_isNULL); ToStringArrayInt("ConnectorType", ConnectorType, ConnectorType_isNULL); ToString("PoweredOn", PoweredOn, PoweredOn_isNULL); ToString("SupportsHotPlug", SupportsHotPlug, SupportsHotPlug_isNULL); ToString("HeightAllowed", HeightAllowed, HeightAllowed_isNULL); ToString("LengthAllowed", LengthAllowed, LengthAllowed_isNULL); ToStringInt("MaxDataWidth", MaxDataWidth, MaxDataWidth_isNULL); ToStringArrayInt("VccMixedVoltageSupport", VccMixedVoltageSupport, VccMixedVoltageSupport_isNULL); ToStringArrayInt("VppMixedVoltageSupport", VppMixedVoltageSupport, VppMixedVoltageSupport_isNULL); ToString("ThermalRating", ThermalRating, ThermalRating_isNULL); ToString("SpecialPurpose", SpecialPurpose, SpecialPurpose_isNULL); ToString("PurposeDescription", PurposeDescription, PurposeDescription_isNULL); ToStringInt("Number", Number, Number_isNULL); ToString("Powered", Powered, Powered_isNULL); ToString("OpenSwitch", OpenSwitch, OpenSwitch_isNULL); ToStringInt("MaxLinkWidth", MaxLinkWidth, MaxLinkWidth_isNULL); ToStringArray("VendorCompatibilityStrings", VendorCompatibilityStrings, VendorCompatibilityStrings_isNULL); os << " [\\OpenDRIM_Slot]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Slot_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_Slot_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 = PhysicalAsset_OpenDRIM_Slot_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 = PhysicalAsset_OpenDRIM_Slot_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 = PhysicalAsset_OpenDRIM_Slot_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_PhysicalElementInConnector.cpp0000644000175000017500000001137311377667226031716 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalElementInConnector.h" #include "OpenDRIM_PhysicalElementInConnectorAccess.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_PhysicalElementInConnector& instance) { os << " [OpenDRIM_PhysicalElementInConnector]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); os << " [\\OpenDRIM_PhysicalElementInConnector]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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 = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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 = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_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 = PhysicalAsset_OpenDRIM_PhysicalElementInConnector_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_PhysicalAssetConformsToProfile.cpp0000644000175000017500000001152211377667226032571 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalAssetConformsToProfile.h" #include "OpenDRIM_PhysicalAssetConformsToProfileAccess.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_PhysicalAssetConformsToProfile& instance) { os << " [OpenDRIM_PhysicalAssetConformsToProfile]" << endl; ToStringRef("ConformantStandard", ConformantStandard, ConformantStandard_isNULL); ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); os << " [\\OpenDRIM_PhysicalAssetConformsToProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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 = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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 = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_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 = PhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.cppopendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.cp0000644000175000017500000001203711377667226034704 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.h" #include "OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementAccess.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_PhysicalAssetCapabilitiesToPhysicalElement& instance) { os << " [OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement]" << endl; ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); ToStringRef("Capabilities", Capabilities, Capabilities_isNULL); ToStringArrayInt("Characteristics", Characteristics, Characteristics_isNULL); os << " [\\OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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 = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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 = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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 = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_PhysicalPackageCapacity.cpp0000644000175000017500000001131311377667226031166 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalPackageCapacity.h" #include "OpenDRIM_PhysicalPackageCapacityAccess.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_PhysicalPackageCapacity& instance) { os << " [OpenDRIM_PhysicalPackageCapacity]" << endl; ToStringRef("Capacity", Capacity, Capacity_isNULL); ToStringRef("Element", Element, Element_isNULL); os << " [\\OpenDRIM_PhysicalPackageCapacity]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_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 = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_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 = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_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 = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_Rack.cpp0000644000175000017500000001666011377667226025352 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Rack.h" #include "OpenDRIM_RackAccess.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_Rack& instance) { os << " [OpenDRIM_Rack]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToString("Name", Name, Name_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToString("Tag", Tag, Tag_isNULL); ToString("Description", Description, Description_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("Manufacturer", Manufacturer, Manufacturer_isNULL); ToString("Model", Model, Model_isNULL); ToString("SKU", SKU, SKU_isNULL); ToString("SerialNumber", SerialNumber, SerialNumber_isNULL); ToString("Version", Version, Version_isNULL); ToString("PartNumber", PartNumber, PartNumber_isNULL); ToString("OtherIdentifyingInfo", OtherIdentifyingInfo, OtherIdentifyingInfo_isNULL); ToString("PoweredOn", PoweredOn, PoweredOn_isNULL); ToString("ManufactureDate", ManufactureDate, ManufactureDate_isNULL); ToString("VendorEquipmentType", VendorEquipmentType, VendorEquipmentType_isNULL); ToString("UserTracking", UserTracking, UserTracking_isNULL); ToString("CanBeFRUed", CanBeFRUed, CanBeFRUed_isNULL); ToStringInt("RemovalConditions", RemovalConditions, RemovalConditions_isNULL); ToString("Removable", Removable, Removable_isNULL); ToString("Replaceable", Replaceable, Replaceable_isNULL); ToString("HotSwappable", HotSwappable, HotSwappable_isNULL); ToString("Depth", Depth, Depth_isNULL); ToString("Width", Width, Width_isNULL); ToString("Weight", Weight, Weight_isNULL); ToStringInt("PackageType", PackageType, PackageType_isNULL); ToString("OtherPackageType", OtherPackageType, OtherPackageType_isNULL); ToStringArray("VendorCompatibilityStrings", VendorCompatibilityStrings, VendorCompatibilityStrings_isNULL); ToString("CableManagementStrategy", CableManagementStrategy, CableManagementStrategy_isNULL); ToStringArrayInt("ServicePhilosophy", ServicePhilosophy, ServicePhilosophy_isNULL); ToStringArray("ServiceDescriptions", ServiceDescriptions, ServiceDescriptions_isNULL); ToString("LockPresent", LockPresent, LockPresent_isNULL); ToString("AudibleAlarm", AudibleAlarm, AudibleAlarm_isNULL); ToString("VisibleAlarm", VisibleAlarm, VisibleAlarm_isNULL); ToStringInt("SecurityBreach", SecurityBreach, SecurityBreach_isNULL); ToString("BreachDescription", BreachDescription, BreachDescription_isNULL); ToString("IsLocked", IsLocked, IsLocked_isNULL); ToString("Height", Height, Height_isNULL); ToStringInt("TypeOfRack", TypeOfRack, TypeOfRack_isNULL); ToString("CountryDesignation", CountryDesignation, CountryDesignation_isNULL); os << " [\\OpenDRIM_Rack]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Rack_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_Rack_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 = PhysicalAsset_OpenDRIM_Rack_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 = PhysicalAsset_OpenDRIM_Rack_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 = PhysicalAsset_OpenDRIM_Rack_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_ConfigurationCapacity.cpp0000644000175000017500000001233011377667226030745 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_ConfigurationCapacity.h" #include "OpenDRIM_ConfigurationCapacityAccess.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_ConfigurationCapacity& instance) { os << " [OpenDRIM_ConfigurationCapacity]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("Name", Name, Name_isNULL); ToStringInt("ObjectType", ObjectType, ObjectType_isNULL); ToString("OtherTypeDescription", OtherTypeDescription, OtherTypeDescription_isNULL); ToString("MinimumCapacity", MinimumCapacity, MinimumCapacity_isNULL); ToString("MaximumCapacity", MaximumCapacity, MaximumCapacity_isNULL); ToString("Increment", Increment, Increment_isNULL); ToStringArray("VendorCompatibilityStrings", VendorCompatibilityStrings, VendorCompatibilityStrings_isNULL); os << " [\\OpenDRIM_ConfigurationCapacity]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConfigurationCapacity_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_ConfigurationCapacity_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 = PhysicalAsset_OpenDRIM_ConfigurationCapacity_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 = PhysicalAsset_OpenDRIM_ConfigurationCapacity_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 = PhysicalAsset_OpenDRIM_ConfigurationCapacity_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_PhysicalMemory.cpp0000644000175000017500000001557711377667226027445 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalMemory.h" #include "OpenDRIM_PhysicalMemoryAccess.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_PhysicalMemory& instance) { os << " [OpenDRIM_PhysicalMemory]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToString("Name", Name, Name_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToString("Tag", Tag, Tag_isNULL); ToString("Description", Description, Description_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("Manufacturer", Manufacturer, Manufacturer_isNULL); ToString("Model", Model, Model_isNULL); ToString("SKU", SKU, SKU_isNULL); ToString("SerialNumber", SerialNumber, SerialNumber_isNULL); ToString("Version", Version, Version_isNULL); ToString("PartNumber", PartNumber, PartNumber_isNULL); ToString("OtherIdentifyingInfo", OtherIdentifyingInfo, OtherIdentifyingInfo_isNULL); ToString("PoweredOn", PoweredOn, PoweredOn_isNULL); ToString("ManufactureDate", ManufactureDate, ManufactureDate_isNULL); ToString("VendorEquipmentType", VendorEquipmentType, VendorEquipmentType_isNULL); ToString("UserTracking", UserTracking, UserTracking_isNULL); ToString("CanBeFRUed", CanBeFRUed, CanBeFRUed_isNULL); ToStringInt("RemovalConditions", RemovalConditions, RemovalConditions_isNULL); ToString("Removable", Removable, Removable_isNULL); ToString("Replaceable", Replaceable, Replaceable_isNULL); ToString("HotSwappable", HotSwappable, HotSwappable_isNULL); ToStringInt("FormFactor", FormFactor, FormFactor_isNULL); ToStringInt("MemoryType", MemoryType, MemoryType_isNULL); ToStringInt("TotalWidth", TotalWidth, TotalWidth_isNULL); ToStringInt("DataWidth", DataWidth, DataWidth_isNULL); ToString("Speed", Speed, Speed_isNULL); ToString("Capacity", Capacity, Capacity_isNULL); ToString("BankLabel", BankLabel, BankLabel_isNULL); ToString("PositionInRow", PositionInRow, PositionInRow_isNULL); ToString("InterleavePosition", InterleavePosition, InterleavePosition_isNULL); os << " [\\OpenDRIM_PhysicalMemory]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalMemory_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_PhysicalMemory_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 = PhysicalAsset_OpenDRIM_PhysicalMemory_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 = PhysicalAsset_OpenDRIM_PhysicalMemory_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 = PhysicalAsset_OpenDRIM_PhysicalMemory_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_PhysicalFrame.cpp0000644000175000017500000001662111377667226027216 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalFrame.h" #include "OpenDRIM_PhysicalFrameAccess.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_PhysicalFrame& instance) { os << " [OpenDRIM_PhysicalFrame]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToString("Name", Name, Name_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToString("Tag", Tag, Tag_isNULL); ToString("Description", Description, Description_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("Manufacturer", Manufacturer, Manufacturer_isNULL); ToString("Model", Model, Model_isNULL); ToString("SKU", SKU, SKU_isNULL); ToString("SerialNumber", SerialNumber, SerialNumber_isNULL); ToString("Version", Version, Version_isNULL); ToString("PartNumber", PartNumber, PartNumber_isNULL); ToString("OtherIdentifyingInfo", OtherIdentifyingInfo, OtherIdentifyingInfo_isNULL); ToString("PoweredOn", PoweredOn, PoweredOn_isNULL); ToString("ManufactureDate", ManufactureDate, ManufactureDate_isNULL); ToString("VendorEquipmentType", VendorEquipmentType, VendorEquipmentType_isNULL); ToString("UserTracking", UserTracking, UserTracking_isNULL); ToString("CanBeFRUed", CanBeFRUed, CanBeFRUed_isNULL); ToStringInt("RemovalConditions", RemovalConditions, RemovalConditions_isNULL); ToString("Removable", Removable, Removable_isNULL); ToString("Replaceable", Replaceable, Replaceable_isNULL); ToString("HotSwappable", HotSwappable, HotSwappable_isNULL); ToString("Height", Height, Height_isNULL); ToString("Depth", Depth, Depth_isNULL); ToString("Width", Width, Width_isNULL); ToString("Weight", Weight, Weight_isNULL); ToStringInt("PackageType", PackageType, PackageType_isNULL); ToString("OtherPackageType", OtherPackageType, OtherPackageType_isNULL); ToStringArray("VendorCompatibilityStrings", VendorCompatibilityStrings, VendorCompatibilityStrings_isNULL); ToString("CableManagementStrategy", CableManagementStrategy, CableManagementStrategy_isNULL); ToStringArrayInt("ServicePhilosophy", ServicePhilosophy, ServicePhilosophy_isNULL); ToStringArray("ServiceDescriptions", ServiceDescriptions, ServiceDescriptions_isNULL); ToString("LockPresent", LockPresent, LockPresent_isNULL); ToString("AudibleAlarm", AudibleAlarm, AudibleAlarm_isNULL); ToString("VisibleAlarm", VisibleAlarm, VisibleAlarm_isNULL); ToStringInt("SecurityBreach", SecurityBreach, SecurityBreach_isNULL); ToString("BreachDescription", BreachDescription, BreachDescription_isNULL); ToString("IsLocked", IsLocked, IsLocked_isNULL); os << " [\\OpenDRIM_PhysicalFrame]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_PhysicalFrame_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 = PhysicalAsset_OpenDRIM_PhysicalFrame_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 = PhysicalAsset_OpenDRIM_PhysicalFrame_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 = PhysicalAsset_OpenDRIM_PhysicalFrame_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_Chassis.cpp0000644000175000017500000002042311377667226026057 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Chassis.h" #include "OpenDRIM_ChassisAccess.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_Chassis& instance) { os << " [OpenDRIM_Chassis]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToString("Name", Name, Name_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToString("Tag", Tag, Tag_isNULL); ToString("Description", Description, Description_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("Manufacturer", Manufacturer, Manufacturer_isNULL); ToString("Model", Model, Model_isNULL); ToString("SKU", SKU, SKU_isNULL); ToString("SerialNumber", SerialNumber, SerialNumber_isNULL); ToString("Version", Version, Version_isNULL); ToString("PartNumber", PartNumber, PartNumber_isNULL); ToString("OtherIdentifyingInfo", OtherIdentifyingInfo, OtherIdentifyingInfo_isNULL); ToString("PoweredOn", PoweredOn, PoweredOn_isNULL); ToString("ManufactureDate", ManufactureDate, ManufactureDate_isNULL); ToString("VendorEquipmentType", VendorEquipmentType, VendorEquipmentType_isNULL); ToString("UserTracking", UserTracking, UserTracking_isNULL); ToString("CanBeFRUed", CanBeFRUed, CanBeFRUed_isNULL); ToStringInt("RemovalConditions", RemovalConditions, RemovalConditions_isNULL); ToString("Removable", Removable, Removable_isNULL); ToString("Replaceable", Replaceable, Replaceable_isNULL); ToString("HotSwappable", HotSwappable, HotSwappable_isNULL); ToString("Height", Height, Height_isNULL); ToString("Depth", Depth, Depth_isNULL); ToString("Width", Width, Width_isNULL); ToString("Weight", Weight, Weight_isNULL); ToStringInt("PackageType", PackageType, PackageType_isNULL); ToString("OtherPackageType", OtherPackageType, OtherPackageType_isNULL); ToStringArray("VendorCompatibilityStrings", VendorCompatibilityStrings, VendorCompatibilityStrings_isNULL); ToString("CableManagementStrategy", CableManagementStrategy, CableManagementStrategy_isNULL); ToStringArrayInt("ServicePhilosophy", ServicePhilosophy, ServicePhilosophy_isNULL); ToStringArray("ServiceDescriptions", ServiceDescriptions, ServiceDescriptions_isNULL); ToString("LockPresent", LockPresent, LockPresent_isNULL); ToString("AudibleAlarm", AudibleAlarm, AudibleAlarm_isNULL); ToString("VisibleAlarm", VisibleAlarm, VisibleAlarm_isNULL); ToStringInt("SecurityBreach", SecurityBreach, SecurityBreach_isNULL); ToString("BreachDescription", BreachDescription, BreachDescription_isNULL); ToString("IsLocked", IsLocked, IsLocked_isNULL); ToStringInt("NumberOfPowerCords", NumberOfPowerCords, NumberOfPowerCords_isNULL); ToStringInt("CurrentRequiredOrProduced", CurrentRequiredOrProduced, CurrentRequiredOrProduced_isNULL); ToStringInt("HeatGeneration", HeatGeneration, HeatGeneration_isNULL); ToStringArrayInt("ChassisTypes", ChassisTypes, ChassisTypes_isNULL); ToStringArray("TypeDescriptions", TypeDescriptions, TypeDescriptions_isNULL); ToStringInt("ChassisPackageType", ChassisPackageType, ChassisPackageType_isNULL); ToString("ChassisTypeDescription", ChassisTypeDescription, ChassisTypeDescription_isNULL); ToStringInt("MultipleSystemSupport", MultipleSystemSupport, MultipleSystemSupport_isNULL); ToStringInt("RackMountable", RackMountable, RackMountable_isNULL); ToStringInt("InputCurrentType", InputCurrentType, InputCurrentType_isNULL); ToString("OtherInputCurrentType", OtherInputCurrentType, OtherInputCurrentType_isNULL); ToString("InputVoltage", InputVoltage, InputVoltage_isNULL); os << " [\\OpenDRIM_Chassis]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chassis_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_Chassis_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 = PhysicalAsset_OpenDRIM_Chassis_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 = PhysicalAsset_OpenDRIM_Chassis_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 = PhysicalAsset_OpenDRIM_Chassis_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_SystemPackaging.cpp0000644000175000017500000001116711377667226027560 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_SystemPackaging.h" #include "OpenDRIM_SystemPackagingAccess.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_SystemPackaging& instance) { os << " [OpenDRIM_SystemPackaging]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); os << " [\\OpenDRIM_SystemPackaging]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_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 = PhysicalAsset_OpenDRIM_SystemPackaging_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 = PhysicalAsset_OpenDRIM_SystemPackaging_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 = PhysicalAsset_OpenDRIM_SystemPackaging_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_ConnectedTo.cpp0000644000175000017500000001110711377667226026666 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_ConnectedTo.h" #include "OpenDRIM_ConnectedToAccess.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_ConnectedTo& instance) { os << " [OpenDRIM_ConnectedTo]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); os << " [\\OpenDRIM_ConnectedTo]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_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 = PhysicalAsset_OpenDRIM_ConnectedTo_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 = PhysicalAsset_OpenDRIM_ConnectedTo_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 = PhysicalAsset_OpenDRIM_ConnectedTo_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_PhysicalConnector.cpp0000644000175000017500000001566311377667226030123 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalConnector.h" #include "OpenDRIM_PhysicalConnectorAccess.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_PhysicalConnector& instance) { os << " [OpenDRIM_PhysicalConnector]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToString("Name", Name, Name_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToString("Tag", Tag, Tag_isNULL); ToString("Description", Description, Description_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("Manufacturer", Manufacturer, Manufacturer_isNULL); ToString("Model", Model, Model_isNULL); ToString("SKU", SKU, SKU_isNULL); ToString("SerialNumber", SerialNumber, SerialNumber_isNULL); ToString("Version", Version, Version_isNULL); ToString("PartNumber", PartNumber, PartNumber_isNULL); ToString("OtherIdentifyingInfo", OtherIdentifyingInfo, OtherIdentifyingInfo_isNULL); ToString("PoweredOn", PoweredOn, PoweredOn_isNULL); ToString("ManufactureDate", ManufactureDate, ManufactureDate_isNULL); ToString("VendorEquipmentType", VendorEquipmentType, VendorEquipmentType_isNULL); ToString("UserTracking", UserTracking, UserTracking_isNULL); ToString("CanBeFRUed", CanBeFRUed, CanBeFRUed_isNULL); ToString("ConnectorPinout", ConnectorPinout, ConnectorPinout_isNULL); ToStringArrayInt("ConnectorType", ConnectorType, ConnectorType_isNULL); ToString("OtherTypeDescription", OtherTypeDescription, OtherTypeDescription_isNULL); ToStringInt("ConnectorGender", ConnectorGender, ConnectorGender_isNULL); ToStringArrayInt("ConnectorElectricalCharacteristics", ConnectorElectricalCharacteristics, ConnectorElectricalCharacteristics_isNULL); ToStringArray("OtherElectricalCharacteristics", OtherElectricalCharacteristics, OtherElectricalCharacteristics_isNULL); ToString("NumPhysicalPins", NumPhysicalPins, NumPhysicalPins_isNULL); ToStringInt("ConnectorLayout", ConnectorLayout, ConnectorLayout_isNULL); ToString("ConnectorDescription", ConnectorDescription, ConnectorDescription_isNULL); os << " [\\OpenDRIM_PhysicalConnector]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalConnector_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_PhysicalConnector_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 = PhysicalAsset_OpenDRIM_PhysicalConnector_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 = PhysicalAsset_OpenDRIM_PhysicalConnector_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 = PhysicalAsset_OpenDRIM_PhysicalConnector_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_PhysicalElementPackage.cpp0000644000175000017500000001150211377667226031022 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalElementPackage.h" #include "OpenDRIM_PhysicalElementPackageAccess.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_PhysicalElementPackage& instance) { os << " [OpenDRIM_PhysicalElementPackage]" << endl; ToStringRef("GroupComponent", GroupComponent, GroupComponent_isNULL); ToStringRef("PartComponent", PartComponent, PartComponent_isNULL); ToString("LocationWithinContainer", LocationWithinContainer, LocationWithinContainer_isNULL); os << " [\\OpenDRIM_PhysicalElementPackage]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_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 = PhysicalAsset_OpenDRIM_PhysicalElementPackage_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 = PhysicalAsset_OpenDRIM_PhysicalElementPackage_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 = PhysicalAsset_OpenDRIM_PhysicalElementPackage_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_PhysicalPackage.cpp0000644000175000017500000001544011377667226027515 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalPackage.h" #include "OpenDRIM_PhysicalPackageAccess.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_PhysicalPackage& instance) { os << " [OpenDRIM_PhysicalPackage]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToString("Name", Name, Name_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToString("Tag", Tag, Tag_isNULL); ToString("Description", Description, Description_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("Manufacturer", Manufacturer, Manufacturer_isNULL); ToString("Model", Model, Model_isNULL); ToString("SKU", SKU, SKU_isNULL); ToString("SerialNumber", SerialNumber, SerialNumber_isNULL); ToString("Version", Version, Version_isNULL); ToString("PartNumber", PartNumber, PartNumber_isNULL); ToString("OtherIdentifyingInfo", OtherIdentifyingInfo, OtherIdentifyingInfo_isNULL); ToString("PoweredOn", PoweredOn, PoweredOn_isNULL); ToString("ManufactureDate", ManufactureDate, ManufactureDate_isNULL); ToString("VendorEquipmentType", VendorEquipmentType, VendorEquipmentType_isNULL); ToString("UserTracking", UserTracking, UserTracking_isNULL); ToString("CanBeFRUed", CanBeFRUed, CanBeFRUed_isNULL); ToStringInt("RemovalConditions", RemovalConditions, RemovalConditions_isNULL); ToString("Removable", Removable, Removable_isNULL); ToString("Replaceable", Replaceable, Replaceable_isNULL); ToString("HotSwappable", HotSwappable, HotSwappable_isNULL); ToString("Height", Height, Height_isNULL); ToString("Depth", Depth, Depth_isNULL); ToString("Width", Width, Width_isNULL); ToString("Weight", Weight, Weight_isNULL); ToStringInt("PackageType", PackageType, PackageType_isNULL); ToString("OtherPackageType", OtherPackageType, OtherPackageType_isNULL); ToStringArray("VendorCompatibilityStrings", VendorCompatibilityStrings, VendorCompatibilityStrings_isNULL); os << " [\\OpenDRIM_PhysicalPackage]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_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 = PhysicalAsset_OpenDRIM_PhysicalPackage_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 = PhysicalAsset_OpenDRIM_PhysicalPackage_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 = PhysicalAsset_OpenDRIM_PhysicalPackage_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_PhysicalAssetRegisteredProfile.cpp0000644000175000017500000001264611377667226032605 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalAssetRegisteredProfile.h" #include "OpenDRIM_PhysicalAssetRegisteredProfileAccess.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_PhysicalAssetRegisteredProfile& instance) { os << " [OpenDRIM_PhysicalAssetRegisteredProfile]" << 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_PhysicalAssetRegisteredProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_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 = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_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 = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_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 = PhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_PhysicalComponent.cpp0000644000175000017500000001463111377667226030125 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalComponent.h" #include "OpenDRIM_PhysicalComponentAccess.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_PhysicalComponent& instance) { os << " [OpenDRIM_PhysicalComponent]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToString("Name", Name, Name_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToString("Tag", Tag, Tag_isNULL); ToString("Description", Description, Description_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("Manufacturer", Manufacturer, Manufacturer_isNULL); ToString("Model", Model, Model_isNULL); ToString("SKU", SKU, SKU_isNULL); ToString("SerialNumber", SerialNumber, SerialNumber_isNULL); ToString("Version", Version, Version_isNULL); ToString("PartNumber", PartNumber, PartNumber_isNULL); ToString("OtherIdentifyingInfo", OtherIdentifyingInfo, OtherIdentifyingInfo_isNULL); ToString("PoweredOn", PoweredOn, PoweredOn_isNULL); ToString("ManufactureDate", ManufactureDate, ManufactureDate_isNULL); ToString("VendorEquipmentType", VendorEquipmentType, VendorEquipmentType_isNULL); ToString("UserTracking", UserTracking, UserTracking_isNULL); ToString("CanBeFRUed", CanBeFRUed, CanBeFRUed_isNULL); ToStringInt("RemovalConditions", RemovalConditions, RemovalConditions_isNULL); ToString("Removable", Removable, Removable_isNULL); ToString("Replaceable", Replaceable, Replaceable_isNULL); ToString("HotSwappable", HotSwappable, HotSwappable_isNULL); os << " [\\OpenDRIM_PhysicalComponent]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalComponent_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_PhysicalComponent_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 = PhysicalAsset_OpenDRIM_PhysicalComponent_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 = PhysicalAsset_OpenDRIM_PhysicalComponent_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 = PhysicalAsset_OpenDRIM_PhysicalComponent_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_Chip.cpp0000644000175000017500000001447011377667226025352 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Chip.h" #include "OpenDRIM_ChipAccess.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_Chip& instance) { os << " [OpenDRIM_Chip]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToString("Name", Name, Name_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToString("Tag", Tag, Tag_isNULL); ToString("Description", Description, Description_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("Manufacturer", Manufacturer, Manufacturer_isNULL); ToString("Model", Model, Model_isNULL); ToString("SKU", SKU, SKU_isNULL); ToString("SerialNumber", SerialNumber, SerialNumber_isNULL); ToString("Version", Version, Version_isNULL); ToString("PartNumber", PartNumber, PartNumber_isNULL); ToString("OtherIdentifyingInfo", OtherIdentifyingInfo, OtherIdentifyingInfo_isNULL); ToString("PoweredOn", PoweredOn, PoweredOn_isNULL); ToString("ManufactureDate", ManufactureDate, ManufactureDate_isNULL); ToString("VendorEquipmentType", VendorEquipmentType, VendorEquipmentType_isNULL); ToString("UserTracking", UserTracking, UserTracking_isNULL); ToString("CanBeFRUed", CanBeFRUed, CanBeFRUed_isNULL); ToStringInt("RemovalConditions", RemovalConditions, RemovalConditions_isNULL); ToString("Removable", Removable, Removable_isNULL); ToString("Replaceable", Replaceable, Replaceable_isNULL); ToString("HotSwappable", HotSwappable, HotSwappable_isNULL); ToStringInt("FormFactor", FormFactor, FormFactor_isNULL); os << " [\\OpenDRIM_Chip]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chip_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_Chip_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 = PhysicalAsset_OpenDRIM_Chip_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 = PhysicalAsset_OpenDRIM_Chip_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 = PhysicalAsset_OpenDRIM_Chip_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/test/testOpenDRIM_PhysicalAssetCapabilities.cpp0000644000175000017500000001164311377667226031554 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalAssetCapabilities.h" #include "OpenDRIM_PhysicalAssetCapabilitiesAccess.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_PhysicalAssetCapabilities& instance) { os << " [OpenDRIM_PhysicalAssetCapabilities]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("FRUInfoSupported", FRUInfoSupported, FRUInfoSupported_isNULL); os << " [\\OpenDRIM_PhysicalAssetCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_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 = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_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 = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_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 = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-physicalasset-0.1.2~ppa/acinclude.m40000644000175000017500000002110611377667226022632 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ AC_DEFUN([SHOW_COPYRIGHT], [ echo "################################################################################# # Linux Management Providers (LMP), PhysicalAsset provider package # Copyright (C) 2007 Guillaume BOTTEX # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public 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-physicalasset-0.1.2~ppa/Common/0000755000175000017500000000000011377667226021671 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/Common/Makefile.am0000644000175000017500000000345311377667226023732 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ commonlibdir = @COMMONLIBDIR@ commonlib_LTLIBRARIES = libcmpiPhysicalAsset_Common.la libcmpiPhysicalAsset_Common_la_SOURCES = PhysicalAsset_Common.cpp libcmpiPhysicalAsset_Common_la_LDFLAGS = -avoid-version libcmpiPhysicalAsset_Common_la_LIBADD = -lopendrim noinst_HEADERS = PhysicalAsset_Common.h opendrim-lmp-physicalasset-0.1.2~ppa/Common/PhysicalAsset_Common.h0000644000175000017500000000510411377667226026126 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef PHYSICALASSET_COMMON_H_ #define PHYSICALASSET_COMMON_H_ #include #include // Define PhysicalType Constants #define PT_UNKNOWN 0 // Unknown #define PT_OTHER 1 // Other #define PT_RACK 2 // Rack #define PT_CHASSIS_FRAME 3 // Chassis/Frame #define PT_CROSS_CONNECT_BACKPLANE 4 // Cross Connect/Backplane #define PT_CONTAINER_FRAME_SLOT 5 // Container/Frame Slot #define PT_POWER_SUPPLY 6 // Power Supply #define PT_FAN 7 // Fan #define PT_SENSOR 8 // Sensor #define PT_MODULE_CARD 9 // Module/Card #define PT_PORT_CONNECTOR 10 // Port/Connector #define PT_BATTERY 11 // Battery #define PT_PROCESSOR 12 // Processor #define PT_MEMORY 13 // Memory #define PT_POWER_SOURCE_GENERATOR 14 // Power Source/Generator #define PT_STORAGE_MEDIA_PACKAGE 15 // Storage Media Package #define PT_BLADE 16 // Blade #define PT_BLADE_EXPANSION 17 // Blade Expansion int CF_getComputerSystemPhysicalPackageTag(string& tag,string& errorMessage); int CF_getSystemUUID(string& uuid,string& errorMessage); #endif /*PHYSICALASSET_COMMON_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/Common/PhysicalAsset_Common.cpp0000644000175000017500000000661211377667226026466 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "PhysicalAsset_Common.h" int CF_getComputerSystemPhysicalPackageTag(string& tag,string& errorMessage) { system_information system_info; vector dmi_strings; string serial_number; DS_getProperty(_NAMESPACE, "OpenDRIM_ComputerSystem", "ComputerSystemPhysicalPackage", "OtherIdentifyingInfo", tag, errorMessage); if(tag.empty()) { // The tag is set to the system serial number as advised in the CIM Documentation CF_assert(SMBIOS_getSystemInformation(system_info,dmi_strings,errorMessage)); serial_number=CF_trimText(dmi_strings[system_info.serial_number]); if(!serial_number.empty()) tag=serial_number; else tag="computer-system-physical-package"; CF_assert(DS_setProperty(_NAMESPACE, "OpenDRIM_ComputerSystem", "ComputerSystemPhysicalPackage", "OtherIdentifyingInfo", tag, errorMessage)); } return OK; } int CF_getSystemUUID(string& uuid,string& errorMessage) { system_information system_info; vector dmi_strings; UUID uuidTest; // The tag is set to the system serial number as advised in the CIM Documentation CF_assert(SMBIOS_getSystemInformation(system_info,dmi_strings,errorMessage)); memset(&uuidTest,0xFF,sizeof(UUID)); if(memcmp(&system_info.uuid,&uuidTest,sizeof(UUID))!=0) { stringstream sUUID; sUUID << uppercase << noshowbase << hex << (unsigned int) system_info.uuid.time_low << "-"; sUUID << uppercase << noshowbase << hex << (unsigned int) system_info.uuid.time_mid << "-"; sUUID << uppercase << noshowbase << hex << (unsigned int) system_info.uuid.time_hi_and_version << "-"; sUUID << uppercase << noshowbase << hex << (unsigned int) system_info.uuid.clock_seq_hi_and_reserved; sUUID << uppercase << noshowbase << hex << (unsigned int) system_info.uuid.clock_seq_low << "-"; for(int i=0;i<6;i++) sUUID << uppercase << noshowbase << hex << (unsigned int) system_info.uuid.node[i]; uuid=sUUID.str(); } else uuid=""; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/configure.ac0000644000175000017500000001350611377667226022734 0ustar guillaumeguillaume# Process this file with autoconf to produce a configure script. ################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ 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), PhysicalAsset provider package Copyright (C) 2007 Guillaume BOTTEX This program is being developed under the "OpenDRIM" project. The "OpenDRIM" project web page: http://opendrim.sourceforge.net The "OpenDRIM" project mailing list: opendrim@googlegroups.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public 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(PhysicalAsset 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_PhysicalComponent/Makefile OpenDRIM_ConnectedTo/Makefile OpenDRIM_PhysicalFrame/Makefile OpenDRIM_ComputerSystemPackage/Makefile OpenDRIM_Realizes/Makefile OpenDRIM_PhysicalPackageCapacity/Makefile OpenDRIM_ConfigurationCapacity/Makefile OpenDRIM_PhysicalPackage/Makefile OpenDRIM_PhysicalMemory/Makefile OpenDRIM_PhysicalAssetCapabilities/Makefile OpenDRIM_PhysicalElementInConnector/Makefile OpenDRIM_SystemPackaging/Makefile OpenDRIM_Chip/Makefile OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/Makefile OpenDRIM_PhysicalAssetRegisteredProfile/Makefile OpenDRIM_Chassis/Makefile OpenDRIM_PhysicalAssetConformsToProfile/Makefile OpenDRIM_PhysicalElementPackage/Makefile OpenDRIM_PhysicalConnector/Makefile OpenDRIM_Rack/Makefile OpenDRIM_Card/Makefile OpenDRIM_Slot/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-physicalasset-0.1.2~ppa/OpenDRIM_Realizes/0000755000175000017500000000000011377667226023654 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Realizes/OpenDRIM_RealizesProvider.cpp0000644000175000017500000004063311377667226031314 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Realizes.h" #include "OpenDRIM_RealizesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_RealizesProviderSetInstance PhysicalAsset_OpenDRIM_RealizesProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_Realizes_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_Realizes_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_RealizesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_Realizes_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RealizesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Realizes_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_Realizes_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RealizesProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_Realizes_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_Realizes_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RealizesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Realizes instance; PhysicalAsset_OpenDRIM_Realizes_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Realizes_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_Realizes_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RealizesProviderSetInstance(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_Realizes newInstance, oldInstance; PhysicalAsset_OpenDRIM_Realizes_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_Realizes_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Realizes_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Realizes_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RealizesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Realizes instance; PhysicalAsset_OpenDRIM_Realizes_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Realizes_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Realizes_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Realizes_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_Realizes_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RealizesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Realizes instance; PhysicalAsset_OpenDRIM_Realizes_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Realizes_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Realizes_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RealizesProviderExecQuery(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 PhysicalAsset_OpenDRIM_RealizesProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_Realizes_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RealizesProviderAssociatorNames(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 = PhysicalAsset_OpenDRIM_Realizes_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_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 PhysicalAsset_OpenDRIM_RealizesProviderAssociators(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 = PhysicalAsset_OpenDRIM_Realizes_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_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 PhysicalAsset_OpenDRIM_RealizesProviderReferenceNames(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 = PhysicalAsset_OpenDRIM_Realizes_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_Realizes_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = PhysicalAsset_OpenDRIM_Realizes_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_Realizes_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RealizesProviderReferences(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 = PhysicalAsset_OpenDRIM_Realizes_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_Realizes_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = PhysicalAsset_OpenDRIM_Realizes_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = PhysicalAsset_OpenDRIM_Realizes_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int PhysicalAsset_OpenDRIM_Realizes_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Realizes_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_Realizes_init FAILED: " + (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_Realizes_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Realizes_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_Realizes_unload FAILED: " + (string) OpenDRIM_Realizes_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_Realizes_INIT if (PhysicalAsset_OpenDRIM_Realizes_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_RealizesProvider, PhysicalAsset_OpenDRIM_RealizesProvider, _broker, PhysicalAsset_OpenDRIM_Realizes_INIT); CMAssociationMIStub(PhysicalAsset_OpenDRIM_RealizesProvider, PhysicalAsset_OpenDRIM_RealizesProvider, _broker, PhysicalAsset_OpenDRIM_Realizes_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Realizes/Makefile.am0000644000175000017500000000461311377667226025714 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_RealizesProvider.la libcmpiPhysicalAsset_OpenDRIM_RealizesProvider_la_SOURCES = OpenDRIM_RealizesAccess.cpp OpenDRIM_RealizesProvider.cpp cmpiOpenDRIM_Realizes.cpp assocOpenDRIM_Realizes.cpp # May have to be adjusted for direct invocation libcmpiPhysicalAsset_OpenDRIM_RealizesProvider_la_CPPFLAGS = -I../CIM_PhysicalElement -I../CIM_LogicalDevice # Uncomment the end for direct invocation, may have to be adjusted libcmpiPhysicalAsset_OpenDRIM_RealizesProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la #../CIM_PhysicalElement/libcmpiPhysicalAsset_CIM_PhysicalElementProvider.la ../CIM_LogicalDevice/libcmpiPhysicalAsset_CIM_LogicalDeviceProvider.la libcmpiPhysicalAsset_OpenDRIM_RealizesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_Realizes.h OpenDRIM_Realizes.h OpenDRIM_RealizesAccess.h opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Realizes/OpenDRIM_Realizes.h0000644000175000017500000000645511377667226027252 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_REALIZES_H_ #define OPENDRIM_REALIZES_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_PhysicalElement.h" #include "CIM_PhysicalElementAccess.h" #include "cmpiCIM_LogicalDevice.h" #include "CIM_LogicalDeviceAccess.h" */ const static char* OpenDRIM_Realizes_classnames[] = {"OpenDRIM_Realizes"}; static string OpenDRIM_Realizes_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"CIM_PhysicalElement"}; const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"CIM_LogicalDevice"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_Realizes { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; OpenDRIM_Realizes() { Antecedent_isNULL = true; Dependent_isNULL = true; } ~OpenDRIM_Realizes() {} 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_REALIZES_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Realizes/OpenDRIM_RealizesAccess.cpp0000644000175000017500000002355311377667226030725 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_RealizesAccess.h" int PhysicalAsset_OpenDRIM_Realizes_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_PhysicalElement_load(broker, errorMessage)); CF_assert(PhysicalAsset_CIM_LogicalDevice_load(broker, errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Realizes_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_PhysicalElement_unload(errorMessage)); CF_assert(PhysicalAsset_CIM_LogicalDevice_unload(errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Realizes_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 PhysicalAsset_OpenDRIM_Realizes_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(PhysicalAsset_OpenDRIM_Realizes_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(PhysicalAsset_OpenDRIM_Realizes_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; PhysicalAsset_OpenDRIM_Realizes_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(PhysicalAsset_OpenDRIM_Realizes_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_Realizes_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Realizes& 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(PhysicalAsset_OpenDRIM_Realizes_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(PhysicalAsset_OpenDRIM_Realizes_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(PhysicalAsset_OpenDRIM_Realizes_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int PhysicalAsset_OpenDRIM_Realizes_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Realizes& newInstance, const OpenDRIM_Realizes& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Realizes_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Realizes& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Realizes_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Realizes& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Realizes_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(PhysicalAsset_OpenDRIM_Realizes_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_Realizes_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(PhysicalAsset_OpenDRIM_Realizes_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(PhysicalAsset_OpenDRIM_Realizes_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_Realizes_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(PhysicalAsset_OpenDRIM_Realizes_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_Realizes_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_Realizes instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); OpenDRIM_Realizes_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_Realizes_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_Realizes_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_Realizes instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); OpenDRIM_Realizes_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_Realizes_populate(OpenDRIM_Realizes& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Realizes/OpenDRIM_RealizesAccess.h0000644000175000017500000001007011377667226030360 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_REALIZESACCESS_H_ #define OPENDRIM_REALIZESACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_Realizes.h" #include "assocOpenDRIM_Realizes.h" int PhysicalAsset_OpenDRIM_Realizes_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_Realizes_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_Realizes_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_Realizes_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Realizes& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_Realizes_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Realizes& newInstance, const OpenDRIM_Realizes& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_Realizes_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Realizes& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_Realizes_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Realizes& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_Realizes_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_Realizes_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_Realizes_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_Realizes_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_Realizes_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_Realizes_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_Realizes_populate(OpenDRIM_Realizes& instance, string& errorMessage); #endif /*OPENDRIM_REALIZESACCESS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Realizes/assocOpenDRIM_Realizes.h0000644000175000017500000000607611377667226030302 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_REALIZES_H_ #define ASSOCOPENDRIM_REALIZES_H_ #include "OpenDRIM_RealizesAccess.h" int PhysicalAsset_OpenDRIM_Realizes_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 PhysicalAsset_OpenDRIM_Realizes_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 PhysicalAsset_OpenDRIM_Realizes_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_Realizes_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_Realizes_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_Realizes_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_REALIZES_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Realizes/cmpiOpenDRIM_Realizes.cpp0000644000175000017500000000572011377667226030450 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Realizes.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_Realizes_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Realizes& instance) { _E_; Objectpath op(broker, OpenDRIM_Realizes_classnames[0], OpenDRIM_Realizes_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_Realizes_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Realizes& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_Realizes_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_Realizes_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Realizes& 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 PhysicalAsset_OpenDRIM_Realizes_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Realizes& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (inst.getProperty("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Realizes/cmpiOpenDRIM_Realizes.h0000644000175000017500000000417011377667226030113 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_REALIZES_H_ #define CMPIOPENDRIM_REALIZES_H_ #include "OpenDRIM_Realizes.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_Realizes_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Realizes& instance); CMPIInstance* PhysicalAsset_OpenDRIM_Realizes_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Realizes& instance); void PhysicalAsset_OpenDRIM_Realizes_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Realizes& instance); void PhysicalAsset_OpenDRIM_Realizes_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Realizes& instance); #endif /*CMPIOPENDRIM_REALIZES_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Realizes/assocOpenDRIM_Realizes.cpp0000644000175000017500000002073211377667226030630 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "assocOpenDRIM_Realizes.h" int PhysicalAsset_OpenDRIM_Realizes_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 = PhysicalAsset_OpenDRIM_Realizes_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(PhysicalAsset_OpenDRIM_Realizes_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(PhysicalAsset_OpenDRIM_Realizes_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_Realizes_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(PhysicalAsset_CIM_PhysicalElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_PhysicalElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_PhysicalElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_Realizes_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_PhysicalElement _instance; PhysicalAsset_CIM_PhysicalElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_PhysicalElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_PhysicalElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_Realizes_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(PhysicalAsset_CIM_LogicalDevice_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_LogicalDevice_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_LogicalDevice_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_Realizes_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_LogicalDevice _instance; PhysicalAsset_CIM_LogicalDevice_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_LogicalDevice_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_LogicalDevice_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/TODO0000644000175000017500000000010411377667226021124 0ustar guillaumeguillaumeTODO for 1.0.0 ========================= Complete the DMTF Profile opendrim-lmp-physicalasset-0.1.2~ppa/INSTALL0000644000175000017500000000667511377667226021510 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ --------------------------------------------------------- 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-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/0000755000175000017500000000000011377667226026604 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/Makefile.am0000644000175000017500000000511011377667226030635 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_PhysicalPackageCapacityProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalPackageCapacityProvider_la_SOURCES = OpenDRIM_PhysicalPackageCapacityAccess.cpp OpenDRIM_PhysicalPackageCapacityProvider.cpp cmpiOpenDRIM_PhysicalPackageCapacity.cpp assocOpenDRIM_PhysicalPackageCapacity.cpp # May have to be adjusted for direct invocation libcmpiPhysicalAsset_OpenDRIM_PhysicalPackageCapacityProvider_la_CPPFLAGS = -I../CIM_PhysicalElement -I../CIM_PhysicalCapacity # Uncomment the end for direct invocation, may have to be adjusted libcmpiPhysicalAsset_OpenDRIM_PhysicalPackageCapacityProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la #../CIM_PhysicalElement/libcmpiPhysicalAsset_CIM_PhysicalElementProvider.la ../CIM_PhysicalCapacity/libcmpiPhysicalAsset_CIM_PhysicalCapacityProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalPackageCapacityProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_PhysicalPackageCapacity.h OpenDRIM_PhysicalPackageCapacity.h OpenDRIM_PhysicalPackageCapacityAccess.h ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/cmpiOpenDRIM_PhysicalPackageCapacity.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/cmpiOpenDRIM_PhysicalPackageCa0000644000175000017500000000445411377667226034340 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_PHYSICALPACKAGECAPACITY_H_ #define CMPIOPENDRIM_PHYSICALPACKAGECAPACITY_H_ #include "OpenDRIM_PhysicalPackageCapacity.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalPackageCapacity& instance); CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalPackageCapacity& instance); void PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalPackageCapacity& instance); void PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalPackageCapacity& instance); #endif /*CMPIOPENDRIM_PHYSICALPACKAGECAPACITY_H_*/ ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/OpenDRIM_PhysicalPackageCapacityProvider.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/OpenDRIM_PhysicalPackageCapaci0000644000175000017500000004332111377667226034320 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalPackageCapacity.h" #include "OpenDRIM_PhysicalPackageCapacityAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderSetInstance PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalPackageCapacity instance; PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderSetInstance(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_PhysicalPackageCapacity newInstance, oldInstance; PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalPackageCapacity instance; PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalPackageCapacity instance; PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderExecQuery(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 PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderAssociatorNames(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 = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_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 PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderAssociators(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 = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_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 PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderReferenceNames(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 = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_referenceElementToCapacity(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_referenceCapacityToElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProviderReferences(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 = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_referenceElementToCapacity(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_referenceCapacityToElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_init FAILED: " + (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_unload FAILED: " + (string) OpenDRIM_PhysicalPackageCapacity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_INIT if (PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProvider, PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_INIT); CMAssociationMIStub(PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProvider, PhysicalAsset_OpenDRIM_PhysicalPackageCapacityProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/assocOpenDRIM_PhysicalPackageCapacity.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/assocOpenDRIM_PhysicalPackageC0000644000175000017500000002124211377667226034351 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "assocOpenDRIM_PhysicalPackageCapacity.h" int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_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 = PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_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, "Element") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Capacity") != 0) return OK; CF_assert(PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_associatorElementToCapacity(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "Capacity") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Element") != 0) return OK; CF_assert(PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_associatorCapacityToElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_enumerateElements(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, Element_NAMESPACE, Element_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(PhysicalAsset_CIM_PhysicalElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_PhysicalElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_PhysicalElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_getElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Element_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Element_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_PhysicalElement _instance; PhysicalAsset_CIM_PhysicalElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_PhysicalElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_PhysicalElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_enumerateCapacitys(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, Capacity_NAMESPACE, Capacity_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(PhysicalAsset_CIM_PhysicalCapacity_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_PhysicalCapacity_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_PhysicalCapacity_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_getCapacity(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Capacity_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Capacity_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_PhysicalCapacity _instance; PhysicalAsset_CIM_PhysicalCapacity_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_PhysicalCapacity_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_PhysicalCapacity_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/OpenDRIM_PhysicalPackageCapacityAccess.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/OpenDRIM_PhysicalPackageCapaci0000644000175000017500000002455311377667226034326 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_PhysicalPackageCapacityAccess.h" int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_PhysicalElement_load(broker, errorMessage)); CF_assert(PhysicalAsset_CIM_PhysicalCapacity_load(broker, errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_PhysicalElement_unload(errorMessage)); CF_assert(PhysicalAsset_CIM_PhysicalCapacity_unload(errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_isAssociated(const Instance& Element, const Instance& Capacity, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_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(PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_enumerateElements(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(PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_enumerateElements(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; PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), Element_classnames[0], Capacity_classnames[0], Element_role.c_str(), Capacity_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_referenceElementToCapacity(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalPackageCapacity& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath Element_objectpath; instance.getElement(Element_objectpath); Instance Element_instance; CF_assert(PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_getElement(broker, ctx, Element_objectpath, Element_instance, NULL, errorMessage)); Objectpath Capacity_objectpath; instance.getCapacity(Capacity_objectpath); Instance Capacity_instance; CF_assert(PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_getCapacity(broker, ctx, Capacity_objectpath, Capacity_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_isAssociated(Element_instance, Capacity_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalPackageCapacity& newInstance, const OpenDRIM_PhysicalPackageCapacity& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalPackageCapacity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalPackageCapacity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_associatorElementToCapacity(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Element_instance, const char** properties, vector& Capacity_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Capacity_instances; if (discriminant=="a") CF_assert(PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_enumerateCapacitys(broker, ctx, Capacity_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_enumerateCapacitys(broker, ctx, Capacity_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(PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_enumerateCapacitys(broker, ctx, Capacity_instances, properties, false, errorMessage)); } for (size_t i=0; i& Element_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Element_instances; if (discriminant=="a") CF_assert(PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_enumerateElements(broker, ctx, Element_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_enumerateElements(broker, ctx, Element_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(PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_enumerateElements(broker, ctx, Element_instances, properties, false, errorMessage)); } for (size_t i=0; i& Capacity_instances, vector& OpenDRIM_PhysicalPackageCapacity_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 < Capacity_instances.size(); i++) { OpenDRIM_PhysicalPackageCapacity instance; instance.setElement(((Instance) Element_instance).getObjectpath()); instance.setCapacity(((Instance) Capacity_instances[i]).getObjectpath()); OpenDRIM_PhysicalPackageCapacity_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_referenceCapacityToElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capacity_instance, const vector& Element_instances, vector& OpenDRIM_PhysicalPackageCapacity_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 < Element_instances.size(); i++) { OpenDRIM_PhysicalPackageCapacity instance; instance.setElement(((Instance) Element_instances[i]).getObjectpath()); instance.setCapacity(((Instance) Capacity_instance).getObjectpath()); OpenDRIM_PhysicalPackageCapacity_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_populate(OpenDRIM_PhysicalPackageCapacity& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/assocOpenDRIM_PhysicalPackageCapacity.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/assocOpenDRIM_PhysicalPackageC0000644000175000017500000000631411377667226034354 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_PHYSICALPACKAGECAPACITY_H_ #define ASSOCOPENDRIM_PHYSICALPACKAGECAPACITY_H_ #include "OpenDRIM_PhysicalPackageCapacityAccess.h" int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_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 PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_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 PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_enumerateElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_getElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_enumerateCapacitys(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_getCapacity(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_PHYSICALPACKAGECAPACITY_H_*/ ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/cmpiOpenDRIM_PhysicalPackageCapacity.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/cmpiOpenDRIM_PhysicalPackageCa0000644000175000017500000000614011377667226034332 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalPackageCapacity.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalPackageCapacity& instance) { _E_; Objectpath op(broker, OpenDRIM_PhysicalPackageCapacity_classnames[0], OpenDRIM_PhysicalPackageCapacity_NAMESPACE); if (!instance.Capacity_isNULL) op.addKey("Capacity", instance.Capacity); if (!instance.Element_isNULL) op.addKey("Element", instance.Element); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalPackageCapacity& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalPackageCapacity& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Element", instance.Element) == OK) instance.Element_isNULL = false; if (op.getKey("Capacity", instance.Capacity) == OK) instance.Capacity_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalPackageCapacity& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Capacity", instance.Capacity) == OK) instance.Capacity_isNULL = false; if (inst.getProperty("Element", instance.Element) == OK) instance.Element_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/OpenDRIM_PhysicalPackageCapacity.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/OpenDRIM_PhysicalPackageCapaci0000644000175000017500000000657111377667226034326 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALPACKAGECAPACITY_H_ #define OPENDRIM_PHYSICALPACKAGECAPACITY_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_PhysicalElement.h" #include "CIM_PhysicalElementAccess.h" #include "cmpiCIM_PhysicalCapacity.h" #include "CIM_PhysicalCapacityAccess.h" */ const static char* OpenDRIM_PhysicalPackageCapacity_classnames[] = {"OpenDRIM_PhysicalPackageCapacity"}; static string OpenDRIM_PhysicalPackageCapacity_NAMESPACE = _NAMESPACE; const static string Element_role = "Element"; const static char* Element_classnames[] = {"CIM_PhysicalElement"}; const static string Element_NAMESPACE = _NAMESPACE; const static string Capacity_role = "Capacity"; const static char* Capacity_classnames[] = {"CIM_PhysicalCapacity"}; const static string Capacity_NAMESPACE = _NAMESPACE; class OpenDRIM_PhysicalPackageCapacity { public: Objectpath Capacity; bool Capacity_isNULL; Objectpath Element; bool Element_isNULL; OpenDRIM_PhysicalPackageCapacity() { Capacity_isNULL = true; Element_isNULL = true; } ~OpenDRIM_PhysicalPackageCapacity() {} string getKeys() const { return CF_toLowCase(".Capacity=\"" + CF_quoteString(Capacity.toString()) + "\""".Element=\"" + CF_quoteString(Element.toString()) + "\""); } int getCapacity(Objectpath& value) const { if (Capacity_isNULL==true) return NOT_FOUND; value = Capacity; return OK; } int setCapacity(const Objectpath& newValue) { Capacity = newValue; Capacity.setNamespace(Capacity_NAMESPACE); Capacity_isNULL = false; return OK; } int getElement(Objectpath& value) const { if (Element_isNULL==true) return NOT_FOUND; value = Element; return OK; } int setElement(const Objectpath& newValue) { Element = newValue; Element.setNamespace(Element_NAMESPACE); Element_isNULL = false; return OK; } }; #endif /*OPENDRIM_PHYSICALPACKAGECAPACITY_H_*/ ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/OpenDRIM_PhysicalPackageCapacityAccess.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackageCapacity/OpenDRIM_PhysicalPackageCapaci0000644000175000017500000001067411377667226034325 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALPACKAGECAPACITYACCESS_H_ #define OPENDRIM_PHYSICALPACKAGECAPACITYACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_PhysicalPackageCapacity.h" #include "assocOpenDRIM_PhysicalPackageCapacity.h" int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalPackageCapacity& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalPackageCapacity& newInstance, const OpenDRIM_PhysicalPackageCapacity& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalPackageCapacity& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalPackageCapacity& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_associatorElementToCapacity(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Element_instance, const char** properties, vector& Capacity_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_associatorCapacityToElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capacity_instance, const char** properties, vector& Element_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_referenceElementToCapacity(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Element_instance, const vector& Capacity_instances, vector& OpenDRIM_PhysicalPackageCapacity_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_referenceCapacityToElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capacity_instance, const vector& Element_instances, vector& OpenDRIM_PhysicalPackageCapacity_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalPackageCapacity_populate(OpenDRIM_PhysicalPackageCapacity& instance, string& errorMessage); #endif /*OPENDRIM_PHYSICALPACKAGECAPACITYACCESS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/AUTHORS0000644000175000017500000000011111377667226021502 0ustar guillaumeguillaumeGuillaume BOTTEX opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_SystemPackaging/0000755000175000017500000000000011377667226025167 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_SystemPackaging/Makefile.am0000644000175000017500000000471211377667226027227 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_SystemPackagingProvider.la libcmpiPhysicalAsset_OpenDRIM_SystemPackagingProvider_la_SOURCES = OpenDRIM_SystemPackagingAccess.cpp OpenDRIM_SystemPackagingProvider.cpp cmpiOpenDRIM_SystemPackaging.cpp assocOpenDRIM_SystemPackaging.cpp # May have to be adjusted for direct invocation libcmpiPhysicalAsset_OpenDRIM_SystemPackagingProvider_la_CPPFLAGS = -I../CIM_PhysicalElement -I../CIM_System # Uncomment the end for direct invocation, may have to be adjusted libcmpiPhysicalAsset_OpenDRIM_SystemPackagingProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la #../CIM_PhysicalElement/libcmpiPhysicalAsset_CIM_PhysicalElementProvider.la ../CIM_System/libcmpiPhysicalAsset_CIM_SystemProvider.la libcmpiPhysicalAsset_OpenDRIM_SystemPackagingProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_SystemPackaging.h OpenDRIM_SystemPackaging.h OpenDRIM_SystemPackagingAccess.h opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_SystemPackaging/OpenDRIM_SystemPackaging.h0000644000175000017500000000652711377667226032100 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_SYSTEMPACKAGING_H_ #define OPENDRIM_SYSTEMPACKAGING_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_PhysicalElement.h" #include "CIM_PhysicalElementAccess.h" #include "cmpiCIM_System.h" #include "CIM_SystemAccess.h" */ const static char* OpenDRIM_SystemPackaging_classnames[] = {"OpenDRIM_SystemPackaging"}; static string OpenDRIM_SystemPackaging_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"CIM_PhysicalElement"}; const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"CIM_System"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_SystemPackaging { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; OpenDRIM_SystemPackaging() { Antecedent_isNULL = true; Dependent_isNULL = true; } ~OpenDRIM_SystemPackaging() {} 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_SYSTEMPACKAGING_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_SystemPackaging/OpenDRIM_SystemPackagingAccess.h0000644000175000017500000001037411377667226033215 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_SYSTEMPACKAGINGACCESS_H_ #define OPENDRIM_SYSTEMPACKAGINGACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_SystemPackaging.h" #include "assocOpenDRIM_SystemPackaging.h" int PhysicalAsset_OpenDRIM_SystemPackaging_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_SystemPackaging_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_SystemPackaging_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_SystemPackaging_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SystemPackaging& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_SystemPackaging_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemPackaging& newInstance, const OpenDRIM_SystemPackaging& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_SystemPackaging_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemPackaging& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_SystemPackaging_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemPackaging& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_SystemPackaging_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_SystemPackaging_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_SystemPackaging_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_SystemPackaging_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_SystemPackaging_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_SystemPackaging_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_SystemPackaging_populate(OpenDRIM_SystemPackaging& instance, string& errorMessage); #endif /*OPENDRIM_SYSTEMPACKAGINGACCESS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_SystemPackaging/cmpiOpenDRIM_SystemPackaging.cpp0000644000175000017500000000604411377667226033276 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_SystemPackaging.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_SystemPackaging_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SystemPackaging& instance) { _E_; Objectpath op(broker, OpenDRIM_SystemPackaging_classnames[0], OpenDRIM_SystemPackaging_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_SystemPackaging_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SystemPackaging& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_SystemPackaging_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_SystemPackaging_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SystemPackaging& 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 PhysicalAsset_OpenDRIM_SystemPackaging_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SystemPackaging& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (inst.getProperty("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_SystemPackaging/OpenDRIM_SystemPackagingProvider.cpp0000644000175000017500000004202111377667226034133 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_SystemPackaging.h" #include "OpenDRIM_SystemPackagingAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_SystemPackagingProviderSetInstance PhysicalAsset_OpenDRIM_SystemPackagingProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_SystemPackaging_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_SystemPackaging_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_SystemPackagingProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SystemPackagingProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_SystemPackaging_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SystemPackagingProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_SystemPackaging_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_SystemPackaging_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SystemPackagingProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SystemPackaging instance; PhysicalAsset_OpenDRIM_SystemPackaging_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_SystemPackaging_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SystemPackagingProviderSetInstance(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_SystemPackaging newInstance, oldInstance; PhysicalAsset_OpenDRIM_SystemPackaging_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_SystemPackaging_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SystemPackagingProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SystemPackaging instance; PhysicalAsset_OpenDRIM_SystemPackaging_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_SystemPackaging_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SystemPackagingProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SystemPackaging instance; PhysicalAsset_OpenDRIM_SystemPackaging_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SystemPackagingProviderExecQuery(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 PhysicalAsset_OpenDRIM_SystemPackagingProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SystemPackagingProviderAssociatorNames(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 = PhysicalAsset_OpenDRIM_SystemPackaging_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_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 PhysicalAsset_OpenDRIM_SystemPackagingProviderAssociators(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 = PhysicalAsset_OpenDRIM_SystemPackaging_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_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 PhysicalAsset_OpenDRIM_SystemPackagingProviderReferenceNames(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 = PhysicalAsset_OpenDRIM_SystemPackaging_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_SystemPackaging_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SystemPackagingProviderReferences(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 = PhysicalAsset_OpenDRIM_SystemPackaging_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = PhysicalAsset_OpenDRIM_SystemPackaging_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int PhysicalAsset_OpenDRIM_SystemPackaging_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_SystemPackaging_init FAILED: " + (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_SystemPackaging_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_SystemPackaging_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_SystemPackaging_unload FAILED: " + (string) OpenDRIM_SystemPackaging_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_SystemPackaging_INIT if (PhysicalAsset_OpenDRIM_SystemPackaging_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_SystemPackagingProvider, PhysicalAsset_OpenDRIM_SystemPackagingProvider, _broker, PhysicalAsset_OpenDRIM_SystemPackaging_INIT); CMAssociationMIStub(PhysicalAsset_OpenDRIM_SystemPackagingProvider, PhysicalAsset_OpenDRIM_SystemPackagingProvider, _broker, PhysicalAsset_OpenDRIM_SystemPackaging_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_SystemPackaging/assocOpenDRIM_SystemPackaging.cpp0000644000175000017500000002102211377667226033447 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "assocOpenDRIM_SystemPackaging.h" int PhysicalAsset_OpenDRIM_SystemPackaging_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 = PhysicalAsset_OpenDRIM_SystemPackaging_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(PhysicalAsset_OpenDRIM_SystemPackaging_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(PhysicalAsset_OpenDRIM_SystemPackaging_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_SystemPackaging_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(PhysicalAsset_CIM_PhysicalElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_PhysicalElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_PhysicalElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_SystemPackaging_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_PhysicalElement _instance; PhysicalAsset_CIM_PhysicalElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_PhysicalElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_PhysicalElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_SystemPackaging_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(PhysicalAsset_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_System_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_SystemPackaging_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_System _instance; PhysicalAsset_CIM_System_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_System_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_System_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_SystemPackaging/assocOpenDRIM_SystemPackaging.h0000644000175000017500000000620411377667226033121 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_SYSTEMPACKAGING_H_ #define ASSOCOPENDRIM_SYSTEMPACKAGING_H_ #include "OpenDRIM_SystemPackagingAccess.h" int PhysicalAsset_OpenDRIM_SystemPackaging_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 PhysicalAsset_OpenDRIM_SystemPackaging_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 PhysicalAsset_OpenDRIM_SystemPackaging_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_SystemPackaging_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_SystemPackaging_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_SystemPackaging_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_SYSTEMPACKAGING_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_SystemPackaging/OpenDRIM_SystemPackagingAccess.cpp0000644000175000017500000002422111377667226033544 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_SystemPackagingAccess.h" int PhysicalAsset_OpenDRIM_SystemPackaging_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_PhysicalElement_load(broker, errorMessage)); CF_assert(PhysicalAsset_CIM_System_load(broker, errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_SystemPackaging_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_PhysicalElement_unload(errorMessage)); CF_assert(PhysicalAsset_CIM_System_unload(errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_SystemPackaging_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 PhysicalAsset_OpenDRIM_SystemPackaging_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(PhysicalAsset_OpenDRIM_SystemPackaging_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(PhysicalAsset_OpenDRIM_SystemPackaging_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; PhysicalAsset_OpenDRIM_SystemPackaging_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(PhysicalAsset_OpenDRIM_SystemPackaging_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_SystemPackaging_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SystemPackaging& 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(PhysicalAsset_OpenDRIM_SystemPackaging_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(PhysicalAsset_OpenDRIM_SystemPackaging_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(PhysicalAsset_OpenDRIM_SystemPackaging_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int PhysicalAsset_OpenDRIM_SystemPackaging_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemPackaging& newInstance, const OpenDRIM_SystemPackaging& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_SystemPackaging_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemPackaging& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_SystemPackaging_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemPackaging& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_SystemPackaging_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(PhysicalAsset_OpenDRIM_SystemPackaging_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_SystemPackaging_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(PhysicalAsset_OpenDRIM_SystemPackaging_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(PhysicalAsset_OpenDRIM_SystemPackaging_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_SystemPackaging_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(PhysicalAsset_OpenDRIM_SystemPackaging_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_SystemPackaging_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_SystemPackaging instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); OpenDRIM_SystemPackaging_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_SystemPackaging_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_SystemPackaging_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_SystemPackaging instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); OpenDRIM_SystemPackaging_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_SystemPackaging_populate(OpenDRIM_SystemPackaging& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_SystemPackaging/cmpiOpenDRIM_SystemPackaging.h0000644000175000017500000000431411377667226032741 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_SYSTEMPACKAGING_H_ #define CMPIOPENDRIM_SYSTEMPACKAGING_H_ #include "OpenDRIM_SystemPackaging.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_SystemPackaging_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SystemPackaging& instance); CMPIInstance* PhysicalAsset_OpenDRIM_SystemPackaging_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SystemPackaging& instance); void PhysicalAsset_OpenDRIM_SystemPackaging_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SystemPackaging& instance); void PhysicalAsset_OpenDRIM_SystemPackaging_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SystemPackaging& instance); #endif /*CMPIOPENDRIM_SYSTEMPACKAGING_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/0000755000175000017500000000000011377667226032476 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000022700000000000011566 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementAccess.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/OpenDRIM_Ph0000644000175000017500000003001511377667226034424 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementAccess.h" int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_Capabilities_load(broker, errorMessage)); CF_assert(PhysicalAsset_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_Capabilities_unload(errorMessage)); CF_assert(PhysicalAsset_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_isAssociated(const Instance& Capabilities, const Instance& ManagedElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=false; // To change when updating the provider _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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; PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_referenceCapabilitiesToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& 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(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_getCapabilities(broker, ctx, Capabilities_objectpath, Capabilities_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_isAssociated(Capabilities_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_populate(instance, errorMessage)); _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& newInstance, const OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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_PhysicalAssetCapabilitiesToPhysicalElement instance; instance.setCapabilities(((Instance) Capabilities_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_populate(instance, errorMessage)); } OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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_PhysicalAssetCapabilitiesToPhysicalElement instance; instance.setCapabilities(((Instance) Capabilities_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_populate(instance, errorMessage)); } OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_populate(OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/Makefile.amopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/Makefile.am0000644000175000017500000000543511377667226034541 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider_la_SOURCES = OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementAccess.cpp OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider.cpp cmpiOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.cpp assocOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.cpp # May have to be adjusted for direct invocation libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider_la_CPPFLAGS = -I../CIM_Capabilities -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la #../CIM_Capabilities/libcmpiPhysicalAsset_CIM_CapabilitiesProvider.la ../CIM_ManagedElement/libcmpiPhysicalAsset_CIM_ManagedElementProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.h OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.h OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementAccess.h ././@LongLink0000000000000000000000000000022300000000000011562 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/cmpiOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/cmpiOpenDRI0000644000175000017500000000502011377667226034527 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENT_H_ #define CMPIOPENDRIM_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENT_H_ #include "OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& instance); CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& instance); void PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& instance); void PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& instance); #endif /*CMPIOPENDRIM_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENT_H_*/ ././@LongLink0000000000000000000000000000021700000000000011565 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/OpenDRIM_Ph0000644000175000017500000001016211377667226034425 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENT_H_ #define OPENDRIM_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENT_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_PhysicalAssetCapabilitiesToPhysicalElement_classnames[] = {"OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement"}; static string OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_NAMESPACE = _NAMESPACE; const static string Capabilities_role = "Capabilities"; const static char* Capabilities_classnames[] = {"CIM_Capabilities"}; const static string Capabilities_NAMESPACE = _NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"CIM_ManagedElement"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement { public: Objectpath ManagedElement; bool ManagedElement_isNULL; Objectpath Capabilities; bool Capabilities_isNULL; vector Characteristics; bool Characteristics_isNULL; OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement() { ManagedElement_isNULL = true; Capabilities_isNULL = true; Characteristics_isNULL = true; } ~OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement() {} 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_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENT_H_*/ ././@LongLink0000000000000000000000000000023100000000000011561 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/OpenDRIM_Ph0000644000175000017500000004665311377667226034443 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.h" #include "OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderSetInstance PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement instance; PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderSetInstance(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_PhysicalAssetCapabilitiesToPhysicalElement newInstance, oldInstance; PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement instance; PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement instance; PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderExecQuery(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 PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderAssociatorNames(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 = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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 PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderAssociators(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 = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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 PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderReferenceNames(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 = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProviderReferences(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 = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_init FAILED: " + (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_unload FAILED: " + (string) OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_INIT if (PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider, PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_INIT); CMAssociationMIStub(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider, PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000022400000000000011563 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/assocOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/assocOpenDR0000644000175000017500000000664011377667226034607 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENT_H_ #define ASSOCOPENDRIM_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENT_H_ #include "OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementAccess.h" int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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 PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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 PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_enumerateCapabilitiess(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_getCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENT_H_*/ ././@LongLink0000000000000000000000000000022600000000000011565 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/assocOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/assocOpenDR0000644000175000017500000002213211377667226034601 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "assocOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.h" int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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 = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_associatorManagedElementToCapabilities(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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(PhysicalAsset_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_Capabilities_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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; PhysicalAsset_CIM_Capabilities_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_Capabilities_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_Capabilities_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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(PhysicalAsset_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_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; PhysicalAsset_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000022500000000000011564 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/cmpiOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/cmpiOpenDRI0000644000175000017500000000720411377667226034535 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& instance) { _E_; Objectpath op(broker, OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[0], OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_NAMESPACE); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); if (!instance.Capabilities_isNULL) op.addKey("Capabilities", instance.Capabilities); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Characteristics_isNULL) ci.setProperty("Characteristics", instance.Characteristics); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& 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 PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& 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_; } ././@LongLink0000000000000000000000000000022500000000000011564 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementAccess.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/OpenDRIM_Ph0000644000175000017500000001205011377667226034423 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENTACCESS_H_ #define OPENDRIM_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENTACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.h" #include "assocOpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.h" int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& newInstance, const OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_associatorCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_associatorManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& Capabilities_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_referenceCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const vector& ManagedElement_instances, vector& OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_populate(OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement& instance, string& errorMessage); #endif /*OPENDRIM_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENTACCESS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chassis/0000755000175000017500000000000011377667226023473 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chassis/OpenDRIM_Chassis.h0000644000175000017500000005650711377667226026713 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_CHASSIS_H_ #define OPENDRIM_CHASSIS_H_ #include const static char* OpenDRIM_Chassis_classnames[] = {"OpenDRIM_Chassis"}; static string OpenDRIM_Chassis_NAMESPACE = _NAMESPACE; class OpenDRIM_Chassis { public: string Caption; bool Caption_isNULL; string InstallDate; bool InstallDate_isNULL; string Name; bool Name_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; string Tag; bool Tag_isNULL; string Description; bool Description_isNULL; string CreationClassName; bool CreationClassName_isNULL; string ElementName; bool ElementName_isNULL; string Manufacturer; bool Manufacturer_isNULL; string Model; bool Model_isNULL; string SKU; bool SKU_isNULL; string SerialNumber; bool SerialNumber_isNULL; string Version; bool Version_isNULL; string PartNumber; bool PartNumber_isNULL; string OtherIdentifyingInfo; bool OtherIdentifyingInfo_isNULL; bool PoweredOn; bool PoweredOn_isNULL; string ManufactureDate; bool ManufactureDate_isNULL; string VendorEquipmentType; bool VendorEquipmentType_isNULL; string UserTracking; bool UserTracking_isNULL; bool CanBeFRUed; bool CanBeFRUed_isNULL; unsigned short RemovalConditions; bool RemovalConditions_isNULL; bool Removable; bool Removable_isNULL; bool Replaceable; bool Replaceable_isNULL; bool HotSwappable; bool HotSwappable_isNULL; float Height; bool Height_isNULL; float Depth; bool Depth_isNULL; float Width; bool Width_isNULL; float Weight; bool Weight_isNULL; unsigned short PackageType; bool PackageType_isNULL; string OtherPackageType; bool OtherPackageType_isNULL; vector VendorCompatibilityStrings; bool VendorCompatibilityStrings_isNULL; string CableManagementStrategy; bool CableManagementStrategy_isNULL; vector ServicePhilosophy; bool ServicePhilosophy_isNULL; vector ServiceDescriptions; bool ServiceDescriptions_isNULL; bool LockPresent; bool LockPresent_isNULL; bool AudibleAlarm; bool AudibleAlarm_isNULL; bool VisibleAlarm; bool VisibleAlarm_isNULL; unsigned short SecurityBreach; bool SecurityBreach_isNULL; string BreachDescription; bool BreachDescription_isNULL; bool IsLocked; bool IsLocked_isNULL; unsigned short NumberOfPowerCords; bool NumberOfPowerCords_isNULL; short CurrentRequiredOrProduced; bool CurrentRequiredOrProduced_isNULL; unsigned short HeatGeneration; bool HeatGeneration_isNULL; vector ChassisTypes; bool ChassisTypes_isNULL; vector TypeDescriptions; bool TypeDescriptions_isNULL; unsigned short ChassisPackageType; bool ChassisPackageType_isNULL; string ChassisTypeDescription; bool ChassisTypeDescription_isNULL; unsigned short MultipleSystemSupport; bool MultipleSystemSupport_isNULL; unsigned short RackMountable; bool RackMountable_isNULL; unsigned short InputCurrentType; bool InputCurrentType_isNULL; string OtherInputCurrentType; bool OtherInputCurrentType_isNULL; int InputVoltage; bool InputVoltage_isNULL; OpenDRIM_Chassis() { Caption_isNULL = true; InstallDate_isNULL = true; Name_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; Tag_isNULL = true; Description_isNULL = true; CreationClassName_isNULL = true; ElementName_isNULL = true; Manufacturer_isNULL = true; Model_isNULL = true; SKU_isNULL = true; SerialNumber_isNULL = true; Version_isNULL = true; PartNumber_isNULL = true; OtherIdentifyingInfo_isNULL = true; PoweredOn_isNULL = true; ManufactureDate_isNULL = true; VendorEquipmentType_isNULL = true; UserTracking_isNULL = true; CanBeFRUed_isNULL = true; RemovalConditions_isNULL = true; Removable_isNULL = true; Replaceable_isNULL = true; HotSwappable_isNULL = true; Height_isNULL = true; Depth_isNULL = true; Width_isNULL = true; Weight_isNULL = true; PackageType_isNULL = true; OtherPackageType_isNULL = true; VendorCompatibilityStrings_isNULL = true; CableManagementStrategy_isNULL = true; ServicePhilosophy_isNULL = true; ServiceDescriptions_isNULL = true; LockPresent_isNULL = true; AudibleAlarm_isNULL = true; VisibleAlarm_isNULL = true; SecurityBreach_isNULL = true; BreachDescription_isNULL = true; IsLocked_isNULL = true; NumberOfPowerCords_isNULL = true; CurrentRequiredOrProduced_isNULL = true; HeatGeneration_isNULL = true; ChassisTypes_isNULL = true; TypeDescriptions_isNULL = true; ChassisPackageType_isNULL = true; ChassisTypeDescription_isNULL = true; MultipleSystemSupport_isNULL = true; RackMountable_isNULL = true; InputCurrentType_isNULL = true; OtherInputCurrentType_isNULL = true; InputVoltage_isNULL = true; } ~OpenDRIM_Chassis() {} string getKeys() const { return CF_toLowCase(".Tag=\"" + CF_quoteString(Tag) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""); } 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 getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getTag(string& value) const { if (Tag_isNULL==true) return NOT_FOUND; value = Tag; return OK; } int setTag(const string& newValue) { Tag = newValue; Tag_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 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 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 getManufacturer(string& value) const { if (Manufacturer_isNULL==true) return NOT_FOUND; value = Manufacturer; return OK; } int setManufacturer(const string& newValue) { Manufacturer = newValue; Manufacturer_isNULL = false; return OK; } int getModel(string& value) const { if (Model_isNULL==true) return NOT_FOUND; value = Model; return OK; } int setModel(const string& newValue) { Model = newValue; Model_isNULL = false; return OK; } int getSKU(string& value) const { if (SKU_isNULL==true) return NOT_FOUND; value = SKU; return OK; } int setSKU(const string& newValue) { SKU = newValue; SKU_isNULL = false; return OK; } int getSerialNumber(string& value) const { if (SerialNumber_isNULL==true) return NOT_FOUND; value = SerialNumber; return OK; } int setSerialNumber(const string& newValue) { SerialNumber = newValue; SerialNumber_isNULL = false; return OK; } int getVersion(string& value) const { if (Version_isNULL==true) return NOT_FOUND; value = Version; return OK; } int setVersion(const string& newValue) { Version = newValue; Version_isNULL = false; return OK; } int getPartNumber(string& value) const { if (PartNumber_isNULL==true) return NOT_FOUND; value = PartNumber; return OK; } int setPartNumber(const string& newValue) { PartNumber = newValue; PartNumber_isNULL = false; return OK; } int getOtherIdentifyingInfo(string& value) const { if (OtherIdentifyingInfo_isNULL==true) return NOT_FOUND; value = OtherIdentifyingInfo; return OK; } int setOtherIdentifyingInfo(const string& newValue) { OtherIdentifyingInfo = newValue; OtherIdentifyingInfo_isNULL = false; return OK; } int getPoweredOn(bool& value) const { if (PoweredOn_isNULL==true) return NOT_FOUND; value = PoweredOn; return OK; } int setPoweredOn(const bool& newValue) { PoweredOn = newValue; PoweredOn_isNULL = false; return OK; } int getManufactureDate(string& value) const { if (ManufactureDate_isNULL==true) return NOT_FOUND; value = ManufactureDate; return OK; } int setManufactureDate(const string& newValue) { ManufactureDate = newValue; ManufactureDate_isNULL = false; return OK; } int getVendorEquipmentType(string& value) const { if (VendorEquipmentType_isNULL==true) return NOT_FOUND; value = VendorEquipmentType; return OK; } int setVendorEquipmentType(const string& newValue) { VendorEquipmentType = newValue; VendorEquipmentType_isNULL = false; return OK; } int getUserTracking(string& value) const { if (UserTracking_isNULL==true) return NOT_FOUND; value = UserTracking; return OK; } int setUserTracking(const string& newValue) { UserTracking = newValue; UserTracking_isNULL = false; return OK; } int getCanBeFRUed(bool& value) const { if (CanBeFRUed_isNULL==true) return NOT_FOUND; value = CanBeFRUed; return OK; } int setCanBeFRUed(const bool& newValue) { CanBeFRUed = newValue; CanBeFRUed_isNULL = false; return OK; } int getRemovalConditions(unsigned short& value) const { if (RemovalConditions_isNULL==true) return NOT_FOUND; value = RemovalConditions; return OK; } int setRemovalConditions(const unsigned short& newValue) { RemovalConditions = newValue; RemovalConditions_isNULL = false; return OK; } int getRemovable(bool& value) const { if (Removable_isNULL==true) return NOT_FOUND; value = Removable; return OK; } int setRemovable(const bool& newValue) { Removable = newValue; Removable_isNULL = false; return OK; } int getReplaceable(bool& value) const { if (Replaceable_isNULL==true) return NOT_FOUND; value = Replaceable; return OK; } int setReplaceable(const bool& newValue) { Replaceable = newValue; Replaceable_isNULL = false; return OK; } int getHotSwappable(bool& value) const { if (HotSwappable_isNULL==true) return NOT_FOUND; value = HotSwappable; return OK; } int setHotSwappable(const bool& newValue) { HotSwappable = newValue; HotSwappable_isNULL = false; return OK; } int getHeight(float& value) const { if (Height_isNULL==true) return NOT_FOUND; value = Height; return OK; } int setHeight(const float& newValue) { Height = newValue; Height_isNULL = false; return OK; } int getDepth(float& value) const { if (Depth_isNULL==true) return NOT_FOUND; value = Depth; return OK; } int setDepth(const float& newValue) { Depth = newValue; Depth_isNULL = false; return OK; } int getWidth(float& value) const { if (Width_isNULL==true) return NOT_FOUND; value = Width; return OK; } int setWidth(const float& newValue) { Width = newValue; Width_isNULL = false; return OK; } int getWeight(float& value) const { if (Weight_isNULL==true) return NOT_FOUND; value = Weight; return OK; } int setWeight(const float& newValue) { Weight = newValue; Weight_isNULL = false; return OK; } int getPackageType(unsigned short& value) const { if (PackageType_isNULL==true) return NOT_FOUND; value = PackageType; return OK; } int setPackageType(const unsigned short& newValue) { PackageType = newValue; PackageType_isNULL = false; return OK; } int getOtherPackageType(string& value) const { if (OtherPackageType_isNULL==true) return NOT_FOUND; value = OtherPackageType; return OK; } int setOtherPackageType(const string& newValue) { OtherPackageType = newValue; OtherPackageType_isNULL = false; return OK; } int getVendorCompatibilityStrings(vector& value) const { if (VendorCompatibilityStrings_isNULL==true) return NOT_FOUND; value = VendorCompatibilityStrings; return OK; } int setVendorCompatibilityStrings(const vector& newValue) { VendorCompatibilityStrings = newValue; VendorCompatibilityStrings_isNULL = false; return OK; } int getCableManagementStrategy(string& value) const { if (CableManagementStrategy_isNULL==true) return NOT_FOUND; value = CableManagementStrategy; return OK; } int setCableManagementStrategy(const string& newValue) { CableManagementStrategy = newValue; CableManagementStrategy_isNULL = false; return OK; } int getServicePhilosophy(vector& value) const { if (ServicePhilosophy_isNULL==true) return NOT_FOUND; value = ServicePhilosophy; return OK; } int setServicePhilosophy(const vector& newValue) { ServicePhilosophy = newValue; ServicePhilosophy_isNULL = false; return OK; } int getServiceDescriptions(vector& value) const { if (ServiceDescriptions_isNULL==true) return NOT_FOUND; value = ServiceDescriptions; return OK; } int setServiceDescriptions(const vector& newValue) { ServiceDescriptions = newValue; ServiceDescriptions_isNULL = false; return OK; } int getLockPresent(bool& value) const { if (LockPresent_isNULL==true) return NOT_FOUND; value = LockPresent; return OK; } int setLockPresent(const bool& newValue) { LockPresent = newValue; LockPresent_isNULL = false; return OK; } int getAudibleAlarm(bool& value) const { if (AudibleAlarm_isNULL==true) return NOT_FOUND; value = AudibleAlarm; return OK; } int setAudibleAlarm(const bool& newValue) { AudibleAlarm = newValue; AudibleAlarm_isNULL = false; return OK; } int getVisibleAlarm(bool& value) const { if (VisibleAlarm_isNULL==true) return NOT_FOUND; value = VisibleAlarm; return OK; } int setVisibleAlarm(const bool& newValue) { VisibleAlarm = newValue; VisibleAlarm_isNULL = false; return OK; } int getSecurityBreach(unsigned short& value) const { if (SecurityBreach_isNULL==true) return NOT_FOUND; value = SecurityBreach; return OK; } int setSecurityBreach(const unsigned short& newValue) { SecurityBreach = newValue; SecurityBreach_isNULL = false; return OK; } int getBreachDescription(string& value) const { if (BreachDescription_isNULL==true) return NOT_FOUND; value = BreachDescription; return OK; } int setBreachDescription(const string& newValue) { BreachDescription = newValue; BreachDescription_isNULL = false; return OK; } int getIsLocked(bool& value) const { if (IsLocked_isNULL==true) return NOT_FOUND; value = IsLocked; return OK; } int setIsLocked(const bool& newValue) { IsLocked = newValue; IsLocked_isNULL = false; return OK; } int getNumberOfPowerCords(unsigned short& value) const { if (NumberOfPowerCords_isNULL==true) return NOT_FOUND; value = NumberOfPowerCords; return OK; } int setNumberOfPowerCords(const unsigned short& newValue) { NumberOfPowerCords = newValue; NumberOfPowerCords_isNULL = false; return OK; } int getCurrentRequiredOrProduced(short& value) const { if (CurrentRequiredOrProduced_isNULL==true) return NOT_FOUND; value = CurrentRequiredOrProduced; return OK; } int setCurrentRequiredOrProduced(const short& newValue) { CurrentRequiredOrProduced = newValue; CurrentRequiredOrProduced_isNULL = false; return OK; } int getHeatGeneration(unsigned short& value) const { if (HeatGeneration_isNULL==true) return NOT_FOUND; value = HeatGeneration; return OK; } int setHeatGeneration(const unsigned short& newValue) { HeatGeneration = newValue; HeatGeneration_isNULL = false; return OK; } int getChassisTypes(vector& value) const { if (ChassisTypes_isNULL==true) return NOT_FOUND; value = ChassisTypes; return OK; } int setChassisTypes(const vector& newValue) { ChassisTypes = newValue; ChassisTypes_isNULL = false; return OK; } int getTypeDescriptions(vector& value) const { if (TypeDescriptions_isNULL==true) return NOT_FOUND; value = TypeDescriptions; return OK; } int setTypeDescriptions(const vector& newValue) { TypeDescriptions = newValue; TypeDescriptions_isNULL = false; return OK; } int getChassisPackageType(unsigned short& value) const { if (ChassisPackageType_isNULL==true) return NOT_FOUND; value = ChassisPackageType; return OK; } int setChassisPackageType(const unsigned short& newValue) { ChassisPackageType = newValue; ChassisPackageType_isNULL = false; return OK; } int getChassisTypeDescription(string& value) const { if (ChassisTypeDescription_isNULL==true) return NOT_FOUND; value = ChassisTypeDescription; return OK; } int setChassisTypeDescription(const string& newValue) { ChassisTypeDescription = newValue; ChassisTypeDescription_isNULL = false; return OK; } int getMultipleSystemSupport(unsigned short& value) const { if (MultipleSystemSupport_isNULL==true) return NOT_FOUND; value = MultipleSystemSupport; return OK; } int setMultipleSystemSupport(const unsigned short& newValue) { MultipleSystemSupport = newValue; MultipleSystemSupport_isNULL = false; return OK; } int getRackMountable(unsigned short& value) const { if (RackMountable_isNULL==true) return NOT_FOUND; value = RackMountable; return OK; } int setRackMountable(const unsigned short& newValue) { RackMountable = newValue; RackMountable_isNULL = false; return OK; } int getInputCurrentType(unsigned short& value) const { if (InputCurrentType_isNULL==true) return NOT_FOUND; value = InputCurrentType; return OK; } int setInputCurrentType(const unsigned short& newValue) { InputCurrentType = newValue; InputCurrentType_isNULL = false; return OK; } int getOtherInputCurrentType(string& value) const { if (OtherInputCurrentType_isNULL==true) return NOT_FOUND; value = OtherInputCurrentType; return OK; } int setOtherInputCurrentType(const string& newValue) { OtherInputCurrentType = newValue; OtherInputCurrentType_isNULL = false; return OK; } int getInputVoltage(int& value) const { if (InputVoltage_isNULL==true) return NOT_FOUND; value = InputVoltage; return OK; } int setInputVoltage(const int& newValue) { InputVoltage = newValue; InputVoltage_isNULL = false; return OK; } }; class OpenDRIM_Chassis_IsCompatible_In { public: Objectpath ElementToCheck; bool ElementToCheck_isNULL; OpenDRIM_Chassis_IsCompatible_In() { ElementToCheck_isNULL = true; } ~OpenDRIM_Chassis_IsCompatible_In() {} int getElementToCheck(Objectpath& value) const { if (ElementToCheck_isNULL == true) return NOT_FOUND; value = ElementToCheck; return OK; } int setElementToCheck(const Objectpath& newValue) { ElementToCheck = newValue; ElementToCheck_isNULL = false; return OK; } }; #endif /*OPENDRIM_CHASSIS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chassis/Makefile.am0000644000175000017500000000376211377667226025537 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_ChassisProvider.la libcmpiPhysicalAsset_OpenDRIM_ChassisProvider_la_SOURCES = OpenDRIM_ChassisAccess.cpp OpenDRIM_ChassisProvider.cpp cmpiOpenDRIM_Chassis.cpp libcmpiPhysicalAsset_OpenDRIM_ChassisProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la libcmpiPhysicalAsset_OpenDRIM_ChassisProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_Chassis.h OpenDRIM_Chassis.h OpenDRIM_ChassisAccess.h opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chassis/cmpiOpenDRIM_Chassis.h0000644000175000017500000000435611377667226027557 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_CHASSIS_H_ #define CMPIOPENDRIM_CHASSIS_H_ #include "OpenDRIM_Chassis.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_Chassis_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Chassis& instance); CMPIInstance* PhysicalAsset_OpenDRIM_Chassis_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Chassis& instance); void PhysicalAsset_OpenDRIM_Chassis_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Chassis& instance); void PhysicalAsset_OpenDRIM_Chassis_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Chassis& instance); void PhysicalAsset_OpenDRIM_Chassis_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_Chassis_IsCompatible_In& args); #endif /*CMPIOPENDRIM_CHASSIS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chassis/OpenDRIM_ChassisAccess.cpp0000644000175000017500000000634311377667226030361 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_ChassisAccess.h" int PhysicalAsset_OpenDRIM_Chassis_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Chassis_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Chassis_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_Chassis_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Chassis& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_Chassis_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Chassis& newInstance, const OpenDRIM_Chassis& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Chassis_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Chassis& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Chassis_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Chassis& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Chassis_IsCompatible(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Chassis& instance, unsigned int& returnValue, const OpenDRIM_Chassis_IsCompatible_In& in, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Chassis_populate(OpenDRIM_Chassis& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chassis/OpenDRIM_ChassisProvider.cpp0000644000175000017500000003171511377667226030753 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Chassis.h" #include "OpenDRIM_ChassisAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_ChassisProviderSetInstance PhysicalAsset_OpenDRIM_ChassisProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_Chassis_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_Chassis_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_ChassisProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_Chassis_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChassisProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chassis_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chassis_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_Chassis_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChassisProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_Chassis_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chassis_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_Chassis_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChassisProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Chassis instance; PhysicalAsset_OpenDRIM_Chassis_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chassis_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chassis_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_Chassis_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChassisProviderSetInstance(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_Chassis newInstance, oldInstance; PhysicalAsset_OpenDRIM_Chassis_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_Chassis_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chassis_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chassis_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Chassis_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chassis_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChassisProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Chassis instance; PhysicalAsset_OpenDRIM_Chassis_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chassis_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_Chassis_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Chassis_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chassis_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Chassis_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chassis_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_Chassis_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChassisProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Chassis instance; PhysicalAsset_OpenDRIM_Chassis_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chassis_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chassis_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Chassis_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chassis_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChassisProviderExecQuery(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 PhysicalAsset_OpenDRIM_ChassisProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_Chassis_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChassisProviderInvokeMethod(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_Chassis instance; PhysicalAsset_OpenDRIM_Chassis_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"CreationClassName", "Tag"}; int errorCode = PhysicalAsset_OpenDRIM_Chassis_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chassis_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="IsCompatible") { unsigned int returnValue; OpenDRIM_Chassis_IsCompatible_In inArgs; PhysicalAsset_OpenDRIM_Chassis_toCPP(_broker, in, inArgs); errorCode = PhysicalAsset_OpenDRIM_Chassis_IsCompatible(_broker, ctx, instance, returnValue, inArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chassis_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_Chassis_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 PhysicalAsset_OpenDRIM_Chassis_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chassis_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_Chassis_init FAILED: " + (string) OpenDRIM_Chassis_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_Chassis_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chassis_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_Chassis_unload FAILED: " + (string) OpenDRIM_Chassis_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_Chassis_INIT if (PhysicalAsset_OpenDRIM_Chassis_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_ChassisProvider, PhysicalAsset_OpenDRIM_ChassisProvider, _broker, PhysicalAsset_OpenDRIM_Chassis_INIT); CMMethodMIStub(PhysicalAsset_OpenDRIM_ChassisProvider, PhysicalAsset_OpenDRIM_ChassisProvider, _broker, PhysicalAsset_OpenDRIM_Chassis_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chassis/OpenDRIM_ChassisAccess.h0000644000175000017500000000603211377667226030021 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_CHASSISACCESS_H_ #define OPENDRIM_CHASSISACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_Chassis.h" int PhysicalAsset_OpenDRIM_Chassis_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_Chassis_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_Chassis_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_Chassis_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Chassis& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_Chassis_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Chassis& newInstance, const OpenDRIM_Chassis& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_Chassis_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Chassis& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_Chassis_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Chassis& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_Chassis_IsCompatible(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Chassis& instance, unsigned int& returnValue, const OpenDRIM_Chassis_IsCompatible_In& in, string& errorMessage); int PhysicalAsset_OpenDRIM_Chassis_populate(OpenDRIM_Chassis& instance, string& errorMessage); #endif /*OPENDRIM_CHASSISACCESS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chassis/cmpiOpenDRIM_Chassis.cpp0000644000175000017500000003607711377667226030117 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Chassis.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_Chassis_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Chassis& instance) { _E_; Objectpath op(broker, OpenDRIM_Chassis_classnames[0], OpenDRIM_Chassis_NAMESPACE); if (!instance.Tag_isNULL) op.addKey("Tag", instance.Tag); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_Chassis_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Chassis& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_Chassis_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.Name_isNULL) ci.setProperty("Name", instance.Name); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.Manufacturer_isNULL) ci.setProperty("Manufacturer", instance.Manufacturer); if (!instance.Model_isNULL) ci.setProperty("Model", instance.Model); if (!instance.SKU_isNULL) ci.setProperty("SKU", instance.SKU); if (!instance.SerialNumber_isNULL) ci.setProperty("SerialNumber", instance.SerialNumber); if (!instance.Version_isNULL) ci.setProperty("Version", instance.Version); if (!instance.PartNumber_isNULL) ci.setProperty("PartNumber", instance.PartNumber); if (!instance.OtherIdentifyingInfo_isNULL) ci.setProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo); if (!instance.PoweredOn_isNULL) ci.setProperty("PoweredOn", instance.PoweredOn); if (!instance.ManufactureDate_isNULL) ci.setPropertyDatetime("ManufactureDate", instance.ManufactureDate); if (!instance.VendorEquipmentType_isNULL) ci.setProperty("VendorEquipmentType", instance.VendorEquipmentType); if (!instance.UserTracking_isNULL) ci.setProperty("UserTracking", instance.UserTracking); if (!instance.CanBeFRUed_isNULL) ci.setProperty("CanBeFRUed", instance.CanBeFRUed); if (!instance.RemovalConditions_isNULL) ci.setProperty("RemovalConditions", instance.RemovalConditions); if (!instance.Removable_isNULL) ci.setProperty("Removable", instance.Removable); if (!instance.Replaceable_isNULL) ci.setProperty("Replaceable", instance.Replaceable); if (!instance.HotSwappable_isNULL) ci.setProperty("HotSwappable", instance.HotSwappable); if (!instance.Height_isNULL) ci.setProperty("Height", instance.Height); if (!instance.Depth_isNULL) ci.setProperty("Depth", instance.Depth); if (!instance.Width_isNULL) ci.setProperty("Width", instance.Width); if (!instance.Weight_isNULL) ci.setProperty("Weight", instance.Weight); if (!instance.PackageType_isNULL) ci.setProperty("PackageType", instance.PackageType); if (!instance.OtherPackageType_isNULL) ci.setProperty("OtherPackageType", instance.OtherPackageType); if (!instance.VendorCompatibilityStrings_isNULL) ci.setProperty("VendorCompatibilityStrings", instance.VendorCompatibilityStrings); if (!instance.CableManagementStrategy_isNULL) ci.setProperty("CableManagementStrategy", instance.CableManagementStrategy); if (!instance.ServicePhilosophy_isNULL) ci.setProperty("ServicePhilosophy", instance.ServicePhilosophy); if (!instance.ServiceDescriptions_isNULL) ci.setProperty("ServiceDescriptions", instance.ServiceDescriptions); if (!instance.LockPresent_isNULL) ci.setProperty("LockPresent", instance.LockPresent); if (!instance.AudibleAlarm_isNULL) ci.setProperty("AudibleAlarm", instance.AudibleAlarm); if (!instance.VisibleAlarm_isNULL) ci.setProperty("VisibleAlarm", instance.VisibleAlarm); if (!instance.SecurityBreach_isNULL) ci.setProperty("SecurityBreach", instance.SecurityBreach); if (!instance.BreachDescription_isNULL) ci.setProperty("BreachDescription", instance.BreachDescription); if (!instance.IsLocked_isNULL) ci.setProperty("IsLocked", instance.IsLocked); if (!instance.NumberOfPowerCords_isNULL) ci.setProperty("NumberOfPowerCords", instance.NumberOfPowerCords); if (!instance.CurrentRequiredOrProduced_isNULL) ci.setProperty("CurrentRequiredOrProduced", instance.CurrentRequiredOrProduced); if (!instance.HeatGeneration_isNULL) ci.setProperty("HeatGeneration", instance.HeatGeneration); if (!instance.ChassisTypes_isNULL) ci.setProperty("ChassisTypes", instance.ChassisTypes); if (!instance.TypeDescriptions_isNULL) ci.setProperty("TypeDescriptions", instance.TypeDescriptions); if (!instance.ChassisPackageType_isNULL) ci.setProperty("ChassisPackageType", instance.ChassisPackageType); if (!instance.ChassisTypeDescription_isNULL) ci.setProperty("ChassisTypeDescription", instance.ChassisTypeDescription); if (!instance.MultipleSystemSupport_isNULL) ci.setProperty("MultipleSystemSupport", instance.MultipleSystemSupport); if (!instance.RackMountable_isNULL) ci.setProperty("RackMountable", instance.RackMountable); if (!instance.InputCurrentType_isNULL) ci.setProperty("InputCurrentType", instance.InputCurrentType); if (!instance.OtherInputCurrentType_isNULL) ci.setProperty("OtherInputCurrentType", instance.OtherInputCurrentType); if (!instance.InputVoltage_isNULL) ci.setProperty("InputVoltage", instance.InputVoltage); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_Chassis_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Chassis& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (op.getKey("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_Chassis_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Chassis& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("Manufacturer", instance.Manufacturer) == OK) instance.Manufacturer_isNULL = false; if (inst.getProperty("Model", instance.Model) == OK) instance.Model_isNULL = false; if (inst.getProperty("SKU", instance.SKU) == OK) instance.SKU_isNULL = false; if (inst.getProperty("SerialNumber", instance.SerialNumber) == OK) instance.SerialNumber_isNULL = false; if (inst.getProperty("Version", instance.Version) == OK) instance.Version_isNULL = false; if (inst.getProperty("PartNumber", instance.PartNumber) == OK) instance.PartNumber_isNULL = false; if (inst.getProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo) == OK) instance.OtherIdentifyingInfo_isNULL = false; if (inst.getProperty("PoweredOn", instance.PoweredOn) == OK) instance.PoweredOn_isNULL = false; if (inst.getPropertyDatetime("ManufactureDate", instance.ManufactureDate) == OK) instance.ManufactureDate_isNULL = false; if (inst.getProperty("VendorEquipmentType", instance.VendorEquipmentType) == OK) instance.VendorEquipmentType_isNULL = false; if (inst.getProperty("UserTracking", instance.UserTracking) == OK) instance.UserTracking_isNULL = false; if (inst.getProperty("CanBeFRUed", instance.CanBeFRUed) == OK) instance.CanBeFRUed_isNULL = false; if (inst.getProperty("RemovalConditions", instance.RemovalConditions) == OK) instance.RemovalConditions_isNULL = false; if (inst.getProperty("Removable", instance.Removable) == OK) instance.Removable_isNULL = false; if (inst.getProperty("Replaceable", instance.Replaceable) == OK) instance.Replaceable_isNULL = false; if (inst.getProperty("HotSwappable", instance.HotSwappable) == OK) instance.HotSwappable_isNULL = false; if (inst.getProperty("Height", instance.Height) == OK) instance.Height_isNULL = false; if (inst.getProperty("Depth", instance.Depth) == OK) instance.Depth_isNULL = false; if (inst.getProperty("Width", instance.Width) == OK) instance.Width_isNULL = false; if (inst.getProperty("Weight", instance.Weight) == OK) instance.Weight_isNULL = false; if (inst.getProperty("PackageType", instance.PackageType) == OK) instance.PackageType_isNULL = false; if (inst.getProperty("OtherPackageType", instance.OtherPackageType) == OK) instance.OtherPackageType_isNULL = false; if (inst.getProperty("VendorCompatibilityStrings", instance.VendorCompatibilityStrings) == OK) instance.VendorCompatibilityStrings_isNULL = false; if (inst.getProperty("CableManagementStrategy", instance.CableManagementStrategy) == OK) instance.CableManagementStrategy_isNULL = false; if (inst.getProperty("ServicePhilosophy", instance.ServicePhilosophy) == OK) instance.ServicePhilosophy_isNULL = false; if (inst.getProperty("ServiceDescriptions", instance.ServiceDescriptions) == OK) instance.ServiceDescriptions_isNULL = false; if (inst.getProperty("LockPresent", instance.LockPresent) == OK) instance.LockPresent_isNULL = false; if (inst.getProperty("AudibleAlarm", instance.AudibleAlarm) == OK) instance.AudibleAlarm_isNULL = false; if (inst.getProperty("VisibleAlarm", instance.VisibleAlarm) == OK) instance.VisibleAlarm_isNULL = false; if (inst.getProperty("SecurityBreach", instance.SecurityBreach) == OK) instance.SecurityBreach_isNULL = false; if (inst.getProperty("BreachDescription", instance.BreachDescription) == OK) instance.BreachDescription_isNULL = false; if (inst.getProperty("IsLocked", instance.IsLocked) == OK) instance.IsLocked_isNULL = false; if (inst.getProperty("NumberOfPowerCords", instance.NumberOfPowerCords) == OK) instance.NumberOfPowerCords_isNULL = false; if (inst.getProperty("CurrentRequiredOrProduced", instance.CurrentRequiredOrProduced) == OK) instance.CurrentRequiredOrProduced_isNULL = false; if (inst.getProperty("HeatGeneration", instance.HeatGeneration) == OK) instance.HeatGeneration_isNULL = false; if (inst.getProperty("ChassisTypes", instance.ChassisTypes) == OK) instance.ChassisTypes_isNULL = false; if (inst.getProperty("TypeDescriptions", instance.TypeDescriptions) == OK) instance.TypeDescriptions_isNULL = false; if (inst.getProperty("ChassisPackageType", instance.ChassisPackageType) == OK) instance.ChassisPackageType_isNULL = false; if (inst.getProperty("ChassisTypeDescription", instance.ChassisTypeDescription) == OK) instance.ChassisTypeDescription_isNULL = false; if (inst.getProperty("MultipleSystemSupport", instance.MultipleSystemSupport) == OK) instance.MultipleSystemSupport_isNULL = false; if (inst.getProperty("RackMountable", instance.RackMountable) == OK) instance.RackMountable_isNULL = false; if (inst.getProperty("InputCurrentType", instance.InputCurrentType) == OK) instance.InputCurrentType_isNULL = false; if (inst.getProperty("OtherInputCurrentType", instance.OtherInputCurrentType) == OK) instance.OtherInputCurrentType_isNULL = false; if (inst.getProperty("InputVoltage", instance.InputVoltage) == OK) instance.InputVoltage_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_Chassis_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_Chassis_IsCompatible_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath ElementToCheck; data = in->ft->getArg(in, "ElementToCheck", &rc); if (rc.rc == OK) { CT_ToC(broker, data, ElementToCheck); args.setElementToCheck(ElementToCheck); } _L_; } opendrim-lmp-physicalasset-0.1.2~ppa/packaging/0000755000175000017500000000000011377667226022365 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/packaging/debian/0000755000175000017500000000000011404316664023573 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/packaging/debian/postrm0000644000175000017500000000462311404316657025051 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_PhysicalComponent rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_ConnectedTo rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_PhysicalFrame rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_ComputerSystemPackage rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_Realizes rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_PhysicalPackageCapacity rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_ConfigurationCapacity rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_PhysicalPackage rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_PhysicalMemory rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_PhysicalAssetCapabilities rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_PhysicalElementInConnector rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_SystemPackaging rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_Chip rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_PhysicalAssetRegisteredProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_Chassis rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_PhysicalAssetConformsToProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_PhysicalElementPackage rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_PhysicalConnector rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_Rack rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_Card rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_Slot ;; 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-physicalasset-0.1.2~ppa/packaging/debian/source/0000755000175000017500000000000011400644502025062 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/packaging/debian/source/format0000644000175000017500000000001411377670503026305 0ustar guillaumeguillaume3.0 (quilt) opendrim-lmp-physicalasset-0.1.2~ppa/packaging/debian/copyright0000644000175000017500000000267011377667226025547 0ustar guillaumeguillaumeThis package was debianized by Guillaume BOTTEX on Wed, 19 Aug 2009 16:14:02 +0900. It was downloaded from http://opendrim.sourceforge.net/ Upstream Author: Guillaume BOTTEX Copyright: Copyright (C) 2009 ETRI Guillaume BOTTEX License: Linux Management Providers (LMP), Physical Asset 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-physicalasset-0.1.2~ppa/packaging/debian/control0000644000175000017500000000131011404316520025160 0ustar guillaumeguillaumeSource: opendrim-lmp-physicalasset 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-physicalasset Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, sfcb, libopendrim0 (>= 1.1.3) Description: OpenDRIM Physical Asset provider Provides information about the computer system's physical asset capabilities. . Compliant with the DMTF Physical Asset Profile v1.0.2 (DSP1011). opendrim-lmp-physicalasset-0.1.2~ppa/packaging/debian/prerm0000644000175000017500000000244311377667226024662 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-physicalasset VERSION=`cat /usr/share/doc/opendrim-lmp-physicalasset/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=PhysicalAsset $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-physicalasset-0.1.2~ppa/packaging/debian/changelog0000644000175000017500000000053211404316664025445 0ustar guillaumeguillaumeopendrim-lmp-physicalasset (0.1.2-0ubuntu1) lucid; urgency=low * New upstream version -- Guillaume BOTTEX Fri, 11 Jun 2010 11:20:00 +0900 opendrim-lmp-physicalasset (0.1.1-0ubuntu1) karmic; urgency=low * Initial release -- Guillaume BOTTEX Wed, 19 Aug 2009 16:14:02 +0900 opendrim-lmp-physicalasset-0.1.2~ppa/packaging/debian/postinst0000644000175000017500000000262011377667226025415 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-physicalasset VERSION=`cat /usr/share/doc/opendrim-lmp-physicalasset/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=PhysicalAsset $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-physicalasset-0.1.2~ppa/packaging/debian/install0000644000175000017500000000004711377667226025201 0ustar guillaumeguillaumeusr/lib/cmpi/*.so usr/share/OpenDRIM/* opendrim-lmp-physicalasset-0.1.2~ppa/packaging/debian/rules0000755000175000017500000000357111377667226024675 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-physicalasset 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-physicalasset.sgml > opendrim-lmp-physicalasset.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-physicalasset-0.1.2~ppa/packaging/debian/docs0000644000175000017500000000003111377667226024454 0ustar guillaumeguillaumeNEWS README TODO VERSION opendrim-lmp-physicalasset-0.1.2~ppa/packaging/debian/compat0000644000175000017500000000000211377667226025005 0ustar guillaumeguillaume5 opendrim-lmp-physicalasset-0.1.2~ppa/packaging/opendrim-lmp-physicalasset.spec0000644000175000017500000000771311377667226030526 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ %define packageVersion 1 Version: %{version} Release: %{packageVersion}%{?dist} Vendor: OpenDRIM Summary: OpenDRIM PhysicalAsset Provider Name: opendrim-lmp-physicalasset 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 PhysicalAsset %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-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalComponent/0000755000175000017500000000000011377667226025535 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalComponent/OpenDRIM_PhysicalComponent.h0000644000175000017500000003102611377667226033004 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALCOMPONENT_H_ #define OPENDRIM_PHYSICALCOMPONENT_H_ #include const static char* OpenDRIM_PhysicalComponent_classnames[] = {"OpenDRIM_PhysicalComponent"}; static string OpenDRIM_PhysicalComponent_NAMESPACE = _NAMESPACE; class OpenDRIM_PhysicalComponent { public: string Caption; bool Caption_isNULL; string InstallDate; bool InstallDate_isNULL; string Name; bool Name_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; string Tag; bool Tag_isNULL; string Description; bool Description_isNULL; string CreationClassName; bool CreationClassName_isNULL; string ElementName; bool ElementName_isNULL; string Manufacturer; bool Manufacturer_isNULL; string Model; bool Model_isNULL; string SKU; bool SKU_isNULL; string SerialNumber; bool SerialNumber_isNULL; string Version; bool Version_isNULL; string PartNumber; bool PartNumber_isNULL; string OtherIdentifyingInfo; bool OtherIdentifyingInfo_isNULL; bool PoweredOn; bool PoweredOn_isNULL; string ManufactureDate; bool ManufactureDate_isNULL; string VendorEquipmentType; bool VendorEquipmentType_isNULL; string UserTracking; bool UserTracking_isNULL; bool CanBeFRUed; bool CanBeFRUed_isNULL; unsigned short RemovalConditions; bool RemovalConditions_isNULL; bool Removable; bool Removable_isNULL; bool Replaceable; bool Replaceable_isNULL; bool HotSwappable; bool HotSwappable_isNULL; OpenDRIM_PhysicalComponent() { Caption_isNULL = true; InstallDate_isNULL = true; Name_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; Tag_isNULL = true; Description_isNULL = true; CreationClassName_isNULL = true; ElementName_isNULL = true; Manufacturer_isNULL = true; Model_isNULL = true; SKU_isNULL = true; SerialNumber_isNULL = true; Version_isNULL = true; PartNumber_isNULL = true; OtherIdentifyingInfo_isNULL = true; PoweredOn_isNULL = true; ManufactureDate_isNULL = true; VendorEquipmentType_isNULL = true; UserTracking_isNULL = true; CanBeFRUed_isNULL = true; RemovalConditions_isNULL = true; Removable_isNULL = true; Replaceable_isNULL = true; HotSwappable_isNULL = true; } ~OpenDRIM_PhysicalComponent() {} string getKeys() const { return CF_toLowCase(".Tag=\"" + CF_quoteString(Tag) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""); } 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 getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getTag(string& value) const { if (Tag_isNULL==true) return NOT_FOUND; value = Tag; return OK; } int setTag(const string& newValue) { Tag = newValue; Tag_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 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 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 getManufacturer(string& value) const { if (Manufacturer_isNULL==true) return NOT_FOUND; value = Manufacturer; return OK; } int setManufacturer(const string& newValue) { Manufacturer = newValue; Manufacturer_isNULL = false; return OK; } int getModel(string& value) const { if (Model_isNULL==true) return NOT_FOUND; value = Model; return OK; } int setModel(const string& newValue) { Model = newValue; Model_isNULL = false; return OK; } int getSKU(string& value) const { if (SKU_isNULL==true) return NOT_FOUND; value = SKU; return OK; } int setSKU(const string& newValue) { SKU = newValue; SKU_isNULL = false; return OK; } int getSerialNumber(string& value) const { if (SerialNumber_isNULL==true) return NOT_FOUND; value = SerialNumber; return OK; } int setSerialNumber(const string& newValue) { SerialNumber = newValue; SerialNumber_isNULL = false; return OK; } int getVersion(string& value) const { if (Version_isNULL==true) return NOT_FOUND; value = Version; return OK; } int setVersion(const string& newValue) { Version = newValue; Version_isNULL = false; return OK; } int getPartNumber(string& value) const { if (PartNumber_isNULL==true) return NOT_FOUND; value = PartNumber; return OK; } int setPartNumber(const string& newValue) { PartNumber = newValue; PartNumber_isNULL = false; return OK; } int getOtherIdentifyingInfo(string& value) const { if (OtherIdentifyingInfo_isNULL==true) return NOT_FOUND; value = OtherIdentifyingInfo; return OK; } int setOtherIdentifyingInfo(const string& newValue) { OtherIdentifyingInfo = newValue; OtherIdentifyingInfo_isNULL = false; return OK; } int getPoweredOn(bool& value) const { if (PoweredOn_isNULL==true) return NOT_FOUND; value = PoweredOn; return OK; } int setPoweredOn(const bool& newValue) { PoweredOn = newValue; PoweredOn_isNULL = false; return OK; } int getManufactureDate(string& value) const { if (ManufactureDate_isNULL==true) return NOT_FOUND; value = ManufactureDate; return OK; } int setManufactureDate(const string& newValue) { ManufactureDate = newValue; ManufactureDate_isNULL = false; return OK; } int getVendorEquipmentType(string& value) const { if (VendorEquipmentType_isNULL==true) return NOT_FOUND; value = VendorEquipmentType; return OK; } int setVendorEquipmentType(const string& newValue) { VendorEquipmentType = newValue; VendorEquipmentType_isNULL = false; return OK; } int getUserTracking(string& value) const { if (UserTracking_isNULL==true) return NOT_FOUND; value = UserTracking; return OK; } int setUserTracking(const string& newValue) { UserTracking = newValue; UserTracking_isNULL = false; return OK; } int getCanBeFRUed(bool& value) const { if (CanBeFRUed_isNULL==true) return NOT_FOUND; value = CanBeFRUed; return OK; } int setCanBeFRUed(const bool& newValue) { CanBeFRUed = newValue; CanBeFRUed_isNULL = false; return OK; } int getRemovalConditions(unsigned short& value) const { if (RemovalConditions_isNULL==true) return NOT_FOUND; value = RemovalConditions; return OK; } int setRemovalConditions(const unsigned short& newValue) { RemovalConditions = newValue; RemovalConditions_isNULL = false; return OK; } int getRemovable(bool& value) const { if (Removable_isNULL==true) return NOT_FOUND; value = Removable; return OK; } int setRemovable(const bool& newValue) { Removable = newValue; Removable_isNULL = false; return OK; } int getReplaceable(bool& value) const { if (Replaceable_isNULL==true) return NOT_FOUND; value = Replaceable; return OK; } int setReplaceable(const bool& newValue) { Replaceable = newValue; Replaceable_isNULL = false; return OK; } int getHotSwappable(bool& value) const { if (HotSwappable_isNULL==true) return NOT_FOUND; value = HotSwappable; return OK; } int setHotSwappable(const bool& newValue) { HotSwappable = newValue; HotSwappable_isNULL = false; return OK; } }; #endif /*OPENDRIM_PHYSICALCOMPONENT_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalComponent/cmpiOpenDRIM_PhysicalComponent.h0000644000175000017500000000434411377667226033660 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_PHYSICALCOMPONENT_H_ #define CMPIOPENDRIM_PHYSICALCOMPONENT_H_ #include "OpenDRIM_PhysicalComponent.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalComponent_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalComponent& instance); CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalComponent_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalComponent& instance); void PhysicalAsset_OpenDRIM_PhysicalComponent_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalComponent& instance); void PhysicalAsset_OpenDRIM_PhysicalComponent_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalComponent& instance); #endif /*CMPIOPENDRIM_PHYSICALCOMPONENT_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalComponent/Makefile.am0000644000175000017500000000412611377667226027574 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_PhysicalComponentProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalComponentProvider_la_SOURCES = OpenDRIM_PhysicalComponentAccess.cpp OpenDRIM_PhysicalComponentProvider.cpp cmpiOpenDRIM_PhysicalComponent.cpp libcmpiPhysicalAsset_OpenDRIM_PhysicalComponentProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la libcmpiPhysicalAsset_OpenDRIM_PhysicalComponentProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_PhysicalComponent.h OpenDRIM_PhysicalComponent.h OpenDRIM_PhysicalComponentAccess.h ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalComponent/OpenDRIM_PhysicalComponentAccess.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalComponent/OpenDRIM_PhysicalComponentAccess.cpp0000644000175000017500000000617411377667226034467 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_PhysicalComponentAccess.h" int PhysicalAsset_OpenDRIM_PhysicalComponent_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalComponent_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalComponent_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalComponent_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalComponent& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalComponent_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalComponent& newInstance, const OpenDRIM_PhysicalComponent& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalComponent_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalComponent& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalComponent_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalComponent& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalComponent_populate(OpenDRIM_PhysicalComponent& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalComponent/OpenDRIM_PhysicalComponentAccess.h0000644000175000017500000000576511377667226034141 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALCOMPONENTACCESS_H_ #define OPENDRIM_PHYSICALCOMPONENTACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_PhysicalComponent.h" int PhysicalAsset_OpenDRIM_PhysicalComponent_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalComponent_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalComponent_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalComponent_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalComponent& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalComponent_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalComponent& newInstance, const OpenDRIM_PhysicalComponent& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalComponent_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalComponent& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalComponent_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalComponent& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalComponent_populate(OpenDRIM_PhysicalComponent& instance, string& errorMessage); #endif /*OPENDRIM_PHYSICALCOMPONENTACCESS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalComponent/cmpiOpenDRIM_PhysicalComponent.cpp0000644000175000017500000002146411377667226034215 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalComponent.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalComponent_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalComponent& instance) { _E_; Objectpath op(broker, OpenDRIM_PhysicalComponent_classnames[0], OpenDRIM_PhysicalComponent_NAMESPACE); if (!instance.Tag_isNULL) op.addKey("Tag", instance.Tag); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalComponent_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalComponent& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_PhysicalComponent_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.Name_isNULL) ci.setProperty("Name", instance.Name); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.Manufacturer_isNULL) ci.setProperty("Manufacturer", instance.Manufacturer); if (!instance.Model_isNULL) ci.setProperty("Model", instance.Model); if (!instance.SKU_isNULL) ci.setProperty("SKU", instance.SKU); if (!instance.SerialNumber_isNULL) ci.setProperty("SerialNumber", instance.SerialNumber); if (!instance.Version_isNULL) ci.setProperty("Version", instance.Version); if (!instance.PartNumber_isNULL) ci.setProperty("PartNumber", instance.PartNumber); if (!instance.OtherIdentifyingInfo_isNULL) ci.setProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo); if (!instance.PoweredOn_isNULL) ci.setProperty("PoweredOn", instance.PoweredOn); if (!instance.ManufactureDate_isNULL) ci.setPropertyDatetime("ManufactureDate", instance.ManufactureDate); if (!instance.VendorEquipmentType_isNULL) ci.setProperty("VendorEquipmentType", instance.VendorEquipmentType); if (!instance.UserTracking_isNULL) ci.setProperty("UserTracking", instance.UserTracking); if (!instance.CanBeFRUed_isNULL) ci.setProperty("CanBeFRUed", instance.CanBeFRUed); if (!instance.RemovalConditions_isNULL) ci.setProperty("RemovalConditions", instance.RemovalConditions); if (!instance.Removable_isNULL) ci.setProperty("Removable", instance.Removable); if (!instance.Replaceable_isNULL) ci.setProperty("Replaceable", instance.Replaceable); if (!instance.HotSwappable_isNULL) ci.setProperty("HotSwappable", instance.HotSwappable); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_PhysicalComponent_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalComponent& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (op.getKey("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_PhysicalComponent_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalComponent& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("Manufacturer", instance.Manufacturer) == OK) instance.Manufacturer_isNULL = false; if (inst.getProperty("Model", instance.Model) == OK) instance.Model_isNULL = false; if (inst.getProperty("SKU", instance.SKU) == OK) instance.SKU_isNULL = false; if (inst.getProperty("SerialNumber", instance.SerialNumber) == OK) instance.SerialNumber_isNULL = false; if (inst.getProperty("Version", instance.Version) == OK) instance.Version_isNULL = false; if (inst.getProperty("PartNumber", instance.PartNumber) == OK) instance.PartNumber_isNULL = false; if (inst.getProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo) == OK) instance.OtherIdentifyingInfo_isNULL = false; if (inst.getProperty("PoweredOn", instance.PoweredOn) == OK) instance.PoweredOn_isNULL = false; if (inst.getPropertyDatetime("ManufactureDate", instance.ManufactureDate) == OK) instance.ManufactureDate_isNULL = false; if (inst.getProperty("VendorEquipmentType", instance.VendorEquipmentType) == OK) instance.VendorEquipmentType_isNULL = false; if (inst.getProperty("UserTracking", instance.UserTracking) == OK) instance.UserTracking_isNULL = false; if (inst.getProperty("CanBeFRUed", instance.CanBeFRUed) == OK) instance.CanBeFRUed_isNULL = false; if (inst.getProperty("RemovalConditions", instance.RemovalConditions) == OK) instance.RemovalConditions_isNULL = false; if (inst.getProperty("Removable", instance.Removable) == OK) instance.Removable_isNULL = false; if (inst.getProperty("Replaceable", instance.Replaceable) == OK) instance.Replaceable_isNULL = false; if (inst.getProperty("HotSwappable", instance.HotSwappable) == OK) instance.HotSwappable_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalComponent/OpenDRIM_PhysicalComponentProvider.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalComponent/OpenDRIM_PhysicalComponentProvider.c0000644000175000017500000002612211377667226034513 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalComponent.h" #include "OpenDRIM_PhysicalComponentAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_PhysicalComponentProviderSetInstance PhysicalAsset_OpenDRIM_PhysicalComponentProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_PhysicalComponent_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_PhysicalComponent_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_PhysicalComponentProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalComponent_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalComponentProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalComponent_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalComponent_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalComponentProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_PhysicalComponent_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalComponent_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalComponentProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalComponent instance; PhysicalAsset_OpenDRIM_PhysicalComponent_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalComponent_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalComponent_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalComponentProviderSetInstance(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_PhysicalComponent newInstance, oldInstance; PhysicalAsset_OpenDRIM_PhysicalComponent_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_PhysicalComponent_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalComponent_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalComponent_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalComponentProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalComponent instance; PhysicalAsset_OpenDRIM_PhysicalComponent_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_PhysicalComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalComponent_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_PhysicalComponent_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalComponentProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalComponent instance; PhysicalAsset_OpenDRIM_PhysicalComponent_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalComponent_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalComponentProviderExecQuery(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 PhysicalAsset_OpenDRIM_PhysicalComponent_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalComponent_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalComponent_init FAILED: " + (string) OpenDRIM_PhysicalComponent_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalComponent_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalComponent_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalComponent_unload FAILED: " + (string) OpenDRIM_PhysicalComponent_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_PhysicalComponent_INIT if (PhysicalAsset_OpenDRIM_PhysicalComponent_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_PhysicalComponentProvider, PhysicalAsset_OpenDRIM_PhysicalComponentProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalComponent_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConfigurationCapacity/0000755000175000017500000000000011377667226026363 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConfigurationCapacity/OpenDRIM_ConfigurationCapacityAccess.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConfigurationCapacity/OpenDRIM_ConfigurationCapacityAc0000644000175000017500000000627411377667226034505 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_ConfigurationCapacityAccess.h" int PhysicalAsset_OpenDRIM_ConfigurationCapacity_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_ConfigurationCapacity_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_ConfigurationCapacity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_ConfigurationCapacity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ConfigurationCapacity& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_ConfigurationCapacity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ConfigurationCapacity& newInstance, const OpenDRIM_ConfigurationCapacity& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_ConfigurationCapacity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ConfigurationCapacity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_ConfigurationCapacity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ConfigurationCapacity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_ConfigurationCapacity_populate(OpenDRIM_ConfigurationCapacity& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConfigurationCapacity/OpenDRIM_ConfigurationCapacity.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConfigurationCapacity/OpenDRIM_ConfigurationCapacity.h0000644000175000017500000001321411377667226034457 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_CONFIGURATIONCAPACITY_H_ #define OPENDRIM_CONFIGURATIONCAPACITY_H_ #include const static char* OpenDRIM_ConfigurationCapacity_classnames[] = {"OpenDRIM_ConfigurationCapacity"}; static string OpenDRIM_ConfigurationCapacity_NAMESPACE = _NAMESPACE; class OpenDRIM_ConfigurationCapacity { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string Name; bool Name_isNULL; unsigned short ObjectType; bool ObjectType_isNULL; string OtherTypeDescription; bool OtherTypeDescription_isNULL; unsigned long long MinimumCapacity; bool MinimumCapacity_isNULL; unsigned long long MaximumCapacity; bool MaximumCapacity_isNULL; unsigned int Increment; bool Increment_isNULL; vector VendorCompatibilityStrings; bool VendorCompatibilityStrings_isNULL; OpenDRIM_ConfigurationCapacity() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; Name_isNULL = true; ObjectType_isNULL = true; OtherTypeDescription_isNULL = true; MinimumCapacity_isNULL = true; MaximumCapacity_isNULL = true; Increment_isNULL = true; VendorCompatibilityStrings_isNULL = true; } ~OpenDRIM_ConfigurationCapacity() {} string getKeys() const { return CF_toLowCase(".Name=\"" + CF_quoteString(Name) + "\""".ObjectType=\"" + CF_intToStr(ObjectType) + "\""); } 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 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 getObjectType(unsigned short& value) const { if (ObjectType_isNULL==true) return NOT_FOUND; value = ObjectType; return OK; } int setObjectType(const unsigned short& newValue) { ObjectType = newValue; ObjectType_isNULL = false; return OK; } int getOtherTypeDescription(string& value) const { if (OtherTypeDescription_isNULL==true) return NOT_FOUND; value = OtherTypeDescription; return OK; } int setOtherTypeDescription(const string& newValue) { OtherTypeDescription = newValue; OtherTypeDescription_isNULL = false; return OK; } int getMinimumCapacity(unsigned long long& value) const { if (MinimumCapacity_isNULL==true) return NOT_FOUND; value = MinimumCapacity; return OK; } int setMinimumCapacity(const unsigned long long& newValue) { MinimumCapacity = newValue; MinimumCapacity_isNULL = false; return OK; } int getMaximumCapacity(unsigned long long& value) const { if (MaximumCapacity_isNULL==true) return NOT_FOUND; value = MaximumCapacity; return OK; } int setMaximumCapacity(const unsigned long long& newValue) { MaximumCapacity = newValue; MaximumCapacity_isNULL = false; return OK; } int getIncrement(unsigned int& value) const { if (Increment_isNULL==true) return NOT_FOUND; value = Increment; return OK; } int setIncrement(const unsigned int& newValue) { Increment = newValue; Increment_isNULL = false; return OK; } int getVendorCompatibilityStrings(vector& value) const { if (VendorCompatibilityStrings_isNULL==true) return NOT_FOUND; value = VendorCompatibilityStrings; return OK; } int setVendorCompatibilityStrings(const vector& newValue) { VendorCompatibilityStrings = newValue; VendorCompatibilityStrings_isNULL = false; return OK; } }; #endif /*OPENDRIM_CONFIGURATIONCAPACITY_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConfigurationCapacity/Makefile.am0000644000175000017500000000417611377667226030427 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_ConfigurationCapacityProvider.la libcmpiPhysicalAsset_OpenDRIM_ConfigurationCapacityProvider_la_SOURCES = OpenDRIM_ConfigurationCapacityAccess.cpp OpenDRIM_ConfigurationCapacityProvider.cpp cmpiOpenDRIM_ConfigurationCapacity.cpp libcmpiPhysicalAsset_OpenDRIM_ConfigurationCapacityProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la libcmpiPhysicalAsset_OpenDRIM_ConfigurationCapacityProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_ConfigurationCapacity.h OpenDRIM_ConfigurationCapacity.h OpenDRIM_ConfigurationCapacityAccess.h ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConfigurationCapacity/cmpiOpenDRIM_ConfigurationCapacity.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConfigurationCapacity/cmpiOpenDRIM_ConfigurationCapaci0000644000175000017500000000442411377667226034530 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_CONFIGURATIONCAPACITY_H_ #define CMPIOPENDRIM_CONFIGURATIONCAPACITY_H_ #include "OpenDRIM_ConfigurationCapacity.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ConfigurationCapacity& instance); CMPIInstance* PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ConfigurationCapacity& instance); void PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ConfigurationCapacity& instance); void PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ConfigurationCapacity& instance); #endif /*CMPIOPENDRIM_CONFIGURATIONCAPACITY_H_*/ ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConfigurationCapacity/OpenDRIM_ConfigurationCapacityProvider.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConfigurationCapacity/OpenDRIM_ConfigurationCapacityPr0000644000175000017500000002651611377667226034544 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_ConfigurationCapacity.h" #include "OpenDRIM_ConfigurationCapacityAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_ConfigurationCapacityProviderSetInstance PhysicalAsset_OpenDRIM_ConfigurationCapacityProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_ConfigurationCapacity_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_ConfigurationCapacity_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_ConfigurationCapacityProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_ConfigurationCapacity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConfigurationCapacityProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConfigurationCapacity_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConfigurationCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConfigurationCapacityProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_ConfigurationCapacity_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConfigurationCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConfigurationCapacityProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ConfigurationCapacity instance; PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConfigurationCapacity_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConfigurationCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConfigurationCapacityProviderSetInstance(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_ConfigurationCapacity newInstance, oldInstance; PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConfigurationCapacity_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConfigurationCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_ConfigurationCapacity_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConfigurationCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConfigurationCapacityProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ConfigurationCapacity instance; PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConfigurationCapacity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_ConfigurationCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_ConfigurationCapacity_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConfigurationCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_ConfigurationCapacity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConfigurationCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConfigurationCapacityProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ConfigurationCapacity instance; PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConfigurationCapacity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConfigurationCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_ConfigurationCapacity_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConfigurationCapacity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConfigurationCapacityProviderExecQuery(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 PhysicalAsset_OpenDRIM_ConfigurationCapacity_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConfigurationCapacity_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_ConfigurationCapacity_init FAILED: " + (string) OpenDRIM_ConfigurationCapacity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_ConfigurationCapacity_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConfigurationCapacity_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_ConfigurationCapacity_unload FAILED: " + (string) OpenDRIM_ConfigurationCapacity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_ConfigurationCapacity_INIT if (PhysicalAsset_OpenDRIM_ConfigurationCapacity_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_ConfigurationCapacityProvider, PhysicalAsset_OpenDRIM_ConfigurationCapacityProvider, _broker, PhysicalAsset_OpenDRIM_ConfigurationCapacity_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConfigurationCapacity/OpenDRIM_ConfigurationCapacityAccess.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConfigurationCapacity/OpenDRIM_ConfigurationCapacityAc0000644000175000017500000000610111377667226034472 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_CONFIGURATIONCAPACITYACCESS_H_ #define OPENDRIM_CONFIGURATIONCAPACITYACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_ConfigurationCapacity.h" int PhysicalAsset_OpenDRIM_ConfigurationCapacity_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_ConfigurationCapacity_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_ConfigurationCapacity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_ConfigurationCapacity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ConfigurationCapacity& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_ConfigurationCapacity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ConfigurationCapacity& newInstance, const OpenDRIM_ConfigurationCapacity& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_ConfigurationCapacity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ConfigurationCapacity& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_ConfigurationCapacity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ConfigurationCapacity& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_ConfigurationCapacity_populate(OpenDRIM_ConfigurationCapacity& instance, string& errorMessage); #endif /*OPENDRIM_CONFIGURATIONCAPACITYACCESS_H_*/ ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConfigurationCapacity/cmpiOpenDRIM_ConfigurationCapacity.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConfigurationCapacity/cmpiOpenDRIM_ConfigurationCapaci0000644000175000017500000001140311377667226034523 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_ConfigurationCapacity.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ConfigurationCapacity& instance) { _E_; Objectpath op(broker, OpenDRIM_ConfigurationCapacity_classnames[0], OpenDRIM_ConfigurationCapacity_NAMESPACE); if (!instance.Name_isNULL) op.addKey("Name", instance.Name); if (!instance.ObjectType_isNULL) op.addKey("ObjectType", instance.ObjectType); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ConfigurationCapacity& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_ConfigurationCapacity_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.OtherTypeDescription_isNULL) ci.setProperty("OtherTypeDescription", instance.OtherTypeDescription); if (!instance.MinimumCapacity_isNULL) ci.setProperty("MinimumCapacity", instance.MinimumCapacity); if (!instance.MaximumCapacity_isNULL) ci.setProperty("MaximumCapacity", instance.MaximumCapacity); if (!instance.Increment_isNULL) ci.setProperty("Increment", instance.Increment); if (!instance.VendorCompatibilityStrings_isNULL) ci.setProperty("VendorCompatibilityStrings", instance.VendorCompatibilityStrings); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ConfigurationCapacity& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Name", instance.Name) == OK) instance.Name_isNULL = false; if (op.getKey("ObjectType", instance.ObjectType) == OK) instance.ObjectType_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_ConfigurationCapacity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ConfigurationCapacity& 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("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("ObjectType", instance.ObjectType) == OK) instance.ObjectType_isNULL = false; if (inst.getProperty("OtherTypeDescription", instance.OtherTypeDescription) == OK) instance.OtherTypeDescription_isNULL = false; if (inst.getProperty("MinimumCapacity", instance.MinimumCapacity) == OK) instance.MinimumCapacity_isNULL = false; if (inst.getProperty("MaximumCapacity", instance.MaximumCapacity) == OK) instance.MaximumCapacity_isNULL = false; if (inst.getProperty("Increment", instance.Increment) == OK) instance.Increment_isNULL = false; if (inst.getProperty("VendorCompatibilityStrings", instance.VendorCompatibilityStrings) == OK) instance.VendorCompatibilityStrings_isNULL = false; _L_; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Slot/0000755000175000017500000000000011377667226023017 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Slot/cmpiOpenDRIM_Slot.cpp0000644000175000017500000003202311377667226026752 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Slot.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_Slot_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Slot& instance) { _E_; Objectpath op(broker, OpenDRIM_Slot_classnames[0], OpenDRIM_Slot_NAMESPACE); if (!instance.Tag_isNULL) op.addKey("Tag", instance.Tag); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_Slot_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Slot& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_Slot_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.Name_isNULL) ci.setProperty("Name", instance.Name); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.Manufacturer_isNULL) ci.setProperty("Manufacturer", instance.Manufacturer); if (!instance.Model_isNULL) ci.setProperty("Model", instance.Model); if (!instance.SKU_isNULL) ci.setProperty("SKU", instance.SKU); if (!instance.SerialNumber_isNULL) ci.setProperty("SerialNumber", instance.SerialNumber); if (!instance.Version_isNULL) ci.setProperty("Version", instance.Version); if (!instance.PartNumber_isNULL) ci.setProperty("PartNumber", instance.PartNumber); if (!instance.OtherIdentifyingInfo_isNULL) ci.setProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo); if (!instance.ManufactureDate_isNULL) ci.setPropertyDatetime("ManufactureDate", instance.ManufactureDate); if (!instance.VendorEquipmentType_isNULL) ci.setProperty("VendorEquipmentType", instance.VendorEquipmentType); if (!instance.UserTracking_isNULL) ci.setProperty("UserTracking", instance.UserTracking); if (!instance.CanBeFRUed_isNULL) ci.setProperty("CanBeFRUed", instance.CanBeFRUed); if (!instance.ConnectorPinout_isNULL) ci.setProperty("ConnectorPinout", instance.ConnectorPinout); if (!instance.OtherTypeDescription_isNULL) ci.setProperty("OtherTypeDescription", instance.OtherTypeDescription); if (!instance.ConnectorGender_isNULL) ci.setProperty("ConnectorGender", instance.ConnectorGender); if (!instance.ConnectorElectricalCharacteristics_isNULL) ci.setProperty("ConnectorElectricalCharacteristics", instance.ConnectorElectricalCharacteristics); if (!instance.OtherElectricalCharacteristics_isNULL) ci.setProperty("OtherElectricalCharacteristics", instance.OtherElectricalCharacteristics); if (!instance.NumPhysicalPins_isNULL) ci.setProperty("NumPhysicalPins", instance.NumPhysicalPins); if (!instance.ConnectorLayout_isNULL) ci.setProperty("ConnectorLayout", instance.ConnectorLayout); if (!instance.ConnectorDescription_isNULL) ci.setProperty("ConnectorDescription", instance.ConnectorDescription); if (!instance.ConnectorType_isNULL) ci.setProperty("ConnectorType", instance.ConnectorType); if (!instance.PoweredOn_isNULL) ci.setProperty("PoweredOn", instance.PoweredOn); if (!instance.SupportsHotPlug_isNULL) ci.setProperty("SupportsHotPlug", instance.SupportsHotPlug); if (!instance.HeightAllowed_isNULL) ci.setProperty("HeightAllowed", instance.HeightAllowed); if (!instance.LengthAllowed_isNULL) ci.setProperty("LengthAllowed", instance.LengthAllowed); if (!instance.MaxDataWidth_isNULL) ci.setProperty("MaxDataWidth", instance.MaxDataWidth); if (!instance.VccMixedVoltageSupport_isNULL) ci.setProperty("VccMixedVoltageSupport", instance.VccMixedVoltageSupport); if (!instance.VppMixedVoltageSupport_isNULL) ci.setProperty("VppMixedVoltageSupport", instance.VppMixedVoltageSupport); if (!instance.ThermalRating_isNULL) ci.setProperty("ThermalRating", instance.ThermalRating); if (!instance.SpecialPurpose_isNULL) ci.setProperty("SpecialPurpose", instance.SpecialPurpose); if (!instance.PurposeDescription_isNULL) ci.setProperty("PurposeDescription", instance.PurposeDescription); if (!instance.Number_isNULL) ci.setProperty("Number", instance.Number); if (!instance.Powered_isNULL) ci.setProperty("Powered", instance.Powered); if (!instance.OpenSwitch_isNULL) ci.setProperty("OpenSwitch", instance.OpenSwitch); if (!instance.MaxLinkWidth_isNULL) ci.setProperty("MaxLinkWidth", instance.MaxLinkWidth); if (!instance.VendorCompatibilityStrings_isNULL) ci.setProperty("VendorCompatibilityStrings", instance.VendorCompatibilityStrings); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_Slot_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Slot& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (op.getKey("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_Slot_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Slot& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("Manufacturer", instance.Manufacturer) == OK) instance.Manufacturer_isNULL = false; if (inst.getProperty("Model", instance.Model) == OK) instance.Model_isNULL = false; if (inst.getProperty("SKU", instance.SKU) == OK) instance.SKU_isNULL = false; if (inst.getProperty("SerialNumber", instance.SerialNumber) == OK) instance.SerialNumber_isNULL = false; if (inst.getProperty("Version", instance.Version) == OK) instance.Version_isNULL = false; if (inst.getProperty("PartNumber", instance.PartNumber) == OK) instance.PartNumber_isNULL = false; if (inst.getProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo) == OK) instance.OtherIdentifyingInfo_isNULL = false; if (inst.getPropertyDatetime("ManufactureDate", instance.ManufactureDate) == OK) instance.ManufactureDate_isNULL = false; if (inst.getProperty("VendorEquipmentType", instance.VendorEquipmentType) == OK) instance.VendorEquipmentType_isNULL = false; if (inst.getProperty("UserTracking", instance.UserTracking) == OK) instance.UserTracking_isNULL = false; if (inst.getProperty("CanBeFRUed", instance.CanBeFRUed) == OK) instance.CanBeFRUed_isNULL = false; if (inst.getProperty("ConnectorPinout", instance.ConnectorPinout) == OK) instance.ConnectorPinout_isNULL = false; if (inst.getProperty("OtherTypeDescription", instance.OtherTypeDescription) == OK) instance.OtherTypeDescription_isNULL = false; if (inst.getProperty("ConnectorGender", instance.ConnectorGender) == OK) instance.ConnectorGender_isNULL = false; if (inst.getProperty("ConnectorElectricalCharacteristics", instance.ConnectorElectricalCharacteristics) == OK) instance.ConnectorElectricalCharacteristics_isNULL = false; if (inst.getProperty("OtherElectricalCharacteristics", instance.OtherElectricalCharacteristics) == OK) instance.OtherElectricalCharacteristics_isNULL = false; if (inst.getProperty("NumPhysicalPins", instance.NumPhysicalPins) == OK) instance.NumPhysicalPins_isNULL = false; if (inst.getProperty("ConnectorLayout", instance.ConnectorLayout) == OK) instance.ConnectorLayout_isNULL = false; if (inst.getProperty("ConnectorDescription", instance.ConnectorDescription) == OK) instance.ConnectorDescription_isNULL = false; if (inst.getProperty("ConnectorType", instance.ConnectorType) == OK) instance.ConnectorType_isNULL = false; if (inst.getProperty("PoweredOn", instance.PoweredOn) == OK) instance.PoweredOn_isNULL = false; if (inst.getProperty("SupportsHotPlug", instance.SupportsHotPlug) == OK) instance.SupportsHotPlug_isNULL = false; if (inst.getProperty("HeightAllowed", instance.HeightAllowed) == OK) instance.HeightAllowed_isNULL = false; if (inst.getProperty("LengthAllowed", instance.LengthAllowed) == OK) instance.LengthAllowed_isNULL = false; if (inst.getProperty("MaxDataWidth", instance.MaxDataWidth) == OK) instance.MaxDataWidth_isNULL = false; if (inst.getProperty("VccMixedVoltageSupport", instance.VccMixedVoltageSupport) == OK) instance.VccMixedVoltageSupport_isNULL = false; if (inst.getProperty("VppMixedVoltageSupport", instance.VppMixedVoltageSupport) == OK) instance.VppMixedVoltageSupport_isNULL = false; if (inst.getProperty("ThermalRating", instance.ThermalRating) == OK) instance.ThermalRating_isNULL = false; if (inst.getProperty("SpecialPurpose", instance.SpecialPurpose) == OK) instance.SpecialPurpose_isNULL = false; if (inst.getProperty("PurposeDescription", instance.PurposeDescription) == OK) instance.PurposeDescription_isNULL = false; if (inst.getProperty("Number", instance.Number) == OK) instance.Number_isNULL = false; if (inst.getProperty("Powered", instance.Powered) == OK) instance.Powered_isNULL = false; if (inst.getProperty("OpenSwitch", instance.OpenSwitch) == OK) instance.OpenSwitch_isNULL = false; if (inst.getProperty("MaxLinkWidth", instance.MaxLinkWidth) == OK) instance.MaxLinkWidth_isNULL = false; if (inst.getProperty("VendorCompatibilityStrings", instance.VendorCompatibilityStrings) == OK) instance.VendorCompatibilityStrings_isNULL = false; _L_; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Slot/Makefile.am0000644000175000017500000000372411377667226025061 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_SlotProvider.la libcmpiPhysicalAsset_OpenDRIM_SlotProvider_la_SOURCES = OpenDRIM_SlotAccess.cpp OpenDRIM_SlotProvider.cpp cmpiOpenDRIM_Slot.cpp libcmpiPhysicalAsset_OpenDRIM_SlotProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la libcmpiPhysicalAsset_OpenDRIM_SlotProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_Slot.h OpenDRIM_Slot.h OpenDRIM_SlotAccess.h opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Slot/OpenDRIM_Slot.h0000644000175000017500000005003511377667226025551 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_SLOT_H_ #define OPENDRIM_SLOT_H_ #include const static char* OpenDRIM_Slot_classnames[] = {"OpenDRIM_Slot"}; static string OpenDRIM_Slot_NAMESPACE = _NAMESPACE; class OpenDRIM_Slot { public: string Caption; bool Caption_isNULL; string InstallDate; bool InstallDate_isNULL; string Name; bool Name_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; string Tag; bool Tag_isNULL; string Description; bool Description_isNULL; string CreationClassName; bool CreationClassName_isNULL; string ElementName; bool ElementName_isNULL; string Manufacturer; bool Manufacturer_isNULL; string Model; bool Model_isNULL; string SKU; bool SKU_isNULL; string SerialNumber; bool SerialNumber_isNULL; string Version; bool Version_isNULL; string PartNumber; bool PartNumber_isNULL; string OtherIdentifyingInfo; bool OtherIdentifyingInfo_isNULL; string ManufactureDate; bool ManufactureDate_isNULL; string VendorEquipmentType; bool VendorEquipmentType_isNULL; string UserTracking; bool UserTracking_isNULL; bool CanBeFRUed; bool CanBeFRUed_isNULL; string ConnectorPinout; bool ConnectorPinout_isNULL; string OtherTypeDescription; bool OtherTypeDescription_isNULL; unsigned short ConnectorGender; bool ConnectorGender_isNULL; vector ConnectorElectricalCharacteristics; bool ConnectorElectricalCharacteristics_isNULL; vector OtherElectricalCharacteristics; bool OtherElectricalCharacteristics_isNULL; unsigned int NumPhysicalPins; bool NumPhysicalPins_isNULL; unsigned short ConnectorLayout; bool ConnectorLayout_isNULL; string ConnectorDescription; bool ConnectorDescription_isNULL; vector ConnectorType; bool ConnectorType_isNULL; bool PoweredOn; bool PoweredOn_isNULL; bool SupportsHotPlug; bool SupportsHotPlug_isNULL; float HeightAllowed; bool HeightAllowed_isNULL; float LengthAllowed; bool LengthAllowed_isNULL; unsigned short MaxDataWidth; bool MaxDataWidth_isNULL; vector VccMixedVoltageSupport; bool VccMixedVoltageSupport_isNULL; vector VppMixedVoltageSupport; bool VppMixedVoltageSupport_isNULL; unsigned int ThermalRating; bool ThermalRating_isNULL; bool SpecialPurpose; bool SpecialPurpose_isNULL; string PurposeDescription; bool PurposeDescription_isNULL; unsigned short Number; bool Number_isNULL; bool Powered; bool Powered_isNULL; bool OpenSwitch; bool OpenSwitch_isNULL; unsigned short MaxLinkWidth; bool MaxLinkWidth_isNULL; vector VendorCompatibilityStrings; bool VendorCompatibilityStrings_isNULL; OpenDRIM_Slot() { Caption_isNULL = true; InstallDate_isNULL = true; Name_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; Tag_isNULL = true; Description_isNULL = true; CreationClassName_isNULL = true; ElementName_isNULL = true; Manufacturer_isNULL = true; Model_isNULL = true; SKU_isNULL = true; SerialNumber_isNULL = true; Version_isNULL = true; PartNumber_isNULL = true; OtherIdentifyingInfo_isNULL = true; ManufactureDate_isNULL = true; VendorEquipmentType_isNULL = true; UserTracking_isNULL = true; CanBeFRUed_isNULL = true; ConnectorPinout_isNULL = true; OtherTypeDescription_isNULL = true; ConnectorGender_isNULL = true; ConnectorElectricalCharacteristics_isNULL = true; OtherElectricalCharacteristics_isNULL = true; NumPhysicalPins_isNULL = true; ConnectorLayout_isNULL = true; ConnectorDescription_isNULL = true; ConnectorType_isNULL = true; PoweredOn_isNULL = true; SupportsHotPlug_isNULL = true; HeightAllowed_isNULL = true; LengthAllowed_isNULL = true; MaxDataWidth_isNULL = true; VccMixedVoltageSupport_isNULL = true; VppMixedVoltageSupport_isNULL = true; ThermalRating_isNULL = true; SpecialPurpose_isNULL = true; PurposeDescription_isNULL = true; Number_isNULL = true; Powered_isNULL = true; OpenSwitch_isNULL = true; MaxLinkWidth_isNULL = true; VendorCompatibilityStrings_isNULL = true; } ~OpenDRIM_Slot() {} string getKeys() const { return CF_toLowCase(".Tag=\"" + CF_quoteString(Tag) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""); } 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 getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getTag(string& value) const { if (Tag_isNULL==true) return NOT_FOUND; value = Tag; return OK; } int setTag(const string& newValue) { Tag = newValue; Tag_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 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 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 getManufacturer(string& value) const { if (Manufacturer_isNULL==true) return NOT_FOUND; value = Manufacturer; return OK; } int setManufacturer(const string& newValue) { Manufacturer = newValue; Manufacturer_isNULL = false; return OK; } int getModel(string& value) const { if (Model_isNULL==true) return NOT_FOUND; value = Model; return OK; } int setModel(const string& newValue) { Model = newValue; Model_isNULL = false; return OK; } int getSKU(string& value) const { if (SKU_isNULL==true) return NOT_FOUND; value = SKU; return OK; } int setSKU(const string& newValue) { SKU = newValue; SKU_isNULL = false; return OK; } int getSerialNumber(string& value) const { if (SerialNumber_isNULL==true) return NOT_FOUND; value = SerialNumber; return OK; } int setSerialNumber(const string& newValue) { SerialNumber = newValue; SerialNumber_isNULL = false; return OK; } int getVersion(string& value) const { if (Version_isNULL==true) return NOT_FOUND; value = Version; return OK; } int setVersion(const string& newValue) { Version = newValue; Version_isNULL = false; return OK; } int getPartNumber(string& value) const { if (PartNumber_isNULL==true) return NOT_FOUND; value = PartNumber; return OK; } int setPartNumber(const string& newValue) { PartNumber = newValue; PartNumber_isNULL = false; return OK; } int getOtherIdentifyingInfo(string& value) const { if (OtherIdentifyingInfo_isNULL==true) return NOT_FOUND; value = OtherIdentifyingInfo; return OK; } int setOtherIdentifyingInfo(const string& newValue) { OtherIdentifyingInfo = newValue; OtherIdentifyingInfo_isNULL = false; return OK; } int getManufactureDate(string& value) const { if (ManufactureDate_isNULL==true) return NOT_FOUND; value = ManufactureDate; return OK; } int setManufactureDate(const string& newValue) { ManufactureDate = newValue; ManufactureDate_isNULL = false; return OK; } int getVendorEquipmentType(string& value) const { if (VendorEquipmentType_isNULL==true) return NOT_FOUND; value = VendorEquipmentType; return OK; } int setVendorEquipmentType(const string& newValue) { VendorEquipmentType = newValue; VendorEquipmentType_isNULL = false; return OK; } int getUserTracking(string& value) const { if (UserTracking_isNULL==true) return NOT_FOUND; value = UserTracking; return OK; } int setUserTracking(const string& newValue) { UserTracking = newValue; UserTracking_isNULL = false; return OK; } int getCanBeFRUed(bool& value) const { if (CanBeFRUed_isNULL==true) return NOT_FOUND; value = CanBeFRUed; return OK; } int setCanBeFRUed(const bool& newValue) { CanBeFRUed = newValue; CanBeFRUed_isNULL = false; return OK; } int getConnectorPinout(string& value) const { if (ConnectorPinout_isNULL==true) return NOT_FOUND; value = ConnectorPinout; return OK; } int setConnectorPinout(const string& newValue) { ConnectorPinout = newValue; ConnectorPinout_isNULL = false; return OK; } int getOtherTypeDescription(string& value) const { if (OtherTypeDescription_isNULL==true) return NOT_FOUND; value = OtherTypeDescription; return OK; } int setOtherTypeDescription(const string& newValue) { OtherTypeDescription = newValue; OtherTypeDescription_isNULL = false; return OK; } int getConnectorGender(unsigned short& value) const { if (ConnectorGender_isNULL==true) return NOT_FOUND; value = ConnectorGender; return OK; } int setConnectorGender(const unsigned short& newValue) { ConnectorGender = newValue; ConnectorGender_isNULL = false; return OK; } int getConnectorElectricalCharacteristics(vector& value) const { if (ConnectorElectricalCharacteristics_isNULL==true) return NOT_FOUND; value = ConnectorElectricalCharacteristics; return OK; } int setConnectorElectricalCharacteristics(const vector& newValue) { ConnectorElectricalCharacteristics = newValue; ConnectorElectricalCharacteristics_isNULL = false; return OK; } int getOtherElectricalCharacteristics(vector& value) const { if (OtherElectricalCharacteristics_isNULL==true) return NOT_FOUND; value = OtherElectricalCharacteristics; return OK; } int setOtherElectricalCharacteristics(const vector& newValue) { OtherElectricalCharacteristics = newValue; OtherElectricalCharacteristics_isNULL = false; return OK; } int getNumPhysicalPins(unsigned int& value) const { if (NumPhysicalPins_isNULL==true) return NOT_FOUND; value = NumPhysicalPins; return OK; } int setNumPhysicalPins(const unsigned int& newValue) { NumPhysicalPins = newValue; NumPhysicalPins_isNULL = false; return OK; } int getConnectorLayout(unsigned short& value) const { if (ConnectorLayout_isNULL==true) return NOT_FOUND; value = ConnectorLayout; return OK; } int setConnectorLayout(const unsigned short& newValue) { ConnectorLayout = newValue; ConnectorLayout_isNULL = false; return OK; } int getConnectorDescription(string& value) const { if (ConnectorDescription_isNULL==true) return NOT_FOUND; value = ConnectorDescription; return OK; } int setConnectorDescription(const string& newValue) { ConnectorDescription = newValue; ConnectorDescription_isNULL = false; return OK; } int getConnectorType(vector& value) const { if (ConnectorType_isNULL==true) return NOT_FOUND; value = ConnectorType; return OK; } int setConnectorType(const vector& newValue) { ConnectorType = newValue; ConnectorType_isNULL = false; return OK; } int getPoweredOn(bool& value) const { if (PoweredOn_isNULL==true) return NOT_FOUND; value = PoweredOn; return OK; } int setPoweredOn(const bool& newValue) { PoweredOn = newValue; PoweredOn_isNULL = false; return OK; } int getSupportsHotPlug(bool& value) const { if (SupportsHotPlug_isNULL==true) return NOT_FOUND; value = SupportsHotPlug; return OK; } int setSupportsHotPlug(const bool& newValue) { SupportsHotPlug = newValue; SupportsHotPlug_isNULL = false; return OK; } int getHeightAllowed(float& value) const { if (HeightAllowed_isNULL==true) return NOT_FOUND; value = HeightAllowed; return OK; } int setHeightAllowed(const float& newValue) { HeightAllowed = newValue; HeightAllowed_isNULL = false; return OK; } int getLengthAllowed(float& value) const { if (LengthAllowed_isNULL==true) return NOT_FOUND; value = LengthAllowed; return OK; } int setLengthAllowed(const float& newValue) { LengthAllowed = newValue; LengthAllowed_isNULL = false; return OK; } int getMaxDataWidth(unsigned short& value) const { if (MaxDataWidth_isNULL==true) return NOT_FOUND; value = MaxDataWidth; return OK; } int setMaxDataWidth(const unsigned short& newValue) { MaxDataWidth = newValue; MaxDataWidth_isNULL = false; return OK; } int getVccMixedVoltageSupport(vector& value) const { if (VccMixedVoltageSupport_isNULL==true) return NOT_FOUND; value = VccMixedVoltageSupport; return OK; } int setVccMixedVoltageSupport(const vector& newValue) { VccMixedVoltageSupport = newValue; VccMixedVoltageSupport_isNULL = false; return OK; } int getVppMixedVoltageSupport(vector& value) const { if (VppMixedVoltageSupport_isNULL==true) return NOT_FOUND; value = VppMixedVoltageSupport; return OK; } int setVppMixedVoltageSupport(const vector& newValue) { VppMixedVoltageSupport = newValue; VppMixedVoltageSupport_isNULL = false; return OK; } int getThermalRating(unsigned int& value) const { if (ThermalRating_isNULL==true) return NOT_FOUND; value = ThermalRating; return OK; } int setThermalRating(const unsigned int& newValue) { ThermalRating = newValue; ThermalRating_isNULL = false; return OK; } int getSpecialPurpose(bool& value) const { if (SpecialPurpose_isNULL==true) return NOT_FOUND; value = SpecialPurpose; return OK; } int setSpecialPurpose(const bool& newValue) { SpecialPurpose = newValue; SpecialPurpose_isNULL = false; return OK; } int getPurposeDescription(string& value) const { if (PurposeDescription_isNULL==true) return NOT_FOUND; value = PurposeDescription; return OK; } int setPurposeDescription(const string& newValue) { PurposeDescription = newValue; PurposeDescription_isNULL = false; return OK; } int getNumber(unsigned short& value) const { if (Number_isNULL==true) return NOT_FOUND; value = Number; return OK; } int setNumber(const unsigned short& newValue) { Number = newValue; Number_isNULL = false; return OK; } int getPowered(bool& value) const { if (Powered_isNULL==true) return NOT_FOUND; value = Powered; return OK; } int setPowered(const bool& newValue) { Powered = newValue; Powered_isNULL = false; return OK; } int getOpenSwitch(bool& value) const { if (OpenSwitch_isNULL==true) return NOT_FOUND; value = OpenSwitch; return OK; } int setOpenSwitch(const bool& newValue) { OpenSwitch = newValue; OpenSwitch_isNULL = false; return OK; } int getMaxLinkWidth(unsigned short& value) const { if (MaxLinkWidth_isNULL==true) return NOT_FOUND; value = MaxLinkWidth; return OK; } int setMaxLinkWidth(const unsigned short& newValue) { MaxLinkWidth = newValue; MaxLinkWidth_isNULL = false; return OK; } int getVendorCompatibilityStrings(vector& value) const { if (VendorCompatibilityStrings_isNULL==true) return NOT_FOUND; value = VendorCompatibilityStrings; return OK; } int setVendorCompatibilityStrings(const vector& newValue) { VendorCompatibilityStrings = newValue; VendorCompatibilityStrings_isNULL = false; return OK; } }; #endif /*OPENDRIM_SLOT_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Slot/OpenDRIM_SlotAccess.cpp0000644000175000017500000000565411377667226027235 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_SlotAccess.h" int PhysicalAsset_OpenDRIM_Slot_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Slot_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Slot_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_Slot_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Slot& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_Slot_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Slot& newInstance, const OpenDRIM_Slot& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Slot_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Slot& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Slot_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Slot& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Slot_populate(OpenDRIM_Slot& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Slot/cmpiOpenDRIM_Slot.h0000644000175000017500000000411011377667226026413 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_SLOT_H_ #define CMPIOPENDRIM_SLOT_H_ #include "OpenDRIM_Slot.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_Slot_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Slot& instance); CMPIInstance* PhysicalAsset_OpenDRIM_Slot_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Slot& instance); void PhysicalAsset_OpenDRIM_Slot_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Slot& instance); void PhysicalAsset_OpenDRIM_Slot_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Slot& instance); #endif /*CMPIOPENDRIM_SLOT_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Slot/OpenDRIM_SlotProvider.cpp0000644000175000017500000002443711377667226027626 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Slot.h" #include "OpenDRIM_SlotAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_SlotProviderSetInstance PhysicalAsset_OpenDRIM_SlotProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_Slot_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_Slot_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_SlotProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_Slot_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SlotProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Slot_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Slot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_Slot_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SlotProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_Slot_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Slot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_Slot_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SlotProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Slot instance; PhysicalAsset_OpenDRIM_Slot_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Slot_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Slot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_Slot_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SlotProviderSetInstance(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_Slot newInstance, oldInstance; PhysicalAsset_OpenDRIM_Slot_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_Slot_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Slot_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Slot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Slot_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Slot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SlotProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Slot instance; PhysicalAsset_OpenDRIM_Slot_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Slot_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_Slot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Slot_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Slot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Slot_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Slot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_Slot_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SlotProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Slot instance; PhysicalAsset_OpenDRIM_Slot_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Slot_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Slot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Slot_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Slot_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_SlotProviderExecQuery(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 PhysicalAsset_OpenDRIM_Slot_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Slot_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_Slot_init FAILED: " + (string) OpenDRIM_Slot_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_Slot_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Slot_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_Slot_unload FAILED: " + (string) OpenDRIM_Slot_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_Slot_INIT if (PhysicalAsset_OpenDRIM_Slot_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_SlotProvider, PhysicalAsset_OpenDRIM_SlotProvider, _broker, PhysicalAsset_OpenDRIM_Slot_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Slot/OpenDRIM_SlotAccess.h0000644000175000017500000000537611377667226026703 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_SLOTACCESS_H_ #define OPENDRIM_SLOTACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_Slot.h" int PhysicalAsset_OpenDRIM_Slot_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_Slot_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_Slot_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_Slot_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Slot& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_Slot_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Slot& newInstance, const OpenDRIM_Slot& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_Slot_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Slot& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_Slot_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Slot& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_Slot_populate(OpenDRIM_Slot& instance, string& errorMessage); #endif /*OPENDRIM_SLOTACCESS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackage/0000755000175000017500000000000011377667226025126 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackage/Makefile.am0000644000175000017500000000410211377667226027157 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_PhysicalPackageProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalPackageProvider_la_SOURCES = OpenDRIM_PhysicalPackageAccess.cpp OpenDRIM_PhysicalPackageProvider.cpp cmpiOpenDRIM_PhysicalPackage.cpp libcmpiPhysicalAsset_OpenDRIM_PhysicalPackageProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la libcmpiPhysicalAsset_OpenDRIM_PhysicalPackageProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_PhysicalPackage.h OpenDRIM_PhysicalPackage.h OpenDRIM_PhysicalPackageAccess.h opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackage/OpenDRIM_PhysicalPackageAccess.cpp0000644000175000017500000001226011377667226033442 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_PhysicalPackageAccess.h" const string creationClassName = "OpenDRIM_PhysicalPackage"; int PhysicalAsset_OpenDRIM_PhysicalPackage_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackage_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackage_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; OpenDRIM_PhysicalPackage instance; string computerSystemTag; CF_assert(CF_getComputerSystemPhysicalPackageTag(computerSystemTag,errorMessage)); instance.setCreationClassName(creationClassName); instance.setTag(computerSystemTag); if(discriminant=="ei") CF_assert(PhysicalAsset_OpenDRIM_PhysicalPackage_populate(instance,errorMessage)); result.push_back(instance); _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackage_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalPackage& instance, const char** properties, string& errorMessage) { _E_; string tag; CF_assert(CF_getComputerSystemPhysicalPackageTag(tag,errorMessage)); if( instance.CreationClassName==creationClassName && instance.Tag==tag) { CF_assert(PhysicalAsset_OpenDRIM_PhysicalPackage_populate(instance,errorMessage)); } else { errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackage_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalPackage& newInstance, const OpenDRIM_PhysicalPackage& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalPackage_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalPackage& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalPackage_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalPackage& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalPackage_IsCompatible(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalPackage& instance, unsigned int& returnValue, const OpenDRIM_PhysicalPackage_IsCompatible_In& in, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackage_populate(OpenDRIM_PhysicalPackage& instance, string& errorMessage) { _E_; /* * Properties to fill from profile * + Mandatory: * [X] Tag [KEY] * [X] CreationClassName [KEY] * [X] PackageType * [X] ElementName * + Conditional: * [X] Manufacturer * [-] Model * [X] SerialNumber * [-] PartNumber * [X] SKU * + Optional: * [-] VendorCompatibilityStrings * [-] CanBeFRUed * [-] Version * [-] Name * + Others: * [-] OtherPackageType */ system_information system_info; vector dmi_strings; string computerSystemTag; CF_assert(CF_getComputerSystemPhysicalPackageTag(computerSystemTag,errorMessage)); if(instance.Tag==computerSystemTag) { instance.setPackageType(PT_CONTAINER_FRAME_SLOT); instance.setElementName("Computer System Physical Package"); } if(SMBIOS_getSystemInformation(system_info,dmi_strings,errorMessage)!=OK) return FAILED; if(system_info.length>=0x08) { instance.setManufacturer(dmi_strings[system_info.manufacturer]); instance.setSerialNumber(dmi_strings[system_info.serial_number]); if(system_info.length>=0x1B) { instance.setSKU(dmi_strings[system_info.sku_number]); } } _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackage/cmpiOpenDRIM_PhysicalPackage.cpp0000644000175000017500000002476211377667226033203 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalPackage.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalPackage_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalPackage& instance) { _E_; Objectpath op(broker, OpenDRIM_PhysicalPackage_classnames[0], OpenDRIM_PhysicalPackage_NAMESPACE); if (!instance.Tag_isNULL) op.addKey("Tag", instance.Tag); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalPackage_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalPackage& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_PhysicalPackage_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.Name_isNULL) ci.setProperty("Name", instance.Name); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.Manufacturer_isNULL) ci.setProperty("Manufacturer", instance.Manufacturer); if (!instance.Model_isNULL) ci.setProperty("Model", instance.Model); if (!instance.SKU_isNULL) ci.setProperty("SKU", instance.SKU); if (!instance.SerialNumber_isNULL) ci.setProperty("SerialNumber", instance.SerialNumber); if (!instance.Version_isNULL) ci.setProperty("Version", instance.Version); if (!instance.PartNumber_isNULL) ci.setProperty("PartNumber", instance.PartNumber); if (!instance.OtherIdentifyingInfo_isNULL) ci.setProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo); if (!instance.PoweredOn_isNULL) ci.setProperty("PoweredOn", instance.PoweredOn); if (!instance.ManufactureDate_isNULL) ci.setPropertyDatetime("ManufactureDate", instance.ManufactureDate); if (!instance.VendorEquipmentType_isNULL) ci.setProperty("VendorEquipmentType", instance.VendorEquipmentType); if (!instance.UserTracking_isNULL) ci.setProperty("UserTracking", instance.UserTracking); if (!instance.CanBeFRUed_isNULL) ci.setProperty("CanBeFRUed", instance.CanBeFRUed); if (!instance.RemovalConditions_isNULL) ci.setProperty("RemovalConditions", instance.RemovalConditions); if (!instance.Removable_isNULL) ci.setProperty("Removable", instance.Removable); if (!instance.Replaceable_isNULL) ci.setProperty("Replaceable", instance.Replaceable); if (!instance.HotSwappable_isNULL) ci.setProperty("HotSwappable", instance.HotSwappable); if (!instance.Height_isNULL) ci.setProperty("Height", instance.Height); if (!instance.Depth_isNULL) ci.setProperty("Depth", instance.Depth); if (!instance.Width_isNULL) ci.setProperty("Width", instance.Width); if (!instance.Weight_isNULL) ci.setProperty("Weight", instance.Weight); if (!instance.PackageType_isNULL) ci.setProperty("PackageType", instance.PackageType); if (!instance.OtherPackageType_isNULL) ci.setProperty("OtherPackageType", instance.OtherPackageType); if (!instance.VendorCompatibilityStrings_isNULL) ci.setProperty("VendorCompatibilityStrings", instance.VendorCompatibilityStrings); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_PhysicalPackage_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalPackage& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (op.getKey("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_PhysicalPackage_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalPackage& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("Manufacturer", instance.Manufacturer) == OK) instance.Manufacturer_isNULL = false; if (inst.getProperty("Model", instance.Model) == OK) instance.Model_isNULL = false; if (inst.getProperty("SKU", instance.SKU) == OK) instance.SKU_isNULL = false; if (inst.getProperty("SerialNumber", instance.SerialNumber) == OK) instance.SerialNumber_isNULL = false; if (inst.getProperty("Version", instance.Version) == OK) instance.Version_isNULL = false; if (inst.getProperty("PartNumber", instance.PartNumber) == OK) instance.PartNumber_isNULL = false; if (inst.getProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo) == OK) instance.OtherIdentifyingInfo_isNULL = false; if (inst.getProperty("PoweredOn", instance.PoweredOn) == OK) instance.PoweredOn_isNULL = false; if (inst.getPropertyDatetime("ManufactureDate", instance.ManufactureDate) == OK) instance.ManufactureDate_isNULL = false; if (inst.getProperty("VendorEquipmentType", instance.VendorEquipmentType) == OK) instance.VendorEquipmentType_isNULL = false; if (inst.getProperty("UserTracking", instance.UserTracking) == OK) instance.UserTracking_isNULL = false; if (inst.getProperty("CanBeFRUed", instance.CanBeFRUed) == OK) instance.CanBeFRUed_isNULL = false; if (inst.getProperty("RemovalConditions", instance.RemovalConditions) == OK) instance.RemovalConditions_isNULL = false; if (inst.getProperty("Removable", instance.Removable) == OK) instance.Removable_isNULL = false; if (inst.getProperty("Replaceable", instance.Replaceable) == OK) instance.Replaceable_isNULL = false; if (inst.getProperty("HotSwappable", instance.HotSwappable) == OK) instance.HotSwappable_isNULL = false; if (inst.getProperty("Height", instance.Height) == OK) instance.Height_isNULL = false; if (inst.getProperty("Depth", instance.Depth) == OK) instance.Depth_isNULL = false; if (inst.getProperty("Width", instance.Width) == OK) instance.Width_isNULL = false; if (inst.getProperty("Weight", instance.Weight) == OK) instance.Weight_isNULL = false; if (inst.getProperty("PackageType", instance.PackageType) == OK) instance.PackageType_isNULL = false; if (inst.getProperty("OtherPackageType", instance.OtherPackageType) == OK) instance.OtherPackageType_isNULL = false; if (inst.getProperty("VendorCompatibilityStrings", instance.VendorCompatibilityStrings) == OK) instance.VendorCompatibilityStrings_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_PhysicalPackage_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_PhysicalPackage_IsCompatible_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath ElementToCheck; data = in->ft->getArg(in, "ElementToCheck", &rc); if (rc.rc == OK) { CT_ToC(broker, data, ElementToCheck); args.setElementToCheck(ElementToCheck); } _L_; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackage/OpenDRIM_PhysicalPackageAccess.h0000644000175000017500000000631211377667226033110 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALPACKAGEACCESS_H_ #define OPENDRIM_PHYSICALPACKAGEACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_PhysicalPackage.h" int PhysicalAsset_OpenDRIM_PhysicalPackage_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackage_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackage_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalPackage_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalPackage& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackage_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalPackage& newInstance, const OpenDRIM_PhysicalPackage& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackage_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalPackage& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackage_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalPackage& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackage_IsCompatible(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalPackage& instance, unsigned int& returnValue, const OpenDRIM_PhysicalPackage_IsCompatible_In& in, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalPackage_populate(OpenDRIM_PhysicalPackage& instance, string& errorMessage); #endif /*OPENDRIM_PHYSICALPACKAGEACCESS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackage/cmpiOpenDRIM_PhysicalPackage.h0000644000175000017500000000453611377667226032645 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_PHYSICALPACKAGE_H_ #define CMPIOPENDRIM_PHYSICALPACKAGE_H_ #include "OpenDRIM_PhysicalPackage.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalPackage_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalPackage& instance); CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalPackage_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalPackage& instance); void PhysicalAsset_OpenDRIM_PhysicalPackage_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalPackage& instance); void PhysicalAsset_OpenDRIM_PhysicalPackage_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalPackage& instance); void PhysicalAsset_OpenDRIM_PhysicalPackage_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_PhysicalPackage_IsCompatible_In& args); #endif /*CMPIOPENDRIM_PHYSICALPACKAGE_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackage/OpenDRIM_PhysicalPackageProvider.cpp0000644000175000017500000003307511377667226034042 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalPackage.h" #include "OpenDRIM_PhysicalPackageAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_PhysicalPackageProviderSetInstance PhysicalAsset_OpenDRIM_PhysicalPackageProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_PhysicalPackage_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_PhysicalPackage_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalPackage_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_PhysicalPackage_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalPackage_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalPackage instance; PhysicalAsset_OpenDRIM_PhysicalPackage_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalPackage_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageProviderSetInstance(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_PhysicalPackage newInstance, oldInstance; PhysicalAsset_OpenDRIM_PhysicalPackage_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_PhysicalPackage_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalPackage instance; PhysicalAsset_OpenDRIM_PhysicalPackage_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_PhysicalPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_PhysicalPackage_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalPackage instance; PhysicalAsset_OpenDRIM_PhysicalPackage_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageProviderExecQuery(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 PhysicalAsset_OpenDRIM_PhysicalPackageProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalPackageProviderInvokeMethod(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_PhysicalPackage instance; PhysicalAsset_OpenDRIM_PhysicalPackage_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"CreationClassName", "Tag"}; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="IsCompatible") { unsigned int returnValue; OpenDRIM_PhysicalPackage_IsCompatible_In inArgs; PhysicalAsset_OpenDRIM_PhysicalPackage_toCPP(_broker, in, inArgs); errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_IsCompatible(_broker, ctx, instance, returnValue, inArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalPackage_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_PhysicalPackage_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 PhysicalAsset_OpenDRIM_PhysicalPackage_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalPackage_init FAILED: " + (string) OpenDRIM_PhysicalPackage_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalPackage_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalPackage_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalPackage_unload FAILED: " + (string) OpenDRIM_PhysicalPackage_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_PhysicalPackage_INIT if (PhysicalAsset_OpenDRIM_PhysicalPackage_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_PhysicalPackageProvider, PhysicalAsset_OpenDRIM_PhysicalPackageProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalPackage_INIT); CMMethodMIStub(PhysicalAsset_OpenDRIM_PhysicalPackageProvider, PhysicalAsset_OpenDRIM_PhysicalPackageProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalPackage_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalPackage/OpenDRIM_PhysicalPackage.h0000644000175000017500000003651711377667226032000 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALPACKAGE_H_ #define OPENDRIM_PHYSICALPACKAGE_H_ #include const static char* OpenDRIM_PhysicalPackage_classnames[] = {"OpenDRIM_PhysicalPackage"}; static string OpenDRIM_PhysicalPackage_NAMESPACE = _NAMESPACE; class OpenDRIM_PhysicalPackage { public: string Caption; bool Caption_isNULL; string InstallDate; bool InstallDate_isNULL; string Name; bool Name_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; string Tag; bool Tag_isNULL; string Description; bool Description_isNULL; string CreationClassName; bool CreationClassName_isNULL; string ElementName; bool ElementName_isNULL; string Manufacturer; bool Manufacturer_isNULL; string Model; bool Model_isNULL; string SKU; bool SKU_isNULL; string SerialNumber; bool SerialNumber_isNULL; string Version; bool Version_isNULL; string PartNumber; bool PartNumber_isNULL; string OtherIdentifyingInfo; bool OtherIdentifyingInfo_isNULL; bool PoweredOn; bool PoweredOn_isNULL; string ManufactureDate; bool ManufactureDate_isNULL; string VendorEquipmentType; bool VendorEquipmentType_isNULL; string UserTracking; bool UserTracking_isNULL; bool CanBeFRUed; bool CanBeFRUed_isNULL; unsigned short RemovalConditions; bool RemovalConditions_isNULL; bool Removable; bool Removable_isNULL; bool Replaceable; bool Replaceable_isNULL; bool HotSwappable; bool HotSwappable_isNULL; float Height; bool Height_isNULL; float Depth; bool Depth_isNULL; float Width; bool Width_isNULL; float Weight; bool Weight_isNULL; unsigned short PackageType; bool PackageType_isNULL; string OtherPackageType; bool OtherPackageType_isNULL; vector VendorCompatibilityStrings; bool VendorCompatibilityStrings_isNULL; OpenDRIM_PhysicalPackage() { Caption_isNULL = true; InstallDate_isNULL = true; Name_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; Tag_isNULL = true; Description_isNULL = true; CreationClassName_isNULL = true; ElementName_isNULL = true; Manufacturer_isNULL = true; Model_isNULL = true; SKU_isNULL = true; SerialNumber_isNULL = true; Version_isNULL = true; PartNumber_isNULL = true; OtherIdentifyingInfo_isNULL = true; PoweredOn_isNULL = true; ManufactureDate_isNULL = true; VendorEquipmentType_isNULL = true; UserTracking_isNULL = true; CanBeFRUed_isNULL = true; RemovalConditions_isNULL = true; Removable_isNULL = true; Replaceable_isNULL = true; HotSwappable_isNULL = true; Height_isNULL = true; Depth_isNULL = true; Width_isNULL = true; Weight_isNULL = true; PackageType_isNULL = true; OtherPackageType_isNULL = true; VendorCompatibilityStrings_isNULL = true; } ~OpenDRIM_PhysicalPackage() {} string getKeys() const { return CF_toLowCase(".Tag=\"" + CF_quoteString(Tag) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""); } 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 getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getTag(string& value) const { if (Tag_isNULL==true) return NOT_FOUND; value = Tag; return OK; } int setTag(const string& newValue) { Tag = newValue; Tag_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 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 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 getManufacturer(string& value) const { if (Manufacturer_isNULL==true) return NOT_FOUND; value = Manufacturer; return OK; } int setManufacturer(const string& newValue) { Manufacturer = newValue; Manufacturer_isNULL = false; return OK; } int getModel(string& value) const { if (Model_isNULL==true) return NOT_FOUND; value = Model; return OK; } int setModel(const string& newValue) { Model = newValue; Model_isNULL = false; return OK; } int getSKU(string& value) const { if (SKU_isNULL==true) return NOT_FOUND; value = SKU; return OK; } int setSKU(const string& newValue) { SKU = newValue; SKU_isNULL = false; return OK; } int getSerialNumber(string& value) const { if (SerialNumber_isNULL==true) return NOT_FOUND; value = SerialNumber; return OK; } int setSerialNumber(const string& newValue) { SerialNumber = newValue; SerialNumber_isNULL = false; return OK; } int getVersion(string& value) const { if (Version_isNULL==true) return NOT_FOUND; value = Version; return OK; } int setVersion(const string& newValue) { Version = newValue; Version_isNULL = false; return OK; } int getPartNumber(string& value) const { if (PartNumber_isNULL==true) return NOT_FOUND; value = PartNumber; return OK; } int setPartNumber(const string& newValue) { PartNumber = newValue; PartNumber_isNULL = false; return OK; } int getOtherIdentifyingInfo(string& value) const { if (OtherIdentifyingInfo_isNULL==true) return NOT_FOUND; value = OtherIdentifyingInfo; return OK; } int setOtherIdentifyingInfo(const string& newValue) { OtherIdentifyingInfo = newValue; OtherIdentifyingInfo_isNULL = false; return OK; } int getPoweredOn(bool& value) const { if (PoweredOn_isNULL==true) return NOT_FOUND; value = PoweredOn; return OK; } int setPoweredOn(const bool& newValue) { PoweredOn = newValue; PoweredOn_isNULL = false; return OK; } int getManufactureDate(string& value) const { if (ManufactureDate_isNULL==true) return NOT_FOUND; value = ManufactureDate; return OK; } int setManufactureDate(const string& newValue) { ManufactureDate = newValue; ManufactureDate_isNULL = false; return OK; } int getVendorEquipmentType(string& value) const { if (VendorEquipmentType_isNULL==true) return NOT_FOUND; value = VendorEquipmentType; return OK; } int setVendorEquipmentType(const string& newValue) { VendorEquipmentType = newValue; VendorEquipmentType_isNULL = false; return OK; } int getUserTracking(string& value) const { if (UserTracking_isNULL==true) return NOT_FOUND; value = UserTracking; return OK; } int setUserTracking(const string& newValue) { UserTracking = newValue; UserTracking_isNULL = false; return OK; } int getCanBeFRUed(bool& value) const { if (CanBeFRUed_isNULL==true) return NOT_FOUND; value = CanBeFRUed; return OK; } int setCanBeFRUed(const bool& newValue) { CanBeFRUed = newValue; CanBeFRUed_isNULL = false; return OK; } int getRemovalConditions(unsigned short& value) const { if (RemovalConditions_isNULL==true) return NOT_FOUND; value = RemovalConditions; return OK; } int setRemovalConditions(const unsigned short& newValue) { RemovalConditions = newValue; RemovalConditions_isNULL = false; return OK; } int getRemovable(bool& value) const { if (Removable_isNULL==true) return NOT_FOUND; value = Removable; return OK; } int setRemovable(const bool& newValue) { Removable = newValue; Removable_isNULL = false; return OK; } int getReplaceable(bool& value) const { if (Replaceable_isNULL==true) return NOT_FOUND; value = Replaceable; return OK; } int setReplaceable(const bool& newValue) { Replaceable = newValue; Replaceable_isNULL = false; return OK; } int getHotSwappable(bool& value) const { if (HotSwappable_isNULL==true) return NOT_FOUND; value = HotSwappable; return OK; } int setHotSwappable(const bool& newValue) { HotSwappable = newValue; HotSwappable_isNULL = false; return OK; } int getHeight(float& value) const { if (Height_isNULL==true) return NOT_FOUND; value = Height; return OK; } int setHeight(const float& newValue) { Height = newValue; Height_isNULL = false; return OK; } int getDepth(float& value) const { if (Depth_isNULL==true) return NOT_FOUND; value = Depth; return OK; } int setDepth(const float& newValue) { Depth = newValue; Depth_isNULL = false; return OK; } int getWidth(float& value) const { if (Width_isNULL==true) return NOT_FOUND; value = Width; return OK; } int setWidth(const float& newValue) { Width = newValue; Width_isNULL = false; return OK; } int getWeight(float& value) const { if (Weight_isNULL==true) return NOT_FOUND; value = Weight; return OK; } int setWeight(const float& newValue) { Weight = newValue; Weight_isNULL = false; return OK; } int getPackageType(unsigned short& value) const { if (PackageType_isNULL==true) return NOT_FOUND; value = PackageType; return OK; } int setPackageType(const unsigned short& newValue) { PackageType = newValue; PackageType_isNULL = false; return OK; } int getOtherPackageType(string& value) const { if (OtherPackageType_isNULL==true) return NOT_FOUND; value = OtherPackageType; return OK; } int setOtherPackageType(const string& newValue) { OtherPackageType = newValue; OtherPackageType_isNULL = false; return OK; } int getVendorCompatibilityStrings(vector& value) const { if (VendorCompatibilityStrings_isNULL==true) return NOT_FOUND; value = VendorCompatibilityStrings; return OK; } int setVendorCompatibilityStrings(const vector& newValue) { VendorCompatibilityStrings = newValue; VendorCompatibilityStrings_isNULL = false; return OK; } }; class OpenDRIM_PhysicalPackage_IsCompatible_In { public: Objectpath ElementToCheck; bool ElementToCheck_isNULL; OpenDRIM_PhysicalPackage_IsCompatible_In() { ElementToCheck_isNULL = true; } ~OpenDRIM_PhysicalPackage_IsCompatible_In() {} int getElementToCheck(Objectpath& value) const { if (ElementToCheck_isNULL == true) return NOT_FOUND; value = ElementToCheck; return OK; } int setElementToCheck(const Objectpath& newValue) { ElementToCheck = newValue; ElementToCheck_isNULL = false; return OK; } }; #endif /*OPENDRIM_PHYSICALPACKAGE_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/0000755000175000017500000000000011377667226026355 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/OpenDRIM_ComputerSystemPackage.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/OpenDRIM_ComputerSystemPackage.h0000644000175000017500000000740611377667226034451 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_COMPUTERSYSTEMPACKAGE_H_ #define OPENDRIM_COMPUTERSYSTEMPACKAGE_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_PhysicalPackage.h" #include "CIM_PhysicalPackageAccess.h" #include "cmpiCIM_ComputerSystem.h" #include "CIM_ComputerSystemAccess.h" */ const static char* OpenDRIM_ComputerSystemPackage_classnames[] = {"OpenDRIM_ComputerSystemPackage"}; static string OpenDRIM_ComputerSystemPackage_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"OpenDRIM_PhysicalPackage"}; const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"OpenDRIM_ComputerSystem"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_ComputerSystemPackage { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; string PlatformGUID; bool PlatformGUID_isNULL; OpenDRIM_ComputerSystemPackage() { Antecedent_isNULL = true; Dependent_isNULL = true; PlatformGUID_isNULL = true; } ~OpenDRIM_ComputerSystemPackage() {} 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; } int getPlatformGUID(string& value) const { if (PlatformGUID_isNULL==true) return NOT_FOUND; value = PlatformGUID; return OK; } int setPlatformGUID(const string& newValue) { PlatformGUID = newValue; PlatformGUID_isNULL = false; return OK; } }; #endif /*OPENDRIM_COMPUTERSYSTEMPACKAGE_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/Makefile.am0000644000175000017500000000505211377667226030413 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_ComputerSystemPackageProvider.la libcmpiPhysicalAsset_OpenDRIM_ComputerSystemPackageProvider_la_SOURCES = OpenDRIM_ComputerSystemPackageAccess.cpp OpenDRIM_ComputerSystemPackageProvider.cpp cmpiOpenDRIM_ComputerSystemPackage.cpp assocOpenDRIM_ComputerSystemPackage.cpp # May have to be adjusted for direct invocation libcmpiPhysicalAsset_OpenDRIM_ComputerSystemPackageProvider_la_CPPFLAGS = -I../CIM_PhysicalPackage -I../CIM_ComputerSystem # Uncomment the end for direct invocation, may have to be adjusted libcmpiPhysicalAsset_OpenDRIM_ComputerSystemPackageProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la #../CIM_PhysicalPackage/libcmpiPhysicalAsset_CIM_PhysicalPackageProvider.la ../CIM_ComputerSystem/libcmpiPhysicalAsset_CIM_ComputerSystemProvider.la libcmpiPhysicalAsset_OpenDRIM_ComputerSystemPackageProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_ComputerSystemPackage.h OpenDRIM_ComputerSystemPackage.h OpenDRIM_ComputerSystemPackageAccess.h ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/OpenDRIM_ComputerSystemPackageProvider.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/OpenDRIM_ComputerSystemPackagePr0000644000175000017500000004305511377667226034525 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_ComputerSystemPackage.h" #include "OpenDRIM_ComputerSystemPackageAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderSetInstance PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_ComputerSystemPackage_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_ComputerSystemPackage_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ComputerSystemPackage instance; PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderSetInstance(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_ComputerSystemPackage newInstance, oldInstance; PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ComputerSystemPackage instance; PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ComputerSystemPackage instance; PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderExecQuery(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 PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderAssociatorNames(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 = PhysicalAsset_OpenDRIM_ComputerSystemPackage_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_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 PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderAssociators(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 = PhysicalAsset_OpenDRIM_ComputerSystemPackage_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_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 PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderReferenceNames(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 = PhysicalAsset_OpenDRIM_ComputerSystemPackage_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ComputerSystemPackageProviderReferences(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 = PhysicalAsset_OpenDRIM_ComputerSystemPackage_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int PhysicalAsset_OpenDRIM_ComputerSystemPackage_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_ComputerSystemPackage_init FAILED: " + (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ComputerSystemPackage_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_ComputerSystemPackage_unload FAILED: " + (string) OpenDRIM_ComputerSystemPackage_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_ComputerSystemPackage_INIT if (PhysicalAsset_OpenDRIM_ComputerSystemPackage_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_ComputerSystemPackageProvider, PhysicalAsset_OpenDRIM_ComputerSystemPackageProvider, _broker, PhysicalAsset_OpenDRIM_ComputerSystemPackage_INIT); CMAssociationMIStub(PhysicalAsset_OpenDRIM_ComputerSystemPackageProvider, PhysicalAsset_OpenDRIM_ComputerSystemPackageProvider, _broker, PhysicalAsset_OpenDRIM_ComputerSystemPackage_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/cmpiOpenDRIM_ComputerSystemPackage.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/cmpiOpenDRIM_ComputerSystemPacka0000644000175000017500000000442411377667226034555 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_COMPUTERSYSTEMPACKAGE_H_ #define CMPIOPENDRIM_COMPUTERSYSTEMPACKAGE_H_ #include "OpenDRIM_ComputerSystemPackage.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ComputerSystemPackage& instance); CMPIInstance* PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ComputerSystemPackage& instance); void PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ComputerSystemPackage& instance); void PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ComputerSystemPackage& instance); #endif /*CMPIOPENDRIM_COMPUTERSYSTEMPACKAGE_H_*/ ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/OpenDRIM_ComputerSystemPackageAccess.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/OpenDRIM_ComputerSystemPackageAc0000644000175000017500000002634711377667226034474 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_ComputerSystemPackageAccess.h" int PhysicalAsset_OpenDRIM_ComputerSystemPackage_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_PhysicalPackage_load(broker, errorMessage)); CF_assert(PhysicalAsset_CIM_ComputerSystem_load(broker, errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_PhysicalPackage_unload(errorMessage)); CF_assert(PhysicalAsset_CIM_ComputerSystem_unload(errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_isAssociated(const Instance& Antecedent, const Instance& Dependent, bool& isAssociated, string& errorMessage) { _E_; // Determine if the association can be established or not string physicalPackage_tag; CF_assert(Antecedent.getProperty("Tag", physicalPackage_tag)); vector computerSystem_otherIdentifyingInfo; CF_assert(Dependent.getProperty("OtherIdentifyingInfo", computerSystem_otherIdentifyingInfo)); if(computerSystem_otherIdentifyingInfo[0]==physicalPackage_tag) isAssociated=true; else isAssociated=false; _L_; return OK; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_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(PhysicalAsset_OpenDRIM_ComputerSystemPackage_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(PhysicalAsset_OpenDRIM_ComputerSystemPackage_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; PhysicalAsset_OpenDRIM_ComputerSystemPackage_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(PhysicalAsset_OpenDRIM_ComputerSystemPackage_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ComputerSystemPackage& 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(PhysicalAsset_OpenDRIM_ComputerSystemPackage_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(PhysicalAsset_OpenDRIM_ComputerSystemPackage_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(PhysicalAsset_OpenDRIM_ComputerSystemPackage_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(PhysicalAsset_OpenDRIM_ComputerSystemPackage_populate(instance, errorMessage)); _L_; return OK; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ComputerSystemPackage& newInstance, const OpenDRIM_ComputerSystemPackage& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ComputerSystemPackage& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ComputerSystemPackage& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_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(PhysicalAsset_OpenDRIM_ComputerSystemPackage_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names // CF_assert(PhysicalAsset_OpenDRIM_ComputerSystemPackage_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(PhysicalAsset_OpenDRIM_ComputerSystemPackage_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(PhysicalAsset_OpenDRIM_ComputerSystemPackage_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names // CF_assert(PhysicalAsset_OpenDRIM_ComputerSystemPackage_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(PhysicalAsset_OpenDRIM_ComputerSystemPackage_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_ComputerSystemPackage_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_ComputerSystemPackage instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(PhysicalAsset_OpenDRIM_ComputerSystemPackage_populate(instance, errorMessage)); } OpenDRIM_ComputerSystemPackage_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_ComputerSystemPackage_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_ComputerSystemPackage instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); if (discriminant == "r") { CF_assert(PhysicalAsset_OpenDRIM_ComputerSystemPackage_populate(instance, errorMessage)); } OpenDRIM_ComputerSystemPackage_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_populate(OpenDRIM_ComputerSystemPackage& instance, string& errorMessage) { _E_; string uuid; CF_assert(CF_getSystemUUID(uuid,errorMessage)); if(uuid.empty()) instance.setPlatformGUID("0"); else instance.setPlatformGUID(uuid); _L_; return OK; } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/assocOpenDRIM_ComputerSystemPackage.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/assocOpenDRIM_ComputerSystemPack0000644000175000017500000000630011377667226034567 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_COMPUTERSYSTEMPACKAGE_H_ #define ASSOCOPENDRIM_COMPUTERSYSTEMPACKAGE_H_ #include "OpenDRIM_ComputerSystemPackageAccess.h" int PhysicalAsset_OpenDRIM_ComputerSystemPackage_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 PhysicalAsset_OpenDRIM_ComputerSystemPackage_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 PhysicalAsset_OpenDRIM_ComputerSystemPackage_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_COMPUTERSYSTEMPACKAGE_H_*/ ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/cmpiOpenDRIM_ComputerSystemPackage.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/cmpiOpenDRIM_ComputerSystemPacka0000644000175000017500000000646711377667226034566 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_ComputerSystemPackage.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ComputerSystemPackage& instance) { _E_; Objectpath op(broker, OpenDRIM_ComputerSystemPackage_classnames[0], OpenDRIM_ComputerSystemPackage_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ComputerSystemPackage& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.PlatformGUID_isNULL) ci.setProperty("PlatformGUID", instance.PlatformGUID); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ComputerSystemPackage& 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 PhysicalAsset_OpenDRIM_ComputerSystemPackage_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ComputerSystemPackage& 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; if (inst.getProperty("PlatformGUID", instance.PlatformGUID) == OK) instance.PlatformGUID_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/OpenDRIM_ComputerSystemPackageAccess.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/OpenDRIM_ComputerSystemPackageAc0000644000175000017500000001064411377667226034465 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_COMPUTERSYSTEMPACKAGEACCESS_H_ #define OPENDRIM_COMPUTERSYSTEMPACKAGEACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_ComputerSystemPackage.h" #include "assocOpenDRIM_ComputerSystemPackage.h" int PhysicalAsset_OpenDRIM_ComputerSystemPackage_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ComputerSystemPackage& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ComputerSystemPackage& newInstance, const OpenDRIM_ComputerSystemPackage& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ComputerSystemPackage& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ComputerSystemPackage& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_ComputerSystemPackage_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_ComputerSystemPackage_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_ComputerSystemPackage_populate(OpenDRIM_ComputerSystemPackage& instance, string& errorMessage); #endif /*OPENDRIM_COMPUTERSYSTEMPACKAGEACCESS_H_*/ ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/assocOpenDRIM_ComputerSystemPackage.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ComputerSystemPackage/assocOpenDRIM_ComputerSystemPack0000644000175000017500000002126211377667226034573 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "assocOpenDRIM_ComputerSystemPackage.h" int PhysicalAsset_OpenDRIM_ComputerSystemPackage_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 = PhysicalAsset_OpenDRIM_ComputerSystemPackage_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(PhysicalAsset_OpenDRIM_ComputerSystemPackage_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(PhysicalAsset_OpenDRIM_ComputerSystemPackage_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_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(PhysicalAsset_CIM_PhysicalPackage_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_PhysicalPackage_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_PhysicalPackage_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_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_PhysicalPackage _instance; PhysicalAsset_CIM_PhysicalPackage_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_PhysicalPackage_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_PhysicalPackage_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_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(PhysicalAsset_CIM_ComputerSystem_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_ComputerSystem_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_ComputerSystem_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_ComputerSystemPackage_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_ComputerSystem _instance; PhysicalAsset_CIM_ComputerSystem_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_ComputerSystem_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_ComputerSystem_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/mof/0000755000175000017500000000000011377667226021222 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_Slot.mof0000644000175000017500000000316711377667226024312 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_SlotProvider")] class OpenDRIM_Slot:CIM_Slot { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_PhysicalComponent.mof0000644000175000017500000000323611377667226027025 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_PhysicalComponentProvider")] class OpenDRIM_PhysicalComponent:CIM_PhysicalComponent { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_PhysicalFrame.mof0000644000175000017500000000322211377667226026110 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_PhysicalFrameProvider")] class OpenDRIM_PhysicalFrame:CIM_PhysicalFrame { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_ConfigurationCapacity.mof0000644000175000017500000000325211377667226027651 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_ConfigurationCapacityProvider")] class OpenDRIM_ConfigurationCapacity:CIM_ConfigurationCapacity { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_PhysicalConnector.mof0000644000175000017500000000323611377667226027015 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_PhysicalConnectorProvider")] class OpenDRIM_PhysicalConnector:CIM_PhysicalConnector { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_ConnectedTo.mof0000644000175000017500000000323211377667226025567 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Association, Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_ConnectedToProvider")] class OpenDRIM_ConnectedTo:CIM_ConnectedTo { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_PhysicalPackage.mof0000644000175000017500000000323011377667226026410 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_PhysicalPackageProvider")] class OpenDRIM_PhysicalPackage:CIM_PhysicalPackage { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_Rack.mof0000644000175000017500000000316711377667226024251 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_RackProvider")] class OpenDRIM_Rack:CIM_Rack { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_PhysicalAssetRegisteredProfile.mof0000644000175000017500000000327011377667226031477 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_PhysicalAssetRegisteredProfileProvider")] class OpenDRIM_PhysicalAssetRegisteredProfile:CIM_RegisteredProfile { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_PhysicalElementPackage.mof0000644000175000017500000000325611377667226027732 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Association, Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_PhysicalElementPackageProvider")] class OpenDRIM_PhysicalElementPackage:CIM_Container { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_PhysicalElementInConnector.mof0000644000175000017500000000327711377667226030623 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Association, Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_PhysicalElementInConnectorProvider")] class OpenDRIM_PhysicalElementInConnector:CIM_ElementInConnector { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_PhysicalPackageCapacity.mof0000644000175000017500000000326611377667226030077 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Association, Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_PhysicalPackageCapacityProvider")] class OpenDRIM_PhysicalPackageCapacity:CIM_ElementCapacity { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.mof0000644000175000017500000000334011377667226033762 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Association, Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElementProvider")] class OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement:CIM_ElementCapabilities { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_SystemPackaging.mof0000644000175000017500000000324611377667226026460 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Association, Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_SystemPackagingProvider")] class OpenDRIM_SystemPackaging:CIM_SystemPackaging { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_Chip.mof0000644000175000017500000000316711377667226024254 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_ChipProvider")] class OpenDRIM_Chip:CIM_Chip { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_Realizes.mof0000644000175000017500000000322111377667226025136 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Association, Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_RealizesProvider")] class OpenDRIM_Realizes:CIM_Realizes { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_PhysicalMemory.mof0000644000175000017500000000322511377667226026331 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_PhysicalMemoryProvider")] class OpenDRIM_PhysicalMemory:CIM_PhysicalMemory { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_PhysicalAssetCapabilities.mof0000644000175000017500000000326611377667226030457 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProvider")] class OpenDRIM_PhysicalAssetCapabilities:CIM_PhysicalAssetCapabilities { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_ComputerSystemPackage.mof0000644000175000017500000000327011377667226027643 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Association, Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_ComputerSystemPackageProvider")] class OpenDRIM_ComputerSystemPackage:CIM_ComputerSystemPackage { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_Card.mof0000644000175000017500000000316711377667226024242 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_CardProvider")] class OpenDRIM_Card:CIM_Card { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_PhysicalAssetConformsToProfile.mof0000644000175000017500000000331511377667226031473 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Association, Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_PhysicalAssetConformsToProfileProvider")] class OpenDRIM_PhysicalAssetConformsToProfile:CIM_ElementConformsToProfile { }; opendrim-lmp-physicalasset-0.1.2~ppa/mof/OpenDRIM_Chassis.mof0000644000175000017500000000320011377667226024752 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Physical Asset provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by , , //################################################################################ [Provider("cmpi:cmpiPhysicalAsset_OpenDRIM_ChassisProvider")] class OpenDRIM_Chassis:CIM_Chassis { }; opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConnectedTo/0000755000175000017500000000000011377667226024303 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConnectedTo/OpenDRIM_ConnectedToAccess.cpp0000644000175000017500000002377311377667226032007 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_ConnectedToAccess.h" int PhysicalAsset_OpenDRIM_ConnectedTo_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_PhysicalConnector_load(broker, errorMessage)); CF_assert(PhysicalAsset_CIM_PhysicalConnector_load(broker, errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_ConnectedTo_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_PhysicalConnector_unload(errorMessage)); CF_assert(PhysicalAsset_CIM_PhysicalConnector_unload(errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_ConnectedTo_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 PhysicalAsset_OpenDRIM_ConnectedTo_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(PhysicalAsset_OpenDRIM_ConnectedTo_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(PhysicalAsset_OpenDRIM_ConnectedTo_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; PhysicalAsset_OpenDRIM_ConnectedTo_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(PhysicalAsset_OpenDRIM_ConnectedTo_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_ConnectedTo_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ConnectedTo& 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(PhysicalAsset_OpenDRIM_ConnectedTo_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(PhysicalAsset_OpenDRIM_ConnectedTo_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(PhysicalAsset_OpenDRIM_ConnectedTo_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int PhysicalAsset_OpenDRIM_ConnectedTo_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ConnectedTo& newInstance, const OpenDRIM_ConnectedTo& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_ConnectedTo_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ConnectedTo& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_ConnectedTo_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ConnectedTo& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_ConnectedTo_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(PhysicalAsset_OpenDRIM_ConnectedTo_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_ConnectedTo_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(PhysicalAsset_OpenDRIM_ConnectedTo_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(PhysicalAsset_OpenDRIM_ConnectedTo_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_ConnectedTo_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(PhysicalAsset_OpenDRIM_ConnectedTo_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_ConnectedTo_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_ConnectedTo instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); OpenDRIM_ConnectedTo_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_ConnectedTo_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_ConnectedTo_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_ConnectedTo instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); OpenDRIM_ConnectedTo_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_ConnectedTo_populate(OpenDRIM_ConnectedTo& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConnectedTo/Makefile.am0000644000175000017500000000470111377667226026341 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_ConnectedToProvider.la libcmpiPhysicalAsset_OpenDRIM_ConnectedToProvider_la_SOURCES = OpenDRIM_ConnectedToAccess.cpp OpenDRIM_ConnectedToProvider.cpp cmpiOpenDRIM_ConnectedTo.cpp assocOpenDRIM_ConnectedTo.cpp # May have to be adjusted for direct invocation libcmpiPhysicalAsset_OpenDRIM_ConnectedToProvider_la_CPPFLAGS = -I../CIM_PhysicalConnector -I../CIM_PhysicalConnector # Uncomment the end for direct invocation, may have to be adjusted libcmpiPhysicalAsset_OpenDRIM_ConnectedToProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la #../CIM_PhysicalConnector/libcmpiPhysicalAsset_CIM_PhysicalConnectorProvider.la ../CIM_PhysicalConnector/libcmpiPhysicalAsset_CIM_PhysicalConnectorProvider.la libcmpiPhysicalAsset_OpenDRIM_ConnectedToProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_ConnectedTo.h OpenDRIM_ConnectedTo.h OpenDRIM_ConnectedToAccess.h opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConnectedTo/assocOpenDRIM_ConnectedTo.h0000644000175000017500000000613411377667226031353 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_CONNECTEDTO_H_ #define ASSOCOPENDRIM_CONNECTEDTO_H_ #include "OpenDRIM_ConnectedToAccess.h" int PhysicalAsset_OpenDRIM_ConnectedTo_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 PhysicalAsset_OpenDRIM_ConnectedTo_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 PhysicalAsset_OpenDRIM_ConnectedTo_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_ConnectedTo_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_ConnectedTo_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_ConnectedTo_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_CONNECTEDTO_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConnectedTo/OpenDRIM_ConnectedToProvider.cpp0000644000175000017500000004125111377667226032367 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_ConnectedTo.h" #include "OpenDRIM_ConnectedToAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_ConnectedToProviderSetInstance PhysicalAsset_OpenDRIM_ConnectedToProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_ConnectedTo_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_ConnectedTo_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_ConnectedToProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConnectedToProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_ConnectedTo_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConnectedToProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_ConnectedTo_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_ConnectedTo_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConnectedToProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ConnectedTo instance; PhysicalAsset_OpenDRIM_ConnectedTo_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_ConnectedTo_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConnectedToProviderSetInstance(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_ConnectedTo newInstance, oldInstance; PhysicalAsset_OpenDRIM_ConnectedTo_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_ConnectedTo_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConnectedToProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ConnectedTo instance; PhysicalAsset_OpenDRIM_ConnectedTo_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_ConnectedTo_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConnectedToProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ConnectedTo instance; PhysicalAsset_OpenDRIM_ConnectedTo_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConnectedToProviderExecQuery(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 PhysicalAsset_OpenDRIM_ConnectedToProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConnectedToProviderAssociatorNames(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 = PhysicalAsset_OpenDRIM_ConnectedTo_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_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 PhysicalAsset_OpenDRIM_ConnectedToProviderAssociators(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 = PhysicalAsset_OpenDRIM_ConnectedTo_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_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 PhysicalAsset_OpenDRIM_ConnectedToProviderReferenceNames(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 = PhysicalAsset_OpenDRIM_ConnectedTo_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_ConnectedTo_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ConnectedToProviderReferences(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 = PhysicalAsset_OpenDRIM_ConnectedTo_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = PhysicalAsset_OpenDRIM_ConnectedTo_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int PhysicalAsset_OpenDRIM_ConnectedTo_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_ConnectedTo_init FAILED: " + (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_ConnectedTo_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_ConnectedTo_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_ConnectedTo_unload FAILED: " + (string) OpenDRIM_ConnectedTo_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_ConnectedTo_INIT if (PhysicalAsset_OpenDRIM_ConnectedTo_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_ConnectedToProvider, PhysicalAsset_OpenDRIM_ConnectedToProvider, _broker, PhysicalAsset_OpenDRIM_ConnectedTo_INIT); CMAssociationMIStub(PhysicalAsset_OpenDRIM_ConnectedToProvider, PhysicalAsset_OpenDRIM_ConnectedToProvider, _broker, PhysicalAsset_OpenDRIM_ConnectedTo_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConnectedTo/OpenDRIM_ConnectedToAccess.h0000644000175000017500000001021411377667226031436 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_CONNECTEDTOACCESS_H_ #define OPENDRIM_CONNECTEDTOACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_ConnectedTo.h" #include "assocOpenDRIM_ConnectedTo.h" int PhysicalAsset_OpenDRIM_ConnectedTo_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_ConnectedTo_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_ConnectedTo_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_ConnectedTo_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ConnectedTo& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_ConnectedTo_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ConnectedTo& newInstance, const OpenDRIM_ConnectedTo& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_ConnectedTo_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ConnectedTo& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_ConnectedTo_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ConnectedTo& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_ConnectedTo_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_ConnectedTo_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_ConnectedTo_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_ConnectedTo_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_ConnectedTo_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_ConnectedTo_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_ConnectedTo_populate(OpenDRIM_ConnectedTo& instance, string& errorMessage); #endif /*OPENDRIM_CONNECTEDTOACCESS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConnectedTo/assocOpenDRIM_ConnectedTo.cpp0000644000175000017500000002107211377667226031704 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "assocOpenDRIM_ConnectedTo.h" int PhysicalAsset_OpenDRIM_ConnectedTo_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 = PhysicalAsset_OpenDRIM_ConnectedTo_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(PhysicalAsset_OpenDRIM_ConnectedTo_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(PhysicalAsset_OpenDRIM_ConnectedTo_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_ConnectedTo_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(PhysicalAsset_CIM_PhysicalConnector_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_PhysicalConnector_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_PhysicalConnector_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_ConnectedTo_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_PhysicalConnector _instance; PhysicalAsset_CIM_PhysicalConnector_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_PhysicalConnector_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_PhysicalConnector_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_ConnectedTo_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(PhysicalAsset_CIM_PhysicalConnector_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_PhysicalConnector_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_PhysicalConnector_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_ConnectedTo_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_PhysicalConnector _instance; PhysicalAsset_CIM_PhysicalConnector_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_PhysicalConnector_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_PhysicalConnector_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConnectedTo/cmpiOpenDRIM_ConnectedTo.h0000644000175000017500000000423411377667226031172 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_CONNECTEDTO_H_ #define CMPIOPENDRIM_CONNECTEDTO_H_ #include "OpenDRIM_ConnectedTo.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_ConnectedTo_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ConnectedTo& instance); CMPIInstance* PhysicalAsset_OpenDRIM_ConnectedTo_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ConnectedTo& instance); void PhysicalAsset_OpenDRIM_ConnectedTo_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ConnectedTo& instance); void PhysicalAsset_OpenDRIM_ConnectedTo_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ConnectedTo& instance); #endif /*CMPIOPENDRIM_CONNECTEDTO_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConnectedTo/cmpiOpenDRIM_ConnectedTo.cpp0000644000175000017500000000576411377667226031536 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_ConnectedTo.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_ConnectedTo_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ConnectedTo& instance) { _E_; Objectpath op(broker, OpenDRIM_ConnectedTo_classnames[0], OpenDRIM_ConnectedTo_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_ConnectedTo_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ConnectedTo& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_ConnectedTo_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_ConnectedTo_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ConnectedTo& 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 PhysicalAsset_OpenDRIM_ConnectedTo_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ConnectedTo& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (inst.getProperty("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_ConnectedTo/OpenDRIM_ConnectedTo.h0000644000175000017500000000653211377667226030324 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_CONNECTEDTO_H_ #define OPENDRIM_CONNECTEDTO_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_PhysicalConnector.h" #include "CIM_PhysicalConnectorAccess.h" #include "cmpiCIM_PhysicalConnector.h" #include "CIM_PhysicalConnectorAccess.h" */ const static char* OpenDRIM_ConnectedTo_classnames[] = {"OpenDRIM_ConnectedTo"}; static string OpenDRIM_ConnectedTo_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"CIM_PhysicalConnector"}; const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"CIM_PhysicalConnector"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_ConnectedTo { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; OpenDRIM_ConnectedTo() { Antecedent_isNULL = true; Dependent_isNULL = true; } ~OpenDRIM_ConnectedTo() {} 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_CONNECTEDTO_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chip/0000755000175000017500000000000011377667226022761 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chip/Makefile.am0000644000175000017500000000372411377667226025023 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_ChipProvider.la libcmpiPhysicalAsset_OpenDRIM_ChipProvider_la_SOURCES = OpenDRIM_ChipAccess.cpp OpenDRIM_ChipProvider.cpp cmpiOpenDRIM_Chip.cpp libcmpiPhysicalAsset_OpenDRIM_ChipProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la libcmpiPhysicalAsset_OpenDRIM_ChipProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_Chip.h OpenDRIM_Chip.h OpenDRIM_ChipAccess.h opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chip/cmpiOpenDRIM_Chip.h0000644000175000017500000000411011377667226026317 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_CHIP_H_ #define CMPIOPENDRIM_CHIP_H_ #include "OpenDRIM_Chip.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_Chip_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Chip& instance); CMPIInstance* PhysicalAsset_OpenDRIM_Chip_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Chip& instance); void PhysicalAsset_OpenDRIM_Chip_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Chip& instance); void PhysicalAsset_OpenDRIM_Chip_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Chip& instance); #endif /*CMPIOPENDRIM_CHIP_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chip/OpenDRIM_ChipAccess.h0000644000175000017500000000537611377667226026607 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_CHIPACCESS_H_ #define OPENDRIM_CHIPACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_Chip.h" int PhysicalAsset_OpenDRIM_Chip_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_Chip_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_Chip_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_Chip_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Chip& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_Chip_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Chip& newInstance, const OpenDRIM_Chip& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_Chip_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Chip& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_Chip_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Chip& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_Chip_populate(OpenDRIM_Chip& instance, string& errorMessage); #endif /*OPENDRIM_CHIPACCESS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chip/cmpiOpenDRIM_Chip.cpp0000644000175000017500000002152711377667226026665 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Chip.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_Chip_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Chip& instance) { _E_; Objectpath op(broker, OpenDRIM_Chip_classnames[0], OpenDRIM_Chip_NAMESPACE); if (!instance.Tag_isNULL) op.addKey("Tag", instance.Tag); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_Chip_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Chip& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_Chip_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.Name_isNULL) ci.setProperty("Name", instance.Name); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.Manufacturer_isNULL) ci.setProperty("Manufacturer", instance.Manufacturer); if (!instance.Model_isNULL) ci.setProperty("Model", instance.Model); if (!instance.SKU_isNULL) ci.setProperty("SKU", instance.SKU); if (!instance.SerialNumber_isNULL) ci.setProperty("SerialNumber", instance.SerialNumber); if (!instance.Version_isNULL) ci.setProperty("Version", instance.Version); if (!instance.PartNumber_isNULL) ci.setProperty("PartNumber", instance.PartNumber); if (!instance.OtherIdentifyingInfo_isNULL) ci.setProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo); if (!instance.PoweredOn_isNULL) ci.setProperty("PoweredOn", instance.PoweredOn); if (!instance.ManufactureDate_isNULL) ci.setPropertyDatetime("ManufactureDate", instance.ManufactureDate); if (!instance.VendorEquipmentType_isNULL) ci.setProperty("VendorEquipmentType", instance.VendorEquipmentType); if (!instance.UserTracking_isNULL) ci.setProperty("UserTracking", instance.UserTracking); if (!instance.CanBeFRUed_isNULL) ci.setProperty("CanBeFRUed", instance.CanBeFRUed); if (!instance.RemovalConditions_isNULL) ci.setProperty("RemovalConditions", instance.RemovalConditions); if (!instance.Removable_isNULL) ci.setProperty("Removable", instance.Removable); if (!instance.Replaceable_isNULL) ci.setProperty("Replaceable", instance.Replaceable); if (!instance.HotSwappable_isNULL) ci.setProperty("HotSwappable", instance.HotSwappable); if (!instance.FormFactor_isNULL) ci.setProperty("FormFactor", instance.FormFactor); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_Chip_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Chip& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (op.getKey("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_Chip_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Chip& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("Manufacturer", instance.Manufacturer) == OK) instance.Manufacturer_isNULL = false; if (inst.getProperty("Model", instance.Model) == OK) instance.Model_isNULL = false; if (inst.getProperty("SKU", instance.SKU) == OK) instance.SKU_isNULL = false; if (inst.getProperty("SerialNumber", instance.SerialNumber) == OK) instance.SerialNumber_isNULL = false; if (inst.getProperty("Version", instance.Version) == OK) instance.Version_isNULL = false; if (inst.getProperty("PartNumber", instance.PartNumber) == OK) instance.PartNumber_isNULL = false; if (inst.getProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo) == OK) instance.OtherIdentifyingInfo_isNULL = false; if (inst.getProperty("PoweredOn", instance.PoweredOn) == OK) instance.PoweredOn_isNULL = false; if (inst.getPropertyDatetime("ManufactureDate", instance.ManufactureDate) == OK) instance.ManufactureDate_isNULL = false; if (inst.getProperty("VendorEquipmentType", instance.VendorEquipmentType) == OK) instance.VendorEquipmentType_isNULL = false; if (inst.getProperty("UserTracking", instance.UserTracking) == OK) instance.UserTracking_isNULL = false; if (inst.getProperty("CanBeFRUed", instance.CanBeFRUed) == OK) instance.CanBeFRUed_isNULL = false; if (inst.getProperty("RemovalConditions", instance.RemovalConditions) == OK) instance.RemovalConditions_isNULL = false; if (inst.getProperty("Removable", instance.Removable) == OK) instance.Removable_isNULL = false; if (inst.getProperty("Replaceable", instance.Replaceable) == OK) instance.Replaceable_isNULL = false; if (inst.getProperty("HotSwappable", instance.HotSwappable) == OK) instance.HotSwappable_isNULL = false; if (inst.getProperty("FormFactor", instance.FormFactor) == OK) instance.FormFactor_isNULL = false; _L_; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chip/OpenDRIM_ChipAccess.cpp0000644000175000017500000000565411377667226027141 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_ChipAccess.h" int PhysicalAsset_OpenDRIM_Chip_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Chip_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Chip_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_Chip_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Chip& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_Chip_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Chip& newInstance, const OpenDRIM_Chip& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Chip_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Chip& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Chip_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Chip& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Chip_populate(OpenDRIM_Chip& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chip/OpenDRIM_ChipProvider.cpp0000644000175000017500000002443711377667226027532 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Chip.h" #include "OpenDRIM_ChipAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_ChipProviderSetInstance PhysicalAsset_OpenDRIM_ChipProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_Chip_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_Chip_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_ChipProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_Chip_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChipProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chip_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chip_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_Chip_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChipProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_Chip_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chip_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_Chip_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChipProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Chip instance; PhysicalAsset_OpenDRIM_Chip_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chip_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chip_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_Chip_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChipProviderSetInstance(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_Chip newInstance, oldInstance; PhysicalAsset_OpenDRIM_Chip_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_Chip_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chip_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chip_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Chip_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chip_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChipProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Chip instance; PhysicalAsset_OpenDRIM_Chip_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chip_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_Chip_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Chip_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chip_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Chip_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chip_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_Chip_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChipProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Chip instance; PhysicalAsset_OpenDRIM_Chip_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chip_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chip_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Chip_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Chip_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_ChipProviderExecQuery(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 PhysicalAsset_OpenDRIM_Chip_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chip_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_Chip_init FAILED: " + (string) OpenDRIM_Chip_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_Chip_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Chip_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_Chip_unload FAILED: " + (string) OpenDRIM_Chip_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_Chip_INIT if (PhysicalAsset_OpenDRIM_Chip_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_ChipProvider, PhysicalAsset_OpenDRIM_ChipProvider, _broker, PhysicalAsset_OpenDRIM_Chip_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Chip/OpenDRIM_Chip.h0000644000175000017500000003137611377667226025464 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_CHIP_H_ #define OPENDRIM_CHIP_H_ #include const static char* OpenDRIM_Chip_classnames[] = {"OpenDRIM_Chip"}; static string OpenDRIM_Chip_NAMESPACE = _NAMESPACE; class OpenDRIM_Chip { public: string Caption; bool Caption_isNULL; string InstallDate; bool InstallDate_isNULL; string Name; bool Name_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; string Tag; bool Tag_isNULL; string Description; bool Description_isNULL; string CreationClassName; bool CreationClassName_isNULL; string ElementName; bool ElementName_isNULL; string Manufacturer; bool Manufacturer_isNULL; string Model; bool Model_isNULL; string SKU; bool SKU_isNULL; string SerialNumber; bool SerialNumber_isNULL; string Version; bool Version_isNULL; string PartNumber; bool PartNumber_isNULL; string OtherIdentifyingInfo; bool OtherIdentifyingInfo_isNULL; bool PoweredOn; bool PoweredOn_isNULL; string ManufactureDate; bool ManufactureDate_isNULL; string VendorEquipmentType; bool VendorEquipmentType_isNULL; string UserTracking; bool UserTracking_isNULL; bool CanBeFRUed; bool CanBeFRUed_isNULL; unsigned short RemovalConditions; bool RemovalConditions_isNULL; bool Removable; bool Removable_isNULL; bool Replaceable; bool Replaceable_isNULL; bool HotSwappable; bool HotSwappable_isNULL; unsigned short FormFactor; bool FormFactor_isNULL; OpenDRIM_Chip() { Caption_isNULL = true; InstallDate_isNULL = true; Name_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; Tag_isNULL = true; Description_isNULL = true; CreationClassName_isNULL = true; ElementName_isNULL = true; Manufacturer_isNULL = true; Model_isNULL = true; SKU_isNULL = true; SerialNumber_isNULL = true; Version_isNULL = true; PartNumber_isNULL = true; OtherIdentifyingInfo_isNULL = true; PoweredOn_isNULL = true; ManufactureDate_isNULL = true; VendorEquipmentType_isNULL = true; UserTracking_isNULL = true; CanBeFRUed_isNULL = true; RemovalConditions_isNULL = true; Removable_isNULL = true; Replaceable_isNULL = true; HotSwappable_isNULL = true; FormFactor_isNULL = true; } ~OpenDRIM_Chip() {} string getKeys() const { return CF_toLowCase(".Tag=\"" + CF_quoteString(Tag) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""); } 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 getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getTag(string& value) const { if (Tag_isNULL==true) return NOT_FOUND; value = Tag; return OK; } int setTag(const string& newValue) { Tag = newValue; Tag_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 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 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 getManufacturer(string& value) const { if (Manufacturer_isNULL==true) return NOT_FOUND; value = Manufacturer; return OK; } int setManufacturer(const string& newValue) { Manufacturer = newValue; Manufacturer_isNULL = false; return OK; } int getModel(string& value) const { if (Model_isNULL==true) return NOT_FOUND; value = Model; return OK; } int setModel(const string& newValue) { Model = newValue; Model_isNULL = false; return OK; } int getSKU(string& value) const { if (SKU_isNULL==true) return NOT_FOUND; value = SKU; return OK; } int setSKU(const string& newValue) { SKU = newValue; SKU_isNULL = false; return OK; } int getSerialNumber(string& value) const { if (SerialNumber_isNULL==true) return NOT_FOUND; value = SerialNumber; return OK; } int setSerialNumber(const string& newValue) { SerialNumber = newValue; SerialNumber_isNULL = false; return OK; } int getVersion(string& value) const { if (Version_isNULL==true) return NOT_FOUND; value = Version; return OK; } int setVersion(const string& newValue) { Version = newValue; Version_isNULL = false; return OK; } int getPartNumber(string& value) const { if (PartNumber_isNULL==true) return NOT_FOUND; value = PartNumber; return OK; } int setPartNumber(const string& newValue) { PartNumber = newValue; PartNumber_isNULL = false; return OK; } int getOtherIdentifyingInfo(string& value) const { if (OtherIdentifyingInfo_isNULL==true) return NOT_FOUND; value = OtherIdentifyingInfo; return OK; } int setOtherIdentifyingInfo(const string& newValue) { OtherIdentifyingInfo = newValue; OtherIdentifyingInfo_isNULL = false; return OK; } int getPoweredOn(bool& value) const { if (PoweredOn_isNULL==true) return NOT_FOUND; value = PoweredOn; return OK; } int setPoweredOn(const bool& newValue) { PoweredOn = newValue; PoweredOn_isNULL = false; return OK; } int getManufactureDate(string& value) const { if (ManufactureDate_isNULL==true) return NOT_FOUND; value = ManufactureDate; return OK; } int setManufactureDate(const string& newValue) { ManufactureDate = newValue; ManufactureDate_isNULL = false; return OK; } int getVendorEquipmentType(string& value) const { if (VendorEquipmentType_isNULL==true) return NOT_FOUND; value = VendorEquipmentType; return OK; } int setVendorEquipmentType(const string& newValue) { VendorEquipmentType = newValue; VendorEquipmentType_isNULL = false; return OK; } int getUserTracking(string& value) const { if (UserTracking_isNULL==true) return NOT_FOUND; value = UserTracking; return OK; } int setUserTracking(const string& newValue) { UserTracking = newValue; UserTracking_isNULL = false; return OK; } int getCanBeFRUed(bool& value) const { if (CanBeFRUed_isNULL==true) return NOT_FOUND; value = CanBeFRUed; return OK; } int setCanBeFRUed(const bool& newValue) { CanBeFRUed = newValue; CanBeFRUed_isNULL = false; return OK; } int getRemovalConditions(unsigned short& value) const { if (RemovalConditions_isNULL==true) return NOT_FOUND; value = RemovalConditions; return OK; } int setRemovalConditions(const unsigned short& newValue) { RemovalConditions = newValue; RemovalConditions_isNULL = false; return OK; } int getRemovable(bool& value) const { if (Removable_isNULL==true) return NOT_FOUND; value = Removable; return OK; } int setRemovable(const bool& newValue) { Removable = newValue; Removable_isNULL = false; return OK; } int getReplaceable(bool& value) const { if (Replaceable_isNULL==true) return NOT_FOUND; value = Replaceable; return OK; } int setReplaceable(const bool& newValue) { Replaceable = newValue; Replaceable_isNULL = false; return OK; } int getHotSwappable(bool& value) const { if (HotSwappable_isNULL==true) return NOT_FOUND; value = HotSwappable; return OK; } int setHotSwappable(const bool& newValue) { HotSwappable = newValue; HotSwappable_isNULL = false; return OK; } int getFormFactor(unsigned short& value) const { if (FormFactor_isNULL==true) return NOT_FOUND; value = FormFactor; return OK; } int setFormFactor(const unsigned short& newValue) { FormFactor = newValue; FormFactor_isNULL = false; return OK; } }; #endif /*OPENDRIM_CHIP_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/COPYING0000644000175000017500000004310311377667226021475 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-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilities/0000755000175000017500000000000011377667226027164 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilities/OpenDRIM_PhysicalAssetCapabilitiesAccess.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilities/OpenDRIM_PhysicalAssetCapabi0000644000175000017500000000676411377667226034435 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALASSETCAPABILITIESACCESS_H_ #define OPENDRIM_PHYSICALASSETCAPABILITIESACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_PhysicalAssetCapabilities.h" int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalAssetCapabilities& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetCapabilities& newInstance, const OpenDRIM_PhysicalAssetCapabilities& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetCapabilities& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetCapabilities& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_CreateGoalSettings(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetCapabilities& instance, unsigned short& returnValue, const OpenDRIM_PhysicalAssetCapabilities_CreateGoalSettings_In& in, OpenDRIM_PhysicalAssetCapabilities_CreateGoalSettings_Out& out, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_populate(OpenDRIM_PhysicalAssetCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_PHYSICALASSETCAPABILITIESACCESS_H_*/ ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilities/cmpiOpenDRIM_PhysicalAssetCapabilities.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilities/cmpiOpenDRIM_PhysicalAssetCa0000644000175000017500000001144111377667226034436 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalAssetCapabilities.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_PhysicalAssetCapabilities_classnames[0], OpenDRIM_PhysicalAssetCapabilities_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetCapabilities& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_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.FRUInfoSupported_isNULL) ci.setProperty("FRUInfoSupported", instance.FRUInfoSupported); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalAssetCapabilities& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalAssetCapabilities& 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("FRUInfoSupported", instance.FRUInfoSupported) == OK) instance.FRUInfoSupported_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_PhysicalAssetCapabilities_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 PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_PhysicalAssetCapabilities_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_; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilities/Makefile.am0000644000175000017500000000424611377667226031226 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProvider_la_SOURCES = OpenDRIM_PhysicalAssetCapabilitiesAccess.cpp OpenDRIM_PhysicalAssetCapabilitiesProvider.cpp cmpiOpenDRIM_PhysicalAssetCapabilities.cpp libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la libcmpiPhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_PhysicalAssetCapabilities.h OpenDRIM_PhysicalAssetCapabilities.h OpenDRIM_PhysicalAssetCapabilitiesAccess.h ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilities/OpenDRIM_PhysicalAssetCapabilities.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilities/OpenDRIM_PhysicalAssetCapabi0000644000175000017500000001266111377667226034426 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALASSETCAPABILITIES_H_ #define OPENDRIM_PHYSICALASSETCAPABILITIES_H_ #include const static char* OpenDRIM_PhysicalAssetCapabilities_classnames[] = {"OpenDRIM_PhysicalAssetCapabilities"}; static string OpenDRIM_PhysicalAssetCapabilities_NAMESPACE = _NAMESPACE; class OpenDRIM_PhysicalAssetCapabilities { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string InstanceID; bool InstanceID_isNULL; string ElementName; bool ElementName_isNULL; bool FRUInfoSupported; bool FRUInfoSupported_isNULL; OpenDRIM_PhysicalAssetCapabilities() { Caption_isNULL = true; Description_isNULL = true; InstanceID_isNULL = true; ElementName_isNULL = true; FRUInfoSupported_isNULL = true; } ~OpenDRIM_PhysicalAssetCapabilities() {} 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 getFRUInfoSupported(bool& value) const { if (FRUInfoSupported_isNULL==true) return NOT_FOUND; value = FRUInfoSupported; return OK; } int setFRUInfoSupported(const bool& newValue) { FRUInfoSupported = newValue; FRUInfoSupported_isNULL = false; return OK; } }; class OpenDRIM_PhysicalAssetCapabilities_CreateGoalSettings_In { public: vector TemplateGoalSettings; bool TemplateGoalSettings_isNULL; vector SupportedGoalSettings; bool SupportedGoalSettings_isNULL; OpenDRIM_PhysicalAssetCapabilities_CreateGoalSettings_In() { TemplateGoalSettings_isNULL = true; SupportedGoalSettings_isNULL = true; } ~OpenDRIM_PhysicalAssetCapabilities_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_PhysicalAssetCapabilities_CreateGoalSettings_Out { public: vector SupportedGoalSettings; bool SupportedGoalSettings_isNULL; OpenDRIM_PhysicalAssetCapabilities_CreateGoalSettings_Out() { SupportedGoalSettings_isNULL = true; } ~OpenDRIM_PhysicalAssetCapabilities_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_PHYSICALASSETCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilities/OpenDRIM_PhysicalAssetCapabilitiesAccess.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilities/OpenDRIM_PhysicalAssetCapabi0000644000175000017500000000720711377667226034426 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_PhysicalAssetCapabilitiesAccess.h" int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalAssetCapabilities& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetCapabilities& newInstance, const OpenDRIM_PhysicalAssetCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_CreateGoalSettings(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalAssetCapabilities& instance, unsigned short& returnValue, const OpenDRIM_PhysicalAssetCapabilities_CreateGoalSettings_In& in, OpenDRIM_PhysicalAssetCapabilities_CreateGoalSettings_Out& out, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_populate(OpenDRIM_PhysicalAssetCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilities/OpenDRIM_PhysicalAssetCapabilitiesProvider.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilities/OpenDRIM_PhysicalAssetCapabi0000644000175000017500000003476211377667226034434 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalAssetCapabilities.h" #include "OpenDRIM_PhysicalAssetCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProviderSetInstance PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalAssetCapabilities instance; PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProviderSetInstance(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_PhysicalAssetCapabilities newInstance, oldInstance; PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalAssetCapabilities instance; PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_PhysicalAssetCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalAssetCapabilities instance; PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProviderExecQuery(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 PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProviderInvokeMethod(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_PhysicalAssetCapabilities instance; PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"InstanceID"}; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="CreateGoalSettings") { unsigned short returnValue; OpenDRIM_PhysicalAssetCapabilities_CreateGoalSettings_In inArgs; PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCPP(_broker, in, inArgs); OpenDRIM_PhysicalAssetCapabilities_CreateGoalSettings_Out outArgs; errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_CreateGoalSettings(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint16, CMPI_uint16); } else { errorMessage = (string) OpenDRIM_PhysicalAssetCapabilities_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 PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_init FAILED: " + (string) OpenDRIM_PhysicalAssetCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_unload FAILED: " + (string) OpenDRIM_PhysicalAssetCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_INIT if (PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProvider, PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_INIT); CMMethodMIStub(PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProvider, PhysicalAsset_OpenDRIM_PhysicalAssetCapabilitiesProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilities/cmpiOpenDRIM_PhysicalAssetCapabilities.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalAssetCapabilities/cmpiOpenDRIM_PhysicalAssetCa0000644000175000017500000000524211377667226034440 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_PHYSICALASSETCAPABILITIES_H_ #define CMPIOPENDRIM_PHYSICALASSETCAPABILITIES_H_ #include "OpenDRIM_PhysicalAssetCapabilities.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetCapabilities& instance); CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalAssetCapabilities& instance); void PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalAssetCapabilities& instance); void PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalAssetCapabilities& instance); void PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_PhysicalAssetCapabilities_CreateGoalSettings_In& args); void PhysicalAsset_OpenDRIM_PhysicalAssetCapabilities_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_PhysicalAssetCapabilities_CreateGoalSettings_Out& args); #endif /*CMPIOPENDRIM_PHYSICALASSETCAPABILITIES_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/NEWS0000644000175000017500000000045511404316552021124 0ustar guillaumeguillaumeChanges in 0.1.2 ========================= - Code adjustement Changes in 0.1.1 ========================= // TODO Initial Release 0.1.0 ========================= Implementation of the PhysicalPackage class needed by the Base Server provider to be conformed with the DMTF Base Server Profile 1.0.0 opendrim-lmp-physicalasset-0.1.2~ppa/LICENSE0000644000175000017500000000277311377667226021457 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Rack/0000755000175000017500000000000011377667226022756 5ustar guillaumeguillaumeopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Rack/cmpiOpenDRIM_Rack.cpp0000644000175000017500000003127711377667226026662 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Rack.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_Rack_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Rack& instance) { _E_; Objectpath op(broker, OpenDRIM_Rack_classnames[0], OpenDRIM_Rack_NAMESPACE); if (!instance.Tag_isNULL) op.addKey("Tag", instance.Tag); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_Rack_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Rack& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_Rack_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.Name_isNULL) ci.setProperty("Name", instance.Name); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.Manufacturer_isNULL) ci.setProperty("Manufacturer", instance.Manufacturer); if (!instance.Model_isNULL) ci.setProperty("Model", instance.Model); if (!instance.SKU_isNULL) ci.setProperty("SKU", instance.SKU); if (!instance.SerialNumber_isNULL) ci.setProperty("SerialNumber", instance.SerialNumber); if (!instance.Version_isNULL) ci.setProperty("Version", instance.Version); if (!instance.PartNumber_isNULL) ci.setProperty("PartNumber", instance.PartNumber); if (!instance.OtherIdentifyingInfo_isNULL) ci.setProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo); if (!instance.PoweredOn_isNULL) ci.setProperty("PoweredOn", instance.PoweredOn); if (!instance.ManufactureDate_isNULL) ci.setPropertyDatetime("ManufactureDate", instance.ManufactureDate); if (!instance.VendorEquipmentType_isNULL) ci.setProperty("VendorEquipmentType", instance.VendorEquipmentType); if (!instance.UserTracking_isNULL) ci.setProperty("UserTracking", instance.UserTracking); if (!instance.CanBeFRUed_isNULL) ci.setProperty("CanBeFRUed", instance.CanBeFRUed); if (!instance.RemovalConditions_isNULL) ci.setProperty("RemovalConditions", instance.RemovalConditions); if (!instance.Removable_isNULL) ci.setProperty("Removable", instance.Removable); if (!instance.Replaceable_isNULL) ci.setProperty("Replaceable", instance.Replaceable); if (!instance.HotSwappable_isNULL) ci.setProperty("HotSwappable", instance.HotSwappable); if (!instance.Depth_isNULL) ci.setProperty("Depth", instance.Depth); if (!instance.Width_isNULL) ci.setProperty("Width", instance.Width); if (!instance.Weight_isNULL) ci.setProperty("Weight", instance.Weight); if (!instance.PackageType_isNULL) ci.setProperty("PackageType", instance.PackageType); if (!instance.OtherPackageType_isNULL) ci.setProperty("OtherPackageType", instance.OtherPackageType); if (!instance.VendorCompatibilityStrings_isNULL) ci.setProperty("VendorCompatibilityStrings", instance.VendorCompatibilityStrings); if (!instance.CableManagementStrategy_isNULL) ci.setProperty("CableManagementStrategy", instance.CableManagementStrategy); if (!instance.ServicePhilosophy_isNULL) ci.setProperty("ServicePhilosophy", instance.ServicePhilosophy); if (!instance.ServiceDescriptions_isNULL) ci.setProperty("ServiceDescriptions", instance.ServiceDescriptions); if (!instance.LockPresent_isNULL) ci.setProperty("LockPresent", instance.LockPresent); if (!instance.AudibleAlarm_isNULL) ci.setProperty("AudibleAlarm", instance.AudibleAlarm); if (!instance.VisibleAlarm_isNULL) ci.setProperty("VisibleAlarm", instance.VisibleAlarm); if (!instance.SecurityBreach_isNULL) ci.setProperty("SecurityBreach", instance.SecurityBreach); if (!instance.BreachDescription_isNULL) ci.setProperty("BreachDescription", instance.BreachDescription); if (!instance.IsLocked_isNULL) ci.setProperty("IsLocked", instance.IsLocked); if (!instance.Height_isNULL) ci.setProperty("Height", instance.Height); if (!instance.TypeOfRack_isNULL) ci.setProperty("TypeOfRack", instance.TypeOfRack); if (!instance.CountryDesignation_isNULL) ci.setProperty("CountryDesignation", instance.CountryDesignation); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_Rack_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Rack& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (op.getKey("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_Rack_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Rack& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("Tag", instance.Tag) == OK) instance.Tag_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("Manufacturer", instance.Manufacturer) == OK) instance.Manufacturer_isNULL = false; if (inst.getProperty("Model", instance.Model) == OK) instance.Model_isNULL = false; if (inst.getProperty("SKU", instance.SKU) == OK) instance.SKU_isNULL = false; if (inst.getProperty("SerialNumber", instance.SerialNumber) == OK) instance.SerialNumber_isNULL = false; if (inst.getProperty("Version", instance.Version) == OK) instance.Version_isNULL = false; if (inst.getProperty("PartNumber", instance.PartNumber) == OK) instance.PartNumber_isNULL = false; if (inst.getProperty("OtherIdentifyingInfo", instance.OtherIdentifyingInfo) == OK) instance.OtherIdentifyingInfo_isNULL = false; if (inst.getProperty("PoweredOn", instance.PoweredOn) == OK) instance.PoweredOn_isNULL = false; if (inst.getPropertyDatetime("ManufactureDate", instance.ManufactureDate) == OK) instance.ManufactureDate_isNULL = false; if (inst.getProperty("VendorEquipmentType", instance.VendorEquipmentType) == OK) instance.VendorEquipmentType_isNULL = false; if (inst.getProperty("UserTracking", instance.UserTracking) == OK) instance.UserTracking_isNULL = false; if (inst.getProperty("CanBeFRUed", instance.CanBeFRUed) == OK) instance.CanBeFRUed_isNULL = false; if (inst.getProperty("RemovalConditions", instance.RemovalConditions) == OK) instance.RemovalConditions_isNULL = false; if (inst.getProperty("Removable", instance.Removable) == OK) instance.Removable_isNULL = false; if (inst.getProperty("Replaceable", instance.Replaceable) == OK) instance.Replaceable_isNULL = false; if (inst.getProperty("HotSwappable", instance.HotSwappable) == OK) instance.HotSwappable_isNULL = false; if (inst.getProperty("Depth", instance.Depth) == OK) instance.Depth_isNULL = false; if (inst.getProperty("Width", instance.Width) == OK) instance.Width_isNULL = false; if (inst.getProperty("Weight", instance.Weight) == OK) instance.Weight_isNULL = false; if (inst.getProperty("PackageType", instance.PackageType) == OK) instance.PackageType_isNULL = false; if (inst.getProperty("OtherPackageType", instance.OtherPackageType) == OK) instance.OtherPackageType_isNULL = false; if (inst.getProperty("VendorCompatibilityStrings", instance.VendorCompatibilityStrings) == OK) instance.VendorCompatibilityStrings_isNULL = false; if (inst.getProperty("CableManagementStrategy", instance.CableManagementStrategy) == OK) instance.CableManagementStrategy_isNULL = false; if (inst.getProperty("ServicePhilosophy", instance.ServicePhilosophy) == OK) instance.ServicePhilosophy_isNULL = false; if (inst.getProperty("ServiceDescriptions", instance.ServiceDescriptions) == OK) instance.ServiceDescriptions_isNULL = false; if (inst.getProperty("LockPresent", instance.LockPresent) == OK) instance.LockPresent_isNULL = false; if (inst.getProperty("AudibleAlarm", instance.AudibleAlarm) == OK) instance.AudibleAlarm_isNULL = false; if (inst.getProperty("VisibleAlarm", instance.VisibleAlarm) == OK) instance.VisibleAlarm_isNULL = false; if (inst.getProperty("SecurityBreach", instance.SecurityBreach) == OK) instance.SecurityBreach_isNULL = false; if (inst.getProperty("BreachDescription", instance.BreachDescription) == OK) instance.BreachDescription_isNULL = false; if (inst.getProperty("IsLocked", instance.IsLocked) == OK) instance.IsLocked_isNULL = false; if (inst.getProperty("Height", instance.Height) == OK) instance.Height_isNULL = false; if (inst.getProperty("TypeOfRack", instance.TypeOfRack) == OK) instance.TypeOfRack_isNULL = false; if (inst.getProperty("CountryDesignation", instance.CountryDesignation) == OK) instance.CountryDesignation_isNULL = false; _L_; } void PhysicalAsset_OpenDRIM_Rack_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_Rack_IsCompatible_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath ElementToCheck; data = in->ft->getArg(in, "ElementToCheck", &rc); if (rc.rc == OK) { CT_ToC(broker, data, ElementToCheck); args.setElementToCheck(ElementToCheck); } _L_; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Rack/Makefile.am0000644000175000017500000000372411377667226025020 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_RackProvider.la libcmpiPhysicalAsset_OpenDRIM_RackProvider_la_SOURCES = OpenDRIM_RackAccess.cpp OpenDRIM_RackProvider.cpp cmpiOpenDRIM_Rack.cpp libcmpiPhysicalAsset_OpenDRIM_RackProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la libcmpiPhysicalAsset_OpenDRIM_RackProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_Rack.h OpenDRIM_Rack.h OpenDRIM_RackAccess.h opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Rack/OpenDRIM_Rack.h0000644000175000017500000004635511377667226025461 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_RACK_H_ #define OPENDRIM_RACK_H_ #include const static char* OpenDRIM_Rack_classnames[] = {"OpenDRIM_Rack"}; static string OpenDRIM_Rack_NAMESPACE = _NAMESPACE; class OpenDRIM_Rack { public: string Caption; bool Caption_isNULL; string InstallDate; bool InstallDate_isNULL; string Name; bool Name_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; string Tag; bool Tag_isNULL; string Description; bool Description_isNULL; string CreationClassName; bool CreationClassName_isNULL; string ElementName; bool ElementName_isNULL; string Manufacturer; bool Manufacturer_isNULL; string Model; bool Model_isNULL; string SKU; bool SKU_isNULL; string SerialNumber; bool SerialNumber_isNULL; string Version; bool Version_isNULL; string PartNumber; bool PartNumber_isNULL; string OtherIdentifyingInfo; bool OtherIdentifyingInfo_isNULL; bool PoweredOn; bool PoweredOn_isNULL; string ManufactureDate; bool ManufactureDate_isNULL; string VendorEquipmentType; bool VendorEquipmentType_isNULL; string UserTracking; bool UserTracking_isNULL; bool CanBeFRUed; bool CanBeFRUed_isNULL; unsigned short RemovalConditions; bool RemovalConditions_isNULL; bool Removable; bool Removable_isNULL; bool Replaceable; bool Replaceable_isNULL; bool HotSwappable; bool HotSwappable_isNULL; float Depth; bool Depth_isNULL; float Width; bool Width_isNULL; float Weight; bool Weight_isNULL; unsigned short PackageType; bool PackageType_isNULL; string OtherPackageType; bool OtherPackageType_isNULL; vector VendorCompatibilityStrings; bool VendorCompatibilityStrings_isNULL; string CableManagementStrategy; bool CableManagementStrategy_isNULL; vector ServicePhilosophy; bool ServicePhilosophy_isNULL; vector ServiceDescriptions; bool ServiceDescriptions_isNULL; bool LockPresent; bool LockPresent_isNULL; bool AudibleAlarm; bool AudibleAlarm_isNULL; bool VisibleAlarm; bool VisibleAlarm_isNULL; unsigned short SecurityBreach; bool SecurityBreach_isNULL; string BreachDescription; bool BreachDescription_isNULL; bool IsLocked; bool IsLocked_isNULL; float Height; bool Height_isNULL; unsigned short TypeOfRack; bool TypeOfRack_isNULL; string CountryDesignation; bool CountryDesignation_isNULL; OpenDRIM_Rack() { Caption_isNULL = true; InstallDate_isNULL = true; Name_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; Tag_isNULL = true; Description_isNULL = true; CreationClassName_isNULL = true; ElementName_isNULL = true; Manufacturer_isNULL = true; Model_isNULL = true; SKU_isNULL = true; SerialNumber_isNULL = true; Version_isNULL = true; PartNumber_isNULL = true; OtherIdentifyingInfo_isNULL = true; PoweredOn_isNULL = true; ManufactureDate_isNULL = true; VendorEquipmentType_isNULL = true; UserTracking_isNULL = true; CanBeFRUed_isNULL = true; RemovalConditions_isNULL = true; Removable_isNULL = true; Replaceable_isNULL = true; HotSwappable_isNULL = true; Depth_isNULL = true; Width_isNULL = true; Weight_isNULL = true; PackageType_isNULL = true; OtherPackageType_isNULL = true; VendorCompatibilityStrings_isNULL = true; CableManagementStrategy_isNULL = true; ServicePhilosophy_isNULL = true; ServiceDescriptions_isNULL = true; LockPresent_isNULL = true; AudibleAlarm_isNULL = true; VisibleAlarm_isNULL = true; SecurityBreach_isNULL = true; BreachDescription_isNULL = true; IsLocked_isNULL = true; Height_isNULL = true; TypeOfRack_isNULL = true; CountryDesignation_isNULL = true; } ~OpenDRIM_Rack() {} string getKeys() const { return CF_toLowCase(".Tag=\"" + CF_quoteString(Tag) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""); } 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 getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getTag(string& value) const { if (Tag_isNULL==true) return NOT_FOUND; value = Tag; return OK; } int setTag(const string& newValue) { Tag = newValue; Tag_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 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 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 getManufacturer(string& value) const { if (Manufacturer_isNULL==true) return NOT_FOUND; value = Manufacturer; return OK; } int setManufacturer(const string& newValue) { Manufacturer = newValue; Manufacturer_isNULL = false; return OK; } int getModel(string& value) const { if (Model_isNULL==true) return NOT_FOUND; value = Model; return OK; } int setModel(const string& newValue) { Model = newValue; Model_isNULL = false; return OK; } int getSKU(string& value) const { if (SKU_isNULL==true) return NOT_FOUND; value = SKU; return OK; } int setSKU(const string& newValue) { SKU = newValue; SKU_isNULL = false; return OK; } int getSerialNumber(string& value) const { if (SerialNumber_isNULL==true) return NOT_FOUND; value = SerialNumber; return OK; } int setSerialNumber(const string& newValue) { SerialNumber = newValue; SerialNumber_isNULL = false; return OK; } int getVersion(string& value) const { if (Version_isNULL==true) return NOT_FOUND; value = Version; return OK; } int setVersion(const string& newValue) { Version = newValue; Version_isNULL = false; return OK; } int getPartNumber(string& value) const { if (PartNumber_isNULL==true) return NOT_FOUND; value = PartNumber; return OK; } int setPartNumber(const string& newValue) { PartNumber = newValue; PartNumber_isNULL = false; return OK; } int getOtherIdentifyingInfo(string& value) const { if (OtherIdentifyingInfo_isNULL==true) return NOT_FOUND; value = OtherIdentifyingInfo; return OK; } int setOtherIdentifyingInfo(const string& newValue) { OtherIdentifyingInfo = newValue; OtherIdentifyingInfo_isNULL = false; return OK; } int getPoweredOn(bool& value) const { if (PoweredOn_isNULL==true) return NOT_FOUND; value = PoweredOn; return OK; } int setPoweredOn(const bool& newValue) { PoweredOn = newValue; PoweredOn_isNULL = false; return OK; } int getManufactureDate(string& value) const { if (ManufactureDate_isNULL==true) return NOT_FOUND; value = ManufactureDate; return OK; } int setManufactureDate(const string& newValue) { ManufactureDate = newValue; ManufactureDate_isNULL = false; return OK; } int getVendorEquipmentType(string& value) const { if (VendorEquipmentType_isNULL==true) return NOT_FOUND; value = VendorEquipmentType; return OK; } int setVendorEquipmentType(const string& newValue) { VendorEquipmentType = newValue; VendorEquipmentType_isNULL = false; return OK; } int getUserTracking(string& value) const { if (UserTracking_isNULL==true) return NOT_FOUND; value = UserTracking; return OK; } int setUserTracking(const string& newValue) { UserTracking = newValue; UserTracking_isNULL = false; return OK; } int getCanBeFRUed(bool& value) const { if (CanBeFRUed_isNULL==true) return NOT_FOUND; value = CanBeFRUed; return OK; } int setCanBeFRUed(const bool& newValue) { CanBeFRUed = newValue; CanBeFRUed_isNULL = false; return OK; } int getRemovalConditions(unsigned short& value) const { if (RemovalConditions_isNULL==true) return NOT_FOUND; value = RemovalConditions; return OK; } int setRemovalConditions(const unsigned short& newValue) { RemovalConditions = newValue; RemovalConditions_isNULL = false; return OK; } int getRemovable(bool& value) const { if (Removable_isNULL==true) return NOT_FOUND; value = Removable; return OK; } int setRemovable(const bool& newValue) { Removable = newValue; Removable_isNULL = false; return OK; } int getReplaceable(bool& value) const { if (Replaceable_isNULL==true) return NOT_FOUND; value = Replaceable; return OK; } int setReplaceable(const bool& newValue) { Replaceable = newValue; Replaceable_isNULL = false; return OK; } int getHotSwappable(bool& value) const { if (HotSwappable_isNULL==true) return NOT_FOUND; value = HotSwappable; return OK; } int setHotSwappable(const bool& newValue) { HotSwappable = newValue; HotSwappable_isNULL = false; return OK; } int getDepth(float& value) const { if (Depth_isNULL==true) return NOT_FOUND; value = Depth; return OK; } int setDepth(const float& newValue) { Depth = newValue; Depth_isNULL = false; return OK; } int getWidth(float& value) const { if (Width_isNULL==true) return NOT_FOUND; value = Width; return OK; } int setWidth(const float& newValue) { Width = newValue; Width_isNULL = false; return OK; } int getWeight(float& value) const { if (Weight_isNULL==true) return NOT_FOUND; value = Weight; return OK; } int setWeight(const float& newValue) { Weight = newValue; Weight_isNULL = false; return OK; } int getPackageType(unsigned short& value) const { if (PackageType_isNULL==true) return NOT_FOUND; value = PackageType; return OK; } int setPackageType(const unsigned short& newValue) { PackageType = newValue; PackageType_isNULL = false; return OK; } int getOtherPackageType(string& value) const { if (OtherPackageType_isNULL==true) return NOT_FOUND; value = OtherPackageType; return OK; } int setOtherPackageType(const string& newValue) { OtherPackageType = newValue; OtherPackageType_isNULL = false; return OK; } int getVendorCompatibilityStrings(vector& value) const { if (VendorCompatibilityStrings_isNULL==true) return NOT_FOUND; value = VendorCompatibilityStrings; return OK; } int setVendorCompatibilityStrings(const vector& newValue) { VendorCompatibilityStrings = newValue; VendorCompatibilityStrings_isNULL = false; return OK; } int getCableManagementStrategy(string& value) const { if (CableManagementStrategy_isNULL==true) return NOT_FOUND; value = CableManagementStrategy; return OK; } int setCableManagementStrategy(const string& newValue) { CableManagementStrategy = newValue; CableManagementStrategy_isNULL = false; return OK; } int getServicePhilosophy(vector& value) const { if (ServicePhilosophy_isNULL==true) return NOT_FOUND; value = ServicePhilosophy; return OK; } int setServicePhilosophy(const vector& newValue) { ServicePhilosophy = newValue; ServicePhilosophy_isNULL = false; return OK; } int getServiceDescriptions(vector& value) const { if (ServiceDescriptions_isNULL==true) return NOT_FOUND; value = ServiceDescriptions; return OK; } int setServiceDescriptions(const vector& newValue) { ServiceDescriptions = newValue; ServiceDescriptions_isNULL = false; return OK; } int getLockPresent(bool& value) const { if (LockPresent_isNULL==true) return NOT_FOUND; value = LockPresent; return OK; } int setLockPresent(const bool& newValue) { LockPresent = newValue; LockPresent_isNULL = false; return OK; } int getAudibleAlarm(bool& value) const { if (AudibleAlarm_isNULL==true) return NOT_FOUND; value = AudibleAlarm; return OK; } int setAudibleAlarm(const bool& newValue) { AudibleAlarm = newValue; AudibleAlarm_isNULL = false; return OK; } int getVisibleAlarm(bool& value) const { if (VisibleAlarm_isNULL==true) return NOT_FOUND; value = VisibleAlarm; return OK; } int setVisibleAlarm(const bool& newValue) { VisibleAlarm = newValue; VisibleAlarm_isNULL = false; return OK; } int getSecurityBreach(unsigned short& value) const { if (SecurityBreach_isNULL==true) return NOT_FOUND; value = SecurityBreach; return OK; } int setSecurityBreach(const unsigned short& newValue) { SecurityBreach = newValue; SecurityBreach_isNULL = false; return OK; } int getBreachDescription(string& value) const { if (BreachDescription_isNULL==true) return NOT_FOUND; value = BreachDescription; return OK; } int setBreachDescription(const string& newValue) { BreachDescription = newValue; BreachDescription_isNULL = false; return OK; } int getIsLocked(bool& value) const { if (IsLocked_isNULL==true) return NOT_FOUND; value = IsLocked; return OK; } int setIsLocked(const bool& newValue) { IsLocked = newValue; IsLocked_isNULL = false; return OK; } int getHeight(float& value) const { if (Height_isNULL==true) return NOT_FOUND; value = Height; return OK; } int setHeight(const float& newValue) { Height = newValue; Height_isNULL = false; return OK; } int getTypeOfRack(unsigned short& value) const { if (TypeOfRack_isNULL==true) return NOT_FOUND; value = TypeOfRack; return OK; } int setTypeOfRack(const unsigned short& newValue) { TypeOfRack = newValue; TypeOfRack_isNULL = false; return OK; } int getCountryDesignation(string& value) const { if (CountryDesignation_isNULL==true) return NOT_FOUND; value = CountryDesignation; return OK; } int setCountryDesignation(const string& newValue) { CountryDesignation = newValue; CountryDesignation_isNULL = false; return OK; } }; class OpenDRIM_Rack_IsCompatible_In { public: Objectpath ElementToCheck; bool ElementToCheck_isNULL; OpenDRIM_Rack_IsCompatible_In() { ElementToCheck_isNULL = true; } ~OpenDRIM_Rack_IsCompatible_In() {} int getElementToCheck(Objectpath& value) const { if (ElementToCheck_isNULL == true) return NOT_FOUND; value = ElementToCheck; return OK; } int setElementToCheck(const Objectpath& newValue) { ElementToCheck = newValue; ElementToCheck_isNULL = false; return OK; } }; #endif /*OPENDRIM_RACK_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Rack/OpenDRIM_RackProvider.cpp0000644000175000017500000003134311377667226027516 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_Rack.h" #include "OpenDRIM_RackAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_RackProviderSetInstance PhysicalAsset_OpenDRIM_RackProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_Rack_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_Rack_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_RackProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_Rack_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RackProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Rack_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Rack_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_Rack_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RackProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_Rack_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Rack_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_Rack_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RackProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Rack instance; PhysicalAsset_OpenDRIM_Rack_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Rack_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Rack_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_Rack_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RackProviderSetInstance(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_Rack newInstance, oldInstance; PhysicalAsset_OpenDRIM_Rack_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_Rack_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Rack_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Rack_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Rack_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Rack_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RackProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Rack instance; PhysicalAsset_OpenDRIM_Rack_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Rack_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_Rack_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Rack_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Rack_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Rack_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Rack_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_Rack_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RackProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_Rack instance; PhysicalAsset_OpenDRIM_Rack_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Rack_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Rack_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_Rack_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Rack_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RackProviderExecQuery(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 PhysicalAsset_OpenDRIM_RackProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_Rack_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_RackProviderInvokeMethod(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_Rack instance; PhysicalAsset_OpenDRIM_Rack_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"CreationClassName", "Tag"}; int errorCode = PhysicalAsset_OpenDRIM_Rack_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Rack_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="IsCompatible") { unsigned int returnValue; OpenDRIM_Rack_IsCompatible_In inArgs; PhysicalAsset_OpenDRIM_Rack_toCPP(_broker, in, inArgs); errorCode = PhysicalAsset_OpenDRIM_Rack_IsCompatible(_broker, ctx, instance, returnValue, inArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_Rack_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_Rack_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 PhysicalAsset_OpenDRIM_Rack_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Rack_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_Rack_init FAILED: " + (string) OpenDRIM_Rack_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_Rack_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_Rack_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_Rack_unload FAILED: " + (string) OpenDRIM_Rack_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_Rack_INIT if (PhysicalAsset_OpenDRIM_Rack_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_RackProvider, PhysicalAsset_OpenDRIM_RackProvider, _broker, PhysicalAsset_OpenDRIM_Rack_INIT); CMMethodMIStub(PhysicalAsset_OpenDRIM_RackProvider, PhysicalAsset_OpenDRIM_RackProvider, _broker, PhysicalAsset_OpenDRIM_Rack_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Rack/OpenDRIM_RackAccess.h0000644000175000017500000000573011377667226026573 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_RACKACCESS_H_ #define OPENDRIM_RACKACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_Rack.h" int PhysicalAsset_OpenDRIM_Rack_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_Rack_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_Rack_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_Rack_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Rack& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_Rack_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Rack& newInstance, const OpenDRIM_Rack& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_Rack_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Rack& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_Rack_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Rack& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_Rack_IsCompatible(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Rack& instance, unsigned int& returnValue, const OpenDRIM_Rack_IsCompatible_In& in, string& errorMessage); int PhysicalAsset_OpenDRIM_Rack_populate(OpenDRIM_Rack& instance, string& errorMessage); #endif /*OPENDRIM_RACKACCESS_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Rack/OpenDRIM_RackAccess.cpp0000644000175000017500000000625211377667226027126 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_RackAccess.h" int PhysicalAsset_OpenDRIM_Rack_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Rack_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Rack_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_Rack_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_Rack& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int PhysicalAsset_OpenDRIM_Rack_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Rack& newInstance, const OpenDRIM_Rack& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Rack_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Rack& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Rack_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Rack& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_Rack_IsCompatible(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_Rack& instance, unsigned int& returnValue, const OpenDRIM_Rack_IsCompatible_In& in, string& errorMessage) { _E_; // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_Rack_populate(OpenDRIM_Rack& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_Rack/cmpiOpenDRIM_Rack.h0000644000175000017500000000430411377667226026316 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_RACK_H_ #define CMPIOPENDRIM_RACK_H_ #include "OpenDRIM_Rack.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_Rack_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Rack& instance); CMPIInstance* PhysicalAsset_OpenDRIM_Rack_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Rack& instance); void PhysicalAsset_OpenDRIM_Rack_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Rack& instance); void PhysicalAsset_OpenDRIM_Rack_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Rack& instance); void PhysicalAsset_OpenDRIM_Rack_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_Rack_IsCompatible_In& args); #endif /*CMPIOPENDRIM_RACK_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/0000755000175000017500000000000011377667226026440 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/OpenDRIM_PhysicalElementPackageProvider.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/OpenDRIM_PhysicalElementPackage0000644000175000017500000004324711377667226034374 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalElementPackage.h" #include "OpenDRIM_PhysicalElementPackageAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderSetInstance PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderModifyInstance #endif int PhysicalAsset_OpenDRIM_PhysicalElementPackage_init(const CMPIBroker* broker); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderEnumInstances(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 = PhysicalAsset_OpenDRIM_PhysicalElementPackage_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalElementPackage instance; PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderSetInstance(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_PhysicalElementPackage newInstance, oldInstance; PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCPP(_broker, ci, newInstance); PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalElementPackage instance; PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCPP(_broker, ci, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_PhysicalElementPackage instance; PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCPP(_broker, cop, instance); string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderExecQuery(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 PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderAssociatorNames(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 = PhysicalAsset_OpenDRIM_PhysicalElementPackage_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_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 PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderAssociators(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 = PhysicalAsset_OpenDRIM_PhysicalElementPackage_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_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 PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderReferenceNames(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 = PhysicalAsset_OpenDRIM_PhysicalElementPackage_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus PhysicalAsset_OpenDRIM_PhysicalElementPackageProviderReferences(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 = PhysicalAsset_OpenDRIM_PhysicalElementPackage_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int PhysicalAsset_OpenDRIM_PhysicalElementPackage_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalElementPackage_init FAILED: " + (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementPackage_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = PhysicalAsset_OpenDRIM_PhysicalElementPackage_unload(errorMessage); if (errorCode != OK) { errorMessage += "PhysicalAsset_OpenDRIM_PhysicalElementPackage_unload FAILED: " + (string) OpenDRIM_PhysicalElementPackage_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define PhysicalAsset_OpenDRIM_PhysicalElementPackage_INIT if (PhysicalAsset_OpenDRIM_PhysicalElementPackage_init(_broker) < 0) return NULL CMInstanceMIStub(PhysicalAsset_OpenDRIM_PhysicalElementPackageProvider, PhysicalAsset_OpenDRIM_PhysicalElementPackageProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalElementPackage_INIT); CMAssociationMIStub(PhysicalAsset_OpenDRIM_PhysicalElementPackageProvider, PhysicalAsset_OpenDRIM_PhysicalElementPackageProvider, _broker, PhysicalAsset_OpenDRIM_PhysicalElementPackage_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/Makefile.am0000644000175000017500000000507111377667226030477 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiPhysicalAsset_OpenDRIM_PhysicalElementPackageProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalElementPackageProvider_la_SOURCES = OpenDRIM_PhysicalElementPackageAccess.cpp OpenDRIM_PhysicalElementPackageProvider.cpp cmpiOpenDRIM_PhysicalElementPackage.cpp assocOpenDRIM_PhysicalElementPackage.cpp # May have to be adjusted for direct invocation libcmpiPhysicalAsset_OpenDRIM_PhysicalElementPackageProvider_la_CPPFLAGS = -I../CIM_PhysicalElement -I../CIM_PhysicalPackage # Uncomment the end for direct invocation, may have to be adjusted libcmpiPhysicalAsset_OpenDRIM_PhysicalElementPackageProvider_la_LIBADD = ../Common/libcmpiPhysicalAsset_Common.la #../CIM_PhysicalElement/libcmpiPhysicalAsset_CIM_PhysicalElementProvider.la ../CIM_PhysicalPackage/libcmpiPhysicalAsset_CIM_PhysicalPackageProvider.la libcmpiPhysicalAsset_OpenDRIM_PhysicalElementPackageProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_PhysicalElementPackage.h OpenDRIM_PhysicalElementPackage.h OpenDRIM_PhysicalElementPackageAccess.h ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/cmpiOpenDRIM_PhysicalElementPackage.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/cmpiOpenDRIM_PhysicalElementPac0000644000175000017500000000671511377667226034414 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "cmpiOpenDRIM_PhysicalElementPackage.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalElementPackage& instance) { _E_; Objectpath op(broker, OpenDRIM_PhysicalElementPackage_classnames[0], OpenDRIM_PhysicalElementPackage_NAMESPACE); if (!instance.GroupComponent_isNULL) op.addKey("GroupComponent", instance.GroupComponent); if (!instance.PartComponent_isNULL) op.addKey("PartComponent", instance.PartComponent); _L_; return op.getHdl(); } CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalElementPackage& instance) { _E_; Objectpath op(broker, PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.LocationWithinContainer_isNULL) ci.setProperty("LocationWithinContainer", instance.LocationWithinContainer); _L_; return ci.getHdl(); } void PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalElementPackage& 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 PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalElementPackage& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("GroupComponent", instance.GroupComponent) == OK) instance.GroupComponent_isNULL = false; if (inst.getProperty("PartComponent", instance.PartComponent) == OK) instance.PartComponent_isNULL = false; if (inst.getProperty("LocationWithinContainer", instance.LocationWithinContainer) == OK) instance.LocationWithinContainer_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/OpenDRIM_PhysicalElementPackageAccess.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/OpenDRIM_PhysicalElementPackage0000644000175000017500000002614711377667226034374 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "OpenDRIM_PhysicalElementPackageAccess.h" int PhysicalAsset_OpenDRIM_PhysicalElementPackage_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_PhysicalElement_load(broker, errorMessage)); CF_assert(PhysicalAsset_CIM_PhysicalPackage_load(broker, errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementPackage_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(PhysicalAsset_CIM_PhysicalElement_unload(errorMessage)); CF_assert(PhysicalAsset_CIM_PhysicalPackage_unload(errorMessage)); */ // TODO _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementPackage_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 PhysicalAsset_OpenDRIM_PhysicalElementPackage_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(PhysicalAsset_OpenDRIM_PhysicalElementPackage_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(PhysicalAsset_OpenDRIM_PhysicalElementPackage_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; PhysicalAsset_OpenDRIM_PhysicalElementPackage_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(PhysicalAsset_OpenDRIM_PhysicalElementPackage_referencePartComponentToGroupComponent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementPackage_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalElementPackage& 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(PhysicalAsset_OpenDRIM_PhysicalElementPackage_getPartComponent(broker, ctx, PartComponent_objectpath, PartComponent_instance, NULL, errorMessage)); Objectpath GroupComponent_objectpath; instance.getGroupComponent(GroupComponent_objectpath); Instance GroupComponent_instance; CF_assert(PhysicalAsset_OpenDRIM_PhysicalElementPackage_getGroupComponent(broker, ctx, GroupComponent_objectpath, GroupComponent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(PhysicalAsset_OpenDRIM_PhysicalElementPackage_isAssociated(PartComponent_instance, GroupComponent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(PhysicalAsset_OpenDRIM_PhysicalElementPackage_populate(instance, errorMessage)); _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementPackage_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalElementPackage& newInstance, const OpenDRIM_PhysicalElementPackage& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalElementPackage_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalElementPackage& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalElementPackage_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalElementPackage& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int PhysicalAsset_OpenDRIM_PhysicalElementPackage_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(PhysicalAsset_OpenDRIM_PhysicalElementPackage_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_PhysicalElementPackage_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(PhysicalAsset_OpenDRIM_PhysicalElementPackage_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(PhysicalAsset_OpenDRIM_PhysicalElementPackage_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(PhysicalAsset_OpenDRIM_PhysicalElementPackage_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(PhysicalAsset_OpenDRIM_PhysicalElementPackage_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); } for (size_t i=0; i& GroupComponent_instances, vector& OpenDRIM_PhysicalElementPackage_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_PhysicalElementPackage instance; instance.setPartComponent(((Instance) PartComponent_instance).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(PhysicalAsset_OpenDRIM_PhysicalElementPackage_populate(instance, errorMessage)); } OpenDRIM_PhysicalElementPackage_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementPackage_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_PhysicalElementPackage_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_PhysicalElementPackage instance; instance.setPartComponent(((Instance) PartComponent_instances[i]).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instance).getObjectpath()); if (discriminant == "r") { CF_assert(PhysicalAsset_OpenDRIM_PhysicalElementPackage_populate(instance, errorMessage)); } OpenDRIM_PhysicalElementPackage_instances.push_back(instance); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementPackage_populate(OpenDRIM_PhysicalElementPackage& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/OpenDRIM_PhysicalElementPackage.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/OpenDRIM_PhysicalElementPackage0000644000175000017500000000776311377667226034377 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALELEMENTPACKAGE_H_ #define OPENDRIM_PHYSICALELEMENTPACKAGE_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_PhysicalElement.h" #include "CIM_PhysicalElementAccess.h" #include "cmpiCIM_PhysicalPackage.h" #include "CIM_PhysicalPackageAccess.h" */ const static char* OpenDRIM_PhysicalElementPackage_classnames[] = {"OpenDRIM_PhysicalElementPackage"}; static string OpenDRIM_PhysicalElementPackage_NAMESPACE = _NAMESPACE; const static string PartComponent_role = "PartComponent"; const static char* PartComponent_classnames[] = {"CIM_PhysicalElement"}; const static string PartComponent_NAMESPACE = _NAMESPACE; const static string GroupComponent_role = "GroupComponent"; const static char* GroupComponent_classnames[] = {"CIM_PhysicalPackage"}; const static string GroupComponent_NAMESPACE = _NAMESPACE; class OpenDRIM_PhysicalElementPackage { public: Objectpath GroupComponent; bool GroupComponent_isNULL; Objectpath PartComponent; bool PartComponent_isNULL; string LocationWithinContainer; bool LocationWithinContainer_isNULL; OpenDRIM_PhysicalElementPackage() { GroupComponent_isNULL = true; PartComponent_isNULL = true; LocationWithinContainer_isNULL = true; } ~OpenDRIM_PhysicalElementPackage() {} string getKeys() const { return CF_toLowCase(".GroupComponent=\"" + CF_quoteString(GroupComponent.toString()) + "\""".PartComponent=\"" + CF_quoteString(PartComponent.toString()) + "\""); } int getGroupComponent(Objectpath& value) const { if (GroupComponent_isNULL==true) return NOT_FOUND; value = GroupComponent; return OK; } int setGroupComponent(const Objectpath& newValue) { GroupComponent = newValue; GroupComponent.setNamespace(GroupComponent_NAMESPACE); GroupComponent_isNULL = false; return OK; } int getPartComponent(Objectpath& value) const { if (PartComponent_isNULL==true) return NOT_FOUND; value = PartComponent; return OK; } int setPartComponent(const Objectpath& newValue) { PartComponent = newValue; PartComponent.setNamespace(PartComponent_NAMESPACE); PartComponent_isNULL = false; return OK; } int getLocationWithinContainer(string& value) const { if (LocationWithinContainer_isNULL==true) return NOT_FOUND; value = LocationWithinContainer; return OK; } int setLocationWithinContainer(const string& newValue) { LocationWithinContainer = newValue; LocationWithinContainer_isNULL = false; return OK; } }; #endif /*OPENDRIM_PHYSICALELEMENTPACKAGE_H_*/ ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/OpenDRIM_PhysicalElementPackageAccess.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/OpenDRIM_PhysicalElementPackage0000644000175000017500000001100011377667226034352 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef OPENDRIM_PHYSICALELEMENTPACKAGEACCESS_H_ #define OPENDRIM_PHYSICALELEMENTPACKAGEACCESS_H_ #include "PhysicalAsset_Common.h" #include "OpenDRIM_PhysicalElementPackage.h" #include "assocOpenDRIM_PhysicalElementPackage.h" int PhysicalAsset_OpenDRIM_PhysicalElementPackage_load(const CMPIBroker* broker, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_unload(string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_PhysicalElementPackage& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalElementPackage& newInstance, const OpenDRIM_PhysicalElementPackage& oldInstance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalElementPackage& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_PhysicalElementPackage& instance, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_associatorPartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const char** properties, vector& GroupComponent_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_associatorGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const char** properties, vector& PartComponent_associatedInstances, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_referencePartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const vector& GroupComponent_instances, vector& OpenDRIM_PhysicalElementPackage_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_PhysicalElementPackage_instances, const char** properties, string& errorMessage, const string& discriminant); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_populate(OpenDRIM_PhysicalElementPackage& instance, string& errorMessage); #endif /*OPENDRIM_PHYSICALELEMENTPACKAGEACCESS_H_*/ ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/assocOpenDRIM_PhysicalElementPackage.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/assocOpenDRIM_PhysicalElementPa0000644000175000017500000000633211377667226034424 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_PHYSICALELEMENTPACKAGE_H_ #define ASSOCOPENDRIM_PHYSICALELEMENTPACKAGE_H_ #include "OpenDRIM_PhysicalElementPackageAccess.h" int PhysicalAsset_OpenDRIM_PhysicalElementPackage_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 PhysicalAsset_OpenDRIM_PhysicalElementPackage_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 PhysicalAsset_OpenDRIM_PhysicalElementPackage_enumeratePartComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_getPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_enumerateGroupComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int PhysicalAsset_OpenDRIM_PhysicalElementPackage_getGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_PHYSICALELEMENTPACKAGE_H_*/ ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/assocOpenDRIM_PhysicalElementPackage.cppopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/assocOpenDRIM_PhysicalElementPa0000644000175000017500000002151211377667226034421 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #include "assocOpenDRIM_PhysicalElementPackage.h" int PhysicalAsset_OpenDRIM_PhysicalElementPackage_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 = PhysicalAsset_OpenDRIM_PhysicalElementPackage_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(PhysicalAsset_OpenDRIM_PhysicalElementPackage_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(PhysicalAsset_OpenDRIM_PhysicalElementPackage_associatorGroupComponentToPartComponent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementPackage_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(PhysicalAsset_CIM_PhysicalElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_PhysicalElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_PhysicalElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementPackage_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_PhysicalElement _instance; PhysicalAsset_CIM_PhysicalElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_PhysicalElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_PhysicalElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementPackage_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(PhysicalAsset_CIM_PhysicalPackage_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(PhysicalAsset_CIM_PhysicalPackage_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, PhysicalAsset_CIM_PhysicalPackage_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int PhysicalAsset_OpenDRIM_PhysicalElementPackage_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_PhysicalPackage _instance; PhysicalAsset_CIM_PhysicalPackage_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(PhysicalAsset_CIM_PhysicalPackage_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, PhysicalAsset_CIM_PhysicalPackage_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/cmpiOpenDRIM_PhysicalElementPackage.hopendrim-lmp-physicalasset-0.1.2~ppa/OpenDRIM_PhysicalElementPackage/cmpiOpenDRIM_PhysicalElementPac0000644000175000017500000000444011377667226034405 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Physical Asset provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by , , ###############################################################################*/ #ifndef CMPIOPENDRIM_PHYSICALELEMENTPACKAGE_H_ #define CMPIOPENDRIM_PHYSICALELEMENTPACKAGE_H_ #include "OpenDRIM_PhysicalElementPackage.h" CMPIObjectPath* PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_PhysicalElementPackage& instance); CMPIInstance* PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_PhysicalElementPackage& instance); void PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_PhysicalElementPackage& instance); void PhysicalAsset_OpenDRIM_PhysicalElementPackage_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_PhysicalElementPackage& instance); #endif /*CMPIOPENDRIM_PHYSICALELEMENTPACKAGE_H_*/ opendrim-lmp-physicalasset-0.1.2~ppa/README0000644000175000017500000000103311377667226021316 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!