# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1209052046 25200
# Node ID c84430202e2e416c183f186a37a0c80d2fcb4896
# Parent cf121ecfb0824a34b42507fa36d06bf4cb45d0bc
Add get_alloc_cap_by_id() external function to AC
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r cf121ecfb082 -r c84430202e2e src/Virt_AllocationCapabilities.c
--- a/src/Virt_AllocationCapabilities.c Wed Apr 23 09:00:19 2008 -0700
+++ b/src/Virt_AllocationCapabilities.c Thu Apr 24 08:47:26 2008 -0700
@@ -147,6 +147,21 @@ CMPIStatus enum_alloc_cap_instances(cons
return s;
}
+CMPIStatus get_alloc_cap_by_id(const CMPIBroker *broker,
+ const CMPIObjectPath *ref,
+ const char *poolid,
+ CMPIInstance **inst)
+{
+ CMPIInstance *pool;
+ CMPIStatus s;
+
+ s = get_pool_by_name(broker, ref, poolid, &pool);
+ if ((pool == NULL) || (s.rc != CMPI_RC_OK))
+ return s;
+
+ return ac_from_pool(broker, ref, pool, inst);
+}
+
static CMPIStatus return_alloc_cap_instances(const CMPIBroker *broker,
const CMPIObjectPath *ref,
const CMPIResult *results,
diff -r cf121ecfb082 -r c84430202e2e src/Virt_AllocationCapabilities.h
--- a/src/Virt_AllocationCapabilities.h Wed Apr 23 09:00:19 2008 -0700
+++ b/src/Virt_AllocationCapabilities.h Thu Apr 24 08:47:26 2008 -0700
@@ -40,6 +40,11 @@ CMPIStatus enum_alloc_cap_instances(cons
const char *id,
struct inst_list *list);
+CMPIStatus get_alloc_cap_by_id(const CMPIBroker *broker,
+ const CMPIObjectPath *ref,
+ const char *poolid,
+ CMPIInstance **inst);
+
#endif
/*