From: Tyrel D. <ty...@us...> - 2013-02-27 01:44:51
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gather - Metric Data Gatherer". The branch, master has been updated via 86af283d775e439e9734b26ad191b42b33f08f0d (commit) from b42647e0448cacb06fe4a0ec441cc8fe05e8be8e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 86af283d775e439e9734b26ad191b42b33f08f0d Author: Tyrel Datwyler <ty...@li...> Date: Tue Feb 26 17:43:56 2013 -0800 Fixed #1650: libvirt metric associations need to be to root/virt ----------------------------------------------------------------------- Summary of changes: NEWS | 1 + plugin/cimplugKvm.c | 3 ++- plugin/cimplugXen.c | 3 ++- provider/OSBase_MetricUtil.c | 8 +++++--- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 4aef35f..e7540fe 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ Bugs fixed: - 3196679 remove sysfs dependency when not building z plugins - #2023 clean up compile warnings - #2045 Metric assoc providers don't honor result class +- #1650 libvirt metric associations need to be to root/virt Features added: - 2284848 CPU utilization should account for steal-time diff --git a/plugin/cimplugKvm.c b/plugin/cimplugKvm.c index b7ea1fc..40b4c50 100644 --- a/plugin/cimplugKvm.c +++ b/plugin/cimplugKvm.c @@ -25,6 +25,7 @@ #include <string.h> #include <stdlib.h> +static const char * ns = "root/virt"; CMPIObjectPath *COP4VALID(CMPIBroker * broker, const char *id, const char *systemid) @@ -32,7 +33,7 @@ CMPIObjectPath *COP4VALID(CMPIBroker * broker, const char *id, /* we construct the operating system id according to the OSBase rules */ CMPIObjectPath *cop = - CMNewObjectPath(broker, NULL, "KVM_ComputerSystem", + CMNewObjectPath(broker, ns, "KVM_ComputerSystem", NULL); if (cop) { CMAddKey(cop, "Name", id, CMPI_chars); diff --git a/plugin/cimplugXen.c b/plugin/cimplugXen.c index 1551ef7..6fe97f3 100644 --- a/plugin/cimplugXen.c +++ b/plugin/cimplugXen.c @@ -24,6 +24,7 @@ #include <string.h> #include <stdlib.h> +static const char * ns = "root/virt"; CMPIObjectPath *COP4VALID(CMPIBroker * broker, const char *id, const char *systemid) @@ -31,7 +32,7 @@ CMPIObjectPath *COP4VALID(CMPIBroker * broker, const char *id, /* we construct the operating system id according to the OSBase rules */ CMPIObjectPath *cop = - CMNewObjectPath(broker, NULL, "Xen_ComputerSystem", + CMNewObjectPath(broker, ns, "Xen_ComputerSystem", NULL); if (cop) { CMAddKey(cop, "Name", id, CMPI_chars); diff --git a/provider/OSBase_MetricUtil.c b/provider/OSBase_MetricUtil.c index f2bc441..96c42e5 100644 --- a/provider/OSBase_MetricUtil.c +++ b/provider/OSBase_MetricUtil.c @@ -1127,9 +1127,11 @@ void computeResourceNamespace(const CMPIObjectPath *rescop, const CMPIObjectPath *mcop, const char *systemid) { - char * namespace = CMGetCharPtr(CMGetNameSpace(mcop,NULL)); - if (namespace) { - CMSetNameSpace((CMPIObjectPath*)rescop,namespace); + char * localnsp = CMGetCharPtr(CMGetNameSpace(mcop,NULL)); + char * resnsp = CMGetCharPtr(CMGetNameSpace(rescop,NULL)); + + if (!resnsp && localnsp) { + CMSetNameSpace((CMPIObjectPath*)rescop,localnsp); CMSetHostname((CMPIObjectPath*)rescop,systemid); } } hooks/post-receive -- gather - Metric Data Gatherer |