blob: fc06dc3ca34794923ee332d5040154d1cd5b3928 [file] [log] [blame]
Zack Williams52209662019-02-07 10:15:31 -07001/*
2 * Top-level Voltha API definition
3 *
4 * For details, see individual definition files.
5 */
6
7syntax = "proto3";
8
Scott Baker383964b2019-11-01 14:26:07 -07009option go_package = "github.com/opencord/voltha-protos/v2/go/voltha";
Zack Williams52209662019-02-07 10:15:31 -070010
11package voltha;
12
13import "google/api/annotations.proto";
14import "google/protobuf/empty.proto";
15
16import public "voltha_protos/meta.proto";
17import public "voltha_protos/common.proto";
18import public "voltha_protos/health.proto";
19import public "voltha_protos/logical_device.proto";
20import public "voltha_protos/device.proto";
21import public "voltha_protos/adapter.proto";
22import public "voltha_protos/openflow_13.proto";
23
24import "voltha_protos/omci_mib_db.proto";
25import "voltha_protos/omci_alarm_db.proto";
26import "voltha_protos/yang_options.proto";
27
28option java_package = "org.opencord.voltha";
29option java_outer_classname = "VolthaProtos";
30option csharp_namespace = "Opencord.Voltha.Voltha";
31
32message DeviceGroup {
33
34 string id = 1 [(access) = READ_ONLY];
35
36 repeated LogicalDevice logical_devices = 2 [(child_node) = {key: "id"}];
37
38 repeated Device devices = 3 [(child_node) = {key: "id"}];
39}
40
41message DeviceGroups {
42 repeated DeviceGroup items = 1;
43}
44
45
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000046message EventFilterRuleKey {
Zack Williams52209662019-02-07 10:15:31 -070047
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000048 enum EventFilterRuleType {
49 filter_all = 0;
50 category = 1;
51 sub_category = 2;
52 kpi_event_type = 3;
53 config_event_type = 4;
54 device_event_type = 5;
Zack Williams52209662019-02-07 10:15:31 -070055 }
56}
57
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000058message EventFilterRule {
59 EventFilterRuleKey.EventFilterRuleType key = 1;
Zack Williams52209662019-02-07 10:15:31 -070060 string value = 2;
61}
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000062message EventFilter {
Zack Williams52209662019-02-07 10:15:31 -070063 string id = 1 [(access) = READ_ONLY];
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000064 bool enable = 2;
65 string device_id = 3;
66 string event_type = 4;
67 repeated EventFilterRule rules = 5;
Zack Williams52209662019-02-07 10:15:31 -070068}
69
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000070message EventFilters {
71 repeated EventFilter filters = 1;
Zack Williams52209662019-02-07 10:15:31 -070072}
73
Zack Williams52209662019-02-07 10:15:31 -070074// CoreInstance represents a core instance. It is data held in memory when a core
75// is running. This data is not persistent.
76message CoreInstance {
William Kurkian12fc0af2019-04-18 14:27:45 -040077 option (common.yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
Zack Williams52209662019-02-07 10:15:31 -070078
79 string instance_id = 1 [(access) = READ_ONLY];
80
81 HealthStatus health = 2 [(child_node) = {}];
82
83}
84
85message CoreInstances {
William Kurkian12fc0af2019-04-18 14:27:45 -040086 option (common.yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
Zack Williams52209662019-02-07 10:15:31 -070087 repeated CoreInstance items = 1;
88}
89
90// Voltha represents the Voltha cluster data. Each Core instance will hold a subset of
91// the entire cluster. However, some items (e.g. adapters) will be held by all cores
92// for better performance
93message Voltha {
William Kurkian12fc0af2019-04-18 14:27:45 -040094 option (common.yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
Zack Williams52209662019-02-07 10:15:31 -070095
96 string version = 1 [(access) = READ_ONLY];
97
98 repeated Adapter adapters = 2 [(child_node) = {key: "id"}];
99
100 repeated LogicalDevice logical_devices = 3 [(child_node) = {key: "id"}];
101
102 repeated Device devices = 4 [(child_node) = {key: "id"}];
103
104 repeated DeviceType device_types = 5 [(child_node) = {key: "id"}];
105
106 repeated DeviceGroup device_groups = 6 [(child_node) = {key: "id"}];
107
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000108 repeated EventFilter event_filters = 7 [(child_node) = {key: "id"}];
Zack Williams52209662019-02-07 10:15:31 -0700109
110 repeated
111 omci.MibDeviceData omci_mib_database = 28
112 [(child_node) = {key: "device_id"}];
113
114 repeated
William Kurkian12fc0af2019-04-18 14:27:45 -0400115 omci.AlarmDeviceData omci_alarm_database = 29
Zack Williams52209662019-02-07 10:15:31 -0700116 [(child_node) = {key: "device_id"}];
117}
118
119// Device Self Test Response
120message SelfTestResponse {
William Kurkian12fc0af2019-04-18 14:27:45 -0400121 option (common.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
Zack Williams52209662019-02-07 10:15:31 -0700122
123 enum SelfTestResult {
124 SUCCESS = 0;
125 FAILURE = 1;
126 NOT_SUPPORTED = 2;
127 UNKNOWN_ERROR = 3;
128 }
129 SelfTestResult result = 1;
130}
131
132message OfAgentSubscriber {
133 // ID of ofagent instance
134 string ofagent_id = 1;
135
136 // ID of voltha instance to which the ofagent is subscribed
137 string voltha_id = 2;
138}
139
William Kurkian6ea97f82019-03-13 15:51:55 -0400140// Identifies a membership group a Core belongs to
141message Membership {
142 // Group name
143 string group_name = 1;
144
145 // Unique ID of a container within that group
146 string id = 2;
147}
148
manikkaraj k166cb202019-07-28 13:05:56 -0400149// Additional information required to process flow at device adapters
150message FlowMetadata {
151 // Meters associated with flow-update to adapter
152 repeated openflow_13.ofp_meter_config meters = 1;
153}
154
Zack Williams52209662019-02-07 10:15:31 -0700155/*
156 * Voltha APIs
157 *
158 */
159service VolthaService {
160
161 // Get more information on a given physical device
Scott Baker99af94e2019-08-20 10:45:06 -0700162 rpc UpdateLogLevel(common.Logging) returns(google.protobuf.Empty) {
163 option (google.api.http) = {
164 post: "/api/v1/logs"
165 body: "*"
166 };
167 }
168
169 rpc GetLogLevels(common.LoggingComponent) returns (common.Loggings) {
Zack Williams52209662019-02-07 10:15:31 -0700170 option (google.api.http) = {
171 get: "/api/v1/logs"
172 };
173 }
174
William Kurkian6ea97f82019-03-13 15:51:55 -0400175 // Get the membership group of a Voltha Core
176 rpc GetMembership(google.protobuf.Empty) returns(Membership) {
177 option (google.api.http) = {
178 get: "/api/v1/membership"
179 };
180 }
181
182 // Set the membership group of a Voltha Core
183 rpc UpdateMembership(Membership) returns(google.protobuf.Empty) {
184 option (google.api.http) = {
185 post: "/api/v1/membership"
186 body: "*"
187 };
188 }
189
Zack Williams52209662019-02-07 10:15:31 -0700190 // Get high level information on the Voltha cluster
191 rpc GetVoltha(google.protobuf.Empty) returns(Voltha) {
192 option (google.api.http) = {
193 get: "/api/v1"
194 };
195 }
196
197 // List all Voltha cluster core instances
198 rpc ListCoreInstances(google.protobuf.Empty) returns(CoreInstances) {
199 option (google.api.http) = {
200 get: "/api/v1/instances"
201 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400202 option (common.yang_xml_tag).xml_tag = 'items';
203 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700204 }
205
206 // Get details on a Voltha cluster instance
William Kurkian12fc0af2019-04-18 14:27:45 -0400207 rpc GetCoreInstance(common.ID) returns(CoreInstance) {
Zack Williams52209662019-02-07 10:15:31 -0700208 option (google.api.http) = {
209 get: "/api/v1/instances/{id}"
210 };
211 }
212
213 // List all active adapters (plugins) in the Voltha cluster
214 rpc ListAdapters(google.protobuf.Empty) returns(Adapters) {
215 option (google.api.http) = {
216 get: "/api/v1/adapters"
217 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400218 option (common.yang_xml_tag).xml_tag = 'adapters';
Zack Williams52209662019-02-07 10:15:31 -0700219 }
220
221
222 // List all logical devices managed by the Voltha cluster
223 rpc ListLogicalDevices(google.protobuf.Empty) returns(LogicalDevices) {
224 option (google.api.http) = {
225 get: "/api/v1/logical_devices"
226 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400227 option (common.yang_xml_tag).xml_tag = 'logical_devices';
Zack Williams52209662019-02-07 10:15:31 -0700228 }
229
230 // Get additional information on a given logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400231 rpc GetLogicalDevice(common.ID) returns(LogicalDevice) {
Zack Williams52209662019-02-07 10:15:31 -0700232 option (google.api.http) = {
233 get: "/api/v1/logical_devices/{id}"
234 };
235 }
236
237 // List ports of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400238 rpc ListLogicalDevicePorts(common.ID) returns(LogicalPorts) {
Zack Williams52209662019-02-07 10:15:31 -0700239 option (google.api.http) = {
240 get: "/api/v1/logical_devices/{id}/ports"
241 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400242 option (common.yang_xml_tag).xml_tag = 'ports';
Zack Williams52209662019-02-07 10:15:31 -0700243 }
244
245 // Gets a logical device port
246 rpc GetLogicalDevicePort(LogicalPortId) returns(LogicalPort) {
247 option (google.api.http) = {
248 get: "/api/v1/logical_devices/{id}/ports/{port_id}"
249 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400250 option (common.yang_xml_tag).xml_tag = 'port';
Zack Williams52209662019-02-07 10:15:31 -0700251 }
252
253 // Enables a logical device port
254 rpc EnableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
255 option (google.api.http) = {
256 post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable"
257 };
258 }
259
260 // Disables a logical device port
261 rpc DisableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
262 option (google.api.http) = {
263 post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable"
264 };
265 }
266
267 // List all flows of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400268 rpc ListLogicalDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700269 option (google.api.http) = {
270 get: "/api/v1/logical_devices/{id}/flows"
271 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400272 option (common.yang_xml_tag).xml_tag = 'flows';
273 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700274 }
275
276 // Update flow table for logical device
277 rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate)
278 returns(google.protobuf.Empty) {
279 option (google.api.http) = {
280 post: "/api/v1/logical_devices/{id}/flows"
281 body: "*"
282 };
283 }
284
285 // Update meter table for logical device
286 rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate)
287 returns(google.protobuf.Empty) {
288 option (google.api.http) = {
289 post: "/api/v1/logical_devices/{id}/meters"
290 body: "*"
291 };
292 }
293
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400294 // List all meters of a logical device
295 rpc ListLogicalDeviceMeters(common.ID) returns (openflow_13.Meters) {
Zack Williams52209662019-02-07 10:15:31 -0700296 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400297 get: "/api/v1/logical_devices/{id}/meters"
Zack Williams52209662019-02-07 10:15:31 -0700298 };
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400299 option (common.yang_xml_tag).xml_tag = 'meters';
300 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700301 }
302
303 // List all flow groups of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400304 rpc ListLogicalDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700305 option (google.api.http) = {
306 get: "/api/v1/logical_devices/{id}/flow_groups"
307 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400308 option (common.yang_xml_tag).xml_tag = 'flow_groups';
309 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700310 }
311
312 // Update group table for device
313 rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate)
314 returns(google.protobuf.Empty) {
315 option (google.api.http) = {
316 post: "/api/v1/logical_devices/{id}/flow_groups"
317 body: "*"
318 };
319 }
320
321 // List all physical devices controlled by the Voltha cluster
322 rpc ListDevices(google.protobuf.Empty) returns(Devices) {
323 option (google.api.http) = {
324 get: "/api/v1/devices"
325 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400326 option (common.yang_xml_tag).xml_tag = 'devices';
Zack Williams52209662019-02-07 10:15:31 -0700327 }
328
329 // List all physical devices IDs controlled by the Voltha cluster
William Kurkian12fc0af2019-04-18 14:27:45 -0400330 rpc ListDeviceIds(google.protobuf.Empty) returns(common.IDs) {
Zack Williams52209662019-02-07 10:15:31 -0700331 option (google.api.http) = {
332 get: "/api/v1/deviceids"
333 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400334 option (common.yang_xml_tag).xml_tag = 'id';
335 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700336 }
337
338 // Request to a voltha Core to reconcile a set of devices based on their IDs
William Kurkian12fc0af2019-04-18 14:27:45 -0400339 rpc ReconcileDevices(common.IDs) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700340 option (google.api.http) = {
341 post: "/api/v1/deviceids"
342 body: "*"
343 };
344 }
345
346 // Get more information on a given physical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400347 rpc GetDevice(common.ID) returns(Device) {
Zack Williams52209662019-02-07 10:15:31 -0700348 option (google.api.http) = {
349 get: "/api/v1/devices/{id}"
350 };
351 }
352
353 // Pre-provision a new physical device
354 rpc CreateDevice(Device) returns(Device) {
355 option (google.api.http) = {
356 post: "/api/v1/devices"
357 body: "*"
358 };
359 }
360
361 // Enable a device. If the device was in pre-provisioned state then it
362 // will transition to ENABLED state. If it was is DISABLED state then it
363 // will transition to ENABLED state as well.
William Kurkian12fc0af2019-04-18 14:27:45 -0400364 rpc EnableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700365 option (google.api.http) = {
366 post: "/api/v1/devices/{id}/enable"
367 };
368 }
369
370 // Disable a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400371 rpc DisableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700372 option (google.api.http) = {
373 post: "/api/v1/devices/{id}/disable"
374 };
375 }
376
377 // Reboot a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400378 rpc RebootDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700379 option (google.api.http) = {
380 post: "/api/v1/devices/{id}/reboot"
381 };
382 }
383
384 // Delete a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400385 rpc DeleteDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700386 option (google.api.http) = {
387 delete: "/api/v1/devices/{id}/delete"
388 };
389 }
390
391 // Request an image download to the standby partition
392 // of a device.
393 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400394 rpc DownloadImage(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700395 option (google.api.http) = {
396 post: "/api/v1/devices/{id}/image_downloads/{name}"
397 body: "*"
398 };
399 }
400
401 // Get image download status on a device
402 // The request retrieves progress on device and updates db record
403 rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {
404 option (google.api.http) = {
405 get: "/api/v1/devices/{id}/image_downloads/{name}/status"
406 };
407 }
408
409 // Get image download db record
410 rpc GetImageDownload(ImageDownload) returns(ImageDownload) {
411 option (google.api.http) = {
412 get: "/api/v1/devices/{id}/image_downloads/{name}"
413 };
414 }
415
416 // List image download db records for a given device
William Kurkian12fc0af2019-04-18 14:27:45 -0400417 rpc ListImageDownloads(common.ID) returns(ImageDownloads) {
Zack Williams52209662019-02-07 10:15:31 -0700418 option (google.api.http) = {
419 get: "/api/v1/devices/{id}/image_downloads"
420 };
421 }
422
423 // Cancel an existing image download process on a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400424 rpc CancelImageDownload(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700425 option (google.api.http) = {
426 delete: "/api/v1/devices/{id}/image_downloads/{name}"
427 };
428 }
429
430 // Activate the specified image at a standby partition
431 // to active partition.
432 // Depending on the device implementation, this call
433 // may or may not cause device reboot.
434 // If no reboot, then a reboot is required to make the
435 // activated image running on device
436 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400437 rpc ActivateImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700438 option (google.api.http) = {
439 post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
440 body: "*"
441 };
442 }
443
444 // Revert the specified image at standby partition
445 // to active partition, and revert to previous image
446 // Depending on the device implementation, this call
447 // may or may not cause device reboot.
448 // If no reboot, then a reboot is required to make the
449 // previous image running on device
450 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400451 rpc RevertImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700452 option (google.api.http) = {
453 post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
454 body: "*"
455 };
456 }
457
458 // List ports of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400459 rpc ListDevicePorts(common.ID) returns(Ports) {
Zack Williams52209662019-02-07 10:15:31 -0700460 option (google.api.http) = {
461 get: "/api/v1/devices/{id}/ports"
462 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400463 option (common.yang_xml_tag).xml_tag = 'ports';
Zack Williams52209662019-02-07 10:15:31 -0700464 }
465
466 // List pm config of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400467 rpc ListDevicePmConfigs(common.ID) returns(PmConfigs) {
Zack Williams52209662019-02-07 10:15:31 -0700468 option (google.api.http) = {
469 get: "/api/v1/devices/{id}/pm_configs"
470 };
471 }
472
473 // Update the pm config of a device
474 rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {
475 option (google.api.http) = {
476 post: "/api/v1/devices/{id}/pm_configs"
477 body: "*"
478 };
479 }
480
481 // List all flows of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400482 rpc ListDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700483 option (google.api.http) = {
484 get: "/api/v1/devices/{id}/flows"
485 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400486 option (common.yang_xml_tag).xml_tag = 'flows';
487 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700488 }
489
490 // List all flow groups of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400491 rpc ListDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700492 option (google.api.http) = {
493 get: "/api/v1/devices/{id}/flow_groups"
494 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400495 option (common.yang_xml_tag).xml_tag = 'flow_groups';
496 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700497 }
498
499 // List device types known to Voltha
500 rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {
501 option (google.api.http) = {
502 get: "/api/v1/device_types"
503 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400504 option (common.yang_xml_tag).xml_tag = 'device_types';
Zack Williams52209662019-02-07 10:15:31 -0700505 }
506
507 // Get additional information on a device type
William Kurkian12fc0af2019-04-18 14:27:45 -0400508 rpc GetDeviceType(common.ID) returns(DeviceType) {
Zack Williams52209662019-02-07 10:15:31 -0700509 option (google.api.http) = {
510 get: "/api/v1/device_types/{id}"
511 };
512 }
513
514 // List all device sharding groups
515 rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {
516 option (google.api.http) = {
517 get: "/api/v1/device_groups"
518 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400519 option (common.yang_xml_tag).xml_tag = 'device_groups';
Zack Williams52209662019-02-07 10:15:31 -0700520 }
521
522 // Stream control packets to the dataplane
523 rpc StreamPacketsOut(stream openflow_13.PacketOut)
524 returns(google.protobuf.Empty) {
525 // This does not have an HTTP representation
526 }
527
528 // Receive control packet stream
529 rpc ReceivePacketsIn(google.protobuf.Empty)
530 returns(stream openflow_13.PacketIn) {
531 // This does not have an HTTP representation
532 }
533
534 rpc ReceiveChangeEvents(google.protobuf.Empty)
535 returns(stream openflow_13.ChangeEvent) {
536 // This does not have an HTTP representation
537 }
538
539 // Get additional information on a device group
William Kurkian12fc0af2019-04-18 14:27:45 -0400540 rpc GetDeviceGroup(common.ID) returns(DeviceGroup) {
Zack Williams52209662019-02-07 10:15:31 -0700541 option (google.api.http) = {
542 get: "/api/v1/device_groups/{id}"
543 };
544 }
545
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000546 rpc CreateEventFilter(EventFilter) returns(EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700547 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000548 post: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700549 body: "*"
550 };
551 }
552
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000553 // Get all filters present for a device
554 rpc GetEventFilter(common.ID) returns(EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700555 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000556 get: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700557 };
558 }
559
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000560 rpc UpdateEventFilter(EventFilter) returns(EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700561 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000562 put: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700563 body: "*"
564 };
565 }
566
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000567 rpc DeleteEventFilter(EventFilter) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700568 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000569 delete: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700570 };
571 }
572
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000573 // Get all the filters present
574 rpc ListEventFilters(google.protobuf.Empty) returns(EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700575 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000576 get: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700577 };
578 }
579
William Kurkian12fc0af2019-04-18 14:27:45 -0400580 rpc GetImages(common.ID) returns(Images) {
Zack Williams52209662019-02-07 10:15:31 -0700581 option (google.api.http) = {
582 get: "/api/v1/devices/{id}/images"
583 };
584 }
585
William Kurkian12fc0af2019-04-18 14:27:45 -0400586 rpc SelfTest(common.ID) returns(SelfTestResponse) {
Zack Williams52209662019-02-07 10:15:31 -0700587 option (google.api.http) = {
588 post: "/api/v1/devices/{id}/self_test"
589 };
590 }
591
592 // OpenOMCI MIB information
William Kurkian12fc0af2019-04-18 14:27:45 -0400593 rpc GetMibDeviceData(common.ID) returns(omci.MibDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700594 option (google.api.http) = {
595 get: "/api/v1/openomci/{id}/mib"
596 };
597 }
598
599 // OpenOMCI ALARM information
William Kurkian12fc0af2019-04-18 14:27:45 -0400600 rpc GetAlarmDeviceData(common.ID) returns(omci.AlarmDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700601 option (google.api.http) = {
602 get: "/api/v1/openomci/{id}/alarm"
603 };
604 }
605
606 // Simulate an Alarm
William Kurkian12fc0af2019-04-18 14:27:45 -0400607 rpc SimulateAlarm(SimulateAlarmRequest) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700608 option (google.api.http) = {
609 post: "/api/v1/devices/{id}/simulate_larm"
610 body: "*"
611 };
612 }
613 rpc Subscribe (OfAgentSubscriber) returns (OfAgentSubscriber) {
614 }
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400615
Zack Williams52209662019-02-07 10:15:31 -0700616}
617