From 16a7ac626c37cb539033bb026eae2d3aaff8a075 Mon Sep 17 00:00:00 2001 From: Laxmikant Chintakindi Date: Tue, 15 Oct 2024 20:47:50 +0530 Subject: [PATCH 01/13] Feat(eos_cli_config_gen): Add support for monitor-server-radius --- .../devices/monitor-server-radius-1.md | 34 +++++++++++++ .../devices/monitor-server-radius-2.md | 34 +++++++++++++ .../devices/monitor-server-radius.md | 34 +++++++++++++ .../configs/monitor-server-radius-1.cfg | 10 ++++ .../configs/monitor-server-radius-2.cfg | 8 ++++ .../host_vars/monitor-server-radius-1.yml | 10 ++++ .../host_vars/monitor-server-radius-2.yml | 4 ++ .../eos_cli_config_gen/inventory/hosts.yml | 2 + .../docs/tables/monitor-server-radius.md | 47 ++++++++++++++++++ .../j2templates/eos-intended-config.j2 | 2 + .../j2templates/eos/monitor-server-radius.j2 | 26 ++++++++++ .../schema/eos_cli_config_gen.schema.yml | 44 +++++++++++++++++ .../monitor_server_radius.schema.yml | 48 +++++++++++++++++++ 13 files changed, 303 insertions(+) create mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md create mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md create mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius.md create mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-1.cfg create mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-2.cfg create mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-1.yml create mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-2.yml create mode 100644 ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md create mode 100644 python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 create mode 100644 python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md new file mode 100644 index 00000000000..cc913c8fcc8 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md @@ -0,0 +1,34 @@ +# monitor-server-radius-1 + +## Table of Contents + +- [Management](#management) + - [Management Interfaces](#management-interfaces) + +## Management + +### Management Interfaces + +#### Management Interfaces Summary + +##### IPv4 + +| Management Interface | Description | Type | VRF | IP Address | Gateway | +| -------------------- | ----------- | ---- | --- | ---------- | ------- | +| Management1 | OOB_MANAGEMENT | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 | + +##### IPv6 + +| Management Interface | Description | Type | VRF | IPv6 Address | IPv6 Gateway | +| -------------------- | ----------- | ---- | --- | ------------ | ------------ | +| Management1 | OOB_MANAGEMENT | oob | MGMT | - | - | + +#### Management Interfaces Device Configuration + +```eos +! +interface Management1 + description OOB_MANAGEMENT + vrf MGMT + ip address 10.73.255.122/24 +``` diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md new file mode 100644 index 00000000000..61284486cf5 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md @@ -0,0 +1,34 @@ +# monitor-server-radius-2 + +## Table of Contents + +- [Management](#management) + - [Management Interfaces](#management-interfaces) + +## Management + +### Management Interfaces + +#### Management Interfaces Summary + +##### IPv4 + +| Management Interface | Description | Type | VRF | IP Address | Gateway | +| -------------------- | ----------- | ---- | --- | ---------- | ------- | +| Management1 | OOB_MANAGEMENT | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 | + +##### IPv6 + +| Management Interface | Description | Type | VRF | IPv6 Address | IPv6 Gateway | +| -------------------- | ----------- | ---- | --- | ------------ | ------------ | +| Management1 | OOB_MANAGEMENT | oob | MGMT | - | - | + +#### Management Interfaces Device Configuration + +```eos +! +interface Management1 + description OOB_MANAGEMENT + vrf MGMT + ip address 10.73.255.122/24 +``` diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius.md new file mode 100644 index 00000000000..302701a2171 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius.md @@ -0,0 +1,34 @@ +# monitor-server-radius + +## Table of Contents + +- [Management](#management) + - [Management Interfaces](#management-interfaces) + +## Management + +### Management Interfaces + +#### Management Interfaces Summary + +##### IPv4 + +| Management Interface | Description | Type | VRF | IP Address | Gateway | +| -------------------- | ----------- | ---- | --- | ---------- | ------- | +| Management1 | OOB_MANAGEMENT | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 | + +##### IPv6 + +| Management Interface | Description | Type | VRF | IPv6 Address | IPv6 Gateway | +| -------------------- | ----------- | ---- | --- | ------------ | ------------ | +| Management1 | OOB_MANAGEMENT | oob | MGMT | - | - | + +#### Management Interfaces Device Configuration + +```eos +! +interface Management1 + description OOB_MANAGEMENT + vrf MGMT + ip address 10.73.255.122/24 +``` diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-1.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-1.cfg new file mode 100644 index 00000000000..7bc1aa43eda --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-1.cfg @@ -0,0 +1,10 @@ +! +monitor server radius + service dot1x + probe interval 100 seconds + probe method access-request username arista password 7 141600021F102B +! +interface Management1 + description OOB_MANAGEMENT + vrf MGMT + ip address 10.73.255.122/24 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-2.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-2.cfg new file mode 100644 index 00000000000..dbbb94a8b53 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-2.cfg @@ -0,0 +1,8 @@ +! +monitor server radius + probe method status-server +! +interface Management1 + description OOB_MANAGEMENT + vrf MGMT + ip address 10.73.255.122/24 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-1.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-1.yml new file mode 100644 index 00000000000..d63d7eb08fd --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-1.yml @@ -0,0 +1,10 @@ +--- +monitor_server_radius: + service_dot1x: true + probe: + interval: 100 + method: access-request + access_request: + username: arista + password: 141600021F102B + password_type: 7 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-2.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-2.yml new file mode 100644 index 00000000000..8591b26a0c7 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-2.yml @@ -0,0 +1,4 @@ +--- +monitor_server_radius: + probe: + method: status-server diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.yml index 5100becd582..ee67e317d73 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.yml @@ -44,6 +44,8 @@ test_hosts: management-defaults: management-interfaces: mac-security-eth-po-entropy: + monitor-server-radius-1: + monitor-server-radius-2: mpls: mpls-2: mpls-3: diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md new file mode 100644 index 00000000000..0a80e9974f3 --- /dev/null +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md @@ -0,0 +1,47 @@ + +=== "Table" + + | Variable | Type | Required | Default | Value Restrictions | Description | + | -------- | ---- | -------- | ------- | ------------------ | ----------- | + | [monitor_server_radius](## "monitor_server_radius") | Dictionary | | | | Settings to monitor radius servers. | + | [  service_dot1x](## "monitor_server_radius.service_dot1x") | Boolean | | | | Monitor servers used for 802.1X authentication. | + | [  probe](## "monitor_server_radius.probe") | Dictionary | | | | Settings for probe sent to the server. | + | [    interval](## "monitor_server_radius.probe.interval") | Integer | | | Min: 1
Max: 1000 | Server probe period in seconds. | + | [    method](## "monitor_server_radius.probe.method") | String | | | Valid Values:
- status-server
- access-request | Method used to probe the server. `status-server` is the EOS default method. | + | [    access_request](## "monitor_server_radius.probe.access_request") | Dictionary | | | | Use RADIUS Access-Request packets as probes. | + | [      username](## "monitor_server_radius.probe.access_request.username") | String | | | | Set the username to be used in the access-request packets. | + | [      password](## "monitor_server_radius.probe.access_request.password") | String | | | | Set the password to be used in the access-request packets. | + | [      password_type](## "monitor_server_radius.probe.access_request.password_type") | String | | `7` | Valid Values:
- 0
- 7
- 8a | | + +=== "YAML" + + ```yaml + # Settings to monitor radius servers. + monitor_server_radius: + + # Monitor servers used for 802.1X authentication. + service_dot1x: + + # Settings for probe sent to the server. + probe: + + # Server probe period in seconds. + interval: + + # Method used to probe the server. `status-server` is the EOS default method. + method: + + # Use RADIUS Access-Request packets as probes. + access_request: + + # Set the username to be used in the access-request packets. + username: + + # Set the password to be used in the access-request packets. + password: + password_type: + ``` diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos-intended-config.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos-intended-config.j2 index 083157239e1..081816342e6 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos-intended-config.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos-intended-config.j2 @@ -86,6 +86,8 @@ {% include 'eos/match-list-input.j2' %} {# mcs client #} {% include 'eos/mcs-client.j2' %} +{# monitor server radius #} +{% include 'eos/monitor-server-radius.j2' %} {# platform - trident#} {% include 'eos/platform-trident.j2' %} {# IP NAT - Part 1#} diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 new file mode 100644 index 00000000000..4fde72c49fc --- /dev/null +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 @@ -0,0 +1,26 @@ +{# + 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.method is arista.avd.defined("status-server") %} + probe method status-server +{% elif monitor_server_radius.probe.method is arista.avd.defined("access-request") %} +{% set access_request = monitor_server_radius.probe.access_request %} +{% if access_request.username is arista.avd.defined + and access_request.password is arista.avd.defined + and access_request.password_type is arista.avd.defined %} + probe method access-request username {{ access_request.username }} password {{ access_request.password_type }} {{ access_request.password }} +{% endif %} +{% endif %} +{% endif %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml index f13012ec9a2..d76f2de8557 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml @@ -8176,6 +8176,50 @@ keys: type: bool description: Some platforms support only the `logging transceiver` command. `enabled` key configures this command. + 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 period in seconds. + convert_types: + - str + min: 1 + max: 1000 + 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: Use RADIUS Access-Request packets as probes. + keys: + username: + type: str + description: Set the username to be used in the access-request packets. + password: + type: str + description: Set the password to be used in the access-request packets. + password_type: + type: str + convert_types: + - int + valid_values: + - '0' + - '7' + - 8a + default: '7' monitor_session_default_encapsulation_gre: documentation_options: table: monitor-sessions diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml new file mode 100644 index 00000000000..37d1fcdc17c --- /dev/null +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml @@ -0,0 +1,48 @@ +# 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 period in seconds. + convert_types: + - str + min: 1 + max: 1000 + 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: Use RADIUS Access-Request packets as probes. + keys: + username: + type: str + description: Set the username to be used in the access-request packets. + password: + type: str + description: Set the password to be used in the access-request packets. + password_type: + type: str + convert_types: + - int + valid_values: ["0", "7", "8a"] + default: "7" From 4104e8b687da7a516a37aa947f5acad1000fe6d4 Mon Sep 17 00:00:00 2001 From: Laxmikant Chintakindi Date: Tue, 15 Oct 2024 20:58:55 +0530 Subject: [PATCH 02/13] Remove description for username and password --- .../docs/tables/monitor-server-radius.md | 8 ++------ .../schema/eos_cli_config_gen.schema.yml | 2 -- .../schema_fragments/monitor_server_radius.schema.yml | 2 -- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md index 0a80e9974f3..a20777f3bf4 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md @@ -13,8 +13,8 @@ | [    interval](## "monitor_server_radius.probe.interval") | Integer | | | Min: 1
Max: 1000 | Server probe period in seconds. | | [    method](## "monitor_server_radius.probe.method") | String | | | Valid Values:
- status-server
- access-request | Method used to probe the server. `status-server` is the EOS default method. | | [    access_request](## "monitor_server_radius.probe.access_request") | Dictionary | | | | Use RADIUS Access-Request packets as probes. | - | [      username](## "monitor_server_radius.probe.access_request.username") | String | | | | Set the username to be used in the access-request packets. | - | [      password](## "monitor_server_radius.probe.access_request.password") | String | | | | Set the password to be used in the access-request packets. | + | [      username](## "monitor_server_radius.probe.access_request.username") | String | | | | | + | [      password](## "monitor_server_radius.probe.access_request.password") | String | | | | | | [      password_type](## "monitor_server_radius.probe.access_request.password_type") | String | | `7` | Valid Values:
- 0
- 7
- 8a | | === "YAML" @@ -37,11 +37,7 @@ # Use RADIUS Access-Request packets as probes. access_request: - - # Set the username to be used in the access-request packets. username: - - # Set the password to be used in the access-request packets. password: password_type: ``` diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml index d76f2de8557..3db04ce9a8b 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml @@ -8207,10 +8207,8 @@ keys: keys: username: type: str - description: Set the username to be used in the access-request packets. password: type: str - description: Set the password to be used in the access-request packets. password_type: type: str convert_types: diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml index 37d1fcdc17c..6e451c9e4f9 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml @@ -36,10 +36,8 @@ keys: keys: username: type: str - description: Set the username to be used in the access-request packets. password: type: str - description: Set the password to be used in the access-request packets. password_type: type: str convert_types: From d49842c5d9d48d3b4998dde436da09694e673d5b Mon Sep 17 00:00:00 2001 From: Laxmikant Chintakindi Date: Tue, 15 Oct 2024 21:05:34 +0530 Subject: [PATCH 03/13] Adding threshold failure command --- .../intended/configs/monitor-server-radius-1.cfg | 1 + .../inventory/host_vars/monitor-server-radius-1.yml | 1 + .../docs/tables/monitor-server-radius.md | 4 ++++ .../j2templates/eos/monitor-server-radius.j2 | 3 +++ .../schema_fragments/monitor_server_radius.schema.yml | 7 +++++++ 5 files changed, 16 insertions(+) diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-1.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-1.cfg index 7bc1aa43eda..5422a6cef32 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-1.cfg +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-1.cfg @@ -2,6 +2,7 @@ monitor server radius service dot1x probe interval 100 seconds + probe threshold failure 100 probe method access-request username arista password 7 141600021F102B ! interface Management1 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-1.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-1.yml index d63d7eb08fd..f07c5da00b5 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-1.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-1.yml @@ -3,6 +3,7 @@ monitor_server_radius: service_dot1x: true probe: interval: 100 + threshold_failure: 100 method: access-request access_request: username: arista diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md index a20777f3bf4..d970e501041 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md @@ -11,6 +11,7 @@ | [  service_dot1x](## "monitor_server_radius.service_dot1x") | Boolean | | | | Monitor servers used for 802.1X authentication. | | [  probe](## "monitor_server_radius.probe") | Dictionary | | | | Settings for probe sent to the server. | | [    interval](## "monitor_server_radius.probe.interval") | Integer | | | Min: 1
Max: 1000 | Server probe period in seconds. | + | [    threshold_failure](## "monitor_server_radius.probe.threshold_failure") | Integer | | | Min: 1
Max: 255 | Number of consecutive failed probes before a server is marked as dead | | [    method](## "monitor_server_radius.probe.method") | String | | | Valid Values:
- status-server
- access-request | Method used to probe the server. `status-server` is the EOS default method. | | [    access_request](## "monitor_server_radius.probe.access_request") | Dictionary | | | | Use RADIUS Access-Request packets as probes. | | [      username](## "monitor_server_radius.probe.access_request.username") | String | | | | | @@ -32,6 +33,9 @@ # Server probe period in seconds. interval: + # Number of consecutive failed probes before a server is marked as dead + threshold_failure: + # Method used to probe the server. `status-server` is the EOS default method. method: diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 index 4fde72c49fc..4b5f1a8a705 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 @@ -13,6 +13,9 @@ monitor server radius {% 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") %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml index 6e451c9e4f9..a84a2ca992d 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml @@ -24,6 +24,13 @@ keys: - 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. From 9a207f876fa2d79cbcdf3a8a54ebbfdfbcc786aa Mon Sep 17 00:00:00 2001 From: Laxmikant Chintakindi Date: Tue, 15 Oct 2024 21:18:48 +0530 Subject: [PATCH 04/13] Modify description for access_request key. --- .../docs/tables/monitor-server-radius.md | 8 ++++---- .../schema/eos_cli_config_gen.schema.yml | 2 +- .../schema_fragments/monitor_server_radius.schema.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md index d970e501041..e3d7fecfc30 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md @@ -11,9 +11,9 @@ | [  service_dot1x](## "monitor_server_radius.service_dot1x") | Boolean | | | | Monitor servers used for 802.1X authentication. | | [  probe](## "monitor_server_radius.probe") | Dictionary | | | | Settings for probe sent to the server. | | [    interval](## "monitor_server_radius.probe.interval") | Integer | | | Min: 1
Max: 1000 | Server probe period in seconds. | - | [    threshold_failure](## "monitor_server_radius.probe.threshold_failure") | Integer | | | Min: 1
Max: 255 | Number of consecutive failed probes before a server is marked as dead | + | [    threshold_failure](## "monitor_server_radius.probe.threshold_failure") | Integer | | | Min: 1
Max: 255 | Number of consecutive failed probes before a server is marked as dead. | | [    method](## "monitor_server_radius.probe.method") | String | | | Valid Values:
- status-server
- access-request | Method used to probe the server. `status-server` is the EOS default method. | - | [    access_request](## "monitor_server_radius.probe.access_request") | Dictionary | | | | Use RADIUS Access-Request packets as probes. | + | [    access_request](## "monitor_server_radius.probe.access_request") | Dictionary | | | | This can only be set when `method` is `access_request`. | | [      username](## "monitor_server_radius.probe.access_request.username") | String | | | | | | [      password](## "monitor_server_radius.probe.access_request.password") | String | | | | | | [      password_type](## "monitor_server_radius.probe.access_request.password_type") | String | | `7` | Valid Values:
- 0
- 7
- 8a | | @@ -33,13 +33,13 @@ # Server probe period in seconds. interval: - # Number of consecutive failed probes before a server is marked as dead + # Number of consecutive failed probes before a server is marked as dead. threshold_failure: # Method used to probe the server. `status-server` is the EOS default method. method: - # Use RADIUS Access-Request packets as probes. + # This can only be set when `method` is `access_request`. access_request: username: password: diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml index 3db04ce9a8b..1b7b112b109 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml @@ -8203,7 +8203,7 @@ keys: - access-request access_request: type: dict - description: Use RADIUS Access-Request packets as probes. + description: This can only be set when `method` is `access_request`. keys: username: type: str diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml index a84a2ca992d..c2f834f9c9e 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml @@ -26,7 +26,7 @@ keys: max: 1000 threshold_failure: type: int - description: Number of consecutive failed probes before a server is marked as dead + description: Number of consecutive failed probes before a server is marked as dead. convert_types: - str min: 1 @@ -39,7 +39,7 @@ keys: - "access-request" access_request: type: dict - description: Use RADIUS Access-Request packets as probes. + description: This can only be set when `method` is `access_request`. keys: username: type: str From 66d5aae3b5cd9d5394c41f74c500442689f2d416 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 06:11:55 +0000 Subject: [PATCH 05/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../schema/schema_fragments/monitor_server_radius.schema.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml index c2f834f9c9e..9c96e1a3b0e 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml @@ -39,7 +39,7 @@ keys: - "access-request" access_request: type: dict - description: This can only be set when `method` is `access_request`. + description: This can only be set when `method` is `access_request`. keys: username: type: str From 1b0ee51d9903e7dd7a66a35b0572e9a79ab3f6c1 Mon Sep 17 00:00:00 2001 From: Laxmikant Chintakindi Date: Wed, 16 Oct 2024 14:26:11 +0530 Subject: [PATCH 06/13] Add doc template --- .../devices/monitor-server-radius-1.md | 26 ++++++++++++++ .../devices/monitor-server-radius-2.md | 19 ++++++++++ .../docs/tables/monitor-server-radius.md | 8 ++--- .../documentation/monitor-server-radius.j2 | 36 +++++++++++++++++++ .../j2templates/eos-device-documentation.j2 | 2 ++ .../j2templates/eos/monitor-server-radius.j2 | 4 --- .../schema/eos_cli_config_gen.schema.yml | 2 ++ .../monitor_server_radius.schema.yml | 2 ++ 8 files changed, 91 insertions(+), 8 deletions(-) create mode 100644 python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md index cc913c8fcc8..5a973fdbfe3 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md @@ -4,6 +4,9 @@ - [Management](#management) - [Management Interfaces](#management-interfaces) +- [Monitor Server Radius Summary](#monitor-server-radius-summary) + - [Probe Settings](#probe-settings) + - [Monitor Server Radius Device Configuration](#monitor-server-radius-device-configuration) ## Management @@ -32,3 +35,26 @@ interface Management1 vrf MGMT ip address 10.73.255.122/24 ``` + +## Monitor Server Radius Summary + +Monitor servers are used for 802.1x authentication. + +### Probe Settings + +| Setting | Value | +| ------- | ----- | +| Probe interval | 100 | +| Threshold failure | 100 | +| Probe method | access-request | + +### Monitor Server Radius Device Configuration + +```eos +! +monitor server radius + service dot1x + probe interval 100 seconds + probe threshold failure 100 + probe method access-request username arista password 7 141600021F102B +``` diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md index 61284486cf5..abfe1143a20 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md @@ -4,6 +4,9 @@ - [Management](#management) - [Management Interfaces](#management-interfaces) +- [Monitor Server Radius Summary](#monitor-server-radius-summary) + - [Probe Settings](#probe-settings) + - [Monitor Server Radius Device Configuration](#monitor-server-radius-device-configuration) ## Management @@ -32,3 +35,19 @@ interface Management1 vrf MGMT ip address 10.73.255.122/24 ``` + +## Monitor Server Radius Summary + +### Probe Settings + +| Setting | Value | +| ------- | ----- | +| Probe method | status-server | + +### Monitor Server Radius Device Configuration + +```eos +! +monitor server radius + probe method status-server +``` diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md index e3d7fecfc30..26894d6d2e1 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md @@ -14,8 +14,8 @@ | [    threshold_failure](## "monitor_server_radius.probe.threshold_failure") | Integer | | | Min: 1
Max: 255 | Number of consecutive failed probes before a server is marked as dead. | | [    method](## "monitor_server_radius.probe.method") | String | | | Valid Values:
- status-server
- access-request | Method used to probe the server. `status-server` is the EOS default method. | | [    access_request](## "monitor_server_radius.probe.access_request") | Dictionary | | | | This can only be set when `method` is `access_request`. | - | [      username](## "monitor_server_radius.probe.access_request.username") | String | | | | | - | [      password](## "monitor_server_radius.probe.access_request.password") | String | | | | | + | [      username](## "monitor_server_radius.probe.access_request.username") | String | Required | | | | + | [      password](## "monitor_server_radius.probe.access_request.password") | String | Required | | | | | [      password_type](## "monitor_server_radius.probe.access_request.password_type") | String | | `7` | Valid Values:
- 0
- 7
- 8a | | === "YAML" @@ -41,7 +41,7 @@ # This can only be set when `method` is `access_request`. access_request: - username: - password: + username: + password: password_type: ``` diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 new file mode 100644 index 00000000000..8f777637bac --- /dev/null +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 @@ -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 %} + +### 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 %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos-device-documentation.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos-device-documentation.j2 index 467984203a9..44b3fdcd91d 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos-device-documentation.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos-device-documentation.j2 @@ -121,6 +121,8 @@ {% include 'documentation/quality-of-service.j2' %} {# InfluxDB Telemetry #} {% include 'documentation/monitor-telemetry-influx.j2' %} +{# Monitor Server Radius #} +{% include 'documentation/monitor-server-radius.j2' %} {# Priority Flow Control #} {% include 'documentation/priority-flow-control.j2' %} {# STUN #} diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 index 4b5f1a8a705..3e084ec74b7 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 @@ -20,10 +20,6 @@ monitor server radius probe method status-server {% elif monitor_server_radius.probe.method is arista.avd.defined("access-request") %} {% set access_request = monitor_server_radius.probe.access_request %} -{% if access_request.username is arista.avd.defined - and access_request.password is arista.avd.defined - and access_request.password_type is arista.avd.defined %} probe method access-request username {{ access_request.username }} password {{ access_request.password_type }} {{ access_request.password }} -{% endif %} {% endif %} {% endif %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml index 1b7b112b109..5cac9902510 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml @@ -8207,8 +8207,10 @@ keys: keys: username: type: str + required: true password: type: str + required: true password_type: type: str convert_types: diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml index 9c96e1a3b0e..8f4353fa793 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml @@ -43,8 +43,10 @@ keys: keys: username: type: str + required: true password: type: str + required: true password_type: type: str convert_types: From 9df098a19500624f3b13ee57b4b316e51d17136b Mon Sep 17 00:00:00 2001 From: Laxmikant Chintakindi Date: Wed, 16 Oct 2024 14:34:41 +0530 Subject: [PATCH 07/13] Fix CI. --- .../j2templates/documentation/monitor-server-radius.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 index 8f777637bac..9112ed6343a 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 @@ -31,6 +31,6 @@ Monitor servers are used for 802.1x authentication. ### Monitor Server Radius Device Configuration ```eos -{% include 'eos/monitor-server-radius.j2' %} +{% include 'eos/monitor-server-radius.j2' %} ``` {% endif %} From 664818f0be0e0a1b736880fb654c1e4616fe60d0 Mon Sep 17 00:00:00 2001 From: Laxmikant Chintakindi Date: Wed, 16 Oct 2024 14:52:39 +0530 Subject: [PATCH 08/13] Update heading of table --- .../documentation/devices/monitor-server-radius-1.md | 4 ++-- .../documentation/devices/monitor-server-radius-2.md | 4 ++-- .../j2templates/documentation/monitor-server-radius.j2 | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md index 5a973fdbfe3..3fd1a31a54c 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md @@ -5,7 +5,7 @@ - [Management](#management) - [Management Interfaces](#management-interfaces) - [Monitor Server Radius Summary](#monitor-server-radius-summary) - - [Probe Settings](#probe-settings) + - [Server Probe Settings](#server-probe-settings) - [Monitor Server Radius Device Configuration](#monitor-server-radius-device-configuration) ## Management @@ -40,7 +40,7 @@ interface Management1 Monitor servers are used for 802.1x authentication. -### Probe Settings +### Server Probe Settings | Setting | Value | | ------- | ----- | diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md index abfe1143a20..a07ed3b4dff 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md @@ -5,7 +5,7 @@ - [Management](#management) - [Management Interfaces](#management-interfaces) - [Monitor Server Radius Summary](#monitor-server-radius-summary) - - [Probe Settings](#probe-settings) + - [Server Probe Settings](#server-probe-settings) - [Monitor Server Radius Device Configuration](#monitor-server-radius-device-configuration) ## Management @@ -38,7 +38,7 @@ interface Management1 ## Monitor Server Radius Summary -### Probe Settings +### Server Probe Settings | Setting | Value | | ------- | ----- | diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 index 9112ed6343a..0976cc84f5e 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 @@ -13,7 +13,7 @@ Monitor servers are used for 802.1x authentication. {% endif %} {% if monitor_server_radius.probe is arista.avd.defined %} -### Probe Settings +### Server Probe Settings | Setting | Value | | ------- | ----- | From b08a377fa5b8032bcca5c4a7ddf18ee10d84ff36 Mon Sep 17 00:00:00 2001 From: Laxmikant Chintakindi Date: Mon, 4 Nov 2024 12:54:09 +0530 Subject: [PATCH 09/13] Fix template and update input variable, pwd type description --- .../avd/roles/eos_cli_config_gen/docs/input-variables.md | 6 ++++++ .../docs/tables/monitor-server-radius.md | 4 +++- .../j2templates/eos/monitor-server-radius.j2 | 7 +++++-- .../schema_fragments/monitor_server_radius.schema.yml | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/input-variables.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/input-variables.md index 9a70f4e4dac..93b5372ea2e 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/input-variables.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/input-variables.md @@ -647,6 +647,12 @@ roles/eos_cli_config_gen/docs/tables/management-api-gnmi.md roles/eos_cli_config_gen/docs/tables/monitor-connectivity.md --8<-- +### Monitor Server Radius + +--8<-- +roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md +--8<-- + ### Monitor sessions --8<-- diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md index 26894d6d2e1..d78535dcdae 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md @@ -15,7 +15,7 @@ | [    method](## "monitor_server_radius.probe.method") | String | | | Valid Values:
- status-server
- access-request | Method used to probe the server. `status-server` is the EOS default method. | | [    access_request](## "monitor_server_radius.probe.access_request") | Dictionary | | | | This can only be set when `method` is `access_request`. | | [      username](## "monitor_server_radius.probe.access_request.username") | String | Required | | | | - | [      password](## "monitor_server_radius.probe.access_request.password") | String | Required | | | | + | [      password](## "monitor_server_radius.probe.access_request.password") | String | Required | | | Type 7 password. | | [      password_type](## "monitor_server_radius.probe.access_request.password_type") | String | | `7` | Valid Values:
- 0
- 7
- 8a | | === "YAML" @@ -42,6 +42,8 @@ # This can only be set when `method` is `access_request`. access_request: username: + + # Type 7 password. password: password_type: ``` diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 index 3e084ec74b7..3af234f2ca5 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 @@ -19,7 +19,10 @@ monitor server radius {% 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") %} -{% set access_request = monitor_server_radius.probe.access_request %} - probe method access-request username {{ access_request.username }} password {{ access_request.password_type }} {{ access_request.password }} +{% 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 }} +{% endif %} {% endif %} {% endif %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml index 8f4353fa793..8d456115347 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml @@ -46,6 +46,7 @@ keys: required: true password: type: str + description: Type 7 password. required: true password_type: type: str From 6b5b1505464949df790ca8dc836d124f727717b1 Mon Sep 17 00:00:00 2001 From: Laxmikant Chintakindi Date: Wed, 6 Nov 2024 10:53:39 +0530 Subject: [PATCH 10/13] Remove the doc which is not required and hide password in doc --- .../devices/monitor-server-radius-1.md | 2 +- .../devices/monitor-server-radius.md | 34 ------------------- .../j2templates/eos/monitor-server-radius.j2 | 2 +- 3 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius.md diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md index 3fd1a31a54c..fec3e0b531e 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md @@ -56,5 +56,5 @@ monitor server radius service dot1x probe interval 100 seconds probe threshold failure 100 - probe method access-request username arista password 7 141600021F102B + probe method access-request username arista password 7 ``` diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius.md deleted file mode 100644 index 302701a2171..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius.md +++ /dev/null @@ -1,34 +0,0 @@ -# monitor-server-radius - -## Table of Contents - -- [Management](#management) - - [Management Interfaces](#management-interfaces) - -## Management - -### Management Interfaces - -#### Management Interfaces Summary - -##### IPv4 - -| Management Interface | Description | Type | VRF | IP Address | Gateway | -| -------------------- | ----------- | ---- | --- | ---------- | ------- | -| Management1 | OOB_MANAGEMENT | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 | - -##### IPv6 - -| Management Interface | Description | Type | VRF | IPv6 Address | IPv6 Gateway | -| -------------------- | ----------- | ---- | --- | ------------ | ------------ | -| Management1 | OOB_MANAGEMENT | oob | MGMT | - | - | - -#### Management Interfaces Device Configuration - -```eos -! -interface Management1 - description OOB_MANAGEMENT - vrf MGMT - ip address 10.73.255.122/24 -``` diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 index 3af234f2ca5..aca3716c787 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-server-radius.j2 @@ -22,7 +22,7 @@ monitor server radius {% 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 }} + 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 %} From f67fbae3dc2e6b3dfec72538cc78daaed9b28b8f Mon Sep 17 00:00:00 2001 From: Laxmikant Chintakindi Date: Fri, 8 Nov 2024 21:31:02 +0530 Subject: [PATCH 11/13] Move tests to host1 and host2 --- .../documentation/devices/host1.md | 26 ++++++++ .../documentation/devices/host2.md | 19 ++++++ .../devices/monitor-server-radius-1.md | 60 ------------------- .../devices/monitor-server-radius-2.md | 53 ---------------- .../intended/configs/host1.cfg | 6 ++ .../intended/configs/host2.cfg | 3 + .../configs/monitor-server-radius-1.cfg | 11 ---- .../configs/monitor-server-radius-2.cfg | 8 --- .../monitor-server-radius.yml} | 0 .../monitor-server-radius.yml} | 0 .../docs/input-variables.md | 2 +- .../docs/tables/monitor-server-radius.md | 8 +-- .../schema/eos_cli_config_gen.schema.yml | 10 +++- .../monitor_server_radius.schema.yml | 3 +- 14 files changed, 68 insertions(+), 141 deletions(-) delete mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md delete mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md delete mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-1.cfg delete mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-2.cfg rename ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/{monitor-server-radius-1.yml => host1/monitor-server-radius.yml} (100%) rename ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/{monitor-server-radius-2.yml => host2/monitor-server-radius.yml} (100%) diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md index e5a181231ce..af396b0e1c8 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md @@ -198,6 +198,9 @@ - [InfluxDB Telemetry](#influxdb-telemetry) - [InfluxDB Telemetry Summary](#influxdb-telemetry-summary) - [InfluxDB Telemetry Device Configuration](#influxdb-telemetry-device-configuration) +- [Monitor Server Radius Summary](#monitor-server-radius-summary) + - [Server Probe Settings](#server-probe-settings) + - [Monitor Server Radius Device Configuration](#monitor-server-radius-device-configuration) - [STUN](#stun) - [STUN Client](#stun-client) - [STUN Server](#stun-server) @@ -7554,6 +7557,29 @@ monitor telemetry influx source group standard disabled ``` +## Monitor Server Radius Summary + +Monitor servers are used for 802.1x authentication. + +### Server Probe Settings + +| Setting | Value | +| ------- | ----- | +| Probe interval | 100 | +| Threshold failure | 100 | +| Probe method | access-request | + +### Monitor Server Radius Device Configuration + +```eos +! +monitor server radius + service dot1x + probe interval 100 seconds + probe threshold failure 100 + probe method access-request username arista password 7 +``` + ## STUN ### STUN Client diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md index 65073be4434..fa5a77a1800 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md @@ -58,6 +58,9 @@ - [IP DHCP Snooping Device Configuration](#ip-dhcp-snooping-device-configuration) - [IP NAT](#ip-nat) - [IP NAT Device Configuration](#ip-nat-device-configuration) +- [Monitor Server Radius Summary](#monitor-server-radius-summary) + - [Server Probe Settings](#server-probe-settings) + - [Monitor Server Radius Device Configuration](#monitor-server-radius-device-configuration) ## Management @@ -594,3 +597,19 @@ ip dhcp snooping ! ip nat synchronization ``` + +## Monitor Server Radius Summary + +### Server Probe Settings + +| Setting | Value | +| ------- | ----- | +| Probe method | status-server | + +### Monitor Server Radius Device Configuration + +```eos +! +monitor server radius + probe method status-server +``` diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md deleted file mode 100644 index fec3e0b531e..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-1.md +++ /dev/null @@ -1,60 +0,0 @@ -# monitor-server-radius-1 - -## Table of Contents - -- [Management](#management) - - [Management Interfaces](#management-interfaces) -- [Monitor Server Radius Summary](#monitor-server-radius-summary) - - [Server Probe Settings](#server-probe-settings) - - [Monitor Server Radius Device Configuration](#monitor-server-radius-device-configuration) - -## Management - -### Management Interfaces - -#### Management Interfaces Summary - -##### IPv4 - -| Management Interface | Description | Type | VRF | IP Address | Gateway | -| -------------------- | ----------- | ---- | --- | ---------- | ------- | -| Management1 | OOB_MANAGEMENT | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 | - -##### IPv6 - -| Management Interface | Description | Type | VRF | IPv6 Address | IPv6 Gateway | -| -------------------- | ----------- | ---- | --- | ------------ | ------------ | -| Management1 | OOB_MANAGEMENT | oob | MGMT | - | - | - -#### Management Interfaces Device Configuration - -```eos -! -interface Management1 - description OOB_MANAGEMENT - vrf MGMT - ip address 10.73.255.122/24 -``` - -## Monitor Server Radius Summary - -Monitor servers are used for 802.1x authentication. - -### Server Probe Settings - -| Setting | Value | -| ------- | ----- | -| Probe interval | 100 | -| Threshold failure | 100 | -| Probe method | access-request | - -### Monitor Server Radius Device Configuration - -```eos -! -monitor server radius - service dot1x - probe interval 100 seconds - probe threshold failure 100 - probe method access-request username arista password 7 -``` diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md deleted file mode 100644 index a07ed3b4dff..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/monitor-server-radius-2.md +++ /dev/null @@ -1,53 +0,0 @@ -# monitor-server-radius-2 - -## Table of Contents - -- [Management](#management) - - [Management Interfaces](#management-interfaces) -- [Monitor Server Radius Summary](#monitor-server-radius-summary) - - [Server Probe Settings](#server-probe-settings) - - [Monitor Server Radius Device Configuration](#monitor-server-radius-device-configuration) - -## Management - -### Management Interfaces - -#### Management Interfaces Summary - -##### IPv4 - -| Management Interface | Description | Type | VRF | IP Address | Gateway | -| -------------------- | ----------- | ---- | --- | ---------- | ------- | -| Management1 | OOB_MANAGEMENT | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 | - -##### IPv6 - -| Management Interface | Description | Type | VRF | IPv6 Address | IPv6 Gateway | -| -------------------- | ----------- | ---- | --- | ------------ | ------------ | -| Management1 | OOB_MANAGEMENT | oob | MGMT | - | - | - -#### Management Interfaces Device Configuration - -```eos -! -interface Management1 - description OOB_MANAGEMENT - vrf MGMT - ip address 10.73.255.122/24 -``` - -## Monitor Server Radius Summary - -### Server Probe Settings - -| Setting | Value | -| ------- | ----- | -| Probe method | status-server | - -### Monitor Server Radius Device Configuration - -```eos -! -monitor server radius - probe method status-server -``` diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg index c8217ba6a0c..3a040e66a95 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg @@ -236,6 +236,12 @@ mcs client server host 10.90.224.189 server host leaf2.atd.lab ! +monitor server radius + service dot1x + probe interval 100 seconds + probe threshold failure 100 + probe method access-request username arista password 7 141600021F102B +! ip nat translation address selection hash field source-ip ip nat translation address selection any ip nat translation tcp-timeout 7200 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host2.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host2.cfg index fd8fbfcbf9e..41f8a66b126 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host2.cfg +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host2.cfg @@ -23,6 +23,9 @@ queue-monitor length no queue-monitor length notifying queue-monitor length default threshold 100 ! +monitor server radius + probe method status-server +! ! router adaptive-virtual-topology topology role edge gateway vxlan diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-1.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-1.cfg deleted file mode 100644 index 5422a6cef32..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-1.cfg +++ /dev/null @@ -1,11 +0,0 @@ -! -monitor server radius - service dot1x - probe interval 100 seconds - probe threshold failure 100 - probe method access-request username arista password 7 141600021F102B -! -interface Management1 - description OOB_MANAGEMENT - vrf MGMT - ip address 10.73.255.122/24 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-2.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-2.cfg deleted file mode 100644 index dbbb94a8b53..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/monitor-server-radius-2.cfg +++ /dev/null @@ -1,8 +0,0 @@ -! -monitor server radius - probe method status-server -! -interface Management1 - description OOB_MANAGEMENT - vrf MGMT - ip address 10.73.255.122/24 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-1.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/monitor-server-radius.yml similarity index 100% rename from ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-1.yml rename to ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/monitor-server-radius.yml diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-2.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host2/monitor-server-radius.yml similarity index 100% rename from ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/monitor-server-radius-2.yml rename to ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host2/monitor-server-radius.yml diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/input-variables.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/input-variables.md index 93b5372ea2e..aaef6188f0a 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/input-variables.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/input-variables.md @@ -647,7 +647,7 @@ roles/eos_cli_config_gen/docs/tables/management-api-gnmi.md roles/eos_cli_config_gen/docs/tables/monitor-connectivity.md --8<-- -### Monitor Server Radius +### Monitor server Radius --8<-- roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md index d78535dcdae..268b5b7e7ff 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md @@ -10,12 +10,12 @@ | [monitor_server_radius](## "monitor_server_radius") | Dictionary | | | | Settings to monitor radius servers. | | [  service_dot1x](## "monitor_server_radius.service_dot1x") | Boolean | | | | Monitor servers used for 802.1X authentication. | | [  probe](## "monitor_server_radius.probe") | Dictionary | | | | Settings for probe sent to the server. | - | [    interval](## "monitor_server_radius.probe.interval") | Integer | | | Min: 1
Max: 1000 | Server probe period in seconds. | + | [    interval](## "monitor_server_radius.probe.interval") | Integer | | | Min: 1
Max: 1000 | Server probe interval in seconds. | | [    threshold_failure](## "monitor_server_radius.probe.threshold_failure") | Integer | | | Min: 1
Max: 255 | Number of consecutive failed probes before a server is marked as dead. | | [    method](## "monitor_server_radius.probe.method") | String | | | Valid Values:
- status-server
- access-request | Method used to probe the server. `status-server` is the EOS default method. | | [    access_request](## "monitor_server_radius.probe.access_request") | Dictionary | | | | This can only be set when `method` is `access_request`. | | [      username](## "monitor_server_radius.probe.access_request.username") | String | Required | | | | - | [      password](## "monitor_server_radius.probe.access_request.password") | String | Required | | | Type 7 password. | + | [      password](## "monitor_server_radius.probe.access_request.password") | String | Required | | | | | [      password_type](## "monitor_server_radius.probe.access_request.password_type") | String | | `7` | Valid Values:
- 0
- 7
- 8a | | === "YAML" @@ -30,7 +30,7 @@ # Settings for probe sent to the server. probe: - # Server probe period in seconds. + # Server probe interval in seconds. interval: # Number of consecutive failed probes before a server is marked as dead. @@ -42,8 +42,6 @@ # This can only be set when `method` is `access_request`. access_request: username: - - # Type 7 password. password: password_type: ``` diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml index 5cac9902510..10f75b82c4f 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml @@ -8189,11 +8189,19 @@ keys: keys: interval: type: int - description: Server probe period in seconds. + 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 diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml index 8d456115347..e32f26647fc 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml @@ -19,7 +19,7 @@ keys: keys: interval: type: int - description: Server probe period in seconds. + description: Server probe interval in seconds. convert_types: - str min: 1 @@ -46,7 +46,6 @@ keys: required: true password: type: str - description: Type 7 password. required: true password_type: type: str From cc1a3feff3997122c40ac176f6db5a9a945f5c16 Mon Sep 17 00:00:00 2001 From: Laxmikant Chintakindi Date: Tue, 12 Nov 2024 16:13:03 +0530 Subject: [PATCH 12/13] Move documentation to monitoring.j2, address few comments --- .../documentation/devices/host1.md | 50 +++++++++---------- .../documentation/devices/host2.md | 19 ------- .../eos_cli_config_gen/inventory/hosts.yml | 2 - .../docs/tables/monitor-server-radius.md | 10 ++-- .../documentation/monitor-server-radius.j2 | 6 +-- .../j2templates/documentation/monitoring.j2 | 2 + .../j2templates/eos-device-documentation.j2 | 2 - .../schema/eos_cli_config_gen.schema.yml | 3 +- .../monitor_server_radius.schema.yml | 7 ++- 9 files changed, 39 insertions(+), 62 deletions(-) diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md index af396b0e1c8..55bb5435aef 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md @@ -58,6 +58,7 @@ - [Event Handler](#event-handler) - [Object Tracking](#object-tracking) - [Monitor Telemetry Postcard Policy](#monitor-telemetry-postcard-policy) + - [Monitor Server Radius Summary](#monitor-server-radius-summary) - [Monitor Connectivity](#monitor-connectivity) - [Global Configuration](#global-configuration) - [VRF Configuration](#vrf-configuration) @@ -198,9 +199,6 @@ - [InfluxDB Telemetry](#influxdb-telemetry) - [InfluxDB Telemetry Summary](#influxdb-telemetry-summary) - [InfluxDB Telemetry Device Configuration](#influxdb-telemetry-device-configuration) -- [Monitor Server Radius Summary](#monitor-server-radius-summary) - - [Server Probe Settings](#server-probe-settings) - - [Monitor Server Radius Device Configuration](#monitor-server-radius-device-configuration) - [STUN](#stun) - [STUN Client](#stun-client) - [STUN Server](#stun-server) @@ -1724,6 +1722,29 @@ monitor telemetry postcard policy ingress sample policy samplepo2 ``` +### Monitor Server Radius Summary + +Monitor servers are used for 802.1x authentication. + +#### Server Probe Settings + +| Setting | Value | +| ------- | ----- | +| Probe interval | 100 | +| Threshold failure | 100 | +| Probe method | access-request | + +#### Monitor Server Radius Device Configuration + +```eos +! +monitor server radius + service dot1x + probe interval 100 seconds + probe threshold failure 100 + probe method access-request username arista password 7 +``` + ## Monitor Connectivity ### Global Configuration @@ -7557,29 +7578,6 @@ monitor telemetry influx source group standard disabled ``` -## Monitor Server Radius Summary - -Monitor servers are used for 802.1x authentication. - -### Server Probe Settings - -| Setting | Value | -| ------- | ----- | -| Probe interval | 100 | -| Threshold failure | 100 | -| Probe method | access-request | - -### Monitor Server Radius Device Configuration - -```eos -! -monitor server radius - service dot1x - probe interval 100 seconds - probe threshold failure 100 - probe method access-request username arista password 7 -``` - ## STUN ### STUN Client diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md index fa5a77a1800..65073be4434 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md @@ -58,9 +58,6 @@ - [IP DHCP Snooping Device Configuration](#ip-dhcp-snooping-device-configuration) - [IP NAT](#ip-nat) - [IP NAT Device Configuration](#ip-nat-device-configuration) -- [Monitor Server Radius Summary](#monitor-server-radius-summary) - - [Server Probe Settings](#server-probe-settings) - - [Monitor Server Radius Device Configuration](#monitor-server-radius-device-configuration) ## Management @@ -597,19 +594,3 @@ ip dhcp snooping ! ip nat synchronization ``` - -## Monitor Server Radius Summary - -### Server Probe Settings - -| Setting | Value | -| ------- | ----- | -| Probe method | status-server | - -### Monitor Server Radius Device Configuration - -```eos -! -monitor server radius - probe method status-server -``` diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.yml index ee67e317d73..5100becd582 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.yml @@ -44,8 +44,6 @@ test_hosts: management-defaults: management-interfaces: mac-security-eth-po-entropy: - monitor-server-radius-1: - monitor-server-radius-2: mpls: mpls-2: mpls-3: diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md index 268b5b7e7ff..b4d4d275211 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-server-radius.md @@ -14,8 +14,8 @@ | [    threshold_failure](## "monitor_server_radius.probe.threshold_failure") | Integer | | | Min: 1
Max: 255 | Number of consecutive failed probes before a server is marked as dead. | | [    method](## "monitor_server_radius.probe.method") | String | | | Valid Values:
- status-server
- access-request | Method used to probe the server. `status-server` is the EOS default method. | | [    access_request](## "monitor_server_radius.probe.access_request") | Dictionary | | | | This can only be set when `method` is `access_request`. | - | [      username](## "monitor_server_radius.probe.access_request.username") | String | Required | | | | - | [      password](## "monitor_server_radius.probe.access_request.password") | String | Required | | | | + | [      username](## "monitor_server_radius.probe.access_request.username") | String | | | | | + | [      password](## "monitor_server_radius.probe.access_request.password") | String | | | | Encrypted password using the `password_type`. | | [      password_type](## "monitor_server_radius.probe.access_request.password_type") | String | | `7` | Valid Values:
- 0
- 7
- 8a | | === "YAML" @@ -41,7 +41,9 @@ # This can only be set when `method` is `access_request`. access_request: - username: - password: + username: + + # Encrypted password using the `password_type`. + password: password_type: ``` diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 index 0976cc84f5e..205d4cb4775 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-server-radius.j2 @@ -6,14 +6,14 @@ {# doc - monitor server radius #} {% if monitor_server_radius is arista.avd.defined %} -## Monitor Server Radius Summary +### 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 +#### Server Probe Settings | Setting | Value | | ------- | ----- | @@ -28,7 +28,7 @@ Monitor servers are used for 802.1x authentication. {% endif %} {% endif %} -### Monitor Server Radius Device Configuration +#### Monitor Server Radius Device Configuration ```eos {% include 'eos/monitor-server-radius.j2' %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitoring.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitoring.j2 index b45325a48cc..7fa8a227163 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitoring.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitoring.j2 @@ -62,4 +62,6 @@ {% include 'documentation/trackers.j2' %} {## Monitor Telemetry Postcard #} {% include 'documentation/monitor-telemetry-postcard-policy.j2' %} +{## Monitor Server Radius #} +{% include 'documentation/monitor-server-radius.j2' %} {% endif %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos-device-documentation.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos-device-documentation.j2 index 44b3fdcd91d..467984203a9 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos-device-documentation.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos-device-documentation.j2 @@ -121,8 +121,6 @@ {% include 'documentation/quality-of-service.j2' %} {# InfluxDB Telemetry #} {% include 'documentation/monitor-telemetry-influx.j2' %} -{# Monitor Server Radius #} -{% include 'documentation/monitor-server-radius.j2' %} {# Priority Flow Control #} {% include 'documentation/priority-flow-control.j2' %} {# STUN #} diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml index 10f75b82c4f..099523b17b0 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml @@ -8215,10 +8215,9 @@ keys: keys: username: type: str - required: true password: type: str - required: true + description: Encrypted password using the `password_type`. password_type: type: str convert_types: diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml index e32f26647fc..5e7d50172e7 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_server_radius.schema.yml @@ -35,18 +35,17 @@ keys: type: str description: Method used to probe the server. `status-server` is the EOS default method. valid_values: - - "status-server" - - "access-request" + - status-server + - access-request access_request: type: dict description: This can only be set when `method` is `access_request`. keys: username: type: str - required: true password: type: str - required: true + description: Encrypted password using the `password_type`. password_type: type: str convert_types: From 0ea6700ef2c7149ed16d3c7042ed0d904f9b07cc Mon Sep 17 00:00:00 2001 From: Laxmikant Chintakindi Date: Wed, 13 Nov 2024 10:59:16 +0530 Subject: [PATCH 13/13] Fix doc for monitor server radius --- .../documentation/devices/host2.md | 20 +++++++++++++++++++ .../j2templates/documentation/monitoring.j2 | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md index 65073be4434..7fa89280881 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md @@ -23,6 +23,8 @@ - [DHCP Relay Device Configuration](#dhcp-relay-device-configuration) - [System Boot Settings](#system-boot-settings) - [System Boot Device Configuration](#system-boot-device-configuration) +- [Monitoring](#monitoring) + - [Monitor Server Radius Summary](#monitor-server-radius-summary) - [Monitor Connectivity](#monitor-connectivity) - [Global Configuration](#global-configuration) - [Monitor Connectivity Device Configuration](#monitor-connectivity-device-configuration) @@ -295,6 +297,24 @@ dhcp relay ! ``` +## Monitoring + +### Monitor Server Radius Summary + +#### Server Probe Settings + +| Setting | Value | +| ------- | ----- | +| Probe method | status-server | + +#### Monitor Server Radius Device Configuration + +```eos +! +monitor server radius + probe method status-server +``` + ## Monitor Connectivity ### Global Configuration diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitoring.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitoring.j2 index 7fa8a227163..100f31037f1 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitoring.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitoring.j2 @@ -31,7 +31,8 @@ or flow_tracking is arista.avd.defined or trackers is arista.avd.defined or sflow_interfaces | length > 0 - or monitor_telemetry_postcard_policy is arista.avd.defined %} + or monitor_telemetry_postcard_policy is arista.avd.defined + or monitor_server_radius is arista.avd.defined %} ## Monitoring {## TerminAttr Daemon #}