
Dan Smith wrote:
HE> What is your intention behind defining HE> Xen/KVM_ResourceAllocationSettingData in separate mof files and HE> adding the additional registration script register_base.sh ? HE> Especially the registration script introduces additional HE> maintenance effort, while the registration process is already HE> solved by provider_register.sh.
When I put the Xen_RASD.mof in the MOFS make target, sfcb worked fine, but the pegasus registration process failed. If you know of a better way to do this, I'm more than happy to revert what I've done so far.
I suggest the following patch: - removes schema/KVM_ResourceAllocationSettingData.mof, schema/Xen_ResourceAllocationSettingData.mof and register_base.sh - adds definition of KVM/Xen_ResourceAllocationSettingData to schema/ResourceAllocationSettingData.mof diff -r c94a9d6b36d9 Makefile.am --- a/Makefile.am Tue Oct 30 12:42:10 2007 +0100 +++ b/Makefile.am Tue Oct 30 12:48:24 2007 +0100 @@ -71,12 +71,8 @@ INTEROP_REGS = \ schema/RegisteredProfile.registration \ schema/ElementConformsToProfile.registration -EXTRA_BASE_MOFS = \ - schema/Xen_ResourceAllocationSettingData.mof \ - schema/KVM_ResourceAllocationSettingData.mof - pkgdata_DATA = $(MOFS) $(REGS) -pkgdata_SCRIPTS = provider-register.sh register_base.sh +pkgdata_SCRIPTS = provider-register.sh EXTRA_DIST = schema $(pkgdata_DATA) $(pkgdata_SCRIPTS) \ libvirt-cim.spec.in libvirt-cim.spec \ @@ -85,7 +81,6 @@ EXTRA_DIST = schema $(pkgdata_DATA) $(pk # Un/Register the providers and class definitions from/to the current CIMOM. # @CIMSERVER@ is set by the configure script postinstall: - sh register_base.sh @CIMSERVER@ $(EXTRA_BASE_MOFS) sh provider-register.sh -t @CIMSERVER@ -n /root/ibmsd -r $(REGS) -m $(MOFS) sh provider-register.sh -t @CIMSERVER@ -n /root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS) diff -r c94a9d6b36d9 register_base.sh --- a/register_base.sh Tue Oct 30 12:42:10 2007 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -#!/bin/bash -# -# A script to register base classes with the CIMOM -# -# Copyright IBM Corp. 2007 -# Author: Dan Smith <danms@us.ibm.com> -# -# Usage: -# -# $ register_base.sh (sfcb|pegasus) [MOF...] -# -# FIXME: Need to make pegasus location and namespace variable - -CIMOM=$1 - -if [ -z "$CIMOM" ]; then - echo "Usage: $0 (pegasus|sfcb)" - exit 1 -fi - -shift - -if [ "$CIMOM" = "pegasus" ]; then - for i in $*; do - cimmofl -W -uc -aEV -R/var/lib/Pegasus -n /root/ibmsd $i - done -elif [ "$CIMOM" = "sfcb" ]; then - for i in $*; do - sfcbstage -n /root/ibmsd $i - done -else - echo "Unknown CIMOM type: $CIMOM" -fi diff -r c94a9d6b36d9 schema/KVM_ResourceAllocationSettingData.mof --- a/schema/KVM_ResourceAllocationSettingData.mof Tue Oct 30 12:42:10 2007 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -// Copyright IBM Corp. 2007 -class KVM_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData { - - [Key, - Description ("The type of allocated resource"), - Override ("ResourceType")] - uint16 ResourceType; - -}; diff -r c94a9d6b36d9 schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Tue Oct 30 12:42:10 2007 +0100 +++ b/schema/ResourceAllocationSettingData.mof Tue Oct 30 12:44:57 2007 +0100 @@ -1,4 +1,12 @@ // Copyright IBM Corp. 2007 +class Xen_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData { + +}; + +class KVM_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData { + +}; + [Description ("Xen virtual disk configuration")] class Xen_DiskResourceAllocationSettingData : Xen_ResourceAllocationSettingData{ diff -r c94a9d6b36d9 schema/Xen_ResourceAllocationSettingData.mof --- a/schema/Xen_ResourceAllocationSettingData.mof Tue Oct 30 12:42:10 2007 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -// Copyright IBM Corp. 2007 -class Xen_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData { - - [Key, - Description ("The type of allocated resource"), - Override ("ResourceType")] - uint16 ResourceType; - -}; -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck@linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294