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

Feat(eos_cli_config_gen): Add support for sub-route-map and continue in route-maps #1850

Merged
merged 13 commits into from
Aug 16, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -93,41 +93,44 @@ interface Management1

#### RM-10.2.3.4-SET-NEXT-HOP-OUT

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | set ip next-hop 10.2.3.4 |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | - | ip next-hop 10.2.3.4 | - | - |

#### RM-CONN-BL-BGP

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | deny | match ip address prefix-list PL-MLAG |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | deny | ip address prefix-list PL-MLAG | - | - | - |
| 20 | permit | ip address prefix-list PL-SUBRM | - | RM-HIDE-ASPATH-IN | - |
| 30 | permit | ip address prefix-list PL-CONTINUE | - | - | 40 |
| 40 | permit | ip address prefix-list PL-CONTINUE | - | - | Next Sequence |
| 50 | permit | - | - | - | - |

#### RM-HIDE-ASPATH-IN

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | set as-path match all replacement auto |
| 10 | permit | set community 65000:1 additive |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | - | as-path match all replacement auto<br>community 65000:1 additive | - | - |

#### RM-HIDE-ASPATH-OUT

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | deny | match community LIST-COM |
| 20 | permit | set as-path match all replacement auto |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | deny | community LIST-COM | - | - | - |
| 20 | permit | - | as-path match all replacement auto | - | - |

#### RM-MLAG-PEER-IN

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | set origin incomplete |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | - | origin incomplete | - | - |

#### RM-STATIC-2-BGP

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | set tag 65100 |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | - | tag 65100 | - | - |

### Route-maps Device Configuration

Expand All @@ -140,6 +143,19 @@ route-map RM-CONN-BL-BGP deny 10
match ip address prefix-list PL-MLAG
!
route-map RM-CONN-BL-BGP permit 20
description sub-route-map test
match ip address prefix-list PL-SUBRM
sub-route-map RM-HIDE-ASPATH-IN
!
route-map RM-CONN-BL-BGP permit 30
match ip address prefix-list PL-CONTINUE
continue 40
!
route-map RM-CONN-BL-BGP permit 40
match ip address prefix-list PL-CONTINUE
continue
!
route-map RM-CONN-BL-BGP permit 50
!
route-map RM-HIDE-ASPATH-IN permit 10
set as-path match all replacement auto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,15 @@ ip prefix-list PL-BGP-DEFAULT-RED-OUT-C1

#### RM-BGP-AGG-APPLY-SET

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | set local-preference 50 |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | - | local-preference 50 | - | - |

#### RM-BGP-EXPORT-DEFAULT-BLUE-C1

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | match ip address prefix-list PL-BGP-DEFAULT-BLUE-C1 |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | ip address prefix-list PL-BGP-DEFAULT-BLUE-C1 | - | - | - |

### Route-maps Device Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ route-map RM-CONN-BL-BGP deny 10
match ip address prefix-list PL-MLAG
!
route-map RM-CONN-BL-BGP permit 20
description sub-route-map test
match ip address prefix-list PL-SUBRM
sub-route-map RM-HIDE-ASPATH-IN
!
route-map RM-CONN-BL-BGP permit 30
match ip address prefix-list PL-CONTINUE
continue 40
!
route-map RM-CONN-BL-BGP permit 40
match ip address prefix-list PL-CONTINUE
continue
!
route-map RM-CONN-BL-BGP permit 50
!
route-map RM-HIDE-ASPATH-IN permit 10
set as-path match all replacement auto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@ route_maps:
- ip address prefix-list PL-MLAG
20:
type: permit
description: sub-route-map test
sub_route_map: RM-HIDE-ASPATH-IN
match:
- ip address prefix-list PL-SUBRM
30:
type: permit
continue:
enabled: true
sequence_number: 40
match:
- ip address prefix-list PL-CONTINUE
40:
type: permit
continue:
enabled: true
match:
- ip address prefix-list PL-CONTINUE
50:
type: permit
RM-STATIC-2-BGP:
sequence_numbers:
10:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,41 +93,44 @@ interface Management1

#### RM-10.2.3.4-SET-NEXT-HOP-OUT

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | set ip next-hop 10.2.3.4 |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | - | ip next-hop 10.2.3.4 | - | - |

#### RM-CONN-BL-BGP

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | deny | match ip address prefix-list PL-MLAG |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | deny | ip address prefix-list PL-MLAG | - | - | - |
| 20 | permit | ip address prefix-list PL-SUBRM | - | RM-HIDE-ASPATH-IN | - |
| 30 | permit | ip address prefix-list PL-CONTINUE | - | - | 40 |
| 40 | permit | ip address prefix-list PL-CONTINUE | - | - | Next Sequence |
| 50 | permit | - | - | - | - |

#### RM-HIDE-ASPATH-IN

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | set as-path match all replacement auto |
| 10 | permit | set community 65000:1 additive |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | - | as-path match all replacement auto<br>community 65000:1 additive | - | - |

#### RM-HIDE-ASPATH-OUT

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | deny | match community LIST-COM |
| 20 | permit | set as-path match all replacement auto |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | deny | community LIST-COM | - | - | - |
| 20 | permit | - | as-path match all replacement auto | - | - |

#### RM-MLAG-PEER-IN

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | set origin incomplete |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | - | origin incomplete | - | - |

#### RM-STATIC-2-BGP

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | set tag 65100 |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | - | tag 65100 | - | - |

### Route-maps Device Configuration

Expand All @@ -140,6 +143,18 @@ route-map RM-CONN-BL-BGP deny 10
match ip address prefix-list PL-MLAG
!
route-map RM-CONN-BL-BGP permit 20
match ip address prefix-list PL-SUBRM
sub-route-map RM-HIDE-ASPATH-IN
!
route-map RM-CONN-BL-BGP permit 30
match ip address prefix-list PL-CONTINUE
continue 40
!
route-map RM-CONN-BL-BGP permit 40
match ip address prefix-list PL-CONTINUE
continue
!
route-map RM-CONN-BL-BGP permit 50
!
route-map RM-HIDE-ASPATH-IN permit 10
set as-path match all replacement auto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,15 @@ ip prefix-list PL-BGP-DEFAULT-RED-OUT-C1

#### RM-BGP-AGG-APPLY-SET

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | set local-preference 50 |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | - | local-preference 50 | - | - |

#### RM-BGP-EXPORT-DEFAULT-BLUE-C1

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | match ip address prefix-list PL-BGP-DEFAULT-BLUE-C1 |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | ip address prefix-list PL-BGP-DEFAULT-BLUE-C1 | - | - | - |

### Route-maps Device Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ route-map RM-CONN-BL-BGP deny 10
match ip address prefix-list PL-MLAG
!
route-map RM-CONN-BL-BGP permit 20
match ip address prefix-list PL-SUBRM
sub-route-map RM-HIDE-ASPATH-IN
!
route-map RM-CONN-BL-BGP permit 30
match ip address prefix-list PL-CONTINUE
continue 40
!
route-map RM-CONN-BL-BGP permit 40
match ip address prefix-list PL-CONTINUE
continue
!
route-map RM-CONN-BL-BGP permit 50
!
route-map RM-HIDE-ASPATH-IN permit 10
set as-path match all replacement auto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@ route_maps:
- ip address prefix-list PL-MLAG
- sequence: 20
type: permit
sub_route_map: RM-HIDE-ASPATH-IN
match:
- ip address prefix-list PL-SUBRM
- sequence: 30
type: permit
continue:
enabled: true
sequence_number: 40
match:
- ip address prefix-list PL-CONTINUE
- sequence: 40
type: permit
continue:
enabled: true
match:
- ip address prefix-list PL-CONTINUE
- sequence: 50
type: permit
- name: RM-STATIC-2-BGP
sequence_numbers:
- sequence: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -872,15 +872,15 @@ ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY

#### RM-CONN-2-BGP

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY | - | - | - |

#### RM-MLAG-PEER-IN

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | set origin incomplete |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | - | origin incomplete | - | - |

### Route-maps Device Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -872,15 +872,15 @@ ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY

#### RM-CONN-2-BGP

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY | - | - | - |

#### RM-MLAG-PEER-IN

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | set origin incomplete |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | - | origin incomplete | - | - |

### Route-maps Device Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -725,9 +725,9 @@ ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY

#### RM-CONN-2-BGP

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY | - | - | - |

### Route-maps Device Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1158,15 +1158,15 @@ ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY

#### RM-CONN-2-BGP

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY | - | - | - |

#### RM-MLAG-PEER-IN

| Sequence | Type | Match and/or Set |
| -------- | ---- | ---------------- |
| 10 | permit | set origin incomplete |
| Sequence | Type | Match | Set | Sub-Route-Map | Continue |
| -------- | ---- | ----- | --- | ------------- | -------- |
| 10 | permit | - | origin incomplete | - | - |

### Route-maps Device Configuration

Expand Down
Loading