From cb738721c15ac01f49f66144dae80eb478331f77 Mon Sep 17 00:00:00 2001 From: omnom62 <75066712+omnom62@users.noreply.github.com> Date: Sat, 22 Aug 2026 01:04:18 +1000 Subject: T8989: wave 2 modules: interfaces, l3_interfaces, lag_interfaces, lldp_interfaces, ospfv2/3, ospf_interfaces * T8989: vyos_interfaces * T8989: vyos_interfaces changelog * T8989: vyos_interfaces changelog * T8989: changelog typo * T8989: vyos_l3_interfaces module * T8989: vyos_l3_interfaces module SIT and UAT * T8989: vyos_l3_interfaces doc * T8989: lag_interfaces * T8989: lag interfaces * T8989: lldp_interfaces * T8989: lldp_interfaces module * T8989: SIT updated * T8989: SIT updated * T8989: SIT updated * T8989: typo fixes * T8989: SIT and UAT updates * T8989: ospf_v3 module * T8989: ospf_v3 module * T8989: vyos_ospf_interfaces * T8989: vyos_ospf_interfaces SIT * T8989: vyos_ospf_interfaces SIT * T8989: vyos_ospfv3 SIT and UAT --------- Co-authored-by: John Estabrook --- docs/vyos.rest.vyos_interfaces_module.rst | 356 +++++++ docs/vyos.rest.vyos_l3_interfaces_module.rst | 494 +++++++++ docs/vyos.rest.vyos_lag_interfaces_module.rst | 448 +++++++++ docs/vyos.rest.vyos_lldp_interfaces_module.rst | 470 +++++++++ docs/vyos.rest.vyos_ospf_interfaces_module.rst | 612 ++++++++++++ docs/vyos.rest.vyos_ospfv2_module.rst | 1263 ++++++++++++++++++++++++ docs/vyos.rest.vyos_ospfv3_module.rst | 480 +++++++++ 7 files changed, 4123 insertions(+) create mode 100644 docs/vyos.rest.vyos_interfaces_module.rst create mode 100644 docs/vyos.rest.vyos_l3_interfaces_module.rst create mode 100644 docs/vyos.rest.vyos_lag_interfaces_module.rst create mode 100644 docs/vyos.rest.vyos_lldp_interfaces_module.rst create mode 100644 docs/vyos.rest.vyos_ospf_interfaces_module.rst create mode 100644 docs/vyos.rest.vyos_ospfv2_module.rst create mode 100644 docs/vyos.rest.vyos_ospfv3_module.rst (limited to 'docs') diff --git a/docs/vyos.rest.vyos_interfaces_module.rst b/docs/vyos.rest.vyos_interfaces_module.rst new file mode 100644 index 0000000..8438d9d --- /dev/null +++ b/docs/vyos.rest.vyos_interfaces_module.rst @@ -0,0 +1,356 @@ +.. _vyos.rest.vyos_interfaces_module: + + +************************* +vyos.rest.vyos_interfaces +************************* + +**Manage interface configuration on VyOS devices via REST API.** + + +Version added: 1.0.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Manages L2 interface configuration (description, MTU, speed, duplex, enabled) on VyOS devices using the HTTPS REST API. +- IP address configuration is handled by :ref:`vyos.rest.vyos_l3_interfaces `. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ list + / elements=dictionary +
+
+ +
List of interface configurations.
+
+
+ description + +
+ string +
+
+ +
Interface description.
+
+
+ duplex + +
+ string +
+
+
    Choices: +
  • auto
  • +
  • full
  • +
  • half
  • +
+
+
Interface duplex setting.
+
+
+ enabled + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes ←
  • +
+
+
Whether the interface is enabled. False sets the disable flag.
+
+
+ mtu + +
+ integer +
+
+ +
Interface MTU.
+
+
+ name + +
+ string + / required +
+
+ +
Full interface name (e.g. eth0, bond0, lo).
+
+
+ speed + +
+ string +
+
+
    Choices: +
  • auto
  • +
  • 10
  • +
  • 100
  • +
  • 1000
  • +
  • 2500
  • +
  • 10000
  • +
+
+
Interface speed setting.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • merged ←
  • +
  • replaced
  • +
  • overridden
  • +
  • deleted
  • +
  • gathered
  • +
+
+
merged - Merge config with existing interface settings.
+
replaced - Replace config for listed interfaces.
+
overridden - Replace config for all interfaces.
+
deleted - Remove listed interface config or all interface config.
+
gathered - Read interface config from device without changes.
+
+
+ + + +See Also +-------- + +.. seealso:: + + :ref:`vyos.vyos.vyos_interfaces_module` + The official documentation on the **vyos.vyos.vyos_interfaces** module. + :ref:`vyos.rest.vyos_l3_interfaces_module` + The official documentation on the **vyos.rest.vyos_l3_interfaces** module. + + +Examples +-------- + +.. code-block:: yaml + + - name: Merge interface configuration + vyos.rest.vyos_interfaces: + config: + - name: eth0 + description: Management interface + mtu: 1500 + enabled: true + state: merged + + - name: Disable an interface + vyos.rest.vyos_interfaces: + config: + - name: eth1 + enabled: false + state: merged + + - name: Delete interface description + vyos.rest.vyos_interfaces: + config: + - name: eth0 + state: deleted + + - name: Gather current interface configuration + vyos.rest.vyos_interfaces: + state: gathered + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ after + +
+ list +
+
when changed +
Interface configuration after this module ran.
+
+
+
+ before + +
+ list +
+
always +
Interface configuration before this module ran.
+
+
+
+ commands + +
+ list +
+
always +
List of API command tuples sent to the device.
+
+
+
+ gathered + +
+ list +
+
when state is gathered +
Current interface configuration as structured data.
+
+
+
+ response + +
+ dictionary +
+
when changes are applied +
Raw API response.
+
+
+
+ saved + +
+ boolean +
+
when changes are applied +
Whether the config was saved after changes.
+
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_l3_interfaces_module.rst b/docs/vyos.rest.vyos_l3_interfaces_module.rst new file mode 100644 index 0000000..d251abb --- /dev/null +++ b/docs/vyos.rest.vyos_l3_interfaces_module.rst @@ -0,0 +1,494 @@ +.. _vyos.rest.vyos_l3_interfaces_module: + + +**************************** +vyos.rest.vyos_l3_interfaces +**************************** + +**Manage L3 interface configuration on VyOS devices via REST API.** + + +Version added: 1.0.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Manages IPv4 and IPv6 address configuration on VyOS interfaces using the HTTPS REST API. +- Mirrors ``vyos.vyos.vyos_l3_interfaces`` but uses the HTTP API instead of CLI. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ list + / elements=dictionary +
+
+ +
List of L3 interface configurations.
+
+
+ ipv4 + +
+ list + / elements=dictionary +
+
+ +
List of IPv4 addresses of the interface.
+
+
+ address + +
+ string +
+
+ +
IPv4 address in CIDR notation or dhcp.
+
+
+ ipv6 + +
+ list + / elements=dictionary +
+
+ +
List of IPv6 addresses of the interface.
+
+
+ address + +
+ string +
+
+ +
IPv6 address in CIDR notation, dhcpv6, or auto-config.
+
+
+ name + +
+ string + / required +
+
+ +
Full name of the interface, e.g. eth0, lo.
+
+
+ vifs + +
+ list + / elements=dictionary +
+
+ +
List of virtual sub-interfaces (VLANs).
+
+
+ ipv4 + +
+ list + / elements=dictionary +
+
+ +
List of IPv4 addresses of the VIF.
+
+
+ address + +
+ string +
+
+ +
IPv4 address in CIDR notation or dhcp.
+
+
+ ipv6 + +
+ list + / elements=dictionary +
+
+ +
List of IPv6 addresses of the VIF.
+
+
+ address + +
+ string +
+
+ +
IPv6 address in CIDR notation, dhcpv6, or auto-config.
+
+
+ vlan_id + +
+ integer + / required +
+
+ +
VLAN identifier.
+
+
+ running_config + +
+ string +
+
+ +
Used only with state parsed.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • merged ←
  • +
  • replaced
  • +
  • overridden
  • +
  • deleted
  • +
  • gathered
  • +
  • rendered
  • +
  • parsed
  • +
+
+
merged - Add addresses without removing existing ones.
+
replaced - Replace addresses for listed interfaces.
+
overridden - Replace addresses for all interfaces.
+
deleted - Remove listed or all interface addresses.
+
gathered - Read interface addresses from device without changes.
+
rendered - Return commands for provided config without connecting.
+
parsed - Parse running_config into structured data.
+
+
+ + + +See Also +-------- + +.. seealso:: + + :ref:`vyos.vyos.vyos_l3_interfaces_module` + The official documentation on the **vyos.vyos.vyos_l3_interfaces** module. + :ref:`vyos.rest.vyos_interfaces_module` + The official documentation on the **vyos.rest.vyos_interfaces** module. + + +Examples +-------- + +.. code-block:: yaml + + - name: Merge L3 interface configuration + vyos.rest.vyos_l3_interfaces: + config: + - name: eth0 + ipv4: + - address: 192.0.2.1/24 + - address: dhcp + - name: lo + ipv4: + - address: 10.0.0.1/32 + ipv6: + - address: 2001:db8::1/128 + state: merged + + - name: Add VLAN subinterface addresses + vyos.rest.vyos_l3_interfaces: + config: + - name: eth0 + vifs: + - vlan_id: 100 + ipv4: + - address: 192.0.2.100/24 + state: merged + + - name: Delete all interface addresses + vyos.rest.vyos_l3_interfaces: + state: deleted + + - name: Gather current L3 interface configuration + vyos.rest.vyos_l3_interfaces: + state: gathered + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ after + +
+ list +
+
when changed +
L3 interface configuration after this module ran.
+
+
+
+ before + +
+ list +
+
always +
L3 interface configuration before this module ran.
+
+
+
+ commands + +
+ list +
+
always +
List of API command tuples sent to the device.
+
+
+
+ gathered + +
+ list +
+
when state is gathered +
Current L3 interface configuration as structured data.
+
+
+
+ parsed + +
+ list +
+
when state is parsed +
Structured data parsed from running_config (state=parsed).
+
+
+
+ rendered + +
+ list +
+
when state is rendered +
Commands for the provided config (state=rendered).
+
+
+
+ response + +
+ dictionary +
+
when changes are applied +
Raw API response.
+
+
+
+ saved + +
+ boolean +
+
when changes are applied +
Whether the config was saved after changes.
+
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_lag_interfaces_module.rst b/docs/vyos.rest.vyos_lag_interfaces_module.rst new file mode 100644 index 0000000..49753f0 --- /dev/null +++ b/docs/vyos.rest.vyos_lag_interfaces_module.rst @@ -0,0 +1,448 @@ +.. _vyos.rest.vyos_lag_interfaces_module: + + +***************************** +vyos.rest.vyos_lag_interfaces +***************************** + +**Manage LAG interface configuration on VyOS devices via REST API.** + + +Version added: 1.0.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Manages Link Aggregation Group (LAG/bonding) interface configuration on VyOS devices using the HTTPS REST API. +- Mirrors ``vyos.vyos.vyos_lag_interfaces`` but uses the HTTP API instead of CLI. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ list + / elements=dictionary +
+
+ +
List of LAG interface configurations.
+
+
+ arp_monitor + +
+ dictionary +
+
+ +
ARP link monitoring parameters.
+
+
+ interval + +
+ integer +
+
+ +
ARP monitoring interval in milliseconds.
+
+
+ target + +
+ list + / elements=string +
+
+ +
IP addresses to use for ARP monitoring.
+
+
+ hash_policy + +
+ string +
+
+
    Choices: +
  • layer2
  • +
  • layer2+3
  • +
  • layer3+4
  • +
+
+
Transmit hash policy.
+
+
+ members + +
+ list + / elements=dictionary +
+
+ +
List of member interfaces.
+
+
+ member + +
+ string +
+
+ +
Name of the member interface.
+
+
+ mode + +
+ string +
+
+
    Choices: +
  • 802.3ad
  • +
  • active-backup
  • +
  • broadcast
  • +
  • round-robin
  • +
  • transmit-load-balance
  • +
  • adaptive-load-balance
  • +
  • xor-hash
  • +
+
+
LAG bonding mode.
+
+
+ name + +
+ string + / required +
+
+ +
Name of the LAG interface (e.g. bond0).
+
+
+ primary + +
+ string +
+
+ +
Primary interface for active-backup mode.
+
+
+ running_config + +
+ string +
+
+ +
Used only with state parsed.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • merged ←
  • +
  • replaced
  • +
  • overridden
  • +
  • deleted
  • +
  • gathered
  • +
  • rendered
  • +
  • parsed
  • +
+
+
merged - Merge config with existing LAG settings.
+
replaced - Replace config for listed LAG interfaces.
+
overridden - Replace config for all LAG interfaces.
+
deleted - Remove listed or all LAG interface config.
+
gathered - Read LAG config from device without changes.
+
rendered - Return commands for provided config without connecting.
+
parsed - Parse running_config into structured data.
+
+
+ + + +See Also +-------- + +.. seealso:: + + :ref:`vyos.vyos.vyos_lag_interfaces_module` + The official documentation on the **vyos.vyos.vyos_lag_interfaces** module. + + +Examples +-------- + +.. code-block:: yaml + + - name: Merge LAG interface configuration + vyos.rest.vyos_lag_interfaces: + config: + - name: bond0 + mode: 802.3ad + hash_policy: layer2 + members: + - member: eth1 + - member: eth2 + state: merged + + - name: Delete all LAG interfaces + vyos.rest.vyos_lag_interfaces: + state: deleted + + - name: Gather current LAG configuration + vyos.rest.vyos_lag_interfaces: + state: gathered + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ after + +
+ list +
+
when changed +
LAG configuration after this module ran.
+
+
+
+ before + +
+ list +
+
always +
LAG configuration before this module ran.
+
+
+
+ commands + +
+ list +
+
always +
List of API command tuples sent to the device.
+
+
+
+ gathered + +
+ list +
+
when state is gathered +
Current LAG configuration as structured data.
+
+
+
+ parsed + +
+ list +
+
when state is parsed +
Structured data parsed from running_config (state=parsed).
+
+
+
+ rendered + +
+ list +
+
when state is rendered +
Commands for provided config (state=rendered).
+
+
+
+ response + +
+ dictionary +
+
when changes are applied +
Raw API response.
+
+
+
+ saved + +
+ boolean +
+
when changes are applied +
Whether the config was saved after changes.
+
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_lldp_interfaces_module.rst b/docs/vyos.rest.vyos_lldp_interfaces_module.rst new file mode 100644 index 0000000..c294c79 --- /dev/null +++ b/docs/vyos.rest.vyos_lldp_interfaces_module.rst @@ -0,0 +1,470 @@ +.. _vyos.rest.vyos_lldp_interfaces_module: + + +****************************** +vyos.rest.vyos_lldp_interfaces +****************************** + +**Manage LLDP interface configuration on VyOS devices via REST API.** + + +Version added: 1.0.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Manages per-interface LLDP configuration on VyOS devices using the HTTPS REST API. +- Targets VyOS 1.5+ where LLDP interface mode replaces the legacy disable flag. +- For the disable flag used in VyOS 1.3/1.4, see ``vyos.vyos.vyos_lldp_interfaces``. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ list + / elements=dictionary +
+
+ +
List of LLDP interface configurations.
+
+
+ location + +
+ dictionary +
+
+ +
LLDP-MED location data.
+
+
+ coordinate_based + +
+ dictionary +
+
+ +
Coordinate-based location.
+
+
+ altitude + +
+ integer +
+
+ +
Altitude in meters.
+
+
+ datum + +
+ string +
+
+
    Choices: +
  • WGS84
  • +
  • NAD83
  • +
  • MLLW
  • +
+
+
Coordinate datum type.
+
+
+ latitude + +
+ string + / required +
+
+ +
Latitude (e.g. 33.524449N).
+
+
+ longitude + +
+ string + / required +
+
+ +
Longitude (e.g. 22.267255E).
+
+
+ elin + +
+ string +
+
+ +
Emergency Call Service ELIN number (10-25 digits).
+
+
+ mode + +
+ string +
+
+
    Choices: +
  • disable
  • +
  • rx-tx
  • +
  • rx
  • +
  • tx
  • +
+
+
LLDP administrative mode for this interface.
+
rx-tx sends and receives LLDP frames (default).
+
disable disables LLDP on this interface.
+
rx receives only.
+
tx transmits only.
+
+
+ name + +
+ string + / required +
+
+ +
Name of the interface.
+
+
+ running_config + +
+ string +
+
+ +
Used only with state parsed.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • merged ←
  • +
  • replaced
  • +
  • overridden
  • +
  • deleted
  • +
  • gathered
  • +
  • rendered
  • +
  • parsed
  • +
+
+
merged - Merge config with existing LLDP interface settings.
+
replaced - Replace config for listed interfaces.
+
overridden - Replace config for all LLDP interfaces.
+
deleted - Remove listed or all LLDP interface config.
+
gathered - Read LLDP interface config from device without changes.
+
rendered - Return commands for provided config without connecting.
+
parsed - Parse running_config into structured data.
+
+
+ + +Notes +----- + +.. note:: + - Targets VyOS 1.5+ exclusively. The ``mode`` parameter replaces the ``enable`` boolean used in ``vyos.vyos.vyos_lldp_interfaces`` for VyOS 1.3/1.4. + + +See Also +-------- + +.. seealso:: + + :ref:`vyos.vyos.vyos_lldp_interfaces_module` + The official documentation on the **vyos.vyos.vyos_lldp_interfaces** module. + :ref:`vyos.rest.vyos_lldp_global_module` + The official documentation on the **vyos.rest.vyos_lldp_global** module. + + +Examples +-------- + +.. code-block:: yaml + + - name: Merge LLDP interface configuration + vyos.rest.vyos_lldp_interfaces: + config: + - name: eth0 + mode: disable + location: + elin: "1234567890" + - name: eth1 + location: + coordinate_based: + latitude: "33.524449N" + longitude: "22.267255E" + altitude: 2200 + datum: WGS84 + state: merged + + - name: Delete all LLDP interface configuration + vyos.rest.vyos_lldp_interfaces: + state: deleted + + - name: Gather current LLDP interface configuration + vyos.rest.vyos_lldp_interfaces: + state: gathered + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ after + +
+ list +
+
when changed +
LLDP interface configuration after this module ran.
+
+
+
+ before + +
+ list +
+
always +
LLDP interface configuration before this module ran.
+
+
+
+ commands + +
+ list +
+
always +
List of API command tuples sent to the device.
+
+
+
+ gathered + +
+ list +
+
when state is gathered +
Current LLDP interface configuration as structured data.
+
+
+
+ parsed + +
+ list +
+
when state is parsed +
Structured data parsed from running_config (state=parsed).
+
+
+
+ rendered + +
+ list +
+
when state is rendered +
Commands for provided config (state=rendered).
+
+
+
+ response + +
+ dictionary +
+
when changes are applied +
Raw API response.
+
+
+
+ saved + +
+ boolean +
+
when changes are applied +
Whether the config was saved after changes.
+
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_ospf_interfaces_module.rst b/docs/vyos.rest.vyos_ospf_interfaces_module.rst new file mode 100644 index 0000000..1439a71 --- /dev/null +++ b/docs/vyos.rest.vyos_ospf_interfaces_module.rst @@ -0,0 +1,612 @@ +.. _vyos.rest.vyos_ospf_interfaces_module: + + +****************************** +vyos.rest.vyos_ospf_interfaces +****************************** + +**Manage OSPF interface configuration on VyOS devices using REST API** + + +Version added: 1.0.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Manages OSPF and OSPFv3 interface configuration on VyOS devices via the REST API. +- IPv4 OSPF maps to ``protocols ospf interface``. +- IPv6 OSPFv3 maps to ``protocols ospfv3 interface``. +- Uses REST API (``connection=httpapi``) instead of CLI. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ list + / elements=dictionary +
+
+ +
List of OSPF interface configurations.
+
+
+ address_family + +
+ list + / elements=dictionary +
+
+ +
OSPF settings per address family.
+
+
+ afi + +
+ string + / required +
+
+
    Choices: +
  • ipv4
  • +
  • ipv6
  • +
+
+
Address family identifier.
+
+
+ authentication + +
+ dictionary +
+
+ +
Authentication settings (IPv4 only).
+
+
+ md5_key + +
+ dictionary +
+
+ +
MD5 authentication key.
+
+
+ key + +
+ string +
+
+ +
MD5 key string.
+
+
+ key_id + +
+ integer +
+
+ +
MD5 key ID.
+
+
+ plaintext_password + +
+ string +
+
+ +
Plaintext password.
+
+
+ bandwidth + +
+ integer +
+
+ +
Interface bandwidth in kbps (IPv4 only).
+
+
+ cost + +
+ integer +
+
+ +
Interface cost metric.
+
+
+ dead_interval + +
+ integer +
+
+ +
Dead router detection interval in seconds.
+
+
+ hello_interval + +
+ integer +
+
+ +
Hello packet interval in seconds.
+
+
+ ifmtu + +
+ integer +
+
+ +
Interface MTU (IPv6 only).
+
+
+ instance + +
+ string +
+
+ +
OSPFv3 instance ID (IPv6 only).
+
+
+ mtu_ignore + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Disable MTU check (IPv4 only).
+
+
+ network + +
+ string +
+
+
    Choices: +
  • broadcast
  • +
  • non-broadcast
  • +
  • point-to-multipoint
  • +
  • point-to-point
  • +
+
+
Network type (IPv4 only).
+
+
+ passive + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Disable adjacency formation (IPv6 only).
+
+
+ priority + +
+ integer +
+
+ +
Interface priority.
+
+
+ retransmit_interval + +
+ integer +
+
+ +
LSA retransmit interval in seconds.
+
+
+ transmit_delay + +
+ integer +
+
+ +
LSA transmit delay in seconds.
+
+
+ name + +
+ string + / required +
+
+ +
Interface name.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • merged ←
  • +
  • replaced
  • +
  • overridden
  • +
  • deleted
  • +
  • gathered
  • +
+
+
Desired state of the OSPF interface configuration.
+
merged adds or updates without removing existing config.
+
replaced replaces per-interface OSPF config for named interfaces.
+
overridden replaces all OSPF interface config.
+
deleted removes OSPF interface config.
+
gathered returns current configuration as structured data.
+
+
+ + +Notes +----- + +.. note:: + - Requires ``ansible_connection=httpapi`` with the VyOS httpapi plugin. + - ``ansible_network_os`` must be set to ``vyos.rest.vyos``. + + + +Examples +-------- + +.. code-block:: yaml + + - name: Merge OSPF interface configuration + vyos.rest.vyos_ospf_interfaces: + config: + - name: eth1 + address_family: + - afi: ipv4 + cost: 100 + transmit_delay: 50 + priority: 26 + - afi: ipv6 + dead_interval: 39 + passive: true + state: merged + + - name: Delete OSPF interface configuration + vyos.rest.vyos_ospf_interfaces: + config: + - name: eth1 + state: deleted + + - name: Delete all OSPF interface configuration + vyos.rest.vyos_ospf_interfaces: + state: deleted + + - name: Gather current OSPF interface configuration + vyos.rest.vyos_ospf_interfaces: + state: gathered + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ after + +
+ list +
+
when changed +
OSPF interface configuration after this module ran.
+
+
+
+ before + +
+ list +
+
always +
OSPF interface configuration before this module ran.
+
+
+
+ commands + +
+ list +
+
always +
List of API command tuples sent to the device.
+
+
+
+ gathered + +
+ list +
+
when state is gathered +
Current OSPF interface configuration as structured data.
+
+
+
+ response + +
+ dictionary +
+
when changes are applied +
Raw API response.
+
+
+
+ saved + +
+ boolean +
+
when changes are applied +
Whether the config was saved after changes.
+
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_ospfv2_module.rst b/docs/vyos.rest.vyos_ospfv2_module.rst new file mode 100644 index 0000000..1c5c248 --- /dev/null +++ b/docs/vyos.rest.vyos_ospfv2_module.rst @@ -0,0 +1,1263 @@ +.. _vyos.rest.vyos_ospfv2_module: + + +********************* +vyos.rest.vyos_ospfv2 +********************* + +**Manage OSPFv2 configuration on VyOS devices using REST API** + + +Version added: 1.0.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Manages OSPFv2 configuration on VyOS devices via the REST API. +- Uses REST API (``connection=httpapi``) instead of CLI. +- In VyOS 1.5+, passive interfaces use per-interface config rather than passive-interface. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ dictionary +
+
+ +
OSPFv2 configuration.
+
+
+ areas + +
+ list + / elements=dictionary +
+
+ +
OSPFv2 areas.
+
+
+ area_id + +
+ string + / required +
+
+ +
Area ID.
+
+
+ area_type + +
+ dictionary +
+
+ +
Area type.
+
+
+ normal + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Normal area.
+
+
+ nssa + +
+ dictionary +
+
+ +
NSSA area.
+
+
+ default_cost + +
+ integer +
+
+ +
Default cost for NSSA.
+
+
+ no_summary + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Do not inject inter-area routes.
+
+
+ set + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable NSSA.
+
+
+ translate + +
+ string +
+
+
    Choices: +
  • always
  • +
  • candidate
  • +
  • never
  • +
+
+
NSSA-ABR translate setting.
+
+
+ stub + +
+ dictionary +
+
+ +
Stub area.
+
+
+ default_cost + +
+ integer +
+
+ +
Default cost for stub.
+
+
+ no_summary + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Do not inject inter-area routes.
+
+
+ set + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable stub.
+
+
+ authentication + +
+ string +
+
+
    Choices: +
  • plaintext-password
  • +
  • md5
  • +
+
+
Area authentication type.
+
+
+ network + +
+ list + / elements=dictionary +
+
+ +
Networks in this area.
+
+
+ address + +
+ string + / required +
+
+ +
Network address.
+
+
+ range + +
+ list + / elements=dictionary +
+
+ +
Area ranges.
+
+
+ address + +
+ string + / required +
+
+ +
Range address.
+
+
+ cost + +
+ integer +
+
+ +
Cost for this range.
+
+
+ not_advertise + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Do not advertise this range.
+
+
+ substitute + +
+ string +
+
+ +
Substitute prefix.
+
+
+ shortcut + +
+ string +
+
+
    Choices: +
  • default
  • +
  • disable
  • +
  • enable
  • +
+
+
Shortcut mode.
+
+
+ auto_cost + +
+ dictionary +
+
+ +
Auto-cost reference bandwidth.
+
+
+ reference_bandwidth + +
+ integer +
+
+ +
Reference bandwidth in Mbps.
+
+
+ default_information + +
+ dictionary +
+
+ +
Default route distribution.
+
+
+ originate + +
+ dictionary +
+
+ +
Originate default route.
+
+
+ always + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Always advertise default route.
+
+
+ metric + +
+ integer +
+
+ +
Metric for default route.
+
+
+ metric_type + +
+ integer +
+
+ +
Metric type.
+
+
+ route_map + +
+ string +
+
+ +
Route map.
+
+
+ default_metric + +
+ integer +
+
+ +
Default metric for redistributed routes.
+
+
+ distance + +
+ dictionary +
+
+ +
Administrative distances.
+
+
+ global + +
+ integer +
+
+ +
Global OSPFv2 distance.
+
+
+ ospf + +
+ dictionary +
+
+ +
Per-route-type distances.
+
+
+ external + +
+ integer +
+
+ +
External route distance.
+
+
+ inter_area + +
+ integer +
+
+ +
Inter-area route distance.
+
+
+ intra_area + +
+ integer +
+
+ +
Intra-area route distance.
+
+
+ log_adjacency_changes + +
+ string +
+
+
    Choices: +
  • detail
  • +
+
+
Log adjacency changes.
+
+
+ neighbor + +
+ list + / elements=dictionary +
+
+ +
OSPF neighbors.
+
+
+ neighbor_id + +
+ string + / required +
+
+ +
Neighbor IP.
+
+
+ poll_interval + +
+ integer +
+
+ +
Poll interval.
+
+
+ priority + +
+ integer +
+
+ +
Neighbor priority.
+
+
+ parameters + +
+ dictionary +
+
+ +
OSPFv2 parameters.
+
+
+ abr_type + +
+ string +
+
+
    Choices: +
  • cisco
  • +
  • ibm
  • +
  • shortcut
  • +
  • standard
  • +
+
+
ABR type.
+
+
+ opaque_lsa + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable opaque LSA.
+
+
+ rfc1583_compatibility + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Enable RFC1583 compatibility.
+
+
+ router_id + +
+ string +
+
+ +
Router ID.
+
+
+ passive_interface + +
+ list + / elements=string +
+
+ +
Passive interfaces (VyOS 1.5+: configured via protocols ospf interface <name> passive).
+
+
+ redistribute + +
+ list + / elements=dictionary +
+
+ +
Route redistribution.
+
+
+ metric + +
+ integer +
+
+ +
Metric.
+
+
+ metric_type + +
+ integer +
+
+ +
Metric type.
+
+
+ route_map + +
+ string +
+
+ +
Route map.
+
+
+ route_type + +
+ string +
+
+
    Choices: +
  • bgp
  • +
  • connected
  • +
  • kernel
  • +
  • rip
  • +
  • static
  • +
+
+
Protocol to redistribute.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • merged ←
  • +
  • replaced
  • +
  • deleted
  • +
  • gathered
  • +
+
+
Desired state.
+
merged adds/updates without removing existing config.
+
replaced replaces the entire OSPFv2 configuration.
+
deleted removes OSPFv2 configuration.
+
gathered returns current configuration as structured data.
+
+
+ + +Notes +----- + +.. note:: + - Requires ``ansible_connection=httpapi`` with the VyOS httpapi plugin. + - ``ansible_network_os`` must be set to ``vyos.rest.vyos``. + - VyOS 1.5+ uses per-interface passive configuration rather than the global ``passive-interface`` command used in VyOS 1.4. + + + +Examples +-------- + +.. code-block:: yaml + + - name: Merge OSPFv2 configuration + vyos.rest.vyos_ospfv2: + config: + parameters: + router_id: 192.0.1.1 + abr_type: cisco + auto_cost: + reference_bandwidth: 2 + areas: + - area_id: "2" + area_type: + normal: true + network: + - address: 192.0.2.0/24 + - area_id: "3" + area_type: + nssa: + set: true + - area_id: "4" + area_type: + stub: + default_cost: 20 + range: + - address: 192.0.3.0/24 + cost: 10 + redistribute: + - route_type: bgp + metric: 10 + passive_interface: + - eth1 + state: merged + + - name: Delete all OSPFv2 configuration + vyos.rest.vyos_ospfv2: + state: deleted + + - name: Gather current OSPFv2 configuration + vyos.rest.vyos_ospfv2: + state: gathered + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ after + +
+ dictionary +
+
when changed +
OSPFv2 configuration after this module ran.
+
+
+
+ before + +
+ dictionary +
+
always +
OSPFv2 configuration before this module ran.
+
+
+
+ commands + +
+ list +
+
always +
List of API command tuples sent to the device.
+
+
+
+ gathered + +
+ dictionary +
+
when state is gathered +
Current OSPFv2 configuration as structured data.
+
+
+
+ response + +
+ dictionary +
+
when changes are applied +
Raw API response.
+
+
+
+ saved + +
+ boolean +
+
when changes are applied +
Whether the config was saved after changes.
+
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_ospfv3_module.rst b/docs/vyos.rest.vyos_ospfv3_module.rst new file mode 100644 index 0000000..18bb48e --- /dev/null +++ b/docs/vyos.rest.vyos_ospfv3_module.rst @@ -0,0 +1,480 @@ +.. _vyos.rest.vyos_ospfv3_module: + + +********************* +vyos.rest.vyos_ospfv3 +********************* + +**Manage OSPFv3 configuration on VyOS devices using REST API** + + +Version added: 1.0.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Manages OSPFv3 configuration on VyOS devices via the REST API. +- Uses REST API (``connection=httpapi``) instead of CLI. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ dictionary +
+
+ +
OSPFv3 configuration.
+
+
+ areas + +
+ list + / elements=dictionary +
+
+ +
OSPFv3 areas.
+
+
+ area_id + +
+ string + / required +
+
+ +
Area identity.
+
+
+ export_list + +
+ string +
+
+ +
Name of export-list.
+
+
+ import_list + +
+ string +
+
+ +
Name of import-list.
+
+
+ range + +
+ list + / elements=dictionary +
+
+ +
Summarize routes matching prefix.
+
+
+ address + +
+ string + / required +
+
+ +
IPv6 prefix.
+
+
+ advertise + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Advertise this range.
+
+
+ not_advertise + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Do not advertise this range.
+
+
+ parameters + +
+ dictionary +
+
+ +
OSPFv3 global parameters.
+
+
+ router_id + +
+ string +
+
+ +
Router ID (IPv4 address format).
+
+
+ redistribute + +
+ list + / elements=dictionary +
+
+ +
Redistribute routes from another protocol.
+
+
+ route_map + +
+ string +
+
+ +
Route map to apply.
+
+
+ route_type + +
+ string +
+
+
    Choices: +
  • bgp
  • +
  • connected
  • +
  • kernel
  • +
  • ripng
  • +
  • static
  • +
+
+
Protocol to redistribute.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • merged ←
  • +
  • replaced
  • +
  • deleted
  • +
  • gathered
  • +
+
+
Desired state of the OSPFv3 configuration.
+
merged adds or updates without removing existing config.
+
replaced replaces the entire OSPFv3 configuration.
+
deleted removes OSPFv3 configuration.
+
gathered returns current configuration as structured data.
+
+
+ + +Notes +----- + +.. note:: + - Requires ``ansible_connection=httpapi`` with the VyOS httpapi plugin. + - ``ansible_network_os`` must be set to ``vyos.rest.vyos``. + + + +Examples +-------- + +.. code-block:: yaml + + - name: Merge OSPFv3 configuration + vyos.rest.vyos_ospfv3: + config: + parameters: + router_id: 192.0.2.10 + redistribute: + - route_type: bgp + areas: + - area_id: "2" + export_list: export1 + import_list: import1 + range: + - address: "2001:db10::/32" + - address: "2001:db20::/32" + state: merged + + - name: Delete all OSPFv3 configuration + vyos.rest.vyos_ospfv3: + state: deleted + + - name: Gather current OSPFv3 configuration + vyos.rest.vyos_ospfv3: + state: gathered + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ after + +
+ dictionary +
+
when changed +
OSPFv3 configuration after this module ran.
+
+
+
+ before + +
+ dictionary +
+
always +
OSPFv3 configuration before this module ran.
+
+
+
+ commands + +
+ list +
+
always +
List of API command tuples sent to the device.
+
+
+
+ gathered + +
+ dictionary +
+
when state is gathered +
Current OSPFv3 configuration as structured data.
+
+
+
+ response + +
+ dictionary +
+
when changes are applied +
Raw API response.
+
+
+
+ saved + +
+ boolean +
+
when changes are applied +
Whether the config was saved after changes.
+
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- VyOS Community (@vyos) -- cgit v1.2.3