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): Add Dps1 interface #3198

Merged
merged 6 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# dps-interfaces

## Table of Contents

- [Management](#management)
- [Management Interfaces](#management-interfaces)
- [Interfaces](#interfaces)
- [DPS Interfaces](#dps-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
```

## Interfaces

### DPS Interfaces

#### DPS Interfaces Summary

| Interface | IP address | Shutdown | Flow tracker(s) | TCP MSS Ceiling |
| --------- | ---------- | -------- | --------------- | --------------- |
| Dps1 | 192.168.42.42/24 | True | Hardware: FT-HW<br>Sampled: FT-S | IPv4: 666<br>IPv6: 666<br>Direction: ingress |

#### DPS Interfaces Device Configuration

```eos
!
interface Dps1
description Test DPS Interface
shutdown
flow tracker hardware FT-HW
flow tracker sampled FT-S
ip address 192.168.42.42/24
tcp mss ceiling ipv4 666 ipv6 666 ingress
load-interval 42
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
!RANCID-CONTENT-TYPE: arista
!
transceiver qsfp default-mode 4x10G
!
hostname dps-interfaces
!
no enable password
no aaa root
!
interface Dps1
description Test DPS Interface
shutdown
flow tracker hardware FT-HW
flow tracker sampled FT-S
ip address 192.168.42.42/24
tcp mss ceiling ipv4 666 ipv6 666 ingress
load-interval 42
!
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,19 @@
### DPS interface ###

dps_interfaces:
- name: Dps1
description: Test DPS Interface
shutdown: true
ip_address: 192.168.42.42/24
flow_tracker:
hardware: FT-HW
sampled: FT-S
# Cannot test all combination of tcp_mss_ceiling with only one Dps interface
# available
tcp_mss_ceiling:
ipv4: 666
ipv6: 666
direction: ingress
# This is a dummy command
eos_cli: |-
load-interval 42
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ cvx
custom-templates
daemon_terminattr
daemons
dps-interfaces
dns-ntp
dhcp-relay
dot1x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"dns": "DNS",
"dot1br": "dot1br",
"dot1x": "dot1x",
"dps": "DPS",
"dr": "DR",
"dscp": "DSCP",
"eos": "EOS",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--
~ Copyright (c) 2023 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>dps_interfaces</samp>](## "dps_interfaces") | List, items: Dictionary | | | Min Length: 1<br>Max Length: 1 | |
| [<samp>&nbsp;&nbsp;- name</samp>](## "dps_interfaces.[].name") | String | Required, Unique | | Valid Values:<br>- Dps1 | "Dps1" is currently the only supported interface. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;description</samp>](## "dps_interfaces.[].description") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;shutdown</samp>](## "dps_interfaces.[].shutdown") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_address</samp>](## "dps_interfaces.[].ip_address") | String | | | | IPv4 address/mask. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;flow_tracker</samp>](## "dps_interfaces.[].flow_tracker") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sampled</samp>](## "dps_interfaces.[].flow_tracker.sampled") | String | | | | Sampled flow tracker name. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hardware</samp>](## "dps_interfaces.[].flow_tracker.hardware") | String | | | | Hardware flow tracker name, |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;tcp_mss_ceiling</samp>](## "dps_interfaces.[].tcp_mss_ceiling") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ipv4</samp>](## "dps_interfaces.[].tcp_mss_ceiling.ipv4") | Integer | | | Min: 64<br>Max: 65495 | Segment Size for IPv4. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ipv6</samp>](## "dps_interfaces.[].tcp_mss_ceiling.ipv6") | Integer | | | Min: 64<br>Max: 65475 | Segment Size for IPv6. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;direction</samp>](## "dps_interfaces.[].tcp_mss_ceiling.direction") | String | | | Valid Values:<br>- ingress<br>- egress | Optional direction ('ingress', 'egress') for tcp mss ceiling. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;eos_cli</samp>](## "dps_interfaces.[].eos_cli") | String | | | | Multiline String with EOS CLI rendered directly on the Dps interface in the final EOS configuration. |

=== "YAML"

```yaml
dps_interfaces:
- name: <str>
description: <str>
shutdown: <bool>
ip_address: <str>
flow_tracker:
sampled: <str>
hardware: <str>
tcp_mss_ceiling:
ipv4: <int>
ipv6: <int>
direction: <str>
eos_cli: <str>
```
Original file line number Diff line number Diff line change
Expand Up @@ -1528,6 +1528,103 @@
"^_.+$": {}
}
},
"dps_interfaces": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "\"Dps1\" is currently the only supported interface.",
"enum": [
"Dps1"
],
"title": "Name"
},
"description": {
"type": "string",
"title": "Description"
},
"shutdown": {
"type": "boolean",
"title": "Shutdown"
},
"ip_address": {
"type": "string",
"description": "IPv4 address/mask.",
"title": "IP Address"
},
"flow_tracker": {
"type": "object",
"properties": {
"sampled": {
"type": "string",
"description": "Sampled flow tracker name.",
"title": "Sampled"
},
"hardware": {
"type": "string",
"description": "Hardware flow tracker name,",
"title": "Hardware"
}
},
"additionalProperties": false,
"patternProperties": {
"^_.+$": {}
},
"title": "Flow Tracker"
},
"tcp_mss_ceiling": {
"type": "object",
"properties": {
"ipv4": {
"type": "integer",
"description": "Segment Size for IPv4.",
"minimum": 64,
"maximum": 65495,
"title": "IPv4"
},
"ipv6": {
"type": "integer",
"description": "Segment Size for IPv6.",
"minimum": 64,
"maximum": 65475,
"title": "IPv6"
},
"direction": {
"type": "string",
"enum": [
"ingress",
"egress"
],
"description": "Optional direction ('ingress', 'egress') for tcp mss ceiling.",
"title": "Direction"
}
},
"additionalProperties": false,
"patternProperties": {
"^_.+$": {}
},
"title": "TCP Mss Ceiling"
},
"eos_cli": {
"type": "string",
"description": "Multiline String with EOS CLI rendered directly on the Dps interface in the final EOS configuration.",
"title": "EOS CLI"
}
},
"additionalProperties": false,
"patternProperties": {
"^_.+$": {}
},
"required": [
"name"
]
},
"title": "DPS Interfaces"
},
"dynamic_prefix_lists": {
"type": "array",
"items": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,62 @@ keys:
max: 9236
convert_types:
- str
dps_interfaces:
type: list
primary_key: name
min_length: 1
max_length: 1
items:
type: dict
keys:
name:
type: str
description: '"Dps1" is currently the only supported interface.'
valid_values:
- Dps1
description:
type: str
shutdown:
type: bool
ip_address:
type: str
description: IPv4 address/mask.
flow_tracker:
type: dict
keys:
sampled:
type: str
description: Sampled flow tracker name.
hardware:
type: str
description: Hardware flow tracker name,
tcp_mss_ceiling:
type: dict
keys:
ipv4:
type: int
description: Segment Size for IPv4.
min: 64
max: 65495
convert_types:
- str
ipv6:
type: int
description: Segment Size for IPv6.
min: 64
max: 65475
convert_types:
- str
direction:
type: str
valid_values:
- ingress
- egress
description: Optional direction ('ingress', 'egress') for tcp mss ceiling.
eos_cli:
type: str
description: Multiline String with EOS CLI rendered directly on the Dps
interface in the final EOS configuration.
dynamic_prefix_lists:
type: list
items:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Copyright (c) 2023 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:
dps_interfaces:
gmuloc marked this conversation as resolved.
Show resolved Hide resolved
type: list
primary_key: name
min_length: 1
max_length: 1
items:
type: dict
keys:
name:
type: str
description: |-
"Dps1" is currently the only supported interface.
valid_values:
- Dps1
description:
type: str
shutdown:
type: bool
ip_address:
type: str
description: IPv4 address/mask.
flow_tracker:
type: dict
keys:
sampled:
gmuloc marked this conversation as resolved.
Show resolved Hide resolved
type: str
description: Sampled flow tracker name.
hardware:
type: str
description: Hardware flow tracker name,
tcp_mss_ceiling:
type: dict
keys:
ipv4:
type: int
description: Segment Size for IPv4.
min: 64
max: 65495
convert_types:
- str
ipv6:
type: int
description: Segment Size for IPv6.
min: 64
max: 65475
convert_types:
- str
direction:
type: str
valid_values: ["ingress", "egress"]
description: |-
Optional direction ('ingress', 'egress') for tcp mss ceiling.
eos_cli:
type: str
description: |-
Multiline String with EOS CLI rendered directly on the Dps interface in the final EOS configuration.
Loading