Skip to content

Commit

Permalink
release/dashboard: Update dashboard.v1 APIs
Browse files Browse the repository at this point in the history
XXX_SKIP_CHECK_BREAKING

Change-Id: Icb7668c3888ff07960e499501554738ffb25a029
  • Loading branch information
oumichae1 committed Apr 11, 2024
1 parent 00a727b commit 2ecf5fa
Show file tree
Hide file tree
Showing 4 changed files with 616 additions and 3 deletions.
6 changes: 6 additions & 0 deletions arista/dashboard.v1/dashboard-changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
# New entries go on top.

Changes:
- date: 2024-03-28
description: Update available APIs
version: 1.4.0
cvaas: true
onprem: true

- date: 2023-05-11
description: Add a new widget field to store the id of its parent widget
version: 1.3.0
Expand Down
2 changes: 1 addition & 1 deletion arista/dashboard.v1/dashboard.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ syntax = "proto3";

package arista.dashboard.v1;

option go_package = "arista/resources/arista/dashboard.v1;dashboard";
option go_package = "github.com/aristanetworks/cloudvision-go/api/arista/dashboard.v1;dashboard";

import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
Expand Down
84 changes: 83 additions & 1 deletion arista/dashboard.v1/services.gen.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
syntax = "proto3";

package arista.dashboard.v1;
option go_package = "arista/resources/arista/dashboard.v1;dashboard";
option go_package = "github.com/aristanetworks/cloudvision-go/api/arista/dashboard.v1;dashboard";

import "arista/dashboard.v1/dashboard.proto";
import "arista/time/time.proto";
Expand All @@ -18,6 +18,20 @@ import "fmp/deletes.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";

message MetaResponse {
// Time holds the timestamp of the last item included in the metadata calculation.
google.protobuf.Timestamp time = 1;

// Operation indicates how the value in this response should be considered.
// Under non-subscribe requests, this value should always be INITIAL. In a subscription,
// once all initial data is streamed and the client begins to receive modification updates,
// you should not see INITIAL again.
arista.subscriptions.Operation type = 2;

// Count is the number of items present under the conditions of the request.
google.protobuf.UInt32Value count = 3;
};

message DashboardRequest {
// Key uniquely identifies a Dashboard instance to retrieve.
// This value must be populated.
Expand All @@ -40,6 +54,27 @@ message DashboardResponse {
google.protobuf.Timestamp time = 2;
};

message DashboardSomeRequest {
repeated DashboardKey keys = 1;

// Time indicates the time for which you are interested in the data.
// If no time is given, the server will use the time at which it makes the request.
google.protobuf.Timestamp time = 2;
};

message DashboardSomeResponse {
// Value is the value requested.
// This structure will be fully-populated as it exists in the datastore. If
// optional fields were not given at creation, these fields will be empty or
// set to default values.
Dashboard value = 1;

// Error is an optional field.
// It should be filled when there is an error in the GetSome process.
google.protobuf.StringValue error = 2;
google.protobuf.Timestamp time = 3;
};

message DashboardStreamRequest {
// PartialEqFilter provides a way to server-side filter a GetAll/Subscribe.
// This requires all provided fields to be equal to the response.
Expand Down Expand Up @@ -88,8 +123,11 @@ message DashboardStreamResponse {

service DashboardService {
rpc GetOne (DashboardRequest) returns (DashboardResponse);
rpc GetSome (DashboardSomeRequest) returns (stream DashboardSomeResponse);
rpc GetAll (DashboardStreamRequest) returns (stream DashboardStreamResponse);
rpc Subscribe (DashboardStreamRequest) returns (stream DashboardStreamResponse);
rpc GetMeta (DashboardStreamRequest) returns (MetaResponse);
rpc SubscribeMeta (DashboardStreamRequest) returns (stream MetaResponse);
}

message DashboardConfigRequest {
Expand All @@ -114,6 +152,27 @@ message DashboardConfigResponse {
google.protobuf.Timestamp time = 2;
};

message DashboardConfigSomeRequest {
repeated DashboardKey keys = 1;

// Time indicates the time for which you are interested in the data.
// If no time is given, the server will use the time at which it makes the request.
google.protobuf.Timestamp time = 2;
};

message DashboardConfigSomeResponse {
// Value is the value requested.
// This structure will be fully-populated as it exists in the datastore. If
// optional fields were not given at creation, these fields will be empty or
// set to default values.
DashboardConfig value = 1;

// Error is an optional field.
// It should be filled when there is an error in the GetSome process.
google.protobuf.StringValue error = 2;
google.protobuf.Timestamp time = 3;
};

message DashboardConfigStreamRequest {
// PartialEqFilter provides a way to server-side filter a GetAll/Subscribe.
// This requires all provided fields to be equal to the response.
Expand Down Expand Up @@ -210,11 +269,27 @@ message DashboardConfigDeleteResponse {
google.protobuf.Timestamp time = 2;
};

message DashboardConfigDeleteSomeRequest {
// key contains a list of DashboardConfig keys to delete
repeated DashboardKey keys = 1;
};

// DashboardConfigDeleteSomeResponse is only sent when there is an error.
message DashboardConfigDeleteSomeResponse {
DashboardKey key = 1;
string error = 2;
};

message DashboardConfigDeleteAllRequest {
// PartialEqFilter provides a way to server-side filter a DeleteAll.
// This requires all provided fields to be equal to the response.
// A filtered DeleteAll will use GetAll with filter to find things to delete.
repeated DashboardConfig partial_eq_filter = 1;
};

message DashboardConfigDeleteAllResponse {
// This describes the class of delete error.
// A DeleteAllResponse is only sent when there is an error.
fmp.DeleteError type = 1;
// This indicates the error message from the delete failure.
google.protobuf.StringValue error = 2;
Expand All @@ -226,11 +301,15 @@ message DashboardConfigDeleteAllResponse {

service DashboardConfigService {
rpc GetOne (DashboardConfigRequest) returns (DashboardConfigResponse);
rpc GetSome (DashboardConfigSomeRequest) returns (stream DashboardConfigSomeResponse);
rpc GetAll (DashboardConfigStreamRequest) returns (stream DashboardConfigStreamResponse);
rpc Subscribe (DashboardConfigStreamRequest) returns (stream DashboardConfigStreamResponse);
rpc GetMeta (DashboardConfigStreamRequest) returns (MetaResponse);
rpc SubscribeMeta (DashboardConfigStreamRequest) returns (stream MetaResponse);
rpc Set (DashboardConfigSetRequest) returns (DashboardConfigSetResponse);
rpc SetSome (DashboardConfigSetSomeRequest) returns (stream DashboardConfigSetSomeResponse);
rpc Delete (DashboardConfigDeleteRequest) returns (DashboardConfigDeleteResponse);
rpc DeleteSome (DashboardConfigDeleteSomeRequest) returns (stream DashboardConfigDeleteSomeResponse);
rpc DeleteAll (DashboardConfigDeleteAllRequest) returns (stream DashboardConfigDeleteAllResponse);
}

Expand Down Expand Up @@ -318,7 +397,10 @@ message GlobalDashboardConfigSetResponse {
service GlobalDashboardConfigService {
rpc GetOne (GlobalDashboardConfigRequest) returns (GlobalDashboardConfigResponse);

rpc GetAll (GlobalDashboardConfigStreamRequest) returns (stream GlobalDashboardConfigStreamResponse);
rpc Subscribe (GlobalDashboardConfigStreamRequest) returns (stream GlobalDashboardConfigStreamResponse);

rpc SubscribeMeta (GlobalDashboardConfigStreamRequest) returns (stream MetaResponse);
rpc Set (GlobalDashboardConfigSetRequest) returns (GlobalDashboardConfigSetResponse);


Expand Down
Loading

0 comments on commit 2ecf5fa

Please sign in to comment.