blob: a6f9ee0cc5fbca7265f0586aa43d64e43c526538 [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
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400285 // List all meters of a logical device
286 rpc ListLogicalDeviceMeters(common.ID) returns (openflow_13.Meters) {
Zack Williams52209662019-02-07 10:15:31 -0700287 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400288 get: "/api/v1/logical_devices/{id}/meters"
Zack Williams52209662019-02-07 10:15:31 -0700289 };
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400290 option (common.yang_xml_tag).xml_tag = 'meters';
291 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700292 }
293
294 // List all flow groups of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400295 rpc ListLogicalDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700296 option (google.api.http) = {
297 get: "/api/v1/logical_devices/{id}/flow_groups"
298 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400299 option (common.yang_xml_tag).xml_tag = 'flow_groups';
300 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700301 }
302
303 // Update group table for device
304 rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate)
305 returns(google.protobuf.Empty) {
306 option (google.api.http) = {
307 post: "/api/v1/logical_devices/{id}/flow_groups"
308 body: "*"
309 };
310 }
311
312 // List all physical devices controlled by the Voltha cluster
313 rpc ListDevices(google.protobuf.Empty) returns(Devices) {
314 option (google.api.http) = {
315 get: "/api/v1/devices"
316 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400317 option (common.yang_xml_tag).xml_tag = 'devices';
Zack Williams52209662019-02-07 10:15:31 -0700318 }
319
320 // List all physical devices IDs controlled by the Voltha cluster
William Kurkian12fc0af2019-04-18 14:27:45 -0400321 rpc ListDeviceIds(google.protobuf.Empty) returns(common.IDs) {
Zack Williams52209662019-02-07 10:15:31 -0700322 option (google.api.http) = {
323 get: "/api/v1/deviceids"
324 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400325 option (common.yang_xml_tag).xml_tag = 'id';
326 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700327 }
328
329 // Request to a voltha Core to reconcile a set of devices based on their IDs
William Kurkian12fc0af2019-04-18 14:27:45 -0400330 rpc ReconcileDevices(common.IDs) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700331 option (google.api.http) = {
332 post: "/api/v1/deviceids"
333 body: "*"
334 };
335 }
336
337 // Get more information on a given physical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400338 rpc GetDevice(common.ID) returns(Device) {
Zack Williams52209662019-02-07 10:15:31 -0700339 option (google.api.http) = {
340 get: "/api/v1/devices/{id}"
341 };
342 }
343
344 // Pre-provision a new physical device
345 rpc CreateDevice(Device) returns(Device) {
346 option (google.api.http) = {
347 post: "/api/v1/devices"
348 body: "*"
349 };
350 }
351
352 // Enable a device. If the device was in pre-provisioned state then it
353 // will transition to ENABLED state. If it was is DISABLED state then it
354 // will transition to ENABLED state as well.
William Kurkian12fc0af2019-04-18 14:27:45 -0400355 rpc EnableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700356 option (google.api.http) = {
357 post: "/api/v1/devices/{id}/enable"
358 };
359 }
360
361 // Disable a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400362 rpc DisableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700363 option (google.api.http) = {
364 post: "/api/v1/devices/{id}/disable"
365 };
366 }
367
368 // Reboot a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400369 rpc RebootDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700370 option (google.api.http) = {
371 post: "/api/v1/devices/{id}/reboot"
372 };
373 }
374
375 // Delete a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400376 rpc DeleteDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700377 option (google.api.http) = {
378 delete: "/api/v1/devices/{id}/delete"
379 };
380 }
381
382 // Request an image download to the standby partition
383 // of a device.
384 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400385 rpc DownloadImage(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700386 option (google.api.http) = {
387 post: "/api/v1/devices/{id}/image_downloads/{name}"
388 body: "*"
389 };
390 }
391
392 // Get image download status on a device
393 // The request retrieves progress on device and updates db record
394 rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {
395 option (google.api.http) = {
396 get: "/api/v1/devices/{id}/image_downloads/{name}/status"
397 };
398 }
399
400 // Get image download db record
401 rpc GetImageDownload(ImageDownload) returns(ImageDownload) {
402 option (google.api.http) = {
403 get: "/api/v1/devices/{id}/image_downloads/{name}"
404 };
405 }
406
407 // List image download db records for a given device
William Kurkian12fc0af2019-04-18 14:27:45 -0400408 rpc ListImageDownloads(common.ID) returns(ImageDownloads) {
Zack Williams52209662019-02-07 10:15:31 -0700409 option (google.api.http) = {
410 get: "/api/v1/devices/{id}/image_downloads"
411 };
412 }
413
414 // Cancel an existing image download process on a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400415 rpc CancelImageDownload(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700416 option (google.api.http) = {
417 delete: "/api/v1/devices/{id}/image_downloads/{name}"
418 };
419 }
420
421 // Activate the specified image at a standby partition
422 // to active partition.
423 // Depending on the device implementation, this call
424 // may or may not cause device reboot.
425 // If no reboot, then a reboot is required to make the
426 // activated image running on device
427 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400428 rpc ActivateImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700429 option (google.api.http) = {
430 post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
431 body: "*"
432 };
433 }
434
435 // Revert the specified image at standby partition
436 // to active partition, and revert to previous image
437 // Depending on the device implementation, this call
438 // may or may not cause device reboot.
439 // If no reboot, then a reboot is required to make the
440 // previous image running on device
441 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400442 rpc RevertImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700443 option (google.api.http) = {
444 post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
445 body: "*"
446 };
447 }
448
449 // List ports of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400450 rpc ListDevicePorts(common.ID) returns(Ports) {
Zack Williams52209662019-02-07 10:15:31 -0700451 option (google.api.http) = {
452 get: "/api/v1/devices/{id}/ports"
453 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400454 option (common.yang_xml_tag).xml_tag = 'ports';
Zack Williams52209662019-02-07 10:15:31 -0700455 }
456
457 // List pm config of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400458 rpc ListDevicePmConfigs(common.ID) returns(PmConfigs) {
Zack Williams52209662019-02-07 10:15:31 -0700459 option (google.api.http) = {
460 get: "/api/v1/devices/{id}/pm_configs"
461 };
462 }
463
464 // Update the pm config of a device
465 rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {
466 option (google.api.http) = {
467 post: "/api/v1/devices/{id}/pm_configs"
468 body: "*"
469 };
470 }
471
472 // List all flows of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400473 rpc ListDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700474 option (google.api.http) = {
475 get: "/api/v1/devices/{id}/flows"
476 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400477 option (common.yang_xml_tag).xml_tag = 'flows';
478 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700479 }
480
481 // List all flow groups of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400482 rpc ListDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700483 option (google.api.http) = {
484 get: "/api/v1/devices/{id}/flow_groups"
485 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400486 option (common.yang_xml_tag).xml_tag = 'flow_groups';
487 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700488 }
489
490 // List device types known to Voltha
491 rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {
492 option (google.api.http) = {
493 get: "/api/v1/device_types"
494 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400495 option (common.yang_xml_tag).xml_tag = 'device_types';
Zack Williams52209662019-02-07 10:15:31 -0700496 }
497
498 // Get additional information on a device type
William Kurkian12fc0af2019-04-18 14:27:45 -0400499 rpc GetDeviceType(common.ID) returns(DeviceType) {
Zack Williams52209662019-02-07 10:15:31 -0700500 option (google.api.http) = {
501 get: "/api/v1/device_types/{id}"
502 };
503 }
504
505 // List all device sharding groups
506 rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {
507 option (google.api.http) = {
508 get: "/api/v1/device_groups"
509 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400510 option (common.yang_xml_tag).xml_tag = 'device_groups';
Zack Williams52209662019-02-07 10:15:31 -0700511 }
512
513 // Stream control packets to the dataplane
514 rpc StreamPacketsOut(stream openflow_13.PacketOut)
515 returns(google.protobuf.Empty) {
516 // This does not have an HTTP representation
517 }
518
519 // Receive control packet stream
520 rpc ReceivePacketsIn(google.protobuf.Empty)
521 returns(stream openflow_13.PacketIn) {
522 // This does not have an HTTP representation
523 }
524
525 rpc ReceiveChangeEvents(google.protobuf.Empty)
526 returns(stream openflow_13.ChangeEvent) {
527 // This does not have an HTTP representation
528 }
529
530 // Get additional information on a device group
William Kurkian12fc0af2019-04-18 14:27:45 -0400531 rpc GetDeviceGroup(common.ID) returns(DeviceGroup) {
Zack Williams52209662019-02-07 10:15:31 -0700532 option (google.api.http) = {
533 get: "/api/v1/device_groups/{id}"
534 };
535 }
536
537 rpc CreateAlarmFilter(AlarmFilter) returns(AlarmFilter) {
538 option (google.api.http) = {
539 post: "/api/v1/alarm_filters"
540 body: "*"
541 };
542 }
543
William Kurkian12fc0af2019-04-18 14:27:45 -0400544 rpc GetAlarmFilter(common.ID) returns(AlarmFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700545 option (google.api.http) = {
546 get: "/api/v1/alarm_filters/{id}"
547 };
548 }
549
550 rpc UpdateAlarmFilter(AlarmFilter) returns(AlarmFilter) {
551 option (google.api.http) = {
552 put: "/api/v1/alarm_filters/{id}"
553 body: "*"
554 };
555 }
556
William Kurkian12fc0af2019-04-18 14:27:45 -0400557 rpc DeleteAlarmFilter(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700558 option (google.api.http) = {
559 delete: "/api/v1/alarm_filters/{id}"
560 };
561 }
562
563 rpc ListAlarmFilters(google.protobuf.Empty) returns(AlarmFilters) {
564 option (google.api.http) = {
565 get: "/api/v1/alarm_filters"
566 };
567 }
568
William Kurkian12fc0af2019-04-18 14:27:45 -0400569 rpc GetImages(common.ID) returns(Images) {
Zack Williams52209662019-02-07 10:15:31 -0700570 option (google.api.http) = {
571 get: "/api/v1/devices/{id}/images"
572 };
573 }
574
William Kurkian12fc0af2019-04-18 14:27:45 -0400575 rpc SelfTest(common.ID) returns(SelfTestResponse) {
Zack Williams52209662019-02-07 10:15:31 -0700576 option (google.api.http) = {
577 post: "/api/v1/devices/{id}/self_test"
578 };
579 }
580
581 // OpenOMCI MIB information
William Kurkian12fc0af2019-04-18 14:27:45 -0400582 rpc GetMibDeviceData(common.ID) returns(omci.MibDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700583 option (google.api.http) = {
584 get: "/api/v1/openomci/{id}/mib"
585 };
586 }
587
588 // OpenOMCI ALARM information
William Kurkian12fc0af2019-04-18 14:27:45 -0400589 rpc GetAlarmDeviceData(common.ID) returns(omci.AlarmDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700590 option (google.api.http) = {
591 get: "/api/v1/openomci/{id}/alarm"
592 };
593 }
594
595 // Simulate an Alarm
William Kurkian12fc0af2019-04-18 14:27:45 -0400596 rpc SimulateAlarm(SimulateAlarmRequest) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700597 option (google.api.http) = {
598 post: "/api/v1/devices/{id}/simulate_larm"
599 body: "*"
600 };
601 }
602 rpc Subscribe (OfAgentSubscriber) returns (OfAgentSubscriber) {
603 }
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400604
Zack Williams52209662019-02-07 10:15:31 -0700605}
606