Skip to content

Commit

Permalink
Refactor(eos_cli_config_gen): Change key names for record_export on i…
Browse files Browse the repository at this point in the history
…nterval and inactive_timeout
  • Loading branch information
gmuloc committed Nov 15, 2022
1 parent 5fb0a2c commit 58a284a
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Sample: 666

#### Trackers Summary

| Tracker Name | Record Export Inactive Timeout | Record Export Interval | MPLS | Number of Exporters | Applied On |
| ------------ | ------------------------------ | ---------------------- | ---- | ------------------- | ---------- |
| Tracker Name | Record Export On Inactive Timeout | Record Export On Interval | MPLS | Number of Exporters | Applied On |
| ------------ | --------------------------------- | ------------------------- | ---- | ------------------- | ---------- |
| T1 | 3666 | 5666 | True | 0 | |
| T2 | - | - | False | 1 | Ethernet40 |
| T3 | - | - | - | 4 | Ethernet41<br>Ethernet42<br>Port-Channel42 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ flow_trackings:
trackers:
- name: T1
record_export:
inactive_timeout: 3666
interval: 5666
on_inactive_timeout: 3666
on_interval: 5666
mpls: true
# no exporter
- name: T2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,8 @@ flow_trackings:
trackers:
- name: < tracker_name >
record_export:
inactive_timeout: < 3000-900000 >
interval: < 1000-36000000 >
on_inactive_timeout: < 3000-900000 >
on_interval: < 1000-36000000 >
mpls: < true | false >
exporters:
- name: < exporter_name >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,8 @@ event_monitor:
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;trackers</samp>](## "flow_trackings.[].trackers") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- name</samp>](## "flow_trackings.[].trackers.[].name") | String | Required, Unique | | | Tracker Name |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;record_export</samp>](## "flow_trackings.[].trackers.[].record_export") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inactive_timeout</samp>](## "flow_trackings.[].trackers.[].record_export.inactive_timeout") | Integer | | | Min: 3000<br>Max: 900000 | Flow record inactive export timeout in milliseconds |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interval</samp>](## "flow_trackings.[].trackers.[].record_export.interval") | Integer | | | Min: 1000<br>Max: 36000000 | Flow record export interval in milliseconds |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;on_inactive_timeout</samp>](## "flow_trackings.[].trackers.[].record_export.on_inactive_timeout") | Integer | | | Min: 3000<br>Max: 900000 | Flow record inactive export timeout in milliseconds |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;on_interval</samp>](## "flow_trackings.[].trackers.[].record_export.on_interval") | Integer | | | Min: 1000<br>Max: 36000000 | Flow record export interval in milliseconds |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mpls</samp>](## "flow_trackings.[].trackers.[].record_export.mpls") | Boolean | | | | Export MPLS forwarding information |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exporters</samp>](## "flow_trackings.[].trackers.[].exporters") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- name</samp>](## "flow_trackings.[].trackers.[].exporters.[].name") | String | Required, Unique | | | Exporter Name |
Expand All @@ -870,8 +870,8 @@ flow_trackings:
trackers:
- name: <str>
record_export:
inactive_timeout: <int>
interval: <int>
on_inactive_timeout: <int>
on_interval: <int>
mpls: <bool>
exporters:
- name: <str>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1340,19 +1340,19 @@
"record_export": {
"type": "object",
"properties": {
"inactive_timeout": {
"on_inactive_timeout": {
"type": "integer",
"minimum": 3000,
"maximum": 900000,
"description": "Flow record inactive export timeout in milliseconds",
"title": "Inactive Timeout"
"title": "On Inactive Timeout"
},
"interval": {
"on_interval": {
"type": "integer",
"minimum": 1000,
"maximum": 36000000,
"description": "Flow record export interval in milliseconds",
"title": "Interval"
"title": "On Interval"
},
"mpls": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1055,14 +1055,14 @@ keys:
record_export:
type: dict
keys:
inactive_timeout:
on_inactive_timeout:
type: int
convert_types:
- str
min: 3000
max: 900000
description: Flow record inactive export timeout in milliseconds
interval:
on_interval:
type: int
convert_types:
- str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ keys:
record_export:
type: dict
keys:
inactive_timeout:
on_inactive_timeout:
type: int
convert_types:
- str
min: 3000
max: 900000
description: Flow record inactive export timeout in milliseconds
interval:
on_interval:
type: int
convert_types:
- str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Sample: {{ flow_tracking.sample | arista.avd.default("default") }}

#### Trackers Summary

| Tracker Name | Record Export Inactive Timeout | Record Export Interval | MPLS | Number of Exporters | Applied On |
| ------------ | ------------------------------ | ---------------------- | ---- | ------------------- | ---------- |
| Tracker Name | Record Export On Inactive Timeout | Record Export On Interval | MPLS | Number of Exporters | Applied On |
| ------------ | --------------------------------- | ------------------------- | ---- | ------------------- | ---------- |
{% for tracker in flow_tracking.trackers | arista.avd.natural_sort('name') %}
{% set inactive_timeout = tracker.record_export.inactive_timeout | arista.avd.default("-") %}
{% set interval = tracker.record_export.interval | arista.avd.default("-") %}
{% set on_inactive_timeout = tracker.record_export.on_inactive_timeout | arista.avd.default("-") %}
{% set on_interval = tracker.record_export.on_interval | arista.avd.default("-") %}
{% set mpls = tracker.record_export.mpls | arista.avd.default("-") %}
{% set count_exporter = tracker.exporters | arista.avd.default([]) | length %}
{% set applied_on = [] %}
Expand All @@ -30,7 +30,7 @@ Sample: {{ flow_tracking.sample | arista.avd.default("default") }}
{% do applied_on.append(port_channel_interface.name) %}
{% endif %}
{% endfor %}
| {{ tracker.name }} | {{ inactive_timeout }} | {{ interval }} | {{ mpls }} | {{ count_exporter }} | {{ applied_on | join("<br>") }} |
| {{ tracker.name }} | {{ on_inactive_timeout }} | {{ on_interval }} | {{ mpls }} | {{ count_exporter }} | {{ applied_on | join("<br>") }} |
{% endfor %}

#### Exporters Summary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ flow tracking {{ flow_tracking.type }}
{% endif %}
{% for tracker in flow_tracking.trackers %}
tracker {{ tracker.name }}
{% if tracker.record_export.inactive_timeout is arista.avd.defined %}
record export on inactive timeout {{ tracker.record_export.inactive_timeout }}
{% if tracker.record_export.on_inactive_timeout is arista.avd.defined %}
record export on inactive timeout {{ tracker.record_export.on_inactive_timeout }}
{% endif %}
{% if tracker.record_export.interval is arista.avd.defined %}
record export on interval {{ tracker.record_export.interval }}
{% if tracker.record_export.on_interval is arista.avd.defined %}
record export on interval {{ tracker.record_export.on_interval }}
{% endif %}
{% if tracker.record_export.mpls is arista.avd.defined(true) %}
record export mpls
Expand Down

0 comments on commit 58a284a

Please sign in to comment.