Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(eos_cli_config_gen): LLDP for Management interfaces #3277

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ interface Ethernet19
switchport
no lldp transmit
no lldp receive
lldp tlv transmit ztp vlan 666
!
interface Ethernet20
description Port patched through patch-panel to pseudowire
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ interface Management1
!
interface Management42
shutdown
no lldp transmit
no lldp receive
lldp tlv transmit ztp vlan 666
!
interface Vlan123
description inband_management
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ interface Ethernet19
switchport
no lldp transmit
no lldp receive
lldp tlv transmit ztp vlan 666
!
interface Ethernet20
description Port patched through patch-panel to pseudowire
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ interface Management1
!
interface Management42
shutdown
no lldp transmit
no lldp receive
lldp tlv transmit ztp vlan 666
!
interface Vlan123
description inband_management
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ ethernet_interfaces:
lldp:
transmit: false
receive: false
ztp_vlan: 666

- name: Ethernet20
description: Port patched through patch-panel to pseudowire
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ management_interfaces:
eos_cli: "ip virtual-router address 10.73.0.1"
- name: Management42
shutdown: true
lldp:
transmit: false
receive: false
ztp_vlan: 666
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;gateway</samp>](## "management_interfaces.[].gateway") | String | | | | IPv4 address of default gateway in management VRF |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ipv6_gateway</samp>](## "management_interfaces.[].ipv6_gateway") | String | | | | IPv6 address of default gateway in management VRF |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;mac_address</samp>](## "management_interfaces.[].mac_address") | String | | | | MAC address |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;lldp</samp>](## "management_interfaces.[].lldp") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transmit</samp>](## "management_interfaces.[].lldp.transmit") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;receive</samp>](## "management_interfaces.[].lldp.receive") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ztp_vlan</samp>](## "management_interfaces.[].lldp.ztp_vlan") | Integer | | | | ZTP vlan number |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;eos_cli</samp>](## "management_interfaces.[].eos_cli") | String | | | | Multiline EOS CLI rendered directly on the management interface in the final EOS configuration |

=== "YAML"
Expand All @@ -38,5 +42,9 @@
gateway: <str>
ipv6_gateway: <str>
mac_address: <str>
lldp:
transmit: <bool>
receive: <bool>
ztp_vlan: <int>
eos_cli: <str>
```
Original file line number Diff line number Diff line change
Expand Up @@ -8325,6 +8325,29 @@
"description": "MAC address",
"title": "MAC Address"
},
"lldp": {
"type": "object",
"properties": {
"transmit": {
"type": "boolean",
"title": "Transmit"
},
"receive": {
"type": "boolean",
"title": "Receive"
},
"ztp_vlan": {
"type": "integer",
"description": "ZTP vlan number",
"title": "ZTP VLAN"
}
},
"additionalProperties": false,
"patternProperties": {
"^_.+$": {}
},
"title": "LLDP"
},
"eos_cli": {
"type": "string",
"description": "Multiline EOS CLI rendered directly on the management interface in the final EOS configuration",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4977,6 +4977,18 @@ keys:
mac_address:
type: str
description: MAC address
lldp:
type: dict
keys:
transmit:
type: bool
receive:
type: bool
ztp_vlan:
type: int
convert_types:
- str
description: ZTP vlan number
eos_cli:
type: str
description: Multiline EOS CLI rendered directly on the management interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ keys:
mac_address:
type: str
description: MAC address
lldp:
type: dict
keys:
transmit:
type: bool
receive:
type: bool
ztp_vlan:
type: int
convert_types:
- str
description: ZTP vlan number
eos_cli:
type: str
description: Multiline EOS CLI rendered directly on the management interface in the final EOS configuration
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ interface {{ management_interface.name }}
{% if management_interface.ipv6_address is arista.avd.defined %}
ipv6 address {{ management_interface.ipv6_address }}
{% endif %}
{% if management_interface.lldp.transmit is arista.avd.defined(false) %}
no lldp transmit
{% endif %}
{% if management_interface.lldp.receive is arista.avd.defined(false) %}
no lldp receive
{% endif %}
{% if management_interface.lldp.ztp_vlan is arista.avd.defined %}
lldp tlv transmit ztp vlan {{ management_interface.lldp.ztp_vlan }}
{% endif %}
{% if management_interface.eos_cli is arista.avd.defined %}
{{ management_interface.eos_cli | indent(3, false) }}
{% endif %}
Expand Down