+1 test was successful.
Sharad Mishra
Open Virtualization
Linux Technology Center
IBM
libvirt-cim-bounces@redhat.com wrote on 03/15/2011 05:33:20 PM:
> Chip Vincent <cvincent@linux.vnet.ibm.com>
> Sent by: libvirt-cim-bounces@redhat.com
>
> 03/15/2011 05:33 PM
>
> Please respond to
> List for discussion and development of libvirt CIM <libvirt-cim@redhat.com>
>
> To
>
> libvirt-cim@redhat.com
>
> cc
>
> Subject
>
> [Libvirt-cim] [PATCH] Add support for Pegasus OOP grouping
>
> # HG changeset patch
> # User Chip Vincent <cvincent@us.ibm.com>
> # Date 1300235494 14400
> # Node ID 6cdfba0135e08b8b5878075dff77b5e03107c614
> # Parent eea958fbf1d965bc1053850f59df4005e64093ac
> Add support for Pegasus OOP grouping
>
> Update Pegasus ProviderModule registration to include support for
> ModuleGroupProperty. This will allow all libvirt-cim provider to
> load into a single process when the CIMOM is configured to run
> providers outside the CIMOM process.
>
> Signed-off-by: Chip Vincent <cvincent@us.ibm.com>
>
> diff --git a/provider-register.sh b/provider-register.sh
> --- a/provider-register.sh
> +++ b/provider-register.sh
> @@ -32,6 +32,43 @@
> return 1
> }
>
> +pegasus_version()
> +{
> + CIMSERVER=`pegasus_path cimserver`
> + if test $? != 0
> + then
> + echo "Error: cimserver not found" >&2
> + return 1
> + fi
> +
> + VERSION=`$CIMSERVER --version`
> + if test $? != 0
> + then
> + echo "Error: could not determine cimserver version" >&2
> + return 1
> + fi
> +
> + echo $VERSION
> + return 0
> +}
> +
> +compare_version()
> +{
> + source=`echo "$1" | awk -F. '{printf("%02d%02d%02d\n", $1,$2,$3); }'`
> + target=`echo "$2" | awk -F. '{printf("%02d%02d%02d\n", $1,$2,$3); }'`
> +
> + if test $source \< $target
> + then
> + chatter $source " < " $target
> + echo "true"
> + return 0
> + else
> + chatter $source " >= " $target
> + echo "false"
> + return 1
> + fi
> +}
> +
> pegasus_transform()
> {
> OUTFILE=$1
> @@ -49,10 +86,15 @@
>
> # produce ProviderModules
> echo > $OUTFILE
> - chatter "Processing provider modules:" $PROVIDERMODULES
> - for pm in $PROVIDERMODULES
> - do
> - cat >> $OUTFILE <<EOFPM
> + version=`pegasus_version`
> + chatter "cimserver version is " $version
> + if compare_version "$version" "2.11.0"
> + then
> + chatter "Processing provider modules (w/o ModuleGroupName):" \
> + $PROVIDERMODULES
> + for pm in $PROVIDERMODULES
> + do
> + cat >> $OUTFILE <<EOFPM
> instance of PG_ProviderModule
> {
> Name = "$pm";
> @@ -65,7 +107,29 @@
>
> EOFPM
> done
> +
> + else
> + chatter "Processing provider modules (w/ ModuleGroupName):" \
> + $PROVIDERMODULES
> + for pm in $PROVIDERMODULES
> + do
> + cat >> $OUTFILE <<EOFPM
> +instance of PG_ProviderModule
> +{
> + Name = "$pm";
> + Location = "$pm";
> + Vendor = "SBLIM";
> + Version = "2.0.0";
> + InterfaceType = "CMPI";
> + InterfaceVersion = "2.0.0";
> + ModuleGroupName = "libvirt-cim";
> +};
> +
> +EOFPM
> + done
>
> + fi
> +
> # produce Providers
> set -- $PROVIDERS
> while test x$1 != x
> @@ -170,6 +234,7 @@
> myregs=
> mofmode=1
> namespace=$1
> + version=`pegasus_version`
> shift
>
> while test x$1 != x
> @@ -206,7 +271,7 @@
>
> if pegasus_transform $_REGFILENAME $namespace $myregs
> then
> - chatter Registering providers with $state cimserver
> + chatter Registering providers with $state cimserver '('$version')'
> $CIMMOF -uc -I $mofpath -n $namespace $mymofs &&
> $CIMMOF -uc -n root/PG_Interop $_REGFILENAME
> else
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim