.. _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
Parameter Choices/Defaults Comments
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
Key Returned Description
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)