Skip to content
Snippets Groups Projects
Commit 856f3daa authored by Malte Bauch's avatar Malte Bauch
Browse files

added missing annotations

parent 71412e16
No related branches found
No related tags found
No related merge requests found
......@@ -18,17 +18,20 @@ service core {
get: "/v1/pnd"
};
}
rpc SetPnd(SetPndRequest) returns (SetPndResponse);
rpc SetPnd(SetPndRequest) returns (SetPndResponse) {
option (google.api.http) = {
post: "/v1/pnd"
body: "*"
};
}
}
message GetPndListRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
}
message GetPndRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
bool all = 2;
repeated string pid = 3;
}
......
......@@ -13,43 +13,71 @@ option go_package = "code.fbi.h-da.de/danet/api/go/gosdn/pnd";
service pnd {
// Allows to request Orchestrated Networking Devices which are managed by a
// specific Principal Network Domain.
rpc GetOndList(GetOndListRequest) returns (GetOndResponse) {
option (google.api.http) = {
get: "/v1/pnd/{pid}/ond"
};
}
rpc GetOnd(GetOndRequest) returns (GetOndResponse) {
option (google.api.http) = {
get: "/v1/pnd/{pid}/ond/{did}"
};
}
rpc GetOndList(GetOndListRequest) returns (GetOndResponse) {
rpc SetOnd(SetOndRequest) returns (SetResponse) {
option (google.api.http) = {
get: "/v1/pnd/{pid}/ond"
post: "/v1/pnd/{pid}/ond"
body: "*"
};
}
// Allows to request the Southbound Interfaces a specific Principal Network
// Domain supports.
rpc GetSbiList(GetSbiListRequest) returns (GetSbiResponse) {
option (google.api.http) = {
get: "/v1/pnd/{pid}/sbi"
};
}
rpc GetSbi(GetSbiRequest) returns (GetSbiResponse) {
option (google.api.http) = {
get: "/v1/pnd/{pid}/sbi/{sid}"
};
}
rpc GetSbiList(GetSbiListRequest) returns (GetSbiResponse) {
rpc SetSbi(SetSbiRequest) returns (SetResponse) {
option (google.api.http) = {
get: "/v1/pnd/{pid}/sbi"
post: "/v1/pnd/{pid}/sbi"
body: "*"
};
}
// Allows to request Changes registered for a specific Principal Network Domain.
rpc GetChangeList(GetChangeListRequest) returns (GetChangeResponse) {
option (google.api.http) = {
get: "/v1/pnd/{pid}/change"
};
}
rpc GetChange(GetChangeRequest) returns (GetChangeResponse) {
option (google.api.http) = {
get: "/v1/pnd/{pid}/change/{cuid}"
};
}
rpc GetChangeList(GetSbiListRequest) returns (GetChangeResponse) {
rpc SetChange(SetChangeRequest) returns (SetResponse) {
option (google.api.http) = {
get: "/v1/pnd/{pid}/change"
post: "/v1/pnd/{pid}/change"
body: "*"
};
}
// Allows to request a specific Path of a Orchestrated Networking Device,
// managed by a specific Principal Network Domain.
rpc GetPath(GetPathRequest) returns (GetPathResponse);
rpc Set(SetRequest) returns (SetResponse);
rpc GetPath(GetPathRequest) returns (GetPathResponse) {
option (google.api.http) = {
get: "/v1/pnd/{pid}/ond/{did}/change"
body: "*"
};
}
rpc SetPath(SetPathRequest) returns (SetResponse) {
option (google.api.http) = {
set: "/v1/pnd/{pid}/ond/{did}/change"
body: "*"
};
}
rpc Delete(DeleteRequest) returns (DeleteResponse);
}
......@@ -60,7 +88,6 @@ message GetOndListRequest {
message GetOndRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
bool all = 2;
repeated string did = 3;
string pid = 4;
}
......@@ -69,10 +96,8 @@ message GetSbiListRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
string pid = 4;
}
message GetSbiRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
bool all = 2;
repeated string sid = 3;
string pid = 4;
}
......@@ -84,7 +109,6 @@ message GetChangeListRequest {
message GetChangeRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
bool all = 2;
repeated string cuid = 3;
string pid = 4;
}
......@@ -104,14 +128,6 @@ message GetOndResponse {
repeated OrchestratedNetworkingDevice ond = 3;
}
message GetResponse {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
PrincipalNetworkDomain pnd = 2;
repeated OrchestratedNetworkingDevice ond = 3;
repeated .gosdn.southbound.SouthboundInterface sbi = 5;
repeated Change change = 7;
}
message GetSbiResponse {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
// TODO: Check if this is really needed. Perhaps a reference to the PND's ID
......@@ -125,7 +141,7 @@ message GetPathResponse {
// TODO: Check if this is really needed. Perhaps a reference to the PND's ID
// is also sufficient.
PrincipalNetworkDomain pnd = 2;
Change change = 3;
repeated gnmi.Notification device = 3;
}
message GetChangeResponse {
......@@ -161,13 +177,28 @@ message Change {
State state = 3;
}
message SetRequest {
message SetOndRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
repeated setOnd ond = 2;
repeated setSbi sbi = 3;
repeated setChange change = 4;
repeated ChangeRequest changeRequest = 5;
string pid = 6;
string pid = 3;
}
message SetSbiRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
repeated setSbi sbi = 2;
string pid = 3;
}
message SetChangeRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
repeated setChange change = 2;
string pid = 3;
}
message SetPathRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
repeated ChangeRequest changeRequest = 2;
string pid = 3;
}
message setOnd {
......@@ -178,7 +209,6 @@ message setOnd {
}
message setSbi {
}
message setChange {
......@@ -191,6 +221,19 @@ message setChange {
Operation op = 2;
}
//TODO: rename
message ChangeRequest {
enum ApiOperation {
UPDATE = 0;
REPLACE = 1;
DELETE = 2;
}
string id = 1;
string path = 2;
string value = 3;
ApiOperation apiOp = 4;
}
message SetResponse{
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
enum status {
......@@ -201,19 +244,6 @@ message SetResponse{
repeated SetResponse responses = 3;
}
message ChangeRequest {
string id = 1;
string path = 2;
string value = 3;
ApiOperation apiOp = 4;
}
enum ApiOperation {
UPDATE = 0;
REPLACE = 1;
DELETE = 2;
}
message DeleteRequest {
enum Type {
OND = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment