blob: 673fddd8fa61972271c00804bf69742025038f57 [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
William Kurkian6ea97f82019-03-13 15:51:55 -04009option go_package = "github.com/opencord/voltha-protos/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
46message AlarmFilterRuleKey {
William Kurkian12fc0af2019-04-18 14:27:45 -040047 option (common.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
Zack Williams52209662019-02-07 10:15:31 -070048
49 enum AlarmFilterRuleKey {
50 id = 0;
51 type = 1;
52 severity = 2;
53 resource_id = 3;
54 category = 4;
55 device_id = 5;
56 }
57}
58
59message AlarmFilterRule {
60 AlarmFilterRuleKey.AlarmFilterRuleKey key = 1;
61 string value = 2;
62}
63message AlarmFilter {
64 string id = 1 [(access) = READ_ONLY];
65
66 repeated AlarmFilterRule rules = 2;
67}
68
69message AlarmFilters {
70 repeated AlarmFilter filters = 1;
71}
72
73message Logging {
William Kurkian12fc0af2019-04-18 14:27:45 -040074 common.LogLevel.LogLevel level = 1;
Zack Williams52209662019-02-07 10:15:31 -070075 string package_name = 2;
76}
77
78// CoreInstance represents a core instance. It is data held in memory when a core
79// is running. This data is not persistent.
80message CoreInstance {
William Kurkian12fc0af2019-04-18 14:27:45 -040081 option (common.yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
Zack Williams52209662019-02-07 10:15:31 -070082
83 string instance_id = 1 [(access) = READ_ONLY];
84
85 HealthStatus health = 2 [(child_node) = {}];
86
87}
88
89message CoreInstances {
William Kurkian12fc0af2019-04-18 14:27:45 -040090 option (common.yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
Zack Williams52209662019-02-07 10:15:31 -070091 repeated CoreInstance items = 1;
92}
93
94// Voltha represents the Voltha cluster data. Each Core instance will hold a subset of
95// the entire cluster. However, some items (e.g. adapters) will be held by all cores
96// for better performance
97message Voltha {
William Kurkian12fc0af2019-04-18 14:27:45 -040098 option (common.yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
Zack Williams52209662019-02-07 10:15:31 -070099
100 string version = 1 [(access) = READ_ONLY];
101
102 repeated Adapter adapters = 2 [(child_node) = {key: "id"}];
103
104 repeated LogicalDevice logical_devices = 3 [(child_node) = {key: "id"}];
105
106 repeated Device devices = 4 [(child_node) = {key: "id"}];
107
108 repeated DeviceType device_types = 5 [(child_node) = {key: "id"}];
109
110 repeated DeviceGroup device_groups = 6 [(child_node) = {key: "id"}];
111
112 repeated AlarmFilter alarm_filters = 7 [(child_node) = {key: "id"}];
113
114 repeated
115 omci.MibDeviceData omci_mib_database = 28
116 [(child_node) = {key: "device_id"}];
117
118 repeated
William Kurkian12fc0af2019-04-18 14:27:45 -0400119 omci.AlarmDeviceData omci_alarm_database = 29
Zack Williams52209662019-02-07 10:15:31 -0700120 [(child_node) = {key: "device_id"}];
121}
122
123// Device Self Test Response
124message SelfTestResponse {
William Kurkian12fc0af2019-04-18 14:27:45 -0400125 option (common.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
Zack Williams52209662019-02-07 10:15:31 -0700126
127 enum SelfTestResult {
128 SUCCESS = 0;
129 FAILURE = 1;
130 NOT_SUPPORTED = 2;
131 UNKNOWN_ERROR = 3;
132 }
133 SelfTestResult result = 1;
134}
135
136message OfAgentSubscriber {
137 // ID of ofagent instance
138 string ofagent_id = 1;
139
140 // ID of voltha instance to which the ofagent is subscribed
141 string voltha_id = 2;
142}
143
William Kurkian6ea97f82019-03-13 15:51:55 -0400144// Identifies a membership group a Core belongs to
145message Membership {
146 // Group name
147 string group_name = 1;
148
149 // Unique ID of a container within that group
150 string id = 2;
151}
152
Zack Williams52209662019-02-07 10:15:31 -0700153/*
154 * Voltha APIs
155 *
156 */
157service VolthaService {
158
159 // Get more information on a given physical device
160 rpc UpdateLogLevel(Logging) returns(google.protobuf.Empty) {
161 option (google.api.http) = {
162 get: "/api/v1/logs"
163 };
164 }
165
William Kurkian6ea97f82019-03-13 15:51:55 -0400166 // Get the membership group of a Voltha Core
167 rpc GetMembership(google.protobuf.Empty) returns(Membership) {
168 option (google.api.http) = {
169 get: "/api/v1/membership"
170 };
171 }
172
173 // Set the membership group of a Voltha Core
174 rpc UpdateMembership(Membership) returns(google.protobuf.Empty) {
175 option (google.api.http) = {
176 post: "/api/v1/membership"
177 body: "*"
178 };
179 }
180
Zack Williams52209662019-02-07 10:15:31 -0700181 // Get high level information on the Voltha cluster
182 rpc GetVoltha(google.protobuf.Empty) returns(Voltha) {
183 option (google.api.http) = {
184 get: "/api/v1"
185 };
186 }
187
188 // List all Voltha cluster core instances
189 rpc ListCoreInstances(google.protobuf.Empty) returns(CoreInstances) {
190 option (google.api.http) = {
191 get: "/api/v1/instances"
192 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400193 option (common.yang_xml_tag).xml_tag = 'items';
194 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700195 }
196
197 // Get details on a Voltha cluster instance
William Kurkian12fc0af2019-04-18 14:27:45 -0400198 rpc GetCoreInstance(common.ID) returns(CoreInstance) {
Zack Williams52209662019-02-07 10:15:31 -0700199 option (google.api.http) = {
200 get: "/api/v1/instances/{id}"
201 };
202 }
203
204 // List all active adapters (plugins) in the Voltha cluster
205 rpc ListAdapters(google.protobuf.Empty) returns(Adapters) {
206 option (google.api.http) = {
207 get: "/api/v1/adapters"
208 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400209 option (common.yang_xml_tag).xml_tag = 'adapters';
Zack Williams52209662019-02-07 10:15:31 -0700210 }
211
212
213 // List all logical devices managed by the Voltha cluster
214 rpc ListLogicalDevices(google.protobuf.Empty) returns(LogicalDevices) {
215 option (google.api.http) = {
216 get: "/api/v1/logical_devices"
217 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400218 option (common.yang_xml_tag).xml_tag = 'logical_devices';
Zack Williams52209662019-02-07 10:15:31 -0700219 }
220
221 // Get additional information on a given logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400222 rpc GetLogicalDevice(common.ID) returns(LogicalDevice) {
Zack Williams52209662019-02-07 10:15:31 -0700223 option (google.api.http) = {
224 get: "/api/v1/logical_devices/{id}"
225 };
226 }
227
228 // List ports of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400229 rpc ListLogicalDevicePorts(common.ID) returns(LogicalPorts) {
Zack Williams52209662019-02-07 10:15:31 -0700230 option (google.api.http) = {
231 get: "/api/v1/logical_devices/{id}/ports"
232 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400233 option (common.yang_xml_tag).xml_tag = 'ports';
Zack Williams52209662019-02-07 10:15:31 -0700234 }
235
236 // Gets a logical device port
237 rpc GetLogicalDevicePort(LogicalPortId) returns(LogicalPort) {
238 option (google.api.http) = {
239 get: "/api/v1/logical_devices/{id}/ports/{port_id}"
240 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400241 option (common.yang_xml_tag).xml_tag = 'port';
Zack Williams52209662019-02-07 10:15:31 -0700242 }
243
244 // Enables a logical device port
245 rpc EnableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
246 option (google.api.http) = {
247 post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable"
248 };
249 }
250
251 // Disables a logical device port
252 rpc DisableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
253 option (google.api.http) = {
254 post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable"
255 };
256 }
257
258 // List all flows of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400259 rpc ListLogicalDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700260 option (google.api.http) = {
261 get: "/api/v1/logical_devices/{id}/flows"
262 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400263 option (common.yang_xml_tag).xml_tag = 'flows';
264 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700265 }
266
267 // Update flow table for logical device
268 rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate)
269 returns(google.protobuf.Empty) {
270 option (google.api.http) = {
271 post: "/api/v1/logical_devices/{id}/flows"
272 body: "*"
273 };
274 }
275
276 // Update meter table for logical device
277 rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate)
278 returns(google.protobuf.Empty) {
279 option (google.api.http) = {
280 post: "/api/v1/logical_devices/{id}/meters"
281 body: "*"
282 };
283 }
284
285 // Get all meter stats for logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400286 rpc GetMeterStatsOfLogicalDevice(common.ID)
Zack Williams52209662019-02-07 10:15:31 -0700287 returns(openflow_13.MeterStatsReply) {
288 option (google.api.http) = {
289 get: "/api/v1/logical_devices/{id}/meters_stats"
290 };
291 }
292
293 // List all flow groups of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400294 rpc ListLogicalDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700295 option (google.api.http) = {
296 get: "/api/v1/logical_devices/{id}/flow_groups"
297 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400298 option (common.yang_xml_tag).xml_tag = 'flow_groups';
299 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700300 }
301
302 // Update group table for device
303 rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate)
304 returns(google.protobuf.Empty) {
305 option (google.api.http) = {
306 post: "/api/v1/logical_devices/{id}/flow_groups"
307 body: "*"
308 };
309 }
310
311 // List all physical devices controlled by the Voltha cluster
312 rpc ListDevices(google.protobuf.Empty) returns(Devices) {
313 option (google.api.http) = {
314 get: "/api/v1/devices"
315 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400316 option (common.yang_xml_tag).xml_tag = 'devices';
Zack Williams52209662019-02-07 10:15:31 -0700317 }
318
319 // List all physical devices IDs controlled by the Voltha cluster
William Kurkian12fc0af2019-04-18 14:27:45 -0400320 rpc ListDeviceIds(google.protobuf.Empty) returns(common.IDs) {
Zack Williams52209662019-02-07 10:15:31 -0700321 option (google.api.http) = {
322 get: "/api/v1/deviceids"
323 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400324 option (common.yang_xml_tag).xml_tag = 'id';
325 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700326 }
327
328 // Request to a voltha Core to reconcile a set of devices based on their IDs
William Kurkian12fc0af2019-04-18 14:27:45 -0400329 rpc ReconcileDevices(common.IDs) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700330 option (google.api.http) = {
331 post: "/api/v1/deviceids"
332 body: "*"
333 };
334 }
335
336 // Get more information on a given physical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400337 rpc GetDevice(common.ID) returns(Device) {
Zack Williams52209662019-02-07 10:15:31 -0700338 option (google.api.http) = {
339 get: "/api/v1/devices/{id}"
340 };
341 }
342
343 // Pre-provision a new physical device
344 rpc CreateDevice(Device) returns(Device) {
345 option (google.api.http) = {
346 post: "/api/v1/devices"
347 body: "*"
348 };
349 }
350
351 // Enable a device. If the device was in pre-provisioned state then it
352 // will transition to ENABLED state. If it was is DISABLED state then it
353 // will transition to ENABLED state as well.
William Kurkian12fc0af2019-04-18 14:27:45 -0400354 rpc EnableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700355 option (google.api.http) = {
356 post: "/api/v1/devices/{id}/enable"
357 };
358 }
359
360 // Disable a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400361 rpc DisableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700362 option (google.api.http) = {
363 post: "/api/v1/devices/{id}/disable"
364 };
365 }
366
367 // Reboot a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400368 rpc RebootDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700369 option (google.api.http) = {
370 post: "/api/v1/devices/{id}/reboot"
371 };
372 }
373
374 // Delete a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400375 rpc DeleteDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700376 option (google.api.http) = {
377 delete: "/api/v1/devices/{id}/delete"
378 };
379 }
380
381 // Request an image download to the standby partition
382 // of a device.
383 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400384 rpc DownloadImage(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700385 option (google.api.http) = {
386 post: "/api/v1/devices/{id}/image_downloads/{name}"
387 body: "*"
388 };
389 }
390
391 // Get image download status on a device
392 // The request retrieves progress on device and updates db record
393 rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {
394 option (google.api.http) = {
395 get: "/api/v1/devices/{id}/image_downloads/{name}/status"
396 };
397 }
398
399 // Get image download db record
400 rpc GetImageDownload(ImageDownload) returns(ImageDownload) {
401 option (google.api.http) = {
402 get: "/api/v1/devices/{id}/image_downloads/{name}"
403 };
404 }
405
406 // List image download db records for a given device
William Kurkian12fc0af2019-04-18 14:27:45 -0400407 rpc ListImageDownloads(common.ID) returns(ImageDownloads) {
Zack Williams52209662019-02-07 10:15:31 -0700408 option (google.api.http) = {
409 get: "/api/v1/devices/{id}/image_downloads"
410 };
411 }
412
413 // Cancel an existing image download process on a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400414 rpc CancelImageDownload(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700415 option (google.api.http) = {
416 delete: "/api/v1/devices/{id}/image_downloads/{name}"
417 };
418 }
419
420 // Activate the specified image at a standby partition
421 // to active partition.
422 // Depending on the device implementation, this call
423 // may or may not cause device reboot.
424 // If no reboot, then a reboot is required to make the
425 // activated image running on device
426 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400427 rpc ActivateImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700428 option (google.api.http) = {
429 post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
430 body: "*"
431 };
432 }
433
434 // Revert the specified image at standby partition
435 // to active partition, and revert to previous image
436 // Depending on the device implementation, this call
437 // may or may not cause device reboot.
438 // If no reboot, then a reboot is required to make the
439 // previous image running on device
440 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400441 rpc RevertImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700442 option (google.api.http) = {
443 post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
444 body: "*"
445 };
446 }
447
448 // List ports of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400449 rpc ListDevicePorts(common.ID) returns(Ports) {
Zack Williams52209662019-02-07 10:15:31 -0700450 option (google.api.http) = {
451 get: "/api/v1/devices/{id}/ports"
452 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400453 option (common.yang_xml_tag).xml_tag = 'ports';
Zack Williams52209662019-02-07 10:15:31 -0700454 }
455
456 // List pm config of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400457 rpc ListDevicePmConfigs(common.ID) returns(PmConfigs) {
Zack Williams52209662019-02-07 10:15:31 -0700458 option (google.api.http) = {
459 get: "/api/v1/devices/{id}/pm_configs"
460 };
461 }
462
463 // Update the pm config of a device
464 rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {
465 option (google.api.http) = {
466 post: "/api/v1/devices/{id}/pm_configs"
467 body: "*"
468 };
469 }
470
471 // List all flows of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400472 rpc ListDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700473 option (google.api.http) = {
474 get: "/api/v1/devices/{id}/flows"
475 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400476 option (common.yang_xml_tag).xml_tag = 'flows';
477 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700478 }
479
480 // List all flow groups of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400481 rpc ListDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700482 option (google.api.http) = {
483 get: "/api/v1/devices/{id}/flow_groups"
484 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400485 option (common.yang_xml_tag).xml_tag = 'flow_groups';
486 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700487 }
488
489 // List device types known to Voltha
490 rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {
491 option (google.api.http) = {
492 get: "/api/v1/device_types"
493 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400494 option (common.yang_xml_tag).xml_tag = 'device_types';
Zack Williams52209662019-02-07 10:15:31 -0700495 }
496
497 // Get additional information on a device type
William Kurkian12fc0af2019-04-18 14:27:45 -0400498 rpc GetDeviceType(common.ID) returns(DeviceType) {
Zack Williams52209662019-02-07 10:15:31 -0700499 option (google.api.http) = {
500 get: "/api/v1/device_types/{id}"
501 };
502 }
503
504 // List all device sharding groups
505 rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {
506 option (google.api.http) = {
507 get: "/api/v1/device_groups"
508 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400509 option (common.yang_xml_tag).xml_tag = 'device_groups';
Zack Williams52209662019-02-07 10:15:31 -0700510 }
511
512 // Stream control packets to the dataplane
513 rpc StreamPacketsOut(stream openflow_13.PacketOut)
514 returns(google.protobuf.Empty) {
515 // This does not have an HTTP representation
516 }
517
518 // Receive control packet stream
519 rpc ReceivePacketsIn(google.protobuf.Empty)
520 returns(stream openflow_13.PacketIn) {
521 // This does not have an HTTP representation
522 }
523
524 rpc ReceiveChangeEvents(google.protobuf.Empty)
525 returns(stream openflow_13.ChangeEvent) {
526 // This does not have an HTTP representation
527 }
528
529 // Get additional information on a device group
William Kurkian12fc0af2019-04-18 14:27:45 -0400530 rpc GetDeviceGroup(common.ID) returns(DeviceGroup) {
Zack Williams52209662019-02-07 10:15:31 -0700531 option (google.api.http) = {
532 get: "/api/v1/device_groups/{id}"
533 };
534 }
535
536 rpc CreateAlarmFilter(AlarmFilter) returns(AlarmFilter) {
537 option (google.api.http) = {
538 post: "/api/v1/alarm_filters"
539 body: "*"
540 };
541 }
542
William Kurkian12fc0af2019-04-18 14:27:45 -0400543 rpc GetAlarmFilter(common.ID) returns(AlarmFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700544 option (google.api.http) = {
545 get: "/api/v1/alarm_filters/{id}"
546 };
547 }
548
549 rpc UpdateAlarmFilter(AlarmFilter) returns(AlarmFilter) {
550 option (google.api.http) = {
551 put: "/api/v1/alarm_filters/{id}"
552 body: "*"
553 };
554 }
555
William Kurkian12fc0af2019-04-18 14:27:45 -0400556 rpc DeleteAlarmFilter(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700557 option (google.api.http) = {
558 delete: "/api/v1/alarm_filters/{id}"
559 };
560 }
561
562 rpc ListAlarmFilters(google.protobuf.Empty) returns(AlarmFilters) {
563 option (google.api.http) = {
564 get: "/api/v1/alarm_filters"
565 };
566 }
567
William Kurkian12fc0af2019-04-18 14:27:45 -0400568 rpc GetImages(common.ID) returns(Images) {
Zack Williams52209662019-02-07 10:15:31 -0700569 option (google.api.http) = {
570 get: "/api/v1/devices/{id}/images"
571 };
572 }
573
William Kurkian12fc0af2019-04-18 14:27:45 -0400574 rpc SelfTest(common.ID) returns(SelfTestResponse) {
Zack Williams52209662019-02-07 10:15:31 -0700575 option (google.api.http) = {
576 post: "/api/v1/devices/{id}/self_test"
577 };
578 }
579
580 // OpenOMCI MIB information
William Kurkian12fc0af2019-04-18 14:27:45 -0400581 rpc GetMibDeviceData(common.ID) returns(omci.MibDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700582 option (google.api.http) = {
583 get: "/api/v1/openomci/{id}/mib"
584 };
585 }
586
587 // OpenOMCI ALARM information
William Kurkian12fc0af2019-04-18 14:27:45 -0400588 rpc GetAlarmDeviceData(common.ID) returns(omci.AlarmDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700589 option (google.api.http) = {
590 get: "/api/v1/openomci/{id}/alarm"
591 };
592 }
593
594 // Simulate an Alarm
William Kurkian12fc0af2019-04-18 14:27:45 -0400595 rpc SimulateAlarm(SimulateAlarmRequest) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700596 option (google.api.http) = {
597 post: "/api/v1/devices/{id}/simulate_larm"
598 body: "*"
599 };
600 }
601 rpc Subscribe (OfAgentSubscriber) returns (OfAgentSubscriber) {
602 }
603}
604