From e5c8ae992dfaff13a1d29624464cce935373c0fb Mon Sep 17 00:00:00 2001 From: Jan Synacek Date: Fri, 26 Jul 2013 10:33:03 +0200 Subject: realmd: add profile registration and class versioning in mof --- mof/60_LMI_Realmd.mof | 6 ++++-- openlmi-providers.spec | 9 +++++++++ src/realmd/90_LMI_Realmd_Profile.mof.skel | 20 ++++++++++++++++++++ src/realmd/CMakeLists.txt | 4 ++++ 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 src/realmd/90_LMI_Realmd_Profile.mof.skel diff --git a/mof/60_LMI_Realmd.mof b/mof/60_LMI_Realmd.mof index 696a1e6..ef371d6 100644 --- a/mof/60_LMI_Realmd.mof +++ b/mof/60_LMI_Realmd.mof @@ -1,4 +1,5 @@ -[ Description ( +[ Version("0.1.0"), + Description ( "Access to the Realmd Service. " "Realmd is used to discover realms available for joining as well as " "providing a mechanism for joining and leaving a realm."), @@ -67,7 +68,8 @@ class LMI_RealmdService : CIM_Service string OptionValues[]); }; -[ Association, +[ Version("0.1.0"), + Association, Provider("cmpi:cmpiLMI_Realmd") ] class LMI_HostedRealmdService: CIM_HostedService { diff --git a/openlmi-providers.spec b/openlmi-providers.spec index 91149b1..b1fe5b5 100644 --- a/openlmi-providers.spec +++ b/openlmi-providers.spec @@ -495,6 +495,9 @@ if [ "$1" -gt 1 ]; then %{_datadir}/%{name}/60_LMI_Realmd.mof \ %{_datadir}/%{name}/60_LMI_Realmd.reg \ > /dev/null 2>&1 || :; + %{_bindir}/openlmi-mof-register --just-mofs -n root/interop unregister \ + %{_datadir}/%{name}/90_LMI_Realmd_Profile.mof \ + > /dev/null 2>&1 || :; fi @@ -590,6 +593,9 @@ if [ "$1" -gt 1 ]; then %{_datadir}/%{name}/60_LMI_Realmd.mof \ %{_datadir}/%{name}/60_LMI_Realmd.reg \ > /dev/null 2>&1 || :; + %{_bindir}/openlmi-mof-register --just-mofs -n root/interop register \ + %{_datadir}/%{name}/90_LMI_Realmd_Profile.mof \ + > /dev/null 2>&1 || :; fi %post -n openlmi-hardware @@ -683,6 +689,9 @@ if [ "$1" -gt 1 ]; then %{_datadir}/%{name}/60_LMI_Realmd.mof \ %{_datadir}/%{name}/60_LMI_Realmd.reg \ > /dev/null 2>&1 || :; + %{_bindir}/openlmi-mof-register --just-mofs -n root/interop unregister \ + %{_datadir}/%{name}/90_LMI_Realmd_Profile.mof \ + > /dev/null 2>&1 || :; fi %preun -n openlmi-hardware diff --git a/src/realmd/90_LMI_Realmd_Profile.mof.skel b/src/realmd/90_LMI_Realmd_Profile.mof.skel new file mode 100644 index 0000000..4b08cfc --- /dev/null +++ b/src/realmd/90_LMI_Realmd_Profile.mof.skel @@ -0,0 +1,20 @@ +instance of PG_ProviderProfileCapabilities +{ + CapabilityID = "@CLASS@"; + + ProviderModuleName = "cmpiLMI_Realmd"; + + ProviderName = "@CLASS@"; + + RegisteredProfile = 0; + + OtherRegisteredProfile = "OpenLMI-Realmd"; + OtherProfileOrganization = "OpenLMI"; + + ProfileVersion = "@VERSION@"; + + ConformingElements = { + "@CLASS@" + }; +}; + diff --git a/src/realmd/CMakeLists.txt b/src/realmd/CMakeLists.txt index 545933c..4552382 100644 --- a/src/realmd/CMakeLists.txt +++ b/src/realmd/CMakeLists.txt @@ -45,4 +45,8 @@ target_link_libraries(${LIBRARY_NAME} # Create registration file cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers) +set(TARGET_MOF "${CMAKE_BINARY_DIR}/mof/90_LMI_Realmd_Profile.mof") +profile_mof_generate("90_LMI_Realmd_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