Skip to content

Commit

Permalink
EOS SDK RPC v4.32.1F
Browse files Browse the repository at this point in the history
  • Loading branch information
dywalsh-ar committed Jun 14, 2024
1 parent c5aadeb commit 39eb3ed
Show file tree
Hide file tree
Showing 5 changed files with 189 additions and 0 deletions.
160 changes: 160 additions & 0 deletions proto/class_map.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
// Copyright (c) 2024 Arista Networks, Inc. All rights reserved.
// Arista Networks, Inc. Confidential and Proprietary.

syntax = "proto3";

option go_package = "arista/EosSdkRpc";

package eos.remote;

import "class_map_types.proto";
import "policy_map_types.proto";
import "rpc_types.proto";

service ClassMapMgrService {
/**
* Initiates a class map resync process. Starts a blank configuration to be
* applied once resync_complete is called.
*
* EosSdk reference: eos::class_map_mgr::resync_init
*/
rpc resync_init( ClassMapResyncInitRequest ) returns (
ClassMapResyncInitResponse ) {}

/**
* Ends the current class map resync process.
*
* EosSdk reference: eos::class_map_mgr::resync_complete
*/
rpc resync_complete( ClassMapResyncCompleteRequest ) returns (
ClassMapResyncCompleteResponse ) {}

/**
* Queries whether the specified class map is configured or not.
*
* EosSdk reference: eos::class_map_mgr::exists
*/
rpc exists( ClassMapExistsRequest ) returns ( ClassMapExistsResponse ) {}

/**
* Queries a class map given its key.
*
* EosSdk reference: eos::class_map_mgr::class_map
*/
rpc class_map( ClassMapRequest ) returns ( ClassMapResponse ) {}

/**
* Creates or updates a class map.
*
* EosSdk reference: eos::class_map_mgr::class_map_is
*/
rpc class_map_is( ClassMapIsRequest ) returns ( ClassMapIsResponse ) {}

/**
* Creates or updates multiple class maps in a single call.
*
* EosSdk reference: eos::class_map_mgr::class_map_is
*/
rpc bulk_class_map_is( BulkClassMapIsRequest ) returns (
BulkClassMapIsResponse ) {}

/**
* Deletes a class map.
*
* EosSdk reference: eos::class_map_mgr::class_map_del
*/
rpc class_map_del( ClassMapDelRequest ) returns ( ClassMapDelResponse ) {}

/**
* Deletes multiple class maps in a single call.
*
* EosSdk reference: eos::class_map_mgr::class_map_del
*/
rpc bulk_class_map_del( BulkClassMapDelRequest ) returns (
BulkClassMapDelResponse ) {}

/**
* Returns a list of the keys of the configured class maps for a
* specified policy_feature
*
* EosSdk reference: eos::class_map_mgr::class_map_iter
*/
rpc class_maps( ClassMapsRequest ) returns ( stream ClassMapsResponse ) {}
}

message ClassMapResyncInitRequest {}

message ClassMapResyncInitResponse {}

message ClassMapResyncCompleteRequest {}

message ClassMapResyncCompleteResponse {}

message ClassMapExistsRequest {
// The key of the class map to query.
PolicyMapKey key = 1;
}

message ClassMapExistsResponse {
// True if the class map is configured otherwise false.
bool exists = 1;
}

message ClassMapRequest {
// The key of the class map to query.
PolicyMapKey key = 1;
}

message ClassMapResponse {
// The class map corresponding to the key or empty if not found.
ClassMap class_map = 1;
}

message ClassMapIsRequest {
// The class map to create or update.
ClassMap class_map = 1;
}

message ClassMapIsResponse {}

message BulkClassMapIsRequest {
// List of ClassMapIsRequests specifying the class maps to create.
repeated ClassMapIsRequest requests = 1;
}

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

message ClassMapDelRequest {
// The key of the class map to delete.
PolicyMapKey key = 1;
}

message ClassMapDelResponse {}

message BulkClassMapDelRequest {
// List of ClassMapDelRequests specifying the class maps to delete
repeated ClassMapDelRequest requests = 1;
}

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

message ClassMapsRequest {
// The policy feature to list the configured class maps for
PolicyFeature feature = 1;
}

message ClassMapsResponse {
// The key of the feature's configured class maps.
PolicyMapKey key = 1;
}

21 changes: 21 additions & 0 deletions proto/class_map_types.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) 2024 Arista Networks, Inc. All rights reserved.
// Arista Networks, Inc. Confidential and Proprietary.

syntax = "proto3";

option go_package = "arista/EosSdkRpc";

package eos.remote;

import "acl_types.proto";
import "policy_map_types.proto";

message ClassMap {
PolicyMapKey key = 1;
map<uint32, ClassMapRule> rules = 2;
}

message ClassMapRule {
AclKey acl_key = 1;
}

2 changes: 2 additions & 0 deletions proto/nexthop_group_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ message NexthopGroup {
bool counters_persistent = 12;
// NOTE: this is actually a 16-bit value.
uint32 version_id = 13;
// The numeric key corresponds to the nexthop index position for the entry.
map<uint32, NexthopGroupEntry> backup_nexthops = 14;
}

message NexthopGroupCounter {
Expand Down
2 changes: 2 additions & 0 deletions proto/policy_map_counters.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

syntax = "proto3";

option go_package = "arista/EosSdkRpc";

package eos.remote;

import "policy_map_counters_types.proto";
Expand Down
4 changes: 4 additions & 0 deletions proto/policy_map_counters_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

syntax = "proto3";

option go_package = "arista/EosSdkRpc";

package eos.remote;

import "policy_map_types.proto";
Expand All @@ -16,6 +18,8 @@ message PolicyMapCountersKey {
message PolicyMapRuleCounters {
uint64 packets_count = 1;
uint64 bytes_count = 2;
/// Last update timestamp, UTC, sub-second precision
double last_update_timestamp = 3;
}

message PolicyMapCountersOutAction {
Expand Down

0 comments on commit 39eb3ed

Please sign in to comment.