blob: 8fcbb4326d37d4c15feefafea4104fb6013a90b5 [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
William Kurkian6ea97f82019-03-13 15:51:55 -0400156 // Get the membership group of a Voltha Core
157 rpc GetMembership(google.protobuf.Empty) returns(Membership) {
158 option (google.api.http) = {
159 get: "/api/v1/membership"
160 };
161 }
162
163 // Set the membership group of a Voltha Core
164 rpc UpdateMembership(Membership) returns(google.protobuf.Empty) {
165 option (google.api.http) = {
166 post: "/api/v1/membership"
167 body: "*"
168 };
169 }
170
Zack Williams52209662019-02-07 10:15:31 -0700171 // Get high level information on the Voltha cluster
172 rpc GetVoltha(google.protobuf.Empty) returns(Voltha) {
173 option (google.api.http) = {
174 get: "/api/v1"
175 };
176 }
177
178 // List all Voltha cluster core instances
179 rpc ListCoreInstances(google.protobuf.Empty) returns(CoreInstances) {
180 option (google.api.http) = {
181 get: "/api/v1/instances"
182 };
Zack Williams52209662019-02-07 10:15:31 -0700183 }
184
185 // Get details on a Voltha cluster instance
William Kurkian12fc0af2019-04-18 14:27:45 -0400186 rpc GetCoreInstance(common.ID) returns(CoreInstance) {
Zack Williams52209662019-02-07 10:15:31 -0700187 option (google.api.http) = {
188 get: "/api/v1/instances/{id}"
189 };
190 }
191
192 // List all active adapters (plugins) in the Voltha cluster
193 rpc ListAdapters(google.protobuf.Empty) returns(Adapters) {
194 option (google.api.http) = {
195 get: "/api/v1/adapters"
196 };
Zack Williams52209662019-02-07 10:15:31 -0700197 }
198
199
200 // List all logical devices managed by the Voltha cluster
201 rpc ListLogicalDevices(google.protobuf.Empty) returns(LogicalDevices) {
202 option (google.api.http) = {
203 get: "/api/v1/logical_devices"
204 };
Zack Williams52209662019-02-07 10:15:31 -0700205 }
206
207 // Get additional information on a given logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400208 rpc GetLogicalDevice(common.ID) returns(LogicalDevice) {
Zack Williams52209662019-02-07 10:15:31 -0700209 option (google.api.http) = {
210 get: "/api/v1/logical_devices/{id}"
211 };
212 }
213
214 // List ports of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400215 rpc ListLogicalDevicePorts(common.ID) returns(LogicalPorts) {
Zack Williams52209662019-02-07 10:15:31 -0700216 option (google.api.http) = {
217 get: "/api/v1/logical_devices/{id}/ports"
218 };
Zack Williams52209662019-02-07 10:15:31 -0700219 }
220
221 // Gets a logical device port
222 rpc GetLogicalDevicePort(LogicalPortId) returns(LogicalPort) {
223 option (google.api.http) = {
224 get: "/api/v1/logical_devices/{id}/ports/{port_id}"
225 };
Zack Williams52209662019-02-07 10:15:31 -0700226 }
227
228 // Enables a logical device port
229 rpc EnableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
230 option (google.api.http) = {
231 post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable"
232 };
233 }
234
235 // Disables a logical device port
236 rpc DisableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
237 option (google.api.http) = {
238 post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable"
239 };
240 }
241
242 // List all flows of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400243 rpc ListLogicalDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700244 option (google.api.http) = {
245 get: "/api/v1/logical_devices/{id}/flows"
246 };
Zack Williams52209662019-02-07 10:15:31 -0700247 }
248
249 // Update flow table for logical device
250 rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate)
251 returns(google.protobuf.Empty) {
252 option (google.api.http) = {
253 post: "/api/v1/logical_devices/{id}/flows"
254 body: "*"
255 };
256 }
257
258 // Update meter table for logical device
259 rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate)
260 returns(google.protobuf.Empty) {
261 option (google.api.http) = {
262 post: "/api/v1/logical_devices/{id}/meters"
263 body: "*"
264 };
265 }
266
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400267 // List all meters of a logical device
268 rpc ListLogicalDeviceMeters(common.ID) returns (openflow_13.Meters) {
Zack Williams52209662019-02-07 10:15:31 -0700269 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400270 get: "/api/v1/logical_devices/{id}/meters"
Zack Williams52209662019-02-07 10:15:31 -0700271 };
272 }
273
274 // List all flow groups of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400275 rpc ListLogicalDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700276 option (google.api.http) = {
277 get: "/api/v1/logical_devices/{id}/flow_groups"
278 };
Zack Williams52209662019-02-07 10:15:31 -0700279 }
280
281 // Update group table for device
282 rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate)
283 returns(google.protobuf.Empty) {
284 option (google.api.http) = {
285 post: "/api/v1/logical_devices/{id}/flow_groups"
286 body: "*"
287 };
288 }
289
290 // List all physical devices controlled by the Voltha cluster
291 rpc ListDevices(google.protobuf.Empty) returns(Devices) {
292 option (google.api.http) = {
293 get: "/api/v1/devices"
294 };
Zack Williams52209662019-02-07 10:15:31 -0700295 }
296
297 // List all physical devices IDs controlled by the Voltha cluster
William Kurkian12fc0af2019-04-18 14:27:45 -0400298 rpc ListDeviceIds(google.protobuf.Empty) returns(common.IDs) {
Zack Williams52209662019-02-07 10:15:31 -0700299 option (google.api.http) = {
300 get: "/api/v1/deviceids"
301 };
Zack Williams52209662019-02-07 10:15:31 -0700302 }
303
304 // Request to a voltha Core to reconcile a set of devices based on their IDs
William Kurkian12fc0af2019-04-18 14:27:45 -0400305 rpc ReconcileDevices(common.IDs) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700306 option (google.api.http) = {
307 post: "/api/v1/deviceids"
308 body: "*"
309 };
310 }
311
312 // Get more information on a given physical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400313 rpc GetDevice(common.ID) returns(Device) {
Zack Williams52209662019-02-07 10:15:31 -0700314 option (google.api.http) = {
315 get: "/api/v1/devices/{id}"
316 };
317 }
318
319 // Pre-provision a new physical device
320 rpc CreateDevice(Device) returns(Device) {
321 option (google.api.http) = {
322 post: "/api/v1/devices"
323 body: "*"
324 };
325 }
326
327 // Enable a device. If the device was in pre-provisioned state then it
328 // will transition to ENABLED state. If it was is DISABLED state then it
329 // will transition to ENABLED state as well.
William Kurkian12fc0af2019-04-18 14:27:45 -0400330 rpc EnableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700331 option (google.api.http) = {
332 post: "/api/v1/devices/{id}/enable"
333 };
334 }
335
336 // Disable a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400337 rpc DisableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700338 option (google.api.http) = {
339 post: "/api/v1/devices/{id}/disable"
340 };
341 }
342
343 // Reboot a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400344 rpc RebootDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700345 option (google.api.http) = {
346 post: "/api/v1/devices/{id}/reboot"
347 };
348 }
349
350 // Delete a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400351 rpc DeleteDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700352 option (google.api.http) = {
353 delete: "/api/v1/devices/{id}/delete"
354 };
355 }
356
357 // Request an image download to the standby partition
358 // of a device.
359 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400360 rpc DownloadImage(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700361 option (google.api.http) = {
362 post: "/api/v1/devices/{id}/image_downloads/{name}"
363 body: "*"
364 };
365 }
366
367 // Get image download status on a device
368 // The request retrieves progress on device and updates db record
369 rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {
370 option (google.api.http) = {
371 get: "/api/v1/devices/{id}/image_downloads/{name}/status"
372 };
373 }
374
375 // Get image download db record
376 rpc GetImageDownload(ImageDownload) returns(ImageDownload) {
377 option (google.api.http) = {
378 get: "/api/v1/devices/{id}/image_downloads/{name}"
379 };
380 }
381
382 // List image download db records for a given device
William Kurkian12fc0af2019-04-18 14:27:45 -0400383 rpc ListImageDownloads(common.ID) returns(ImageDownloads) {
Zack Williams52209662019-02-07 10:15:31 -0700384 option (google.api.http) = {
385 get: "/api/v1/devices/{id}/image_downloads"
386 };
387 }
388
389 // Cancel an existing image download process on a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400390 rpc CancelImageDownload(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700391 option (google.api.http) = {
392 delete: "/api/v1/devices/{id}/image_downloads/{name}"
393 };
394 }
395
396 // Activate the specified image at a standby partition
397 // to active partition.
398 // Depending on the device implementation, this call
399 // may or may not cause device reboot.
400 // If no reboot, then a reboot is required to make the
401 // activated image running on device
402 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400403 rpc ActivateImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700404 option (google.api.http) = {
405 post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
406 body: "*"
407 };
408 }
409
410 // Revert the specified image at standby partition
411 // to active partition, and revert to previous image
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 // previous image running on device
416 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400417 rpc RevertImageUpdate(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_revert"
420 body: "*"
421 };
422 }
423
424 // List ports of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400425 rpc ListDevicePorts(common.ID) returns(Ports) {
Zack Williams52209662019-02-07 10:15:31 -0700426 option (google.api.http) = {
427 get: "/api/v1/devices/{id}/ports"
428 };
Zack Williams52209662019-02-07 10:15:31 -0700429 }
430
431 // List pm config of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400432 rpc ListDevicePmConfigs(common.ID) returns(PmConfigs) {
Zack Williams52209662019-02-07 10:15:31 -0700433 option (google.api.http) = {
434 get: "/api/v1/devices/{id}/pm_configs"
435 };
436 }
437
438 // Update the pm config of a device
439 rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {
440 option (google.api.http) = {
441 post: "/api/v1/devices/{id}/pm_configs"
442 body: "*"
443 };
444 }
445
446 // List all flows of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400447 rpc ListDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700448 option (google.api.http) = {
449 get: "/api/v1/devices/{id}/flows"
450 };
Zack Williams52209662019-02-07 10:15:31 -0700451 }
452
453 // List all flow groups of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400454 rpc ListDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700455 option (google.api.http) = {
456 get: "/api/v1/devices/{id}/flow_groups"
457 };
Zack Williams52209662019-02-07 10:15:31 -0700458 }
459
460 // List device types known to Voltha
461 rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {
462 option (google.api.http) = {
463 get: "/api/v1/device_types"
464 };
Zack Williams52209662019-02-07 10:15:31 -0700465 }
466
467 // Get additional information on a device type
William Kurkian12fc0af2019-04-18 14:27:45 -0400468 rpc GetDeviceType(common.ID) returns(DeviceType) {
Zack Williams52209662019-02-07 10:15:31 -0700469 option (google.api.http) = {
470 get: "/api/v1/device_types/{id}"
471 };
472 }
473
474 // List all device sharding groups
475 rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {
476 option (google.api.http) = {
477 get: "/api/v1/device_groups"
478 };
Zack Williams52209662019-02-07 10:15:31 -0700479 }
480
481 // Stream control packets to the dataplane
482 rpc StreamPacketsOut(stream openflow_13.PacketOut)
483 returns(google.protobuf.Empty) {
484 // This does not have an HTTP representation
485 }
486
487 // Receive control packet stream
488 rpc ReceivePacketsIn(google.protobuf.Empty)
489 returns(stream openflow_13.PacketIn) {
490 // This does not have an HTTP representation
491 }
492
493 rpc ReceiveChangeEvents(google.protobuf.Empty)
494 returns(stream openflow_13.ChangeEvent) {
495 // This does not have an HTTP representation
496 }
497
498 // Get additional information on a device group
William Kurkian12fc0af2019-04-18 14:27:45 -0400499 rpc GetDeviceGroup(common.ID) returns(DeviceGroup) {
Zack Williams52209662019-02-07 10:15:31 -0700500 option (google.api.http) = {
501 get: "/api/v1/device_groups/{id}"
502 };
503 }
504
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000505 rpc CreateEventFilter(EventFilter) returns(EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700506 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000507 post: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700508 body: "*"
509 };
510 }
511
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000512 // Get all filters present for a device
513 rpc GetEventFilter(common.ID) returns(EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700514 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000515 get: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700516 };
517 }
518
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000519 rpc UpdateEventFilter(EventFilter) returns(EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700520 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000521 put: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700522 body: "*"
523 };
524 }
525
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000526 rpc DeleteEventFilter(EventFilter) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700527 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000528 delete: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700529 };
530 }
531
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000532 // Get all the filters present
533 rpc ListEventFilters(google.protobuf.Empty) returns(EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700534 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000535 get: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700536 };
537 }
538
William Kurkian12fc0af2019-04-18 14:27:45 -0400539 rpc GetImages(common.ID) returns(Images) {
Zack Williams52209662019-02-07 10:15:31 -0700540 option (google.api.http) = {
541 get: "/api/v1/devices/{id}/images"
542 };
543 }
544
William Kurkian12fc0af2019-04-18 14:27:45 -0400545 rpc SelfTest(common.ID) returns(SelfTestResponse) {
Zack Williams52209662019-02-07 10:15:31 -0700546 option (google.api.http) = {
547 post: "/api/v1/devices/{id}/self_test"
548 };
549 }
550
551 // OpenOMCI MIB information
William Kurkian12fc0af2019-04-18 14:27:45 -0400552 rpc GetMibDeviceData(common.ID) returns(omci.MibDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700553 option (google.api.http) = {
554 get: "/api/v1/openomci/{id}/mib"
555 };
556 }
557
558 // OpenOMCI ALARM information
William Kurkian12fc0af2019-04-18 14:27:45 -0400559 rpc GetAlarmDeviceData(common.ID) returns(omci.AlarmDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700560 option (google.api.http) = {
561 get: "/api/v1/openomci/{id}/alarm"
562 };
563 }
564
565 // Simulate an Alarm
William Kurkian12fc0af2019-04-18 14:27:45 -0400566 rpc SimulateAlarm(SimulateAlarmRequest) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700567 option (google.api.http) = {
568 post: "/api/v1/devices/{id}/simulate_larm"
569 body: "*"
570 };
571 }
572 rpc Subscribe (OfAgentSubscriber) returns (OfAgentSubscriber) {
573 }
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400574
kesavand4a002b02020-01-23 21:29:47 -0500575 rpc EnablePort(voltha.Port) returns(google.protobuf.Empty) {
576 option (google.api.http) = {
577 post: "/v1/EnablePort"
578 body: "*"
579 };
580 }
581 rpc DisablePort(voltha.Port) returns(google.protobuf.Empty) {
582 option (google.api.http) = {
583 post: "/v1/DisablePort"
584 body: "*"
585 };
586 }
587
Zack Williams52209662019-02-07 10:15:31 -0700588}
589