[PATCH] Move RASD base classes out of provider MOFs

# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1193407510 25200 # Node ID c0f41fb8b46631e3a636e28beb50be22a7929a1e # Parent d41b62edd9412659b17b39c36d9ad488ca24f622 Move RASD base classes out of provider MOFs. This adds another script that can be used to register additional base classes to the schema, without registering a new provider. This lets us extend the base schema with our Xen_RASD and KVM_RASD classes. It also provides us a framework to install bundled base schema, which may be necessary at some point. Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r d41b62edd941 -r c0f41fb8b466 Makefile.am --- a/Makefile.am Thu Oct 25 14:37:09 2007 -0700 +++ b/Makefile.am Fri Oct 26 07:05:10 2007 -0700 @@ -69,6 +69,10 @@ 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 @@ -77,6 +81,7 @@ 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 d41b62edd941 -r c0f41fb8b466 register_base.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/register_base.sh Fri Oct 26 07:05:10 2007 -0700 @@ -0,0 +1,33 @@ +#!/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 d41b62edd941 -r c0f41fb8b466 schema/KVM_ResourceAllocationSettingData.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/KVM_ResourceAllocationSettingData.mof Fri Oct 26 07:05:10 2007 -0700 @@ -0,0 +1,9 @@ +// Copyright IBM Corp. 2007 +class KVM_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData { + + [Key, + Description ("The type of allocated resource"), + Override ("ResourceType")] + uint16 ResourceType; + +}; diff -r d41b62edd941 -r c0f41fb8b466 schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Thu Oct 25 14:37:09 2007 -0700 +++ b/schema/ResourceAllocationSettingData.mof Fri Oct 26 07:05:10 2007 -0700 @@ -1,22 +1,4 @@ // Copyright IBM Corp. 2007 -class Xen_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData { - - [Key, - Description ("The type of allocated resource"), - Override ("ResourceType")] - uint16 ResourceType; - -}; - -class KVM_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData { - - [Key, - Description ("The type of allocated resource"), - Override ("ResourceType")] - uint16 ResourceType; - -}; - [Description ("Xen virtual disk configuration")] class Xen_DiskResourceAllocationSettingData : Xen_ResourceAllocationSettingData{ diff -r d41b62edd941 -r c0f41fb8b466 schema/Xen_ResourceAllocationSettingData.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/Xen_ResourceAllocationSettingData.mof Fri Oct 26 07:05:10 2007 -0700 @@ -0,0 +1,9 @@ +// Copyright IBM Corp. 2007 +class Xen_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData { + + [Key, + Description ("The type of allocated resource"), + Override ("ResourceType")] + uint16 ResourceType; + +};

Dan Smith wrote:
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1193407510 25200 # Node ID c0f41fb8b46631e3a636e28beb50be22a7929a1e # Parent d41b62edd9412659b17b39c36d9ad488ca24f622 Move RASD base classes out of provider MOFs. This adds another script that can be used to register additional base classes to the schema, without registering a new provider. This lets us extend the base schema with our Xen_RASD and KVM_RASD classes. It also provides us a framework to install bundled base schema, which may be necessary at some point.
Signed-off-by: Dan Smith <danms@us.ibm.com>
Ah, registration. Always so much fun. Well, this looks solid. I like the approach of breaking it off into a separate script, since it was looking like it was going to get pretty messy trying to make it work with the original. This is much cleaner. +1 -- -Jay
participants (2)
-
Dan Smith
-
Jay Gagnon