Skip to content

Commit 4f097ef

Browse files
committed
Sort interface list
1 parent 72893b3 commit 4f097ef

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

napalm_ros/ros.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ def get_vlans(self):
508508
ifs = set(chain(untagged, tagged))
509509
result[vid] = {
510510
"name": "",
511-
"interfaces": list(ifs),
511+
"interfaces": sorted(list(ifs)),
512512
}
513513
return result
514514

tests/unit/mocked_data/test_get_vlans/multi/expected_result.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"10": {
33
"name": "",
44
"interfaces": [
5-
"ether2",
6-
"ether1"
5+
"ether1",
6+
"ether2"
77
]
88
},
99
"20": {
1010
"name": "",
1111
"interfaces": [
12-
"ether2",
13-
"ether1"
12+
"ether1",
13+
"ether2"
1414
]
1515
}
1616
}

0 commit comments

Comments
 (0)