update to fix a bug (#58229)
Signed-off-by: xuxiaowei0512 <786018072@qq.com>
(cherry picked from commit b93411a5b2
)
This commit is contained in:
parent
e61ea32779
commit
e072a5b111
1 changed files with 3 additions and 3 deletions
|
@ -424,7 +424,7 @@ class InterfaceOSPF(object):
|
|||
|
||||
# get process base info
|
||||
root = ElementTree.fromstring(xml_str)
|
||||
ospfsite = root.find("data/ospfv2/ospfv2comm/ospfSites/ospfSite")
|
||||
ospfsite = root.find("ospfv2/ospfv2comm/ospfSites/ospfSite")
|
||||
if not ospfsite:
|
||||
self.module.fail_json(msg="Error: ospf process does not exist.")
|
||||
|
||||
|
@ -435,7 +435,7 @@ class InterfaceOSPF(object):
|
|||
# get areas info
|
||||
ospf_info["areaId"] = ""
|
||||
areas = root.find(
|
||||
"data/ospfv2/ospfv2comm/ospfSites/ospfSite/areas/area")
|
||||
"ospfv2/ospfv2comm/ospfSites/ospfSite/areas/area")
|
||||
if areas:
|
||||
for area in areas:
|
||||
if area.tag == "areaId":
|
||||
|
@ -445,7 +445,7 @@ class InterfaceOSPF(object):
|
|||
# get interface info
|
||||
ospf_info["interface"] = dict()
|
||||
intf = root.find(
|
||||
"data/ospfv2/ospfv2comm/ospfSites/ospfSite/areas/area/interfaces/interface")
|
||||
"ospfv2/ospfv2comm/ospfSites/ospfSite/areas/area/interfaces/interface")
|
||||
if intf:
|
||||
for attr in intf:
|
||||
if attr.tag in ["ifName", "networkType",
|
||||
|
|
Loading…
Reference in a new issue