Skip to content

Commit

Permalink
chore: auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Oct 28, 2024
1 parent 29bd8ed commit c3112eb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions plugins/module_utils/network/iosxr/rm_templates/route_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,11 @@ def __init__(self, lines=None, module=None):
"policies": {
"set": {
"local_preference": [
"{{ local_preference }}"
]
}
}
}
"{{ local_preference }}",
],
},
},
},
},
{
"name": "set.aigp_metric",
Expand Down
15 changes: 7 additions & 8 deletions tests/unit/modules/network/iosxr/test_iosxr_route_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)
self.assertEqual(parsd_lst, res)

0 comments on commit c3112eb

Please sign in to comment.