From a292b6876c615b3efd1b8acb91caa2a4a08b1759 Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Date: Thu, 28 Nov 2024 13:13:00 +0530 Subject: [PATCH] updated the j2 logic --- .../docs/tables/router-adaptive-virtual-topology.md | 4 ++-- .../j2templates/eos/router-adaptive-virtual-topology.j2 | 5 +---- .../_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml | 4 ++-- .../router_adaptive_virtual_topology.schema.yml | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/router-adaptive-virtual-topology.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/router-adaptive-virtual-topology.md index 0f1c1dfb61d..fd4c0309327 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/router-adaptive-virtual-topology.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/router-adaptive-virtual-topology.md @@ -25,7 +25,7 @@ | [      internet_exit_policy](## "router_adaptive_virtual_topology.profiles.[].internet_exit_policy") | String | | | | Name of the internet exit policy. | | [      metric_order](## "router_adaptive_virtual_topology.profiles.[].metric_order") | String | | | Valid Values:
- jitter
- latency
- load
- loss-rate | Metric order to be used for path comparison. | | [      outlier_elimination](## "router_adaptive_virtual_topology.profiles.[].outlier_elimination") | Dictionary | | | | AVT path outlier elimination. | - | [        enabled](## "router_adaptive_virtual_topology.profiles.[].outlier_elimination.enabled") | Boolean | | | | Set true for enable the AVT path outlier elimination and False to disable the same. | + | [        enabled](## "router_adaptive_virtual_topology.profiles.[].outlier_elimination.enabled") | Boolean | | | | Set true to enable the AVT path outlier elimination or false to disable the same. | | [        threshold](## "router_adaptive_virtual_topology.profiles.[].outlier_elimination.threshold") | Dictionary | | | | Change the threshold values for path comparison. | | [          jitter](## "router_adaptive_virtual_topology.profiles.[].outlier_elimination.threshold.jitter") | Integer | | | Min: 0
Max: 10000 | Jitter threshold in millisecond. | | [          latency](## "router_adaptive_virtual_topology.profiles.[].outlier_elimination.threshold.latency") | Integer | | | Min: 0
Max: 10000 | Latency threshold in millisecond. | @@ -88,7 +88,7 @@ # AVT path outlier elimination. outlier_elimination: - # Set true for enable the AVT path outlier elimination and False to disable the same. + # Set true to enable the AVT path outlier elimination or false to disable the same. enabled: # Change the threshold values for path comparison. diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/router-adaptive-virtual-topology.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/router-adaptive-virtual-topology.j2 index 57699a1ab5e..ec8c3ad8d2e 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/router-adaptive-virtual-topology.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/router-adaptive-virtual-topology.j2 @@ -61,10 +61,7 @@ router adaptive-virtual-topology {% elif profile.outlier_elimination.enabled is arista.avd.defined(false) %} path-selection outlier elimination disabled {% endif %} -{% if profile.outlier_elimination.threshold.latency is arista.avd.defined or - profile.outlier_elimination.threshold.jitter is arista.avd.defined or - profile.outlier_elimination.threshold.loss_rate is arista.avd.defined or - profile.outlier_elimination.threshold.load is arista.avd.defined %} +{% if profile.outlier_elimination.threshold is arista.avd.defined %} {% if profile.outlier_elimination.threshold.latency is arista.avd.defined %} path-selection outlier elimination threshold latency {{ profile.outlier_elimination.threshold.latency }} milliseconds {% endif %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml index bd8345d2cc0..9828e837a9b 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml @@ -11860,8 +11860,8 @@ keys: type: dict keys: enabled: - description: Set true for enable the AVT path outlier elimination - and False to disable the same. + description: Set true to enable the AVT path outlier elimination + or false to disable the same. type: bool threshold: description: Change the threshold values for path comparison. diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/router_adaptive_virtual_topology.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/router_adaptive_virtual_topology.schema.yml index 9078779885d..dd7bc6b1bc8 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/router_adaptive_virtual_topology.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/router_adaptive_virtual_topology.schema.yml @@ -95,7 +95,7 @@ keys: type: dict keys: enabled: - description: Set true for enable the AVT path outlier elimination and False to disable the same. + description: Set true to enable the AVT path outlier elimination or false to disable the same. type: bool threshold: description: Change the threshold values for path comparison.