blob: c2d545973c8e2fe0bf41b823ff2911b24fbcf388 [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
Matteo Scandolob3c08ae2020-10-14 13:15:43 -07009option go_package = "github.com/opencord/voltha-protos/v4/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
Himani Chawla503b7ce2020-10-07 13:20:03 +0530378 // Forcefully delete a device
379 rpc ForceDeleteDevice(common.ID) returns(google.protobuf.Empty) {
380 option (google.api.http) = {
381 delete: "/api/v1/devices/{id}/force_delete"
382 };
383 }
Zack Williams52209662019-02-07 10:15:31 -0700384 // Request an image download to the standby partition
385 // of a device.
386 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400387 rpc DownloadImage(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700388 option (google.api.http) = {
389 post: "/api/v1/devices/{id}/image_downloads/{name}"
390 body: "*"
391 };
392 }
393
394 // Get image download status on a device
395 // The request retrieves progress on device and updates db record
396 rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {
397 option (google.api.http) = {
398 get: "/api/v1/devices/{id}/image_downloads/{name}/status"
399 };
400 }
401
402 // Get image download db record
403 rpc GetImageDownload(ImageDownload) returns(ImageDownload) {
404 option (google.api.http) = {
405 get: "/api/v1/devices/{id}/image_downloads/{name}"
406 };
407 }
408
409 // List image download db records for a given device
William Kurkian12fc0af2019-04-18 14:27:45 -0400410 rpc ListImageDownloads(common.ID) returns(ImageDownloads) {
Zack Williams52209662019-02-07 10:15:31 -0700411 option (google.api.http) = {
412 get: "/api/v1/devices/{id}/image_downloads"
413 };
414 }
415
416 // Cancel an existing image download process on a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400417 rpc CancelImageDownload(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700418 option (google.api.http) = {
419 delete: "/api/v1/devices/{id}/image_downloads/{name}"
420 };
421 }
422
423 // Activate the specified image at a standby partition
424 // to active partition.
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 // activated image running on device
429 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400430 rpc ActivateImageUpdate(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_update"
433 body: "*"
434 };
435 }
436
437 // Revert the specified image at standby partition
438 // to active partition, and revert to previous image
439 // Depending on the device implementation, this call
440 // may or may not cause device reboot.
441 // If no reboot, then a reboot is required to make the
442 // previous image running on device
443 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400444 rpc RevertImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700445 option (google.api.http) = {
446 post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
447 body: "*"
448 };
449 }
450
451 // List ports of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400452 rpc ListDevicePorts(common.ID) returns(Ports) {
Zack Williams52209662019-02-07 10:15:31 -0700453 option (google.api.http) = {
454 get: "/api/v1/devices/{id}/ports"
455 };
Zack Williams52209662019-02-07 10:15:31 -0700456 }
457
458 // List pm config of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400459 rpc ListDevicePmConfigs(common.ID) returns(PmConfigs) {
Zack Williams52209662019-02-07 10:15:31 -0700460 option (google.api.http) = {
461 get: "/api/v1/devices/{id}/pm_configs"
462 };
463 }
464
465 // Update the pm config of a device
466 rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {
467 option (google.api.http) = {
468 post: "/api/v1/devices/{id}/pm_configs"
469 body: "*"
470 };
471 }
472
473 // List all flows of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400474 rpc ListDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700475 option (google.api.http) = {
476 get: "/api/v1/devices/{id}/flows"
477 };
Zack Williams52209662019-02-07 10:15:31 -0700478 }
479
480 // List all flow groups of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400481 rpc ListDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700482 option (google.api.http) = {
483 get: "/api/v1/devices/{id}/flow_groups"
484 };
Zack Williams52209662019-02-07 10:15:31 -0700485 }
486
487 // List device types known to Voltha
488 rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {
489 option (google.api.http) = {
490 get: "/api/v1/device_types"
491 };
Zack Williams52209662019-02-07 10:15:31 -0700492 }
493
494 // Get additional information on a device type
William Kurkian12fc0af2019-04-18 14:27:45 -0400495 rpc GetDeviceType(common.ID) returns(DeviceType) {
Zack Williams52209662019-02-07 10:15:31 -0700496 option (google.api.http) = {
497 get: "/api/v1/device_types/{id}"
498 };
499 }
500
501 // List all device sharding groups
502 rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {
503 option (google.api.http) = {
504 get: "/api/v1/device_groups"
505 };
Zack Williams52209662019-02-07 10:15:31 -0700506 }
507
508 // Stream control packets to the dataplane
509 rpc StreamPacketsOut(stream openflow_13.PacketOut)
510 returns(google.protobuf.Empty) {
511 // This does not have an HTTP representation
512 }
513
514 // Receive control packet stream
515 rpc ReceivePacketsIn(google.protobuf.Empty)
516 returns(stream openflow_13.PacketIn) {
517 // This does not have an HTTP representation
518 }
519
520 rpc ReceiveChangeEvents(google.protobuf.Empty)
521 returns(stream openflow_13.ChangeEvent) {
522 // This does not have an HTTP representation
523 }
524
525 // Get additional information on a device group
William Kurkian12fc0af2019-04-18 14:27:45 -0400526 rpc GetDeviceGroup(common.ID) returns(DeviceGroup) {
Zack Williams52209662019-02-07 10:15:31 -0700527 option (google.api.http) = {
528 get: "/api/v1/device_groups/{id}"
529 };
530 }
531
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000532 rpc CreateEventFilter(EventFilter) returns(EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700533 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000534 post: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700535 body: "*"
536 };
537 }
538
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000539 // Get all filters present for a device
540 rpc GetEventFilter(common.ID) returns(EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700541 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000542 get: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700543 };
544 }
545
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000546 rpc UpdateEventFilter(EventFilter) returns(EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700547 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000548 put: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700549 body: "*"
550 };
551 }
552
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000553 rpc DeleteEventFilter(EventFilter) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700554 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000555 delete: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700556 };
557 }
558
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000559 // Get all the filters present
560 rpc ListEventFilters(google.protobuf.Empty) returns(EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700561 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000562 get: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700563 };
564 }
565
William Kurkian12fc0af2019-04-18 14:27:45 -0400566 rpc GetImages(common.ID) returns(Images) {
Zack Williams52209662019-02-07 10:15:31 -0700567 option (google.api.http) = {
568 get: "/api/v1/devices/{id}/images"
569 };
570 }
571
William Kurkian12fc0af2019-04-18 14:27:45 -0400572 rpc SelfTest(common.ID) returns(SelfTestResponse) {
Zack Williams52209662019-02-07 10:15:31 -0700573 option (google.api.http) = {
574 post: "/api/v1/devices/{id}/self_test"
575 };
576 }
577
578 // OpenOMCI MIB information
William Kurkian12fc0af2019-04-18 14:27:45 -0400579 rpc GetMibDeviceData(common.ID) returns(omci.MibDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700580 option (google.api.http) = {
581 get: "/api/v1/openomci/{id}/mib"
582 };
583 }
584
585 // OpenOMCI ALARM information
William Kurkian12fc0af2019-04-18 14:27:45 -0400586 rpc GetAlarmDeviceData(common.ID) returns(omci.AlarmDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700587 option (google.api.http) = {
588 get: "/api/v1/openomci/{id}/alarm"
589 };
590 }
591
592 // Simulate an Alarm
William Kurkian12fc0af2019-04-18 14:27:45 -0400593 rpc SimulateAlarm(SimulateAlarmRequest) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700594 option (google.api.http) = {
595 post: "/api/v1/devices/{id}/simulate_larm"
596 body: "*"
597 };
598 }
599 rpc Subscribe (OfAgentSubscriber) returns (OfAgentSubscriber) {
600 }
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400601
kesavand4a002b02020-01-23 21:29:47 -0500602 rpc EnablePort(voltha.Port) returns(google.protobuf.Empty) {
603 option (google.api.http) = {
604 post: "/v1/EnablePort"
605 body: "*"
606 };
607 }
608 rpc DisablePort(voltha.Port) returns(google.protobuf.Empty) {
609 option (google.api.http) = {
610 post: "/v1/DisablePort"
611 body: "*"
612 };
613 }
Dinesh Belwalkared6da5e2020-02-25 11:23:57 -0800614 rpc GetExtValue(common.ValueSpecifier) returns(common.ReturnValues) {
615 option (google.api.http) = {
616 get: "/api/v1/GetExtValue"
617 };
618 }
dpaul2b52e712020-06-23 13:02:28 +0530619 rpc SetExtValue(ValueSet) returns(google.protobuf.Empty) {
620 option (google.api.http) = {
621 get: "/api/v1/SetExtValue"
622 };
623 }
kesavand4a002b02020-01-23 21:29:47 -0500624
onkar.kundargi7b85fa12020-02-27 13:19:22 +0530625 // omci start and stop cli implementation
626 rpc StartOmciTestAction(OmciTestRequest) returns(TestResponse) {
627 option (google.api.http) = {
628 post: "/api/v1/start_omci_test"
629 body: "*"
630 };
631 }
Zack Williams52209662019-02-07 10:15:31 -0700632}
633