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