Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions generic_config_updater/gu_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ def _find_leafref_paths(self, path, config):
ref_paths.append(ref_path)
ref_paths_set.add(ref_path)

ref_paths.sort()
return ref_paths

def _get_inner_leaf_xpaths(self, xpath, sy):
Expand Down
18 changes: 9 additions & 9 deletions tests/generic_config_updater/gu_common_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,13 +639,13 @@ def test_find_ref_paths__path_is_table__returns_ref_paths(self):
# Arrange
path = "/PORT"
expected = [
"/ACL_TABLE/NO-NSW-PACL-V4/ports/0",
"/VLAN_MEMBER/Vlan1000|Ethernet0",
"/ACL_TABLE/DATAACL/ports/0",
"/ACL_TABLE/EVERFLOWV6/ports/0",
"/VLAN_MEMBER/Vlan1000|Ethernet4",
"/ACL_TABLE/EVERFLOW/ports/0",
"/ACL_TABLE/EVERFLOWV6/ports/0",
"/ACL_TABLE/EVERFLOWV6/ports/1",
"/ACL_TABLE/NO-NSW-PACL-V4/ports/0",
"/VLAN_MEMBER/Vlan1000|Ethernet0",
"/VLAN_MEMBER/Vlan1000|Ethernet4",
"/VLAN_MEMBER/Vlan1000|Ethernet8"
]

Expand All @@ -659,14 +659,14 @@ def test_find_ref_paths__whole_config_path__returns_all_refs(self):
# Arrange
path = ""
expected = [
"/VLAN_MEMBER/Vlan1000|Ethernet0",
"/VLAN_MEMBER/Vlan1000|Ethernet4",
"/VLAN_MEMBER/Vlan1000|Ethernet8",
"/ACL_TABLE/NO-NSW-PACL-V4/ports/0",
"/ACL_TABLE/DATAACL/ports/0",
"/ACL_TABLE/EVERFLOWV6/ports/0",
"/ACL_TABLE/EVERFLOW/ports/0",
"/ACL_TABLE/EVERFLOWV6/ports/0",
"/ACL_TABLE/EVERFLOWV6/ports/1",
"/ACL_TABLE/NO-NSW-PACL-V4/ports/0",
"/VLAN_MEMBER/Vlan1000|Ethernet0",
"/VLAN_MEMBER/Vlan1000|Ethernet4",
"/VLAN_MEMBER/Vlan1000|Ethernet8",
]

# Act
Expand Down