# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1226594012 28800
# Node ID cb9db13d3b202434c16ae3e17bc407e1c84faf75
# Parent 542c7b726a870a1ca20b4ebae790d9287fd0cc9d
Make HostedDependency work from root/cimv2 and register it there
...so we can get back from HostSystem to our ComputerSystems
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 542c7b726a87 -r cb9db13d3b20 Makefile.am
--- a/Makefile.am Thu Nov 13 08:33:32 2008 -0800
+++ b/Makefile.am Thu Nov 13 08:33:32 2008 -0800
@@ -64,7 +64,8 @@
CIMV2_MOFS = \
schema/HostedResourcePool.mof \
schema/ElementCapabilities.mof \
- schema/HostedService.mof
+ schema/HostedService.mof \
+ schema/HostedDependency.mof
REGS = \
schema/ComputerSystem.registration \
@@ -119,7 +120,8 @@
CIMV2_REGS = \
schema/HostedResourcePool.registration \
schema/ElementCapabilities.registration \
- schema/HostedService.registration
+ schema/HostedService.registration \
+ schema/HostedDependency.registration
pkgdata_DATA = $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS)
pkgdata_SCRIPTS = provider-register.sh
diff -r 542c7b726a87 -r cb9db13d3b20 schema/HostedDependency.registration
--- a/schema/HostedDependency.registration Thu Nov 13 08:33:32 2008 -0800
+++ b/schema/HostedDependency.registration Thu Nov 13 08:33:32 2008 -0800
@@ -3,3 +3,6 @@
Xen_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association
KVM_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association
LXC_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association
+Xen_HostedDependency root/cimv2 Virt_HostedDependency Virt_HostedDependency association
+KVM_HostedDependency root/cimv2 Virt_HostedDependency Virt_HostedDependency association
+LXC_HostedDependency root/cimv2 Virt_HostedDependency Virt_HostedDependency association
diff -r 542c7b726a87 -r cb9db13d3b20 src/Virt_HostedDependency.c
--- a/src/Virt_HostedDependency.c Thu Nov 13 08:33:32 2008 -0800
+++ b/src/Virt_HostedDependency.c Thu Nov 13 08:33:32 2008 -0800
@@ -64,15 +64,21 @@
{
CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIInstance *instance = NULL;
+ CMPIObjectPath *vref = NULL;
- if (!match_hypervisor_prefix(ref, info))
+ if (!STARTS_WITH(CLASSNAME(ref), "Linux_") &&
+ !match_hypervisor_prefix(ref, info))
goto out;
s = get_host(_BROKER, info->context, ref, &instance, true);
if (s.rc != CMPI_RC_OK)
goto out;
- s = enum_domains(_BROKER, ref, list);
+ vref = convert_sblim_hostsystem(_BROKER, ref, info);
+ if (vref == NULL)
+ goto out;
+
+ s = enum_domains(_BROKER, vref, list);
out:
return s;
@@ -91,6 +97,7 @@
"Xen_HostSystem",
"KVM_HostSystem",
"LXC_HostSystem",
+ "Linux_ComputerSystem",
NULL
};