.. _vyos.rest.vyos_interfaces_module:
*************************
vyos.rest.vyos_interfaces
*************************
**Manage interface attributes on a VyOS device via the REST API.**
Version added: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- Manages interface base attributes (description, MTU, enabled state, VIFs, duplex, speed) on VyOS devices using the HTTPS REST API.
- Mirrors ``vyos.vyos.vyos_interfaces`` but uses HTTP API.
- Supports Ethernet, Bonding, VXLAN, Loopback, and Virtual Tunnel interfaces.
Requirements
------------
The below requirements are needed on the host that executes this module.
- VyOS 1.3+
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
api_key
string
/ required
|
|
API key configured on the device.
|
|
config
list
/ elements=dictionary
|
|
List of interface configurations.
|
|
description
string
|
|
Interface description.
|
|
duplex
string
|
|
Duplex mode. Only for Ethernet interfaces.
|
|
enabled
boolean
|
|
Administrative state. true = up, false = admin-down.
|
|
mtu
integer
|
|
MTU in bytes. Applicable for Ethernet, Bonding, VXLAN, VTI.
|
|
name
string
/ required
|
|
Full interface name (e.g. eth0, bond0, vti1, vxlan2).
|
|
speed
string
|
|
Link speed. Only for Ethernet interfaces.
|
|
vifs
list
/ elements=dictionary
|
|
List of VLAN sub-interface configurations.
|
|
|
description
string
|
|
VIF description.
|
|
|
enabled
boolean
|
|
Administrative state of the VIF.
|
|
|
vlan_id
integer
/ required
|
|
802.1Q VLAN ID.
|
|
hostname
string
/ required
|
|
IP address or FQDN of the VyOS device.
|
|
port
integer
|
Default:
443
|
HTTPS port for the REST API.
|
|
state
string
|
Choices:
merged ←
- replaced
- overridden
- deleted
- gathered
|
{'merged': 'Merge the provided config with existing interface config.'}
{'replaced': 'Replace per-interface config with provided values.'}
{'overridden': 'Override all interface config with provided values.'}
{'deleted': 'Delete interface config for listed interfaces (or all).'}
{'gathered': 'Read current interface config from device.'}
|
|
timeout
integer
|
Default:
30
|
Request timeout in seconds.
|
|
verify_ssl
boolean
|
|
Validate the device's TLS certificate.
|