diff options
author | Nilashish Chakraborty <nilashishchakraborty8@gmail.com> | 2024-06-25 14:54:01 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-25 14:54:01 +0530 |
commit | b872b6f21d14ff10c221d84217eb568318e9ad8b (patch) | |
tree | 0aacdea877a7e2b209735cd0f7c0b9d62a9446f7 /plugins/modules/vyos_ospf_interfaces.py | |
parent | 37baff3d4d547911bec1387218edfd477ca79062 (diff) | |
download | vyos.vyos-b872b6f21d14ff10c221d84217eb568318e9ad8b.tar.gz vyos.vyos-b872b6f21d14ff10c221d84217eb568318e9ad8b.zip |
`vyos.vyos` is no longer deprecated! 🎉 (#348)
* Remove deprecation notice for vyos.vyos
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
* Add changelog
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
* fix review comments
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
* chore: auto fixes from pre-commit.com hooks
---------
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to 'plugins/modules/vyos_ospf_interfaces.py')
-rw-r--r-- | plugins/modules/vyos_ospf_interfaces.py | 182 |
1 files changed, 88 insertions, 94 deletions
diff --git a/plugins/modules/vyos_ospf_interfaces.py b/plugins/modules/vyos_ospf_interfaces.py index 9a78ebd8..c2326895 100644 --- a/plugins/modules/vyos_ospf_interfaces.py +++ b/plugins/modules/vyos_ospf_interfaces.py @@ -28,6 +28,7 @@ The module file for vyos_ospf_interfaces from __future__ import absolute_import, division, print_function + __metaclass__ = type DOCUMENTATION = """ @@ -58,7 +59,7 @@ options: - Address Family Identifier (AFI) for OSPF settings on the interfaces. type: str choices: ['ipv4', 'ipv6'] - required: True + required: true authentication: description: - Authentication settings on the interface. @@ -161,29 +162,29 @@ EXAMPLES = """ # @vyos:~$ show configuration commands | match "ospf" - - name: Merge provided configuration with device configuration - vyos.vyos.vyos_ospf_interfaces: - config: - - name: "eth1" - address_family: - - afi: "ipv4" - transmit_delay: 50 - priority: 26 - network: "point-to-point" - - afi: "ipv6" - dead_interval: 39 - - name: "bond2" - address_family: - - afi: "ipv4" - transmit_delay: 45 - bandwidth: 70 - authentication: - md5_key: - key_id: 10 - key: "1111111111232345" - - afi: "ipv6" - passive: True - state: merged +- name: Merge provided configuration with device configuration + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth1" + address_family: + - afi: "ipv4" + transmit_delay: 50 + priority: 26 + network: "point-to-point" + - afi: "ipv6" + dead_interval: 39 + - name: "bond2" + address_family: + - afi: "ipv4" + transmit_delay: 45 + bandwidth: 70 + authentication: + md5_key: + key_id: 10 + key: "1111111111232345" + - afi: "ipv6" + passive: true + state: merged # After State: # -------------- @@ -270,9 +271,6 @@ EXAMPLES = """ # "set interfaces bonding bond2 ipv6 ospfv3 passive" # ], - - - # Using replaced: # Before State: @@ -288,22 +286,22 @@ EXAMPLES = """ # set interfaces ethernet eth1 ip ospf transmit-delay '50' # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' - - name: Replace provided configuration with device configuration - vyos.vyos.vyos_ospf_interfaces: - config: - - name: "eth1" - address_family: - - afi: "ipv4" - cost: 100 - - afi: "ipv6" - ifmtu: 33 - - name: "bond2" - address_family: - - afi: "ipv4" - transmit_delay: 45 - - afi: "ipv6" - passive: True - state: replaced +- name: Replace provided configuration with device configuration + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth1" + address_family: + - afi: "ipv4" + cost: 100 + - afi: "ipv6" + ifmtu: 33 + - name: "bond2" + address_family: + - afi: "ipv4" + transmit_delay: 45 + - afi: "ipv6" + passive: true + state: replaced # After State: # ----------- @@ -432,17 +430,18 @@ EXAMPLES = """ # set interfaces ethernet eth1 ipv6 ospfv3 ifmtu '33' # vyos@vyos:~$ - - name: Override device configuration with provided configuration - vyos.vyos.vyos_ospf_interfaces: - config: - - name: "eth0" - address_family: - - afi: "ipv4" - cost: 100 - - afi: "ipv6" - ifmtu: 33 - passive: True - state: overridden +- name: Override device configuration with provided configuration + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth0" + address_family: + - afi: "ipv4" + cost: 100 + - afi: "ipv6" + ifmtu: 33 + passive: true + state: overridden + # After State: # ----------- @@ -561,11 +560,11 @@ EXAMPLES = """ # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' # vyos@vyos:~$ - - name: Delete device configuration - vyos.vyos.vyos_ospf_interfaces: - config: - - name: "eth0" - state: deleted +- name: Delete device configuration + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth0" + state: deleted # After State: # ----------- @@ -708,10 +707,10 @@ EXAMPLES = """ # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' # - - name: parse configs - vyos.vyos.vyos_ospf_interfaces: - running_config: "{{ lookup('file', './parsed.cfg') }}" - state: parsed +- name: parse configs + vyos.vyos.vyos_ospf_interfaces: + running_config: "{{ lookup('file', './parsed.cfg') }}" + state: parsed # Module Execution: # ---------------- @@ -772,29 +771,29 @@ EXAMPLES = """ # Using rendered: # -------------- - - name: Render - vyos.vyos.vyos_ospf_interfaces: - config: - - name: "eth1" - address_family: - - afi: "ipv4" - transmit_delay: 50 - priority: 26 - network: "point-to-point" - - afi: "ipv6" - dead_interval: 39 - - name: "bond2" - address_family: - - afi: "ipv4" - transmit_delay: 45 - bandwidth: 70 - authentication: - md5_key: - key_id: 10 - key: "1111111111232345" - - afi: "ipv6" - passive: True - state: rendered +- name: Render + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth1" + address_family: + - afi: "ipv4" + transmit_delay: 50 + priority: 26 + network: "point-to-point" + - afi: "ipv6" + dead_interval: 39 + - name: "bond2" + address_family: + - afi: "ipv4" + transmit_delay: 45 + bandwidth: 70 + authentication: + md5_key: + key_id: 10 + key: "1111111111232345" + - afi: "ipv6" + passive: true + state: rendered # Module Execution: # ---------------- @@ -827,9 +826,9 @@ EXAMPLES = """ # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' # vyos@vyos:~$ - - name: gather configs - vyos.vyos.vyos_ospf_interfaces: - state: gathered +- name: gather configs + vyos.vyos.vyos_ospf_interfaces: + state: gathered # Module Execution: # ----------------- @@ -880,11 +879,6 @@ EXAMPLES = """ # "name": "eth3" # } # ], - - - - - """ from ansible.module_utils.basic import AnsibleModule |