Re: [Libvirt-cim] [PATCH 2/9] Change the MAC from "99:" to "88:"
by WangXu
Reviewed-by: Xu Wang <cngesaint(a)outlook.com>
From: cngesaint(a)outlook.com
To: cngesaint(a)outlook.com
Subject: [Libvirt-cim] [PATCH 2/9] Change the MAC from "99:" to "88:"
Date: Wed, 24 Apr 2013 06:19:43 +0000
Using a MAC starting with "99:" is not legal. That ends up being a
Multicast Address since the low order bit of the first byte of the
address (in hex) is one. That is "99" is 0x10011001" in hex, where
the least significant bit is a "1" (one) indicating a multicast.
---
suites/libvirt-cim/cimtest/VSSD/06_duplicate_uuid.py | 2 +-
.../cimtest/VirtualSystemManagementService/06_addresource.py | 2 +-
.../cimtest/VirtualSystemManagementService/08_modifyresource.py | 4 ++--
.../VirtualSystemManagementService/13_refconfig_additional_devs.py | 4 ++--
.../cimtest/VirtualSystemManagementService/18_define_sys_bridge.py | 2 +-
.../VirtualSystemManagementService/22_addmulti_brg_interface.py | 2 +-
suites/libvirt-cim/lib/XenKvmLib/const.py | 6 +++---
suites/libvirt-cim/lib/XenKvmLib/test_xml.py | 2 +-
8 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/suites/libvirt-cim/cimtest/VSSD/06_duplicate_uuid.py b/suites/libvirt-cim/cimtest/VSSD/06_duplicate_uuid.py
index c5d8a22..be82335 100644
--- a/suites/libvirt-cim/cimtest/VSSD/06_duplicate_uuid.py
+++ b/suites/libvirt-cim/cimtest/VSSD/06_duplicate_uuid.py
@@ -40,7 +40,7 @@ from XenKvmLib.const import get_provider_version
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
default_dom = 'uuid_domain'
test_dom = 'test_domain'
-nmac = '99:aa:bb:cc:ee:ff'
+nmac = '88:aa:bb:cc:ee:ff'
duplicate_uuid_support = 915
def get_vssd(ip, virt, dom):
diff --git a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/06_addresource.py b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/06_addresource.py
index fdcb84a..ac18c69 100644
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/06_addresource.py
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/06_addresource.py
@@ -38,7 +38,7 @@ from XenKvmLib.common_util import create_netpool_conf, destroy_netpool
sup_types = ['Xen', 'KVM', 'XenFV']
default_dom = 'rstest_domain'
-nmac = '99:aa:bb:cc:ee:ff'
+nmac = '88:aa:bb:cc:ee:ff'
ntype = 'network'
npool_name = default_network_name + str(random.randint(1, 100))
diff --git a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py
index df58d1f..a7c3871 100644
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py
@@ -43,9 +43,9 @@ cpu = 2
ncpu = 1
nmem = 131072
new_int = randint(10, 99)
-new_mac1 = "11:%s:22:%s:33:%s" % (new_int, new_int, new_int)
+new_mac1 = "88:%s:22:%s:33:%s" % (new_int, new_int, new_int)
new_int += 1
-new_mac2 = "11:%s:22:%s:33:%s" % (new_int, new_int, new_int)
+new_mac2 = "88:%s:22:%s:33:%s" % (new_int, new_int, new_int)
def cleanup_env(ip, cxml):
cxml.destroy(ip)
diff --git a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py
index 6274527..a47db8f 100644
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py
@@ -38,8 +38,8 @@ from XenKvmLib.vxml import get_class
sup_types = ['Xen', 'XenFV', 'KVM']
test_dom = 'rstest_domain'
test_dom2 = 'rstest_domain2'
-mac1 = '99:aa:bb:cc:ee:ff'
-mac2 = '99:aa:bb:cc:ee:aa'
+mac1 = '88:aa:bb:cc:ee:ff'
+mac2 = '88:aa:bb:cc:ee:aa'
REQUESTED_STATE = 2
TIME = "00000000000000.000000:000"
diff --git a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/18_define_sys_bridge.py b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/18_define_sys_bridge.py
index e02de29..66b3e45 100644
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/18_define_sys_bridge.py
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/18_define_sys_bridge.py
@@ -32,7 +32,7 @@ from XenKvmLib.common_util import create_netpool_conf, destroy_netpool
sup_types = ['Xen', 'KVM', 'XenFV']
default_dom = 'brgtest_domain'
-nmac = '99:aa:bb:cc:ee:ff'
+nmac = '88:aa:bb:cc:ee:ff'
npool_name = default_network_name + str(random.randint(1, 100))
brg_name = "br" + str(random.randint(1, 100))
diff --git a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/22_addmulti_brg_interface.py b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/22_addmulti_brg_interface.py
index 9abb21b..36d1873 100644
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/22_addmulti_brg_interface.py
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/22_addmulti_brg_interface.py
@@ -36,7 +36,7 @@ sup_types = ['Xen', 'KVM', 'XenFV']
test_dom = "my_domain1"
default_net = "my_network0"
test_net = "my_network1"
-test_mac = '99:aa:bb:cc:ee:ff'
+test_mac = '88:aa:bb:cc:ee:ff'
default_mac = "00:11:33:33:44:55"
ntype = 'bridge'
default_brg = 'mybr0'
diff --git a/suites/libvirt-cim/lib/XenKvmLib/const.py b/suites/libvirt-cim/lib/XenKvmLib/const.py
index 6dea644..6701d36 100755
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py
@@ -80,7 +80,7 @@ Xen_init_path = os.path.join(_image_dir, 'default-xen-initrd')
Xen_disk_path = os.path.join(_image_dir, 'default-xen-dimage')
Xen_secondary_disk_path = os.path.join(_image_dir, 'default-xen-dimage.2ND')
Xen_default_disk_dev = 'xvda'
-Xen_default_mac = '11:22:33:aa:bb:cc'
+Xen_default_mac = '88:22:33:aa:bb:cc'
# vxml.KVMXML
KVM_default_emulator = '/usr/bin/qemu-system-x86_64'
@@ -88,7 +88,7 @@ KVM_disk_path = os.path.join(_image_dir, 'default-kvm-dimage')
KVM_secondary_disk_path = os.path.join(_image_dir, 'default-kvm-dimage.2ND')
KVM_default_disk_dev = 'hda'
KVM_default_cdrom_dev = 'hdc'
-KVM_default_mac = '11:22:33:aa:bb:cc'
+KVM_default_mac = '88:22:33:aa:bb:cc'
# vxml.XenFVXML
s, o = platform.architecture()
@@ -109,7 +109,7 @@ LXC_default_emulator = '/usr/libexec/libvirt_lxc'
LXC_default_tty = '/dev/ptmx'
LXC_default_mp = '/tmp'
LXC_default_source = '/var/lib/libvirt/images/lxc_files'
-LXC_default_mac = '11:22:33:aa:bb:cc'
+LXC_default_mac = '88:22:33:aa:bb:cc'
LXC_netns_support = False
parser = OptionParser()
diff --git a/suites/libvirt-cim/lib/XenKvmLib/test_xml.py b/suites/libvirt-cim/lib/XenKvmLib/test_xml.py
index b32ae4c..914dbb0 100755
--- a/suites/libvirt-cim/lib/XenKvmLib/test_xml.py
+++ b/suites/libvirt-cim/lib/XenKvmLib/test_xml.py
@@ -42,7 +42,7 @@ kernel_path = os.path.join(image_dir, 'default-xen-kernel')
init_path = os.path.join(image_dir, 'default-xen-initrd')
disk_path = os.path.join(image_dir, 'default-xen-dimage')
-default_mac = '11:22:33:aa:bb:cc'
+default_mac = '88:22:33:aa:bb:cc'
def testxml(test_dom="domU1", mem = 128, vcpus = 1, mac = default_mac,
disk_file_path = disk_path, disk = "xvda"):
--
1.8.1.4
11 years, 8 months
Re: [Libvirt-cim] [PATCH 1/9] Need to check "slp=true", not just "slp" since "slp=false" is possible
by WangXu
Reviewed-by: Xu Wang <cngesaint(a)gmail.com>
> .../libvirt-cim/cimtest/Profile/04_verify_libvirt_cim_slp_profiles.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/suites/libvirt-cim/cimtest/Profile/04_verify_libvirt_cim_slp_profiles.py b/suites/libvirt-cim/cimtest/Profile/04_verify_libvirt_cim_slp_profiles.py
> index f6cf5b1..f08d157 100644
> --- a/suites/libvirt-cim/cimtest/Profile/04_verify_libvirt_cim_slp_profiles.py
> +++ b/suites/libvirt-cim/cimtest/Profile/04_verify_libvirt_cim_slp_profiles.py
> @@ -64,7 +64,7 @@ def get_slp_info(server):
> logger.info("Test not supported for sfcb yet ... hence skipping")
> return SKIP
>
> - cmd = "cimconfig -l -p | grep slp"
> + cmd = "cimconfig -l -p | grep slp=true"
> rc, out = run_remote(server, cmd)
> if rc != 0:
> logger.error("SLP is not enabled for the cimserver on '%s'", server)
> --
> 1.8.1.4
11 years, 8 months
Release of libvirt-cim-0.6.2
by Daniel Veillard
Based on feedback last week, I also release libvirt-cim-0.6.2
it is tagged in git and pushed on the ftp:
ftp://libvirt.org/libvirt-cim/
It includes the recent set of patches made by Wenchao Xia and John
Ferlan plus of a few older patches from last year:
libxkutil: set domain->dype to unknown by default (Wenchao Xia)
register: Adjust the chatter output (John Ferlan)
DevicePool: Use the virConnectListAll interfaces (John Ferlan)
libxkutil: Use virConnectListAllDomains() to fetch domains (John Ferlan)
xmlgen: Only support script on bridge for xen domains (John Ferlan)
Remove empty newline at bottom (John Ferlan)
libvirt-cim.spec: Use systemctl for tog-pegasus restart (John Ferlan)
Makefile.am: Remove the $(top_srcdir) from subst command (John Ferlan)
migration: allow ssh based migration with non root's key file (Wenchao Xia)
misc_util: better way to read config (Wenchao Xia)
VSSD: report success if not all VS fail in enum (Wenchao Xia)
CSI: Move native CSI code together (Wenchao Xia)
CSI Discard libvirt event by default (Wenchao Xia)
device parsing, add debug print (Wenchao Xia)
DevicePool, reimplement get_diskpool_config with libvirt (Wenchao Xia)
CSI, add lock to protect shared data in lifecycle_thread (Wenchao Xia)
CSI, DevicePool, RASDIndication: fix debug print crash (Wenchao Xia)
do not deregister virt classes in yum upgrade (Wenchao Xia)
SDC: use property BootDevices instead of BootDevice (Wenchao Xia)
SDC: Fix spelling for property IsFullVirt (Wenchao Xia)
Remove property CreationClassName in some instance (Wenchao Xia)
fix id parsing with white space (Wenchao Xia)
Fix an incomplete substitution in Makefile (Klaus Kaempf)
distinguish running or inactive state (Wenchao Xia)
Fix possible memory leaks (Eduardo Lima (Etrunko))
Pool Refresh Patch2 (Gareth S. Bestor)
CSI: Only execute callback if indications are enabled (Eduardo Lima (Etrunko))
CSI: Fix log messages (Eduardo Lima (Etrunko))
CSI: Cleanup code (Eduardo Lima (Etrunko))
Plan9fs (aka 9pfs, VirtFS) support for QEMU/KVM environment (Deepak C Shetty)
I also pushed an uncontroversial spec file update based on
the Fedora spec file, but it is not included in the release in case
some adjustments are needed,
thanks everybody for your contributions !
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
11 years, 8 months
[PATCH 0/3] cimtest follow patch
by Wenchao Xia
This is a patch follows John's 9 patches for cimtest, after it
cimtest should only fail 3 case on RH6.4:
HostSystem - 01_enum.py: FAIL
HostSystem - 03_hs_to_settdefcap.py: FAIL
VirtualSystemManagementService - 19_definenetwork_ers.py: FAIL
This patch is only for review and test, it may need adjust and merge
with John's patch, and change to author name(not root :|), please
do not push directly.
root (3):
test: common_util, use number to check version
test: rasd use int as comparation condtion for libvirt version
test: RPCS fix nfs issue
.../12_create_netfs_storagevolume_errs.py | 2 +-
suites/libvirt-cim/lib/XenKvmLib/common_util.py | 32 ++++++++++++++++---
suites/libvirt-cim/lib/XenKvmLib/pool.py | 8 ++--
suites/libvirt-cim/lib/XenKvmLib/rasd.py | 7 ++--
4 files changed, 36 insertions(+), 13 deletions(-)
11 years, 8 months
Re: [Libvirt-cim] [PATCH] SwitchService: make command configurable
by WangXu
Dear John,
What's your opinion about my solution? If no problem, we'll develop patch as described. ver. 0.6.2 has to be released as soon as possible:-)
Sincerely yours,
Xu Wang
From: cngesaint(a)outlook.com
To: libvirt-cim(a)redhat.com
Date: Wed, 10 Apr 2013 10:20:34 +0000
Subject: Re: [Libvirt-cim] [PATCH] SwitchService: make command configurable
I think the "vsi_search_string be an array" problem could be solved as following steps:
1. An item such as (vsi_support_key_string="{supported forwarding mode: (0x40) reflective relay, supported capabilities: (0x7) RTE ECP VDP}";) is configured well in the .conf file.
2. The application read this value from .conf file as a long string.
3. The application executes supporting function about VSI and check whether the output returned is a substring of vsi_support_key_string. If the output contains in the vsi_support_key_string, supporting of VSI is proved.
Sincerely yours,
Xu Wang
>On 04/09/2013 06:40 AM, Wenchao Xia wrote:
>> Hi, John
>> Sorry to interrupt but still need you to review this patch, which
>>make it work more flex on different version.
>> By the way, I got only 3 fail and they seems small problems in test
>> suit's code, do you think it is ready to release 0.6.2(with this patch
>> pushed)?
>>
I don't have 'lldptool' installed on my system, so I cannot verify the
output or the fix.
>
>What concerns me though is the reliance on something that could (and
does) change between versions. >What you have is just "two" versions of
differences. What if there's a 3rd version that had/has >something
different? Is the output different on different archs/OS's?
>
>Is there no way to make the vsi_search_string be an array in the
configuration file? Rather than two >constant strings.
>
>I suppose what you have works, but it seems there has to be a better way
to do this. I also think the >comments in the .conf file could be beefed
up so someone would know what to look for. Is that a >specific field in
the output or is that string what is returned. Essentially how would
someone know >what to look for in order to add a new/different string.
>
>Call this a "luke-warm" ACK. It works, but I think it's a shortcut.
>
>John
>
>
>
>>> In RH6.4 lldptool query command and output changed a bit,
......
_______________________________________________
Libvirt-cim mailing list
Libvirt-cim(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim
11 years, 8 months
Tyrel Datwyler is out of the office.
by Tyrel Datwyler
I will be out of the office starting 04/11/2013 and will not return until
04/15/2013.
During this time I will not have access to email.
11 years, 8 months
Re: [Libvirt-cim] [PATCH] SwitchService: make command configurable
by WangXu
I think the "vsi_search_string be an array" problem could be solved as following steps:
1. An item such as (vsi_support_key_string="{supported forwarding mode: (0x40) reflective relay, supported capabilities: (0x7) RTE ECP VDP}";) is configured well in the .conf file.
2. The application read this value from .conf file as a long string.
3. The application executes supporting function about VSI and check whether the output returned is a substring of vsi_support_key_string. If the output contains in the vsi_support_key_string, supporting of VSI is proved.
Sincerely yours,
Xu Wang
>On 04/09/2013 06:40 AM, Wenchao Xia wrote:
>> Hi, John
>> Sorry to interrupt but still need you to review this patch, which
>>make it work more flex on different version.
>> By the way, I got only 3 fail and they seems small problems in test
>> suit's code, do you think it is ready to release 0.6.2(with this patch
>> pushed)?
>>
I don't have 'lldptool' installed on my system, so I cannot verify the
output or the fix.
>
>What concerns me though is the reliance on something that could (and
does) change between versions. >What you have is just "two" versions of
differences. What if there's a 3rd version that had/has >something
different? Is the output different on different archs/OS's?
>
>Is there no way to make the vsi_search_string be an array in the
configuration file? Rather than two >constant strings.
>
>I suppose what you have works, but it seems there has to be a better way
to do this. I also think the >comments in the .conf file could be beefed
up so someone would know what to look for. Is that a >specific field in
the output or is that string what is returned. Essentially how would
someone know >what to look for in order to add a new/different string.
>
>Call this a "luke-warm" ACK. It works, but I think it's a shortcut.
>
>John
>
>
>
>>> In RH6.4 lldptool query command and output changed a bit,
......
11 years, 8 months
[PATCH 0/2] Add version comparison method for virsh_version output
by John Ferlan
I believe this set of patches should be applied instead of those from
https://www.redhat.com/archives/libvirt-cim/2013-April/msg00006.html
I suppose we could consider combining the two functions; however, there
are a couple place where the return version string is compared more than
once, so I kept both interfaces.
The vxml change is just an informative message that showed me the name
of the image that was failing - I had created 'default-kvm-dimage.img'
and tests were failing to find 'default-kvm-dimage' to place into the
cimtest storage pool.
John Ferlan (2):
vxml: Add which volume could not be found to error message
Add and utilize virsh_version_cmp
.../08_CreateDiskResourcePool.py | 4 ++--
.../10_create_storagevolume.py | 6 ++++--
.../11_create_dir_storagevolume_errs.py | 5 +++--
.../12_create_netfs_storagevolume_errs.py | 5 +++--
.../13_delete_storagevolume.py | 5 +++--
.../14_delete_storagevolume_errs.py | 5 +++--
.../ResourcePoolConfigurationService/15_DiskPoolAutostart.py | 4 ++--
.../cimtest/SettingsDefineCapabilities/01_forward.py | 1 -
.../VirtualSystemManagementService/19_definenetwork_ers.py | 8 ++++----
suites/libvirt-cim/lib/XenKvmLib/common_util.py | 9 +++++----
suites/libvirt-cim/lib/XenKvmLib/pool.py | 6 +++---
suites/libvirt-cim/lib/XenKvmLib/rasd.py | 10 ++++++----
suites/libvirt-cim/lib/XenKvmLib/vxml.py | 4 ++--
suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py | 6 ++++++
14 files changed, 46 insertions(+), 32 deletions(-)
--
1.8.1.4
11 years, 8 months
[PATCH] SwitchService: make command configurable
by Wenchao Xia
In RH6.4 lldptool query command and output changed a bit,
to make it work on different version, the string used in search and
options used in lldptool command should be set in configuration file.
Signed-off-by: Wenchao Xia <xiawenc(a)linux.vnet.ibm.com>
---
libvirt-cim.conf | 12 ++++++++++++
libxkutil/misc_util.c | 27 +++++++++++++++++++++++++++
libxkutil/misc_util.h | 4 +++-
src/Virt_SwitchService.c | 31 ++++++++++++++++++++++++-------
4 files changed, 66 insertions(+), 8 deletions(-)
diff --git a/libvirt-cim.conf b/libvirt-cim.conf
index 37d7b0f..40fc94a 100644
--- a/libvirt-cim.conf
+++ b/libvirt-cim.conf
@@ -30,3 +30,15 @@
# Default value: NULL, that is not set.
#
# migrate_ssh_temp_key = "/root/vm_migrate_tmp_id_rsa";
+
+# lldptool_query_options (string)
+# Defines the command used in SwitchService to query VEPA support, will be
+# used as "lldptool -i [INTERFACE] [OPTIONS]"
+#
+# lldptool_query_options = "-t -g ncb -V evbcfg";
+
+# vsi_search_string (string)
+# Defines the string used in SwitchService to search in lldptool's output
+#
+# vsi_search_string0 = "supported forwarding mode: (0x40) reflective relay";
+# vsi_search_string1 = "supported capabilities: (0x7) RTE ECP VDP";
diff --git a/libxkutil/misc_util.c b/libxkutil/misc_util.c
index 00eb4b1..1a9a1b4 100644
--- a/libxkutil/misc_util.c
+++ b/libxkutil/misc_util.c
@@ -236,6 +236,33 @@ const char *get_mig_ssh_tmp_key(void)
return prop.value_string;
}
+const char *get_lldptool_query_options(void)
+{
+ static LibvirtcimConfigProperty prop = {
+ "lldptool_query_options", CONFIG_STRING, {0}, 0};
+
+ libvirt_cim_config_get(&prop);
+ return prop.value_string;
+}
+
+const char *get_vsi_search_string0(void)
+{
+ static LibvirtcimConfigProperty prop = {
+ "vsi_search_string0", CONFIG_STRING, {0}, 0};
+
+ libvirt_cim_config_get(&prop);
+ return prop.value_string;
+}
+
+const char *get_vsi_search_string1(void)
+{
+ static LibvirtcimConfigProperty prop = {
+ "vsi_search_string1", CONFIG_STRING, {0}, 0};
+
+ libvirt_cim_config_get(&prop);
+ return prop.value_string;
+}
+
virConnectPtr connect_by_classname(const CMPIBroker *broker,
const char *classname,
CMPIStatus *s)
diff --git a/libxkutil/misc_util.h b/libxkutil/misc_util.h
index 0f52290..06a37cc 100644
--- a/libxkutil/misc_util.h
+++ b/libxkutil/misc_util.h
@@ -154,7 +154,9 @@ int virt_set_status(const CMPIBroker *broker,
/* get libvirt-cim config */
const char *get_mig_ssh_tmp_key(void);
-
+const char *get_lldptool_query_options(void);
+const char *get_vsi_search_string0(void);
+const char *get_vsi_search_string1(void);
/*
* Local Variables:
* mode: C
diff --git a/src/Virt_SwitchService.c b/src/Virt_SwitchService.c
index 8991426..103f125 100644
--- a/src/Virt_SwitchService.c
+++ b/src/Virt_SwitchService.c
@@ -46,13 +46,24 @@ static CMPIStatus check_vsi_support(char *command)
CMPIStatus s = {CMPI_RC_OK, NULL};
char buff[MAX_LEN];
FILE *stream = NULL;
- const char *searchStr[] = {" supported forwarding mode: "
- "(0x40) reflective relay",
- " supported capabilities: "
- "(0x07) RTE ECP VDP",
- NULL};
+ const char *string0 = get_vsi_search_string0();
+ const char *string1 = get_vsi_search_string1();
+ const char *searchStr[3];
int matched = 0;
+ if (!string0) {
+ string0 = " supported forwarding mode: "
+ "(0x40) reflective relay";
+ }
+ if (!string1) {
+ string1 = " supported capabilities: "
+ "(0x7) RTE ECP VDP";
+ }
+ CU_DEBUG("vsi searching for string [%s] [%s]", string0, string1);
+ searchStr[0] = string0;
+ searchStr[1] = string1;
+ searchStr[2] = NULL;
+
// Run lldptool command to find vsi support.
stream = popen(command, "r");
if (stream == NULL) {
@@ -214,6 +225,7 @@ static CMPIStatus get_switchservice(const CMPIObjectPath *reference,
int i;
char **if_list;
char cmd[MAX_LEN];
+ const char *lldptool_query_options = NULL;
*_inst = NULL;
conn = connect_by_classname(broker, CLASSNAME(reference), &s);
@@ -257,10 +269,15 @@ static CMPIStatus get_switchservice(const CMPIObjectPath *reference,
CU_DEBUG("Found %d interfaces", count);
+ lldptool_query_options = get_lldptool_query_options();
+ if (!lldptool_query_options) {
+ lldptool_query_options = "-t -g ncb -V evbcfg";
+ }
for (i=0; i<count; i++) {
- sprintf(cmd, "lldptool -i %s -t -V evbcfg", if_list[i]);
- CU_DEBUG("running command %s ...", cmd);
+ sprintf(cmd, "lldptool -i %s %s",
+ if_list[i], lldptool_query_options);
+ CU_DEBUG("running command [%s]", cmd);
s = check_vsi_support(cmd);
if (s.rc == CMPI_RC_OK) {
vsi = true;
--
1.7.1
11 years, 8 months