Skip to content

Commit

Permalink
Feat(eos_designs): Allow custom name for pathfinder Flow tracker trac…
Browse files Browse the repository at this point in the history
…ker and exporter settings
  • Loading branch information
ayushmittal-arista committed Mar 7, 2024
1 parent e299bfb commit e45ded6
Show file tree
Hide file tree
Showing 33 changed files with 238 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
agent KernelFib environment KERNELFIB_PROGRAM_ALL_ECMP=1
!
flow tracking hardware
tracker WAN-FLOW-TRACKER
record export on inactive timeout 70000
tracker custom_flow_track_name
record export on inactive timeout 50000
record export on interval 5000
exporter DPI-EXPORTER
exporter ayush_exporter
collector 127.0.0.1
local interface Loopback0
template interval 5000
template interval 40000
no shutdown
!
service routing protocols model multi-agent
Expand Down Expand Up @@ -150,29 +150,29 @@ ip security
interface Dps1
description DPS Interface
mtu 9214
flow tracker hardware WAN-FLOW-TRACKER
flow tracker hardware custom_flow_track_name
ip address 192.168.255.1/32
!
interface Ethernet1
description ATT_666
no shutdown
no switchport
flow tracker hardware WAN-FLOW-TRACKER
flow tracker hardware custom_flow_track_name
ip address dhcp
dhcp client accept default-route
!
interface Ethernet2
description Colt_10555
no shutdown
no switchport
flow tracker hardware WAN-FLOW-TRACKER
flow tracker hardware custom_flow_track_name
ip address 172.15.5.5/31
!
interface Ethernet3
description Comcast-5G_AF830
no shutdown
no switchport
flow tracker hardware WAN-FLOW-TRACKER
flow tracker hardware custom_flow_track_name
ip address 172.20.20.20/31
!
interface Loopback0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ flow tracking hardware
exporter DPI-EXPORTER
collector 127.0.0.1
local interface Loopback0
template interval 5000
template interval 3000000
no shutdown
!
service routing protocols model multi-agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ flow tracking hardware
exporter DPI-EXPORTER
collector 127.0.0.1
local interface Loopback0
template interval 5000
template interval 3000000
no shutdown
!
service routing protocols model multi-agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ flow tracking hardware
exporter DPI-EXPORTER
collector 127.0.0.1
local interface Loopback0
template interval 5000
template interval 3000000
no shutdown
!
service routing protocols model multi-agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ flow tracking hardware
exporter DPI-EXPORTER
collector 127.0.0.1
local interface Loopback0
template interval 5000
template interval 3000000
no shutdown
!
service routing protocols model multi-agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ flow tracking hardware
exporter DPI-EXPORTER
collector 127.0.0.1
local interface Loopback0
template interval 5000
template interval 3000000
no shutdown
!
service routing protocols model multi-agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ flow tracking hardware
exporter DPI-EXPORTER
collector 127.0.0.1
local interface Loopback0
template interval 5000
template interval 3000000
no shutdown
!
service routing protocols model multi-agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ flow tracking hardware
exporter DPI-EXPORTER
collector 127.0.0.1
local interface Loopback0
template interval 5000
template interval 3000000
no shutdown
!
service routing protocols model multi-agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ flow tracking hardware
exporter DPI-EXPORTER
collector 127.0.0.1
local interface Loopback0
template interval 5000
template interval 3000000
no shutdown
!
service routing protocols model multi-agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ flow tracking hardware
exporter DPI-EXPORTER
collector 127.0.0.1
local interface Loopback0
template interval 5000
template interval 3000000
no shutdown
!
service routing protocols model multi-agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ flow tracking hardware
exporter DPI-EXPORTER
collector 127.0.0.1
local interface Loopback0
template interval 5000
template interval 3000000
no shutdown
!
service routing protocols model multi-agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ flow tracking hardware
exporter DPI-EXPORTER
collector 127.0.0.1
local interface Loopback0
template interval 5000
template interval 3000000
no shutdown
!
service routing protocols model multi-agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ flow tracking hardware
exporter DPI-EXPORTER
collector 127.0.0.1
local interface Loopback0
template interval 5000
template interval 3000000
no shutdown
!
service routing protocols model multi-agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,23 +113,23 @@ ethernet_interfaces:
description: ATT_666
dhcp_client_accept_default_route: true
flow_tracker:
hardware: WAN-FLOW-TRACKER
hardware: custom_flow_track_name
- name: Ethernet2
peer_type: l3_interface
ip_address: 172.15.5.5/31
shutdown: false
type: routed
description: Colt_10555
flow_tracker:
hardware: WAN-FLOW-TRACKER
hardware: custom_flow_track_name
- name: Ethernet3
peer_type: l3_interface
ip_address: 172.20.20.20/31
shutdown: false
type: routed
description: Comcast-5G_AF830
flow_tracker:
hardware: WAN-FLOW-TRACKER
hardware: custom_flow_track_name
loopback_interfaces:
- name: Loopback0
description: Router_ID
Expand Down Expand Up @@ -177,16 +177,16 @@ agents:
flow_tracking:
hardware:
trackers:
- name: WAN-FLOW-TRACKER
- name: custom_flow_track_name
record_export:
on_inactive_timeout: 70000
on_inactive_timeout: 50000
on_interval: 5000
exporters:
- name: DPI-EXPORTER
- name: ayush_exporter
collector:
host: 127.0.0.1
local_interface: Loopback0
template_interval: 5000
template_interval: 40000
shutdown: false
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
Expand Down Expand Up @@ -387,7 +387,7 @@ dps_interfaces:
mtu: 9214
ip_address: 192.168.255.1/32
flow_tracker:
hardware: WAN-FLOW-TRACKER
hardware: custom_flow_track_name
vxlan_interface:
Vxlan1:
description: cv-pathfinder-edge-custom-default-policy_VTEP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ flow_tracking:
collector:
host: 127.0.0.1
local_interface: Loopback0
template_interval: 5000
template_interval: 3000000
shutdown: false
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ flow_tracking:
collector:
host: 127.0.0.1
local_interface: Loopback0
template_interval: 5000
template_interval: 3000000
shutdown: false
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ flow_tracking:
collector:
host: 127.0.0.1
local_interface: Loopback0
template_interval: 5000
template_interval: 3000000
shutdown: false
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ flow_tracking:
collector:
host: 127.0.0.1
local_interface: Loopback0
template_interval: 5000
template_interval: 3000000
shutdown: false
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ flow_tracking:
collector:
host: 127.0.0.1
local_interface: Loopback0
template_interval: 5000
template_interval: 3000000
shutdown: false
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ flow_tracking:
collector:
host: 127.0.0.1
local_interface: Loopback0
template_interval: 5000
template_interval: 3000000
shutdown: false
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ flow_tracking:
collector:
host: 127.0.0.1
local_interface: Loopback0
template_interval: 5000
template_interval: 3000000
shutdown: false
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ flow_tracking:
collector:
host: 127.0.0.1
local_interface: Loopback0
template_interval: 5000
template_interval: 3000000
shutdown: false
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ flow_tracking:
collector:
host: 127.0.0.1
local_interface: Loopback0
template_interval: 5000
template_interval: 3000000
shutdown: false
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ flow_tracking:
collector:
host: 127.0.0.1
local_interface: Loopback0
template_interval: 5000
template_interval: 3000000
shutdown: false
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ flow_tracking:
collector:
host: 127.0.0.1
local_interface: Loopback0
template_interval: 5000
template_interval: 3000000
shutdown: false
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ flow_tracking:
collector:
host: 127.0.0.1
local_interface: Loopback0
template_interval: 5000
template_interval: 3000000
shutdown: false
ip_extcommunity_lists:
- name: ECL-EVPN-SOO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ underlay_routing_protocol: none

bgp_as: 65000

cv_pathfinder_flow_tracking:
flow_tracker_name: custom_flow_track_name
record_export:
on_inactive_timeout: 50000
exporter:
name: ayush_exporter
template_interval: 40000

cv_pathfinder_regions:
- name: AVD_Land_West
id: 42
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,9 @@ def wan_flow_tracker_name(self: SharedUtils) -> str:
"""
Return the name of the WAN flow tracking object
Used in both network services, underlay and overlay python modules.
TODO make this configurable
TODO may need to return exporter name also later
"""
return "WAN-FLOW-TRACKER"
flow_tracking = get(self.hostvars, "cv_pathfinder_flow_tracking", default={})
return get(flow_tracking, "flow_tracker_name", default="WAN-FLOW-TRACKER")

@cached_property
def is_cv_pathfinder_router(self: SharedUtils) -> bool:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!--
~ Copyright (c) 2024 Arista Networks, Inc.
~ Use of this source code is governed by the Apache License 2.0
~ that can be found in the LICENSE file.
-->
=== "Table"

| Variable | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| [<samp>cv_pathfinder_flow_tracking</samp>](## "cv_pathfinder_flow_tracking") | Dictionary | | | | Define the flow tracking parameters for this topology. |
| [<samp>&nbsp;&nbsp;flow_tracker_name</samp>](## "cv_pathfinder_flow_tracking.flow_tracker_name") | String | | `WAN-FLOW-TRACKER` | | Flow Tracker Name |
| [<samp>&nbsp;&nbsp;record_export</samp>](## "cv_pathfinder_flow_tracking.record_export") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;on_inactive_timeout</samp>](## "cv_pathfinder_flow_tracking.record_export.on_inactive_timeout") | Integer | | `70000` | Min: 3000<br>Max: 900000 | Flow record inactive export timeout in milliseconds |
| [<samp>&nbsp;&nbsp;exporter</samp>](## "cv_pathfinder_flow_tracking.exporter") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;name</samp>](## "cv_pathfinder_flow_tracking.exporter.name") | String | | `DPI-EXPORTER` | | Exporter Name |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;template_interval</samp>](## "cv_pathfinder_flow_tracking.exporter.template_interval") | Integer | | `3000000` | Min: 5000<br>Max: 3600000 | Template interval in milliseconds |

=== "YAML"

```yaml
# Define the flow tracking parameters for this topology.
cv_pathfinder_flow_tracking:

# Flow Tracker Name
flow_tracker_name: <str; default="WAN-FLOW-TRACKER">
record_export:

# Flow record inactive export timeout in milliseconds
on_inactive_timeout: <int; 3000-900000; default=70000>
exporter:

# Exporter Name
name: <str; default="DPI-EXPORTER">

# Template interval in milliseconds
template_interval: <int; 5000-3600000; default=3000000>
```
Loading

0 comments on commit e45ded6

Please sign in to comment.