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: Add peer hosts to CVX #2281

Merged
merged 6 commits into from
Dec 5, 2022
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
Expand Up @@ -49,6 +49,10 @@ interface Management1

# CVX

| Peer Hosts |
ClausHolbechArista marked this conversation as resolved.
Show resolved Hide resolved
| ---------- |
| 1.1.1.1, 2.2.2.2 |

CVX is enabled

## CVX services
Expand All @@ -63,6 +67,8 @@ CVX is enabled
!
cvx
no shutdown
peer host 1.1.1.1
peer host 2.2.2.2
service mcs
redis password 7 070E334ddD1D18
no shutdown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ no aaa root
!
cvx
no shutdown
peer host 1.1.1.1
peer host 2.2.2.2
service mcs
redis password 7 070E334ddD1D18
no shutdown
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
### CVX ###
cvx:
shutdown: false
peer_hosts:
- 1.1.1.1
- 2.2.2.2
services:
mcs:
redis:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ cvx:
password: < password >
password_type: < 0 | 7 | 8a | default -> 7 >
shutdown: < true | false >
peer_hosts: < IP address or hostname >
```

#### Enable Password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,8 @@ CVX server features are not supported on physical switches. See `management_cvx`
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| [<samp>cvx</samp>](## "cvx") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;shutdown</samp>](## "cvx.shutdown") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;peer_hosts</samp>](## "cvx.peer_hosts") | List, items: String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;- &lt;str&gt;</samp>](## "cvx.peer_hosts.[].&lt;str&gt;") | String | | | | IP address or hostname |
| [<samp>&nbsp;&nbsp;services</samp>](## "cvx.services") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;mcs</samp>](## "cvx.services.mcs") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;redis</samp>](## "cvx.services.mcs.redis") | Dictionary | | | | |
Expand All @@ -495,6 +497,8 @@ CVX server features are not supported on physical switches. See `management_cvx`
```yaml
cvx:
shutdown: <bool>
peer_hosts:
- <str>
services:
mcs:
redis:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,14 @@
"type": "boolean",
"title": "Shutdown"
},
"peer_hosts": {
"type": "array",
"items": {
"type": "string",
"description": "IP address or hostname"
},
"title": "Peer Hosts"
},
"services": {
"type": "object",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,11 @@ keys:
keys:
shutdown:
type: bool
peer_hosts:
type: list
items:
type: str
description: IP address or hostname
services:
type: dict
keys:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ keys:
keys:
shutdown:
type: bool
peer_hosts:
type: list
items:
type: str
description: IP address or hostname
services:
type: dict
keys:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
{% if cvx is arista.avd.defined %}

# CVX
{% if cvx.peer_hosts is arista.avd.defined %}

| Peer Hosts |
ClausHolbechArista marked this conversation as resolved.
Show resolved Hide resolved
| ---------- |
{% set peer_hosts = cvx.peer_hosts | arista.avd.natural_sort | join(', ') %}
{% endif %}
| {{ peer_hosts }} |
{% if cvx.shutdown is arista.avd.defined(true) %}

CVX is disabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ cvx
{% elif cvx.shutdown is arista.avd.defined(false) %}
no shutdown
{% endif %}
{% for peer_host in cvx.peer_hosts | arista.avd.natural_sort %}
peer host {{ peer_host }}
{% endfor %}
{% if cvx.services is arista.avd.defined %}
{% if cvx.services.mcs is arista.avd.defined %}
service mcs
Expand Down