From eddd9e5d1b97be919e7cad7a62bc7316898f4a68 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Fri, 26 Jul 2013 13:16:49 +0200 Subject: Register profile for LMI_Fan provider --- mof/60_LMI_Fan.mof | 2 +- openlmi-providers.spec | 10 +++++++++ src/fan/90_LMI_Fan_Profile.mof.skel | 41 +++++++++++++++++++++++++++++++++++++ src/fan/CMakeLists.txt | 4 +++- 4 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 src/fan/90_LMI_Fan_Profile.mof.skel 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 */ -[ 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/) -- cgit