summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2013-07-26 13:16:49 +0200
committerJan Safranek <jsafrane@redhat.com>2013-07-26 13:16:49 +0200
commiteddd9e5d1b97be919e7cad7a62bc7316898f4a68 (patch)
tree49df652c71ef42c27ab387451f244b6ae1720dbe
parent303c42d5a19cdbfa833ccb07babed3404c140d01 (diff)
downloadopenlmi-providers-eddd9e5d1b97be919e7cad7a62bc7316898f4a68.tar.gz
openlmi-providers-eddd9e5d1b97be919e7cad7a62bc7316898f4a68.tar.xz
openlmi-providers-eddd9e5d1b97be919e7cad7a62bc7316898f4a68.zip
Register profile for LMI_Fan provider
-rw-r--r--mof/60_LMI_Fan.mof2
-rw-r--r--openlmi-providers.spec10
-rw-r--r--src/fan/90_LMI_Fan_Profile.mof.skel41
-rw-r--r--src/fan/CMakeLists.txt4
4 files changed, 55 insertions, 2 deletions
diff --git a/mof/60_LMI_Fan.mof b/mof/60_LMI_Fan.mof
index 3c964cf..2644eaf 100644
--- a/mof/60_LMI_Fan.mof
+++ b/mof/60_LMI_Fan.mof
@@ -18,7 +18,7 @@
* Authors: Michal Minar <miminar@redhat.com>
*/
-[ Provider("cmpi:cmpiLMI_Fan") ]
+[ Version("0.1.0"), Provider("cmpi:cmpiLMI_Fan") ]
class LMI_Fan: CIM_Fan
{
[ Key, Override("DeviceID"),
diff --git a/openlmi-providers.spec b/openlmi-providers.spec
index b1fe5b5..8f3870a 100644
--- a/openlmi-providers.spec
+++ b/openlmi-providers.spec
@@ -278,6 +278,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/%{name}
%{_libdir}/cmpi/libcmpiLMI_Fan.so
%{_datadir}/%{name}/60_LMI_Fan.mof
%{_datadir}/%{name}/60_LMI_Fan.reg
+%{_datadir}/%{name}/90_LMI_Fan_Profile.mof
%files -n openlmi-powermanagement
%doc README COPYING
@@ -428,6 +429,9 @@ if [ "$1" -gt 1 ]; then
%{_datadir}/%{name}/60_LMI_Fan.mof \
%{_datadir}/%{name}/60_LMI_Fan.reg \
> /dev/null 2>&1 || :;
+ %{_bindir}/openlmi-mof-register --just-mofs -n root/interop unregister \
+ %{_datadir}/%{name}/90_LMI_Fan_Profile.mof \
+ > /dev/null 2>&1 || :;
fi
%pre -n openlmi-powermanagement
@@ -525,6 +529,9 @@ if [ "$1" -ge 1 ]; then
%{_datadir}/%{name}/60_LMI_Fan.mof \
%{_datadir}/%{name}/60_LMI_Fan.reg \
> /dev/null 2>&1 || :;
+ %{_bindir}/openlmi-mof-register --just-mofs -n root/interop register \
+ %{_datadir}/%{name}/90_LMI_Fan_Profile.mof \
+ > /dev/null 2>&1 || :;
fi
%post -n openlmi-powermanagement
@@ -622,6 +629,9 @@ if [ "$1" -eq 0 ]; then
%{_datadir}/%{name}/60_LMI_Fan.mof \
%{_datadir}/%{name}/60_LMI_Fan.reg \
> /dev/null 2>&1 || :;
+ %{_bindir}/openlmi-mof-register --just-mofs -n root/interop unregister \
+ %{_datadir}/%{name}/90_LMI_Fan_Profile.mof \
+ > /dev/null 2>&1 || :;
fi
%preun -n openlmi-powermanagement
diff --git a/src/fan/90_LMI_Fan_Profile.mof.skel b/src/fan/90_LMI_Fan_Profile.mof.skel
new file mode 100644
index 0000000..e8d89f2
--- /dev/null
+++ b/src/fan/90_LMI_Fan_Profile.mof.skel
@@ -0,0 +1,41 @@
+instance of PG_ProviderProfileCapabilities
+{
+ CapabilityID = "@CLASS@";
+
+ ProviderModuleName = "cmpiLMI_Fan";
+
+ ProviderName = "@CLASS@";
+
+ RegisteredProfile = 0;
+
+ OtherRegisteredProfile = "OpenLMI-Fan";
+ OtherProfileOrganization = "OpenLMI";
+
+ ProfileVersion = "@VERSION@";
+
+ ConformingElements = {
+ "@CLASS@"
+ };
+ RegisteredSubProfiles = {};
+};
+
+instance of PG_ProviderProfileCapabilities
+{
+ CapabilityID = "DMTF_@CLASS@";
+
+ ProviderModuleName = "cmpiLMI_Fan";
+
+ ProviderName = "@CLASS@";
+
+ RegisteredProfile = 0;
+
+ OtherRegisteredProfile = "Fan";
+ OtherProfileOrganization = "DMTF";
+
+ ProfileVersion = "1.0.1";
+
+ ConformingElements = {
+ "@CLASS@"
+ };
+ RegisteredSubProfiles = {};
+};
diff --git a/src/fan/CMakeLists.txt b/src/fan/CMakeLists.txt
index a5324f7..0028997 100644
--- a/src/fan/CMakeLists.txt
+++ b/src/fan/CMakeLists.txt
@@ -26,6 +26,8 @@ target_link_libraries(${LIBRARY_NAME} openlmicommon ${KONKRETCMPI_LIBRARIES} sen
# Create registration file
cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers)
+set(TARGET_MOF "${CMAKE_BINARY_DIR}/mof/90_LMI_Fan_Profile.mof")
+profile_mof_generate("90_LMI_Fan_Profile.mof.skel" "${TARGET_MOF}" "${CIM_CLASSES}")
install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi/)
-
+install(FILES ${TARGET_MOF} DESTINATION share/openlmi-providers/)