summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-07-26 13:07:32 +0200
committerMichal Minar <miminar@redhat.com>2013-07-26 15:12:38 +0200
commite119dc8c4c3fa2a3798d123356449b10e3a0ab66 (patch)
tree0d8dcbe0d9dd106ad673d62fae0d685c98d41f56
parent64fd6cfeabb250a8ea162de7b3babb4b0febefb5 (diff)
downloadopenlmi-providers-e119dc8c4c3fa2a3798d123356449b10e3a0ab66.tar.gz
openlmi-providers-e119dc8c4c3fa2a3798d123356449b10e3a0ab66.tar.xz
openlmi-providers-e119dc8c4c3fa2a3798d123356449b10e3a0ab66.zip
software: added profile registration mof skeleton
created single instance of PG_ProviderProfileCapabilities with the following DMTF subprofiles: * Job Control * Software Identity * Software Update skeleton is parsed with cmake, which sets the VERSION and writes it to mof/ directory
-rw-r--r--CMakeLists.txt1
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/software/90_LMI_Software_Profile.mof.skel77
-rw-r--r--src/software/CMakeLists.txt9
4 files changed, 91 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ed4fd27..cb4ea5e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,6 +27,7 @@ option(WITH-HARDWARE "Build hardware provider" ON)
option(WITH-LOGICALFILE "Build logical file provider" ON)
option(WITH-REALMD "Build RealmD provider" ON)
option(WITH-INDMANAGER "Build indication manager" ON)
+option(WITH-SOFTWARE "Build software provider" ON)
# Set path to custom cmake modules
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 27bd416..a9dc85d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -48,3 +48,7 @@ endif (WITH-REALMD)
if (WITH-INDMANAGER)
add_subdirectory(indmanager)
endif (WITH-INDMANAGER)
+
+if (WITH-SOFTWARE)
+ add_subdirectory(software)
+endif (WITH-SOFTWARE)
diff --git a/src/software/90_LMI_Software_Profile.mof.skel b/src/software/90_LMI_Software_Profile.mof.skel
new file mode 100644
index 0000000..933cb27
--- /dev/null
+++ b/src/software/90_LMI_Software_Profile.mof.skel
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Authors: Michal Minar <miminar@redhat.com>
+ */
+
+instance of PG_ProviderProfileCapabilities
+{
+ CapabilityID = "LMI_SoftwareInventory";
+ ProviderModuleName = "pycmpiLMI_Software";
+ ProviderName = "/usr/lib/python2.7/site-packages/lmi/software/cimom_entry.py";
+ RegisteredProfile = 0;
+ OtherRegisteredProfile = "OpenLMI-Software";
+ OtherProfileOrganization = "OpenLMI";
+ ProfileVersion = "@VERSION@";
+
+ RegisteredSubProfiles = {
+ 0,
+ 3017,
+ 3019
+ };
+
+ SubProfileVersions = {
+ "1.0.0",
+ "1.0.1",
+ "1.0.0"
+ };
+
+ OtherRegisteredSubProfiles = {
+ "Job Control",
+ "Software Inventory",
+ "Software Update"
+ };
+
+ OtherSubProfileOrganizations = {
+ "DMTF",
+ "DMTF",
+ "DMTF"
+ };
+
+ ConformingElements = {
+ "LMI_SoftwareIdentity",
+ "LMI_InstalledSoftwareIdentity",
+ "LMI_SystemSoftwareCollection",
+ "LMI_HostedSoftwareCollection",
+ "LMI_MemberOfSoftwareCollection",
+ "LMI_SoftwareIdentityResource",
+ "LMI_ResourceForSoftwareIdentity",
+ "LMI_HostedSoftwareIdentityResource",
+ "LMI_HostedSoftwareInstallationService",
+ "LMI_SoftwareInstallationService",
+ "LMI_AssociatedSoftwareInstallationServiceCapabilities",
+ "LMI_SoftwareInstallationServiceCapabilities",
+ "LMI_SoftwareInstallationServiceAffectsElement",
+ "LMI_SoftwareJob",
+ "LMI_SoftwareInstallationJob",
+ "LMI_SoftwareVerificationJob",
+ "LMI_SoftwareMethodResult",
+ "LMI_OwningSoftwareJobElement",
+ "LMI_AffectedSoftwareJobElement",
+ "LMI_AssociatedSoftwareJobMethodResult"
+ };
+};
diff --git a/src/software/CMakeLists.txt b/src/software/CMakeLists.txt
new file mode 100644
index 0000000..7b2c670
--- /dev/null
+++ b/src/software/CMakeLists.txt
@@ -0,0 +1,9 @@
+SET(TARGET_MOF "${CMAKE_BINARY_DIR}/mof/90_LMI_Software_Profiler.mof")
+SET(SKEL_MOF "90_LMI_Software_Profile.mof.skel")
+SET(INSTANCE_SKEL "")
+
+file(READ "${SKEL_MOF}" INSTANCE_SKEL)
+file(WRITE "${TARGET_MOF}" "")
+string(REPLACE "\@VERSION\@" ${OPENLMI_VERSION} INSTANCE "${INSTANCE_SKEL}")
+file(APPEND "${TARGET_MOF}" "${INSTANCE}")
+message(STATUS "Generated profile mof ${OUT_MOF}")