summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/modules/OpenLMIMacros.cmake1
-rw-r--r--openlmi-providers.spec15
-rw-r--r--src/logicalfile/90_LMI_LogicalFile_Profile.mof.skel20
-rw-r--r--src/logicalfile/CMakeLists.txt4
4 files changed, 39 insertions, 1 deletions
diff --git a/cmake/modules/OpenLMIMacros.cmake b/cmake/modules/OpenLMIMacros.cmake
index 18a265e..b61b31c 100644
--- a/cmake/modules/OpenLMIMacros.cmake
+++ b/cmake/modules/OpenLMIMacros.cmake
@@ -171,6 +171,7 @@ macro(profile_mof_generate SKEL_MOF OUT_MOF CIM_CLASSES)
file(READ "${SKEL_MOF}" INSTANCE_SKEL)
foreach(CLASS ${CIM_CLASSES})
string(REPLACE "\@CLASS\@" ${CLASS} INSTANCE "${INSTANCE_SKEL}")
+ string(REPLACE "\@VERSION\@" ${OPENLMI_VERSION} INSTANCE "${INSTANCE_SKEL}")
file(APPEND "${OUT_MOF}" "${INSTANCE}")
endforeach(CLASS ${CIM_CLASSES})
message(STATUS "Generated profile mof ${OUT_MOF}")
diff --git a/openlmi-providers.spec b/openlmi-providers.spec
index 9872d2c..9f79668 100644
--- a/openlmi-providers.spec
+++ b/openlmi-providers.spec
@@ -1,6 +1,6 @@
Name: openlmi-providers
Version: 0.0.25
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: Set of basic CIM providers
License: LGPLv2+
@@ -345,6 +345,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/%{name}
%{_libdir}/cmpi/libcmpiLMI_LogicalFile.so
%{_datadir}/%{name}/60_LMI_LogicalFile.mof
%{_datadir}/%{name}/60_LMI_LogicalFile.reg
+%{_datadir}/%{name}/90_LMI_LogicalFile_Profile.mof
%attr(755, root, root) %{_libexecdir}/pegasus/cmpiLMI_LogicalFile-cimprovagt
%files -n openlmi-realmd
@@ -475,6 +476,9 @@ if [ "$1" -gt 1 ]; then
%{_datadir}/%{name}/60_LMI_LogicalFile.mof \
%{_datadir}/%{name}/60_LMI_LogicalFile.reg \
> /dev/null 2>&1 || :;
+ %{_bindir}/openlmi-mof-register --just-mofs -n root/interop unregister \
+ %{_datadir}/%{name}/90_LMI_LogicalFile_Profile.mof \
+ > /dev/null 2>&1 || :;
fi
%pre -n openlmi-realmd
@@ -560,6 +564,9 @@ if [ "$1" -gt 1 ]; then
%{_datadir}/%{name}/60_LMI_LogicalFile.mof \
%{_datadir}/%{name}/60_LMI_LogicalFile.reg \
> /dev/null 2>&1 || :;
+ %{_bindir}/openlmi-mof-register --just-mofs -n root/interop register \
+ %{_datadir}/%{name}/90_LMI_LogicalFile_Profile.mof \
+ > /dev/null 2>&1 || :;
fi
%post -n openlmi-realmd
@@ -644,6 +651,9 @@ if [ "$1" -gt 1 ]; then
%{_datadir}/%{name}/60_LMI_LogicalFile.mof \
%{_datadir}/%{name}/60_LMI_LogicalFile.reg \
> /dev/null 2>&1 || :;
+ %{_bindir}/openlmi-mof-register --just-mofs -n root/interop unregister \
+ %{_datadir}/%{name}/90_LMI_LogicalFile_Profile.mof \
+ > /dev/null 2>&1 || :;
fi
%preun -n openlmi-realmd
@@ -672,6 +682,9 @@ if [ "$1" -gt 1 ]; then
fi
%changelog
+* Thu Jul 25 2013 Jan Synáček <jsynacek@redhat.com> - 0.0.25-9
+- Add logicalfile profile registration
+
* Thu Jul 25 2013 Radek Novacek <rnovacek@redhat.com> - 0.0.25-8
- Add version to mof/reg registration
diff --git a/src/logicalfile/90_LMI_LogicalFile_Profile.mof.skel b/src/logicalfile/90_LMI_LogicalFile_Profile.mof.skel
new file mode 100644
index 0000000..4ea42e0
--- /dev/null
+++ b/src/logicalfile/90_LMI_LogicalFile_Profile.mof.skel
@@ -0,0 +1,20 @@
+instance of PG_ProviderProfileCapabilities
+{
+ CapabilityID = "@CLASS@";
+
+ ProviderModuleName = "cmpiLMI_LogicalFile";
+
+ ProviderName = "@CLASS@";
+
+ RegisteredProfile = 0;
+
+ OtherRegisteredProfile = "OpenLMI-LogicalFile";
+ OtherProfileOrganization = "OpenLMI";
+
+ ProfileVersion = "@VERSION@";
+
+ ConformingElements = {
+ "@CLASS@"
+ };
+};
+
diff --git a/src/logicalfile/CMakeLists.txt b/src/logicalfile/CMakeLists.txt
index d770080..3a09a4a 100644
--- a/src/logicalfile/CMakeLists.txt
+++ b/src/logicalfile/CMakeLists.txt
@@ -35,5 +35,9 @@ target_link_libraries(${LIBRARY_NAME} openlmicommon
# Create registration file
cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers)
+set(TARGET_MOF "${CMAKE_BINARY_DIR}/mof/90_LMI_LogicalFile_Profile.mof")
+profile_mof_generate("90_LMI_LogicalFile_Profile.mof.skel" "${TARGET_MOF}" "${CIM_CLASSES}")
+
install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi)
install(PROGRAMS ${CIMPROVAGT_SCRIPT} DESTINATION libexec/pegasus)
+install(FILES ${TARGET_MOF} DESTINATION share/openlmi-providers/)