[Libvirt-cim] [PATCH 4 of 5] RAFP: adopt interface changes to RASD

Heidi Eckhart heidieck at linux.vnet.ibm.com
Fri Feb 22 12:04:35 UTC 2008


# HG changeset patch
# User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
# Date 1203681292 -3600
# Node ID d31116669eb24e1ff8691a33b4c1d5a91421fd20
# Parent  e12a643f2af88b12b3031de23bb3fd5698badaba
RAFP: adopt interface changes to RASD
Signed-off-by: Heidi Eckhart <heidieck at linux.vnet.ibm.com>

diff -r e12a643f2af8 -r d31116669eb2 src/Virt_ResourceAllocationFromPool.c
--- a/src/Virt_ResourceAllocationFromPool.c	Fri Feb 22 12:54:51 2008 +0100
+++ b/src/Virt_ResourceAllocationFromPool.c	Fri Feb 22 12:54:52 2008 +0100
@@ -37,28 +37,6 @@
 
 const static CMPIBroker *_BROKER;
 
-static CMPIStatus validate_rasd_ref(const CMPIContext *context,
-                                    const CMPIObjectPath *ref,
-                                    uint16_t type,
-                                    const char *id)
-{
-        CMPIStatus s = {CMPI_RC_OK, NULL};
-        CMPIInstance *rasd = NULL;
-
-        rasd = get_rasd_instance(context,
-                                 ref, 
-                                 _BROKER, 
-                                 id, 
-                                 type);
-
-        if (CMIsNullObject(rasd))
-                cu_statusf(_BROKER, &s,
-                           CMPI_RC_ERR_NOT_FOUND,
-                           "No such instance (%s)", id);
-
-        return s;
-}
-
 static CMPIStatus rasd_to_pool(const CMPIObjectPath *ref,
                                struct std_assoc_info *info,
                                struct inst_list *list)
@@ -69,6 +47,7 @@ static CMPIStatus rasd_to_pool(const CMP
         char *poolid = NULL;
         virConnectPtr conn = NULL;
         CMPIInstance *pool = NULL;
+        CMPIInstance *inst = NULL;
 
         if (!match_hypervisor_prefix(ref, info))
                 return s;
@@ -87,10 +66,7 @@ static CMPIStatus rasd_to_pool(const CMP
                 goto out;
         }
 
-        s = validate_rasd_ref(info->context,
-                              ref,
-                              type,
-                              id);
+        s = get_rasd_by_name(_BROKER, ref, id, type, &inst);
         if (s.rc != CMPI_RC_OK)
                 goto out;
 




More information about the Libvirt-cim mailing list