os-cmpi-xen

changeset 28:6137ddada5ca

Updated postinstall target to install necessary XenCIM schema in Interop and host instrumentation namespaces. Updated README.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
author jfehlig@jfehlig1.provo.novell.com
date Mon Oct 16 15:31:13 2006 -0600 (2006-10-16)
parents cd38c6aaf924
children f95f149022c3
files Makefile.am README configure.ac provider-register.sh
line diff
     1.1 --- a/Makefile.am	Fri Oct 06 16:49:56 2006 -0600
     1.2 +++ b/Makefile.am	Mon Oct 16 15:31:13 2006 -0600
     1.3 @@ -213,6 +213,32 @@ SPVC_REGS = \
     1.4  	schema/dmtf/CIM_ResourcePoolSettingData.registration \
     1.5  	schema/dmtf/CIM_PoolAllocatedFromPool.registration
     1.6  
     1.7 +# Some classes must reside in multiple namespaces.  We list these here.
     1.8 +INTEROP_MOFS = \
     1.9 +	schema/Xen_RegisteredSVProfile.mof \
    1.10 +	schema/Xen_RegisteredVSProfile.mof \
    1.11 +	schema/Xen_ElementConformsToSVProfile.mof \
    1.12 +	schema/Xen_ElementConformsToVSProfile.mof
    1.13 +
    1.14 +
    1.15 +HOST_NS_MOFS = \
    1.16 +	schema/dmtf/CIM_VirtualSystemManagementService.mof \
    1.17 +	schema/Xen_VirtualSystemManagementService.mof \
    1.18 +	schema/Xen_HostedVirtualSystemManagementService.mof \
    1.19 +	schema/dmtf/CIM_ResourcePool.mof \
    1.20 +	schema/dmtf/CIM_HostedResourcePool.mof \
    1.21 +	schema/Xen_MemoryPool.mof \
    1.22 +	schema/Xen_MemoryPoolComponent.mof \
    1.23 +	schema/Xen_HostedMemoryPool.mof
    1.24 +	schema/Xen_ProcessorPool.mof \
    1.25 +	schema/Xen_ProcessorPoolComponent.mof
    1.26 +	schema/Xen_HostedProcessorPool.mof
    1.27 +	schema/Xen_ComputerSystem.mof \
    1.28 +	schema/Xen_HostedComputerSystem.mof
    1.29 +	schema/Xen_RegisteredSVProfile.mof \
    1.30 +	schema/Xen_ElementConformsToSVProfile.mof
    1.31 +
    1.32 +
    1.33  MOFS = $(SPVC_MOFS) $(XEN_MOFS) 
    1.34  REGS = $(XEN_REGS)
    1.35  
    1.36 @@ -220,6 +246,10 @@ REGS = $(XEN_REGS)
    1.37  # @CIMSERVER@ is set by the configure script
    1.38  postinstall:
    1.39  	sh provider-register.sh -t @CIMSERVER@ -r $(REGS) -m $(MOFS)
    1.40 +	sh provider-register.sh -t @CIMSERVER@ -n Interop -m $(INTEROP_MOFS) \
    1.41 +		-r schema/Xen_RegisteredSVProfile.registration
    1.42 +	sh provider-register.sh -t @CIMSERVER@ -n @HOST_INSTRUMENTATION_NS@ \
    1.43 +		-m $(HOST_NS_MOFS) -r schema/Xen_ComputerSystem.registration
    1.44  
    1.45  preuninstall:
    1.46  	sh provider-register.sh -d -t @CIMSERVER@ -r $(REGS) -m $(MOFS)
     2.1 --- a/README	Fri Oct 06 16:49:56 2006 -0600
     2.2 +++ b/README	Mon Oct 16 15:31:13 2006 -0600
     2.3 @@ -1,11 +1,65 @@
     2.4 +1.  INTRODUCTION
     2.5 +
     2.6  The Xen-CIM project implements various profiles defined by the System
     2.7  Virtualization, Partitioning, and Clustering (SVPC) working group within
     2.8 -the DMTF.  All profiles and schema created by the SVPC working group are
     2.9 -currently DMTF Confidential and cannot be included in the project
    2.10 -repository.
    2.11 +the Distributed Management Task Force (DMTF).  The SVPC working group
    2.12 +includes members from EMC (VMWare), HP, IBM, Microsoft, Novell, Unisys,
    2.13 +XenSource, and others.  The working group web page serves as a central
    2.14 +point for collaboration and can be found at
    2.15 +
    2.16 +    http://www.dmtf.org/apps/org/workgroup/redundancy/documents.php
    2.17 +
    2.18 +Membership to the working group requires registration but is free to all
    2.19 +DMTF member companies.
    2.20 +
    2.21 +All profiles and schema created by the SVPC working group are
    2.22 +currently DMTF Confidential.  The various profiles emerging from the
    2.23 +group cannot be shared at this time however the DMTF has given
    2.24 +permission to share the schema.  Recent schema snapshots are located in
    2.25 +project directory schema/dmtf.
    2.26 +
    2.27 +The profiles and schema are a work-in-progress and undergo rapid change.
    2.28 +Once stabilized, they are made publicly available as Experimental for
    2.29 +consumption and comment.  At least two, interoperable implementations
    2.30 +must exits before promotion to Final.
    2.31 +
    2.32 +The schema models a management domain, e.g. virtualization, and contains
    2.33 +all of the classes and their relationships that are required to describe
    2.34 +the management domain.
    2.35 +
    2.36 +Profiles are schema companions that describe in normative text how the
    2.37 +model works.  They are the specification to which implementations
    2.38 +should conform.
    2.39 +
    2.40 +The Xen-CIM project aims to implement all relevant profiles produced
    2.41 +by the SVPC working group.  The project is currently tracking the
    2.42 +following profiles:
    2.43 +
    2.44 +DSP1042 System Virtualization Profile
    2.45 +DSPxxxx Virtual System Profile
    2.46 +DSP1041 Resource Allocation Profile
    2.47 +DSP1043 Allocation Capabilities Profile
    2.48 +
    2.49 +2.  CONFIGURING
    2.50 +
    2.51 +The project configure script accepts the standard configure options.
    2.52 +In addition, the --with-host-instrumentation=TYPE option can be used to
    2.53 +specify which host instrumentation will be used by the Xen-CIM providers.
    2.54 +The available TYPEs are omc and sblim with omc as the default.
    2.55 +
    2.56 +"Host instrumentation" refers to implementations of DMTF profiles
    2.57 +describing physical host environments, such as DSP1052 Computer System
    2.58 +Profile.  Many of the virtualization profiles reference profiles that have
    2.59 +been implemented by other open source projects, such as omc and sblim.
    2.60 +This project leverages that work and thus requires either omc or sblim for
    2.61 +model completeness.  Further information on omc or sblim can be found at
    2.62 +their respective project sites:
    2.63 +
    2.64 +OMC    - http://developer.novell.com/wiki/index.php/OMC
    2.65 +SBLIM  - http://sourceforge.net/projects/sblim/
    2.66  
    2.67  
    2.68 -1.  BUILDING
    2.69 +3.  BUILDING
    2.70  
    2.71  You must have a CIMOM (including its associated development packages),
    2.72  libxml2, and libvirt installed to compile.  Then simply try:
    2.73 @@ -15,21 +69,13 @@ libxml2, and libvirt installed to compil
    2.74  make
    2.75  
    2.76  
    2.77 -2. INSTALLING
    2.78 -
    2.79 -Try "make install" to install the provider library files.  Default
    2.80 -location is /usr/local/lib/cmpi.
    2.81 +4.  INSTALLING
    2.82  
    2.83 -The Xen-CIM schema files reside in schema subdirectory.  They are
    2.84 -installed using the "make postinstall" target.  Note that you must
    2.85 -have the SVPC working group schema installed in order to install the
    2.86 -Xen-CIM schema files since they derive from the SVPC schema.  As noted
    2.87 -above we cannot include the SVPC schema in the project at this time
    2.88 -since it is DMTF Confidential.  DMTF members can access the SVPC
    2.89 -schema at
    2.90 +Use "make install" to install the provider library files.  Default
    2.91 +location is /usr/local/lib/cmpi but can be controlled by the usual
    2.92 +options to configure.
    2.93  
    2.94 -    http://www.dmtf.org/apps/org/workgroup/redundancy/documents.php
    2.95 -
    2.96 -Download all of the schema files found under the Virt/Part MOF
    2.97 -folder and install into your CIMOM prior to running the
    2.98 -"make postinstall" target.
    2.99 \ No newline at end of file
   2.100 +The Xen-CIM schema is derived from the DMTF schema and provides concrete
   2.101 +classes for the implementation.  These schema files are located in the
   2.102 +schema subdirectory.  The DMTF schema in schema/dmtf and the Xen-CIM
   2.103 +schema are installed using the "make postinstall" target.
     3.1 --- a/configure.ac	Fri Oct 06 16:49:56 2006 -0600
     3.2 +++ b/configure.ac	Mon Oct 16 15:31:13 2006 -0600
     3.3 @@ -17,6 +17,7 @@
     3.4  # ============================================================================
     3.5  # Author:       Dr. Gareth S. Bestor <bestor@us.ibm.com>
     3.6  # Contributors: Viktor Mihajlovski <mihajlov@de.ibm.com>
     3.7 +#               Jim Fehlig <jfehlig@novell.com>
     3.8  # Summary:      Autoconf input file for CMPI Xen Provider
     3.9  # Description:
    3.10  #    This file is processed by autoconf to generate the configure script for
    3.11 @@ -133,15 +134,17 @@ AC_ARG_WITH([host-instrumentation],
    3.12  )
    3.13  
    3.14  if test "x$HOST_INSTRUMENTATION" = "xomc" ; then
    3.15 -	AC_DEFINE([HOST_INSTRUMENTATION_NS],  ["smash"], [Namespace where host instrumentation resides.])
    3.16 -	AC_DEFINE([HOST_INSTRUMENTATION_PREFIX],  ["OMC_"], [Prefix of host instrumentation class names.])
    3.17 +	HOST_INSTRUMENTATION_NS="smash"
    3.18 +	HOST_INSTRUMENTATION_PREFIX="OMC_"
    3.19  elif test "x$HOST_INSTRUMENTATION" = "xsblim" ; then
    3.20 -	AC_DEFINE([HOST_INSTRUMENTATION_NS],  ["root/cimv2"], [Namespace where host instrumentation resides.])
    3.21 -	AC_DEFINE([HOST_INSTRUMENTATION_PREFIX],  ["Linux_"], [Prefix of host instrumentation class names.])
    3.22 +	HOST_INSTRUMENTATION_NS="root/cimv2"
    3.23 +	HOST_INSTRUMENTATION_PREFIX="Linux__"
    3.24  else
    3.25  	AC_MSG_ERROR([unrecognized host instrumentation $HOST_INSTRUMENTATION])
    3.26  fi
    3.27  
    3.28 +AC_SUBST([HOST_INSTRUMENTATION_NS])
    3.29 +AC_SUBST([HOST_INSTRUMENTATION_PREFIX])
    3.30  
    3.31  # Set compiler flag for CMPI API version compatibility
    3.32  # SET THE PACKAGE CMPI_VERSION HERE
    3.33 @@ -165,6 +168,7 @@ AC_CONFIG_HEADER([config.h])
    3.34  # Autogenerate the Makefiles
    3.35  AC_CONFIG_FILES([Makefile
    3.36  		 src/Makefile])
    3.37 +
    3.38  AM_INIT_AUTOMAKE
    3.39  
    3.40  # Check for the required C compiler
     4.1 --- a/provider-register.sh	Fri Oct 06 16:49:56 2006 -0600
     4.2 +++ b/provider-register.sh	Mon Oct 16 15:31:13 2006 -0600
     4.3 @@ -172,6 +172,11 @@ pegasus_install()
     4.4  	state=inactive
     4.5      fi
     4.6  
     4.7 +    if test x$namespace != x
     4.8 +    then
     4.9 +	CIMMOF="$CIMMOF -n $namespace"
    4.10 +    fi
    4.11 +
    4.12      mofpath=
    4.13      mymofs=
    4.14      mregs=
    4.15 @@ -212,7 +217,7 @@ pegasus_install()
    4.16      if pegasus_transform $_REGFILENAME $myregs
    4.17      then
    4.18  	chatter Registering providers with $state cimserver
    4.19 -	$CIMMOF -uc -I $mofpath -n root/cimv2 $mymofs &&
    4.20 +	$CIMMOF -uc -I $mofpath $mymofs &&
    4.21  	$CIMMOF -uc -n root/PG_Interop $_REGFILENAME
    4.22      else
    4.23  	echo "Failed to build pegasus registration MOF." >&2
    4.24 @@ -503,6 +508,11 @@ openwbem_install()
    4.25  	CIMMOF="$CIMMOF -s /usr/share/mof/cim-current"
    4.26      fi
    4.27  
    4.28 +    if test x$namespace != x
    4.29 +    then
    4.30 +	CIMMOF="$CIMMOF -n $namespace"
    4.31 +    fi
    4.32 +
    4.33      for _TEMPDIR in /var/tmp /tmp
    4.34      do
    4.35        if test -w $_TEMPDIR
    4.36 @@ -587,7 +597,7 @@ cim_server()
    4.37  
    4.38  usage() 
    4.39  {
    4.40 -    echo "usage: $0 [-h] [-v] [-d] [-t <cimserver>] -r regfile ... -m mof ..."
    4.41 +    echo "usage: $0 [-h] [-v] [-d] [-t <cimserver>] [-n <namespace>] -r regfile ... -m mof ..."
    4.42  }
    4.43  
    4.44  chatter()
    4.45 @@ -631,7 +641,7 @@ gb_getopt()
    4.46  }
    4.47  
    4.48  prepargs=`gb_getopt $*`
    4.49 -args=`getopt dvht:r: $prepargs`
    4.50 +args=`getopt dvht:n:r: $prepargs`
    4.51  rc=$?
    4.52  
    4.53  if [ $rc = 127 ]
    4.54 @@ -658,6 +668,8 @@ do
    4.55  	  shift;;
    4.56        -t) cimserver=$2;
    4.57  	  shift 2;;
    4.58 +      -n) namespace=$2;
    4.59 +	  shift 2;;
    4.60        -r) regs="$regs $2";
    4.61  	  shift 2;;
    4.62        --) shift;
    4.63 @@ -675,6 +687,7 @@ then
    4.64      echo -e "\t-v verbose mode"
    4.65      echo -e "\t-d deregister provider and uninstall schema"
    4.66      echo -e "\t-t specify cimserver type (pegasus|sfcb|openwbem|sniacimom)"
    4.67 +    echo -e "\t-n specify namespace"
    4.68      echo -e "\t-r specify registration files"
    4.69      echo -e "\t-m specify schema mof files"
    4.70      echo