Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
based on the configuration.
"""

from ansible.module_utils._text import to_text
from ansible.module_utils.six import iteritems
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import utils

Expand Down Expand Up @@ -71,7 +72,7 @@ def populate_facts(self, connection, ansible_facts, data=None):

# transform vrfs into a list
if vrfs:
obj["vrfs"] = sorted(list(obj["vrfs"].values()), key=lambda k, sk="vrf": k[sk])
obj["vrfs"] = sorted(list(obj["vrfs"].values()), key=lambda k, sk="vrf": to_text(k[sk]))
for vrf in obj["vrfs"]:
self._post_parse(vrf)

Expand Down