# HG changeset patch
# User snmishra(a)us.ibm.com
# Date 1247001210 25200
# Node ID 78a5d3cd29f9a5596e42437ceed49626b7674460
# Parent 2f0fb9e5d52301fc00212d543d593e24d89ba0f0
Enum instance of net RASD wasn't parsing network name properly.
Updated device parsing code and net RASD to get network name for
bridge devices.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff -r 2f0fb9e5d523 -r 78a5d3cd29f9 libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Wed Jun 24 11:46:08 2009 -0700
+++ b/libxkutil/device_parsing.c Tue Jul 07 14:13:30 2009 -0700
@@ -307,8 +307,8 @@
if (ndev->mac == NULL)
goto err;
} else if (XSTREQ(child->name, "source")) {
- ndev->source = get_attr_value(child, "bridge");
- if (ndev->source != NULL)
+ ndev->name = get_attr_value(child, "bridge");
+ if (ndev->name != NULL)
continue;
ndev->source = get_attr_value(child, "network");
if (ndev->source != NULL)
diff -r 2f0fb9e5d523 -r 78a5d3cd29f9 src/Virt_RASD.c
--- a/src/Virt_RASD.c Wed Jun 24 11:46:08 2009 -0700
+++ b/src/Virt_RASD.c Tue Jul 07 14:13:30 2009 -0700
@@ -404,6 +404,13 @@
(CMPIValue *)dev->dev.net.mac,
CMPI_chars);
+ if ((dev->dev.net.name != NULL) &&
+ (STREQ(dev->dev.net.type, "bridge")))
+ CMSetProperty(inst,
+ "NetworkName",
+ (CMPIValue *)dev->dev.net.name,
+ CMPI_chars);
+
if (dev->dev.net.model != NULL)
CMSetProperty(inst,
"ResourceSubType",