Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Add vrf support for vmtracer_sessions (#4601)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivani-gslab authored Oct 28, 2024
1 parent 63b29c8 commit f5fa416
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ interface Management1

#### VM Tracer Summary

| Session | URL | Username | Autovlan | Source Interface |
| ------- | --- | -------- | -------- | ---------------- |
| session_1 | https://192.168.0.10 | user1 | disabled | Management1 |
| session_2 | https://192.168.0.10 | user1 | enabled | - |
| Session | URL | Username | Autovlan | VRF | Source Interface |
| ------- | --- | -------- | -------- | --- | ---------------- |
| session_1 | https://192.168.0.10 | user1 | disabled | MGMT | Management1 |
| session_2 | https://192.168.0.10 | user1 | enabled | - | - |

#### VM Tracer Device Configuration

Expand All @@ -55,6 +55,7 @@ vmtracer session session_1
username user1
password 7 encrypted_password
autovlan disable
vrf MGMT
source-interface Management1
!
vmtracer session session_2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ vmtracer session session_1
username user1
password 7 encrypted_password
autovlan disable
vrf MGMT
source-interface Management1
!
vmtracer session session_2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ vmtracer_sessions:
username: user1
password: "encrypted_password"
autovlan_disable: true
vrf: MGMT
source_interface: Management1
- name: session_2
url: "https://192.168.0.10"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@

#### VM Tracer Summary

| Session | URL | Username | Autovlan | Source Interface |
| ------- | --- | -------- | -------- | ---------------- |
| Session | URL | Username | Autovlan | VRF | Source Interface |
| ------- | --- | -------- | -------- | --- | ---------------- |
{% for session in vmtracer_sessions | arista.avd.natural_sort('name') %}
{% set url = session.url | arista.avd.default('-') %}
{% set username = session.username | arista.avd.default('-') %}
{% if session.autovlan_disable is arista.avd.defined(true) %}
{% set autovlan = 'disabled' %}
{% endif %}
{% set vrf = session.vrf | arista.avd.default('-') %}
{% set source_interface = session.source_interface | arista.avd.default('-') %}
| {{ session.name }} | {{ url }} | {{ session.username | arista.avd.default('-') }} | {{ autovlan | arista.avd.default('enabled') }} | {{ source_interface }} |
| {{ session.name }} | {{ url }} | {{ username }} | {{ autovlan | arista.avd.default('enabled') }} | {{ vrf }} | {{ source_interface }} |
{% endfor %}

#### VM Tracer Device Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ vmtracer session {{ session.name }}
{% if session.autovlan_disable is arista.avd.defined(true) %}
autovlan disable
{% endif %}
{% if session.vrf is arista.avd.defined %}
vrf {{ session.vrf }}
{% endif %}
{% if session.source_interface is arista.avd.defined %}
source-interface {{ session.source_interface }}
{% endif %}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ keys:
description: Type 7 Password Hash.
autovlan_disable:
type: bool
vrf:
type: str
source_interface:
type: str

0 comments on commit f5fa416

Please sign in to comment.