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): Added dot1x radius av-pair lldp and dhcp command support #4618

Merged
merged 5 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -25,6 +25,11 @@ dot1x
captive-portal url http://portal-nacm08/captiveredirect/ ssl profile Profile1
captive-portal access-list ipv4 ACL
captive-portal start limit infinite
radius av-pair lldp system-name auth-only
radius av-pair lldp system-description auth-only
radius av-pair dhcp hostname auth-only
radius av-pair dhcp parameter-request-list auth-only
radius av-pair dhcp vendor-class-id auth-only
supplicant logging
!
interface Management1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ dot1x:
radius_av_pair:
service_type: true
framed_mtu: 1500
lldp:
system_name:
enabled: true
auth_only: true
system_description:
enabled: true
auth_only: true
dhcp:
hostname:
enabled: true
auth_only: true
parameter_request_list:
enabled: true
auth_only: true
vendor_class_id:
enabled: true
auth_only: true
aaa:
unresponsive:
eap_response: success
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 38 additions & 1 deletion python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/dot1x.j2
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ dot1x
mac based authentication hold period {{ dot1x.mac_based_authentication.hold_period }} seconds
{% endif %}
{% endif %}
{% if dot1x.radius_av_pair is arista.avd.defined %}
{% if dot1x.radius_av_pair.service_type is arista.avd.defined(true) or dot1x.radius_av_pair.framed_mtu is arista.avd.defined %}
laxmikantchintakindi marked this conversation as resolved.
Show resolved Hide resolved
{% if dot1x.radius_av_pair.service_type is arista.avd.defined(true) %}
radius av-pair service-type
{% endif %}
Expand Down Expand Up @@ -108,6 +108,43 @@ dot1x
captive-portal start limit infinite
{% endif %}
{% endif %}
{% if dot1x.radius_av_pair.lldp is arista.avd.defined or dot1x.radius_av_pair.dhcp is arista.avd.defined %}
Shivani-gslab marked this conversation as resolved.
Show resolved Hide resolved
{% if dot1x.radius_av_pair.lldp.system_name.enabled is arista.avd.defined(true) %}
{% set av_pair_lldp = "radius av-pair lldp system-name" %}
{% if dot1x.radius_av_pair.lldp.system_name.auth_only is arista.avd.defined(true) %}
{% set av_pair_lldp = "radius av-pair lldp system-name auth-only" %}
MaheshGSLAB marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}
{{ av_pair_lldp }}
{% endif %}
{% if dot1x.radius_av_pair.lldp.system_description.enabled is arista.avd.defined(true) %}
{% set av_pair_lldp = "radius av-pair lldp system-description" %}
{% if dot1x.radius_av_pair.lldp.system_description.auth_only is arista.avd.defined(true) %}
{% set av_pair_lldp = "radius av-pair lldp system-description auth-only" %}
MaheshGSLAB marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}
{{ av_pair_lldp }}
{% endif %}
{% if dot1x.radius_av_pair.dhcp.hostname.enabled is arista.avd.defined(true) %}
{% set av_pair_dhcp = "radius av-pair dhcp hostname" %}
{% if dot1x.radius_av_pair.dhcp.hostname.auth_only is arista.avd.defined(true) %}
{% set av_pair_dhcp = "radius av-pair dhcp hostname auth-only" %}
MaheshGSLAB marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}
{{ av_pair_dhcp }}
{% endif %}
{% if dot1x.radius_av_pair.dhcp.parameter_request_list.enabled is arista.avd.defined(true) %}
{% set av_pair_dhcp = "radius av-pair dhcp parameter-request-list" %}
{% if dot1x.radius_av_pair.dhcp.parameter_request_list.auth_only is arista.avd.defined(true) %}
{% set av_pair_dhcp = "radius av-pair dhcp parameter-request-list auth-only" %}
MaheshGSLAB marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}
{{ av_pair_dhcp }}
{% endif %}
{% if dot1x.radius_av_pair.dhcp.vendor_class_id.enabled is arista.avd.defined(true) %}
{% set av_pair_dhcp = "radius av-pair dhcp vendor-class-id" %}
{% if dot1x.radius_av_pair.dhcp.vendor_class_id.auth_only is arista.avd.defined(true) %}
{% set av_pair_dhcp = "radius av-pair dhcp vendor-class-id auth-only" %}
MaheshGSLAB marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}
{{ av_pair_dhcp }}
{% endif %}
{% endif %}
{% if dot1x.supplicant.logging is arista.avd.defined(true) %}
supplicant logging
{% endif %}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,57 @@ keys:
max: 9236
convert_types:
- str
lldp:
type: dict
keys:
system_name:
description: LLDP system name (LLDP TLV 5) av-pair.
type: dict
keys:
enabled:
type: bool
required: true
auth_only:
type: bool
system_description:
description: LLDP system description (LLDP TLV 6) av-pair.
type: dict
keys:
enabled:
type: bool
required: true
auth_only:
type: bool
dhcp:
type: dict
keys:
hostname:
description: Hostname (DHCP Option 12).
type: dict
keys:
enabled:
type: bool
required: true
auth_only:
type: bool
parameter_request_list:
description: Parameters requested by host (DHCP Option 55).
type: dict
keys:
enabled:
type: bool
required: true
auth_only:
type: bool
vendor_class_id:
description: Vendor class identifier (DHCP Option 60).
type: dict
keys:
enabled:
type: bool
required: true
auth_only:
type: bool
aaa:
type: dict
description: Configure AAA parameters.
Expand Down