Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Add profile and policy in adaptive-virtual-…
Browse files Browse the repository at this point in the history
…topology (#3351)

Co-authored-by: Claus Holbech <[email protected]>
Co-authored-by: Guillaume Mulocher <[email protected]>
  • Loading branch information
3 people authored Nov 25, 2023
1 parent 914554d commit 62dfd69
Show file tree
Hide file tree
Showing 9 changed files with 620 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,46 @@ Topology role: transit region
| Zone | Canada | 2 |
| Site | Ottawa | 99 |

#### AVT Profiles

| Profile name | Load balance policy | Internet exit policy |
| ------------ | ------------------- | -------------------- |
| office365 | - | - |
| scavenger | scavenger-lb | scavenger-ie |
| video | - | video-ie |
| voice | voice-lb | - |

#### AVT Policies

##### AVT policy production

| Application profile | AVT Profile | Traffic Class | DSCP |
| ------------------- | ----------- | ------------- | ---- |
| videoApps | - | - | - |
| criticalApps | crit | 7 | 45 |
| audioApps | audio | 6 | - |
| mfgApp | crit | - | 54 |
| hrApp | hr | - | - |

#### VRFs configuration

##### VRF blue

| AVT Profile | AVT ID |
| ----------- | ------ |
| video | 1 |

##### VRF red

| AVT policy |
| ---------- |
| production |

| AVT Profile | AVT ID |
| ----------- | ------ |
| video | 1 |
| voice | 2 |

#### Router Adaptive Virtual Topology Configuration

```eos
Expand All @@ -58,4 +98,44 @@ router adaptive-virtual-topology
region North_America id 1
zone Canada id 2
site Ottawa id 99
!
policy production
!
match application-profile videoApps
!
match application-profile criticalApps
avt profile crit
traffic-class 7
dscp 45
!
match application-profile audioApps
avt profile audio
traffic-class 6
!
match application-profile mfgApp
avt profile crit
dscp 54
!
match application-profile hrApp
avt profile hr
!
profile office365
!
profile scavenger
internet-exit policy scavenger-ie
path-selection load-balance scavenger-lb
!
profile video
internet-exit policy video-ie
!
profile voice
path-selection load-balance voice-lb
!
vrf blue
avt profile video id 1
!
vrf red
avt policy production
avt profile video id 1
avt profile voice id 2
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,46 @@ router adaptive-virtual-topology
region North_America id 1
zone Canada id 2
site Ottawa id 99
!
policy production
!
match application-profile videoApps
!
match application-profile criticalApps
avt profile crit
traffic-class 7
dscp 45
!
match application-profile audioApps
avt profile audio
traffic-class 6
!
match application-profile mfgApp
avt profile crit
dscp 54
!
match application-profile hrApp
avt profile hr
!
profile office365
!
profile scavenger
internet-exit policy scavenger-ie
path-selection load-balance scavenger-lb
!
profile video
internet-exit policy video-ie
!
profile voice
path-selection load-balance voice-lb
!
vrf blue
avt profile video id 1
!
vrf red
avt policy production
avt profile video id 1
avt profile voice id 2
!
no enable password
no aaa root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,42 @@ router_adaptive_virtual_topology:
site:
name: Ottawa
id: 99
profiles:
# Out of order to test sorting
- name: voice
load_balance_policy: voice-lb
- name: video
internet_exit_policy: video-ie
- name: office365
- name: scavenger
load_balance_policy: scavenger-lb
internet_exit_policy: scavenger-ie
policies:
- name: production
matches:
- application_profile: videoApps
- application_profile: criticalApps
avt_profile: crit
traffic_class: 7
dscp: 45
- application_profile: audioApps
avt_profile: audio
traffic_class: 6
- application_profile: mfgApp
avt_profile: crit
dscp: 54
- application_profile: hrApp
avt_profile: hr
vrfs:
# Out of order to test sorting
- name: red
policy: production
profiles:
- name: voice
id: 2
- name: video
id: 1
- name: blue
profiles:
- name: video
id: 1
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@
| [<samp>&nbsp;&nbsp;site</samp>](## "router_adaptive_virtual_topology.site") | Dictionary | | | | Site name and ID. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;name</samp>](## "router_adaptive_virtual_topology.site.name") | String | Required | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;id</samp>](## "router_adaptive_virtual_topology.site.id") | Integer | Required | | Min: 1<br>Max: 10000 | |
| [<samp>&nbsp;&nbsp;profiles</samp>](## "router_adaptive_virtual_topology.profiles") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "router_adaptive_virtual_topology.profiles.[].name") | String | Required, Unique | | | AVT Name. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;load_balance_policy</samp>](## "router_adaptive_virtual_topology.profiles.[].load_balance_policy") | String | | | | Name of the load-balance policy. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;internet_exit_policy</samp>](## "router_adaptive_virtual_topology.profiles.[].internet_exit_policy") | String | | | | Name of the internet exit policy. |
| [<samp>&nbsp;&nbsp;policies</samp>](## "router_adaptive_virtual_topology.policies") | List, items: Dictionary | | | | A sequence of application profiles mapped to some virtual topologies. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "router_adaptive_virtual_topology.policies.[].name") | String | Required, Unique | | | Policy name. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matches</samp>](## "router_adaptive_virtual_topology.policies.[].matches") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;application_profile</samp>](## "router_adaptive_virtual_topology.policies.[].matches.[].application_profile") | String | | | | Application profile name. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;avt_profile</samp>](## "router_adaptive_virtual_topology.policies.[].matches.[].avt_profile") | String | | | | AVT Profile name. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dscp</samp>](## "router_adaptive_virtual_topology.policies.[].matches.[].dscp") | Integer | | | Min: 0<br>Max: 63 | Set DSCP for matched traffic. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;traffic_class</samp>](## "router_adaptive_virtual_topology.policies.[].matches.[].traffic_class") | Integer | | | Min: 0<br>Max: 7 | Set traffic-class for matched traffic. |
| [<samp>&nbsp;&nbsp;vrfs</samp>](## "router_adaptive_virtual_topology.vrfs") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "router_adaptive_virtual_topology.vrfs.[].name") | String | Required, Unique | | | VRF name. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;policy</samp>](## "router_adaptive_virtual_topology.vrfs.[].policy") | String | | | | AVT Policy name. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;profiles</samp>](## "router_adaptive_virtual_topology.vrfs.[].profiles") | List, items: Dictionary | | | | AVT profiles in this VRF. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "router_adaptive_virtual_topology.vrfs.[].profiles.[].name") | String | | | | AVT profile name. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id</samp>](## "router_adaptive_virtual_topology.vrfs.[].profiles.[].id") | Integer | Required, Unique | | Min: 1<br>Max: 254 | Unique ID for this AVT (per VRF). |

=== "YAML"

Expand All @@ -41,4 +58,49 @@
site:
name: <str; required>
id: <int; 1-10000; required>
profiles:

# AVT Name.
- name: <str; required; unique>

# Name of the load-balance policy.
load_balance_policy: <str>

# Name of the internet exit policy.
internet_exit_policy: <str>

# A sequence of application profiles mapped to some virtual topologies.
policies:

# Policy name.
- name: <str; required; unique>
matches:

# Application profile name.
- application_profile: <str>

# AVT Profile name.
avt_profile: <str>

# Set DSCP for matched traffic.
dscp: <int; 0-63>

# Set traffic-class for matched traffic.
traffic_class: <int; 0-7>
vrfs:

# VRF name.
- name: <str; required; unique>

# AVT Policy name.
policy: <str>

# AVT profiles in this VRF.
profiles:

# AVT profile name.
- name: <str>

# Unique ID for this AVT (per VRF).
id: <int; 1-254; required; unique>
```
Loading

0 comments on commit 62dfd69

Please sign in to comment.