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