Newer
Older
syntax = "proto3";
import "google/api/annotations.proto";
//import "protoc-gen-openapiv2/options/annotations.proto";
import "google/protobuf/descriptor.proto";
import "github.com/openconfig/gnmi/proto/gnmi/gnmi.proto";
import "gosdn/transport/transport.proto";
import "gosdn/southbound/southbound.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
option go_package = "code.fbi.h-da.de/danet/api/go/gosdn/pnd";
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
title: "goSDN Northbound";
description: "Protocol Buffer specifications and Go code for the goSDN northbound Interface"
version: "0.1";
contact: {
name: "goSDN Northbound project";
url: "https://code.fbi.h-da.de/danet/api";
//email: "none@example.com";
};
license: {
name: "BSD 3-Clause License";
url: "https://code.fbi.h-da.de/danet/api/-/blob/master/LICENSE";
};
};
};
service PndService {
// Allows to request all Orchestrated Networking Devices which are managed by a
// specific Principal Network Domain.
rpc GetOndList(GetOndListRequest) returns (GetOndListResponse) {
option (google.api.http) = {
// Allows to request a specific Orchestrated Networking Device which is managed by a
// specific Principal Network Domain.
rpc GetOnd(GetOndRequest) returns (GetOndResponse) {
option (google.api.http) = {
get: "/pnds/{pid}/ond/{did}"
// Allows add multiple Orchestrated Networking Devices to be managed by a
// specific Principal Network Domain.
rpc SetOndList(SetOndListRequest) returns (SetOndListResponse) {
option (google.api.http) = {
body: "*"
};
}
// Allows to request all Southbound Interfaces a specific Principal Network
// Domain supports.
rpc GetSbiList(GetSbiListRequest) returns (GetSbiListResponse) {
option (google.api.http) = {
// Allows to request a specific Southbound Interfaces a specific Principal Network
// Domain supports.
rpc GetSbi(GetSbiRequest) returns (GetSbiResponse) {
option (google.api.http) = {
get: "/pnds/{pid}/sbis/{sid}"
// Allows to add multiple specific Southbound Interfaces a specific Principal Network
// Domain supports.
rpc SetSbiList(SetSbiListRequest) returns (SetSbiListResponse) {
option (google.api.http) = {
body: "*"
};
}
// Allows to request all Changes registered for a specific Principal Network Domain.
rpc GetChangeList(GetChangeListRequest) returns (GetChangeListResponse) {
option (google.api.http) = {
// Allows to request a specific Change registered for a specific Principal Network Domain.
rpc GetChange(GetChangeRequest) returns (GetChangeResponse) {
option (google.api.http) = {
get: "/pnds/{pid}/changes/{cuid}"
// Allows to operate on multiple Changes registered for a specific Principal Network Domain.
rpc SetChangeList(SetChangeListRequest) returns (SetChangeListResponse) {
option (google.api.http) = {
body: "*"
};
}
// Allows to request a specific Path of a Orchestrated Networking Device,
// managed by a specific Principal Network Domain.
rpc GetPath(GetPathRequest) returns (GetPathResponse) {
option (google.api.http) = {
get: "/pnds/{pid}/onds/{did}/paths/{path}"
// Allows to set a specific Path of a Orchestrated Networking Device,
// managed by a specific Principal Network Domain.
rpc SetPathList(SetPathListRequest) returns (SetPathListResponse) {
option (google.api.http) = {
post: "/pnds/{pid}/onds/{did}/paths"
body: "*"
};
}
// Allows to delete a specific Orchestrated Networking Device which is managed by a
// specific Principal Network Domain.
rpc DeleteOnd(DeleteOndRequest) returns (DeleteOndResponse) {
option (google.api.http) = {
delete: "/pnds/{pid}/onds/{did}"
};
}
}
message GetOndListRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
string pid = 4;
}
message GetOndRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
string pid = 4;
}
message GetSbiListRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
string pid = 4;
}
message GetSbiRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
string sid = 3;
string pid = 4;
}
message GetChangeListRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
string pid = 4;
}
message GetChangeRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
string cuid = 3;
string pid = 4;
}
message GetPathRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
string did = 2;
string path = 3;
string pid = 4;
}
message GetOndResponse {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
// TODO: Check if this is really needed. Perhaps a reference to the PND's ID
// is also sufficient.
PrincipalNetworkDomain pnd = 2;
repeated OrchestratedNetworkingDevice ond = 3;
}
message GetOndListResponse {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
// TODO: Check if this is really needed. Perhaps a reference to the PND's ID
// is also sufficient.
PrincipalNetworkDomain pnd = 2;
repeated OrchestratedNetworkingDevice ond = 3;
}
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
// is also sufficient.
PrincipalNetworkDomain pnd = 2;
.gosdn.southbound.SouthboundInterface sbi = 3;
}
message GetSbiListResponse {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
// TODO: Check if this is really needed. Perhaps a reference to the PND's ID
// is also sufficient.
PrincipalNetworkDomain pnd = 2;
repeated .gosdn.southbound.SouthboundInterface sbi = 3;
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
}
message GetPathResponse {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
// TODO: Check if this is really needed. Perhaps a reference to the PND's ID
// is also sufficient.
PrincipalNetworkDomain pnd = 2;
repeated gnmi.Notification device = 3;
}
message GetChangeResponse {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
// TODO: Check if this is really needed. Perhaps a reference to the PND's ID
// is also sufficient.
PrincipalNetworkDomain pnd = 2;
Change change = 3;
}
message GetChangeListResponse {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
// TODO: Check if this is really needed. Perhaps a reference to the PND's ID
// is also sufficient.
PrincipalNetworkDomain pnd = 2;
repeated Change change = 3;
}
message PrincipalNetworkDomain {
string id = 1;
string name = 2;
string description = 3;
}
message OrchestratedNetworkingDevice {
string id = 1;
string name = 2;
repeated gnmi.Notification device = 3;
.gosdn.southbound.SouthboundInterface sbi = 4;
enum ChangeState {
CHANGE_STATE_UNSPECIFIED = 0;
CHANGE_STATE_PENDING = 1;
CHANGE_STATE_COMMITTED = 2;
CHANGE_STATE_CONFIRMED = 3;
CHANGE_STATE_INCONSISTENT = 4;
message Change {
string id = 1;
int64 age = 2;
}
message SetOndListRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
repeated SetOnd ond = 2;
string pid = 3;
}
message SetSbiListRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
repeated SetSbi sbi = 2;
string pid = 3;
}
message SetChangeListRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
repeated SetChange change = 2;
string pid = 3;
}
message SetPathListRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
repeated ChangeRequest change_request = 2;
string did = 3;
string pid = 4;
}
//TODO: rename
message ChangeRequest {
string path = 1;
string value = 2;
ApiOperation api_op = 3;
}
enum ApiOperation {
API_OPERATION_UNSPECIFIED = 0;
API_OPERATION_UPDATE = 1;
API_OPERATION_REPLACE = 2;
API_OPERATION_DELETE = 3;
}
message SetOnd {
string address = 1;
.gosdn.southbound.SouthboundInterface sbi = 2;
string device_name = 3;
.gosdn.transport.TransportOption transport_option = 4;
}
message SetSbi {
}
enum Operation {
OPERATION_UNSPECIFIED = 0;
OPERATION_CREATE = 1;
OPERATION_COMMIT = 2;
OPERATION_CONFIRM = 3;
}
message SetChange {
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
string cuid = 1;
Operation op = 2;
}
message SetResponse{
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
Status status = 2;
}
message SetOndListResponse{
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
Status status = 2;
repeated SetResponse responses = 3;
}
message SetChangeListResponse{
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
Status status = 2;
repeated SetResponse responses = 3;
}
message SetChangeResponse{
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
Status status = 2;
}
message SetSbiListResponse{
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
Status status = 2;
repeated SetResponse responses = 3;
}
message SetPathListResponse{
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
Status status = 2;
repeated SetResponse responses = 3;
}
message DeleteOndRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
string pid = 4;
string did = 5;
}
message DeleteOndResponse {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
Status status = 2;
}
enum Status {
STATUS_UNSPECIFIED = 0;
STATUS_OK = 1;
STATUS_ERROR = 2;