Newer
Older
//Example of topology
syntax = "proto3";
package service;
import "context.proto";
service ServiceService {
rpc GetServiceList (context.Empty) returns (ServiceList) {}
rpc CreateService (Service) returns (ServiceId) {}
rpc UpdateService (Service) returns (ServiceId) {}
rpc DeleteService (Service) returns (ServiceId) {}
rpc GetServiceById (ServiceId) returns (Service) {}
rpc GetConnectionList (context.Empty) returns (ConnectionList) {}
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
}
message ServiceList {
repeated Service cs = 1;
}
message Service {
ServiceId cs_id = 1;
ServiceType serviceType = 2;
repeated context.EndPointId endpointList = 3;
repeated context.Constraint constraint = 4;
ServiceState serviceState = 5;
ServiceConfig serviceConfig = 6;
}
enum ServiceType {
UNKNOWN = 0;
L3NM = 1;
L2NM = 2;
TAPI_CONNECTIVITY_SERVICE = 3;
}
message ServiceConfig {
string serviceConfig = 1;
}
message ServiceId {
context.Uuid cs_id = 1;
}
message ServiceIdList {
repeated ServiceId serviceIdList = 1;
}
message ServiceState {
ServiceStateEnum serviceState = 1;
}
enum ServiceStateEnum {
PLANNED = 0;
ACTIVE = 1;
PENDING_REMOVAL = 2;
}
message ConnectionList {
repeated Connection connectionList = 1;
}
message Connection {
ConnectionId con_id = 1;
ServiceId relatedServiceId = 2;
repeated context.EndPointId path = 3;
}
message ConnectionId {
context.Uuid con_id = 1;
}