# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1310931451 25200
# Node ID e8c1cdd5c9cbe887286ef169d8ff525cc9035485
# Parent 0563cf6502d4cd10418001d88c0c60b269370b3e
Set PoolID for CIM_NetResourceAllocationSettingData.
PoolID wasn't getting set for NETResourceAllocationSettingData. PoolID
for NETResourceAllocationSettingData is set by appending "NetworkPool"
to the network name.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff -r 0563cf6502d4 -r e8c1cdd5c9cb libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Fri Jul 15 09:03:55 2011 -0700
+++ b/libxkutil/device_parsing.c Sun Jul 17 12:37:31 2011 -0700
@@ -372,8 +372,16 @@
if (ndev->source != NULL)
continue;
ndev->source = get_attr_value(child, "network");
- if (ndev->source != NULL)
+ if (ndev->source != NULL) {
+ int ret = asprintf(&ndev->poolid,
+ "NetworkPool/%s",
+ ndev->source);
+ if (ret == -1) {
+ CU_DEBUG("Failed to get network"
+ " poolid");
+ }
continue;
+ }
ndev->source = get_attr_value(child, "dev");
ndev->net_mode = get_attr_value(child, "mode");
if ((ndev->source != NULL) && (ndev->net_mode !=
NULL))
diff -r 0563cf6502d4 -r e8c1cdd5c9cb libxkutil/device_parsing.h
--- a/libxkutil/device_parsing.h Fri Jul 15 09:03:55 2011 -0700
+++ b/libxkutil/device_parsing.h Sun Jul 17 12:37:31 2011 -0700
@@ -61,6 +61,7 @@
char *type;
char *mac;
char *source;
+ char *poolid;
char *model;
char *device;
char *net_mode;
diff -r 0563cf6502d4 -r e8c1cdd5c9cb src/Virt_RASD.c
--- a/src/Virt_RASD.c Fri Jul 15 09:03:55 2011 -0700
+++ b/src/Virt_RASD.c Sun Jul 17 12:37:31 2011 -0700
@@ -401,6 +401,12 @@
(CMPIValue *)dev->dev.net.model,
CMPI_chars);
+ if (dev->dev.net.poolid != NULL)
+ CMSetProperty(inst,
+ "PoolID",
+ (CMPIValue *)dev->dev.net.poolid,
+ CMPI_chars);
+
return s;
}