Skip to content

Commit

Permalink
Refactor(eos_cli_config_gen): Rearrange the eos-cli output to match e…
Browse files Browse the repository at this point in the history
…os order for ip-access-lists
  • Loading branch information
Shivani-gslab committed Oct 3, 2024
1 parent d61c8f9 commit 1a066f1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ interface Management1

```eos
!
ip access-list ACL_SEQUENCE_AND_COUNTERS
counters per-entry
10 remark test acl with sequence numbers
20 permit ip 10.0.0.0/8 any
30 permit tcp host 192.168.122.22 any established
40 permit tcp any gt 1023 host 172.16.16.16 eq 22
50 permit tcp any range 1000 1100 any range 10 20
4294967295 deny ip any any
!
ip access-list ACL_NO_SEQUENCE
remark test acl without sequence numbers
deny udp any any log
Expand All @@ -66,4 +57,13 @@ ip access-list ACL_NO_SEQUENCE
permit ip any any nexthop-group NH_TEST
permit vlan inner 123 0x000 ip any any
permit vlan 234 0xFFF ip any any
!
ip access-list ACL_SEQUENCE_AND_COUNTERS
counters per-entry
10 remark test acl with sequence numbers
20 permit ip 10.0.0.0/8 any
30 permit tcp host 192.168.122.22 any established
40 permit tcp any gt 1023 host 172.16.16.16 eq 22
50 permit tcp any range 1000 1100 any range 10 20
4294967295 deny ip any any
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ interface Management1
vrf MGMT
ip address 10.73.255.122/24
!
ip access-list ACL_SEQUENCE_AND_COUNTERS
counters per-entry
10 remark test acl with sequence numbers
20 permit ip 10.0.0.0/8 any
30 permit tcp host 192.168.122.22 any established
40 permit tcp any gt 1023 host 172.16.16.16 eq 22
50 permit tcp any range 1000 1100 any range 10 20
4294967295 deny ip any any
!
ip access-list ACL_NO_SEQUENCE
remark test acl without sequence numbers
deny udp any any log
Expand All @@ -23,3 +14,12 @@ ip access-list ACL_NO_SEQUENCE
permit ip any any nexthop-group NH_TEST
permit vlan inner 123 0x000 ip any any
permit vlan 234 0xFFF ip any any
!
ip access-list ACL_SEQUENCE_AND_COUNTERS
counters per-entry
10 remark test acl with sequence numbers
20 permit ip 10.0.0.0/8 any
30 permit tcp host 192.168.122.22 any established
40 permit tcp any gt 1023 host 172.16.16.16 eq 22
50 permit tcp any range 1000 1100 any range 10 20
4294967295 deny ip any any
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,6 @@ monitor connectivity
ip 10.50.9.1
url http://gateway.zscalerbeta.net/vpntest
!
ip access-list TEST-IPV4-ACL-WITH-IP-FIELDS-IN_Ethernet1_49.3
15 deny ip any host 172.24.49.3
permit ip host 172.24.49.2 host 172.24.49.3
!
ip access-list ACL-NAT-IE-DIRECT
10 deny ip any 5.0.0.0/24
20 permit ip any any
Expand All @@ -590,6 +586,10 @@ ip access-list ACL-NAT-IE-ZSCALER
10 permit ip any 10.0.0.0/24
20 deny ip any any
!
ip access-list TEST-IPV4-ACL-WITH-IP-FIELDS-IN_Ethernet1_49.3
15 deny ip any host 172.24.49.3
permit ip host 172.24.49.2 host 172.24.49.3
!
ip routing
ip routing vrf ATTRACTED-VRF-FROM-UPLINK
ip routing vrf IT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% set counter = namespace() %}
{% set counter.acle_number = 0 %}
{# START ACL CYCLE: walk over the list of defined ACLs #}
{% for acl in ip_access_lists %}
{% for acl in ip_access_lists | arista.avd.natural_sort('name') %}
{% if not (acl.name is arista.avd.defined) or
not (acl.entries is arista.avd.defined) %}
{# break cycle if mandatory keys are not defined #}
Expand Down

0 comments on commit 1a066f1

Please sign in to comment.