From 41781e7a16e73fdca1f26c677ed3645ca2a8a3d0 Mon Sep 17 00:00:00 2001 From: omnom62 <75066712+omnom62@users.noreply.github.com> Date: Wed, 7 Oct 2026 21:21:04 +1000 Subject: T8989: vyos_interfaces dict_op refactor (#33) * T8989: vyos_interfaces dict_op refactor --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Daniil Baturin --- docs/vyos.rest.vyos_interfaces_module.rst | 132 +++++++++++++++++++++++++++--- 1 file changed, 122 insertions(+), 10 deletions(-) (limited to 'docs/vyos.rest.vyos_interfaces_module.rst') diff --git a/docs/vyos.rest.vyos_interfaces_module.rst b/docs/vyos.rest.vyos_interfaces_module.rst index 8438d9d..3fd0736 100644 --- a/docs/vyos.rest.vyos_interfaces_module.rst +++ b/docs/vyos.rest.vyos_interfaces_module.rst @@ -17,8 +17,9 @@ Version added: 1.0.0 Synopsis -------- -- Manages L2 interface configuration (description, MTU, speed, duplex, enabled) on VyOS devices using the HTTPS REST API. +- Manages L2 interface configuration (description, MTU, speed, duplex, enabled, VRF assignment, VLAN sub-interfaces) on VyOS devices using the HTTPS REST API. - IP address configuration is handled by :ref:`vyos.rest.vyos_l3_interfaces `. +- Covers 11 interface types (ethernet, bonding, loopback, tunnel, wireguard, vti, dummy, openvpn, pppoe, wireless, bridge), resolved from the device response when present, otherwise guessed from the interface name. The current CLI collection module documents a narrower scope of 5 types (ethernet, bonding, vxlan, loopback, vti). @@ -30,12 +31,12 @@ Parameters - + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterParameter Choices/Defaults Comments
+
config @@ -52,7 +53,7 @@ Parameters
+
description @@ -68,7 +69,7 @@ Parameters
+
duplex @@ -89,7 +90,7 @@ Parameters
+
enabled @@ -109,7 +110,7 @@ Parameters
+
mtu @@ -125,7 +126,7 @@ Parameters
+
name @@ -142,7 +143,7 @@ Parameters
+
speed @@ -164,9 +165,116 @@ Parameters
Interface speed setting.
+
+ vifs + +
+ list + / elements=dictionary +
+
+ +
802.1Q VLAN sub-interfaces.
+
+
+ description + +
+ string +
+
+ +
Sub-interface description.
+
+
+ enabled + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes ←
  • +
+
+
Whether the sub-interface is enabled.
+
+
+ mtu + +
+ integer +
+
+ +
Sub-interface MTU.
+
+
+ vlan_id + +
+ integer + / required +
+
+ +
VLAN ID for this sub-interface.
+
+
+ vrf + +
+ string +
+
+ +
VRF instance to bind this interface to.
+
state @@ -219,6 +327,10 @@ Examples description: Management interface mtu: 1500 enabled: true + vrf: mgmt + vifs: + - vlan_id: 200 + description: VIF 200 state: merged - name: Disable an interface @@ -228,7 +340,7 @@ Examples enabled: false state: merged - - name: Delete interface description + - name: Delete interface config vyos.rest.vyos_interfaces: config: - name: eth0 -- cgit v1.2.3