[Libvirt-cim] [PATCH 4 of 7] HRP: adopt DevicePool interface change

Heidi Eckhart heidieck at linux.vnet.ibm.com
Wed Mar 5 09:49:11 UTC 2008


# HG changeset patch
# User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
# Date 1204709617 -3600
# Node ID ee7aecb09ec486d4d47134fef328ae207b608e1d
# Parent  6d0015c66c758a0d80fb6d70e310d2b020798ea6
HRP: adopt DevicePool interface change

- adopted changes to DevicePool interface

Signed-off-by: Heidi Eckhart <heidieck at linux.vnet.ibm.com>

diff -r 6d0015c66c75 -r ee7aecb09ec4 src/Virt_HostedResourcePool.c
--- a/src/Virt_HostedResourcePool.c	Wed Mar 05 10:33:37 2008 +0100
+++ b/src/Virt_HostedResourcePool.c	Wed Mar 05 10:33:37 2008 +0100
@@ -34,6 +34,7 @@
 
 #include "Virt_HostSystem.h"
 #include "Virt_DevicePool.h"
+#include "svpc_types.h"
 
 static const CMPIBroker *_BROKER;
 
@@ -47,8 +48,8 @@ static CMPIStatus pool_to_sys(const CMPI
         if (!match_hypervisor_prefix(ref, info))
                 goto out;
 
-        s = get_pool_inst(_BROKER, ref, &inst);
-        if ((s.rc != CMPI_RC_OK) || (inst == NULL))
+        s = get_pool_by_ref(_BROKER, ref, &inst);
+        if (s.rc != CMPI_RC_OK)
                 goto out;
 
         s = get_host(_BROKER, ref, &inst, false);
@@ -67,26 +68,15 @@ static CMPIStatus sys_to_pool(const CMPI
 {
         CMPIStatus s = {CMPI_RC_OK, NULL};
         CMPIInstance *inst = NULL;
-        int i;
-        virConnectPtr conn;
 
         if (!match_hypervisor_prefix(ref, info))
                 goto out;
-
+        
         s = get_host(_BROKER, ref, &inst, true);
         if (s.rc != CMPI_RC_OK)
                 goto out;
 
-        conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s);
-        if (conn == NULL)
-                goto out;
-
-        for (i = 0; device_pool_names[i]; i++)
-                get_pool_by_type(_BROKER,
-                                 conn,
-                                 device_pool_names[i],
-                                 NAMESPACE(ref),
-                                 list);
+        s = enum_pools(_BROKER, ref, CIM_POOL_TYPE_ALL, list);
 
  out:
         return s;




More information about the Libvirt-cim mailing list