blob: 3bfb9efd4a2faf575240d47785a6500bc73c4341 [file] [log] [blame]
Zsolt Haraszti7eeb2b32016-11-06 14:04:55 -08001/*
2 * Top-level Voltha API definition
3 *
4 * For details, see individual definition files.
5 */
6
Zsolt Harasztia54f2ac2016-09-21 15:54:15 -07007syntax = "proto3";
8
Stephane Barbarie35595062018-02-08 08:34:39 -05009option go_package = "github.com/opencord/voltha/protos/go/voltha";
10
Zsolt Harasztia54f2ac2016-09-21 15:54:15 -070011package voltha;
12
Zsolt Harasztidafefe12016-11-14 21:29:58 -080013import "google/protobuf/empty.proto";
Khen Nursimulud068d812017-03-06 11:44:18 -050014import "google/protobuf/any.proto";
Zsolt Harasztidafefe12016-11-14 21:29:58 -080015import "google/api/annotations.proto";
16
Khen Nursimulu7626ce12016-12-21 11:51:46 -050017import "yang_options.proto";
18
Zsolt Harasztidafefe12016-11-14 21:29:58 -080019import public "meta.proto";
Zsolt Haraszti7eeb2b32016-11-06 14:04:55 -080020import public "common.proto";
21import public "health.proto";
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080022import public "logical_device.proto";
23import public "device.proto";
Zsolt Haraszti7eeb2b32016-11-06 14:04:55 -080024import public "adapter.proto";
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080025import public "openflow_13.proto";
Nikolay Titov89004ec2017-06-19 18:22:42 -040026import "bbf_fiber.proto";
27import "bbf_fiber_base.proto";
Nikolay Titov3b31db92017-08-02 18:11:33 -040028import "bbf_fiber_gemport_body.proto";
29import "bbf_fiber_multicast_distribution_set_body.proto";
30import "bbf_fiber_multicast_gemport_body.proto";
31import "bbf_fiber_tcont_body.proto";
32import "bbf_fiber_traffic_descriptor_profile_body.proto";
Chip Bolingc7d3e2d2018-04-06 10:16:29 -050033import "omci_mib_db.proto";
jasonhuang5f3e63b2018-07-27 01:32:48 +080034import "omci_alarm_db.proto";
Nikolay Titov3b31db92017-08-02 18:11:33 -040035
Zsolt Harasztia54f2ac2016-09-21 15:54:15 -070036
37option java_package = "org.opencord.voltha";
38option java_outer_classname = "VolthaProtos";
39option csharp_namespace = "Opencord.Voltha.Voltha";
Zsolt Harasztidafefe12016-11-14 21:29:58 -080040
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080041message DeviceGroup {
42
43 string id = 1 [(access) = READ_ONLY];
44
45 repeated LogicalDevice logical_devices = 2 [(child_node) = {key: "id"}];
46
47 repeated Device devices = 3 [(child_node) = {key: "id"}];
48}
49
50message DeviceGroups {
51 repeated DeviceGroup items = 1;
52}
53
Stephane Barbarie4db8ca22017-04-24 10:30:20 -040054
55message AlarmFilterRuleKey {
khenaidoo4cad2682017-06-12 21:42:39 -040056 option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
Jonathan Hart8d21c322018-04-17 07:42:02 -070057
Stephane Barbarie4db8ca22017-04-24 10:30:20 -040058 enum AlarmFilterRuleKey {
59 id = 0;
60 type = 1;
61 severity = 2;
62 resource_id = 3;
63 category = 4;
64 device_id = 5;
65 }
66}
67
68message AlarmFilterRule {
69 AlarmFilterRuleKey.AlarmFilterRuleKey key = 1;
70 string value = 2;
71}
72message AlarmFilter {
73 string id = 1 [(access) = READ_ONLY];
74
75 repeated AlarmFilterRule rules = 2;
76}
77
78message AlarmFilters {
79 repeated AlarmFilter filters = 1;
80}
81
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080082// Top-level (root) node for a Voltha Instance
83message VolthaInstance {
Khen Nursimulu7626ce12016-12-21 11:51:46 -050084 option (yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
Zsolt Harasztidafefe12016-11-14 21:29:58 -080085
86 string instance_id = 1 [(access) = READ_ONLY];
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080087
Zsolt Harasztidafefe12016-11-14 21:29:58 -080088 string version = 2 [(access) = READ_ONLY];
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080089
Zsolt Haraszti66862032016-11-28 14:28:39 -080090 LogLevel.LogLevel log_level = 3;
Zsolt Harasztidafefe12016-11-14 21:29:58 -080091
92 HealthStatus health = 10 [(child_node) = {}];
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080093
94 repeated Adapter adapters = 11 [(child_node) = {key: "id" }];
95
96 repeated LogicalDevice logical_devices = 12 [(child_node) = {key: "id"}];
97
98 repeated Device devices = 13 [(child_node) = {key: "id"}];
99
100 repeated DeviceType device_types = 14 [(child_node) = {key: "id"}];
101
102 repeated DeviceGroup device_groups = 15 [(child_node) = {key: "id"}];
Stephane Barbarie4db8ca22017-04-24 10:30:20 -0400103
104 repeated AlarmFilter alarm_filters = 16 [(child_node) = {key: "id"}];
Nikolay Titov89004ec2017-06-19 18:22:42 -0400105
Nikolay Titov3b31db92017-08-02 18:11:33 -0400106 repeated bbf_fiber.ChannelgroupConfig channel_groups = 17
107 [(child_node) = {key: "name"}];
Nikolay Titov89004ec2017-06-19 18:22:42 -0400108
Nikolay Titov3b31db92017-08-02 18:11:33 -0400109 repeated bbf_fiber.ChannelpartitionConfig channel_partitions = 18
110 [(child_node) = {key: "name"}];
Nikolay Titov89004ec2017-06-19 18:22:42 -0400111
Nikolay Titov3b31db92017-08-02 18:11:33 -0400112 repeated bbf_fiber.ChannelpairConfig channel_pairs = 19
113 [(child_node) = {key: "name"}];
Nikolay Titov89004ec2017-06-19 18:22:42 -0400114
Nikolay Titov3b31db92017-08-02 18:11:33 -0400115 repeated bbf_fiber.OntaniConfig ont_anis = 20
116 [(child_node) = {key: "name"}];
Nikolay Titov89004ec2017-06-19 18:22:42 -0400117
Nikolay Titov3b31db92017-08-02 18:11:33 -0400118 repeated bbf_fiber.VOntaniConfig v_ont_anis = 21
119 [(child_node) = {key: "name"}];
Nikolay Titov89004ec2017-06-19 18:22:42 -0400120
Nikolay Titov3b31db92017-08-02 18:11:33 -0400121 repeated bbf_fiber.VEnetConfig v_enets = 22
122 [(child_node) = {key: "name"}];
123
124 repeated
125 bbf_fiber.TrafficDescriptorProfileData traffic_descriptor_profiles = 23
126 [(child_node) = {key: "name"}];
127
128 repeated bbf_fiber.TcontsConfigData tconts = 24
129 [(child_node) = {key: "name"}];
130
131 repeated bbf_fiber.GemportsConfigData gemports = 25
132 [(child_node) = {key: "name"}];
133
134 repeated bbf_fiber.MulticastGemportsConfigData multicast_gemports = 26
135 [(child_node) = {key: "name"}];
136
137 repeated
138 bbf_fiber.MulticastDistributionSetData multicast_distibution_sets = 27
139 [(child_node) = {key: "name"}];
Chip Bolingc7d3e2d2018-04-06 10:16:29 -0500140
141 repeated
142 omci.MibDeviceData omci_mibs = 28
143 [(child_node) = {key: "device_id"}];
jasonhuang5f3e63b2018-07-27 01:32:48 +0800144
145 repeated
146 alarm.AlarmDeviceData omci_alarms = 29
147 [(child_node) = {key: "device_id"}];
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800148}
149
150message VolthaInstances {
Khen Nursimulu7626ce12016-12-21 11:51:46 -0500151 option (yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800152 repeated string items = 1;
153}
154
155// Voltha representing the entire Voltha cluster
156message Voltha {
Khen Nursimulu7626ce12016-12-21 11:51:46 -0500157 option (yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800158
159 string version = 1 [(access) = READ_ONLY];
160
Zsolt Haraszti66862032016-11-28 14:28:39 -0800161 LogLevel.LogLevel log_level = 2;
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800162
163 repeated VolthaInstance instances = 3 [(child_node) = {key: "instance_id"}];
164
165 repeated Adapter adapters = 11 [(child_node) = {key: "id"}];
166
167 repeated LogicalDevice logical_devices = 12 [(child_node) = {key: "id"}];
168
169 repeated Device devices = 13 [(child_node) = {key: "id"}];
170
171 repeated DeviceGroup device_groups = 15 [(child_node) = {key: "id"}];
Zsolt Harasztidafefe12016-11-14 21:29:58 -0800172
Nikolay Titov3b31db92017-08-02 18:11:33 -0400173 repeated bbf_fiber.ChannelgroupConfig channel_groups = 16
174 [(child_node) = {key: "name"}];
Nikolay Titov89004ec2017-06-19 18:22:42 -0400175
Nikolay Titov3b31db92017-08-02 18:11:33 -0400176 repeated bbf_fiber.ChannelpartitionConfig channel_partitions = 17
177 [(child_node) = {key: "name"}];
Nikolay Titov89004ec2017-06-19 18:22:42 -0400178
Nikolay Titov3b31db92017-08-02 18:11:33 -0400179 repeated bbf_fiber.ChannelpairConfig channel_pairs = 18
180 [(child_node) = {key: "name"}];
Nikolay Titov89004ec2017-06-19 18:22:42 -0400181
Nikolay Titov3b31db92017-08-02 18:11:33 -0400182 repeated bbf_fiber.OntaniConfig ont_anis = 19
183 [(child_node) = {key: "name"}];
Nikolay Titov89004ec2017-06-19 18:22:42 -0400184
Nikolay Titov3b31db92017-08-02 18:11:33 -0400185 repeated bbf_fiber.VOntaniConfig v_ont_anis = 20
186 [(child_node) = {key: "name"}];
Nikolay Titov89004ec2017-06-19 18:22:42 -0400187
Nikolay Titov3b31db92017-08-02 18:11:33 -0400188 repeated bbf_fiber.VEnetConfig v_enets = 21
189 [(child_node) = {key: "name"}];
190
191 repeated
192 bbf_fiber.TrafficDescriptorProfileData traffic_descriptor_profiles = 23
193 [(child_node) = {key: "name"}];
194
195 repeated bbf_fiber.TcontsConfigData tconts = 24
196 [(child_node) = {key: "name"}];
197
198 repeated bbf_fiber.GemportsConfigData gemports = 25
199 [(child_node) = {key: "name"}];
200
201 repeated bbf_fiber.MulticastGemportsConfigData multicast_gemports = 26
202 [(child_node) = {key: "name"}];
203
204 repeated
205 bbf_fiber.MulticastDistributionSetData multicast_distibution_sets = 27
206 [(child_node) = {key: "name"}];
Chip Bolingc7d3e2d2018-04-06 10:16:29 -0500207
208 repeated
209 omci.MibDeviceData omci_mib_database = 28
210 [(child_node) = {key: "device_id"}];
jasonhuang5f3e63b2018-07-27 01:32:48 +0800211
212 repeated
213 alarm.AlarmDeviceData omci_alarm_database = 29
214 [(child_node) = {key: "device_id"}];
Zsolt Harasztidafefe12016-11-14 21:29:58 -0800215}
216
sathishg5ae86222017-06-28 15:16:29 +0530217// Device Self Test Response
218message SelfTestResponse {
219 option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
220
221 enum SelfTestResult {
222 SUCCESS = 0;
223 FAILURE = 1;
224 NOT_SUPPORTED = 2;
225 UNKNOWN_ERROR = 3;
226 }
227 SelfTestResult result = 1;
228}
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800229
Stephane Barbarie2940dac2017-08-18 14:15:17 -0400230message OfAgentSubscriber {
231 // ID of ofagent instance
232 string ofagent_id = 1;
233
234 // ID of voltha instance to which the ofagent is subscribed
235 string voltha_id = 2;
236}
237
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800238/*
239 * Cluster-wide Voltha APIs
240 *
241 * These APIs are potentially dispatched to the leader of the Voltha cluster,
242 * to a specific Voltha instance which owns the given device or logical device.
243 *
244 */
245service VolthaGlobalService {
Zsolt Harasztidafefe12016-11-14 21:29:58 -0800246
Zsolt Haraszti66862032016-11-28 14:28:39 -0800247 // Get high level information on the Voltha cluster
Zsolt Harasztidafefe12016-11-14 21:29:58 -0800248 rpc GetVoltha(google.protobuf.Empty) returns(Voltha) {
249 option (google.api.http) = {
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800250 get: "/api/v1"
Zsolt Harasztidafefe12016-11-14 21:29:58 -0800251 };
252 }
253
Zsolt Haraszti66862032016-11-28 14:28:39 -0800254 // List all Voltha cluster instances
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800255 rpc ListVolthaInstances(google.protobuf.Empty) returns(VolthaInstances) {
256 option (google.api.http) = {
257 get: "/api/v1/instances"
258 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -0500259 option (voltha.yang_xml_tag).xml_tag = 'items';
260 option (voltha.yang_xml_tag).list_items_name = 'items';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800261 }
262
Zsolt Haraszti66862032016-11-28 14:28:39 -0800263 // Get details on a Voltha cluster instance
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800264 rpc GetVolthaInstance(ID) returns(VolthaInstance) {
265 option (google.api.http) = {
266 get: "/api/v1/instances/{id}"
267 };
268 }
269
khenaidoo997edbc2017-07-13 10:25:58 -0400270 // List all active adapters (plugins) in the Voltha cluster
271 rpc ListAdapters(google.protobuf.Empty) returns(Adapters) {
272 option (google.api.http) = {
273 get: "/api/v1/adapters"
274 };
275 option (voltha.yang_xml_tag).xml_tag = 'adapters';
276 }
277
278
Zsolt Haraszti66862032016-11-28 14:28:39 -0800279 // List all logical devices managed by the Voltha cluster
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800280 rpc ListLogicalDevices(google.protobuf.Empty) returns(LogicalDevices) {
281 option (google.api.http) = {
282 get: "/api/v1/logical_devices"
283 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -0500284 option (voltha.yang_xml_tag).xml_tag = 'logical_devices';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800285 }
286
Nicolas Palpacuer75ba77f2018-08-27 17:26:57 -0400287 // List all reachable logical devices managed by the Voltha cluster
288 rpc ListReachableLogicalDevices(google.protobuf.Empty) returns
289 (LogicalDevices) {
290 option (google.api.http) = {
291 get: "/api/v1/reachable_logical_devices"
292 };
293 }
294
Zsolt Haraszti66862032016-11-28 14:28:39 -0800295 // Get additional information on a given logical device
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800296 rpc GetLogicalDevice(ID) returns(LogicalDevice) {
297 option (google.api.http) = {
298 get: "/api/v1/logical_devices/{id}"
299 };
300 }
301
302 // List ports of a logical device
303 rpc ListLogicalDevicePorts(ID) returns(LogicalPorts) {
304 option (google.api.http) = {
305 get: "/api/v1/logical_devices/{id}/ports"
306 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -0500307 option (voltha.yang_xml_tag).xml_tag = 'ports';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800308 }
309
Jonathan Hart8d21c322018-04-17 07:42:02 -0700310 // Gets a logical device port
311 rpc GetLogicalDevicePort(LogicalPortId) returns(LogicalPort) {
312 option (google.api.http) = {
313 get: "/api/v1/logical_devices/{id}/ports/{port_id}"
314 };
315 option (voltha.yang_xml_tag).xml_tag = 'port';
316 }
317
318 // Enables a logical device port
319 rpc EnableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
320 option (google.api.http) = {
321 post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable"
322 };
323 }
324
325 // Disables a logical device port
326 rpc DisableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
327 option (google.api.http) = {
328 post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable"
329 };
330 }
331
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800332 // List all flows of a logical device
333 rpc ListLogicalDeviceFlows(ID) returns(openflow_13.Flows) {
334 option (google.api.http) = {
335 get: "/api/v1/logical_devices/{id}/flows"
336 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -0500337 option (voltha.yang_xml_tag).xml_tag = 'flows';
338 option (voltha.yang_xml_tag).list_items_name = 'items';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800339 }
340
Zsolt Haraszti66862032016-11-28 14:28:39 -0800341 // Update flow table for logical device
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800342 rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate)
343 returns(google.protobuf.Empty) {
344 option (google.api.http) = {
345 post: "/api/v1/logical_devices/{id}/flows"
346 body: "*"
347 };
348 }
349
Koray Kokten8592a232018-08-27 07:41:14 +0000350 // Update meter table for logical device
351 rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate)
352 returns(google.protobuf.Empty) {
353 option (google.api.http) = {
354 post: "/api/v1/logical_devices/{id}/meters"
355 body: "*"
356 };
357 }
358
Gamze Abaka53cc0a22019-01-31 12:06:11 +0000359 // List all meters of a logical device
360 rpc ListLogicalDeviceMeters(ID) returns (openflow_13.Meters) {
Koray Kokten8592a232018-08-27 07:41:14 +0000361 option (google.api.http) = {
Gamze Abaka53cc0a22019-01-31 12:06:11 +0000362 get: "/api/v1/logical_devices/{id}/meters"
Koray Kokten8592a232018-08-27 07:41:14 +0000363 };
Gamze Abaka53cc0a22019-01-31 12:06:11 +0000364 option (voltha.yang_xml_tag).xml_tag = 'meters';
365 option (voltha.yang_xml_tag).list_items_name = 'items';
Koray Kokten8592a232018-08-27 07:41:14 +0000366 }
367
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800368 // List all flow groups of a logical device
369 rpc ListLogicalDeviceFlowGroups(ID) returns(openflow_13.FlowGroups) {
370 option (google.api.http) = {
371 get: "/api/v1/logical_devices/{id}/flow_groups"
372 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -0500373 option (voltha.yang_xml_tag).xml_tag = 'flow_groups';
374 option (voltha.yang_xml_tag).list_items_name = 'items';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800375 }
376
377 // Update group table for device
378 rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate)
379 returns(google.protobuf.Empty) {
380 option (google.api.http) = {
381 post: "/api/v1/logical_devices/{id}/flow_groups"
382 body: "*"
383 };
384 }
385
Zsolt Haraszti66862032016-11-28 14:28:39 -0800386 // List all physical devices controlled by the Voltha cluster
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800387 rpc ListDevices(google.protobuf.Empty) returns(Devices) {
388 option (google.api.http) = {
389 get: "/api/v1/devices"
390 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -0500391 option (voltha.yang_xml_tag).xml_tag = 'devices';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800392 }
393
Zsolt Haraszti66862032016-11-28 14:28:39 -0800394 // Get more information on a given physical device
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800395 rpc GetDevice(ID) returns(Device) {
396 option (google.api.http) = {
397 get: "/api/v1/devices/{id}"
398 };
399 }
400
Zsolt Haraszti66862032016-11-28 14:28:39 -0800401 // Pre-provision a new physical device
402 rpc CreateDevice(Device) returns(Device) {
403 option (google.api.http) = {
404 post: "/api/v1/devices"
405 body: "*"
406 };
407 }
408
Khen Nursimulud068d812017-03-06 11:44:18 -0500409 // Enable a device. If the device was in pre-provisioned state then it
Jonathan Hart8d21c322018-04-17 07:42:02 -0700410 // will transition to ENABLED state. If it was is DISABLED state then it
411 // will transition to ENABLED state as well.
Khen Nursimulud068d812017-03-06 11:44:18 -0500412 rpc EnableDevice(ID) returns(google.protobuf.Empty) {
Zsolt Haraszti66862032016-11-28 14:28:39 -0800413 option (google.api.http) = {
Khen Nursimulud068d812017-03-06 11:44:18 -0500414 post: "/api/v1/devices/{id}/enable"
415 };
416 }
417
418 // Disable a device
419 rpc DisableDevice(ID) returns(google.protobuf.Empty) {
420 option (google.api.http) = {
421 post: "/api/v1/devices/{id}/disable"
422 };
423 }
424
425 // Reboot a device
426 rpc RebootDevice(ID) returns(google.protobuf.Empty) {
427 option (google.api.http) = {
428 post: "/api/v1/devices/{id}/reboot"
429 };
430 }
431
432 // Delete a device
433 rpc DeleteDevice(ID) returns(google.protobuf.Empty) {
434 option (google.api.http) = {
435 delete: "/api/v1/devices/{id}/delete"
Zsolt Haraszti66862032016-11-28 14:28:39 -0800436 };
437 }
438
Lydia Fang01f2e852017-06-28 17:24:58 -0700439 // Request an image download to the standby partition
440 // of a device.
441 // Note that the call is expected to be non-blocking.
442 rpc DownloadImage(ImageDownload) returns(OperationResp) {
443 option (google.api.http) = {
444 post: "/api/v1/devices/{id}/image_downloads/{name}"
445 body: "*"
446 };
447 }
448
449 // Get image download status on a device
450 // The request retrieves progress on device and updates db record
451 rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {
452 option (google.api.http) = {
453 get: "/api/v1/devices/{id}/image_downloads/{name}/status"
454 };
455 }
456
457 // Get image download db record
458 rpc GetImageDownload(ImageDownload) returns(ImageDownload) {
459 option (google.api.http) = {
460 get: "/api/v1/devices/{id}/image_downloads/{name}"
461 };
462 }
463
464 // List image download db records for a given device
465 rpc ListImageDownloads(ID) returns(ImageDownloads) {
466 option (google.api.http) = {
467 get: "/api/v1/devices/{id}/image_downloads"
468 };
469 }
470
471 // Cancel an existing image download process on a device
472 rpc CancelImageDownload(ImageDownload) returns(OperationResp) {
473 option (google.api.http) = {
474 delete: "/api/v1/devices/{id}/image_downloads/{name}"
475 };
476 }
477
478 // Activate the specified image at a standby partition
479 // to active partition.
480 // Depending on the device implementation, this call
481 // may or may not cause device reboot.
482 // If no reboot, then a reboot is required to make the
483 // activated image running on device
484 // Note that the call is expected to be non-blocking.
485 rpc ActivateImageUpdate(ImageDownload) returns(OperationResp) {
486 option (google.api.http) = {
487 post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
488 body: "*"
489 };
490 }
491
492 // Revert the specified image at standby partition
493 // to active partition, and revert to previous image
494 // Depending on the device implementation, this call
495 // may or may not cause device reboot.
496 // If no reboot, then a reboot is required to make the
497 // previous image running on device
498 // Note that the call is expected to be non-blocking.
499 rpc RevertImageUpdate(ImageDownload) returns(OperationResp) {
500 option (google.api.http) = {
501 post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
502 body: "*"
503 };
504 }
505
Zsolt Haraszti66862032016-11-28 14:28:39 -0800506 // List ports of a device
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800507 rpc ListDevicePorts(ID) returns(Ports) {
508 option (google.api.http) = {
509 get: "/api/v1/devices/{id}/ports"
510 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -0500511 option (voltha.yang_xml_tag).xml_tag = 'ports';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800512 }
513
Sergio Slobodriana2eb52b2017-03-07 12:24:46 -0500514 // List pm config of a device
515 rpc ListDevicePmConfigs(ID) returns(PmConfigs) {
516 option (google.api.http) = {
517 get: "/api/v1/devices/{id}/pm_configs"
518 };
519 }
520
521 // Update the pm config of a device
Sergio Slobodrian2db4c102017-03-09 22:29:23 -0500522 rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {
Sergio Slobodriana2eb52b2017-03-07 12:24:46 -0500523 option (google.api.http) = {
524 post: "/api/v1/devices/{id}/pm_configs"
525 body: "*"
526 };
527 }
528
Zsolt Haraszti66862032016-11-28 14:28:39 -0800529 // List all flows of a device
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800530 rpc ListDeviceFlows(ID) returns(openflow_13.Flows) {
531 option (google.api.http) = {
532 get: "/api/v1/devices/{id}/flows"
533 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -0500534 option (voltha.yang_xml_tag).xml_tag = 'flows';
535 option (voltha.yang_xml_tag).list_items_name = 'items';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800536 }
537
Zsolt Haraszti66862032016-11-28 14:28:39 -0800538 // List all flow groups of a device
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800539 rpc ListDeviceFlowGroups(ID) returns(openflow_13.FlowGroups) {
540 option (google.api.http) = {
541 get: "/api/v1/devices/{id}/flow_groups"
542 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -0500543 option (voltha.yang_xml_tag).xml_tag = 'flow_groups';
544 option (voltha.yang_xml_tag).list_items_name = 'items';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800545 }
546
Zsolt Haraszti66862032016-11-28 14:28:39 -0800547 // List device types known to Voltha
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800548 rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {
549 option (google.api.http) = {
550 get: "/api/v1/device_types"
551 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -0500552 option (voltha.yang_xml_tag).xml_tag = 'device_types';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800553 }
554
Zsolt Haraszti66862032016-11-28 14:28:39 -0800555 // Get additional information on a device type
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800556 rpc GetDeviceType(ID) returns(DeviceType) {
557 option (google.api.http) = {
558 get: "/api/v1/device_types/{id}"
559 };
560 }
561
Zsolt Haraszti66862032016-11-28 14:28:39 -0800562 // List all device sharding groups
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800563 rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {
564 option (google.api.http) = {
565 get: "/api/v1/device_groups"
566 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -0500567 option (voltha.yang_xml_tag).xml_tag = 'device_groups';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800568 }
569
Zsolt Haraszti66862032016-11-28 14:28:39 -0800570 // Get additional information on a device group
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800571 rpc GetDeviceGroup(ID) returns(DeviceGroup) {
572 option (google.api.http) = {
573 get: "/api/v1/device_groups/{id}"
574 };
575 }
576
Stephane Barbarie4db8ca22017-04-24 10:30:20 -0400577 rpc CreateAlarmFilter(AlarmFilter) returns(AlarmFilter) {
578 option (google.api.http) = {
579 post: "/api/v1/alarm_filters"
580 body: "*"
581 };
582 }
583
584 rpc GetAlarmFilter(ID) returns(AlarmFilter) {
585 option (google.api.http) = {
586 get: "/api/v1/alarm_filters/{id}"
587 };
588 }
589
590 rpc UpdateAlarmFilter(AlarmFilter) returns(AlarmFilter) {
591 option (google.api.http) = {
592 put: "/api/v1/alarm_filters/{id}"
593 body: "*"
594 };
595 }
596
597 rpc DeleteAlarmFilter(ID) returns(google.protobuf.Empty) {
598 option (google.api.http) = {
599 delete: "/api/v1/alarm_filters/{id}"
600 };
601 }
602
603 rpc ListAlarmFilters(google.protobuf.Empty) returns(AlarmFilters) {
604 option (google.api.http) = {
605 get: "/api/v1/alarm_filters"
606 };
607 }
ggowdru236bd952017-06-20 20:32:55 -0700608
Nikolay Titov89004ec2017-06-19 18:22:42 -0400609 // List all Channel Groups
Nikolay Titov3b31db92017-08-02 18:11:33 -0400610 rpc GetAllChannelgroupConfig(google.protobuf.Empty)
611 returns(bbf_fiber.AllChannelgroupConfig) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400612 option (google.api.http) = {
613 get: "/api/v1/channel_groups"
614 };
615 }
616 // Create Channel Group
Nikolay Titov3b31db92017-08-02 18:11:33 -0400617 rpc CreateChannelgroup(bbf_fiber.ChannelgroupConfig)
618 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400619 option (google.api.http) = {
620 post: "/api/v1/channel_groups/{name}"
621 body: "*"
622 };
623 }
624 // Update Channel Group
Nikolay Titov3b31db92017-08-02 18:11:33 -0400625 rpc UpdateChannelgroup(bbf_fiber.ChannelgroupConfig)
626 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400627 option (google.api.http) = {
628 post: "/api/v1/channel_groups/{name}/modify"
629 body: "*"
630 };
631 }
632 // Delete Channel Group
Nikolay Titov3b31db92017-08-02 18:11:33 -0400633 rpc DeleteChannelgroup(bbf_fiber.ChannelgroupConfig)
634 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400635 option (google.api.http) = {
636 delete: "/api/v1/channel_groups/{name}/delete"
637 };
638 }
639 // List all channel partitions
Nikolay Titov3b31db92017-08-02 18:11:33 -0400640 rpc GetAllChannelpartitionConfig(google.protobuf.Empty)
641 returns(bbf_fiber.AllChannelpartitionConfig) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400642 option (google.api.http) = {
643 get: "/api/v1/channel_partitions"
644 };
645 }
646 // Create a channel partition
Nikolay Titov3b31db92017-08-02 18:11:33 -0400647 rpc CreateChannelpartition(bbf_fiber.ChannelpartitionConfig)
648 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400649 option (google.api.http) = {
650 post: "/api/v1/channel_partitions/{name}"
651 body: "*"
652 };
653 }
654 // Update a channel partition
Nikolay Titov3b31db92017-08-02 18:11:33 -0400655 rpc UpdateChannelpartition(bbf_fiber.ChannelpartitionConfig)
656 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400657 option (google.api.http) = {
658 post: "/api/v1/channel_partitions/{name}/modify"
659 body: "*"
660 };
661 }
662 // Delete a channel partition
Nikolay Titov3b31db92017-08-02 18:11:33 -0400663 rpc DeleteChannelpartition(bbf_fiber.ChannelpartitionConfig)
664 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400665 option (google.api.http) = {
666 delete: "/api/v1/channel_partitions/{name}/delete"
667 };
668 }
669
670 // List all channel pairs managed by this Voltha instance
Nikolay Titov3b31db92017-08-02 18:11:33 -0400671 rpc GetAllChannelpairConfig(google.protobuf.Empty)
672 returns(bbf_fiber.AllChannelpairConfig) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400673 option (google.api.http) = {
674 get: "/api/v1/channel_pairs"
675 };
676 }
677 // Create a channel pair
Nikolay Titov3b31db92017-08-02 18:11:33 -0400678 rpc CreateChannelpair(bbf_fiber.ChannelpairConfig)
679 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400680 option (google.api.http) = {
681 post: "/api/v1/channel_pairs/{name}"
682 body: "*"
683 };
684 }
685 // Update a channel pair
Nikolay Titov3b31db92017-08-02 18:11:33 -0400686 rpc UpdateChannelpair(bbf_fiber.ChannelpairConfig)
687 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400688 option (google.api.http) = {
689 post: "/api/v1/channel_pairs/{name}/modify"
690 body: "*"
691 };
692 }
693 // Delete a channel pair
Nikolay Titov3b31db92017-08-02 18:11:33 -0400694 rpc DeleteChannelpair(bbf_fiber.ChannelpairConfig)
695 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400696 option (google.api.http) = {
697 delete: "/api/v1/channel_pairs/{name}/delete"
698 };
699 }
700 // List all channel terminations managed by this Voltha instance
Nikolay Titov3b31db92017-08-02 18:11:33 -0400701 rpc GetAllChannelterminationConfig(ID)
702 returns(bbf_fiber.AllChannelterminationConfig) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400703 option (google.api.http) = {
704 get: "/api/v1/devices/{id}/channel_terminations"
705 };
706 }
707 // Create a channel termination
Nikolay Titov3b31db92017-08-02 18:11:33 -0400708 rpc CreateChanneltermination(bbf_fiber.ChannelterminationConfig)
709 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400710 option (google.api.http) = {
711 post: "/api/v1/devices/{id}/channel_terminations/{name}"
712 body: "*"
713 };
714 }
715 // Update a channel termination
Nikolay Titov3b31db92017-08-02 18:11:33 -0400716 rpc UpdateChanneltermination(bbf_fiber.ChannelterminationConfig)
717 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400718 option (google.api.http) = {
719 post: "/api/v1/devices/{id}/channel_terminations/{name}/modify"
720 body: "*"
721 };
722 }
723 // Delete a channel termination
Nikolay Titov3b31db92017-08-02 18:11:33 -0400724 rpc DeleteChanneltermination(bbf_fiber.ChannelterminationConfig)
725 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400726 option (google.api.http) = {
727 delete: "/api/v1/devices/{id}/channel_terminations/{name}/delete"
728 };
729 }
730 // List all ont configs managed by this Voltha instance
Nikolay Titov3b31db92017-08-02 18:11:33 -0400731 rpc GetAllOntaniConfig(google.protobuf.Empty)
732 returns(bbf_fiber.AllOntaniConfig) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400733 option (google.api.http) = {
734 get: "/api/v1/ont_anis"
735 };
736 }
737 // Create an ont configs
738 rpc CreateOntani(bbf_fiber.OntaniConfig) returns(google.protobuf.Empty) {
739 option (google.api.http) = {
740 post: "/api/v1/ont_anis/{name}"
741 body: "*"
742 };
743 }
744 // Update an ont configs
745 rpc UpdateOntani(bbf_fiber.OntaniConfig) returns(google.protobuf.Empty) {
746 option (google.api.http) = {
747 post: "/api/v1/ont_anis/{name}/modify"
748 body: "*"
749 };
750 }
751 // Delete an ont configs
752 rpc DeleteOntani(bbf_fiber.OntaniConfig) returns(google.protobuf.Empty) {
753 option (google.api.http) = {
754 delete: "/api/v1/ont_anis/{name}/delete"
755 };
756 }
Nikolay Titov3b31db92017-08-02 18:11:33 -0400757 // List all vont configs managed by this Voltha instance
758 rpc GetAllVOntaniConfig(google.protobuf.Empty)
759 returns(bbf_fiber.AllVOntaniConfig) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400760 option (google.api.http) = {
761 get: "/api/v1/v_ont_anis"
762 };
763 }
Nikolay Titov3b31db92017-08-02 18:11:33 -0400764 // Create a vont configs
Nikolay Titov89004ec2017-06-19 18:22:42 -0400765 rpc CreateVOntani(bbf_fiber.VOntaniConfig) returns(google.protobuf.Empty) {
766 option (google.api.http) = {
767 post: "/api/v1/v_ont_anis/{name}"
768 body: "*"
769 };
770 }
Nikolay Titov3b31db92017-08-02 18:11:33 -0400771 // Update a vont configs
Nikolay Titov89004ec2017-06-19 18:22:42 -0400772 rpc UpdateVOntani(bbf_fiber.VOntaniConfig) returns(google.protobuf.Empty) {
773 option (google.api.http) = {
774 post: "/api/v1/v_ont_anis/{name}/modify"
775 body: "*"
776 };
777 }
Nikolay Titov3b31db92017-08-02 18:11:33 -0400778 // Delete a vont configs
Nikolay Titov89004ec2017-06-19 18:22:42 -0400779 rpc DeleteVOntani(bbf_fiber.VOntaniConfig) returns(google.protobuf.Empty) {
780 option (google.api.http) = {
781 delete: "/api/v1/v_ont_anis/{name}/delete"
782 };
783 }
784 // List all venet configs managed by this Voltha instance
Nikolay Titov3b31db92017-08-02 18:11:33 -0400785 rpc GetAllVEnetConfig(google.protobuf.Empty)
786 returns(bbf_fiber.AllVEnetConfig) {
Nikolay Titov89004ec2017-06-19 18:22:42 -0400787 option (google.api.http) = {
788 get: "/api/v1/v_enets"
789 };
790 }
791 // Create venet configs
792 rpc CreateVEnet(bbf_fiber.VEnetConfig) returns(google.protobuf.Empty) {
793 option (google.api.http) = {
794 post: "/api/v1/v_enets/{name}"
795 body: "*"
796 };
797 }
798 // Update venet configs
799 rpc UpdateVEnet(bbf_fiber.VEnetConfig) returns(google.protobuf.Empty) {
800 option (google.api.http) = {
801 post: "/api/v1/v_enets/{name}/modify"
802 body: "*"
803 };
804 }
805 // Delete venet configs
806 rpc DeleteVEnet(bbf_fiber.VEnetConfig) returns(google.protobuf.Empty) {
807 option (google.api.http) = {
808 delete: "/api/v1/v_enets/{name}/delete"
809 };
810 }
811
Nikolay Titov3b31db92017-08-02 18:11:33 -0400812 // List all Traffic Descriptors Profiles
813 rpc GetAllTrafficDescriptorProfileData(google.protobuf.Empty)
814 returns(bbf_fiber.AllTrafficDescriptorProfileData) {
815 option (google.api.http) = {
816 get: "/api/v1/traffic_descriptor_profiles"
817 };
818 }
819 // Create Traffic Descriptor Profile
820 rpc CreateTrafficDescriptorProfileData(
821 bbf_fiber.TrafficDescriptorProfileData)
822 returns(google.protobuf.Empty) {
823 option (google.api.http) = {
824 post: "/api/v1/traffic_descriptor_profiles/{name}"
825 body: "*"
826 };
827 }
828 // Update Traffic Descriptor Profile
829 rpc UpdateTrafficDescriptorProfileData(
830 bbf_fiber.TrafficDescriptorProfileData)
831 returns(google.protobuf.Empty) {
832 option (google.api.http) = {
833 post: "/api/v1/traffic_descriptor_profiles/{name}/modify"
834 body: "*"
835 };
836 }
837 // Delete Traffic Descriptor Profile
838 rpc DeleteTrafficDescriptorProfileData(
839 bbf_fiber.TrafficDescriptorProfileData)
840 returns(google.protobuf.Empty) {
841 option (google.api.http) = {
842 delete: "/api/v1/traffic_descriptor_profiles/{name}/delete"
843 };
844 }
845
846 // List all Tconts
847 rpc GetAllTcontsConfigData(google.protobuf.Empty)
848 returns(bbf_fiber.AllTcontsConfigData) {
849 option (google.api.http) = {
850 get: "/api/v1/tconts"
851 };
852 }
853 // Create Tcont
854 rpc CreateTcontsConfigData(bbf_fiber.TcontsConfigData)
855 returns(google.protobuf.Empty) {
856 option (google.api.http) = {
857 post: "/api/v1/tconts/{name}"
858 body: "*"
859 };
860 }
861 // Update Tcont
862 rpc UpdateTcontsConfigData(bbf_fiber.TcontsConfigData)
863 returns(google.protobuf.Empty) {
864 option (google.api.http) = {
865 post: "/api/v1/tconts/{name}/modify"
866 body: "*"
867 };
868 }
869 // Delete Tcont
870 rpc DeleteTcontsConfigData(bbf_fiber.TcontsConfigData)
871 returns(google.protobuf.Empty) {
872 option (google.api.http) = {
873 delete: "/api/v1/tconts/{name}/delete"
874 };
875 }
876
877 // List all Gemports
878 rpc GetAllGemportsConfigData(google.protobuf.Empty)
879 returns(bbf_fiber.AllGemportsConfigData) {
880 option (google.api.http) = {
881 get: "/api/v1/gemports"
882 };
883 }
884 // Create Gemport
885 rpc CreateGemportsConfigData(bbf_fiber.GemportsConfigData)
886 returns(google.protobuf.Empty) {
887 option (google.api.http) = {
888 post: "/api/v1/gemports/{name}"
889 body: "*"
890 };
891 }
892 // Update Gemport
893 rpc UpdateGemportsConfigData(bbf_fiber.GemportsConfigData)
894 returns(google.protobuf.Empty) {
895 option (google.api.http) = {
896 post: "/api/v1/gemports/{name}/modify"
897 body: "*"
898 };
899 }
900 // Delete Gemport
901 rpc DeleteGemportsConfigData(bbf_fiber.GemportsConfigData)
902 returns(google.protobuf.Empty) {
903 option (google.api.http) = {
904 delete: "/api/v1/gemports/{name}/delete"
905 };
906 }
907
908 // List all Multicast Gemports
909 rpc GetAllMulticastGemportsConfigData(google.protobuf.Empty)
910 returns(bbf_fiber.AllMulticastGemportsConfigData) {
911 option (google.api.http) = {
912 get: "/api/v1/multicast_gemports"
913 };
914 }
915 // Create Multicast Gemport
916 rpc CreateMulticastGemportsConfigData(
917 bbf_fiber.MulticastGemportsConfigData)
918 returns(google.protobuf.Empty) {
919 option (google.api.http) = {
920 post: "/api/v1/multicast_gemports/{name}"
921 body: "*"
922 };
923 }
924 // Update Multicast Gemport
925 rpc UpdateMulticastGemportsConfigData(
926 bbf_fiber.MulticastGemportsConfigData)
927 returns(google.protobuf.Empty) {
928 option (google.api.http) = {
929 post: "/api/v1/multicast_gemports/{name}/modify"
930 body: "*"
931 };
932 }
933 // Delete Multicast Gemport
934 rpc DeleteMulticastGemportsConfigData(
935 bbf_fiber.MulticastGemportsConfigData)
936 returns(google.protobuf.Empty) {
937 option (google.api.http) = {
938 delete: "/api/v1/multicast_gemports/{name}/delete"
939 };
940 }
941
942 // List all Multicast Distribution Sets
943 rpc GetAllMulticastDistributionSetData(google.protobuf.Empty)
944 returns(bbf_fiber.AllMulticastDistributionSetData) {
945 option (google.api.http) = {
946 get: "/api/v1/multicast_distibution_sets"
947 };
948 }
949 // Create Multicast Distribution Set
950 rpc CreateMulticastDistributionSetData(
951 bbf_fiber.MulticastDistributionSetData)
952 returns(google.protobuf.Empty) {
953 option (google.api.http) = {
954 post: "/api/v1/multicast_distribution_sets/{name}"
955 body: "*"
956 };
957 }
958 // Update Multicast Distribution Set
959 rpc UpdateMulticastDistributionSetData(
960 bbf_fiber.MulticastDistributionSetData)
961 returns(google.protobuf.Empty) {
962 option (google.api.http) = {
963 post: "/api/v1/multicast_distribution_sets/{name}/modify"
964 body: "*"
965 };
966 }
967 // Delete Multicast Distribution Set
968 rpc DeleteMulticastDistributionSetData(
969 bbf_fiber.MulticastDistributionSetData)
970 returns(google.protobuf.Empty) {
971 option (google.api.http) = {
972 delete: "/api/v1/multicast_distribution_sets/{name}/delete"
973 };
974 }
975
ggowdru236bd952017-06-20 20:32:55 -0700976 rpc GetImages(ID) returns(Images) {
977 option (google.api.http) = {
978 get: "/api/v1/devices/{id}/images"
979 };
980 }
sathishg5ae86222017-06-28 15:16:29 +0530981
982 rpc SelfTest(ID) returns(SelfTestResponse) {
983 option (google.api.http) = {
984 post: "/api/v1/devices/{id}/self_test"
985 };
986 }
Chip Boling69abce82018-06-18 09:56:23 -0500987
988 // OpenOMCI MIB information
989 rpc GetMibDeviceData(ID) returns(omci.MibDeviceData) {
990 option (google.api.http) = {
991 get: "/api/v1/openomci/{id}/mib"
992 };
993 }
jasonhuang5f3e63b2018-07-27 01:32:48 +0800994
995 // OpenOMCI ALARM information
996 rpc GetAlarmDeviceData(ID) returns(alarm.AlarmDeviceData) {
997 option (google.api.http) = {
998 get: "/api/v1/openomci/{id}/alarm"
999 };
1000 }
Scott Bakerd3190952018-09-04 15:47:28 -07001001
1002 // Simulate an Alarm
1003 rpc SimulateAlarm(SimulateAlarmRequest) returns(OperationResp) {
1004 option (google.api.http) = {
1005 post: "/api/v1/devices/{id}/simulate_larm"
1006 body: "*"
1007 };
1008 }
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001009}
1010
1011/*
1012 * Per-instance APIs
1013 *
1014 * These APIs are always served locally by the Voltha instance on which the
1015 * call is made.
1016 */
1017service VolthaLocalService {
1018
Zsolt Haraszti66862032016-11-28 14:28:39 -08001019 // Get information on this Voltha instance
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001020 rpc GetVolthaInstance(google.protobuf.Empty) returns(VolthaInstance) {
1021 option (google.api.http) = {
1022 get: "/api/v1/local"
1023 };
1024 }
1025
Zsolt Haraszti66862032016-11-28 14:28:39 -08001026 // Get the health state of the Voltha instance
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001027 rpc GetHealth(google.protobuf.Empty) returns(HealthStatus) {
1028 option (google.api.http) = {
1029 get: "/api/v1/local/health"
1030 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -05001031 option (voltha.yang_xml_tag).xml_tag = 'health';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001032 }
1033
Zsolt Haraszti66862032016-11-28 14:28:39 -08001034 // List all active adapters (plugins) in this Voltha instance
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001035 rpc ListAdapters(google.protobuf.Empty) returns(Adapters) {
1036 option (google.api.http) = {
1037 get: "/api/v1/local/adapters"
1038 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -05001039 option (voltha.yang_xml_tag).xml_tag = 'adapters';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001040 }
1041
Zsolt Haraszti66862032016-11-28 14:28:39 -08001042 // List all logical devices managed by this Voltha instance
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001043 rpc ListLogicalDevices(google.protobuf.Empty) returns(LogicalDevices) {
1044 option (google.api.http) = {
1045 get: "/api/v1/local/logical_devices"
1046 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -05001047 option (voltha.yang_xml_tag).xml_tag = 'logical_devices';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001048 }
1049
Nicolas Palpacuer75ba77f2018-08-27 17:26:57 -04001050 // List all reachable logical devices managed by this Voltha instance
1051 rpc ListReachableLogicalDevices(google.protobuf.Empty) returns
1052 (LogicalDevices) {
1053 option (google.api.http) = {
1054 get: "/api/v1/local/reachable_logical_devices"
1055 };
1056 }
1057
Zsolt Haraszti66862032016-11-28 14:28:39 -08001058 // Get additional information on given logical device
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001059 rpc GetLogicalDevice(ID) returns(LogicalDevice) {
1060 option (google.api.http) = {
1061 get: "/api/v1/local/logical_devices/{id}"
1062 };
1063 }
1064
1065 // List ports of a logical device
1066 rpc ListLogicalDevicePorts(ID) returns(LogicalPorts) {
1067 option (google.api.http) = {
1068 get: "/api/v1/local/logical_devices/{id}/ports"
1069 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -05001070 option (voltha.yang_xml_tag).xml_tag = 'ports';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001071 }
1072
Jonathan Hart8d21c322018-04-17 07:42:02 -07001073 // Gets a logical device port
1074 rpc GetLogicalDevicePort(LogicalPortId) returns(LogicalPort) {
1075 option (google.api.http) = {
1076 get: "/api/v1/logical_devices/{id}/ports/{port_id}"
1077 };
1078 option (voltha.yang_xml_tag).xml_tag = 'port';
1079 }
1080
1081 // Enables a logical device port
1082 rpc EnableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
1083 option (google.api.http) = {
1084 post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable"
1085 };
1086 }
1087
1088 // Disables a logical device port
1089 rpc DisableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
1090 option (google.api.http) = {
1091 post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable"
1092 };
1093 }
1094
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001095 // List all flows of a logical device
1096 rpc ListLogicalDeviceFlows(ID) returns(openflow_13.Flows) {
1097 option (google.api.http) = {
1098 get: "/api/v1/local/logical_devices/{id}/flows"
1099 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -05001100 option (voltha.yang_xml_tag).xml_tag = 'flows';
1101 option (voltha.yang_xml_tag).list_items_name = 'items';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001102 }
1103
Zsolt Haraszti66862032016-11-28 14:28:39 -08001104 // Update flow table for logical device
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001105 rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate)
1106 returns(google.protobuf.Empty) {
1107 option (google.api.http) = {
1108 post: "/api/v1/local/logical_devices/{id}/flows"
1109 body: "*"
1110 };
1111 }
1112
Koray Kokten8592a232018-08-27 07:41:14 +00001113 // Update meter table for logical device
1114 rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate)
1115 returns(google.protobuf.Empty) {
1116 option (google.api.http) = {
1117 post: "/api/v1/logical_devices/{id}/meters"
1118 body: "*"
1119 };
1120 }
1121
1122
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001123 // List all flow groups of a logical device
1124 rpc ListLogicalDeviceFlowGroups(ID) returns(openflow_13.FlowGroups) {
1125 option (google.api.http) = {
1126 get: "/api/v1/local/logical_devices/{id}/flow_groups"
1127 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -05001128 option (voltha.yang_xml_tag).xml_tag = 'flow_groups';
1129 option (voltha.yang_xml_tag).list_items_name = 'items';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001130 }
1131
Gamze Abaka53cc0a22019-01-31 12:06:11 +00001132 // List all meters of a logical device
1133 rpc ListLogicalDeviceMeters(ID) returns (openflow_13.Meters) {
1134 option (google.api.http) = {
1135 get: "/api/v1/local/logical_devices/{id}/meters"
1136 };
1137 option (voltha.yang_xml_tag).xml_tag = 'meters';
1138 option (voltha.yang_xml_tag).list_items_name = 'items';
1139 }
1140
Zsolt Haraszti66862032016-11-28 14:28:39 -08001141 // Update group table for logical device
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001142 rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate)
1143 returns(google.protobuf.Empty) {
1144 option (google.api.http) = {
1145 post: "/api/v1/local/logical_devices/{id}/flow_groups"
1146 body: "*"
1147 };
1148 }
1149
Zsolt Haraszti66862032016-11-28 14:28:39 -08001150 // List all physical devices managed by this Voltha instance
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001151 rpc ListDevices(google.protobuf.Empty) returns(Devices) {
1152 option (google.api.http) = {
1153 get: "/api/v1/local/devices"
1154 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -05001155 option (voltha.yang_xml_tag).xml_tag = 'devices';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001156 }
1157
Zsolt Haraszti66862032016-11-28 14:28:39 -08001158 // Get additional information on this device
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001159 rpc GetDevice(ID) returns(Device) {
1160 option (google.api.http) = {
1161 get: "/api/v1/local/devices/{id}"
1162 };
1163 }
1164
Zsolt Haraszti66862032016-11-28 14:28:39 -08001165 // Pre-provision a new physical device
1166 rpc CreateDevice(Device) returns(Device) {
1167 option (google.api.http) = {
1168 post: "/api/v1/local/devices"
1169 body: "*"
1170 };
1171 }
1172
Khen Nursimulud068d812017-03-06 11:44:18 -05001173 // Enable a device. If the device was in pre-provisioned state then it
1174 // will tansition to ENABLED state. If it was is DISABLED state then it
1175 // will tansition to ENABLED state as well.
1176 rpc EnableDevice(ID) returns(google.protobuf.Empty) {
Zsolt Haraszti66862032016-11-28 14:28:39 -08001177 option (google.api.http) = {
Khen Nursimulud068d812017-03-06 11:44:18 -05001178 post: "/api/v1/local/devices/{id}/enable"
1179 };
1180 }
1181
1182 // Disable a device
1183 rpc DisableDevice(ID) returns(google.protobuf.Empty) {
1184 option (google.api.http) = {
1185 post: "/api/v1/local/devices/{id}/disable"
1186 };
1187 }
1188
1189 // Reboot a device
1190 rpc RebootDevice(ID) returns(google.protobuf.Empty) {
1191 option (google.api.http) = {
1192 post: "/api/v1/local/devices/{id}/reboot"
1193 };
1194 }
1195
1196 // Delete a device
1197 rpc DeleteDevice(ID) returns(google.protobuf.Empty) {
1198 option (google.api.http) = {
Khen Nursimulu29e75502017-03-07 17:26:50 -05001199 delete: "/api/v1/local/devices/{id}/delete"
Zsolt Haraszti66862032016-11-28 14:28:39 -08001200 };
1201 }
1202
Lydia Fang01f2e852017-06-28 17:24:58 -07001203 // Request an image download to the standby partition
1204 // of a device.
1205 // Note that the call is expected to be non-blocking
1206 rpc DownloadImage(ImageDownload) returns(OperationResp) {
1207 option (google.api.http) = {
1208 post: "/api/v1/local/devices/{id}/image_downloads/{name}"
1209 body: "*"
1210 };
1211 }
1212
1213 // Get image download status on a device
1214 // The request retrieves progress on device and updates db record
1215 rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {
1216 option (google.api.http) = {
1217 get: "/api/v1/local/devices/{id}/image_downloads/{name}/status"
1218 };
1219 }
1220
1221 // Get image download db record
1222 rpc GetImageDownload(ImageDownload) returns(ImageDownload) {
1223 option (google.api.http) = {
1224 get: "/api/v1/local/devices/{id}/image_downloads/{name}"
1225 };
1226 }
1227
1228 // List image download db records for a given device
1229 rpc ListImageDownloads(ID) returns(ImageDownloads) {
1230 option (google.api.http) = {
1231 get: "/api/v1/local/devices/{id}/image_downloads"
1232 };
1233 }
1234
1235 // Cancel an image download process on a device
1236 rpc CancelImageDownload(ImageDownload) returns(OperationResp) {
1237 option (google.api.http) = {
1238 delete: "/api/v1/local/devices/{id}/image_downloads/{name}"
1239 };
1240 }
1241
1242 // Install and Activate a downloaded image from standby
1243 // partition to active partition
1244 // A subsequent call to reboot will cause the newly update image
1245 // to become active
1246 // Note that the call is expected to be non-blocking.
1247 rpc ActivateImageUpdate(ImageDownload) returns(OperationResp) {
1248 option (google.api.http) = {
1249 post: "/api/v1/local/devices/{id}/image_downloads/{name}/image_update"
1250 body: "*"
1251 };
1252 }
1253
1254 // Uninstall and deactivate an image update on a device,
1255 // and revert back to pre update image
1256 // A subsequent call to reboot will cause the pre update image
1257 // to become active
1258 // Note that the call is expected to be non-blocking.
1259 rpc RevertImageUpdate(ImageDownload) returns(OperationResp) {
1260 option (google.api.http) = {
1261 post: "/api/v1/local/devices/{id}/image_downloads/{name}/image_revert"
1262 body: "*"
1263 };
1264 }
1265
Zsolt Haraszti66862032016-11-28 14:28:39 -08001266 // List ports of a device
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001267 rpc ListDevicePorts(ID) returns(Ports) {
1268 option (google.api.http) = {
1269 get: "/api/v1/local/devices/{id}/ports"
1270 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -05001271 option (voltha.yang_xml_tag).xml_tag = 'ports';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001272 }
1273
Sergio Slobodriana2eb52b2017-03-07 12:24:46 -05001274 // List pm config of a device
1275 rpc ListDevicePmConfigs(ID) returns(PmConfigs) {
1276 option (google.api.http) = {
1277 get: "/api/v1/local/devices/{id}/pm_configs"
1278 };
1279 }
1280
1281 // Update the pm config of a device
Sergio Slobodrian2db4c102017-03-09 22:29:23 -05001282 rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {
Sergio Slobodriana2eb52b2017-03-07 12:24:46 -05001283 option (google.api.http) = {
1284 post: "/api/v1/local/devices/{id}/pm_configs"
1285 body: "*"
1286 };
1287 }
1288
Zsolt Haraszti66862032016-11-28 14:28:39 -08001289 // List all flows of a device
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001290 rpc ListDeviceFlows(ID) returns(openflow_13.Flows) {
1291 option (google.api.http) = {
1292 get: "/api/v1/local/devices/{id}/flows"
1293 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -05001294 option (voltha.yang_xml_tag).xml_tag = 'flows';
1295 option (voltha.yang_xml_tag).list_items_name = 'items';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001296 }
1297
Zsolt Haraszti66862032016-11-28 14:28:39 -08001298 // List all flow groups of a device
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001299 rpc ListDeviceFlowGroups(ID) returns(openflow_13.FlowGroups) {
1300 option (google.api.http) = {
1301 get: "/api/v1/local/devices/{id}/flow_groups"
1302 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -05001303 option (voltha.yang_xml_tag).xml_tag = 'flow_groups';
1304 option (voltha.yang_xml_tag).list_items_name = 'items';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001305 }
1306
Zsolt Haraszti66862032016-11-28 14:28:39 -08001307 // List device types know to Voltha instance
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001308 rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {
1309 option (google.api.http) = {
1310 get: "/api/v1/local/device_types"
1311 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -05001312 option (voltha.yang_xml_tag).xml_tag = 'device_types';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001313 }
1314
Zsolt Haraszti66862032016-11-28 14:28:39 -08001315 // Get additional information on given device type
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001316 rpc GetDeviceType(ID) returns(DeviceType) {
1317 option (google.api.http) = {
1318 get: "/api/v1/local/device_types/{id}"
1319 };
1320 }
1321
Zsolt Haraszti66862032016-11-28 14:28:39 -08001322 // List device sharding groups managed by this Voltha instance
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001323 rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {
1324 option (google.api.http) = {
1325 get: "/api/v1/local/device_groups"
1326 };
Khen Nursimulu3676b7c2017-01-31 13:48:38 -05001327 option (voltha.yang_xml_tag).xml_tag = 'device_groups';
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001328 }
1329
Zsolt Haraszti66862032016-11-28 14:28:39 -08001330 // Get more information on given device shard
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001331 rpc GetDeviceGroup(ID) returns(DeviceGroup) {
1332 option (google.api.http) = {
1333 get: "/api/v1/local/device_groups/{id}"
1334 };
1335 }
Nikolay Titov89004ec2017-06-19 18:22:42 -04001336 // List all channel groups managed by this Voltha instance
Nikolay Titov3b31db92017-08-02 18:11:33 -04001337 rpc GetAllChannelgroupConfig(google.protobuf.Empty)
1338 returns(bbf_fiber.AllChannelgroupConfig) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001339 option (google.api.http) = {
1340 get: "/api/v1/local/channel_groups"
1341 };
1342 }
1343 // Create a channel group
Nikolay Titov3b31db92017-08-02 18:11:33 -04001344 rpc CreateChannelgroup(bbf_fiber.ChannelgroupConfig)
1345 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001346 option (google.api.http) = {
1347 post: "/api/v1/local/channel_groups/{name}"
1348 body: "*"
1349 };
1350 }
1351 // Update a channel group
Nikolay Titov3b31db92017-08-02 18:11:33 -04001352 rpc UpdateChannelgroup(bbf_fiber.ChannelgroupConfig)
1353 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001354 option (google.api.http) = {
1355 post: "/api/v1/local/channel_groups/{name}/modify"
1356 body: "*"
1357 };
1358 }
1359 // Delate a channel group
Nikolay Titov3b31db92017-08-02 18:11:33 -04001360 rpc DeleteChannelgroup(bbf_fiber.ChannelgroupConfig)
1361 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001362 option (google.api.http) = {
1363 delete: "/api/v1/local/channel_groups/{name}/delete"
1364 };
1365 }
1366 // List all channel partitions managed by this Voltha instance
Nikolay Titov3b31db92017-08-02 18:11:33 -04001367 rpc GetAllChannelpartitionConfig(google.protobuf.Empty)
1368 returns(bbf_fiber.AllChannelpartitionConfig) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001369 option (google.api.http) = {
1370 get: "/api/v1/local/channel_partitions"
1371 };
1372 }
1373 // Create a channel partition
Nikolay Titov3b31db92017-08-02 18:11:33 -04001374 rpc CreateChannelpartition(bbf_fiber.ChannelpartitionConfig)
1375 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001376 option (google.api.http) = {
1377 post: "/api/v1/local/channel_partitions/{name}"
1378 body: "*"
1379 };
1380 }
1381 // Update a channel partition
Nikolay Titov3b31db92017-08-02 18:11:33 -04001382 rpc UpdateChannelpartition(bbf_fiber.ChannelpartitionConfig)
1383 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001384 option (google.api.http) = {
1385 post: "/api/v1/local/channel_partitions/{name}/modify"
1386 body: "*"
1387 };
1388 }
1389 // Delete a channel partition
Nikolay Titov3b31db92017-08-02 18:11:33 -04001390 rpc DeleteChannelpartition(bbf_fiber.ChannelpartitionConfig)
1391 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001392 option (google.api.http) = {
1393 delete: "/api/v1/local/channel_partitions/{name}/delete"
1394 };
1395 }
1396 // List all channel pairs managed by this Voltha instance
Nikolay Titov3b31db92017-08-02 18:11:33 -04001397 rpc GetAllChannelpairConfig(google.protobuf.Empty)
1398 returns(bbf_fiber.AllChannelpairConfig) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001399 option (google.api.http) = {
1400 get: "/api/v1/local/channel_pairs"
1401 };
1402 }
1403 // Create a channel pair
Nikolay Titov3b31db92017-08-02 18:11:33 -04001404 rpc CreateChannelpair(bbf_fiber.ChannelpairConfig)
1405 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001406 option (google.api.http) = {
1407 post: "/api/v1/local/channel_pairs/{name}"
1408 body: "*"
1409 };
1410 }
1411 // Update a channel pair
Nikolay Titov3b31db92017-08-02 18:11:33 -04001412 rpc UpdateChannelpair(bbf_fiber.ChannelpairConfig)
1413 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001414 option (google.api.http) = {
1415 post: "/api/v1/local/channel_pairs/{name}/modify"
1416 body: "*"
1417 };
1418 }
1419 // Delete a channel pair
Nikolay Titov3b31db92017-08-02 18:11:33 -04001420 rpc DeleteChannelpair(bbf_fiber.ChannelpairConfig)
1421 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001422 option (google.api.http) = {
1423 delete: "/api/v1/local/channel_pairs/{name}/delete"
1424 };
1425 }
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001426
Nikolay Titov89004ec2017-06-19 18:22:42 -04001427 // List all channel terminations managed by this Voltha instance
Nikolay Titov3b31db92017-08-02 18:11:33 -04001428 rpc GetAllChannelterminationConfig(ID)
1429 returns(bbf_fiber.AllChannelterminationConfig) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001430 option (google.api.http) = {
1431 get: "/api/v1/local/devices/{id}/channel_terminations"
1432 };
1433 }
1434 // Create a channel termination
Nikolay Titov3b31db92017-08-02 18:11:33 -04001435 rpc CreateChanneltermination(bbf_fiber.ChannelterminationConfig)
1436 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001437 option (google.api.http) = {
1438 post: "/api/v1/local/devices/{id}/channel_terminations/{name}"
1439 body: "*"
1440 };
1441 }
1442 // Update a channel termination
Nikolay Titov3b31db92017-08-02 18:11:33 -04001443 rpc UpdateChanneltermination(bbf_fiber.ChannelterminationConfig)
1444 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001445 option (google.api.http) = {
1446 post: "/api/v1/local/devices/{id}/channel_terminations/{name}/modify"
1447 body: "*"
1448 };
1449 }
1450 // Delete a channel termination
Nikolay Titov3b31db92017-08-02 18:11:33 -04001451 rpc DeleteChanneltermination(bbf_fiber.ChannelterminationConfig)
1452 returns(google.protobuf.Empty) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001453 option (google.api.http) = {
1454 delete: "/api/v1/local/devices/{id}/channel_terminations/{name}/delete"
1455 };
1456 }
1457 // List all ont configs managed by this Voltha instance
Nikolay Titov3b31db92017-08-02 18:11:33 -04001458 rpc GetAllOntaniConfig(google.protobuf.Empty)
1459 returns(bbf_fiber.AllOntaniConfig) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001460 option (google.api.http) = {
1461 get: "/api/v1/local/ont_anis"
1462 };
1463 }
1464 // Create an ont configs
1465 rpc CreateOntani(bbf_fiber.OntaniConfig) returns(google.protobuf.Empty) {
1466 option (google.api.http) = {
1467 post: "/api/v1/local/ont_anis/{name}"
1468 body: "*"
1469 };
1470 }
1471 // Update an ont configs
1472 rpc UpdateOntani(bbf_fiber.OntaniConfig) returns(google.protobuf.Empty) {
1473 option (google.api.http) = {
1474 post: "/api/v1/local/ont_anis/{name}/modify"
1475 body: "*"
1476 };
1477 }
1478 // Delete an ont configs
1479 rpc DeleteOntani(bbf_fiber.OntaniConfig) returns(google.protobuf.Empty) {
1480 option (google.api.http) = {
1481 delete: "/api/v1/local/ont_anis/{name}/delete"
1482 };
1483 }
Nikolay Titov3b31db92017-08-02 18:11:33 -04001484 // List all vont configs managed by this Voltha instance
1485 rpc GetAllVOntaniConfig(google.protobuf.Empty)
1486 returns(bbf_fiber.AllVOntaniConfig) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001487 option (google.api.http) = {
1488 get: "/api/v1/local/v_ont_anis"
1489 };
1490 }
Nikolay Titov3b31db92017-08-02 18:11:33 -04001491 // Create a vont configs
Nikolay Titov89004ec2017-06-19 18:22:42 -04001492 rpc CreateVOntani(bbf_fiber.VOntaniConfig) returns(google.protobuf.Empty) {
1493 option (google.api.http) = {
1494 post: "/api/v1/local/v_ont_anis/{name}"
1495 body: "*"
1496 };
1497 }
Nikolay Titov3b31db92017-08-02 18:11:33 -04001498 // Update a vont configs
Nikolay Titov89004ec2017-06-19 18:22:42 -04001499 rpc UpdateVOntani(bbf_fiber.VOntaniConfig) returns(google.protobuf.Empty) {
1500 option (google.api.http) = {
1501 post: "/api/v1/local/v_ont_anis/{name}/modify"
1502 body: "*"
1503 };
1504 }
Nikolay Titov3b31db92017-08-02 18:11:33 -04001505 // Delete a vont configs
Nikolay Titov89004ec2017-06-19 18:22:42 -04001506 rpc DeleteVOntani(bbf_fiber.VOntaniConfig) returns(google.protobuf.Empty) {
1507 option (google.api.http) = {
1508 delete: "/api/v1/local/v_ont_anis/{name}/delete"
1509 };
1510 }
1511 // List all venet configs managed by this Voltha instance
Nikolay Titov3b31db92017-08-02 18:11:33 -04001512 rpc GetAllVEnetConfig(google.protobuf.Empty)
1513 returns(bbf_fiber.AllVEnetConfig) {
Nikolay Titov89004ec2017-06-19 18:22:42 -04001514 option (google.api.http) = {
1515 get: "/api/v1/local/v_enets"
1516 };
1517 }
1518 // Create venet configs
1519 rpc CreateVEnet(bbf_fiber.VEnetConfig) returns(google.protobuf.Empty) {
1520 option (google.api.http) = {
1521 post: "/api/v1/local/v_enets/{name}"
1522 body: "*"
1523 };
1524 }
1525 // Update venet configs
1526 rpc UpdateVEnet(bbf_fiber.VEnetConfig) returns(google.protobuf.Empty) {
1527 option (google.api.http) = {
1528 post: "/api/v1/local/v_enets/{name}/modify"
1529 body: "*"
1530 };
1531 }
1532 // Delete venet configs
1533 rpc DeleteVEnet(bbf_fiber.VEnetConfig) returns(google.protobuf.Empty) {
1534 option (google.api.http) = {
1535 delete: "/api/v1/local/v_enets/{name}/delete"
1536 };
1537 }
Nikolay Titov3b31db92017-08-02 18:11:33 -04001538
1539 // List all Traffic Descriptor Profiles
1540 rpc GetAllTrafficDescriptorProfileData(google.protobuf.Empty)
1541 returns(bbf_fiber.AllTrafficDescriptorProfileData) {
1542 option (google.api.http) = {
1543 get: "/api/v1/local/traffic_descriptor_profiles"
1544 };
1545 }
1546 // Create Traffic Descriptor Profile
1547 rpc CreateTrafficDescriptorProfileData(
1548 bbf_fiber.TrafficDescriptorProfileData)
1549 returns(google.protobuf.Empty) {
1550 option (google.api.http) = {
1551 post: "/api/v1/local/traffic_descriptor_profiles/{name}"
1552 body: "*"
1553 };
1554 }
1555 // Update Traffic Descriptor Profile
1556 rpc UpdateTrafficDescriptorProfileData(
1557 bbf_fiber.TrafficDescriptorProfileData)
1558 returns(google.protobuf.Empty) {
1559 option (google.api.http) = {
1560 post: "/api/v1/local/traffic_descriptor_profiles/{name}/modify"
1561 body: "*"
1562 };
1563 }
1564 // Delete Traffic Descriptor Profile
1565 rpc DeleteTrafficDescriptorProfileData(
1566 bbf_fiber.TrafficDescriptorProfileData)
1567 returns(google.protobuf.Empty) {
1568 option (google.api.http) = {
1569 delete: "/api/v1/local/traffic_descriptor_profiles/{name}/delete"
1570 };
1571 }
1572
1573 // List all Tconts
1574 rpc GetAllTcontsConfigData(google.protobuf.Empty)
1575 returns(bbf_fiber.AllTcontsConfigData) {
1576 option (google.api.http) = {
1577 get: "/api/v1/local/tconts"
1578 };
1579 }
1580 // Create Tcont
1581 rpc CreateTcontsConfigData(bbf_fiber.TcontsConfigData)
1582 returns(google.protobuf.Empty) {
1583 option (google.api.http) = {
1584 post: "/api/v1/local/tconts/{name}"
1585 body: "*"
1586 };
1587 }
1588 // Update Tcont
1589 rpc UpdateTcontsConfigData(bbf_fiber.TcontsConfigData)
1590 returns(google.protobuf.Empty) {
1591 option (google.api.http) = {
1592 post: "/api/v1/local/tconts/{name}/modify"
1593 body: "*"
1594 };
1595 }
1596 // Delete Tcont
1597 rpc DeleteTcontsConfigData(bbf_fiber.TcontsConfigData)
1598 returns(google.protobuf.Empty) {
1599 option (google.api.http) = {
1600 delete: "/api/v1/local/tconts/{name}/delete"
1601 };
1602 }
1603
1604 // List all Gemports
1605 rpc GetAllGemportsConfigData(google.protobuf.Empty)
1606 returns(bbf_fiber.AllGemportsConfigData) {
1607 option (google.api.http) = {
1608 get: "/api/v1/local/gemports"
1609 };
1610 }
1611 // Create Gemport
1612 rpc CreateGemportsConfigData(bbf_fiber.GemportsConfigData)
1613 returns(google.protobuf.Empty) {
1614 option (google.api.http) = {
1615 post: "/api/v1/local/gemports/{name}"
1616 body: "*"
1617 };
1618 }
1619 // Update Gemport
1620 rpc UpdateGemportsConfigData(bbf_fiber.GemportsConfigData)
1621 returns(google.protobuf.Empty) {
1622 option (google.api.http) = {
1623 post: "/api/v1/local/gemports/{name}/modify"
1624 body: "*"
1625 };
1626 }
1627 // Delete Gemport
1628 rpc DeleteGemportsConfigData(bbf_fiber.GemportsConfigData)
1629 returns(google.protobuf.Empty) {
1630 option (google.api.http) = {
1631 delete: "/api/v1/local/gemports/{name}/delete"
1632 };
1633 }
1634
1635 // List all Multicast Gemports
1636 rpc GetAllMulticastGemportsConfigData(google.protobuf.Empty)
1637 returns(bbf_fiber.AllMulticastGemportsConfigData) {
1638 option (google.api.http) = {
1639 get: "/api/v1/local/multicast_gemports"
1640 };
1641 }
1642 // Create Multicast Gemport
1643 rpc CreateMulticastGemportsConfigData(
1644 bbf_fiber.MulticastGemportsConfigData)
1645 returns(google.protobuf.Empty) {
1646 option (google.api.http) = {
1647 post: "/api/v1/local/multicast_gemports/{name}"
1648 body: "*"
1649 };
1650 }
1651 // Update Multicast Gemport
1652 rpc UpdateMulticastGemportsConfigData(
1653 bbf_fiber.MulticastGemportsConfigData)
1654 returns(google.protobuf.Empty) {
1655 option (google.api.http) = {
1656 post: "/api/v1/local/multicast_gemports/{name}/modify"
1657 body: "*"
1658 };
1659 }
1660 // Delete Multicast Gemport
1661 rpc DeleteMulticastGemportsConfigData(
1662 bbf_fiber.MulticastGemportsConfigData)
1663 returns(google.protobuf.Empty) {
1664 option (google.api.http) = {
1665 delete: "/api/v1/local/multicast_gemports/{name}/delete"
1666 };
1667 }
1668
1669 // List all Multicast Distribution Sets
1670 rpc GetAllMulticastDistributionSetData(google.protobuf.Empty)
1671 returns(bbf_fiber.AllMulticastDistributionSetData) {
1672 option (google.api.http) = {
1673 get: "/api/v1/local/multicast_distibution_sets"
1674 };
1675 }
1676 // Create Multicast Distribution Set
1677 rpc CreateMulticastDistributionSetData(
1678 bbf_fiber.MulticastDistributionSetData)
1679 returns(google.protobuf.Empty) {
1680 option (google.api.http) = {
1681 post: "/api/v1/local/multicast_distribution_sets/{name}"
1682 body: "*"
1683 };
1684 }
1685 // Update Multicast Distribution Set
1686 rpc UpdateMulticastDistributionSetData(
1687 bbf_fiber.MulticastDistributionSetData)
1688 returns(google.protobuf.Empty) {
1689 option (google.api.http) = {
1690 post: "/api/v1/local/multicast_distribution_sets/{name}/modify"
1691 body: "*"
1692 };
1693 }
1694 // Delete Multicast Distribution Set
1695 rpc DeleteMulticastDistributionSetData(
1696 bbf_fiber.MulticastDistributionSetData)
1697 returns(google.protobuf.Empty) {
1698 option (google.api.http) = {
1699 delete: "/api/v1/local/multicast_distribution_sets/{name}/delete"
1700 };
1701 }
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001702 // Stream control packets to the dataplane
1703 rpc StreamPacketsOut(stream openflow_13.PacketOut)
1704 returns(google.protobuf.Empty) {
1705 // This does not have an HTTP representation
1706 }
1707
1708 // Receive control packet stream
1709 rpc ReceivePacketsIn(google.protobuf.Empty)
1710 returns(stream openflow_13.PacketIn) {
1711 // This does not have an HTTP representation
1712 }
1713
Zsolt Haraszti217a12e2016-12-19 16:37:55 -08001714 rpc ReceiveChangeEvents(google.protobuf.Empty)
1715 returns(stream openflow_13.ChangeEvent) {
1716 // This does not have an HTTP representation
1717 }
1718
Stephane Barbarie4db8ca22017-04-24 10:30:20 -04001719 rpc CreateAlarmFilter(AlarmFilter) returns(AlarmFilter) {
1720 option (google.api.http) = {
1721 post: "/api/v1/local/alarm_filters"
1722 body: "*"
1723 };
1724 }
1725
1726 rpc GetAlarmFilter(ID) returns(AlarmFilter) {
1727 option (google.api.http) = {
1728 get: "/api/v1/local/alarm_filters/{id}"
1729 };
1730 }
1731
1732 rpc UpdateAlarmFilter(AlarmFilter) returns(AlarmFilter) {
1733 option (google.api.http) = {
1734 put: "/api/v1/local/alarm_filters/{id}"
1735 body: "*"
1736 };
1737 }
1738
1739 rpc DeleteAlarmFilter(ID) returns(google.protobuf.Empty) {
1740 option (google.api.http) = {
1741 delete: "/api/v1/local/alarm_filters/{id}"
1742 };
1743 }
1744
1745 rpc ListAlarmFilters(google.protobuf.Empty) returns(AlarmFilters) {
1746 option (google.api.http) = {
1747 get: "/api/v1/local/alarm_filters"
1748 };
1749 }
ggowdru236bd952017-06-20 20:32:55 -07001750
1751 rpc GetImages(ID) returns(Images) {
1752 option (google.api.http) = {
1753 get: "/api/v1/local/devices/{id}/images"
1754 };
1755 }
sathishg5ae86222017-06-28 15:16:29 +05301756
1757 rpc SelfTest(ID) returns(SelfTestResponse) {
1758 option (google.api.http) = {
1759 post: "/api/v1/local/devices/{id}/self_test"
1760 };
1761 }
Stephane Barbarie2940dac2017-08-18 14:15:17 -04001762
1763 rpc Subscribe(OfAgentSubscriber) returns (OfAgentSubscriber) {}
Chip Boling69abce82018-06-18 09:56:23 -05001764
1765 // OpenOMCI MIB information
1766 rpc GetMibDeviceData(ID) returns(omci.MibDeviceData) {
1767 option (google.api.http) = {
1768 get: "/api/v1/openomci/{id}/mib"
1769 };
1770 }
jasonhuang5f3e63b2018-07-27 01:32:48 +08001771
1772 // OpenOMCI ALARM information
1773 rpc GetAlarmDeviceData(ID) returns(alarm.AlarmDeviceData) {
1774 option (google.api.http) = {
1775 get: "/api/v1/openomci/{id}/alarm"
1776 };
1777 }
Scott Bakerd3190952018-09-04 15:47:28 -07001778
1779 // Simulate an Alarm
1780 rpc SimulateAlarm(SimulateAlarmRequest) returns(OperationResp) {
1781 option (google.api.http) = {
1782 post: "/api/v1/devices/{id}/simulate_alarm"
1783 body: "*"
1784 };
1785 }
Zsolt Harasztidafefe12016-11-14 21:29:58 -08001786}