blob: 53e97d1a467b272f9c7d0e974c032de947ddf48e [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";
dpaul2b52e712020-06-23 13:02:28 +053026import "voltha_protos/ext_config.proto";
Zack Williams52209662019-02-07 10:15:31 -070027
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
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000046message EventFilterRuleKey {
Zack Williams52209662019-02-07 10:15:31 -070047
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000048 enum EventFilterRuleType {
49 filter_all = 0;
50 category = 1;
51 sub_category = 2;
52 kpi_event_type = 3;
53 config_event_type = 4;
54 device_event_type = 5;
Zack Williams52209662019-02-07 10:15:31 -070055 }
56}
57
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000058message EventFilterRule {
59 EventFilterRuleKey.EventFilterRuleType key = 1;
Zack Williams52209662019-02-07 10:15:31 -070060 string value = 2;
61}
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000062message EventFilter {
Zack Williams52209662019-02-07 10:15:31 -070063 string id = 1 [(access) = READ_ONLY];
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000064 bool enable = 2;
65 string device_id = 3;
66 string event_type = 4;
67 repeated EventFilterRule rules = 5;
Zack Williams52209662019-02-07 10:15:31 -070068}
69
Devmalya Paul96a2c9e2019-11-06 07:17:44 +000070message EventFilters {
71 repeated EventFilter filters = 1;
Zack Williams52209662019-02-07 10:15:31 -070072}
73
Zack Williams52209662019-02-07 10:15:31 -070074// CoreInstance represents a core instance. It is data held in memory when a core
75// is running. This data is not persistent.
76message CoreInstance {
Zack Williams52209662019-02-07 10:15:31 -070077
78 string instance_id = 1 [(access) = READ_ONLY];
79
80 HealthStatus health = 2 [(child_node) = {}];
81
82}
83
84message CoreInstances {
Zack Williams52209662019-02-07 10:15:31 -070085 repeated CoreInstance items = 1;
86}
87
onkar.kundargi7b85fa12020-02-27 13:19:22 +053088message OmciTestRequest {
89 string id = 1;
90 string uuid = 2;
91}
92
93message TestResponse{
94 enum TestResponseResult {
95 SUCCESS = 0;
96 FAILURE = 1;
97 }
98 TestResponseResult result = 1;
99}
100
dpaul2b52e712020-06-23 13:02:28 +0530101message ValueSet {
102 string id = 1;
103 oneof value{
104 config.AlarmConfig alarm_config = 2;
105 }
106}
107
Zack Williams52209662019-02-07 10:15:31 -0700108// Voltha represents the Voltha cluster data. Each Core instance will hold a subset of
109// the entire cluster. However, some items (e.g. adapters) will be held by all cores
110// for better performance
111message Voltha {
Zack Williams52209662019-02-07 10:15:31 -0700112
113 string version = 1 [(access) = READ_ONLY];
114
115 repeated Adapter adapters = 2 [(child_node) = {key: "id"}];
116
117 repeated LogicalDevice logical_devices = 3 [(child_node) = {key: "id"}];
118
119 repeated Device devices = 4 [(child_node) = {key: "id"}];
120
121 repeated DeviceType device_types = 5 [(child_node) = {key: "id"}];
122
123 repeated DeviceGroup device_groups = 6 [(child_node) = {key: "id"}];
124
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000125 repeated EventFilter event_filters = 7 [(child_node) = {key: "id"}];
Zack Williams52209662019-02-07 10:15:31 -0700126
127 repeated
128 omci.MibDeviceData omci_mib_database = 28
129 [(child_node) = {key: "device_id"}];
130
131 repeated
William Kurkian12fc0af2019-04-18 14:27:45 -0400132 omci.AlarmDeviceData omci_alarm_database = 29
Zack Williams52209662019-02-07 10:15:31 -0700133 [(child_node) = {key: "device_id"}];
134}
135
136// Device Self Test Response
137message SelfTestResponse {
Zack Williams52209662019-02-07 10:15:31 -0700138
139 enum SelfTestResult {
140 SUCCESS = 0;
141 FAILURE = 1;
142 NOT_SUPPORTED = 2;
143 UNKNOWN_ERROR = 3;
144 }
145 SelfTestResult result = 1;
146}
147
148message OfAgentSubscriber {
149 // ID of ofagent instance
150 string ofagent_id = 1;
151
152 // ID of voltha instance to which the ofagent is subscribed
153 string voltha_id = 2;
154}
155
William Kurkian6ea97f82019-03-13 15:51:55 -0400156// Identifies a membership group a Core belongs to
157message Membership {
158 // Group name
159 string group_name = 1;
160
161 // Unique ID of a container within that group
162 string id = 2;
163}
164
manikkaraj k166cb202019-07-28 13:05:56 -0400165// Additional information required to process flow at device adapters
166message FlowMetadata {
167 // Meters associated with flow-update to adapter
168 repeated openflow_13.ofp_meter_config meters = 1;
169}
170
Zack Williams52209662019-02-07 10:15:31 -0700171/*
172 * Voltha APIs
173 *
174 */
175service VolthaService {
176
William Kurkian6ea97f82019-03-13 15:51:55 -0400177 // Get the membership group of a Voltha Core
178 rpc GetMembership(google.protobuf.Empty) returns(Membership) {
179 option (google.api.http) = {
180 get: "/api/v1/membership"
181 };
182 }
183
184 // Set the membership group of a Voltha Core
185 rpc UpdateMembership(Membership) returns(google.protobuf.Empty) {
186 option (google.api.http) = {
187 post: "/api/v1/membership"
188 body: "*"
189 };
190 }
191
Zack Williams52209662019-02-07 10:15:31 -0700192 // Get high level information on the Voltha cluster
193 rpc GetVoltha(google.protobuf.Empty) returns(Voltha) {
194 option (google.api.http) = {
195 get: "/api/v1"
196 };
197 }
198
199 // List all Voltha cluster core instances
200 rpc ListCoreInstances(google.protobuf.Empty) returns(CoreInstances) {
201 option (google.api.http) = {
202 get: "/api/v1/instances"
203 };
Zack Williams52209662019-02-07 10:15:31 -0700204 }
205
206 // Get details on a Voltha cluster instance
William Kurkian12fc0af2019-04-18 14:27:45 -0400207 rpc GetCoreInstance(common.ID) returns(CoreInstance) {
Zack Williams52209662019-02-07 10:15:31 -0700208 option (google.api.http) = {
209 get: "/api/v1/instances/{id}"
210 };
211 }
212
213 // List all active adapters (plugins) in the Voltha cluster
214 rpc ListAdapters(google.protobuf.Empty) returns(Adapters) {
215 option (google.api.http) = {
216 get: "/api/v1/adapters"
217 };
Zack Williams52209662019-02-07 10:15:31 -0700218 }
219
220
221 // List all logical devices managed by the Voltha cluster
222 rpc ListLogicalDevices(google.protobuf.Empty) returns(LogicalDevices) {
223 option (google.api.http) = {
224 get: "/api/v1/logical_devices"
225 };
Zack Williams52209662019-02-07 10:15:31 -0700226 }
227
228 // Get additional information on a given logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400229 rpc GetLogicalDevice(common.ID) returns(LogicalDevice) {
Zack Williams52209662019-02-07 10:15:31 -0700230 option (google.api.http) = {
231 get: "/api/v1/logical_devices/{id}"
232 };
233 }
234
235 // List ports of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400236 rpc ListLogicalDevicePorts(common.ID) returns(LogicalPorts) {
Zack Williams52209662019-02-07 10:15:31 -0700237 option (google.api.http) = {
238 get: "/api/v1/logical_devices/{id}/ports"
239 };
Zack Williams52209662019-02-07 10:15:31 -0700240 }
241
242 // Gets a logical device port
243 rpc GetLogicalDevicePort(LogicalPortId) returns(LogicalPort) {
244 option (google.api.http) = {
245 get: "/api/v1/logical_devices/{id}/ports/{port_id}"
246 };
Zack Williams52209662019-02-07 10:15:31 -0700247 }
248
249 // Enables a logical device port
250 rpc EnableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
251 option (google.api.http) = {
252 post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable"
253 };
254 }
255
256 // Disables a logical device port
257 rpc DisableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
258 option (google.api.http) = {
259 post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable"
260 };
261 }
262
263 // List all flows of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400264 rpc ListLogicalDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700265 option (google.api.http) = {
266 get: "/api/v1/logical_devices/{id}/flows"
267 };
Zack Williams52209662019-02-07 10:15:31 -0700268 }
269
270 // Update flow table for logical device
271 rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate)
272 returns(google.protobuf.Empty) {
273 option (google.api.http) = {
274 post: "/api/v1/logical_devices/{id}/flows"
275 body: "*"
276 };
277 }
278
279 // Update meter table for logical device
280 rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate)
281 returns(google.protobuf.Empty) {
282 option (google.api.http) = {
283 post: "/api/v1/logical_devices/{id}/meters"
284 body: "*"
285 };
286 }
287
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400288 // List all meters of a logical device
289 rpc ListLogicalDeviceMeters(common.ID) returns (openflow_13.Meters) {
Zack Williams52209662019-02-07 10:15:31 -0700290 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400291 get: "/api/v1/logical_devices/{id}/meters"
Zack Williams52209662019-02-07 10:15:31 -0700292 };
293 }
294
295 // List all flow groups of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400296 rpc ListLogicalDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700297 option (google.api.http) = {
298 get: "/api/v1/logical_devices/{id}/flow_groups"
299 };
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 };
Zack Williams52209662019-02-07 10:15:31 -0700316 }
317
318 // List all physical devices IDs controlled by the Voltha cluster
William Kurkian12fc0af2019-04-18 14:27:45 -0400319 rpc ListDeviceIds(google.protobuf.Empty) returns(common.IDs) {
Zack Williams52209662019-02-07 10:15:31 -0700320 option (google.api.http) = {
321 get: "/api/v1/deviceids"
322 };
Zack Williams52209662019-02-07 10:15:31 -0700323 }
324
325 // Request to a voltha Core to reconcile a set of devices based on their IDs
William Kurkian12fc0af2019-04-18 14:27:45 -0400326 rpc ReconcileDevices(common.IDs) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700327 option (google.api.http) = {
328 post: "/api/v1/deviceids"
329 body: "*"
330 };
331 }
332
333 // Get more information on a given physical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400334 rpc GetDevice(common.ID) returns(Device) {
Zack Williams52209662019-02-07 10:15:31 -0700335 option (google.api.http) = {
336 get: "/api/v1/devices/{id}"
337 };
338 }
339
340 // Pre-provision a new physical device
341 rpc CreateDevice(Device) returns(Device) {
342 option (google.api.http) = {
343 post: "/api/v1/devices"
344 body: "*"
345 };
346 }
347
348 // Enable a device. If the device was in pre-provisioned state then it
349 // will transition to ENABLED state. If it was is DISABLED state then it
350 // will transition to ENABLED state as well.
William Kurkian12fc0af2019-04-18 14:27:45 -0400351 rpc EnableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700352 option (google.api.http) = {
353 post: "/api/v1/devices/{id}/enable"
354 };
355 }
356
357 // Disable a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400358 rpc DisableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700359 option (google.api.http) = {
360 post: "/api/v1/devices/{id}/disable"
361 };
362 }
363
364 // Reboot a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400365 rpc RebootDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700366 option (google.api.http) = {
367 post: "/api/v1/devices/{id}/reboot"
368 };
369 }
370
371 // Delete a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400372 rpc DeleteDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700373 option (google.api.http) = {
374 delete: "/api/v1/devices/{id}/delete"
375 };
376 }
377
378 // Request an image download to the standby partition
379 // of a device.
380 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400381 rpc DownloadImage(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700382 option (google.api.http) = {
383 post: "/api/v1/devices/{id}/image_downloads/{name}"
384 body: "*"
385 };
386 }
387
388 // Get image download status on a device
389 // The request retrieves progress on device and updates db record
390 rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {
391 option (google.api.http) = {
392 get: "/api/v1/devices/{id}/image_downloads/{name}/status"
393 };
394 }
395
396 // Get image download db record
397 rpc GetImageDownload(ImageDownload) returns(ImageDownload) {
398 option (google.api.http) = {
399 get: "/api/v1/devices/{id}/image_downloads/{name}"
400 };
401 }
402
403 // List image download db records for a given device
William Kurkian12fc0af2019-04-18 14:27:45 -0400404 rpc ListImageDownloads(common.ID) returns(ImageDownloads) {
Zack Williams52209662019-02-07 10:15:31 -0700405 option (google.api.http) = {
406 get: "/api/v1/devices/{id}/image_downloads"
407 };
408 }
409
410 // Cancel an existing image download process on a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400411 rpc CancelImageDownload(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700412 option (google.api.http) = {
413 delete: "/api/v1/devices/{id}/image_downloads/{name}"
414 };
415 }
416
417 // Activate the specified image at a standby partition
418 // to active partition.
419 // Depending on the device implementation, this call
420 // may or may not cause device reboot.
421 // If no reboot, then a reboot is required to make the
422 // activated image running on device
423 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400424 rpc ActivateImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700425 option (google.api.http) = {
426 post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
427 body: "*"
428 };
429 }
430
431 // Revert the specified image at standby partition
432 // to active partition, and revert to previous image
433 // Depending on the device implementation, this call
434 // may or may not cause device reboot.
435 // If no reboot, then a reboot is required to make the
436 // previous image running on device
437 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400438 rpc RevertImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700439 option (google.api.http) = {
440 post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
441 body: "*"
442 };
443 }
444
445 // List ports of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400446 rpc ListDevicePorts(common.ID) returns(Ports) {
Zack Williams52209662019-02-07 10:15:31 -0700447 option (google.api.http) = {
448 get: "/api/v1/devices/{id}/ports"
449 };
Zack Williams52209662019-02-07 10:15:31 -0700450 }
451
452 // List pm config of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400453 rpc ListDevicePmConfigs(common.ID) returns(PmConfigs) {
Zack Williams52209662019-02-07 10:15:31 -0700454 option (google.api.http) = {
455 get: "/api/v1/devices/{id}/pm_configs"
456 };
457 }
458
459 // Update the pm config of a device
460 rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {
461 option (google.api.http) = {
462 post: "/api/v1/devices/{id}/pm_configs"
463 body: "*"
464 };
465 }
466
467 // List all flows of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400468 rpc ListDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700469 option (google.api.http) = {
470 get: "/api/v1/devices/{id}/flows"
471 };
Zack Williams52209662019-02-07 10:15:31 -0700472 }
473
474 // List all flow groups of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400475 rpc ListDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700476 option (google.api.http) = {
477 get: "/api/v1/devices/{id}/flow_groups"
478 };
Zack Williams52209662019-02-07 10:15:31 -0700479 }
480
481 // List device types known to Voltha
482 rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {
483 option (google.api.http) = {
484 get: "/api/v1/device_types"
485 };
Zack Williams52209662019-02-07 10:15:31 -0700486 }
487
488 // Get additional information on a device type
William Kurkian12fc0af2019-04-18 14:27:45 -0400489 rpc GetDeviceType(common.ID) returns(DeviceType) {
Zack Williams52209662019-02-07 10:15:31 -0700490 option (google.api.http) = {
491 get: "/api/v1/device_types/{id}"
492 };
493 }
494
495 // List all device sharding groups
496 rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {
497 option (google.api.http) = {
498 get: "/api/v1/device_groups"
499 };
Zack Williams52209662019-02-07 10:15:31 -0700500 }
501
502 // Stream control packets to the dataplane
503 rpc StreamPacketsOut(stream openflow_13.PacketOut)
504 returns(google.protobuf.Empty) {
505 // This does not have an HTTP representation
506 }
507
508 // Receive control packet stream
509 rpc ReceivePacketsIn(google.protobuf.Empty)
510 returns(stream openflow_13.PacketIn) {
511 // This does not have an HTTP representation
512 }
513
514 rpc ReceiveChangeEvents(google.protobuf.Empty)
515 returns(stream openflow_13.ChangeEvent) {
516 // This does not have an HTTP representation
517 }
518
519 // Get additional information on a device group
William Kurkian12fc0af2019-04-18 14:27:45 -0400520 rpc GetDeviceGroup(common.ID) returns(DeviceGroup) {
Zack Williams52209662019-02-07 10:15:31 -0700521 option (google.api.http) = {
522 get: "/api/v1/device_groups/{id}"
523 };
524 }
525
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000526 rpc CreateEventFilter(EventFilter) returns(EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700527 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000528 post: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700529 body: "*"
530 };
531 }
532
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000533 // Get all filters present for a device
534 rpc GetEventFilter(common.ID) returns(EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700535 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000536 get: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700537 };
538 }
539
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000540 rpc UpdateEventFilter(EventFilter) returns(EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700541 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000542 put: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700543 body: "*"
544 };
545 }
546
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000547 rpc DeleteEventFilter(EventFilter) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700548 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000549 delete: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700550 };
551 }
552
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000553 // Get all the filters present
554 rpc ListEventFilters(google.protobuf.Empty) returns(EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700555 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000556 get: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700557 };
558 }
559
William Kurkian12fc0af2019-04-18 14:27:45 -0400560 rpc GetImages(common.ID) returns(Images) {
Zack Williams52209662019-02-07 10:15:31 -0700561 option (google.api.http) = {
562 get: "/api/v1/devices/{id}/images"
563 };
564 }
565
William Kurkian12fc0af2019-04-18 14:27:45 -0400566 rpc SelfTest(common.ID) returns(SelfTestResponse) {
Zack Williams52209662019-02-07 10:15:31 -0700567 option (google.api.http) = {
568 post: "/api/v1/devices/{id}/self_test"
569 };
570 }
571
572 // OpenOMCI MIB information
William Kurkian12fc0af2019-04-18 14:27:45 -0400573 rpc GetMibDeviceData(common.ID) returns(omci.MibDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700574 option (google.api.http) = {
575 get: "/api/v1/openomci/{id}/mib"
576 };
577 }
578
579 // OpenOMCI ALARM information
William Kurkian12fc0af2019-04-18 14:27:45 -0400580 rpc GetAlarmDeviceData(common.ID) returns(omci.AlarmDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700581 option (google.api.http) = {
582 get: "/api/v1/openomci/{id}/alarm"
583 };
584 }
585
586 // Simulate an Alarm
William Kurkian12fc0af2019-04-18 14:27:45 -0400587 rpc SimulateAlarm(SimulateAlarmRequest) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700588 option (google.api.http) = {
589 post: "/api/v1/devices/{id}/simulate_larm"
590 body: "*"
591 };
592 }
593 rpc Subscribe (OfAgentSubscriber) returns (OfAgentSubscriber) {
594 }
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400595
kesavand4a002b02020-01-23 21:29:47 -0500596 rpc EnablePort(voltha.Port) returns(google.protobuf.Empty) {
597 option (google.api.http) = {
598 post: "/v1/EnablePort"
599 body: "*"
600 };
601 }
602 rpc DisablePort(voltha.Port) returns(google.protobuf.Empty) {
603 option (google.api.http) = {
604 post: "/v1/DisablePort"
605 body: "*"
606 };
607 }
Dinesh Belwalkared6da5e2020-02-25 11:23:57 -0800608 rpc GetExtValue(common.ValueSpecifier) returns(common.ReturnValues) {
609 option (google.api.http) = {
610 get: "/api/v1/GetExtValue"
611 };
612 }
dpaul2b52e712020-06-23 13:02:28 +0530613 rpc SetExtValue(ValueSet) returns(google.protobuf.Empty) {
614 option (google.api.http) = {
615 get: "/api/v1/SetExtValue"
616 };
617 }
kesavand4a002b02020-01-23 21:29:47 -0500618
onkar.kundargi7b85fa12020-02-27 13:19:22 +0530619 // omci start and stop cli implementation
620 rpc StartOmciTestAction(OmciTestRequest) returns(TestResponse) {
621 option (google.api.http) = {
622 post: "/api/v1/start_omci_test"
623 body: "*"
624 };
625 }
Zack Williams52209662019-02-07 10:15:31 -0700626}
627