blob: e38efbbfea70d6af2db896043be7ce0c9bf3b6eb [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
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +03009option go_package = "github.com/opencord/voltha-protos/v3/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";
Zack Williams52209662019-02-07 10:15:31 -070026
27option java_package = "org.opencord.voltha";
28option java_outer_classname = "VolthaProtos";
29option csharp_namespace = "Opencord.Voltha.Voltha";
30
31message DeviceGroup {
32
33 string id = 1 [(access) = READ_ONLY];
34
35 repeated LogicalDevice logical_devices = 2 [(child_node) = {key: "id"}];
36
37 repeated Device devices = 3 [(child_node) = {key: "id"}];
38}
39
40message DeviceGroups {
41 repeated DeviceGroup items = 1;
42}
43
44
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000045message EventFilterRuleKey {
Zack Williams52209662019-02-07 10:15:31 -070046
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000047 enum EventFilterRuleType {
48 filter_all = 0;
49 category = 1;
50 sub_category = 2;
51 kpi_event_type = 3;
52 config_event_type = 4;
53 device_event_type = 5;
Zack Williams52209662019-02-07 10:15:31 -070054 }
55}
56
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000057message EventFilterRule {
58 EventFilterRuleKey.EventFilterRuleType key = 1;
Zack Williams52209662019-02-07 10:15:31 -070059 string value = 2;
60}
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000061message EventFilter {
Zack Williams52209662019-02-07 10:15:31 -070062 string id = 1 [(access) = READ_ONLY];
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000063 bool enable = 2;
64 string device_id = 3;
65 string event_type = 4;
66 repeated EventFilterRule rules = 5;
Zack Williams52209662019-02-07 10:15:31 -070067}
68
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000069message EventFilters {
70 repeated EventFilter filters = 1;
Zack Williams52209662019-02-07 10:15:31 -070071}
72
Zack Williams52209662019-02-07 10:15:31 -070073// CoreInstance represents a core instance. It is data held in memory when a core
74// is running. This data is not persistent.
75message CoreInstance {
Zack Williams52209662019-02-07 10:15:31 -070076
77 string instance_id = 1 [(access) = READ_ONLY];
78
79 HealthStatus health = 2 [(child_node) = {}];
80
81}
82
83message CoreInstances {
Zack Williams52209662019-02-07 10:15:31 -070084 repeated CoreInstance items = 1;
85}
86
87// Voltha represents the Voltha cluster data. Each Core instance will hold a subset of
88// the entire cluster. However, some items (e.g. adapters) will be held by all cores
89// for better performance
90message Voltha {
Zack Williams52209662019-02-07 10:15:31 -070091
92 string version = 1 [(access) = READ_ONLY];
93
94 repeated Adapter adapters = 2 [(child_node) = {key: "id"}];
95
96 repeated LogicalDevice logical_devices = 3 [(child_node) = {key: "id"}];
97
98 repeated Device devices = 4 [(child_node) = {key: "id"}];
99
100 repeated DeviceType device_types = 5 [(child_node) = {key: "id"}];
101
102 repeated DeviceGroup device_groups = 6 [(child_node) = {key: "id"}];
103
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000104 repeated EventFilter event_filters = 7 [(child_node) = {key: "id"}];
Zack Williams52209662019-02-07 10:15:31 -0700105
106 repeated
107 omci.MibDeviceData omci_mib_database = 28
108 [(child_node) = {key: "device_id"}];
109
110 repeated
William Kurkian12fc0af2019-04-18 14:27:45 -0400111 omci.AlarmDeviceData omci_alarm_database = 29
Zack Williams52209662019-02-07 10:15:31 -0700112 [(child_node) = {key: "device_id"}];
113}
114
115// Device Self Test Response
116message SelfTestResponse {
Zack Williams52209662019-02-07 10:15:31 -0700117
118 enum SelfTestResult {
119 SUCCESS = 0;
120 FAILURE = 1;
121 NOT_SUPPORTED = 2;
122 UNKNOWN_ERROR = 3;
123 }
124 SelfTestResult result = 1;
125}
126
127message OfAgentSubscriber {
128 // ID of ofagent instance
129 string ofagent_id = 1;
130
131 // ID of voltha instance to which the ofagent is subscribed
132 string voltha_id = 2;
133}
134
William Kurkian6ea97f82019-03-13 15:51:55 -0400135// Identifies a membership group a Core belongs to
136message Membership {
137 // Group name
138 string group_name = 1;
139
140 // Unique ID of a container within that group
141 string id = 2;
142}
143
manikkaraj k166cb202019-07-28 13:05:56 -0400144// Additional information required to process flow at device adapters
145message FlowMetadata {
146 // Meters associated with flow-update to adapter
147 repeated openflow_13.ofp_meter_config meters = 1;
148}
149
Zack Williams52209662019-02-07 10:15:31 -0700150/*
151 * Voltha APIs
152 *
153 */
154service VolthaService {
155
156 // Get more information on a given physical device
Scott Baker99af94e2019-08-20 10:45:06 -0700157 rpc UpdateLogLevel(common.Logging) returns(google.protobuf.Empty) {
158 option (google.api.http) = {
159 post: "/api/v1/logs"
160 body: "*"
161 };
162 }
163
164 rpc GetLogLevels(common.LoggingComponent) returns (common.Loggings) {
Zack Williams52209662019-02-07 10:15:31 -0700165 option (google.api.http) = {
166 get: "/api/v1/logs"
167 };
168 }
169
William Kurkian6ea97f82019-03-13 15:51:55 -0400170 // Get the membership group of a Voltha Core
171 rpc GetMembership(google.protobuf.Empty) returns(Membership) {
172 option (google.api.http) = {
173 get: "/api/v1/membership"
174 };
175 }
176
177 // Set the membership group of a Voltha Core
178 rpc UpdateMembership(Membership) returns(google.protobuf.Empty) {
179 option (google.api.http) = {
180 post: "/api/v1/membership"
181 body: "*"
182 };
183 }
184
Zack Williams52209662019-02-07 10:15:31 -0700185 // Get high level information on the Voltha cluster
186 rpc GetVoltha(google.protobuf.Empty) returns(Voltha) {
187 option (google.api.http) = {
188 get: "/api/v1"
189 };
190 }
191
192 // List all Voltha cluster core instances
193 rpc ListCoreInstances(google.protobuf.Empty) returns(CoreInstances) {
194 option (google.api.http) = {
195 get: "/api/v1/instances"
196 };
Zack Williams52209662019-02-07 10:15:31 -0700197 }
198
199 // Get details on a Voltha cluster instance
William Kurkian12fc0af2019-04-18 14:27:45 -0400200 rpc GetCoreInstance(common.ID) returns(CoreInstance) {
Zack Williams52209662019-02-07 10:15:31 -0700201 option (google.api.http) = {
202 get: "/api/v1/instances/{id}"
203 };
204 }
205
206 // List all active adapters (plugins) in the Voltha cluster
207 rpc ListAdapters(google.protobuf.Empty) returns(Adapters) {
208 option (google.api.http) = {
209 get: "/api/v1/adapters"
210 };
Zack Williams52209662019-02-07 10:15:31 -0700211 }
212
213
214 // List all logical devices managed by the Voltha cluster
215 rpc ListLogicalDevices(google.protobuf.Empty) returns(LogicalDevices) {
216 option (google.api.http) = {
217 get: "/api/v1/logical_devices"
218 };
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 };
Zack Williams52209662019-02-07 10:15:31 -0700233 }
234
235 // Gets a logical device port
236 rpc GetLogicalDevicePort(LogicalPortId) returns(LogicalPort) {
237 option (google.api.http) = {
238 get: "/api/v1/logical_devices/{id}/ports/{port_id}"
239 };
Zack Williams52209662019-02-07 10:15:31 -0700240 }
241
242 // Enables a logical device port
243 rpc EnableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
244 option (google.api.http) = {
245 post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable"
246 };
247 }
248
249 // Disables a logical device port
250 rpc DisableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
251 option (google.api.http) = {
252 post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable"
253 };
254 }
255
256 // List all flows of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400257 rpc ListLogicalDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700258 option (google.api.http) = {
259 get: "/api/v1/logical_devices/{id}/flows"
260 };
Zack Williams52209662019-02-07 10:15:31 -0700261 }
262
263 // Update flow table for logical device
264 rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate)
265 returns(google.protobuf.Empty) {
266 option (google.api.http) = {
267 post: "/api/v1/logical_devices/{id}/flows"
268 body: "*"
269 };
270 }
271
272 // Update meter table for logical device
273 rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate)
274 returns(google.protobuf.Empty) {
275 option (google.api.http) = {
276 post: "/api/v1/logical_devices/{id}/meters"
277 body: "*"
278 };
279 }
280
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400281 // List all meters of a logical device
282 rpc ListLogicalDeviceMeters(common.ID) returns (openflow_13.Meters) {
Zack Williams52209662019-02-07 10:15:31 -0700283 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400284 get: "/api/v1/logical_devices/{id}/meters"
Zack Williams52209662019-02-07 10:15:31 -0700285 };
286 }
287
288 // List all flow groups of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400289 rpc ListLogicalDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700290 option (google.api.http) = {
291 get: "/api/v1/logical_devices/{id}/flow_groups"
292 };
Zack Williams52209662019-02-07 10:15:31 -0700293 }
294
295 // Update group table for device
296 rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate)
297 returns(google.protobuf.Empty) {
298 option (google.api.http) = {
299 post: "/api/v1/logical_devices/{id}/flow_groups"
300 body: "*"
301 };
302 }
303
304 // List all physical devices controlled by the Voltha cluster
305 rpc ListDevices(google.protobuf.Empty) returns(Devices) {
306 option (google.api.http) = {
307 get: "/api/v1/devices"
308 };
Zack Williams52209662019-02-07 10:15:31 -0700309 }
310
311 // List all physical devices IDs controlled by the Voltha cluster
William Kurkian12fc0af2019-04-18 14:27:45 -0400312 rpc ListDeviceIds(google.protobuf.Empty) returns(common.IDs) {
Zack Williams52209662019-02-07 10:15:31 -0700313 option (google.api.http) = {
314 get: "/api/v1/deviceids"
315 };
Zack Williams52209662019-02-07 10:15:31 -0700316 }
317
318 // Request to a voltha Core to reconcile a set of devices based on their IDs
William Kurkian12fc0af2019-04-18 14:27:45 -0400319 rpc ReconcileDevices(common.IDs) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700320 option (google.api.http) = {
321 post: "/api/v1/deviceids"
322 body: "*"
323 };
324 }
325
326 // Get more information on a given physical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400327 rpc GetDevice(common.ID) returns(Device) {
Zack Williams52209662019-02-07 10:15:31 -0700328 option (google.api.http) = {
329 get: "/api/v1/devices/{id}"
330 };
331 }
332
333 // Pre-provision a new physical device
334 rpc CreateDevice(Device) returns(Device) {
335 option (google.api.http) = {
336 post: "/api/v1/devices"
337 body: "*"
338 };
339 }
340
341 // Enable a device. If the device was in pre-provisioned state then it
342 // will transition to ENABLED state. If it was is DISABLED state then it
343 // will transition to ENABLED state as well.
William Kurkian12fc0af2019-04-18 14:27:45 -0400344 rpc EnableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700345 option (google.api.http) = {
346 post: "/api/v1/devices/{id}/enable"
347 };
348 }
349
350 // Disable a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400351 rpc DisableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700352 option (google.api.http) = {
353 post: "/api/v1/devices/{id}/disable"
354 };
355 }
356
357 // Reboot a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400358 rpc RebootDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700359 option (google.api.http) = {
360 post: "/api/v1/devices/{id}/reboot"
361 };
362 }
363
364 // Delete a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400365 rpc DeleteDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700366 option (google.api.http) = {
367 delete: "/api/v1/devices/{id}/delete"
368 };
369 }
370
371 // Request an image download to the standby partition
372 // of a device.
373 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400374 rpc DownloadImage(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700375 option (google.api.http) = {
376 post: "/api/v1/devices/{id}/image_downloads/{name}"
377 body: "*"
378 };
379 }
380
381 // Get image download status on a device
382 // The request retrieves progress on device and updates db record
383 rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {
384 option (google.api.http) = {
385 get: "/api/v1/devices/{id}/image_downloads/{name}/status"
386 };
387 }
388
389 // Get image download db record
390 rpc GetImageDownload(ImageDownload) returns(ImageDownload) {
391 option (google.api.http) = {
392 get: "/api/v1/devices/{id}/image_downloads/{name}"
393 };
394 }
395
396 // List image download db records for a given device
William Kurkian12fc0af2019-04-18 14:27:45 -0400397 rpc ListImageDownloads(common.ID) returns(ImageDownloads) {
Zack Williams52209662019-02-07 10:15:31 -0700398 option (google.api.http) = {
399 get: "/api/v1/devices/{id}/image_downloads"
400 };
401 }
402
403 // Cancel an existing image download process on a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400404 rpc CancelImageDownload(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700405 option (google.api.http) = {
406 delete: "/api/v1/devices/{id}/image_downloads/{name}"
407 };
408 }
409
410 // Activate the specified image at a standby partition
411 // to active partition.
412 // Depending on the device implementation, this call
413 // may or may not cause device reboot.
414 // If no reboot, then a reboot is required to make the
415 // activated image running on device
416 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400417 rpc ActivateImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700418 option (google.api.http) = {
419 post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
420 body: "*"
421 };
422 }
423
424 // Revert the specified image at standby partition
425 // to active partition, and revert to previous image
426 // Depending on the device implementation, this call
427 // may or may not cause device reboot.
428 // If no reboot, then a reboot is required to make the
429 // previous image running on device
430 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400431 rpc RevertImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700432 option (google.api.http) = {
433 post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
434 body: "*"
435 };
436 }
437
438 // List ports of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400439 rpc ListDevicePorts(common.ID) returns(Ports) {
Zack Williams52209662019-02-07 10:15:31 -0700440 option (google.api.http) = {
441 get: "/api/v1/devices/{id}/ports"
442 };
Zack Williams52209662019-02-07 10:15:31 -0700443 }
444
445 // List pm config of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400446 rpc ListDevicePmConfigs(common.ID) returns(PmConfigs) {
Zack Williams52209662019-02-07 10:15:31 -0700447 option (google.api.http) = {
448 get: "/api/v1/devices/{id}/pm_configs"
449 };
450 }
451
452 // Update the pm config of a device
453 rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {
454 option (google.api.http) = {
455 post: "/api/v1/devices/{id}/pm_configs"
456 body: "*"
457 };
458 }
459
460 // List all flows of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400461 rpc ListDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700462 option (google.api.http) = {
463 get: "/api/v1/devices/{id}/flows"
464 };
Zack Williams52209662019-02-07 10:15:31 -0700465 }
466
467 // List all flow groups of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400468 rpc ListDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700469 option (google.api.http) = {
470 get: "/api/v1/devices/{id}/flow_groups"
471 };
Zack Williams52209662019-02-07 10:15:31 -0700472 }
473
474 // List device types known to Voltha
475 rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {
476 option (google.api.http) = {
477 get: "/api/v1/device_types"
478 };
Zack Williams52209662019-02-07 10:15:31 -0700479 }
480
481 // Get additional information on a device type
William Kurkian12fc0af2019-04-18 14:27:45 -0400482 rpc GetDeviceType(common.ID) returns(DeviceType) {
Zack Williams52209662019-02-07 10:15:31 -0700483 option (google.api.http) = {
484 get: "/api/v1/device_types/{id}"
485 };
486 }
487
488 // List all device sharding groups
489 rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {
490 option (google.api.http) = {
491 get: "/api/v1/device_groups"
492 };
Zack Williams52209662019-02-07 10:15:31 -0700493 }
494
495 // Stream control packets to the dataplane
496 rpc StreamPacketsOut(stream openflow_13.PacketOut)
497 returns(google.protobuf.Empty) {
498 // This does not have an HTTP representation
499 }
500
501 // Receive control packet stream
502 rpc ReceivePacketsIn(google.protobuf.Empty)
503 returns(stream openflow_13.PacketIn) {
504 // This does not have an HTTP representation
505 }
506
507 rpc ReceiveChangeEvents(google.protobuf.Empty)
508 returns(stream openflow_13.ChangeEvent) {
509 // This does not have an HTTP representation
510 }
511
512 // Get additional information on a device group
William Kurkian12fc0af2019-04-18 14:27:45 -0400513 rpc GetDeviceGroup(common.ID) returns(DeviceGroup) {
Zack Williams52209662019-02-07 10:15:31 -0700514 option (google.api.http) = {
515 get: "/api/v1/device_groups/{id}"
516 };
517 }
518
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000519 rpc CreateEventFilter(EventFilter) returns(EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700520 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000521 post: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700522 body: "*"
523 };
524 }
525
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000526 // Get all filters present for a device
527 rpc GetEventFilter(common.ID) returns(EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700528 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000529 get: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700530 };
531 }
532
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000533 rpc UpdateEventFilter(EventFilter) returns(EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700534 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000535 put: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700536 body: "*"
537 };
538 }
539
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000540 rpc DeleteEventFilter(EventFilter) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700541 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000542 delete: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700543 };
544 }
545
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000546 // Get all the filters present
547 rpc ListEventFilters(google.protobuf.Empty) returns(EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700548 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000549 get: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700550 };
551 }
552
William Kurkian12fc0af2019-04-18 14:27:45 -0400553 rpc GetImages(common.ID) returns(Images) {
Zack Williams52209662019-02-07 10:15:31 -0700554 option (google.api.http) = {
555 get: "/api/v1/devices/{id}/images"
556 };
557 }
558
William Kurkian12fc0af2019-04-18 14:27:45 -0400559 rpc SelfTest(common.ID) returns(SelfTestResponse) {
Zack Williams52209662019-02-07 10:15:31 -0700560 option (google.api.http) = {
561 post: "/api/v1/devices/{id}/self_test"
562 };
563 }
564
565 // OpenOMCI MIB information
William Kurkian12fc0af2019-04-18 14:27:45 -0400566 rpc GetMibDeviceData(common.ID) returns(omci.MibDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700567 option (google.api.http) = {
568 get: "/api/v1/openomci/{id}/mib"
569 };
570 }
571
572 // OpenOMCI ALARM information
William Kurkian12fc0af2019-04-18 14:27:45 -0400573 rpc GetAlarmDeviceData(common.ID) returns(omci.AlarmDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700574 option (google.api.http) = {
575 get: "/api/v1/openomci/{id}/alarm"
576 };
577 }
578
579 // Simulate an Alarm
William Kurkian12fc0af2019-04-18 14:27:45 -0400580 rpc SimulateAlarm(SimulateAlarmRequest) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700581 option (google.api.http) = {
582 post: "/api/v1/devices/{id}/simulate_larm"
583 body: "*"
584 };
585 }
586 rpc Subscribe (OfAgentSubscriber) returns (OfAgentSubscriber) {
587 }
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400588
Zack Williams52209662019-02-07 10:15:31 -0700589}
590