From a79421f8edb4ec9c9345ee698920bd26256232dd Mon Sep 17 00:00:00 2001 From: omnom62 Date: Fri, 19 Jun 2026 17:41:14 +1000 Subject: T8989: vyos_interfaces changelog --- docs/vyos.rest.vyos_interfaces_module.rst | 356 ++++++++++++++++++++++++++++++ 1 file changed, 356 insertions(+) create mode 100644 docs/vyos.rest.vyos_interfaces_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) -- cgit v1.2.3