summaryrefslogtreecommitdiff
path: root/tests/unit/modules
diff options
context:
space:
mode:
authorGomathiselviS <gomathiselvi@gmail.com>2021-05-17 15:26:10 -0400
committerGitHub <noreply@github.com>2021-05-17 19:26:10 +0000
commit58083777641f6e11b84d40de3a35400cda8c08a4 (patch)
tree2d0785fcf751422381bd94b3514bf2eea8f2b074 /tests/unit/modules
parentb40a269ef86aff5928dfda162cad8a7e6884debb (diff)
downloadvyos.vyos-58083777641f6e11b84d40de3a35400cda8c08a4.tar.gz
vyos.vyos-58083777641f6e11b84d40de3a35400cda8c08a4.zip
linters fix (#160)
Replace admin_distance with distance while generating static_routes nexthop command Reviewed-by: https://github.com/apps/ansible-zuul
Diffstat (limited to 'tests/unit/modules')
-rw-r--r--tests/unit/modules/network/vyos/test_vyos_static_routes.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/unit/modules/network/vyos/test_vyos_static_routes.py b/tests/unit/modules/network/vyos/test_vyos_static_routes.py
index 85c0842..d284b66 100644
--- a/tests/unit/modules/network/vyos/test_vyos_static_routes.py
+++ b/tests/unit/modules/network/vyos/test_vyos_static_routes.py
@@ -90,7 +90,8 @@ class TestVyosStaticRoutesModule(TestVyosModule):
dest="192.0.2.48/28",
next_hops=[
dict(
- forward_router_address="192.0.2.9"
+ forward_router_address="192.0.2.9",
+ admin_distance=10,
),
dict(
forward_router_address="192.0.2.10"
@@ -108,6 +109,7 @@ class TestVyosStaticRoutesModule(TestVyosModule):
commands = [
"set protocols static route 192.0.2.48/28",
"set protocols static route 192.0.2.48/28 next-hop '192.0.2.9'",
+ "set protocols static route 192.0.2.48/28 next-hop 192.0.2.9 distance '10'",
"set protocols static route 192.0.2.48/28 next-hop '192.0.2.10'",
]
self.execute_module(changed=True, commands=commands)
@@ -158,7 +160,8 @@ class TestVyosStaticRoutesModule(TestVyosModule):
forward_router_address="192.0.2.9"
),
dict(
- forward_router_address="192.0.2.10"
+ forward_router_address="192.0.2.10",
+ admin_distance=10,
),
],
)
@@ -174,6 +177,7 @@ class TestVyosStaticRoutesModule(TestVyosModule):
"set protocols static route 192.0.2.48/28",
"set protocols static route 192.0.2.48/28 next-hop '192.0.2.9'",
"set protocols static route 192.0.2.48/28 next-hop '192.0.2.10'",
+ "set protocols static route 192.0.2.48/28 next-hop 192.0.2.10 distance '10'",
]
self.execute_module(changed=True, commands=commands)