Skip to content

Commit dcaa9ed

Browse files
laxmikantchintakindiLaxmikant Chintakindigmuloc
authored
Refactor(eos_cli_config_gen): Rearrange eos_cli as per EOS4.35.0F part16 (#6461)
Co-authored-by: Laxmikant Chintakindi <laxmikant.c-ext@Laxmikants-MacBook-Pro.local> Co-authored-by: Guillaume Mulocher <gmulocher@arista.com>
1 parent 351b848 commit dcaa9ed

9 files changed

Lines changed: 106 additions & 125 deletions

File tree

ansible_collections/arista/avd/extensions/molecule/eos_cli_config_gen/documentation/devices/host1.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3589,18 +3589,25 @@ Transceiver dom-threshold file: flash:/dom_threshold.csv
35893589

35903590
| Host Name | Description | IPv4 Address | ICMP Echo Size | Probing Interface Set | Address Only | URL |
35913591
| --------- | ----------- | ------------ | -------------- | --------------------- | ------------ | --- |
3592+
| Server3 | server3_connectivity_monitor | 10.10.10.3 | 1200 | HOST_SET | False | - |
35923593
| server1 | server1_connectivity_monitor | 10.10.10.1 | - | HOST_SET | True | https://server1.local.com |
35933594
| server2 | server2_connectivity_monitor | 10.10.10.2 | - | HOST_SET | True | https://server2.local.com |
3594-
| server3 | server3_connectivity_monitor | 10.10.10.3 | 1200 | HOST_SET | False | - |
35953595
| server4 | - | - | - | - | True | - |
35963596

35973597
### VRF Configuration
35983598

35993599
| Name | Description | Default Interface Set | Address Only |
36003600
| ---- | ----------- | --------------------- | ------------ |
3601+
| Yellow | - | - | True |
36013602
| blue | - | VRF_GLOBAL_SET | False |
36023603
| red | vrf_connectivity_monitor | VRF_GLOBAL_SET | True |
3603-
| yellow | - | - | True |
3604+
3605+
#### Vrf Yellow Configuration
3606+
3607+
##### Interface Sets
3608+
3609+
| Name | Interfaces |
3610+
| ---- | ---------- |
36043611

36053612
#### Vrf blue Configuration
36063613

@@ -3614,8 +3621,8 @@ Transceiver dom-threshold file: flash:/dom_threshold.csv
36143621

36153622
| Host Name | Description | IPv4 Address | ICMP Echo Size | Probing Interface Set | Address Only | URL |
36163623
| --------- | ----------- | ------------ | -------------- | --------------------- | ------------ | --- |
3624+
| Server5 | server5_connectivity_monitor | 10.10.20.11 | - | VRF_GLOBAL_SET | True | https://server5.local.com |
36173625
| server4 | server4_connectivity_monitor | 10.10.20.1 | - | VRF_GLOBAL_SET | False | https://server2.local.com |
3618-
| server5 | server5_connectivity_monitor | 10.10.20.11 | - | VRF_GLOBAL_SET | True | https://server5.local.com |
36193626
| server6 | - | - | - | - | True | - |
36203627

36213628
#### Vrf red Configuration
@@ -3633,13 +3640,6 @@ Transceiver dom-threshold file: flash:/dom_threshold.csv
36333640
| --------- | ----------- | ------------ | -------------- | --------------------- | ------------ | --- |
36343641
| server2 | server2_connectivity_monitor | 10.10.20.1 | 1300 | VRF_HOST_SET | True | https://server2.local.com |
36353642

3636-
#### Vrf yellow Configuration
3637-
3638-
##### Interface Sets
3639-
3640-
| Name | Interfaces |
3641-
| ---- | ---------- |
3642-
36433643
##### Name-server
36443644

36453645
Name-server Group: mynameserver1
@@ -3656,6 +3656,13 @@ monitor connectivity
36563656
interface set HOST_SET Loopback2-4, Loopback10-12
36573657
local-interfaces GLOBAL_SET address-only default
36583658
!
3659+
host Server3
3660+
description
3661+
server3_connectivity_monitor
3662+
local-interfaces HOST_SET
3663+
ip 10.10.10.3
3664+
icmp echo size 1200
3665+
!
36593666
host server1
36603667
description
36613668
server1_connectivity_monitor
@@ -3670,33 +3677,28 @@ monitor connectivity
36703677
ip 10.10.10.2
36713678
url https://server2.local.com
36723679
!
3673-
host server3
3674-
description
3675-
server3_connectivity_monitor
3676-
local-interfaces HOST_SET
3677-
ip 10.10.10.3
3678-
icmp echo size 1200
3679-
!
36803680
host server4
36813681
!
3682+
vrf Yellow
3683+
!
36823684
vrf blue
36833685
interface set VRF_GLOBAL_SET Vlan21-24, Vlan29-32
36843686
local-interfaces VRF_GLOBAL_SET default
36853687
!
3688+
host Server5
3689+
description
3690+
server5_connectivity_monitor
3691+
local-interfaces VRF_GLOBAL_SET address-only
3692+
ip 10.10.20.11
3693+
url https://server5.local.com
3694+
!
36863695
host server4
36873696
description
36883697
server4_connectivity_monitor
36893698
local-interfaces VRF_GLOBAL_SET
36903699
ip 10.10.20.1
36913700
url https://server2.local.com
36923701
!
3693-
host server5
3694-
description
3695-
server5_connectivity_monitor
3696-
local-interfaces VRF_GLOBAL_SET address-only
3697-
ip 10.10.20.11
3698-
url https://server5.local.com
3699-
!
37003702
host server6
37013703
!
37023704
vrf red
@@ -3713,8 +3715,6 @@ monitor connectivity
37133715
ip 10.10.20.1
37143716
icmp echo size 1300
37153717
url https://server2.local.com
3716-
!
3717-
vrf yellow
37183718
```
37193719

37203720
## Monitor Layer 1 Logging
@@ -14499,8 +14499,8 @@ Source Group Standard Disabled : True
1449914499

1450014500
| Destination | Database | URL | VRF | Username |
1450114501
| ----------- | -------- | --- | --- | -------- |
14502+
| Test1 | test1 | https://influx_test1.localhost | test | test1 |
1450214503
| test | test | https://influx_test.localhost | test | test |
14503-
| test1 | test1 | https://influx_test1.localhost | test | test1 |
1450414504

1450514505
#### InfluxDB Telemetry Sources
1450614506

@@ -14521,20 +14521,20 @@ Source Group Standard Disabled : True
1452114521
```eos
1452214522
!
1452314523
monitor telemetry influx
14524+
destination influxdb Test1
14525+
url https://influx_test1.localhost
14526+
database name test1
14527+
retention policy test1
14528+
vrf test
14529+
username test1 password 7 <removed>
14530+
!
1452414531
destination influxdb test
1452514532
url https://influx_test.localhost
1452614533
database name test
1452714534
retention policy test
1452814535
vrf test
1452914536
username test password 7 <removed>
1453014537
!
14531-
destination influxdb test1
14532-
url https://influx_test1.localhost
14533-
database name test1
14534-
retention policy test1
14535-
vrf test
14536-
username test1 password 7 <removed>
14537-
!
1453814538
source socket socket1
1453914539
url unix:///var/run/example2.sock
1454014540
connection limit 100

ansible_collections/arista/avd/extensions/molecule/eos_cli_config_gen/intended/configs/host1.cfg

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2006,20 +2006,20 @@ dot1x
20062006
supplicant logging
20072007
!
20082008
monitor telemetry influx
2009+
destination influxdb Test1
2010+
url https://influx_test1.localhost
2011+
database name test1
2012+
retention policy test1
2013+
vrf test
2014+
username test1 password 7 131112011F5D
2015+
!
20092016
destination influxdb test
20102017
url https://influx_test.localhost
20112018
database name test
20122019
retention policy test
20132020
vrf test
20142021
username test password 7 <password>
20152022
!
2016-
destination influxdb test1
2017-
url https://influx_test1.localhost
2018-
database name test1
2019-
retention policy test1
2020-
vrf test
2021-
username test1 password 7 131112011F5D
2022-
!
20232023
source socket socket1
20242024
url unix:///var/run/example2.sock
20252025
connection limit 100
@@ -4631,6 +4631,13 @@ monitor connectivity
46314631
interface set HOST_SET Loopback2-4, Loopback10-12
46324632
local-interfaces GLOBAL_SET address-only default
46334633
!
4634+
host Server3
4635+
description
4636+
server3_connectivity_monitor
4637+
local-interfaces HOST_SET
4638+
ip 10.10.10.3
4639+
icmp echo size 1200
4640+
!
46344641
host server1
46354642
description
46364643
server1_connectivity_monitor
@@ -4645,33 +4652,28 @@ monitor connectivity
46454652
ip 10.10.10.2
46464653
url https://server2.local.com
46474654
!
4648-
host server3
4649-
description
4650-
server3_connectivity_monitor
4651-
local-interfaces HOST_SET
4652-
ip 10.10.10.3
4653-
icmp echo size 1200
4654-
!
46554655
host server4
46564656
!
4657+
vrf Yellow
4658+
!
46574659
vrf blue
46584660
interface set VRF_GLOBAL_SET Vlan21-24, Vlan29-32
46594661
local-interfaces VRF_GLOBAL_SET default
46604662
!
4663+
host Server5
4664+
description
4665+
server5_connectivity_monitor
4666+
local-interfaces VRF_GLOBAL_SET address-only
4667+
ip 10.10.20.11
4668+
url https://server5.local.com
4669+
!
46614670
host server4
46624671
description
46634672
server4_connectivity_monitor
46644673
local-interfaces VRF_GLOBAL_SET
46654674
ip 10.10.20.1
46664675
url https://server2.local.com
46674676
!
4668-
host server5
4669-
description
4670-
server5_connectivity_monitor
4671-
local-interfaces VRF_GLOBAL_SET address-only
4672-
ip 10.10.20.11
4673-
url https://server5.local.com
4674-
!
46754677
host server6
46764678
!
46774679
vrf red
@@ -4688,8 +4690,6 @@ monitor connectivity
46884690
ip 10.10.20.1
46894691
icmp echo size 1300
46904692
url https://server2.local.com
4691-
!
4692-
vrf yellow
46934693
!
46944694
mac address-table aging-time 100
46954695
!

ansible_collections/arista/avd/extensions/molecule/eos_cli_config_gen/inventory/host_vars/host1/monitor-connectivity.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ monitor_connectivity:
2323
# This is default in AVD 4.x
2424
# address_only: true
2525
url: https://server2.local.com
26-
- name: server3
26+
- name: Server3
2727
description: server3_connectivity_monitor
2828
ip: 10.10.10.3
2929
icmp_echo_size: 1200
@@ -59,14 +59,14 @@ monitor_connectivity:
5959
address_only: false
6060
local_interfaces: VRF_GLOBAL_SET
6161
url: https://server2.local.com
62-
- name: server5
62+
- name: Server5
6363
description: server5_connectivity_monitor
6464
ip: 10.10.20.11
6565
address_only: true
6666
local_interfaces: VRF_GLOBAL_SET
6767
url: https://server5.local.com
6868
- name: server6
69-
- name: yellow
69+
- name: Yellow
7070
address_only: true
7171
interface_sets:
7272
- name: VRF_GLOBAL_SET

ansible_collections/arista/avd/extensions/molecule/eos_cli_config_gen/inventory/host_vars/host1/monitor-telemetry-influx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ monitor_telemetry_influx:
88
url: https://influx_test.localhost
99
username: test
1010
password: <password>
11-
- name: test1
11+
- name: Test1
1212
database: test1
1313
data_retention_policy: test1
1414
url: https://influx_test1.localhost

python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-connectivity.j2

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515

1616
| Name | Interfaces |
1717
| ---- | ---------- |
18-
{% for interface_set in monitor_connectivity.interface_sets | arista.avd.natural_sort('name') %}
19-
{% if interface_set.name is arista.avd.defined and interface_set.interfaces is arista.avd.defined %}
18+
{% for interface_set in monitor_connectivity.interface_sets | arista.avd.natural_sort(sort_key='name', ignore_case=false) | selectattr("interfaces","arista.avd.defined") %}
2019
| {{ interface_set.name }} | {{ interface_set.interfaces }} |
21-
{% endif %}
2220
{% endfor %}
2321
{% endif %}
2422

@@ -33,10 +31,8 @@
3331

3432
| Host Name | Description | IPv4 Address | ICMP Echo Size | Probing Interface Set | Address Only | URL |
3533
| --------- | ----------- | ------------ | -------------- | --------------------- | ------------ | --- |
36-
{% for host in monitor_connectivity.hosts | arista.avd.natural_sort('name') %}
37-
{% if host.name is arista.avd.defined %}
34+
{% for host in monitor_connectivity.hosts | arista.avd.natural_sort(sort_key='name', ignore_case=false) %}
3835
| {{ host.name }} | {{ host.description | arista.avd.default('-') }} | {{ host.ip | arista.avd.default('-') }} | {{ host.icmp_echo_size | arista.avd.default('-') }} | {{ host.local_interfaces | arista.avd.default('-') }} | {{ host.address_only | arista.avd.default(true) }} | {{ host.url | arista.avd.default('-') }} |
39-
{% endif %}
4036
{% endfor %}
4137
{% endif %}
4238
{% if monitor_connectivity.vrfs is arista.avd.defined %}
@@ -45,39 +41,31 @@
4541

4642
| Name | Description | Default Interface Set | Address Only |
4743
| ---- | ----------- | --------------------- | ------------ |
48-
{% for vrf in monitor_connectivity.vrfs | arista.avd.natural_sort('name') %}
49-
{% if vrf.name is arista.avd.defined %}
44+
{% for vrf in monitor_connectivity.vrfs | arista.avd.natural_sort(sort_key='name', ignore_case=false) %}
5045
| {{ vrf.name }} | {{ vrf.description | arista.avd.default('-') }} | {{ vrf.local_interfaces | arista.avd.default('-') }} | {{ vrf.address_only | arista.avd.default(true) }} |
51-
{% endif %}
5246
{% endfor %}
53-
{% for vrf in monitor_connectivity.vrfs | arista.avd.natural_sort('name') %}
54-
{% if vrf.name is arista.avd.defined %}
47+
{% for vrf in monitor_connectivity.vrfs | arista.avd.natural_sort(sort_key='name', ignore_case=false) %}
5548

5649
#### Vrf {{ vrf.name }} Configuration
57-
{% if vrf.interface_sets is arista.avd.defined %}
50+
{% if vrf.interface_sets is arista.avd.defined %}
5851

5952
##### Interface Sets
6053

6154
| Name | Interfaces |
6255
| ---- | ---------- |
63-
{% for interface_set in vrf.interface_sets | arista.avd.natural_sort('name') %}
64-
{% if interface_set.name is arista.avd.defined and interface_set.interfaces is arista.avd.defined %}
56+
{% for interface_set in vrf.interface_sets | arista.avd.natural_sort(sort_key='name', ignore_case=false) | selectattr("interfaces","arista.avd.defined") %}
6557
| {{ interface_set.name }} | {{ interface_set.interfaces }} |
66-
{% endif %}
67-
{% endfor %}
68-
{% endif %}
69-
{% if vrf.hosts is arista.avd.defined %}
58+
{% endfor %}
59+
{% endif %}
60+
{% if vrf.hosts is arista.avd.defined %}
7061

7162
##### Host Parameters
7263

7364
| Host Name | Description | IPv4 Address | ICMP Echo Size | Probing Interface Set | Address Only | URL |
7465
| --------- | ----------- | ------------ | -------------- | --------------------- | ------------ | --- |
75-
{% for host in vrf.hosts | arista.avd.natural_sort('name') %}
76-
{% if host.name is arista.avd.defined %}
66+
{% for host in vrf.hosts | arista.avd.natural_sort(sort_key='name', ignore_case=false) %}
7767
| {{ host.name }} | {{ host.description | arista.avd.default('-') }} | {{ host.ip | arista.avd.default('-') }} | {{ host.icmp_echo_size | arista.avd.default('-') }} | {{ host.local_interfaces | arista.avd.default('-') }} | {{ host.address_only | arista.avd.default(true) }} | {{ host.url | arista.avd.default('-') }} |
78-
{% endif %}
79-
{% endfor %}
80-
{% endif %}
68+
{% endfor %}
8169
{% endif %}
8270
{% endfor %}
8371
{% endif %}

python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-telemetry-influx.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Source Group Standard Disabled : {{ monitor_telemetry_influx.source_group_standa
1919

2020
| Destination | Database | URL | VRF | Username |
2121
| ----------- | -------- | --- | --- | -------- |
22-
{% for destination in monitor_telemetry_influx.destinations | arista.avd.natural_sort('name') %}
22+
{% for destination in monitor_telemetry_influx.destinations | arista.avd.natural_sort(sort_key='name', ignore_case=false) %}
2323
| {{ destination.name | arista.avd.default('-') }} | {{ destination.database | arista.avd.default('-') }} | {{ destination.url | arista.avd.default('-') }} | {{ monitor_telemetry_influx.vrf | arista.avd.default('-') }} | {{ destination.username | arista.avd.default('-') }} |
2424
{% endfor %}
2525
{% endif %}
@@ -29,7 +29,7 @@ Source Group Standard Disabled : {{ monitor_telemetry_influx.source_group_standa
2929

3030
| Source Name | URL | Connection Limit |
3131
| ----------- | --- | ---------------- |
32-
{% for source in monitor_telemetry_influx.source_sockets | arista.avd.natural_sort('name') %}
32+
{% for source in monitor_telemetry_influx.source_sockets | arista.avd.natural_sort(sort_key='name', ignore_case=false) %}
3333
| {{ source.name | arista.avd.default('-') }} | {{ source.url | arista.avd.default('-') }} | {{ source.connection_limit | arista.avd.default('-') }} |
3434
{% endfor %}
3535
{% endif %}

0 commit comments

Comments
 (0)