Skip to content

Commit

Permalink
Fix cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Laxmikant Chintakindi authored and Laxmikant Chintakindi committed Jul 31, 2024
1 parent 2e7b092 commit ca5c16d
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,14 @@ interface Management1
| Vlan338 | v6 dhcp relay all-subnets | default | - | - |
| Vlan339 | v6 nd options | default | - | - |
| Vlan340 | isis authentication text | default | - | - |
| Vlan341 | isis authentication sha | default | - | - |
| Vlan342 | isis authentication sha | default | - | - |
| Vlan343 | isis authentication shared-secret | default | - | - |
| Vlan344 | isis authentication shared-secret | default | - | - |
| Vlan341 | isis authentication sha1 | default | - | - |
| Vlan342 | isis authentication sha2 | default | - | - |
| Vlan343 | isis authentication sha3 | default | - | - |
| Vlan344 | isis authentication sha4 | default | - | - |
| Vlan345 | isis authentication shared-secret1 | default | - | - |
| Vlan346 | isis authentication shared-secret1 | default | - | - |
| Vlan347 | isis authentication shared-secret2 | default | - | - |
| Vlan348 | isis authentication shared-secret3 | default | - | - |
| Vlan501 | SVI Description | default | - | False |
| Vlan667 | Multiple VRIDs | default | - | False |
| Vlan1001 | SVI Description | Tenant_A | - | False |
Expand Down Expand Up @@ -129,6 +133,10 @@ interface Management1
| Vlan342 | default | - | - | - | - | - | - |
| Vlan343 | default | - | - | - | - | - | - |
| Vlan344 | default | - | - | - | - | - | - |
| Vlan345 | default | - | - | - | - | - | - |
| Vlan346 | default | - | - | - | - | - | - |
| Vlan347 | default | - | - | - | - | - | - |
| Vlan348 | default | - | - | - | - | - | - |
| Vlan501 | default | 10.50.26.29/27 | - | - | - | - | - |
| Vlan667 | default | 192.0.2.2/25 | - | - | - | - | - |
| Vlan1001 | Tenant_A | - | 10.1.1.1/24 | - | - | - | - |
Expand Down Expand Up @@ -452,22 +460,40 @@ interface Vlan340
isis authentication key 7 <removed>
!
interface Vlan341
description isis authentication sha
description isis authentication sha1
isis authentication mode sha key-id 1000 rx-disabled
!
interface Vlan342
description isis authentication sha
isis authentication mode sha key-id 1010 level-1
isis authentication mode sha key-id 1010 level-1 key-id 1010 level-2
description isis authentication sha2
isis authentication mode sha key-id 1001
!
interface Vlan343
description isis authentication shared-secret
description isis authentication sha3
isis authentication mode sha key-id 1010 level-1 rx-disabled
isis authentication mode sha key-id 1010 level-2 rx-disabled
!
interface Vlan344
description isis authentication sha4
isis authentication mode sha key-id 1011 level-1
isis authentication mode sha key-id 1011 level-2
!
interface Vlan345
description isis authentication shared-secret1
isis authentication mode shared-secret profile profile1 algorithm sha-1 rx-disabled level-1
isis authentication mode shared-secret profile profile1 algorithm md5 rx-disabled level-2
!
interface Vlan344
description isis authentication shared-secret
isis authentication mode shared-secret profile profile-both algorithm md5 rx-disabled
interface Vlan346
description isis authentication shared-secret1
isis authentication mode shared-secret profile profile1 algorithm sha-1 level-1
isis authentication mode shared-secret profile profile1 algorithm md5 level-2
!
interface Vlan347
description isis authentication shared-secret2
isis authentication mode shared-secret profile profile-both algorithm md5 rx-disabled
!
interface Vlan348
description isis authentication shared-secret3
isis authentication mode shared-secret profile profile-both algorithm sha-256
!
interface Vlan501
description SVI Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,22 +250,40 @@ interface Vlan340
isis authentication key 7 asfddja23452
!
interface Vlan341
description isis authentication sha
description isis authentication sha1
isis authentication mode sha key-id 1000 rx-disabled
!
interface Vlan342
description isis authentication sha
isis authentication mode sha key-id 1010 level-1
isis authentication mode sha key-id 1010 level-1 key-id 1010 level-2
description isis authentication sha2
isis authentication mode sha key-id 1001
!
interface Vlan343
description isis authentication shared-secret
description isis authentication sha3
isis authentication mode sha key-id 1010 level-1 rx-disabled
isis authentication mode sha key-id 1010 level-2 rx-disabled
!
interface Vlan344
description isis authentication sha4
isis authentication mode sha key-id 1011 level-1
isis authentication mode sha key-id 1011 level-2
!
interface Vlan345
description isis authentication shared-secret1
isis authentication mode shared-secret profile profile1 algorithm sha-1 rx-disabled level-1
isis authentication mode shared-secret profile profile1 algorithm md5 rx-disabled level-2
!
interface Vlan344
description isis authentication shared-secret
isis authentication mode shared-secret profile profile-both algorithm md5 rx-disabled
interface Vlan346
description isis authentication shared-secret1
isis authentication mode shared-secret profile profile1 algorithm sha-1 level-1
isis authentication mode shared-secret profile profile1 algorithm md5 level-2
!
interface Vlan347
description isis authentication shared-secret2
isis authentication mode shared-secret profile profile-both algorithm md5 rx-disabled
!
interface Vlan348
description isis authentication shared-secret3
isis authentication mode shared-secret profile profile-both algorithm sha-256
!
interface Vlan501
description SVI Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ vlan_interfaces:
isis_authentication_key: "asfddja23452"

- name: Vlan341
description: isis authentication sha
description: isis authentication sha1
isis_authentication_mode: sha
isis_authentication_mode_sha:
both:
Expand All @@ -479,16 +479,37 @@ vlan_interfaces:
key_id: 1010

- name: Vlan342
description: isis authentication sha
description: isis authentication sha2
isis_authentication_mode: sha
isis_authentication_mode_sha:
both:
key_id: 1001
rx_disabled: false

- name: Vlan343
description: isis authentication sha3
isis_authentication_mode: sha
isis_authentication_mode_sha:
level_1:
key_id: 1010
rx_disabled: true
level_2:
key_id: 1010
rx_disabled: true

- name: Vlan343
description: isis authentication shared-secret
- name: Vlan344
description: isis authentication sha4
isis_authentication_mode: sha
isis_authentication_mode_sha:
level_1:
key_id: 1011
rx_disabled: false
level_2:
key_id: 1011
rx_disabled: false

- name: Vlan345
description: isis authentication shared-secret1
isis_authentication_mode: shared-secret
isis_authentication_mode_shared_secret:
level_1:
Expand All @@ -500,8 +521,21 @@ vlan_interfaces:
algorithm: md5
rx_disabled: true

- name: Vlan344
description: isis authentication shared-secret
- name: Vlan346
description: isis authentication shared-secret1
isis_authentication_mode: shared-secret
isis_authentication_mode_shared_secret:
level_1:
profile: profile1
algorithm: sha-1
rx_disabled: false
level_2:
profile: profile1
algorithm: md5
rx_disabled: false

- name: Vlan347
description: isis authentication shared-secret2
isis_authentication_mode: shared-secret
isis_authentication_mode_shared_secret:
both:
Expand All @@ -516,3 +550,12 @@ vlan_interfaces:
profile: profile1
algorithm: md5
rx_disabled: true

- name: Vlan348
description: isis authentication shared-secret3
isis_authentication_mode: shared-secret
isis_authentication_mode_shared_secret:
both:
profile: profile-both
algorithm: sha-256
rx_disabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -320,46 +320,46 @@ interface {{ vlan_interface.name }}
{% if vlan_interface.isis_authentication_mode == "sha" and vlan_interface.isis_authentication_mode_sha is arista.avd.defined %}
{% if vlan_interface.isis_authentication_mode_sha.both.key_id is arista.avd.defined %}
{% set auth_cli = auth_cli ~ " key-id " ~ vlan_interface.isis_authentication_mode_sha.both.key_id %}
{% if vlan_interface.isis_authentication_mode_sha.both.rx_disabled is arista.avd.defined %}
{% if vlan_interface.isis_authentication_mode_sha.both.rx_disabled is arista.avd.defined(true) %}
{% set auth_cli = auth_cli ~ " rx-disabled" %}
{% endif %}
{{ auth_cli }}
{% else %}
{% if vlan_interface.isis_authentication_mode_sha.level_1.key_id is arista.avd.defined %}
{% if vlan_interface.isis_authentication_mode_sha.level_1.rx_disabled is arista.avd.defined %}
{% set auth_cli = auth_cli ~ " rx-disabled" %}
{% set auth_cli_level1 = auth_cli ~ " key-id " ~ vlan_interface.isis_authentication_mode_sha.level_1.key_id ~ " level-1" %}
{% if vlan_interface.isis_authentication_mode_sha.level_1.rx_disabled is arista.avd.defined(true) %}
{% set auth_cli_level1 = auth_cli_level1 ~ " rx-disabled" %}
{% endif %}
{% set auth_cli = auth_cli ~ " key-id " ~ vlan_interface.isis_authentication_mode_sha.level_1.key_id ~ " level-1" %}
{{ auth_cli }}
{{ auth_cli_level1 }}
{% endif %}
{% if vlan_interface.isis_authentication_mode_sha.level_2.key_id is arista.avd.defined %}
{% if vlan_interface.isis_authentication_mode_sha.level_2.rx_disabled is arista.avd.defined %}
{% set auth_cli = auth_cli ~ " rx-disabled" %}
{% set auth_cli_level2 = auth_cli ~ " key-id " ~ vlan_interface.isis_authentication_mode_sha.level_2.key_id ~ " level-2" %}
{% if vlan_interface.isis_authentication_mode_sha.level_2.rx_disabled is arista.avd.defined(true) %}
{% set auth_cli_level2 = auth_cli_level2 ~ " rx-disabled" %}
{% endif %}
{% set auth_cli = auth_cli ~ " key-id " ~ vlan_interface.isis_authentication_mode_sha.level_2.key_id ~ " level-2" %}
{{ auth_cli }}
{{ auth_cli_level2 }}
{% endif %}
{% endif %}
{% endif %}
{% if vlan_interface.isis_authentication_mode == "shared-secret" and vlan_interface.isis_authentication_mode_shared_secret is arista.avd.defined %}
{% if vlan_interface.isis_authentication_mode_shared_secret.both.profile is arista.avd.defined and vlan_interface.isis_authentication_mode_shared_secret.both.algorithm is arista.avd.defined %}
{% set auth_cli = auth_cli ~ " profile " ~ vlan_interface.isis_authentication_mode_shared_secret.both.profile ~ " algorithm " ~ vlan_interface.isis_authentication_mode_shared_secret.both.algorithm %}
{% if vlan_interface.isis_authentication_mode_shared_secret.both.rx_disabled is arista.avd.defined %}
{% set auth_cli = auth_cli ~ " rx-disabled " %}
{% if vlan_interface.isis_authentication_mode_shared_secret.both.rx_disabled is arista.avd.defined(true) %}
{% set auth_cli = auth_cli ~ " rx-disabled" %}
{% endif %}
{{ auth_cli }}
{% else %}
{% if vlan_interface.isis_authentication_mode_shared_secret.level_1.profile is arista.avd.defined and vlan_interface.isis_authentication_mode_shared_secret.level_1.algorithm is arista.avd.defined %}
{% set auth_cli_level1 = auth_cli ~ " profile " ~ vlan_interface.isis_authentication_mode_shared_secret.level_1.profile ~ " algorithm " ~ vlan_interface.isis_authentication_mode_shared_secret.level_1.algorithm %}
{% if vlan_interface.isis_authentication_mode_shared_secret.level_1.rx_disabled is arista.avd.defined %}
{% if vlan_interface.isis_authentication_mode_shared_secret.level_1.rx_disabled is arista.avd.defined(true) %}
{% set auth_cli_level1 = auth_cli_level1 ~ " rx-disabled" %}
{% endif %}
{% set auth_cli_level1 = auth_cli_level1 ~ " level-1" %}
{{ auth_cli_level1 }}
{% endif %}
{% if vlan_interface.isis_authentication_mode_shared_secret.level_2.profile is arista.avd.defined and vlan_interface.isis_authentication_mode_shared_secret.level_2.algorithm is arista.avd.defined %}
{% set auth_cli_level2 = auth_cli ~ " profile " ~ vlan_interface.isis_authentication_mode_shared_secret.level_2.profile ~ " algorithm " ~ vlan_interface.isis_authentication_mode_shared_secret.level_2.algorithm %}
{% if vlan_interface.isis_authentication_mode_shared_secret.level_2.rx_disabled is arista.avd.defined %}
{% if vlan_interface.isis_authentication_mode_shared_secret.level_2.rx_disabled is arista.avd.defined(true) %}
{% set auth_cli_level2 = auth_cli_level2 ~ " rx-disabled" %}
{% endif %}
{% set auth_cli_level2 = auth_cli_level2 ~ " level-2" %}
Expand Down

0 comments on commit ca5c16d

Please sign in to comment.