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 knob to define port in GNMI transport grpc #3245

Merged
merged 7 commits into from
Oct 19, 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
Expand Up @@ -38,10 +38,10 @@ interface Management1

#### Management API gNMI Summary

| Transport | SSL Profile | VRF | Notification Timestamp | ACL |
| --------- | ----------- | --- | ---------------------- | --- |
| MGMT | gnmi | MGMT | send-time | acl1 |
| mytransport | - | - | send-time | acl1 |
| Transport | SSL Profile | VRF | Notification Timestamp | ACL | Port |
| --------- | ----------- | --- | ---------------------- | --- | ---- |
| MGMT | gnmi | MGMT | send-time | acl1 | 6030 |
| mytransport | - | - | send-time | acl1 | 6032 |

Provider eos-native is configured.

Expand All @@ -56,6 +56,7 @@ management api gnmi
ip access-group acl1
notification timestamp send-time
transport grpc mytransport
port 6032
ip access-group acl1
notification timestamp send-time
philippebureau marked this conversation as resolved.
Show resolved Hide resolved
provider eos-native
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ interface Management1

#### Management API gNMI Summary

| Transport | SSL Profile | VRF | Notification Timestamp | ACL |
| --------- | ----------- | --- | ---------------------- | --- |
| MGMT | - | MGMT | last-change-time | ACL-GNMI |
| MONITORING | - | MONITORING | last-change-time | - |
| Transport | SSL Profile | VRF | Notification Timestamp | ACL | Port |
| --------- | ----------- | --- | ---------------------- | --- | ---- |
| MGMT | - | MGMT | last-change-time | ACL-GNMI | 6030 |
| MONITORING | - | MONITORING | last-change-time | - | 6031 |

Provider eos-native is configured.

Expand All @@ -54,6 +54,7 @@ management api gnmi
vrf MGMT
ip access-group ACL-GNMI
transport grpc MONITORING
port 6031
vrf MONITORING
provider eos-native
```
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ management api gnmi
ip access-group acl1
notification timestamp send-time
transport grpc mytransport
port 6032
ip access-group acl1
notification timestamp send-time
provider eos-native
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ management api gnmi
vrf MGMT
ip access-group ACL-GNMI
transport grpc MONITORING
port 6031
vrf MONITORING
provider eos-native
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ management_api_gnmi:
- name: mytransport
notification_timestamp: "send-time"
ip_access_group: acl1
port: "6032"
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ management_api_gnmi:
ip_access_group: ACL-GNMI
- name: MONITORING
vrf: MONITORING
port: 6031
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vrf</samp>](## "management_api_gnmi.transport.grpc.[].vrf") | String | | | | VRF name is optional |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;notification_timestamp</samp>](## "management_api_gnmi.transport.grpc.[].notification_timestamp") | String | | | Valid Values:<br>- send-time<br>- last-change-time | Per the gNMI specification, the default timestamp field of a notification message is set to be<br>the time at which the value of the underlying data source changes or when the reported event takes place.<br>In order to facilitate integration in legacy environments oriented around polling style operations,<br>an option to support overriding the timestamp field to the send-time is available from EOS 4.27.0F.<br> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ip_access_group</samp>](## "management_api_gnmi.transport.grpc.[].ip_access_group") | String | | | | ACL name |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;port</samp>](## "management_api_gnmi.transport.grpc.[].port") | Integer | | | | GNMI port.<br>Make sure to update the control-plane ACL accordingly in order for the service to be reachable by external applications.<br> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;grpc_tunnels</samp>](## "management_api_gnmi.transport.grpc_tunnels") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- name</samp>](## "management_api_gnmi.transport.grpc_tunnels.[].name") | String | Required, Unique | | | Transport name |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shutdown</samp>](## "management_api_gnmi.transport.grpc_tunnels.[].shutdown") | Boolean | | | | Operational status of the gRPC tunnel |
Expand Down Expand Up @@ -49,6 +50,7 @@
vrf: <str>
notification_timestamp: <str>
ip_access_group: <str>
port: <int>
grpc_tunnels:
- name: <str>
shutdown: <bool>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7852,6 +7852,11 @@
"type": "string",
"description": "ACL name",
"title": "IP Access Group"
},
"port": {
"type": "integer",
"description": "GNMI port.\nMake sure to update the control-plane ACL accordingly in order for the service to be reachable by external applications.\n",
"title": "Port"
}
},
"additionalProperties": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4707,6 +4707,16 @@ keys:
ip_access_group:
type: str
description: ACL name
port:
type: int
description: 'GNMI port.

Make sure to update the control-plane ACL accordingly in order
for the service to be reachable by external applications.

'
convert_types:
- str
grpc_tunnels:
type: list
primary_key: name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ keys:
ip_access_group:
type: str
description: ACL name
port:
type: int
description: |
GNMI port.
Make sure to update the control-plane ACL accordingly in order for the service to be reachable by external applications.
convert_types:
- str
grpc_tunnels:
type: list
primary_key: name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@
{# new table view using the new flags #}
{% if management_api_gnmi.transport.grpc is arista.avd.defined %}

| Transport | SSL Profile | VRF | Notification Timestamp | ACL |
| --------- | ----------- | --- | ---------------------- | --- |
| Transport | SSL Profile | VRF | Notification Timestamp | ACL | Port |
| --------- | ----------- | --- | ---------------------- | --- | ---- |
{% for transport in management_api_gnmi.transport.grpc %}
{% if transport.name is arista.avd.defined %}
{% set transport_name = transport.name %}
{% set ssl_profile = transport.ssl_profile | arista.avd.default('-') %}
{% set vrf = transport.vrf | arista.avd.default('-') %}
{% set notif = transport.notification_timestamp | arista.avd.default('last-change-time') %}
{% set acl = transport.ip_access_group | arista.avd.default('-') %}
| {{ transport_name }} | {{ ssl_profile }} | {{ vrf }} | {{ notif }} | {{ acl }} |
{% set port = transport.port | arista.avd.default('6030') %}
| {{ transport_name }} | {{ ssl_profile }} | {{ vrf }} | {{ notif }} | {{ acl }} | {{ port }} |
{% endif %}
{% endfor %}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ management api gnmi
{% if transport.ssl_profile is arista.avd.defined %}
ssl profile {{ transport.ssl_profile }}
{% endif %}
{% if transport.port is arista.avd.defined %}
port {{ transport.port }}
{% endif %}
{% if transport.vrf is arista.avd.defined %}
vrf {{ transport.vrf }}
{% endif %}
Expand Down