summaryrefslogtreecommitdiff
path: root/plugins/modules/vyos_static_routes.py
diff options
context:
space:
mode:
authorGaige B Paulsen <gaige@cluetrust.com>2024-11-25 16:08:54 -0500
committerGitHub <noreply@github.com>2024-11-25 16:08:54 -0500
commitbf38875af0a7e5166ce0330f16441b7d8b434e6a (patch)
treea01b371d37ae88136eec0d50868da6aebcea1414 /plugins/modules/vyos_static_routes.py
parent04c837af1cf89ff42adc42062df48a0dd209a0e1 (diff)
downloadvyos.vyos-bf38875af0a7e5166ce0330f16441b7d8b434e6a.tar.gz
vyos.vyos-bf38875af0a7e5166ce0330f16441b7d8b434e6a.zip
T6910: fix documentation and argspecs are out of alignment (#358)
chore: update firewall_rules from module fix: update firewall_global from resource model chore: update to sync with resource module chore: update README fix: comment and formatting fix: formatting issues fix: missing imports fix: import and metadata violations fix: interface fixes fix: move the arg spec comment fix: update interface docs fix: remove comments for non-RM versions * T6910: fix documentation and argspecs * T6910: docs: update per review * T6910: docs: fix missing pipe
Diffstat (limited to 'plugins/modules/vyos_static_routes.py')
-rw-r--r--plugins/modules/vyos_static_routes.py40
1 files changed, 24 insertions, 16 deletions
diff --git a/plugins/modules/vyos_static_routes.py b/plugins/modules/vyos_static_routes.py
index df9c501e..76fccaf9 100644
--- a/plugins/modules/vyos_static_routes.py
+++ b/plugins/modules/vyos_static_routes.py
@@ -31,15 +31,22 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
+ANSIBLE_METADATA = {
+ "metadata_version": "1.1",
+ "status": ["preview"],
+ "supported_by": "network",
+}
DOCUMENTATION = """
+---
module: vyos_static_routes
+version_added: '1.0.0'
short_description: Static routes resource module
description: This module manages attributes of static routes on VyOS network devices.
-version_added: 1.0.0
notes:
-- Tested against VyOS 1.1.8 (helium).
-- This module works with connection C(ansible.netcommon.network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
+- Tested against VyOS 1.3.8.
+- This module works with connection C(ansible.netcommon.network_cli).
+ See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
author:
- Rohit Thakur (@rohitthakur2590)
options:
@@ -163,7 +170,6 @@ EXAMPLES = """
- forward_router_address: '2001:db8:2000:2::1'
- forward_router_address: '2001:db8:2000:2::2'
state: merged
-
#
#
# -------------------------
@@ -708,12 +714,12 @@ EXAMPLES = """
- address_families:
- afi: ipv6
routes:
- - dest: 2001:db8:1000::/36
+ - dest: '2001:db8:1000::/36'
blackhole_config:
distance: 2
next_hops:
- - forward_router_address: 2001:db8:2000:2::1
- - forward_router_address: 2001:db8:2000:2::2
+ - forward_router_address: '2001:db8:2000:2::1'
+ - forward_router_address: '2001:db8:2000:2::2'
state: rendered
#
#
@@ -739,13 +745,13 @@ EXAMPLES = """
#
- name: Parse the provided running configuration
vyos.vyos.vyos_static_routes:
- running_config:
- "set protocols static route 192.0.2.32/28 'blackhole'
- set protocols static route 192.0.2.32/28 next-hop '192.0.2.6'
- set protocols static route 192.0.2.32/28 next-hop '192.0.2.7'
- set protocols static route6 2001:db8:1000::/36 blackhole distance '2'
- set protocols static route6 2001:db8:1000::/36 next-hop '2001:db8:2000:2::1'
- set protocols static route6 2001:db8:1000::/36 next-hop '2001:db8:2000:2::2'"
+ running_config: |
+ set protocols static route 192.0.2.32/28 'blackhole'
+ set protocols static route 192.0.2.32/28 next-hop '192.0.2.6'
+ set protocols static route 192.0.2.32/28 next-hop '192.0.2.7'
+ set protocols static route6 2001:db8:1000::/36 blackhole distance '2'
+ set protocols static route6 2001:db8:1000::/36 next-hop '2001:db8:2000:2::1'
+ set protocols static route6 2001:db8:1000::/36 next-hop '2001:db8:2000:2::2'
state: parsed
#
#
@@ -878,14 +884,14 @@ RETURN = """
before:
description: The configuration prior to the model invocation.
returned: always
- type: list
+ type: dict
sample: >
The configuration returned will always be in the same format
of the parameters above.
after:
description: The resulting configuration model invocation.
returned: when changed
- type: list
+ type: dict
sample: >
The configuration returned will always be in the same format
of the parameters above.
@@ -896,6 +902,7 @@ commands:
sample:
- "set protocols static route 192.0.2.32/28 next-hop '192.0.2.6'"
- "set protocols static route 192.0.2.32/28 'blackhole'"
+
"""
@@ -930,6 +937,7 @@ def main():
supports_check_mode=True,
mutually_exclusive=mutually_exclusive,
)
+
result = Static_routes(module).execute_module()
module.exit_json(**result)