From e072a5b111eeadfbe334051d6bf3249250d8f7af Mon Sep 17 00:00:00 2001 From: YuandongXu <786018072@qq.com> Date: Sat, 29 Jun 2019 04:03:09 +0800 Subject: [PATCH] update to fix a bug (#58229) Signed-off-by: xuxiaowei0512 <786018072@qq.com> (cherry picked from commit b93411a5b24db638efa149dd5ae0db68df2b0cb3) --- .../modules/network/cloudengine/ce_interface_ospf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/network/cloudengine/ce_interface_ospf.py b/lib/ansible/modules/network/cloudengine/ce_interface_ospf.py index 37fc13c65a5..8594ded6a87 100644 --- a/lib/ansible/modules/network/cloudengine/ce_interface_ospf.py +++ b/lib/ansible/modules/network/cloudengine/ce_interface_ospf.py @@ -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",