Skip to content

Commit e164eec

Browse files
Shivani-gslabVibhu-gslabMaheshGSLABgmuloc
authored
Refactor(eos_cli_config_gen): Deprecate old model access_lists (#6514)
Co-authored-by: Vibhu-gslab <[email protected]> Co-authored-by: Mahesh Kumar <[email protected]> Co-authored-by: Guillaume Mulocher <[email protected]>
1 parent a4e7f89 commit e164eec

8 files changed

Lines changed: 155 additions & 137 deletions

File tree

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

Lines changed: 0 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ Serial Number: DEADBEEFC0FFEW
226226
- [PoE Device Configuration](#poe-device-configuration)
227227
- [ACL](#acl)
228228
- [Standard Access-lists](#standard-access-lists)
229-
- [Extended Access-lists](#extended-access-lists)
230229
- [IP Access-lists](#ip-access-lists)
231230
- [IPv6 Standard Access-lists](#ipv6-standard-access-lists)
232231
- [IPv6 Extended Access-lists](#ipv6-extended-access-lists)
@@ -12063,106 +12062,6 @@ ip access-list standard ACL-SSH-VRF
1206312062
40 permit 192.168.0.0/16
1206412063
```
1206512064

12066-
### Extended Access-lists
12067-
12068-
#### Extended Access-lists Summary
12069-
12070-
##### 4
12071-
12072-
| Sequence | Action |
12073-
| -------- | ------ |
12074-
| 10 | remark ACL to restrict access RFC1918 addresses |
12075-
| 20 | deny ip 10.0.0.0/8 any |
12076-
| 30 | permit ip 192.0.2.0/24 any |
12077-
12078-
##### ACL-01
12079-
12080-
| Sequence | Action |
12081-
| -------- | ------ |
12082-
| 10 | remark ACL to restrict access to switch API to CVP and Ansible |
12083-
| 20 | deny ip host 192.0.2.1 any |
12084-
| 30 | permit ip 192.0.2.0/24 any |
12085-
12086-
##### ACL-02
12087-
12088-
ACL has counting mode `counters per-entry` enabled!
12089-
12090-
| Sequence | Action |
12091-
| -------- | ------ |
12092-
| 10 | remark ACL to restrict access RFC1918 addresses |
12093-
| 20 | permit ip 10.0.0.0/8 any |
12094-
| 30 | permit ip 192.0.2.0/24 any |
12095-
| - | permit response traffic nat |
12096-
12097-
##### ACL-03
12098-
12099-
| Sequence | Action |
12100-
| -------- | ------ |
12101-
| 10 | remark ACL to restrict access RFC1918 addresses |
12102-
| 20 | deny ip 10.0.0.0/8 any |
12103-
| 30 | permit ip 192.0.2.0/24 any |
12104-
12105-
##### ACL-04
12106-
12107-
ACL has counting mode `counters per-entry` enabled!
12108-
12109-
| Sequence | Action |
12110-
| -------- | ------ |
12111-
| 20 | deny ip 12.0.0.0/8 any |
12112-
| 30 | permit ip 194.0.2.0/24 any |
12113-
| - | permit response traffic nat |
12114-
12115-
##### acl_qos_tc0_v4
12116-
12117-
| Sequence | Action |
12118-
| -------- | ------ |
12119-
| 10 | permit ip any 192.0.2.0/29 |
12120-
12121-
##### acl_qos_tc5_v4
12122-
12123-
| Sequence | Action |
12124-
| -------- | ------ |
12125-
| 10 | permit ip any any dscp ef |
12126-
12127-
#### Extended Access-lists Device Configuration
12128-
12129-
```eos
12130-
!
12131-
ip access-list 4
12132-
10 remark ACL to restrict access RFC1918 addresses
12133-
20 deny ip 10.0.0.0/8 any
12134-
30 permit ip 192.0.2.0/24 any
12135-
!
12136-
ip access-list ACL-01
12137-
10 remark ACL to restrict access to switch API to CVP and Ansible
12138-
20 deny ip host 192.0.2.1 any
12139-
30 permit ip 192.0.2.0/24 any
12140-
!
12141-
ip access-list ACL-02
12142-
counters per-entry
12143-
10 remark ACL to restrict access RFC1918 addresses
12144-
20 permit ip 10.0.0.0/8 any
12145-
30 permit ip 192.0.2.0/24 any
12146-
permit response traffic nat
12147-
!
12148-
ip access-list ACL-03
12149-
10 remark ACL to restrict access RFC1918 addresses
12150-
20 deny ip 10.0.0.0/8 any
12151-
30 permit ip 192.0.2.0/24 any
12152-
!
12153-
ip access-list ACL-04
12154-
counters per-entry
12155-
20 deny ip 12.0.0.0/8 any
12156-
30 permit ip 194.0.2.0/24 any
12157-
permit response traffic nat
12158-
!
12159-
ip access-list acl_qos_tc0_v4
12160-
10 permit ip any 192.0.2.0/29
12161-
!
12162-
ip access-list acl_qos_tc5_v4
12163-
10 permit ip any any dscp ef
12164-
```
12165-
1216612065
### IP Access-lists
1216712066

1216812067
#### IP Access-lists Summary

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

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5024,40 +5024,6 @@ ipv6 access-list standard ipv6_test1
50245024
5 deny 2001:db8:1000::/64
50255025
10 permit 2001:db8::/32
50265026
!
5027-
ip access-list 4
5028-
10 remark ACL to restrict access RFC1918 addresses
5029-
20 deny ip 10.0.0.0/8 any
5030-
30 permit ip 192.0.2.0/24 any
5031-
!
5032-
ip access-list ACL-01
5033-
10 remark ACL to restrict access to switch API to CVP and Ansible
5034-
20 deny ip host 192.0.2.1 any
5035-
30 permit ip 192.0.2.0/24 any
5036-
!
5037-
ip access-list ACL-02
5038-
counters per-entry
5039-
10 remark ACL to restrict access RFC1918 addresses
5040-
20 permit ip 10.0.0.0/8 any
5041-
30 permit ip 192.0.2.0/24 any
5042-
permit response traffic nat
5043-
!
5044-
ip access-list ACL-03
5045-
10 remark ACL to restrict access RFC1918 addresses
5046-
20 deny ip 10.0.0.0/8 any
5047-
30 permit ip 192.0.2.0/24 any
5048-
!
5049-
ip access-list ACL-04
5050-
counters per-entry
5051-
20 deny ip 12.0.0.0/8 any
5052-
30 permit ip 194.0.2.0/24 any
5053-
permit response traffic nat
5054-
!
5055-
ip access-list acl_qos_tc0_v4
5056-
10 permit ip any 192.0.2.0/29
5057-
!
5058-
ip access-list acl_qos_tc5_v4
5059-
10 permit ip any any dscp ef
5060-
!
50615027
ip access-list ACL_NO_SEQUENCE
50625028
remark test acl without sequence numbers
50635029
deny udp any any log

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

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
- [Loopback Interfaces](#loopback-interfaces)
1515
- [Tunnel Interfaces](#tunnel-interfaces)
1616
- [VLAN Interfaces](#vlan-interfaces)
17+
- [ACL](#acl)
18+
- [Extended Access-lists](#extended-access-lists)
1719

1820
## Management
1921

@@ -275,3 +277,105 @@ interface VLAN20
275277
ipv6 nd other-config-flag
276278
ipv6 nd prefix 2001:db8:20::/64 infinite infinite no-autoconfig
277279
```
280+
281+
## ACL
282+
283+
### Extended Access-lists
284+
285+
#### Extended Access-lists Summary
286+
287+
##### 4
288+
289+
| Sequence | Action |
290+
| -------- | ------ |
291+
| 10 | remark ACL to restrict access RFC1918 addresses |
292+
| 20 | deny ip 10.0.0.0/8 any |
293+
| 30 | permit ip 192.0.2.0/24 any |
294+
295+
##### ACL-01
296+
297+
| Sequence | Action |
298+
| -------- | ------ |
299+
| 10 | remark ACL to restrict access to switch API to CVP and Ansible |
300+
| 20 | deny ip host 192.0.2.1 any |
301+
| 30 | permit ip 192.0.2.0/24 any |
302+
303+
##### ACL-02
304+
305+
ACL has counting mode `counters per-entry` enabled!
306+
307+
| Sequence | Action |
308+
| -------- | ------ |
309+
| 10 | remark ACL to restrict access RFC1918 addresses |
310+
| 20 | permit ip 10.0.0.0/8 any |
311+
| 30 | permit ip 192.0.2.0/24 any |
312+
| - | permit response traffic nat |
313+
314+
##### ACL-03
315+
316+
| Sequence | Action |
317+
| -------- | ------ |
318+
| 10 | remark ACL to restrict access RFC1918 addresses |
319+
| 20 | deny ip 10.0.0.0/8 any |
320+
| 30 | permit ip 192.0.2.0/24 any |
321+
322+
##### ACL-04
323+
324+
ACL has counting mode `counters per-entry` enabled!
325+
326+
| Sequence | Action |
327+
| -------- | ------ |
328+
| 20 | deny ip 12.0.0.0/8 any |
329+
| 30 | permit ip 194.0.2.0/24 any |
330+
| - | permit response traffic nat |
331+
332+
##### acl_qos_tc0_v4
333+
334+
| Sequence | Action |
335+
| -------- | ------ |
336+
| 10 | permit ip any 192.0.2.0/29 |
337+
338+
##### acl_qos_tc5_v4
339+
340+
| Sequence | Action |
341+
| -------- | ------ |
342+
| 10 | permit ip any any dscp ef |
343+
344+
#### Extended Access-lists Device Configuration
345+
346+
```eos
347+
!
348+
ip access-list 4
349+
10 remark ACL to restrict access RFC1918 addresses
350+
20 deny ip 10.0.0.0/8 any
351+
30 permit ip 192.0.2.0/24 any
352+
!
353+
ip access-list ACL-01
354+
10 remark ACL to restrict access to switch API to CVP and Ansible
355+
20 deny ip host 192.0.2.1 any
356+
30 permit ip 192.0.2.0/24 any
357+
!
358+
ip access-list ACL-02
359+
counters per-entry
360+
10 remark ACL to restrict access RFC1918 addresses
361+
20 permit ip 10.0.0.0/8 any
362+
30 permit ip 192.0.2.0/24 any
363+
permit response traffic nat
364+
!
365+
ip access-list ACL-03
366+
10 remark ACL to restrict access RFC1918 addresses
367+
20 deny ip 10.0.0.0/8 any
368+
30 permit ip 192.0.2.0/24 any
369+
!
370+
ip access-list ACL-04
371+
counters per-entry
372+
20 deny ip 12.0.0.0/8 any
373+
30 permit ip 194.0.2.0/24 any
374+
permit response traffic nat
375+
!
376+
ip access-list acl_qos_tc0_v4
377+
10 permit ip any 192.0.2.0/29
378+
!
379+
ip access-list acl_qos_tc5_v4
380+
10 permit ip any any dscp ef
381+
```

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,40 @@ interface VLAN20
4343
ipv6 nd other-config-flag
4444
ipv6 nd prefix 2001:db8:20::/64 infinite infinite no-autoconfig
4545
!
46+
ip access-list 4
47+
10 remark ACL to restrict access RFC1918 addresses
48+
20 deny ip 10.0.0.0/8 any
49+
30 permit ip 192.0.2.0/24 any
50+
!
51+
ip access-list ACL-01
52+
10 remark ACL to restrict access to switch API to CVP and Ansible
53+
20 deny ip host 192.0.2.1 any
54+
30 permit ip 192.0.2.0/24 any
55+
!
56+
ip access-list ACL-02
57+
counters per-entry
58+
10 remark ACL to restrict access RFC1918 addresses
59+
20 permit ip 10.0.0.0/8 any
60+
30 permit ip 192.0.2.0/24 any
61+
permit response traffic nat
62+
!
63+
ip access-list ACL-03
64+
10 remark ACL to restrict access RFC1918 addresses
65+
20 deny ip 10.0.0.0/8 any
66+
30 permit ip 192.0.2.0/24 any
67+
!
68+
ip access-list ACL-04
69+
counters per-entry
70+
20 deny ip 12.0.0.0/8 any
71+
30 permit ip 194.0.2.0/24 any
72+
permit response traffic nat
73+
!
74+
ip access-list acl_qos_tc0_v4
75+
10 permit ip any 192.0.2.0/29
76+
!
77+
ip access-list acl_qos_tc5_v4
78+
10 permit ip any any dscp ef
79+
!
4680
ip radius vrf default source-interface Loopback1
4781
!
4882
ip radius source-interface Loopback10

ansible_collections/arista/avd/extensions/molecule/eos_cli_config_gen/inventory/host_vars/host1/acl.yml renamed to ansible_collections/arista/avd/extensions/molecule/eos_cli_config_gen_deprecated_vars/inventory/host_vars/host1/access-lists.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
### Access-Lists ###
2+
#### Test for deprecated key access_lists ###
33
access_lists:
44
- name: acl_qos_tc0_v4
55
sequence_numbers:

ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/access-lists.md

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/access_lists.schema.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ keys:
1010
type: list
1111
primary_key: name
1212
display_name: IP Extended Access-Lists (legacy model)
13+
deprecation:
14+
warning: true
15+
removed: false
16+
remove_in_version: 7.0.0
17+
new_key: ip_access_lists
18+
allow_with_new_key: true
1319
items:
1420
type: dict
1521
keys:

0 commit comments

Comments
 (0)