[PATCH 0 of 5] [#2] This set of patches adds the profile-relatedproviders and classes to the PG_InterOp namespace

# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1256867045 7200 # Node ID 8515da125c641f0473108dce09a423f13ac6f6ad # Parent 906a78ecf9f3e4972133c6792c1ff543cc57b493 Change Makefile.am to use installed .registration and .mof at the registration step Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> diff -r 906a78ecf9f3 -r 8515da125c64 Makefile.am --- a/Makefile.am Mon Oct 05 06:02:39 2009 -0700 +++ b/Makefile.am Thu Oct 29 23:44:05 2009 -0200 @@ -175,16 +175,16 @@ # Un/Register the providers and class definitions from/to the current CIMOM. # @CIMSERVER@ is set by the configure script postinstall: - sh provider-register.sh -v -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS) - sh provider-register.sh -v -t @CIMSERVER@ -n root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS) - sh provider-register.sh -v -t @CIMSERVER@ -n root/cimv2 -r $(CIMV2_REGS) -m $(CIMV2_MOFS) + 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)) virsh -v | grep -q '^0.3' && cp examples/diskpool.conf $(DISK_POOL_CONFIG) || true mkdir -p $(INFO_STORE) preuninstall: - sh provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS) - sh provider-register.sh -v -d -t @CIMSERVER@ -n root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS) - sh provider-register.sh -v -d -t @CIMSERVER@ -n root/cimv2 -r $(CIMV2_REGS) -m $(CIMV2_MOFS) + 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)) rpm: clean @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)

# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1256867071 7200 # Node ID a574d66b01c1e21393af61ec892258ca08cc9732 # Parent 8515da125c641f0473108dce09a423f13ac6f6ad This register base profile classes in the PG_InterOp Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> diff -r 8515da125c64 -r a574d66b01c1 base_schema/cimv2.21.0-pginterop_mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/cimv2.21.0-pginterop_mof Thu Oct 29 23:44:31 2009 -0200 @@ -0,0 +1,9 @@ +#pragma locale ("en_US") +#pragma include ("Interop/CIM_RegisteredSpecification.mof") +#pragma include ("Interop/CIM_RegisteredProfile.mof") +#pragma include ("Interop/CIM_RegisteredSubProfile.mof") +#pragma include ("Interop/CIM_ElementConformsToProfile.mof") +#pragma include ("Interop/CIM_ReferencedSpecification.mof") +#pragma include ("Interop/CIM_ReferencedProfile.mof") +#pragma include ("Interop/CIM_SubProfileRequiresProfile.mof") +#pragma include ("Interop/CIM_Error.mof") diff -r 8515da125c64 -r a574d66b01c1 base_schema/install_base_schema.sh.in --- a/base_schema/install_base_schema.sh.in Thu Oct 29 23:44:05 2009 -0200 +++ b/base_schema/install_base_schema.sh.in Thu Oct 29 23:44:31 2009 -0200 @@ -22,6 +22,7 @@ fix_schema() { cp -a ${DATA}/cimv2.21.0-interop_mof ${TMPDIR}/cimv2.21.0-interop.mof cp -a ${DATA}/cimv2.21.0-cimv2_mof ${TMPDIR}/cimv2.21.0-cimv2.mof + cp -a ${DATA}/cimv2.21.0-pginterop_mof ${TMPDIR}/cimv2.21.0-pginterop.mof } @@ -74,6 +75,7 @@ cimmofl -uc -aEV -R$repo -n $NS qualifiers_optional.mof cimmofl -uc -aEV -R$repo -n /root/interop cimv?.??.?-interop.mof cimmofl -uc -aEV -R$repo -n /root/cimv2 cimv?.??.?-cimv2.mof + cimmofl -uc -aEV -R$repo -n /root/PG_InterOp cimv?.??.?-pginterop.mof } install_schema_sfcb() {

# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1256867152 7200 # Node ID c9e8dd2c54c9df13de77ebf2bfe94bf822540ec3 # Parent a574d66b01c1e21393af61ec892258ca08cc9732 [#2] Update .registration files to include them in the PG_InterOp namespace #2: - Grouped the PG_InterOp related files and added a comment to help newbies Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> diff -r a574d66b01c1 -r c9e8dd2c54c9 schema/ElementConformsToProfile.registration --- a/schema/ElementConformsToProfile.registration Thu Oct 29 23:44:31 2009 -0200 +++ b/schema/ElementConformsToProfile.registration Thu Oct 29 23:45:52 2009 -0200 @@ -9,3 +9,8 @@ LXC_ElementConformsToProfile root/virt Virt_ElementConformsToProfile Virt_ElementConformsToProfile association LXC_ElementConformsToProfile root/interop Virt_ElementConformsToProfile Virt_ElementConformsToProfile association LXC_ElementConformsToProfile root/cimv2 Virt_ElementConformsToProfile Virt_ElementConformsToProfile association +# -- These providers will be included only if pegasus is available. Check Makefile.am for details +Xen_ElementConformsToProfile root/PG_InterOp Virt_ElementConformsToProfile Virt_ElementConformsToProfile association +KVM_ElementConformsToProfile root/PG_InterOp Virt_ElementConformsToProfile Virt_ElementConformsToProfile association +LXC_ElementConformsToProfile root/PG_InterOp Virt_ElementConformsToProfile Virt_ElementConformsToProfile association +# --! diff -r a574d66b01c1 -r c9e8dd2c54c9 schema/ReferencedProfile.registration --- a/schema/ReferencedProfile.registration Thu Oct 29 23:44:31 2009 -0200 +++ b/schema/ReferencedProfile.registration Thu Oct 29 23:45:52 2009 -0200 @@ -3,3 +3,8 @@ Xen_ReferencedProfile root/interop Virt_ReferencedProfile Virt_ReferencedProfile association KVM_ReferencedProfile root/interop Virt_ReferencedProfile Virt_ReferencedProfile association LXC_ReferencedProfile root/interop Virt_ReferencedProfile Virt_ReferencedProfile association +# -- These providers will be included only if pegasus is available. Check Makefile.am for details +Xen_ReferencedProfile root/PG_InterOp Virt_ReferencedProfile Virt_ReferencedProfile association +KVM_ReferencedProfile root/PG_InterOp Virt_ReferencedProfile Virt_ReferencedProfile association +LXC_ReferencedProfile root/PG_InterOp Virt_ReferencedProfile Virt_ReferencedProfile association +# --! diff -r a574d66b01c1 -r c9e8dd2c54c9 schema/RegisteredProfile.registration --- a/schema/RegisteredProfile.registration Thu Oct 29 23:44:31 2009 -0200 +++ b/schema/RegisteredProfile.registration Thu Oct 29 23:45:52 2009 -0200 @@ -3,3 +3,8 @@ Xen_RegisteredProfile root/interop Virt_RegisteredProfile Virt_RegisteredProfile instance KVM_RegisteredProfile root/interop Virt_RegisteredProfile Virt_RegisteredProfile instance LXC_RegisteredProfile root/interop Virt_RegisteredProfile Virt_RegisteredProfile instance +# -- These providers will be included only if pegasus is available. Check Makefile.am for details +Xen_RegisteredProfile root/PG_InterOp Virt_RegisteredProfile Virt_RegisteredProfile instance +KVM_RegisteredProfile root/PG_InterOp Virt_RegisteredProfile Virt_RegisteredProfile instance +LXC_RegisteredProfile root/PG_InterOp Virt_RegisteredProfile Virt_RegisteredProfile instance +# --!

# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1256867160 7200 # Node ID 17a38a7407b6d896b4df5c74c8609c6452534058 # Parent c9e8dd2c54c9df13de77ebf2bfe94bf822540ec3 Fix .spec file so it also registers the profile providers in the PG_InterOp namespace Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> diff -r c9e8dd2c54c9 -r 17a38a7407b6 libvirt-cim.spec.in --- a/libvirt-cim.spec.in Thu Oct 29 23:45:52 2009 -0200 +++ b/libvirt-cim.spec.in Thu Oct 29 23:46:00 2009 -0200 @@ -54,6 +54,9 @@ %define INTEROP_REG %{_datadir}/%{name}/{RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.registration %define INTEROP_MOF %{_datadir}/%{name}/{ComputerSystem,HostSystem,RegisteredProfile,DiskPool,MemoryPool,NetPool,ProcessorPool,VSMigrationService,ElementConformsToProfile,ReferencedProfile,AllocationCapabilities}.mof +%define PGINTEROP_REG %{_datadir}/%{name}/{RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.registration +%define PGINTEROP_MOF %{_datadir}/%{name}/{RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.mof + %define CIMV2_REG %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,ElementConformsToProfile,HostedAccessPoint}.registration %define CIMV2_MOF %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,RegisteredProfile,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.mof @@ -78,6 +81,9 @@ -n root/interop \ -r %{INTEROP_REG} -m %{INTEROP_MOF} -v >/dev/null 2>&1 || true %{_datadir}/%{name}/provider-register.sh -t pegasus \ + -n root/PG_InterOp \ + -r %{PGINTEROP_REG} -m %{PGINTEROP_MOF} -v >/dev/null 2>&1 || true +%{_datadir}/%{name}/provider-register.sh -t pegasus \ -n root/cimv2\ -r %{CIMV2_REG} -m %{CIMV2_MOF} -v >/dev/null 2>&1 || true @@ -85,6 +91,9 @@ %{_datadir}/%{name}/provider-register.sh -d -t pegasus \ -n @CIM_VIRT_NS@ \ -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true +%{_datadir}/%{name}/provider-register.sh -d -t pegasus \ + -n root/PG_InterOp \ + -r %{PGINTEROP_REG} -m %{PGINTEROP_MOF} >/dev/null 2>&1 || true %postun -p /sbin/ldconfig @@ -105,5 +114,7 @@ %{_datadir}/libvirt-cim/cimv*-MOFs.zip %changelog +* Wed Oct 28 2009 Richard Maciel <rmaciel@linux.vnet.ibm.com> - 0.1-1 +- Added profile classes to the PG_InterOp namespace * Fri Oct 26 2007 Daniel Veillard <veillard@redhat.com> - 0.1-1 - created

# HG changeset patch # User Richard Maciel <rmaciel@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@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)
participants (1)
-
Richard Maciel