Skip to content

Commit

Permalink
Refactor(eos_cli_config_gen): Rearrange generated CLI for `traffic-po…
Browse files Browse the repository at this point in the history
…licies`, `system` and `static-routes` (#4590)
  • Loading branch information
MaheshGSLAB authored Oct 17, 2024
1 parent 40451d8 commit ce3b411
Show file tree
Hide file tree
Showing 67 changed files with 95 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1481,8 +1481,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1481,8 +1481,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6847,8 +6847,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2588,8 +2588,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2588,8 +2588,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2477,8 +2477,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2477,8 +2477,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2477,8 +2477,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1063,8 +1063,8 @@ mlag configuration
reload-delay mlag 300
reload-delay non-mlag 330
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
!
ntp local-interface vrf MGMT Management0
ntp server vrf MGMT pool.ntp.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1063,8 +1063,8 @@ mlag configuration
reload-delay mlag 300
reload-delay non-mlag 330
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
!
ntp local-interface vrf MGMT Management0
ntp server vrf MGMT pool.ntp.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6070,8 +6070,8 @@ interface Vlan10
ip address 10.10.10.8/24
no ip routing vrf MGMT
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
!
ntp local-interface vrf MGMT Management0
ntp server vrf MGMT pool.ntp.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2067,8 +2067,8 @@ mlag configuration
reload-delay mlag 300
reload-delay non-mlag 330
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
!
ntp local-interface vrf MGMT Management0
ntp server vrf MGMT pool.ntp.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2067,8 +2067,8 @@ mlag configuration
reload-delay mlag 300
reload-delay non-mlag 330
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
!
ntp local-interface vrf MGMT Management0
ntp server vrf MGMT pool.ntp.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1990,8 +1990,8 @@ interface Vlan10
ip address 10.10.10.11/24
no ip routing vrf MGMT
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
!
ntp local-interface vrf MGMT Management0
ntp server vrf MGMT pool.ntp.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1990,8 +1990,8 @@ interface Vlan10
ip address 10.10.10.12/24
no ip routing vrf MGMT
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
!
ntp local-interface vrf MGMT Management0
ntp server vrf MGMT pool.ntp.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1990,8 +1990,8 @@ interface Vlan10
ip address 10.10.10.13/24
no ip routing vrf MGMT
!
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
ip route 0.0.0.0/0 10.10.10.1
ip route vrf MGMT 0.0.0.0/0 172.16.100.1
!
ntp local-interface vrf MGMT Management0
ntp server vrf MGMT pool.ntp.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ interface Management1
!
ip route 1.1.1.0/24 Vlan101 10.1.1.1
ip route 1.1.2.0/24 Vlan101 10.1.1.1 200 tag 666 name RT-TO-FAKE-DMZ
ip route vrf customer01 1.2.1.0/24 Vlan202 10.1.2.1
ip route vrf customer01 1.2.2.0/24 Vlan101 10.1.2.1 201 tag 667 name RT-TO-FAKE-DMZ
ip route vrf APP 10.3.4.0/24 1.2.3.4
ip route vrf APP 10.3.5.0/24 Null0
ip route vrf customer01 1.2.1.0/24 Vlan202 10.1.2.1
ip route vrf customer01 1.2.2.0/24 Vlan101 10.1.2.1 201 tag 667 name RT-TO-FAKE-DMZ
ip route vrf customer01 10.3.6.0/24 Ethernet40 11.2.1.1 track bfd 100 tag 1000 name Track-BFD metric 300
ip route vrf customer01 10.3.7.0/24 Ethernet41 100 tag 1000 name No-Track-BFD metric 300
```
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ interface Management1
system control-plane
tcp mss ceiling ipv4 1344 ipv6 1366
ip access-group acl4_1 in
ip access-group acl4_3 vrf default in
ip access-group acl4_2 vrf red in
ip access-group acl4_2 vrf red_1 in
ip access-group acl4_3 vrf default in
ipv6 access-group acl6_1 in
ipv6 access-group acl6_3 vrf default in
ipv6 access-group acl6_2 vrf blue in
ipv6 access-group acl6_2 vrf blue_1 in
ipv6 access-group acl6_3 vrf default in
```

## System L1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ interface Management1
!
ip route 1.1.1.0/24 Vlan101 10.1.1.1
ip route 1.1.2.0/24 Vlan101 10.1.1.1 200 tag 666 name RT-TO-FAKE-DMZ
ip route vrf customer01 1.2.1.0/24 Vlan202 10.1.2.1
ip route vrf customer01 1.2.2.0/24 Vlan101 10.1.2.1 201 tag 667 name RT-TO-FAKE-DMZ
ip route vrf APP 10.3.4.0/24 1.2.3.4
ip route vrf APP 10.3.5.0/24 Null0
ip route vrf customer01 1.2.1.0/24 Vlan202 10.1.2.1
ip route vrf customer01 1.2.2.0/24 Vlan101 10.1.2.1 201 tag 667 name RT-TO-FAKE-DMZ
ip route vrf customer01 10.3.6.0/24 Ethernet40 11.2.1.1 track bfd 100 tag 1000 name Track-BFD metric 300
ip route vrf customer01 10.3.7.0/24 Ethernet41 100 tag 1000 name No-Track-BFD metric 300
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ interface Management1
system control-plane
tcp mss ceiling ipv4 1344 ipv6 1366
ip access-group acl4_1 in
ip access-group acl4_3 vrf default in
ip access-group acl4_2 vrf red in
ip access-group acl4_2 vrf red_1 in
ip access-group acl4_3 vrf default in
ipv6 access-group acl6_1 in
ipv6 access-group acl6_3 vrf default in
ipv6 access-group acl6_2 vrf blue in
ipv6 access-group acl6_2 vrf blue_1 in
ipv6 access-group acl6_3 vrf default in
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ interface Port-Channel10
switchport trunk allowed vlan 110-111,210-211
switchport mode trunk
switchport
!
evpn ethernet-segment
identifier 0000:0000:0303:0202:0101
route-target import 03:03:02:02:01:01
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ interface Port-Channel10
switchport trunk allowed vlan 110-111,210-211
switchport mode trunk
switchport
!
evpn ethernet-segment
identifier 0000:0000:0303:0202:0101
route-target import 03:03:02:02:01:01
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ cvp_configlets:
trunk allowed vlan 110-111,120-121,130-131,140-141,150,210-211,250,310-311,350\n
\ switchport mode trunk\n switchport\n mlag 7\n!\ninterface Port-Channel10\n
\ description SERVER_server03_ESI\n no shutdown\n switchport trunk allowed
vlan 110-111,210-211\n switchport mode trunk\n switchport\n evpn ethernet-segment\n
vlan 110-111,210-211\n switchport mode trunk\n switchport\n !\n evpn ethernet-segment\n
\ identifier 0000:0000:0303:0202:0101\n route-target import 03:03:02:02:01:01\n
\ lacp system-id 0303.0202.0101\n!\ninterface Ethernet1\n description P2P_DC1-SPINE1_Ethernet4\n
\ no shutdown\n mtu 1500\n no switchport\n ip address 172.31.255.25/31\n!\ninterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ cvp_configlets:
trunk allowed vlan 110-111,120-121,130-131,140-141,150,210-211,250,310-311,350\n
\ switchport mode trunk\n switchport\n mlag 7\n!\ninterface Port-Channel10\n
\ description SERVER_server03_ESI\n no shutdown\n switchport trunk allowed
vlan 110-111,210-211\n switchport mode trunk\n switchport\n evpn ethernet-segment\n
vlan 110-111,210-211\n switchport mode trunk\n switchport\n !\n evpn ethernet-segment\n
\ identifier 0000:0000:0303:0202:0101\n route-target import 03:03:02:02:01:01\n
\ lacp system-id 0303.0202.0101\n!\ninterface Ethernet1\n description P2P_DC1-SPINE1_Ethernet4\n
\ no shutdown\n mtu 1500\n no switchport\n ip address 172.31.255.25/31\n!\ninterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 0.0.0.0/0 172.23.254.1
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 0.0.0.0/0 172.23.254.1
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 10.0.0.0/8 10.1.100.100
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
```

### Router BGP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 0.0.0.0/0 172.23.254.1
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 10.1.0.0/16 10.1.100.100
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
```

### Router ISIS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 0.0.0.0/0 172.23.254.1
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 0.0.0.0/0 172.23.254.1
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 0.0.0.0/0 172.23.254.1
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 0.0.0.0/0 172.23.254.1
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
```

## Multicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ no ip routing vrf MGMT

```eos
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 10.0.0.0/8 10.1.100.100
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
```

### Router OSPF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ interface Vlan4092
ip address 172.23.254.4/24
no ip routing vrf MGMT
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 0.0.0.0/0 172.23.254.1
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
!
end
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ interface Vlan4092
ip address 172.23.254.5/24
no ip routing vrf MGMT
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 0.0.0.0/0 172.23.254.1
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
!
end
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ mlag configuration
reload-delay mlag 300
reload-delay non-mlag 330
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 10.0.0.0/8 10.1.100.100
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
!
route-map RM-MLAG-PEER-IN permit 10
description Make routes learned over MLAG Peer-link less preferred on spines to ensure optimal routing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ interface Vlan4092
ip address 172.23.254.4/24
no ip routing vrf MGMT
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 0.0.0.0/0 172.23.254.1
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
!
end
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ ip virtual-router mac-address 00:1c:73:00:00:9a
ip routing
no ip routing vrf MGMT
!
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
ip route 10.1.0.0/16 10.1.100.100
ip route vrf MGMT 0.0.0.0/0 172.31.0.1
!
router isis EVPN_UNDERLAY
net 49.0001.1921.6825.5001.00
Expand Down
Loading

0 comments on commit ce3b411

Please sign in to comment.