aristanetworks / avd

Arista Validated Designs
https://avd.arista.com
Apache License 2.0
278 stars 201 forks source link

Add CLI to support pathfinder outlier elimination feature for AVT in pathfinder based deployment. #4240

Open ayushmittal-arista opened 1 month ago

ayushmittal-arista commented 1 month ago

Enhancement summary

wlm310(config-profile-afd)#show cli commands | grep -i metric
[no|default] metric order ( loss-rate | latency | jitter | load )

wlm310(config-profile-afd)#show cli commands | grep -i outlier
[no|default] path-selection outlier elimination [ disabled ]
[no|default] path-selection outlier elimination threshold jitter <jitter> milliseconds
[no|default] path-selection outlier elimination threshold latency <latency> milliseconds
[no|default] path-selection outlier elimination threshold load <percentage> percent
[no|default] path-selection outlier elimination threshold loss-rate <percentage> percent

Enable feature ( enabled by default )

evpnsfe1(config)#router adaptive-virtual-topology
evpnsfe1(config-adaptive-virtual-topology)#profile voiceAvt
evpnsfe1(config-profile-voiceAvt)#path-selection outlier elimination 

Disable feature

evpnsfe1(config)#router adaptive-virtual-topology
evpnsfe1(config-adaptive-virtual-topology)#profile voiceAvt
evpnsfe1(config-profile-voiceAvt)#path-selection outlier elimination disabled

Configure outlier threshold

evpnsfe1(config)#router adaptive-virtual-topology
evpnsfe1(config-adaptive-virtual-topology)#profile voiceAvt
evpnsfe1(config-profile-voiceAvt)#path-selection outlier elimination threshold ?
  jitter     Configure jitter threshold
  latency    Configure latency threshold
  loss-rate  Configure loss-rate threshold
evpnsfe1(config-profile-voiceAvt)#path-selection outlier elimination threshold latency ?
  <0-10000>  millisecond

evpnsfe1(config-profile-voiceAvt)#path-selection outlier elimination threshold jitter ?
  <0-10000>  millisecond

evpnsfe1(config-profile-voiceAvt)#path-selection outlier elimination threshold loss-rate ?
  <0.00-100.00>  percentage

metric-order CLI

evpnsfe1(config)#router adaptive-virtual-topology
evpnsfe1(config-adaptive-virtual-topology)#profile voiceAvt
evpnsfe1(config-profile-voiceAvt)#metric order ?
  jitter     Prefer paths with lowest jitter
  latency    Prefer paths with lowest latency
  load       Prefer paths with lowest load
  loss-rate  Prefer paths with lowest loss-rate

evpnsfe1(config-profile-voiceAvt)#metric order latency

Which component of AVD is impacted

eos_cli_config_gen

Use case example

needed for pathfinder work

Describe the solution you would like

Implement all cli required for the feature

Describe alternatives you have considered

No response

Additional context

No response

Contributing Guide

ayushmittal-arista commented 1 month ago

metric order ( loss-rate | latency | jitter | load ) :-> Even though the CLI accepts only one keyword right now, it might be extended in future to allow multiple metrics. i.e metric order loss-rate jitter ( Not not, but in future maybe ) As such schema can be a list of strings instead of single string, Something like

metric_order:
        type: list
        items:
          type: str
          valid_values:
          - loss-rate
          - ...
          description: Metric preferred

Also in description, and validation it should be mentioned/handled that list only have 1 element, for now.