blob: e6d9fdd48e41477efb41d36ff7ec1972cb2f1747 [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
onkar.kundargi7b85fa12020-02-27 13:19:22 +053087message OmciTestRequest {
88 string id = 1;
89 string uuid = 2;
90}
91
92message TestResponse{
93 enum TestResponseResult {
94 SUCCESS = 0;
95 FAILURE = 1;
96 }
97 TestResponseResult result = 1;
98}
99
Zack Williams52209662019-02-07 10:15:31 -0700100// Voltha represents the Voltha cluster data. Each Core instance will hold a subset of
101// the entire cluster. However, some items (e.g. adapters) will be held by all cores
102// for better performance
103message Voltha {
Zack Williams52209662019-02-07 10:15:31 -0700104
105 string version = 1 [(access) = READ_ONLY];
106
107 repeated Adapter adapters = 2 [(child_node) = {key: "id"}];
108
109 repeated LogicalDevice logical_devices = 3 [(child_node) = {key: "id"}];
110
111 repeated Device devices = 4 [(child_node) = {key: "id"}];
112
113 repeated DeviceType device_types = 5 [(child_node) = {key: "id"}];
114
115 repeated DeviceGroup device_groups = 6 [(child_node) = {key: "id"}];
116
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000117 repeated EventFilter event_filters = 7 [(child_node) = {key: "id"}];
Zack Williams52209662019-02-07 10:15:31 -0700118
119 repeated
120 omci.MibDeviceData omci_mib_database = 28
121 [(child_node) = {key: "device_id"}];
122
123 repeated
William Kurkian12fc0af2019-04-18 14:27:45 -0400124 omci.AlarmDeviceData omci_alarm_database = 29
Zack Williams52209662019-02-07 10:15:31 -0700125 [(child_node) = {key: "device_id"}];
126}
127
128// Device Self Test Response
129message SelfTestResponse {
Zack Williams52209662019-02-07 10:15:31 -0700130
131 enum SelfTestResult {
132 SUCCESS = 0;
133 FAILURE = 1;
134 NOT_SUPPORTED = 2;
135 UNKNOWN_ERROR = 3;
136 }
137 SelfTestResult result = 1;
138}
139
140message OfAgentSubscriber {
141 // ID of ofagent instance
142 string ofagent_id = 1;
143
144 // ID of voltha instance to which the ofagent is subscribed
145 string voltha_id = 2;
146}
147
William Kurkian6ea97f82019-03-13 15:51:55 -0400148// Identifies a membership group a Core belongs to
149message Membership {
150 // Group name
151 string group_name = 1;
152
153 // Unique ID of a container within that group
154 string id = 2;
155}
156
manikkaraj k166cb202019-07-28 13:05:56 -0400157// Additional information required to process flow at device adapters
158message FlowMetadata {
159 // Meters associated with flow-update to adapter
160 repeated openflow_13.ofp_meter_config meters = 1;
161}
162
Zack Williams52209662019-02-07 10:15:31 -0700163/*
164 * Voltha APIs
165 *
166 */
167service VolthaService {
168
William Kurkian6ea97f82019-03-13 15:51:55 -0400169 // Get the membership group of a Voltha Core
170 rpc GetMembership(google.protobuf.Empty) returns(Membership) {
171 option (google.api.http) = {
172 get: "/api/v1/membership"
173 };
174 }
175
176 // Set the membership group of a Voltha Core
177 rpc UpdateMembership(Membership) returns(google.protobuf.Empty) {
178 option (google.api.http) = {
179 post: "/api/v1/membership"
180 body: "*"
181 };
182 }
183
Zack Williams52209662019-02-07 10:15:31 -0700184 // Get high level information on the Voltha cluster
185 rpc GetVoltha(google.protobuf.Empty) returns(Voltha) {
186 option (google.api.http) = {
187 get: "/api/v1"
188 };
189 }
190
191 // List all Voltha cluster core instances
192 rpc ListCoreInstances(google.protobuf.Empty) returns(CoreInstances) {
193 option (google.api.http) = {
194 get: "/api/v1/instances"
195 };
Zack Williams52209662019-02-07 10:15:31 -0700196 }
197
198 // Get details on a Voltha cluster instance
William Kurkian12fc0af2019-04-18 14:27:45 -0400199 rpc GetCoreInstance(common.ID) returns(CoreInstance) {
Zack Williams52209662019-02-07 10:15:31 -0700200 option (google.api.http) = {
201 get: "/api/v1/instances/{id}"
202 };
203 }
204
205 // List all active adapters (plugins) in the Voltha cluster
206 rpc ListAdapters(google.protobuf.Empty) returns(Adapters) {
207 option (google.api.http) = {
208 get: "/api/v1/adapters"
209 };
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 };
Zack Williams52209662019-02-07 10:15:31 -0700218 }
219
220 // Get additional information on a given logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400221 rpc GetLogicalDevice(common.ID) returns(LogicalDevice) {
Zack Williams52209662019-02-07 10:15:31 -0700222 option (google.api.http) = {
223 get: "/api/v1/logical_devices/{id}"
224 };
225 }
226
227 // List ports of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400228 rpc ListLogicalDevicePorts(common.ID) returns(LogicalPorts) {
Zack Williams52209662019-02-07 10:15:31 -0700229 option (google.api.http) = {
230 get: "/api/v1/logical_devices/{id}/ports"
231 };
Zack Williams52209662019-02-07 10:15:31 -0700232 }
233
234 // Gets a logical device port
235 rpc GetLogicalDevicePort(LogicalPortId) returns(LogicalPort) {
236 option (google.api.http) = {
237 get: "/api/v1/logical_devices/{id}/ports/{port_id}"
238 };
Zack Williams52209662019-02-07 10:15:31 -0700239 }
240
241 // Enables a logical device port
242 rpc EnableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
243 option (google.api.http) = {
244 post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable"
245 };
246 }
247
248 // Disables a logical device port
249 rpc DisableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
250 option (google.api.http) = {
251 post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable"
252 };
253 }
254
255 // List all flows of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400256 rpc ListLogicalDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700257 option (google.api.http) = {
258 get: "/api/v1/logical_devices/{id}/flows"
259 };
Zack Williams52209662019-02-07 10:15:31 -0700260 }
261
262 // Update flow table for logical device
263 rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate)
264 returns(google.protobuf.Empty) {
265 option (google.api.http) = {
266 post: "/api/v1/logical_devices/{id}/flows"
267 body: "*"
268 };
269 }
270
271 // Update meter table for logical device
272 rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate)
273 returns(google.protobuf.Empty) {
274 option (google.api.http) = {
275 post: "/api/v1/logical_devices/{id}/meters"
276 body: "*"
277 };
278 }
279
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400280 // List all meters of a logical device
281 rpc ListLogicalDeviceMeters(common.ID) returns (openflow_13.Meters) {
Zack Williams52209662019-02-07 10:15:31 -0700282 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400283 get: "/api/v1/logical_devices/{id}/meters"
Zack Williams52209662019-02-07 10:15:31 -0700284 };
285 }
286
287 // List all flow groups of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400288 rpc ListLogicalDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700289 option (google.api.http) = {
290 get: "/api/v1/logical_devices/{id}/flow_groups"
291 };
Zack Williams52209662019-02-07 10:15:31 -0700292 }
293
294 // Update group table for device
295 rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate)
296 returns(google.protobuf.Empty) {
297 option (google.api.http) = {
298 post: "/api/v1/logical_devices/{id}/flow_groups"
299 body: "*"
300 };
301 }
302
303 // List all physical devices controlled by the Voltha cluster
304 rpc ListDevices(google.protobuf.Empty) returns(Devices) {
305 option (google.api.http) = {
306 get: "/api/v1/devices"
307 };
Zack Williams52209662019-02-07 10:15:31 -0700308 }
309
310 // List all physical devices IDs controlled by the Voltha cluster
William Kurkian12fc0af2019-04-18 14:27:45 -0400311 rpc ListDeviceIds(google.protobuf.Empty) returns(common.IDs) {
Zack Williams52209662019-02-07 10:15:31 -0700312 option (google.api.http) = {
313 get: "/api/v1/deviceids"
314 };
Zack Williams52209662019-02-07 10:15:31 -0700315 }
316
317 // Request to a voltha Core to reconcile a set of devices based on their IDs
William Kurkian12fc0af2019-04-18 14:27:45 -0400318 rpc ReconcileDevices(common.IDs) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700319 option (google.api.http) = {
320 post: "/api/v1/deviceids"
321 body: "*"
322 };
323 }
324
325 // Get more information on a given physical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400326 rpc GetDevice(common.ID) returns(Device) {
Zack Williams52209662019-02-07 10:15:31 -0700327 option (google.api.http) = {
328 get: "/api/v1/devices/{id}"
329 };
330 }
331
332 // Pre-provision a new physical device
333 rpc CreateDevice(Device) returns(Device) {
334 option (google.api.http) = {
335 post: "/api/v1/devices"
336 body: "*"
337 };
338 }
339
340 // Enable a device. If the device was in pre-provisioned state then it
341 // will transition to ENABLED state. If it was is DISABLED state then it
342 // will transition to ENABLED state as well.
William Kurkian12fc0af2019-04-18 14:27:45 -0400343 rpc EnableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700344 option (google.api.http) = {
345 post: "/api/v1/devices/{id}/enable"
346 };
347 }
348
349 // Disable a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400350 rpc DisableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700351 option (google.api.http) = {
352 post: "/api/v1/devices/{id}/disable"
353 };
354 }
355
356 // Reboot a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400357 rpc RebootDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700358 option (google.api.http) = {
359 post: "/api/v1/devices/{id}/reboot"
360 };
361 }
362
363 // Delete a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400364 rpc DeleteDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700365 option (google.api.http) = {
366 delete: "/api/v1/devices/{id}/delete"
367 };
368 }
369
370 // Request an image download to the standby partition
371 // of a device.
372 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400373 rpc DownloadImage(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700374 option (google.api.http) = {
375 post: "/api/v1/devices/{id}/image_downloads/{name}"
376 body: "*"
377 };
378 }
379
380 // Get image download status on a device
381 // The request retrieves progress on device and updates db record
382 rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {
383 option (google.api.http) = {
384 get: "/api/v1/devices/{id}/image_downloads/{name}/status"
385 };
386 }
387
388 // Get image download db record
389 rpc GetImageDownload(ImageDownload) returns(ImageDownload) {
390 option (google.api.http) = {
391 get: "/api/v1/devices/{id}/image_downloads/{name}"
392 };
393 }
394
395 // List image download db records for a given device
William Kurkian12fc0af2019-04-18 14:27:45 -0400396 rpc ListImageDownloads(common.ID) returns(ImageDownloads) {
Zack Williams52209662019-02-07 10:15:31 -0700397 option (google.api.http) = {
398 get: "/api/v1/devices/{id}/image_downloads"
399 };
400 }
401
402 // Cancel an existing image download process on a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400403 rpc CancelImageDownload(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700404 option (google.api.http) = {
405 delete: "/api/v1/devices/{id}/image_downloads/{name}"
406 };
407 }
408
409 // Activate the specified image at a standby partition
410 // to active partition.
411 // Depending on the device implementation, this call
412 // may or may not cause device reboot.
413 // If no reboot, then a reboot is required to make the
414 // activated image running on device
415 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400416 rpc ActivateImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700417 option (google.api.http) = {
418 post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
419 body: "*"
420 };
421 }
422
423 // Revert the specified image at standby partition
424 // to active partition, and revert to previous image
425 // Depending on the device implementation, this call
426 // may or may not cause device reboot.
427 // If no reboot, then a reboot is required to make the
428 // previous image running on device
429 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400430 rpc RevertImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700431 option (google.api.http) = {
432 post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
433 body: "*"
434 };
435 }
436
437 // List ports of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400438 rpc ListDevicePorts(common.ID) returns(Ports) {
Zack Williams52209662019-02-07 10:15:31 -0700439 option (google.api.http) = {
440 get: "/api/v1/devices/{id}/ports"
441 };
Zack Williams52209662019-02-07 10:15:31 -0700442 }
443
444 // List pm config of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400445 rpc ListDevicePmConfigs(common.ID) returns(PmConfigs) {
Zack Williams52209662019-02-07 10:15:31 -0700446 option (google.api.http) = {
447 get: "/api/v1/devices/{id}/pm_configs"
448 };
449 }
450
451 // Update the pm config of a device
452 rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {
453 option (google.api.http) = {
454 post: "/api/v1/devices/{id}/pm_configs"
455 body: "*"
456 };
457 }
458
459 // List all flows of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400460 rpc ListDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700461 option (google.api.http) = {
462 get: "/api/v1/devices/{id}/flows"
463 };
Zack Williams52209662019-02-07 10:15:31 -0700464 }
465
466 // List all flow groups of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400467 rpc ListDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700468 option (google.api.http) = {
469 get: "/api/v1/devices/{id}/flow_groups"
470 };
Zack Williams52209662019-02-07 10:15:31 -0700471 }
472
473 // List device types known to Voltha
474 rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {
475 option (google.api.http) = {
476 get: "/api/v1/device_types"
477 };
Zack Williams52209662019-02-07 10:15:31 -0700478 }
479
480 // Get additional information on a device type
William Kurkian12fc0af2019-04-18 14:27:45 -0400481 rpc GetDeviceType(common.ID) returns(DeviceType) {
Zack Williams52209662019-02-07 10:15:31 -0700482 option (google.api.http) = {
483 get: "/api/v1/device_types/{id}"
484 };
485 }
486
487 // List all device sharding groups
488 rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {
489 option (google.api.http) = {
490 get: "/api/v1/device_groups"
491 };
Zack Williams52209662019-02-07 10:15:31 -0700492 }
493
494 // Stream control packets to the dataplane
495 rpc StreamPacketsOut(stream openflow_13.PacketOut)
496 returns(google.protobuf.Empty) {
497 // This does not have an HTTP representation
498 }
499
500 // Receive control packet stream
501 rpc ReceivePacketsIn(google.protobuf.Empty)
502 returns(stream openflow_13.PacketIn) {
503 // This does not have an HTTP representation
504 }
505
506 rpc ReceiveChangeEvents(google.protobuf.Empty)
507 returns(stream openflow_13.ChangeEvent) {
508 // This does not have an HTTP representation
509 }
510
511 // Get additional information on a device group
William Kurkian12fc0af2019-04-18 14:27:45 -0400512 rpc GetDeviceGroup(common.ID) returns(DeviceGroup) {
Zack Williams52209662019-02-07 10:15:31 -0700513 option (google.api.http) = {
514 get: "/api/v1/device_groups/{id}"
515 };
516 }
517
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000518 rpc CreateEventFilter(EventFilter) returns(EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700519 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000520 post: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700521 body: "*"
522 };
523 }
524
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000525 // Get all filters present for a device
526 rpc GetEventFilter(common.ID) returns(EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700527 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000528 get: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700529 };
530 }
531
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000532 rpc UpdateEventFilter(EventFilter) returns(EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700533 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000534 put: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700535 body: "*"
536 };
537 }
538
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000539 rpc DeleteEventFilter(EventFilter) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700540 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000541 delete: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700542 };
543 }
544
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000545 // Get all the filters present
546 rpc ListEventFilters(google.protobuf.Empty) returns(EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700547 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000548 get: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700549 };
550 }
551
William Kurkian12fc0af2019-04-18 14:27:45 -0400552 rpc GetImages(common.ID) returns(Images) {
Zack Williams52209662019-02-07 10:15:31 -0700553 option (google.api.http) = {
554 get: "/api/v1/devices/{id}/images"
555 };
556 }
557
William Kurkian12fc0af2019-04-18 14:27:45 -0400558 rpc SelfTest(common.ID) returns(SelfTestResponse) {
Zack Williams52209662019-02-07 10:15:31 -0700559 option (google.api.http) = {
560 post: "/api/v1/devices/{id}/self_test"
561 };
562 }
563
564 // OpenOMCI MIB information
William Kurkian12fc0af2019-04-18 14:27:45 -0400565 rpc GetMibDeviceData(common.ID) returns(omci.MibDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700566 option (google.api.http) = {
567 get: "/api/v1/openomci/{id}/mib"
568 };
569 }
570
571 // OpenOMCI ALARM information
William Kurkian12fc0af2019-04-18 14:27:45 -0400572 rpc GetAlarmDeviceData(common.ID) returns(omci.AlarmDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700573 option (google.api.http) = {
574 get: "/api/v1/openomci/{id}/alarm"
575 };
576 }
577
578 // Simulate an Alarm
William Kurkian12fc0af2019-04-18 14:27:45 -0400579 rpc SimulateAlarm(SimulateAlarmRequest) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700580 option (google.api.http) = {
581 post: "/api/v1/devices/{id}/simulate_larm"
582 body: "*"
583 };
584 }
585 rpc Subscribe (OfAgentSubscriber) returns (OfAgentSubscriber) {
586 }
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400587
kesavand4a002b02020-01-23 21:29:47 -0500588 rpc EnablePort(voltha.Port) returns(google.protobuf.Empty) {
589 option (google.api.http) = {
590 post: "/v1/EnablePort"
591 body: "*"
592 };
593 }
594 rpc DisablePort(voltha.Port) returns(google.protobuf.Empty) {
595 option (google.api.http) = {
596 post: "/v1/DisablePort"
597 body: "*"
598 };
599 }
Dinesh Belwalkared6da5e2020-02-25 11:23:57 -0800600 rpc GetExtValue(common.ValueSpecifier) returns(common.ReturnValues) {
601 option (google.api.http) = {
602 get: "/api/v1/GetExtValue"
603 };
604 }
kesavand4a002b02020-01-23 21:29:47 -0500605
onkar.kundargi7b85fa12020-02-27 13:19:22 +0530606 // omci start and stop cli implementation
607 rpc StartOmciTestAction(OmciTestRequest) returns(TestResponse) {
608 option (google.api.http) = {
609 post: "/api/v1/start_omci_test"
610 body: "*"
611 };
612 }
Zack Williams52209662019-02-07 10:15:31 -0700613}
614