Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ce_interface_ospf: update to fix a bug #58229

Merged
merged 1 commit into from
Jun 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/ansible/modules/network/cloudengine/ce_interface_ospf.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def get_ospf_dict(self):

# 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.")

Expand All @@ -435,7 +435,7 @@ def get_ospf_dict(self):
# 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":
Expand All @@ -445,7 +445,7 @@ def get_ospf_dict(self):
# 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",
Expand Down