[Libvirt-cim] [PATCH] SwitchService will show the nic connected to VSI switch

Sharad Mishra snmishra at us.ibm.com
Fri Jul 15 16:03:59 UTC 2011


# HG changeset patch
# User Sharad Mishra <snmishra at us.ibm.com>
# Date 1310745835 25200
# Node ID d458bd51459cd1b470bf9ec74304abb7ff05b53c
# Parent  395f2d684c1046455462db7e4e87d30e7aae0feb
SwitchService will show the nic connected to VSI switch.

SwitchService instance will list out the interface connected to the VSI capable switch. This helps identify which nic is conneced to VSI switch when there are multiple nics.

Signed-off-by: Sharad Mishra <snmishra at us.ibm.com>

diff -r 395f2d684c10 -r d458bd51459c schema/SwitchService.mof
--- a/schema/SwitchService.mof	Tue Jul 05 15:52:31 2011 -0300
+++ b/schema/SwitchService.mof	Fri Jul 15 09:03:55 2011 -0700
@@ -5,6 +5,7 @@
 {
     [Description("Flag to determine if VSI is supported on the switch")]
     boolean IsVSISupported;
+    string VSIInterface;
 
 };
 
@@ -13,6 +14,7 @@
 {
     [Description("Flag to determine if VSI is supported on the switch")]
     boolean IsVSISupported;
+    string VSIInterface;
 
 };
 
@@ -21,6 +23,7 @@
 {
     [Description("Flag to determine if VSI is supported on the switch")]
     boolean IsVSISupported;
+    string VSIInterface;
 
 };
 
diff -r 395f2d684c10 -r d458bd51459c src/Virt_SwitchService.c
--- a/src/Virt_SwitchService.c	Tue Jul 05 15:52:31 2011 -0300
+++ b/src/Virt_SwitchService.c	Fri Jul 15 09:03:55 2011 -0700
@@ -250,6 +250,8 @@
                 s = check_vsi_support(cmd); 
                 if (s.rc == CMPI_RC_OK) {
                         vsi = true;
+                        CMSetProperty(inst, "VSIInterface", 
+                                      (CMPIValue *)if_list[i], CMPI_chars);
                         break;
                 }
                 else




More information about the Libvirt-cim mailing list