From c5aadeb9c61009a27b0a5ccfe3bf3fce3c15474e Mon Sep 17 00:00:00 2001 From: "dywalsh@arista.com" Date: Fri, 14 Jun 2024 00:46:51 -0700 Subject: [PATCH] EOS SDK RPC v4.32.0F --- proto/acl.proto | 2 ++ proto/acl_types.proto | 2 ++ proto/agent.proto | 2 ++ proto/bgp.proto | 2 ++ proto/bgp_path.proto | 2 ++ proto/bgp_path_types.proto | 2 ++ proto/bgp_types.proto | 2 ++ proto/eapi.proto | 2 ++ proto/eapi_types.proto | 4 ++- proto/eth_lag_intf.proto | 2 ++ proto/eth_lag_intf_types.proto | 2 ++ proto/eth_phy_intf.proto | 2 ++ proto/eth_phy_intf_types.proto | 2 ++ proto/ip_intf.proto | 2 ++ proto/ip_intf_types.proto | 2 ++ proto/ip_route.proto | 2 ++ proto/ip_route_types.proto | 3 ++ proto/ip_types.proto | 2 ++ proto/macsec.proto | 2 ++ proto/macsec_types.proto | 2 ++ proto/mpls_route.proto | 2 ++ proto/mpls_route_types.proto | 2 ++ proto/mpls_types.proto | 2 ++ proto/mpls_vrf_label.proto | 2 ++ proto/mpls_vrf_label_types.proto | 4 ++- proto/nexthop_group.proto | 4 +++ proto/nexthop_group_types.proto | 3 ++ proto/policy_map.proto | 2 ++ proto/policy_map_counters.proto | 46 +++++++++++++++++++++++++++ proto/policy_map_counters_types.proto | 40 +++++++++++++++++++++++ proto/policy_map_types.proto | 4 +++ proto/structured_filter_types.proto | 2 ++ 32 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 proto/policy_map_counters.proto create mode 100644 proto/policy_map_counters_types.proto diff --git a/proto/acl.proto b/proto/acl.proto index 3f7f9e1..1addbac 100644 --- a/proto/acl.proto +++ b/proto/acl.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "acl_types.proto"; diff --git a/proto/acl_types.proto b/proto/acl_types.proto index 007b970..e566e87 100644 --- a/proto/acl_types.proto +++ b/proto/acl_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "ip_intf_types.proto"; diff --git a/proto/agent.proto b/proto/agent.proto index 8c79ad3..c811dba 100644 --- a/proto/agent.proto +++ b/proto/agent.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + import "rpc_types.proto"; package eos.remote; diff --git a/proto/bgp.proto b/proto/bgp.proto index 6b58099..ab9a5bf 100644 --- a/proto/bgp.proto +++ b/proto/bgp.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "bgp_types.proto"; diff --git a/proto/bgp_path.proto b/proto/bgp_path.proto index 98cbd31..74730c9 100644 --- a/proto/bgp_path.proto +++ b/proto/bgp_path.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "bgp_path_types.proto"; diff --git a/proto/bgp_path_types.proto b/proto/bgp_path_types.proto index dc9a188..43f3a08 100644 --- a/proto/bgp_path_types.proto +++ b/proto/bgp_path_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "ip_types.proto"; diff --git a/proto/bgp_types.proto b/proto/bgp_types.proto index fcc4449..9990d8f 100644 --- a/proto/bgp_types.proto +++ b/proto/bgp_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; message BgpPeerKey { diff --git a/proto/eapi.proto b/proto/eapi.proto index 21099f4..29e8d5d 100644 --- a/proto/eapi.proto +++ b/proto/eapi.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + import "eapi_types.proto"; package eos.remote; diff --git a/proto/eapi_types.proto b/proto/eapi_types.proto index bd68ec5..ec5311d 100644 --- a/proto/eapi_types.proto +++ b/proto/eapi_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; message EapiResponse { @@ -11,4 +13,4 @@ message EapiResponse { string error_message = 3; repeated string responses = 4; string raw_response = 5; -} \ No newline at end of file +} diff --git a/proto/eth_lag_intf.proto b/proto/eth_lag_intf.proto index 63431a7..2aa8477 100644 --- a/proto/eth_lag_intf.proto +++ b/proto/eth_lag_intf.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "rpc_types.proto"; diff --git a/proto/eth_lag_intf_types.proto b/proto/eth_lag_intf_types.proto index e7cf317..dce85e9 100644 --- a/proto/eth_lag_intf_types.proto +++ b/proto/eth_lag_intf_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + import "intf_types.proto"; package eos.remote; diff --git a/proto/eth_phy_intf.proto b/proto/eth_phy_intf.proto index 816a47b..3c3e396 100644 --- a/proto/eth_phy_intf.proto +++ b/proto/eth_phy_intf.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "rpc_types.proto"; diff --git a/proto/eth_phy_intf_types.proto b/proto/eth_phy_intf_types.proto index c5cddb3..ee2e412 100644 --- a/proto/eth_phy_intf_types.proto +++ b/proto/eth_phy_intf_types.proto @@ -2,6 +2,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; enum EthPhyIntfLinkSpeed { diff --git a/proto/ip_intf.proto b/proto/ip_intf.proto index 7695822..97b53b9 100644 --- a/proto/ip_intf.proto +++ b/proto/ip_intf.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "rpc_types.proto"; diff --git a/proto/ip_intf_types.proto b/proto/ip_intf_types.proto index 099ecfb..87582b2 100644 --- a/proto/ip_intf_types.proto +++ b/proto/ip_intf_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; enum IpAddrOperations { diff --git a/proto/ip_route.proto b/proto/ip_route.proto index e84af33..6dfa026 100644 --- a/proto/ip_route.proto +++ b/proto/ip_route.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + import "rpc_types.proto"; import "intf_types.proto"; import "ip_route_types.proto"; diff --git a/proto/ip_route_types.proto b/proto/ip_route_types.proto index d8754a7..8dd6dac 100644 --- a/proto/ip_route_types.proto +++ b/proto/ip_route_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + import "intf_types.proto"; import "ip_types.proto"; import "rpc_types.proto"; @@ -47,5 +49,6 @@ message IpRouteVia { uint32 metric = 10; bool vtep_sip_validation = 11; IntfId vxlan_intf_id = 12; + // Valid range of 1 - (2^24)-1, set to 0 if unused. uint32 weight = 13; } diff --git a/proto/ip_types.proto b/proto/ip_types.proto index 95f9c3a..65fce23 100644 --- a/proto/ip_types.proto +++ b/proto/ip_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; enum IpVersion { diff --git a/proto/macsec.proto b/proto/macsec.proto index 58f4de4..fdd1bf8 100644 --- a/proto/macsec.proto +++ b/proto/macsec.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "rpc_types.proto"; diff --git a/proto/macsec_types.proto b/proto/macsec_types.proto index 8baeb52..ef68016 100644 --- a/proto/macsec_types.proto +++ b/proto/macsec_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "intf_types.proto"; diff --git a/proto/mpls_route.proto b/proto/mpls_route.proto index 8fabc81..5628de6 100644 --- a/proto/mpls_route.proto +++ b/proto/mpls_route.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "mpls_route_types.proto"; diff --git a/proto/mpls_route_types.proto b/proto/mpls_route_types.proto index 109b81a..9b05f71 100644 --- a/proto/mpls_route_types.proto +++ b/proto/mpls_route_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "acl_types.proto"; diff --git a/proto/mpls_types.proto b/proto/mpls_types.proto index 3973621..a35f051 100644 --- a/proto/mpls_types.proto +++ b/proto/mpls_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; /** diff --git a/proto/mpls_vrf_label.proto b/proto/mpls_vrf_label.proto index 281854a..e369d95 100644 --- a/proto/mpls_vrf_label.proto +++ b/proto/mpls_vrf_label.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "mpls_types.proto"; diff --git a/proto/mpls_vrf_label_types.proto b/proto/mpls_vrf_label_types.proto index 57bbde8..677e0d4 100644 --- a/proto/mpls_vrf_label_types.proto +++ b/proto/mpls_vrf_label_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "mpls_types.proto"; @@ -10,4 +12,4 @@ import "mpls_types.proto"; message MplsVrfLabel { MplsLabel label = 1; string vrf_name = 2; -} \ No newline at end of file +} diff --git a/proto/nexthop_group.proto b/proto/nexthop_group.proto index 71a8103..91e0a43 100644 --- a/proto/nexthop_group.proto +++ b/proto/nexthop_group.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "rpc_types.proto"; @@ -260,6 +262,8 @@ message NexthopGroupActiveResponse { message NexthopGroupSetRequest { // Details of the new group. NexthopGroup nhg = 1; + // Must be in range 1 to 65535 + optional uint32 client_version_id = 2; } message NexthopGroupSetResponse { diff --git a/proto/nexthop_group_types.proto b/proto/nexthop_group_types.proto index 0cb44c2..c328ed4 100644 --- a/proto/nexthop_group_types.proto +++ b/proto/nexthop_group_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "intf_types.proto"; @@ -59,6 +61,7 @@ message NexthopGroup { bytes source_ip_addr = 5; IntfId source_intf = 6; bool autosize = 7; + // The numeric key corresponds to the nexthop index position for the entry. map nexthops = 8; map destination_ips = 9; bool counters_unshared = 10; diff --git a/proto/policy_map.proto b/proto/policy_map.proto index 8b4da0d..4f0a909 100644 --- a/proto/policy_map.proto +++ b/proto/policy_map.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "acl_types.proto"; diff --git a/proto/policy_map_counters.proto b/proto/policy_map_counters.proto new file mode 100644 index 0000000..12fb0fc --- /dev/null +++ b/proto/policy_map_counters.proto @@ -0,0 +1,46 @@ +// Copyright (c) 2023 Arista Networks, Inc. All rights reserved. +// Arista Networks, Inc. Confidential and Proprietary. + +syntax = "proto3"; + +package eos.remote; + +import "policy_map_counters_types.proto"; + +service PolicyMapCountersMgrService { + rpc watch_policy_map_counters( PolicyMapCountersWatchRequest ) + returns ( stream PolicyMapCountersWatchResponse ); +} + +message PolicyMapCountersWatchRequest { + // When set to true, messages will mostly carry a short key that can be + // mapped to the descriptive key. + // Disabling compression is not supported, theferefore the default choice + // for this argument is `true`. + optional bool compress_keys = 1; +} + +enum PolicyMapCountersOperation { + POLICY_MAP_COUNTERS_UPDATE = 0; + POLICY_MAP_COUNTERS_DELETE = 1; +} + +message PolicyMapCounters { + // This is the compressed key allocated by the server + // if compress_keys is enabled (true), all subsequent counter updates + // will only provide the key_id + uint64 key_id = 1; + // This is compound key. The client is responsible for + // maintaining the association between key_name and the more efficient key_id + PolicyMapCountersKey key_name = 2; + PolicyMapRuleCounters counters = 3; + PolicyMapCountersAction policy_action = 4; + // Instructs whether this entry is updating counters or deleting entries from the + // counter table. + PolicyMapCountersOperation operation = 5; +} + +message PolicyMapCountersWatchResponse { + repeated PolicyMapCounters counters = 1; + bool stream_ready = 2; +} diff --git a/proto/policy_map_counters_types.proto b/proto/policy_map_counters_types.proto new file mode 100644 index 0000000..bf87a53 --- /dev/null +++ b/proto/policy_map_counters_types.proto @@ -0,0 +1,40 @@ +// Copyright (c) 2023 Arista Networks, Inc. All rights reserved. +// Arista Networks, Inc. Confidential and Proprietary. + +syntax = "proto3"; + +package eos.remote; + +import "policy_map_types.proto"; + +message PolicyMapCountersKey { + PolicyMapKey policy_key = 1; + string class_name = 2; + string acl_rule = 3; +} + +message PolicyMapRuleCounters { + uint64 packets_count = 1; + uint64 bytes_count = 2; +} + +message PolicyMapCountersOutAction { + message NexthopAction { + bool recursive = 1; + repeated bytes nexthop_addrs = 2; + string vrf = 3; + } + + oneof nexthop { + NexthopAction nexthops = 1; + string nexthop_group = 2; + } + uint32 ttl = 3; +} + +message PolicyMapCountersAction { + oneof action { + bool deny = 1; + PolicyMapCountersOutAction out_action = 2; + } +} diff --git a/proto/policy_map_types.proto b/proto/policy_map_types.proto index f8946e2..3548853 100644 --- a/proto/policy_map_types.proto +++ b/proto/policy_map_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "acl_types.proto"; @@ -160,6 +162,7 @@ enum TrafficPolicyActionType { } enum PoliceRateUnit { + // NULL refers to the default unit in SDK (POLICE_RATE_UNIT_BPS) POLICE_RATE_UNIT_NULL = 0; POLICE_RATE_UNIT_BPS = 1; POLICE_RATE_UNIT_KBPS = 2; @@ -168,6 +171,7 @@ enum PoliceRateUnit { } enum PoliceBurstUnit { + // NULL refers to the default unit in SDK (POLICE_BURST_UNIT_BYTES) POLICE_BURST_UNIT_NULL = 0; POLICE_BURST_UNIT_BYTES = 1; POLICE_BURST_UNIT_KBYTES = 2; diff --git a/proto/structured_filter_types.proto b/proto/structured_filter_types.proto index c14e549..bc8c892 100644 --- a/proto/structured_filter_types.proto +++ b/proto/structured_filter_types.proto @@ -3,6 +3,8 @@ syntax = "proto3"; +option go_package = "arista/EosSdkRpc"; + package eos.remote; import "ip_intf_types.proto";