From e660b9c9a36a095588d9952cfe0e6396dc40d0c7 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Sat, 31 Oct 2020 00:10:21 -0400 Subject: Release 1.1.0 prep (#97) Release 1.1.0 prep Reviewed-by: https://github.com/apps/ansible-zuul --- docs/vyos.vyos.vyos_ospf_interfaces_module.rst | 1204 ++++++++++++++++++++++++ 1 file changed, 1204 insertions(+) create mode 100644 docs/vyos.vyos.vyos_ospf_interfaces_module.rst (limited to 'docs/vyos.vyos.vyos_ospf_interfaces_module.rst') diff --git a/docs/vyos.vyos.vyos_ospf_interfaces_module.rst b/docs/vyos.vyos.vyos_ospf_interfaces_module.rst new file mode 100644 index 0000000..0417088 --- /dev/null +++ b/docs/vyos.vyos.vyos_ospf_interfaces_module.rst @@ -0,0 +1,1204 @@ +.. _vyos.vyos.vyos_ospf_interfaces_module: + + +****************************** +vyos.vyos.vyos_ospf_interfaces +****************************** + +**OSPF Interfaces Resource Module.** + + +Version added: 1.2.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- This module manages OSPF configuration of interfaces on devices running VYOS. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ list + / elements=dictionary +
+
+ +
A list of OSPF configuration for interfaces.
+
+
+ address_family + +
+ list + / elements=dictionary +
+
+ +
OSPF settings on the interfaces in address-family context.
+
+
+ afi + +
+ string + / required +
+
+
    Choices: +
  • ipv4
  • +
  • ipv6
  • +
+
+
Address Family Identifier (AFI) for OSPF settings on the interfaces.
+
+
+ authentication + +
+ dictionary +
+
+ +
Authentication settings on the interface.
+
+
+ md5_key + +
+ dictionary +
+
+ +
md5 parameters.
+
+
+ key + +
+ string +
+
+ +
md5 key.
+
+
+ key_id + +
+ integer +
+
+ +
key id.
+
+
+ plaintext_password + +
+ string +
+
+ +
Plain Text password.
+
+
+ bandwidth + +
+ integer +
+
+ +
Bandwidth of interface (kilobits/sec)
+
+
+ cost + +
+ integer +
+
+ +
metric associated with interface.
+
+
+ dead_interval + +
+ integer +
+
+ +
Time interval to detect a dead router.
+
+
+ hello_interval + +
+ integer +
+
+ +
Timer interval between transmission of hello packets.
+
+
+ ifmtu + +
+ integer +
+
+ +
interface MTU.
+
+
+ instance + +
+ string +
+
+ +
Instance ID.
+
+
+ mtu_ignore + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
if True, Disable MTU check for Database Description packets.
+
+
+ network + +
+ string +
+
+ +
Interface type.
+
+
+ passive + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
If True, disables forming adjacency.
+
+
+ priority + +
+ integer +
+
+ +
Interface priority.
+
+
+ retransmit_interval + +
+ integer +
+
+ +
LSA retransmission interval.
+
+
+ transmit_delay + +
+ integer +
+
+ +
LSA transmission delay.
+
+
+ name + +
+ string +
+
+ +
Name/Identifier of the interface.
+
+
+ running_config + +
+ string +
+
+ +
This option is used only with state parsed.
+
The value of this option should be the output received from the IOS device by executing the command sh running-config | section ^interface.
+
The state parsed reads the configuration from running_config option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the parsed key within the result.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • merged ←
  • +
  • replaced
  • +
  • overridden
  • +
  • deleted
  • +
  • gathered
  • +
  • parsed
  • +
  • rendered
  • +
+
+
The state the configuration should be left in.
+
+
+ + + + +Examples +-------- + +.. code-block:: yaml + + # Using merged + # + # Before state: + # ------------- + # + + # @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 + + # After State: + # -------------- + + # vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345' + # set interfaces bonding bond2 ip ospf bandwidth '70' + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth1 ip ospf network 'point-to-point' + # set interfaces ethernet eth1 ip ospf priority '26' + # set interfaces ethernet eth1 ip ospf transmit-delay '50' + # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' + + # "after": [ + # " + # "address_family": [ + # { + # "afi": "ipv4", + # "authentication": { + # "md5_key": { + # "key": "1111111111232345", + # "key_id": 10 + # } + # }, + # "bandwidth": 70, + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "network": "point-to-point", + # "priority": 26, + # "transmit_delay": 50 + # }, + # { + # "afi": "ipv6", + # "dead_interval": 39 + # } + # ], + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "before": [ + # { + # "name": "eth0" + # }, + # { + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "changed": true, + # "commands": [ + # "set interfaces ethernet eth1 ip ospf transmit-delay 50", + # "set interfaces ethernet eth1 ip ospf priority 26", + # "set interfaces ethernet eth1 ip ospf network point-to-point", + # "set interfaces ethernet eth1 ipv6 ospfv3 dead-interval 39", + # "set interfaces bonding bond2 ip ospf transmit-delay 45", + # "set interfaces bonding bond2 ip ospf bandwidth 70", + # "set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key 1111111111232345", + # "set interfaces bonding bond2 ipv6 ospfv3 passive" + # ], + + + + + # Using replaced: + + # Before State: + # ------------ + + # vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345' + # set interfaces bonding bond2 ip ospf bandwidth '70' + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth1 ip ospf network 'point-to-point' + # set interfaces ethernet eth1 ip ospf priority '26' + # 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 + + # After State: + # ----------- + + # vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth1 ip ospf cost '100' + # set interfaces ethernet eth1 ipv6 ospfv3 ifmtu '33' + # vyos@vyos:~$ + + # Module Execution + # ---------------- + # "after": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "cost": 100 + # }, + # { + # "afi": "ipv6", + # "ifmtu": 33 + # } + # ], + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "before": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "authentication": { + # "md5_key": { + # "key": "1111111111232345", + # "key_id": 10 + # } + # }, + # "bandwidth": 70, + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "network": "point-to-point", + # "priority": 26, + # "transmit_delay": 50 + # }, + # { + # "afi": "ipv6", + # "dead_interval": 39 + # } + # ], + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "changed": true, + # "commands": [ + # "set interfaces ethernet eth1 ip ospf cost 100", + # "set interfaces ethernet eth1 ipv6 ospfv3 ifmtu 33", + # "delete interfaces ethernet eth1 ip ospf network point-to-point", + # "delete interfaces ethernet eth1 ip ospf priority 26", + # "delete interfaces ethernet eth1 ip ospf transmit-delay 50", + # "delete interfaces ethernet eth1 ipv6 ospfv3 dead-interval 39", + # "delete interfaces bonding bond2 ip ospf authentication", + # "delete interfaces bonding bond2 ip ospf bandwidth 70" + # ], + # + + # Using Overridden: + # ----------------- + + # Before State: + # ------------ + + # vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345' + # set interfaces bonding bond2 ip ospf bandwidth '70' + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth1 ip ospf cost '100' + # set interfaces ethernet eth1 ip ospf network 'point-to-point' + # set interfaces ethernet eth1 ip ospf priority '26' + # set interfaces ethernet eth1 ip ospf transmit-delay '50' + # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' + # 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 + # After State: + # ----------- + + # 200~vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces ethernet eth0 ip ospf cost '100' + # set interfaces ethernet eth0 ipv6 ospfv3 ifmtu '33' + # set interfaces ethernet eth0 ipv6 ospfv3 'passive' + # vyos@vyos:~$ + # + # + # "after": [ + # { + # "name": "bond2" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "cost": 100 + # }, + # { + # "afi": "ipv6", + # "ifmtu": 33, + # "passive": true + # } + # ], + # "name": "eth0" + # }, + # { + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "before": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "authentication": { + # "md5_key": { + # "key": "1111111111232345", + # "key_id": 10 + # } + # }, + # "bandwidth": 70, + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "cost": 100, + # "network": "point-to-point", + # "priority": 26, + # "transmit_delay": 50 + # }, + # { + # "afi": "ipv6", + # "dead_interval": 39, + # "ifmtu": 33 + # } + # ], + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "changed": true, + # "commands": [ + # "delete interfaces bonding bond2 ip ospf", + # "delete interfaces bonding bond2 ipv6 ospfv3", + # "delete interfaces ethernet eth1 ip ospf", + # "delete interfaces ethernet eth1 ipv6 ospfv3", + # "set interfaces ethernet eth0 ip ospf cost 100", + # "set interfaces ethernet eth0 ipv6 ospfv3 ifmtu 33", + # "set interfaces ethernet eth0 ipv6 ospfv3 passive" + # ], + # + + # Using deleted: + # ------------- + + # before state: + # ------------- + + # vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345' + # set interfaces bonding bond2 ip ospf bandwidth '70' + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth0 ip ospf cost '100' + # set interfaces ethernet eth0 ipv6 ospfv3 ifmtu '33' + # set interfaces ethernet eth0 ipv6 ospfv3 'passive' + # set interfaces ethernet eth1 ip ospf network 'point-to-point' + # set interfaces ethernet eth1 ip ospf priority '26' + # set interfaces ethernet eth1 ip ospf transmit-delay '50' + # 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 + + # After State: + # ----------- + + # vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345' + # set interfaces bonding bond2 ip ospf bandwidth '70' + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth1 ip ospf network 'point-to-point' + # set interfaces ethernet eth1 ip ospf priority '26' + # set interfaces ethernet eth1 ip ospf transmit-delay '50' + # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' + # vyos@vyos:~$ + # + # + # "after": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "authentication": { + # "md5_key": { + # "key": "1111111111232345", + # "key_id": 10 + # } + # }, + # "bandwidth": 70, + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "network": "point-to-point", + # "priority": 26, + # "transmit_delay": 50 + # }, + # { + # "afi": "ipv6", + # "dead_interval": 39 + # } + # ], + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "before": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "authentication": { + # "md5_key": { + # "key": "1111111111232345", + # "key_id": 10 + # } + # }, + # "bandwidth": 70, + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "cost": 100 + # }, + # { + # "afi": "ipv6", + # "ifmtu": 33, + # "passive": true + # } + # ], + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "network": "point-to-point", + # "priority": 26, + # "transmit_delay": 50 + # }, + # { + # "afi": "ipv6", + # "dead_interval": 39 + # } + # ], + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "changed": true, + # "commands": [ + # "delete interfaces ethernet eth0 ip ospf", + # "delete interfaces ethernet eth0 ipv6 ospfv3" + # ], + # + # Using parsed: + # parsed.cfg: + + # set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345' + # set interfaces bonding bond2 ip ospf bandwidth '70' + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth0 ip ospf cost '50' + # set interfaces ethernet eth0 ip ospf priority '26' + # set interfaces ethernet eth0 ipv6 ospfv3 instance-id '33' + # set interfaces ethernet eth0 ipv6 ospfv3 'mtu-ignore' + # set interfaces ethernet eth1 ip ospf network 'point-to-point' + # set interfaces ethernet eth1 ip ospf priority '26' + # set interfaces ethernet eth1 ip ospf transmit-delay '50' + # 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 + + # Module Execution: + # ---------------- + + # "parsed": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "authentication": { + # "md5_key": { + # "key": "1111111111232345", + # "key_id": 10 + # } + # }, + # "bandwidth": 70, + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "cost": 50, + # "priority": 26 + # }, + # { + # "afi": "ipv6", + # "instance": "33", + # "mtu_ignore": true + # } + # ], + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "network": "point-to-point", + # "priority": 26, + # "transmit_delay": 50 + # }, + # { + # "afi": "ipv6", + # "dead_interval": 39 + # } + # ], + # "name": "eth1" + # } + # ] + + # 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 + + # Module Execution: + # ---------------- + + # "rendered": [ + # "set interfaces ethernet eth1 ip ospf transmit-delay 50", + # "set interfaces ethernet eth1 ip ospf priority 26", + # "set interfaces ethernet eth1 ip ospf network point-to-point", + # "set interfaces ethernet eth1 ipv6 ospfv3 dead-interval 39", + # "set interfaces bonding bond2 ip ospf transmit-delay 45", + # "set interfaces bonding bond2 ip ospf bandwidth 70", + # "set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key 1111111111232345", + # "set interfaces bonding bond2 ipv6 ospfv3 passive" + # ] + # + + # Using Gathered: + # -------------- + + # Native Config: + + # vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345' + # set interfaces bonding bond2 ip ospf bandwidth '70' + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth1 ip ospf network 'point-to-point' + # set interfaces ethernet eth1 ip ospf priority '26' + # set interfaces ethernet eth1 ip ospf transmit-delay '50' + # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' + # vyos@vyos:~$ + + - name: gather configs + vyos.vyos.vyos_ospf_interfaces: + state: gathered + + # Module Execution: + # ----------------- + + # "gathered": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "authentication": { + # "md5_key": { + # "key": "1111111111232345", + # "key_id": 10 + # } + # }, + # "bandwidth": 70, + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "network": "point-to-point", + # "priority": 26, + # "transmit_delay": 50 + # }, + # { + # "afi": "ipv6", + # "dead_interval": 39 + # } + # ], + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + + + + +Status +------ + + +Authors +~~~~~~~ + +- Gomathi Selvi Srinivasan (@GomathiselviS) -- cgit v1.2.3