-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmessages.proto
182 lines (145 loc) · 3.69 KB
/
messages.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
syntax = "proto3";
package messages;
// The network control service definition.
service NetworkControl {
rpc Echo (EchoRequest) returns (EchoResponse) {}
rpc Ping (PingRequest) returns (PingResponse) {}
// OpenvSwitch RPC series
rpc CreateBridge (CreateBridgeRequest) returns(Response) {}
rpc DeleteBridge (DeleteBridgeRequest) returns(Response) {}
rpc AddPort (AddPortRequest) returns(Response) {}
rpc AddDPDKPort (AddPortRequest) returns(Response) {}
rpc GetPort (GetPortRequest) returns(GetPortResponse) {}
rpc SetPort (SetPortRequest) returns(Response) {}
rpc DeletePort (DeletePortRequest) returns(Response) {}
rpc AddFlow (AddFlowRequest) returns(Response) {}
rpc DeleteFlow (DeleteFlowRequest) returns(Response) {}
rpc DumpFlows (DumpFlowsRequest) returns(DumpFlowsResponse) {}
rpc DumpPorts (DumpPortsRequest) returns(DumpPortsResponse) {}
// Docker RPC series
rpc FindNetworkNamespacePath (FindNetworkNamespacePathRequest) returns(FindNetworkNamespacePathResponse) {}
// Netlink RPC series
rpc ConnectBridge (ConnectBridgeRequest) returns (Response) {}
rpc ConfigureIface (ConfigureIfaceRequest) returns (Response) {}
// Will be deprecated in the future
rpc AddRoute (AddRouteRequest) returns (Response) {}
rpc AddRoutesViaInterface (AddRoutesRequest) returns (Response) {}
rpc AddRoutesViaGateway (AddRoutesRequest) returns (Response) {}
}
message EchoRequest {
string word = 1;
}
message EchoResponse {
string word = 1;
}
message PingRequest {
string ping = 1;
}
message PingResponse {
string pong = 1;
}
message Response {
bool success = 1;
string reason = 2;
}
message CreateBridgeRequest {
string bridgeName = 1;
string datapathType = 2;
}
message DeleteBridgeRequest {
string bridgeName = 1;
}
message AddPortRequest {
string bridgeName = 1;
string ifaceName = 2;
// option message: only for dpdk usage
string dpdkDevargs = 3;
}
message PortOptions {
int32 tag = 1;
string VLANMode = 2;
repeated int32 trunk = 3;
}
message SetPortRequest {
string ifaceName = 1;
PortOptions options = 2;
}
message GetPortRequest {
string ifaceName = 1;
PortOptions portOptions = 2;
}
message GetPortResponse {
PortOptions portOptions = 1;
Response serverResponse = 2;
}
message DeletePortRequest {
string bridgeName = 1;
string ifaceName = 2;
}
message AddFlowRequest {
string bridgeName = 1;
string flowString = 2;
}
message DeleteFlowRequest {
string bridgeName = 1;
string flowString = 2;
}
message DumpFlowsRequest {
string bridgeName = 1;
}
message DumpFlowsResponse {
repeated bytes flows = 1;
Response serverResponse = 2;
}
message DumpPortsRequest {
string bridgeName = 1;
}
message PortStatistic{
uint64 byte = 1;
uint64 packets = 2;
uint64 dropped =3;
uint64 errors = 4;
}
message PortInfo {
int32 ID = 1;
string name = 2;
string macAddr = 3;
PortStatistic received =4;
PortStatistic transmitted =5;
}
message DumpPortsResponse {
repeated PortInfo ports =1;
Response serverResponse = 2;
}
message FindNetworkNamespacePathRequest {
string podName = 1;
string namespace = 2;
string podUUID = 3;
}
message FindNetworkNamespacePathResponse {
string path = 1;
Response serverResponse = 2;
}
message ConnectBridgeRequest {
string path = 1;
string podUUID = 2;
string containerVethName = 3;
string bridgeName = 4;
}
message ConfigureIfaceRequest {
string path = 1;
string CIDR = 2;
string containerVethName = 3;
}
message AddRouteRequest {
string path = 1;
string dstCIDR = 2;
string gwIP = 3;
string containerVethName = 4;
}
message AddRoutesRequest {
string path = 1;
string containerVethName = 2;
repeated string dstCIDRs = 3;
repeated string gwIPs = 4;
}