-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat(eos_cli_config_gen): Add support for
monitor server radius
(#4595
- Loading branch information
1 parent
5300bf6
commit 059f886
Showing
14 changed files
with
298 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...rista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/monitor-server-radius.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
monitor_server_radius: | ||
service_dot1x: true | ||
probe: | ||
interval: 100 | ||
threshold_failure: 100 | ||
method: access-request | ||
access_request: | ||
username: arista | ||
password: 141600021F102B | ||
password_type: 7 |
4 changes: 4 additions & 0 deletions
4
...rista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host2/monitor-server-radius.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
monitor_server_radius: | ||
probe: | ||
method: status-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...ctions/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{# | ||
Copyright (c) 2023-2024 Arista Networks, Inc. | ||
Use of this source code is governed by the Apache License 2.0 | ||
that can be found in the LICENSE file. | ||
#} | ||
{# doc - monitor server radius #} | ||
{% if monitor_server_radius is arista.avd.defined %} | ||
|
||
### Monitor Server Radius Summary | ||
{% if monitor_server_radius.service_dot1x is arista.avd.defined(true) %} | ||
|
||
Monitor servers are used for 802.1x authentication. | ||
{% endif %} | ||
{% if monitor_server_radius.probe is arista.avd.defined %} | ||
|
||
#### Server Probe Settings | ||
|
||
| Setting | Value | | ||
| ------- | ----- | | ||
{% if monitor_server_radius.probe.interval is arista.avd.defined %} | ||
| Probe interval | {{ monitor_server_radius.probe.interval }} | | ||
{% endif %} | ||
{% if monitor_server_radius.probe.threshold_failure is arista.avd.defined %} | ||
| Threshold failure | {{ monitor_server_radius.probe.threshold_failure }} | | ||
{% endif %} | ||
{% if monitor_server_radius.probe.method is arista.avd.defined %} | ||
| Probe method | {{ monitor_server_radius.probe.method }} | | ||
{% endif %} | ||
{% endif %} | ||
|
||
#### Monitor Server Radius Device Configuration | ||
|
||
```eos | ||
{% include 'eos/monitor-server-radius.j2' %} | ||
``` | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{# | ||
Copyright (c) 2023-2024 Arista Networks, Inc. | ||
Use of this source code is governed by the Apache License 2.0 | ||
that can be found in the LICENSE file. | ||
#} | ||
{# eos - monitor server radius #} | ||
{% if monitor_server_radius is arista.avd.defined %} | ||
! | ||
monitor server radius | ||
{% if monitor_server_radius.service_dot1x is arista.avd.defined(true) %} | ||
service dot1x | ||
{% endif %} | ||
{% if monitor_server_radius.probe.interval is arista.avd.defined %} | ||
probe interval {{ monitor_server_radius.probe.interval }} seconds | ||
{% endif %} | ||
{% if monitor_server_radius.probe.threshold_failure is arista.avd.defined %} | ||
probe threshold failure {{ monitor_server_radius.probe.threshold_failure }} | ||
{% endif %} | ||
{% if monitor_server_radius.probe.method is arista.avd.defined("status-server") %} | ||
probe method status-server | ||
{% elif monitor_server_radius.probe.method is arista.avd.defined("access-request") %} | ||
{% if monitor_server_radius.probe.access_request.username is arista.avd.defined and | ||
monitor_server_radius.probe.access_request.password is arista.avd.defined %} | ||
{% set access_request = monitor_server_radius.probe.access_request %} | ||
probe method access-request username {{ access_request.username }} password {{ access_request.password_type | arista.avd.default("7") }} {{ access_request.password | arista.avd.hide_passwords(hide_passwords) }} | ||
{% endif %} | ||
{% endif %} | ||
{% endif %} |
51 changes: 51 additions & 0 deletions
51
python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
...on-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Copyright (c) 2023-2024 Arista Networks, Inc. | ||
# Use of this source code is governed by the Apache License 2.0 | ||
# that can be found in the LICENSE file. | ||
# yaml-language-server: $schema=../../../_schema/avd_meta_schema.json | ||
# Line above is used by RedHat's YAML Schema vscode extension | ||
# Use Ctrl + Space to get suggestions for every field. Autocomplete will pop up after typing 2 letters. | ||
type: dict | ||
keys: | ||
monitor_server_radius: | ||
type: dict | ||
description: Settings to monitor radius servers. | ||
keys: | ||
service_dot1x: | ||
type: bool | ||
description: Monitor servers used for 802.1X authentication. | ||
probe: | ||
type: dict | ||
description: Settings for probe sent to the server. | ||
keys: | ||
interval: | ||
type: int | ||
description: Server probe interval in seconds. | ||
convert_types: | ||
- str | ||
min: 1 | ||
max: 1000 | ||
threshold_failure: | ||
type: int | ||
description: Number of consecutive failed probes before a server is marked as dead. | ||
convert_types: | ||
- str | ||
min: 1 | ||
max: 255 | ||
method: | ||
type: str | ||
description: Method used to probe the server. `status-server` is the EOS default method. | ||
valid_values: | ||
- status-server | ||
- access-request | ||
access_request: | ||
type: dict | ||
description: This can only be set when `method` is `access_request`. | ||
keys: | ||
username: | ||
type: str | ||
password: | ||
type: str | ||
description: Encrypted password using the `password_type`. | ||
password_type: | ||
type: str | ||
convert_types: | ||
- int | ||
valid_values: ["0", "7", "8a"] | ||
default: "7" |