diff --git a/plugins/module_utils/network/iosxr/argspec/route_maps/route_maps.py b/plugins/module_utils/network/iosxr/argspec/route_maps/route_maps.py index b1512c25..6affbd38 100644 --- a/plugins/module_utils/network/iosxr/argspec/route_maps/route_maps.py +++ b/plugins/module_utils/network/iosxr/argspec/route_maps/route_maps.py @@ -99,9 +99,9 @@ class Route_mapsArgs(object): # pylint: disable=R0903 }, }, "local_preference": { - "type": "list", - "elements":"str" - }, + "type": "list", + "elements": "str", + }, "attribute_set": {"type": "str"}, "c_multicast_routing": { "type": "dict", diff --git a/plugins/module_utils/network/iosxr/rm_templates/route_maps.py b/plugins/module_utils/network/iosxr/rm_templates/route_maps.py index a9d45e59..409108e6 100644 --- a/plugins/module_utils/network/iosxr/rm_templates/route_maps.py +++ b/plugins/module_utils/network/iosxr/rm_templates/route_maps.py @@ -240,11 +240,11 @@ def __init__(self, lines=None, module=None): "policies": { "set": { "local_preference": [ - "{{ local_preference }}" - ] - } - } - } + "{{ local_preference }}", + ], + }, + }, + }, }, { "name": "set.aigp_metric", diff --git a/tests/unit/modules/network/iosxr/test_iosxr_route_maps.py b/tests/unit/modules/network/iosxr/test_iosxr_route_maps.py index 78249835..aa852a0f 100644 --- a/tests/unit/modules/network/iosxr/test_iosxr_route_maps.py +++ b/tests/unit/modules/network/iosxr/test_iosxr_route_maps.py @@ -1277,7 +1277,6 @@ def test_iosxr_route_maps_parsed(self): ] self.assertEqual(parsed_list, result["parsed"]) - def test_iosxr_route_maps_parsed_local_pref_variants(self): set_module_args( dict( @@ -1301,13 +1300,13 @@ def test_iosxr_route_maps_parsed_local_pref_variants(self): "name": "APPLY_TEST_ROUTE_POLICY_COMPLEX", "global": { "set": { - "ospf_metric":232, - "local_preference": ["+100","-100","*700","-800","+600"], + "ospf_metric": 232, + "local_preference": ["+100", "-100", "*700", "-800", "+600"], }, - } - } + }, + }, ] - res=sorted(result["parsed"][0]["global"]["set"].pop("local_preference")) - parsd_lst=sorted(parsed_list[0]["global"]["set"].pop("local_preference")) + res = sorted(result["parsed"][0]["global"]["set"].pop("local_preference")) + parsd_lst = sorted(parsed_list[0]["global"]["set"].pop("local_preference")) - self.assertEqual(parsd_lst, res) \ No newline at end of file + self.assertEqual(parsd_lst, res)