Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(eos_cli_config_gen): Support for setting default QSFP transceiver mode #3271

Merged
merged 10 commits into from
Jan 22, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# transceiver_qsfp_default_mode_4x10_false

## Table of Contents

- [Management](#management)
- [Management Interfaces](#management-interfaces)

## Management

### Management Interfaces

#### Management Interfaces Summary

##### IPv4

| Management Interface | Description | Type | VRF | IP Address | Gateway |
| -------------------- | ----------- | ---- | --- | ---------- | ------- |
| Management1 | oob_management | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 |

##### IPv6

| Management Interface | description | Type | VRF | IPv6 Address | IPv6 Gateway |
| -------------------- | ----------- | ---- | --- | ------------ | ------------ |
| Management1 | oob_management | oob | MGMT | - | - |

#### Management Interfaces Device Configuration

```eos
!
interface Management1
description oob_management
vrf MGMT
ip address 10.73.255.122/24
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
!RANCID-CONTENT-TYPE: arista
!
hostname transceiver_qsfp_default_mode_4x10_false
!
no enable password
no aaa root
!
interface Management1
description oob_management
vrf MGMT
ip address 10.73.255.122/24
!
end
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
transceiver_qsfp_default_mode_4x10: false
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ terminattr-prem
terminattr-prem-no-ingestkey
terminattr-prem-disableaaa
traffic-policies
transceiver_qsfp_default_mode_4x10_false
tunnel-interfaces
unsupported-transceiver
vlan-interfaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,12 @@ roles/eos_cli_config_gen/docs/tables/port-channel-interfaces.md
roles/eos_cli_config_gen/docs/tables/switchport-default.md
--8<--

### Transceiver QSFP default mode 4x10

--8<--
transceiver-qsfp-default-mode-4x10.md
--8<--

### Tunnel interfaces

--8<--
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
~ Copyright (c) 2023-2024 Arista Networks, Inc.
~ Use of this source code is governed by the Apache License 2.0
~ that can be found in the LICENSE file.
-->
=== "Table"

| Variable | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| [<samp>transceiver_qsfp_default_mode_4x10</samp>](## "transceiver_qsfp_default_mode_4x10") | Boolean | | `True` | | On all front panel ports which support this feature, the following global configuration command changes the QSFP mode from 40G to 4x10G (default). When set to false the command reverts the default QSFP mode back to 40G. |

=== "YAML"

```yaml
# On all front panel ports which support this feature, the following global configuration command changes the QSFP mode from 40G to 4x10G (default). When set to false the command reverts the default QSFP mode back to 40G.
transceiver_qsfp_default_mode_4x10: <bool; default=True>
```

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

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
@@ -0,0 +1,13 @@
# Copyright (c) 2023-2024 Arista Networks, Inc.
# Use of this source code is governed by the Apache License 2.0
# that can be found in the LICENSE file.
# yaml-language-server: $schema=../../../../plugins/plugin_utils/schema/avd_meta_schema.json
# Line above is used by RedHat's YAML Schema vscode extension
# Use Ctrl + Space to get suggestions for every field. Autocomplete will pop up after typing 2 letters.
type: dict
keys:
transceiver_qsfp_default_mode_4x10:
type: bool
default: true
description: |
On all front panel ports which support this feature, the following global configuration command changes the QSFP mode from 40G to 4x10G (default). When set to false the command reverts the default QSFP mode back to 40G.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#}
{# eos - transceiver qsfp default mode #}
{# cannot be disabled in current EOS releases #}
{% if not generate_default_config is arista.avd.defined(false) %}
{% if transceiver_qsfp_default_mode_4x10 | arista.avd.default(generate_default_config, true) %}
!
transceiver qsfp default-mode 4x10G
{% endif %}