[Libvirt-cim] [PATCH 5 of 5] [#2]Add profile providers to the PG_InterOp namespace to fix the SLP issue

Richard Maciel rmaciel at linux.vnet.ibm.com
Fri Oct 30 01:56:00 UTC 2009


# HG changeset patch
# User Richard Maciel <rmaciel at linux.vnet.ibm.com>
# Date 1256867193 7200
# Node ID 825b858abe3035399716f9dfc280c225bd488ed9
# Parent  17a38a7407b6d896b4df5c74c8609c6452534058
[#2]Add profile providers to the PG_InterOp namespace to fix the SLP issue

#2:
  Adding providers to the PG_InterOp namespace is only needed when the CIMOM is Pegasus

Signed-off-by: Richard Maciel <rmaciel at linux.vnet.ibm.com>

diff -r 17a38a7407b6 -r 825b858abe30 Makefile.am
--- a/Makefile.am	Thu Oct 29 23:46:00 2009 -0200
+++ b/Makefile.am	Thu Oct 29 23:46:33 2009 -0200
@@ -71,6 +71,11 @@
 	schema/ReferencedProfile.mof \
 	schema/AllocationCapabilities.mof
 
+PGINTEROP_MOFS = \
+	schema/RegisteredProfile.mof \
+	schema/ElementConformsToProfile.mof \
+	schema/ReferencedProfile.mof
+
 CIMV2_MOFS = \
 	schema/HostedResourcePool.mof \
 	schema/ElementCapabilities.mof \
@@ -138,6 +143,11 @@
 	schema/ElementConformsToProfile.registration \
 	schema/ReferencedProfile.registration
 
+PGINTEROP_REGS = \
+	schema/RegisteredProfile.registration \
+	schema/ElementConformsToProfile.registration \
+	schema/ReferencedProfile.registration
+
 CIMV2_REGS = \
 	schema/HostedResourcePool.registration \
 	schema/ElementCapabilities.registration \
@@ -154,12 +164,16 @@
              .changeset .revision 			\
 	     examples/diskpool.conf
 
+# If Pegasus isn't the CIMOM target, then remove the PG_InterOp namespace from the appropriate files
 install-data-local:
 	$(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)"
 	$(install_sh_DATA) -t "$(DESTDIR)$(pkgdatadir)" $(MOFS)
 	$(install_sh_DATA) -t "$(DESTDIR)$(pkgdatadir)" $(REGS)
 	$(install_sh_DATA) -t "$(DESTDIR)$(pkgdatadir)" $(INTEROP_MOFS)
 	$(install_sh_DATA) -t "$(DESTDIR)$(pkgdatadir)" $(INTEROP_REGS)
+	if [[ @CIMSERVER@ != pegasus ]]; then \
+	sed -i '/^# --/,/^# --!/d' $(subst schema,$(pkgdatadir), $(PGINTEROP_REGS)); \
+	fi
 
 uninstall-local:
 	@list='$(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS)'; \
@@ -178,6 +192,9 @@
 	sh provider-register.sh -v -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(subst schema,$(pkgdatadir), $(REGS)) -m $(subst schema,$(pkgdatadir), $(MOFS))
 	sh provider-register.sh -v -t @CIMSERVER@ -n root/interop -r $(subst schema,$(pkgdatadir), $(INTEROP_REGS)) -m $(subst schema,$(pkgdatadir), $(INTEROP_MOFS))
 	sh provider-register.sh -v -t @CIMSERVER@ -n root/cimv2 -r $(subst schema,$(pkgdatadir), $(CIMV2_REGS)) -m $(subst schema,$(pkgdatadir), $(CIMV2_MOFS))
+	if [[ @CIMSERVER@ = pegasus ]]; then \
+	sh provider-register.sh -v -t @CIMSERVER@ -n root/PG_InterOp -r $(subst schema,$(pkgdatadir), $(PGINTEROP_REGS)) -m $(subst schema,$(pkgdatadir), $(PGINTEROP_MOFS)); \
+	fi
 	virsh -v | grep -q '^0.3' && cp examples/diskpool.conf $(DISK_POOL_CONFIG) || true
 	mkdir -p $(INFO_STORE)
 
@@ -185,6 +202,9 @@
 	sh provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(subst schema,$(pkgdatadir), $(REGS)) -m $(subst schema,$(pkgdatadir), $(MOFS))
 	sh provider-register.sh -v -d -t @CIMSERVER@ -n root/interop -r $(subst schema,$(pkgdatadir), $(INTEROP_REGS)) -m $(subst schema,$(pkgdatadir), $(INTEROP_MOFS))
 	sh provider-register.sh -v -d -t @CIMSERVER@ -n root/cimv2 -r $(subst schema,$(pkgdatadir), $(CIMV2_REGS)) -m $(subst schema,$(pkgdatadir), $(CIMV2_MOFS))
+	if [[ @CIMSERVER@ = pegasus ]]; then \
+	sh provider-register.sh -v -d -t @CIMSERVER@ -n root/PG_InterOp -r $(subst schema,$(pkgdatadir), $(PGINTEROP_REGS)) -m $(subst schema,$(pkgdatadir), $(PGINTEROP_MOFS)); \
+	fi
 
 rpm: clean
 	@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)




More information about the Libvirt-cim mailing list