[Libvirt-cim] [PATCH 2 of 6] AllocationCapabilities: adopt new DevicePool enum interface

Heidi Eckhart heidieck at linux.vnet.ibm.com
Fri Mar 7 12:24:02 UTC 2008


# HG changeset patch
# User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
# Date 1204892338 -3600
# Node ID a8173158176010511273e25c70f4b9fec27ccfb2
# Parent  044facb1d4cf1b87bd73bd99963f4bf37b2d7ee3
AllocationCapabilities: adopt new DevicePool enum interface

- adopted new DevicePool enum_pools() interface
- updated NOT_FOUND error message to be consistent with others
- updated resource type to CIM_RES_TYPE_foo

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

diff -r 044facb1d4cf -r a81731581760 src/Virt_AllocationCapabilities.c
--- a/src/Virt_AllocationCapabilities.c	Fri Mar 07 13:18:56 2008 +0100
+++ b/src/Virt_AllocationCapabilities.c	Fri Mar 07 13:18:58 2008 +0100
@@ -33,6 +33,7 @@
 
 #include "Virt_AllocationCapabilities.h"
 #include "Virt_DevicePool.h"
+#include "svpc_types.h"
 
 const static CMPIBroker *_BROKER;
 
@@ -95,11 +96,11 @@ CMPIStatus enum_alloc_cap_instances(cons
                 if (id) 
                         cu_statusf(broker, &s,
                                    CMPI_RC_ERR_NOT_FOUND,
-                                   "Requested Object could not be found.");
-                goto out;
-        }
-
-        s = get_all_pools(broker, conn, NAMESPACE(ref), &device_pool_list);
+                                   "Instance not found.");
+                goto out;
+        }
+
+        s = enum_pools(broker, ref, CIM_RES_TYPE_ALL, &device_pool_list);
         if (s.rc != CMPI_RC_OK) {
                 cu_statusf(broker, &s,
                            CMPI_RC_ERR_FAILED,
@@ -135,7 +136,7 @@ CMPIStatus enum_alloc_cap_instances(cons
         if (id && !inst_id) {
             cu_statusf(broker, &s,
                        CMPI_RC_ERR_NOT_FOUND,
-                       "Requested Object could not be found.");
+                       "Instance not found.");
             goto out; 
         }
         




More information about the Libvirt-cim mailing list