Skip to content

Commit

Permalink
Merge branch 'devel' into ipv4_acl
Browse files Browse the repository at this point in the history
  • Loading branch information
Vibhu-gslab authored May 2, 2024
2 parents b307fd9 + d9e7aac commit ef15a06
Show file tree
Hide file tree
Showing 136 changed files with 1,740 additions and 218 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ Within a single range, prefixes (ex. Ethernet, Eth, Po) are carried over to item

- "{{ 'Et1-2/3-4/5-6' | range_expand }}"
# -> ["Et1/3/5", "Et1/3/6", "Et1/4/5", "Et1/4/6", "Et2/3/5", "Et2/3/6", "Et2/4/5", "Et2/4/6"]

- "{{ 'eth{7,9,11-13}/1,21/1,26/1' | range_expand }}"
# -> ["eth7/1", "eth9/1", "eth11/1", "eth12/1", "eth13/1", "eth21/1", "eth26/1"]
```

## Return Values
Expand Down
6 changes: 6 additions & 0 deletions ansible_collections/arista/avd/docs/pyavd.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ Optional `md-toc` requirement (automatically installed with above command):
md-toc>=8.1.8
```

To install Ansible [AVD collection additional Python requirements](installation/collection-installation.md#additional-python-libraries-required) install with extra `ansible`:

```sh
pip3 install pyavd[ansible]
```

## Reference

::: pyavd.validate_inputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
}
.md-typeset code {
padding: 0 .2941176471em;
font-size: 80%;
word-break: break-word;
background-color: var(--md-code-bg-color);
border-radius: .1rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ dns domain test.local
| 10.10.129.10 | - | 0 |
| 10.10.128.10 | mgmt | - |
| 10.10.128.10 | TEST | 3 |
| 2001:db8::1 | - | - |
| 2001:db8::2 | - | 0 |
| 2001:db8::1 | mgmt | - |
| 2001:db8::2 | TEST | 3 |

#### IP Name Servers Device Configuration

Expand All @@ -66,6 +70,10 @@ ip name-server 10.10.128.10
ip name-server vrf mgmt 10.10.128.10
ip name-server vrf TEST 10.10.128.10 priority 3
ip name-server 10.10.129.10 priority 0
ip name-server 2001:db8::1
ip name-server vrf mgmt 2001:db8::1
ip name-server 2001:db8::2 priority 0
ip name-server vrf TEST 2001:db8::2 priority 3
```

### Domain Lookup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,17 @@ interface Management1

#### Event Handler Summary

| Handler | Action Type | Action | Trigger |
| ------- | ----------- | ------ | ------- |
| CONFIG_VERSIONING | bash | <code>FN=/mnt/flash/startup-config; LFN="`ls -1 $FN.*-* \| tail -n 1`"; if [ -z "$LFN" -o -n "`diff -I 'last modified' $FN $LFN`" ]; then cp $FN $FN.`date +%Y%m%d-%H%M%S`; ls -1r $FN.*-* \| tail -n +11 \| xargs -I % rm %; fi</code> | on-startup-config |
| evpn-blacklist-recovery | bash | <code>FastCli -p 15 -c "clear bgp evpn host-flap"</code> | on-logging |
| trigger-on-boot | bash | <code>echo "on-boot"</code> | on-boot |
| trigger-on-maintenance1 | bash | <code>echo "on-maintenance"</code> | on-maintenance |
| trigger-on-maintenance2 | bash | <code>echo "on-maintenance"</code> | on-maintenance |
| trigger-on-maintenance3 | bash | <code>echo "on-maintenance"</code> | on-maintenance |
| Handler | Action Type | Action | Trigger | Trigger Config |
| ------- | ----------- | ------ | ------- | -------------- |
| CONFIG_VERSIONING | bash | <code>FN=/mnt/flash/startup-config; LFN="`ls -1 $FN.*-* \| tail -n 1`"; if [ -z "$LFN" -o -n "`diff -I 'last modified' $FN $LFN`" ]; then cp $FN $FN.`date +%Y%m%d-%H%M%S`; ls -1r $FN.*-* \| tail -n +11 \| xargs -I % rm %; fi</code> | on-startup-config | - |
| trigger-on-boot | bash | <code>echo "on-boot"</code> | on-boot | - |
| trigger-on-counters | bash | <code>echo "on-counters"</code> | on-counters | poll interval 10<br>condition( Arad*.IptCrcErrCnt.delta > 100 ) and ( Arad*.UcFifoFullDrop.delta > 100 )<br>granularity per-source |
| trigger-on-intf | bash | <code>echo "on-intf"</code> | on-intf | trigger on-intf Ethernet4 operstatus ip ip6 |
| trigger-on-logging | bash | <code>echo "on-logging"</code> | on-logging | poll interval 10<br>regex ab* |
| trigger-on-maintenance1 | bash | <code>echo "on-maintenance"</code> | on-maintenance | trigger on-maintenance enter interface Management3 after stage linkdown |
| trigger-on-maintenance2 | bash | <code>echo "on-maintenance"</code> | on-maintenance | trigger on-maintenance enter unit unit1 before stage bgp |
| trigger-on-maintenance3 | bash | <code>echo "on-maintenance"</code> | on-maintenance | trigger on-maintenance enter bgp 10.0.0.2 vrf vrf1 all |
| trigger-vm-tracer | bash | <code>echo "vm-tracer vm"</code> | vm-tracer vm | - |

#### Event Handler Device Configuration

Expand All @@ -59,17 +62,27 @@ event-handler CONFIG_VERSIONING
action bash FN=/mnt/flash/startup-config; LFN="`ls -1 $FN.*-* | tail -n 1`"; if [ -z "$LFN" -o -n "`diff -I 'last modified' $FN $LFN`" ]; then cp $FN $FN.`date +%Y%m%d-%H%M%S`; ls -1r $FN.*-* | tail -n +11 | xargs -I % rm %; fi
delay 0
!
event-handler evpn-blacklist-recovery
trigger on-logging
regex EVPN-3-BLACKLISTED_DUPLICATE_MAC
action bash FastCli -p 15 -c "clear bgp evpn host-flap"
delay 300
asynchronous
!
event-handler trigger-on-boot
trigger on-boot
action bash echo "on-boot"
!
event-handler trigger-on-counters
trigger on-counters
poll interval 10
condition ( Arad*.IptCrcErrCnt.delta > 100 ) and ( Arad*.UcFifoFullDrop.delta > 100 )
granularity per-source
action bash echo "on-counters"
!
event-handler trigger-on-intf
trigger on-intf Ethernet4 operstatus ip ip6
action bash echo "on-intf"
!
event-handler trigger-on-logging
trigger on-logging
poll interval 10
regex ab*
action bash echo "on-logging"
!
event-handler trigger-on-maintenance1
trigger on-maintenance enter interface Management3 after stage linkdown
action bash echo "on-maintenance"
Expand All @@ -81,4 +94,8 @@ event-handler trigger-on-maintenance2
event-handler trigger-on-maintenance3
trigger on-maintenance enter bgp 10.0.0.2 vrf vrf1 all
action bash echo "on-maintenance"
!
event-handler trigger-vm-tracer
trigger vm-tracer vm
action bash echo "vm-tracer vm"
```
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ interface Ethernet50
| Port-Channel121 | access_port_with_no_vlans | switched | access | - | - | - | - | - | - | - |
| Port-Channel122 | trunk_port_with_no_vlans | switched | trunk | - | - | - | - | - | - | - |
| Port-Channel130 | IP NAT Testing | switched | access | - | - | - | - | - | - | - |
| Port-Channel131 | dot1q-tunnel mode | switched | dot1q-tunnel | - | - | - | - | - | - | - |
| Port-Channel131 | dot1q-tunnel mode | switched | dot1q-tunnel | 115 | - | - | - | - | - | - |

##### Encapsulation Dot1q

Expand Down Expand Up @@ -707,6 +707,7 @@ interface Port-Channel130
interface Port-Channel131
description dot1q-tunnel mode
switchport
switchport access vlan 115
switchport mode dot1q-tunnel
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ interface Port-Channel5
switchport mode trunk
mlag 5
ptp enable
ptp mpass
ptp delay-mechanism e2e
ptp sync-message interval 1
ptp role dynamic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ ip name-server 10.10.128.10
ip name-server vrf mgmt 10.10.128.10
ip name-server vrf TEST 10.10.128.10 priority 3
ip name-server 10.10.129.10 priority 0
ip name-server 2001:db8::1
ip name-server vrf mgmt 2001:db8::1
ip name-server 2001:db8::2 priority 0
ip name-server vrf TEST 2001:db8::2 priority 3
dns domain test.local
!
ntp authentication-key 1 md5 044F0E151B
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,27 @@ event-handler CONFIG_VERSIONING
action bash FN=/mnt/flash/startup-config; LFN="`ls -1 $FN.*-* | tail -n 1`"; if [ -z "$LFN" -o -n "`diff -I 'last modified' $FN $LFN`" ]; then cp $FN $FN.`date +%Y%m%d-%H%M%S`; ls -1r $FN.*-* | tail -n +11 | xargs -I % rm %; fi
delay 0
!
event-handler evpn-blacklist-recovery
trigger on-logging
regex EVPN-3-BLACKLISTED_DUPLICATE_MAC
action bash FastCli -p 15 -c "clear bgp evpn host-flap"
delay 300
asynchronous
!
event-handler trigger-on-boot
trigger on-boot
action bash echo "on-boot"
!
event-handler trigger-on-counters
trigger on-counters
poll interval 10
condition ( Arad*.IptCrcErrCnt.delta > 100 ) and ( Arad*.UcFifoFullDrop.delta > 100 )
granularity per-source
action bash echo "on-counters"
!
event-handler trigger-on-intf
trigger on-intf Ethernet4 operstatus ip ip6
action bash echo "on-intf"
!
event-handler trigger-on-logging
trigger on-logging
poll interval 10
regex ab*
action bash echo "on-logging"
!
event-handler trigger-on-maintenance1
trigger on-maintenance enter interface Management3 after stage linkdown
action bash echo "on-maintenance"
Expand All @@ -40,4 +50,8 @@ event-handler trigger-on-maintenance3
trigger on-maintenance enter bgp 10.0.0.2 vrf vrf1 all
action bash echo "on-maintenance"
!
event-handler trigger-vm-tracer
trigger vm-tracer vm
action bash echo "vm-tracer vm"
!
end
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ interface Port-Channel130
interface Port-Channel131
description dot1q-tunnel mode
switchport
switchport access vlan 115
switchport mode dot1q-tunnel
!
interface Ethernet3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ interface Port-Channel5
switchport mode trunk
mlag 5
ptp enable
ptp mpass
ptp delay-mechanism e2e
ptp sync-message interval 1
ptp role dynamic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ ip_name_servers:
- ip_address: 10.10.128.10
vrf: TEST
priority: 3
# no VRF
- ip_address: 2001:db8::1
# no VRF priority
- ip_address: 2001:db8::2
priority: 0
# Same DNS management VRF
- ip_address: 2001:db8::1
vrf: mgmt
# Same DNS different VRF and priority
- ip_address: 2001:db8::2
vrf: TEST
priority: 3

### DNS Domain ###
dns_domain: test.local
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
event_handlers:
- name: evpn-blacklist-recovery
action_type: bash
action: FastCli -p 15 -c "clear bgp evpn host-flap"
delay: 300
trigger: on-logging
regex: EVPN-3-BLACKLISTED_DUPLICATE_MAC
asynchronous: true
- name: CONFIG_VERSIONING
action_type: bash
action: FN=/mnt/flash/startup-config; LFN="`ls -1 $FN.*-* | tail -n 1`"; if [ -z "$LFN" -o -n "`diff -I 'last modified' $FN $LFN`" ]; then cp $FN $FN.`date +%Y%m%d-%H%M%S`; ls -1r $FN.*-* | tail -n +11 | xargs -I % rm %; fi
Expand Down Expand Up @@ -42,3 +35,31 @@ event_handlers:
action: all
action_type: bash
action: echo "on-maintenance"
- name: trigger-on-logging
trigger: on-logging
trigger_on_logging:
poll_interval: 10
regex: "ab*"
action_type: bash
action: echo "on-logging"
- name: trigger-on-counters
trigger: on-counters
trigger_on_counters:
poll_interval: 10
condition: ( Arad*.IptCrcErrCnt.delta > 100 ) and ( Arad*.UcFifoFullDrop.delta > 100 )
granularity_per_source: true
action_type: bash
action: echo "on-counters"
- name: trigger-on-intf
trigger: on-intf
trigger_on_intf:
interface: Ethernet4
ip: true
ipv6: true
operstatus: true
action_type: bash
action: echo "on-intf"
- name: trigger-vm-tracer
trigger: "vm-tracer vm"
action_type: bash
action: echo "vm-tracer vm"
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ port_channel_interfaces:
description: dot1q-tunnel mode
type: switched
mode: dot1q-tunnel
vlans: 115


# Children interfaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ port_channel_interfaces:
mlag: 5
ptp:
enable: true
mpass: true
delay_mechanism: e2e
sync_message:
interval: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,10 @@ vmtracer session session_2

#### Event Handler Summary

| Handler | Action Type | Action | Trigger |
| ------- | ----------- | ------ | ------- |
| CONFIG_VERSIONING | bash | <code>FN=/mnt/flash/startup-config; LFN="`ls -1 $FN.*-* \| tail -n 1`"; if [ -z "$LFN" -o -n "`diff -I 'last modified' $FN $LFN`" ]; then cp $FN $FN.`date +%Y%m%d-%H%M%S`; ls -1r $FN.*-* \| tail -n +11 \| xargs -I % rm %; fi</code> | on-startup-config |
| evpn-blacklist-recovery | bash | <code>FastCli -p 15 -c "clear bgp evpn host-flap"</code> | on-logging |
| Handler | Action Type | Action | Trigger | Trigger Config |
| ------- | ----------- | ------ | ------- | -------------- |
| CONFIG_VERSIONING | bash | <code>FN=/mnt/flash/startup-config; LFN="`ls -1 $FN.*-* \| tail -n 1`"; if [ -z "$LFN" -o -n "`diff -I 'last modified' $FN $LFN`" ]; then cp $FN $FN.`date +%Y%m%d-%H%M%S`; ls -1r $FN.*-* \| tail -n +11 \| xargs -I % rm %; fi</code> | on-startup-config | - |
| evpn-blacklist-recovery | bash | <code>FastCli -p 15 -c "clear bgp evpn host-flap"</code> | on-logging | - |

#### Event Handler Device Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ event_handlers:
action: FastCli -p 15 -c "clear bgp evpn host-flap"
delay: 300
trigger: on-logging
# Testing regex key which is deprecared and will be removed in 5.0.0
regex: EVPN-3-BLACKLISTED_DUPLICATE_MAC
asynchronous: true
CONFIG_VERSIONING:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ hostname DC1-BL1A
ip name-server vrf MGMT 1.1.1.1
ip name-server vrf MGMT 8.8.8.8
ip name-server vrf MGMT 192.168.200.5
ip name-server vrf MGMT 2001:db8::1
ip name-server vrf MGMT 2001:db8::2
!
sflow vrf OOB destination 10.0.200.90
sflow vrf OOB destination 192.168.200.10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ service routing protocols model multi-agent
hostname DC1-BL1B
ip name-server vrf MGMT 8.8.8.8
ip name-server vrf MGMT 192.168.200.5
ip name-server vrf MGMT 2001:db8::1
ip name-server vrf MGMT 2001:db8::2
!
sflow vrf OOB destination 10.0.200.90
sflow vrf OOB destination 192.168.200.10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ service routing protocols model multi-agent
hostname DC1-BL2A
ip name-server vrf MGMT 8.8.8.8
ip name-server vrf MGMT 192.168.200.5
ip name-server vrf MGMT 2001:db8::1
ip name-server vrf MGMT 2001:db8::2
!
ntp local-interface vrf MGMT Management1
ntp server vrf MGMT 192.168.200.5 prefer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ service routing protocols model multi-agent
hostname DC1-BL2B
ip name-server vrf MGMT 8.8.8.8
ip name-server vrf MGMT 192.168.200.5
ip name-server vrf MGMT 2001:db8::1
ip name-server vrf MGMT 2001:db8::2
!
ntp local-interface vrf MGMT Management1
ntp server vrf MGMT 192.168.200.5 prefer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ service routing protocols model multi-agent
hostname DC1-CL1A
ip name-server vrf MGMT 8.8.8.8
ip name-server vrf MGMT 192.168.200.5
ip name-server vrf MGMT 2001:db8::1
ip name-server vrf MGMT 2001:db8::2
!
ntp local-interface vrf MGMT Management0
ntp server vrf MGMT 192.168.200.5 prefer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ service routing protocols model multi-agent
hostname DC1-CL1B
ip name-server vrf MGMT 8.8.8.8
ip name-server vrf MGMT 192.168.200.5
ip name-server vrf MGMT 2001:db8::1
ip name-server vrf MGMT 2001:db8::2
!
ntp local-interface vrf MGMT Management0
ntp server vrf MGMT 192.168.200.5 prefer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ service routing protocols model multi-agent
hostname DC1-L2LEAF1A
ip name-server vrf MGMT 8.8.8.8
ip name-server vrf MGMT 192.168.200.5
ip name-server vrf MGMT 2001:db8::1
ip name-server vrf MGMT 2001:db8::2
!
ntp local-interface vrf MGMT Management1
ntp server vrf MGMT 192.168.200.5 prefer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ service routing protocols model multi-agent
hostname DC1-L2LEAF1B
ip name-server vrf MGMT 8.8.8.8
ip name-server vrf MGMT 192.168.200.5
ip name-server vrf MGMT 2001:db8::1
ip name-server vrf MGMT 2001:db8::2
!
ntp local-interface vrf MGMT Management1
ntp server vrf MGMT 192.168.200.5 prefer
Expand Down
Loading

0 comments on commit ef15a06

Please sign in to comment.