# HG changeset patch
# User Sharad Mishra
# Date 1266955062 28800
# Node ID 19918810d820fc1ea1296f4cf8c48ac442f571cb
# Parent 0a41b5e876d601216cb3257409eee231b4aec8b0
Update mof and RASD to support Vepa
Signed-off-by: Sharad Mishra<snmishra(a)us.ibm.com>
diff -r 0a41b5e876d6 -r 19918810d820 schema/ResourceAllocationSettingData.mof
--- a/schema/ResourceAllocationSettingData.mof Tue Feb 23 10:50:39 2010 -0800
+++ b/schema/ResourceAllocationSettingData.mof Tue Feb 23 11:57:42 2010 -0800
@@ -62,6 +62,12 @@
[Description ("Target device as seen by the guest")]
string VirtualDevice;
+
+ [Description ("Source Device for bridge mode")]
+ string SourceDevice;
+
+ [Description ("Network mode, could be 'vepa', 'pepa'
etc.")]
+ string NetworkMode;
};
[Description ("KVM virtual network configuration"),
@@ -78,6 +84,12 @@
[Description ("Target device as seen by the guest")]
string VirtualDevice;
+
+ [Description ("Source Device for bridge mode")]
+ string SourceDevice;
+
+ [Description ("Network mode, could be 'vepa', 'pepa'
etc.")]
+ string NetworkMode;
};
[Description ("LXC virtual network configuration"),
diff -r 0a41b5e876d6 -r 19918810d820 src/Virt_RASD.c
--- a/src/Virt_RASD.c Tue Feb 23 10:50:39 2010 -0800
+++ b/src/Virt_RASD.c Tue Feb 23 11:57:42 2010 -0800
@@ -302,12 +302,25 @@
(CMPIValue *)dev->dev.net.source,
CMPI_chars);
+ if ((dev->dev.net.source != NULL)&&
+ (STREQ(dev->dev.net.type, "direct")))
+ CMSetProperty(inst,
+ "SourceDevice",
+ (CMPIValue *)dev->dev.net.source,
+ CMPI_chars);
+
if (dev->dev.net.device != NULL)
CMSetProperty(inst,
"VirtualDevice",
(CMPIValue *)dev->dev.net.device,
CMPI_chars);
+ if (dev->dev.net.net_mode != NULL)
+ CMSetProperty(inst,
+ "NetworkMode",
+ (CMPIValue *)dev->dev.net.net_mode,
+ CMPI_chars);
+
if (dev->dev.net.model != NULL)
CMSetProperty(inst,
"ResourceSubType",
diff -r 0a41b5e876d6 -r 19918810d820 src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Tue Feb 23 10:50:39 2010 -0800
+++ b/src/Virt_SettingsDefineCapabilities.c Tue Feb 23 11:57:42 2010 -0800
@@ -547,6 +547,8 @@
const char *net_name,
uint64_t num_nics,
const char *device,
+ const char *src_dev,
+ const char *net_mode,
const char *model,
struct inst_list *list)
{
@@ -565,10 +567,18 @@
CMSetProperty(inst, "VirtualQuantity",
(CMPIValue *)&num_nics, CMPI_uint64);
- if (model != NULL)
+ if (device != NULL)
CMSetProperty(inst, "VirtualDevice",
(CMPIValue *)device, CMPI_chars);
+ if (net_mode != NULL)
+ CMSetProperty(inst, "NetworkMode",
+ (CMPIValue *)net_mode, CMPI_chars);
+
+ if (src_dev != NULL)
+ CMSetProperty(inst, "SourceDevice",
+ (CMPIValue *)src_dev, CMPI_chars);
+
if (model != NULL)
CMSetProperty(inst, "ResourceSubType",
(CMPIValue *)model, CMPI_chars);
@@ -590,6 +600,8 @@
int i,j;
const char *type[] = {"network", "bridge",
"user"};
const char *device[] = {"vtap1", NULL};
+ const char *src_dev[] = {NULL, NULL};
+ const char *net_mode[] = {NULL, NULL};
const char *model[] = {"e1000", NULL};
const char *name[] = {NULL, "br0", NULL};
@@ -629,13 +641,18 @@
name[i],
num_nics,
device[j],
+ src_dev[j],
+ net_mode[j],
model[j],
list);
if (s.rc != CMPI_RC_OK)
goto out;
}
}
-
+
+ s = set_net_props(template_type, ref, id, "direct", NULL, num_nics,
+ NULL, "eth1", "vepa", NULL, list);
+
out:
return s;
}
_______________________________________________
Libvirt-cim mailing list
Libvirt-cim(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim