Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor(eos_designs): Refactor eos_designs structured_config code ip_access_list #4972

Open
wants to merge 26 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
71e5763
Refactor(eos_designs): Refactor eos_designs structured_config code fo…
MaheshGSLAB Feb 3, 2025
1ac9a3f
Merge branch 'devel' into ip-access-list
MaheshGSLAB Feb 4, 2025
3d17a23
updated the logic
MaheshGSLAB Feb 4, 2025
1a99067
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 4, 2025
9344997
replace append_new with append
MaheshGSLAB Feb 4, 2025
1a009d7
Merge branch 'devel' into ip-access-list
MaheshGSLAB Feb 5, 2025
3f363de
Merge branch 'devel' into ip-access-list
MaheshGSLAB Feb 10, 2025
101daac
Added network services ip_access_lists
Feb 10, 2025
1624017
fix the exact duplicate item issue
Feb 10, 2025
eccbc14
Merge branch 'devel' into ip-access-list
MaheshGSLAB Feb 10, 2025
b7251cc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 10, 2025
5603424
added natural sort
Feb 11, 2025
9181511
Merge branch 'devel' into ip-access-list
Vibhu-gslab Feb 11, 2025
440bc64
Merge branch 'devel' into ip-access-list
Shivani-gslab Feb 12, 2025
e3255b9
optimized the code
Feb 12, 2025
8091c01
used seprator as ..
Feb 12, 2025
1a55bec
Merge branch 'devel' into ip-access-list
Feb 13, 2025
de1cd61
Merge branch 'devel' into ip-access-list
MaheshGSLAB Feb 13, 2025
a36672e
Merge branch 'devel' into ip-access-list
MaheshGSLAB Feb 21, 2025
5d18ee6
run cv-pathfinder molecule
MaheshGSLAB Feb 21, 2025
87b4ff3
Merge branch 'devel' into ip-access-list
ClausHolbechArista Feb 21, 2025
bebb455
Merge branch 'devel' into ip-access-list
MaheshGSLAB Feb 25, 2025
726e6f9
updated the logic to render ip_access_list in network services
MaheshGSLAB Feb 25, 2025
e41b879
Merge branch 'devel' into ip-access-list
MaheshGSLAB Feb 25, 2025
40db13f
updated negative unit test
MaheshGSLAB Feb 25, 2025
5ce98c8
fix the type error and return type
MaheshGSLAB Feb 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,32 +123,32 @@ ip_access_lists:
entries:
- sequence: 1
remark: 'Not for PRODUCTION: This ACL is built this way because the lab has an out-of-band interface'
- sequence: 10
- source: any
destination: 100.64.100.2
sequence: 10
action: permit
protocol: udp
source: any
destination: 100.64.100.2
destination_ports_match: eq
destination_ports:
- isakmp
- non500-isakmp
- sequence: 20
- source: any
destination: 100.64.100.2
sequence: 20
action: permit
protocol: udp
source: any
destination: 100.64.100.2
destination_ports_match: eq
destination_ports:
- '3478'
- sequence: 30
- source: any
destination: 100.64.100.2
sequence: 30
action: permit
protocol: icmp
source: any
destination: 100.64.100.2
- action: deny
protocol: ip
source: any
- source: any
destination: any
action: deny
protocol: ip
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
entries:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,32 +123,32 @@ ip_access_lists:
entries:
- sequence: 1
remark: 'Not for PRODUCTION: This ACL is built this way because the lab has an out-of-band interface'
- sequence: 10
- source: any
destination: 100.64.200.2
sequence: 10
action: permit
protocol: udp
source: any
destination: 100.64.200.2
destination_ports_match: eq
destination_ports:
- isakmp
- non500-isakmp
- sequence: 20
- source: any
destination: 100.64.200.2
sequence: 20
action: permit
protocol: udp
source: any
destination: 100.64.200.2
destination_ports_match: eq
destination_ports:
- '3478'
- sequence: 30
- source: any
destination: 100.64.200.2
sequence: 30
action: permit
protocol: icmp
source: any
destination: 100.64.200.2
- action: deny
protocol: ip
source: any
- source: any
destination: any
action: deny
protocol: ip
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
entries:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,24 +210,24 @@ ip_access_lists:
entries:
- sequence: 1
remark: 'Not for PRODUCTION: This ACL is built this way because the lab has an out-of-band interface'
- sequence: 10
- source: any
destination: 100.64.10.2
sequence: 10
action: permit
protocol: udp
source: any
destination: 100.64.10.2
destination_ports_match: eq
destination_ports:
- isakmp
- non500-isakmp
- sequence: 30
- source: any
destination: 100.64.10.2
sequence: 30
action: permit
protocol: icmp
source: any
destination: 100.64.10.2
- action: deny
protocol: ip
source: any
- source: any
destination: any
action: deny
protocol: ip
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
entries:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,24 +211,24 @@ ip_access_lists:
entries:
- sequence: 1
remark: 'Not for PRODUCTION: This ACL is built this way because the lab has an out-of-band interface'
- sequence: 10
- source: any
destination: 100.64.11.2
sequence: 10
action: permit
protocol: udp
source: any
destination: 100.64.11.2
destination_ports_match: eq
destination_ports:
- isakmp
- non500-isakmp
- sequence: 30
- source: any
destination: 100.64.11.2
sequence: 30
action: permit
protocol: icmp
source: any
destination: 100.64.11.2
- action: deny
protocol: ip
source: any
- source: any
destination: any
action: deny
protocol: ip
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
entries:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,32 +164,32 @@ ip_access_lists:
entries:
- sequence: 1
remark: 'Not for PRODUCTION: This ACL is built this way because the lab has an out-of-band interface'
- sequence: 10
- source: any
destination: 100.64.21.2
sequence: 10
action: permit
protocol: udp
source: any
destination: 100.64.21.2
destination_ports_match: eq
destination_ports:
- isakmp
- non500-isakmp
- sequence: 20
- source: any
destination: 100.64.21.2
sequence: 20
action: permit
protocol: tcp
source: any
destination: 100.64.21.2
destination_ports_match: eq
destination_ports:
- bgp
- sequence: 30
- source: any
destination: 100.64.21.2
sequence: 30
action: permit
protocol: icmp
source: any
destination: 100.64.21.2
- action: deny
protocol: ip
source: any
- source: any
destination: any
action: deny
protocol: ip
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
entries:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,24 +150,24 @@ ip_access_lists:
entries:
- sequence: 1
remark: 'Not for PRODUCTION: This ACL is built this way because the lab has an out-of-band interface'
- sequence: 10
- source: any
destination: 100.64.30.2
sequence: 10
action: permit
protocol: udp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is wrong with this reordering. We The order of these outputs are controlled by the order of the fields in the classes, so we should not see this, if we output the correct class. Can you check that you don't have any type errors that could explain this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated as you suggested(reference from underlay port-channel refactoring)

source: any
destination: 100.64.30.2
destination_ports_match: eq
destination_ports:
- isakmp
- non500-isakmp
- sequence: 30
- source: any
destination: 100.64.30.2
sequence: 30
action: permit
protocol: icmp
source: any
destination: 100.64.30.2
- action: deny
protocol: ip
source: any
- source: any
destination: any
action: deny
protocol: ip
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
entries:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,32 +180,32 @@ hostname: DC1-BL1A
ip_access_lists:
- name: TEST-IPV4-ACL-WITH-IP-FIELDS-IN_Ethernet12
entries:
- sequence: 15
- source: any
destination: 10.10.40.10
sequence: 15
action: deny
protocol: ip
source: any
destination: 10.10.40.10
- name: TEST-IPV4-ACL-WITH-IP-FIELDS-IN_Ethernet13.10
entries:
- sequence: 15
- source: any
destination: 10.10.40.20
sequence: 15
action: deny
protocol: ip
source: any
destination: 10.10.40.20
- name: TEST-IPV4-ACL-WITH-IP-FIELDS-OUT_Ethernet12
entries:
- remark: Some remark will not require source and destination fields.
- action: permit
protocol: ip
source: 10.10.40.10
- source: 10.10.40.10
destination: any
action: permit
protocol: ip
- name: TEST-IPV4-ACL-WITH-IP-FIELDS-OUT_Ethernet13.10
entries:
- remark: Some remark will not require source and destination fields.
- action: permit
protocol: ip
source: 10.10.40.20
- source: 10.10.40.20
destination: any
action: permit
protocol: ip
ip_igmp_snooping:
globally_enabled: true
ip_name_servers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,32 +156,32 @@ hostname: DC1-BL1B
ip_access_lists:
- name: TEST-IPV4-ACL-WITH-IP-FIELDS-IN_Ethernet12
entries:
- sequence: 15
- source: any
destination: 10.10.50.10
sequence: 15
action: deny
protocol: ip
source: any
destination: 10.10.50.10
- name: TEST-IPV4-ACL-WITH-IP-FIELDS-IN_Ethernet13.10
entries:
- sequence: 15
- source: any
destination: 10.10.50.20
sequence: 15
action: deny
protocol: ip
source: any
destination: 10.10.50.20
- name: TEST-IPV4-ACL-WITH-IP-FIELDS-OUT_Ethernet12
entries:
- remark: Some remark will not require source and destination fields.
- action: permit
protocol: ip
source: 10.10.50.10
- source: 10.10.50.10
destination: any
action: permit
protocol: ip
- name: TEST-IPV4-ACL-WITH-IP-FIELDS-OUT_Ethernet13.10
entries:
- remark: Some remark will not require source and destination fields.
- action: permit
protocol: ip
source: 10.10.50.20
- source: 10.10.50.20
destination: any
action: permit
protocol: ip
ip_igmp_snooping:
globally_enabled: true
ip_name_servers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,18 +309,18 @@ hostname: DC1-LEAF2A
ip_access_lists:
- name: TEST-IPV4-ACL-WITH-IP-FIELDS-IN_Vlan110
entries:
- sequence: 15
- source: any
destination: 10.1.10.1
sequence: 15
action: deny
protocol: ip
source: any
destination: 10.1.10.1
- name: TEST-IPV4-ACL-WITH-IP-FIELDS-OUT_Vlan110
entries:
- remark: Some remark will not require source and destination fields.
- action: permit
protocol: ip
source: 10.1.10.1
- source: 10.1.10.1
destination: any
action: permit
protocol: ip
ip_igmp_snooping:
globally_enabled: true
vlans:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,18 +252,18 @@ hostname: DC1-LEAF2B
ip_access_lists:
- name: TEST-IPV4-ACL-WITH-IP-FIELDS-IN_Vlan110
entries:
- sequence: 15
- source: any
destination: 10.1.10.1
sequence: 15
action: deny
protocol: ip
source: any
destination: 10.1.10.1
- name: TEST-IPV4-ACL-WITH-IP-FIELDS-OUT_Vlan110
entries:
- remark: Some remark will not require source and destination fields.
- action: permit
protocol: ip
source: 10.1.10.1
- source: 10.1.10.1
destination: any
action: permit
protocol: ip
ip_igmp_snooping:
globally_enabled: true
vlans:
Expand Down
Loading
Loading