Skip to content

Commit

Permalink
EOS SDK RPC v4.31.2F
Browse files Browse the repository at this point in the history
  • Loading branch information
dywalsh-ar committed Feb 13, 2024
1 parent cdfcc71 commit 57604d3
Show file tree
Hide file tree
Showing 8 changed files with 364 additions and 5 deletions.
27 changes: 27 additions & 0 deletions proto/intf.proto
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,12 @@ service IntfCounterMgrService {
* EosSdk reference: eos::intf_counter_mgr::traffic_rates
*/
rpc intf_traffic_rates( IntfTrafficRatesRequest ) returns ( IntfTrafficRatesResponse ) {}

/*
* Streams traffic rate updates
*/
rpc intf_traffic_rates_stream( IntfTrafficRatesStreamRequest ) returns (
stream IntfTrafficRatesStreamResponse ) {}
}

message IntfCountersRequest {
Expand All @@ -301,3 +307,24 @@ message IntfTrafficRatesResponse {
// The traffic rates associated with the interface.
IntfTrafficRates rates = 1;
}

message IntfTrafficRatesStreamRequest {
// Set to true when an ackowledgment is desired.
bool ack = 1;
// Regular expression to report only interfaces with matching names.
// When empty, all interfaces are sent.
string intf_name_regex = 2;
}

message IntfTrafficRatesStreamResponse {
message DataEntry {
// Interface name
IntfId intf_id = 1;
// The traffic rates associated with the interface.
IntfTrafficRates rates = 2;
}
// If true the agent is now actively watching for events.
bool ack = 1;
// Traffic rates data
repeated DataEntry data = 2;
}
4 changes: 4 additions & 0 deletions proto/ip_route.proto
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ message IpRoutesRequest {
// If true, the stream response will contain only vias if
// `report_vias` is true, and be empty otherwise.
bool suppress_routes = 6;
// If true, each route and all its vias will be streamed in a single message.
// When this flag is set to true, 'report_vias' and 'suppress_routes' are ignored.
bool packed_route_vias = 7;
}

message IpRoutesResponse {
Expand All @@ -190,6 +193,7 @@ message IpRoutesResponse {
// VIA of a configured static route.
IpRouteVia via = 2;
}
repeated IpRouteVia vias = 3;
}

message IpRouteViasRequest {
Expand Down
1 change: 1 addition & 0 deletions proto/ip_route_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ message IpRoute {
IpRouteKey key = 1;
uint32 tag = 2;
bool rib_bypass = 3;
string command_tag = 4;
}

enum IpRouteActions {
Expand Down
11 changes: 6 additions & 5 deletions proto/macsec_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ message MacsecIntfCounters {
}

message MacsecProfile {
reserved 10, 13;
// Use lldp_bypass_level instead.
reserved "bypass_lldp";
// Use traffic_policy instead.
reserved "allow_unprotected";
string profile_name = 1;
MacsecKey primary_key = 2;
MacsecKey fallback_key = 3;
Expand All @@ -44,11 +39,17 @@ message MacsecProfile {
}
bool dot1x = 8;
bool include_sci = 9;
// The field bypass_lldp is for reading back only. Setting it has no effect.
// Please use lldp_bypass_level instead.
bool bypass_lldp = 10;
MacsecBypass lldp_bypass_level = 11;
oneof traffic_policy_present {
// Default value is TRAFFIC_POLICY_ACTIVE_SAK.
MacsecProfileTrafficPolicy traffic_policy = 12;
}
// Deprecated. Please use traffic_policy instead.
// Only used if traffic_policy_present is not set.
bool allow_unprotected = 13;
oneof replay_protection_present {
// Default value is True.
bool replay_protection = 14;
Expand Down
19 changes: 19 additions & 0 deletions proto/mpls_route.proto
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,28 @@ message MplsRouteExistsResponse {
bool exists = 1;
}

enum MplsRouteSetViasAction {
// Use this convenience method to create routes and vias in a single RPC call.
// While primarily designed for route creation, when utilized with an existing
// route key, any vias present within the MplsRouteSetRequest message will be
// appended to the existing set of vias for that route. If adding the vias
// results in a failure, the route shall be deleted.
MPLS_ROUTE_SET_VIAS_ADD = 0;
// Choosing this action with an existing route will replace vias in a
// make-before-break fashion within the RPC server, when possible.
// Vias that are common between the old set and the new set should
// remain untouched. If the operation fails, then the original via set
// is restored.
MPLS_ROUTE_SET_VIAS_REPLACE = 1;
}

message MplsRouteSetRequest {
// The MPLS route to insert or update.
MplsRoute route = 1;
// MPLS vias to be added to the route.
repeated MplsRouteVia vias = 2;
// action associated with vias, i.e., ADD or REPLACE.
MplsRouteSetViasAction vias_action = 3;
}

message MplsRouteSetResponse {}
Expand Down
164 changes: 164 additions & 0 deletions proto/policy_map.proto
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,78 @@ service PolicyMapMgrService {
* EosSdk reference: eos::policy_map_mgr::hw_status
*/
rpc hw_status( PolicyMapHwStatusRequest ) returns ( PolicyMapHwStatusResponse ) {}

/**
* Queries whether the specified traffic policy is configured or not.
*
* EosSdk reference: eos::policy_map_mgr::traffic_policy_exists
*/
rpc traffic_policy_exists( TrafficPolicyExistsRequest )
returns ( TrafficPolicyExistsResponse ) {}

/**
* Queries a traffic policy given its key.
*
* EosSdk reference: eos::policy_map_mgr::traffic_policy
*/
rpc traffic_policy( TrafficPolicyRequest ) returns ( TrafficPolicyResponse ) {}

/**
* Creates or updates a traffic policy.
*
* EosSdk reference: eos::policy_map_mgr::traffic_policy_is
*/
rpc traffic_policy_is( TrafficPolicyIsRequest )
returns ( TrafficPolicyIsResponse ) {}

/**
* Creates or updates multiple traffic policies in a single call.
*
* EosSdk reference: eos::policy_map_mgr::traffic_policy_is
*/
rpc bulk_traffic_policy_is( BulkTrafficPolicyIsRequest )
returns ( BulkTrafficPolicyIsResponse ) {}

/**
* Deletes a traffic policy.
*
* EosSdk reference: eos::policy_map_mgr::traffic_policy_del
*/
rpc traffic_policy_del( TrafficPolicyDelRequest )
returns ( TrafficPolicyDelResponse ) {}

/**
* Deletes multiple traffic policies in a single call.
*
* EosSdk reference: eos::policy_map_mgr::traffic_policy_del
*/
rpc bulk_traffic_policy_del( BulkTrafficPolicyDelRequest )
returns ( BulkTrafficPolicyDelResponse ) {}

/**
* Returns a list of the keys of the configured traffic policies.
*
* EosSdk reference: eos::policy_map_mgr::traffic_policy_iter
*/
rpc traffic_policies( TrafficPoliciesRequest )
returns ( stream TrafficPoliciesResponse ) {}

/**
* Applies or unapplies a traffic policy on the given interface and direction.
*
* EosSdk reference: eos::policy_map_mgr::traffic_policy_apply
*/
rpc traffic_policy_apply( TrafficPolicyApplyRequest )
returns ( TrafficPolicyApplyResponse ) {}

/**
* Applies or unapplies multiple traffic policies on the given interfaces and
* directions in a single call.
*
* EosSdk reference: eos::policy_map_mgr::traffic_policy_apply
*/
rpc bulk_traffic_policy_apply( BulkTrafficPolicyApplyRequest )
returns ( BulkTrafficPolicyApplyResponse ) {}
}

message PolicyMapWatchRequest {
Expand All @@ -136,6 +208,7 @@ enum PolicyMapEventType {
POLICY_MAP_EVENT_NULL = 0;
POLICY_MAP_EVENT_SYNC = 1;
POLICY_MAP_EVENT_CONFIG_SET = 2;
POLICY_MAP_EVENT_TP_CONFIG_SET = 3;
}

message PolicyMapWatchResponse {
Expand Down Expand Up @@ -277,3 +350,94 @@ message PolicyMapHwStatusResponse {
// The hardware status of the policy map.
PolicyMapHwStatuses hw_statuses = 1;
}

message TrafficPolicyExistsRequest {
// The key of the traffic policy to query.
string key = 1;
}

message TrafficPolicyExistsResponse {
// True if the traffic policy is configured otherwise false.
bool exists = 1;
}

message TrafficPolicyRequest {
// The key of the traffic policy to query.
string key = 1;
}

message TrafficPolicyResponse {
// The traffic policy corresponding to the key or empty if not found.
TrafficPolicy traffic_policy = 1;
}

message TrafficPolicyIsRequest {
// The traffic policy to create or update.
TrafficPolicy traffic_policy = 1;
}

message TrafficPolicyIsResponse {}

message BulkTrafficPolicyIsRequest {
// List of TrafficPolicyIsRequests.
repeated TrafficPolicyIsRequest requests = 1;
}

message BulkTrafficPolicyIsResponse {
// Number of consecutive successful requests.
uint64 processed = 1;
// Success or error details in case of failure.
RpcResponseStatus status = 2;
}

message TrafficPolicyDelRequest {
// The key of the traffic policy to delete.
string key = 1;
}

message TrafficPolicyDelResponse {}

message BulkTrafficPolicyDelRequest {
// List of TrafficPolicyDelRequests.
repeated TrafficPolicyDelRequest requests = 1;
}

message BulkTrafficPolicyDelResponse {
// Number of consecutive successful requests.
uint64 processed = 1;
// Success or error details in case of failure.
RpcResponseStatus status = 2;
}

message TrafficPoliciesRequest {}

message TrafficPoliciesResponse {
// The key of one of the feature's configured policy maps.
PolicyMapKey key = 1;
}

message TrafficPolicyApplyRequest {
// The key of the traffic policy to [un]apply.
string key = 1;
// The inteface ID of the interface to [un]apply the policy map.
IntfId intf_id = 2;
// The direction in which to [un]apply the traffic policy.
TrafficPolicyDirection direction = 3;
// True if the traffic policy should be applied otherwise false if it should
// be unapplied.
bool apply = 4;
}

message TrafficPolicyApplyResponse {}

message BulkTrafficPolicyApplyRequest {
// List of TrafficPolicyApplyRequests.
repeated TrafficPolicyApplyRequest requests = 1;
}

message BulkTrafficPolicyApplyResponse {
// Number of consecutive successful requests.
uint64 processed = 1;
// Success or error details in case of failure.
RpcResponseStatus status = 2;
}
84 changes: 84 additions & 0 deletions proto/policy_map_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package eos.remote;

import "acl_types.proto";
import "intf_types.proto";
import "structured_filter_types.proto";

message PolicyMap {
PolicyMapKey key = 1;
Expand Down Expand Up @@ -94,3 +95,86 @@ enum PolicyMapStatus {
POLICY_STATUS_FAILED = 3;
POLICY_STATUS_SUCCESS = 4;
}

/**
* A traffic policy instance.
*
* EosSdk reference: eos::traffic_policy_t
*/
message TrafficPolicy {
string key = 1;
repeated string named_counters = 2;
map<uint32, TrafficPolicyRule> rules = 3;
}

/**
* A traffic policy rule, describing traffic match and actions.
*
* EosSdk reference: eos::traffic_policy_rule_t
*/
message TrafficPolicyRule {
string match_rule_name = 1;
TrafficPolicyRuleType traffic_policy_rule_type = 2;
TpRuleFilter raw_rule = 3;
repeated TrafficPolicyAction actions = 4;
}

/**
* A single traffic-policy action.
*
* EosSdk reference: eos::traffic_policy_action_t
*/
message TrafficPolicyAction {
TrafficPolicyActionType action_type = 1;
string counter_name = 2;
string goto_class_name = 3;
bool goto_next = 4;
uint32 dscp = 5;
uint32 traffic_class = 6;
string vrf = 7;
string mirror_session = 8;
uint64 police_rate = 9;
uint64 police_burst_size = 10;
PoliceRateUnit police_rate_unit = 11;
PoliceBurstUnit police_burst_unit = 12;
repeated string nexthop_groups = 13;
repeated bytes nexthops = 14;
}

enum TrafficPolicyActionType {
TRAFFIC_POLICY_ACTION_NULL = 0;
TRAFFIC_POLICY_ACTION_DROP = 1;
TRAFFIC_POLICY_ACTION_POLICE = 2;
TRAFFIC_POLICY_ACTION_COUNT = 3;
TRAFFIC_POLICY_ACTION_LOG = 4;
TRAFFIC_POLICY_ACTION_GOTO = 5;
TRAFFIC_POLICY_ACTION_DSCP = 6;
TRAFFIC_POLICY_ACTION_TRAFFIC_CLASS = 7;
TRAFFIC_POLICY_ACTION_SET_VRF = 8;
TRAFFIC_POLICY_ACTION_SET_VRF_SECONDARY = 9;
TRAFFIC_POLICY_ACTION_USE_VRF_SECONDARY = 10;
TRAFFIC_POLICY_ACTION_MIRROR = 11;
TRAFFIC_POLICY_ACTION_SFLOW = 12;
TRAFFIC_POLICY_ACTION_NEXTHOP = 13;
TRAFFIC_POLICY_ACTION_NEXTHOP_GROUP = 14;
}

enum PoliceRateUnit {
POLICE_RATE_UNIT_NULL = 0;
POLICE_RATE_UNIT_BPS = 1;
POLICE_RATE_UNIT_KBPS = 2;
POLICE_RATE_UNIT_MBPS = 3;
POLICE_RATE_UNIT_GBPS = 4;
}

enum PoliceBurstUnit {
POLICE_BURST_UNIT_NULL = 0;
POLICE_BURST_UNIT_BYTES = 1;
POLICE_BURST_UNIT_KBYTES = 2;
POLICE_BURST_UNIT_MBYTES = 3;
}

enum TrafficPolicyDirection {
TRAFFIC_POLICY_DIRECTION_NULL = 0;
TRAFFIC_POLICY_DIRECTION_INPUT = 1;
}
Loading

0 comments on commit 57604d3

Please sign in to comment.