Backport/2.8/59070 ce_interface : update ce_interface to fix a bug (#59072)

* update ce_interface to fix a bug. (#59070)


(cherry picked from commit 07a598089a)

* add a changelog fragment to PR 59072.
This commit is contained in:
Xu Yuandong 2019-07-18 02:49:09 +08:00 committed by Toshio Kuratomi
parent 3d999dbe39
commit 494ec6d752
2 changed files with 4 additions and 2 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "To find specified interfaces, add a interface-type."

View file

@ -160,7 +160,7 @@ CE_NC_GET_INTFS = """
<interfaces> <interfaces>
<interface> <interface>
<ifName></ifName> <ifName></ifName>
<ifPhyType></ifPhyType> <ifPhyType>%s</ifPhyType>
<ifNumber></ifNumber> <ifNumber></ifNumber>
<ifDescr></ifDescr> <ifDescr></ifDescr>
<ifAdminStatus></ifAdminStatus> <ifAdminStatus></ifAdminStatus>
@ -371,7 +371,7 @@ class Interface(object):
""" get interfaces attributes dict.""" """ get interfaces attributes dict."""
intfs_info = dict() intfs_info = dict()
conf_str = CE_NC_GET_INTFS conf_str = CE_NC_GET_INTFS % self.interface_type
recv_xml = get_nc_config(self.module, conf_str) recv_xml = get_nc_config(self.module, conf_str)
if "<data/>" in recv_xml: if "<data/>" in recv_xml: