[Libvirt-cim] [PATCH 5 of 5] Make HostedDependency work from root/cimv2 and register it there

Dan Smith danms at us.ibm.com
Mon Nov 3 19:51:40 UTC 2008


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1225741865 28800
# Node ID a154c8327a1217cb27339059600f0bcf7347ecd5
# Parent  75e2ff1a50ea0bc13256fae712e6a96aba024d80
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 at us.ibm.com>

diff -r 75e2ff1a50ea -r a154c8327a12 Makefile.am
--- a/Makefile.am	Mon Nov 03 11:51:00 2008 -0800
+++ b/Makefile.am	Mon Nov 03 11:51:05 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 75e2ff1a50ea -r a154c8327a12 schema/HostedDependency.registration
--- a/schema/HostedDependency.registration	Mon Nov 03 11:51:00 2008 -0800
+++ b/schema/HostedDependency.registration	Mon Nov 03 11:51:05 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 75e2ff1a50ea -r a154c8327a12 src/Virt_HostedDependency.c
--- a/src/Virt_HostedDependency.c	Mon Nov 03 11:51:00 2008 -0800
+++ b/src/Virt_HostedDependency.c	Mon Nov 03 11:51:05 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
 };
 




More information about the Libvirt-cim mailing list