blob: 38b0224a81625f5e4e1f49932090ea77b78b5354 [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
Maninderc4e609e2020-12-23 16:28:22 +0530333 // Get the device updates of a given device using a filter
334 rpc GetDeviceUpdates(DeviceUpdateFilter) returns(DeviceUpdates) {
335 option (google.api.http) = {
336 get: "/api/v1/deviceupdates/{id}/{filter}"
337 };
338 }
339
Zack Williams52209662019-02-07 10:15:31 -0700340 // Get more information on a given physical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400341 rpc GetDevice(common.ID) returns(Device) {
Zack Williams52209662019-02-07 10:15:31 -0700342 option (google.api.http) = {
343 get: "/api/v1/devices/{id}"
344 };
345 }
346
347 // Pre-provision a new physical device
348 rpc CreateDevice(Device) returns(Device) {
349 option (google.api.http) = {
350 post: "/api/v1/devices"
351 body: "*"
352 };
353 }
354
355 // Enable a device. If the device was in pre-provisioned state then it
356 // will transition to ENABLED state. If it was is DISABLED state then it
357 // will transition to ENABLED state as well.
William Kurkian12fc0af2019-04-18 14:27:45 -0400358 rpc EnableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700359 option (google.api.http) = {
360 post: "/api/v1/devices/{id}/enable"
361 };
362 }
363
364 // Disable a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400365 rpc DisableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700366 option (google.api.http) = {
367 post: "/api/v1/devices/{id}/disable"
368 };
369 }
370
371 // Reboot a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400372 rpc RebootDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700373 option (google.api.http) = {
374 post: "/api/v1/devices/{id}/reboot"
375 };
376 }
377
378 // Delete a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400379 rpc DeleteDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700380 option (google.api.http) = {
381 delete: "/api/v1/devices/{id}/delete"
382 };
383 }
384
Himani Chawla503b7ce2020-10-07 13:20:03 +0530385 // Forcefully delete a device
386 rpc ForceDeleteDevice(common.ID) returns(google.protobuf.Empty) {
387 option (google.api.http) = {
388 delete: "/api/v1/devices/{id}/force_delete"
389 };
390 }
Zack Williams52209662019-02-07 10:15:31 -0700391 // Request an image download to the standby partition
392 // of a device.
393 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400394 rpc DownloadImage(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700395 option (google.api.http) = {
396 post: "/api/v1/devices/{id}/image_downloads/{name}"
397 body: "*"
398 };
399 }
400
401 // Get image download status on a device
402 // The request retrieves progress on device and updates db record
403 rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {
404 option (google.api.http) = {
405 get: "/api/v1/devices/{id}/image_downloads/{name}/status"
406 };
407 }
408
409 // Get image download db record
410 rpc GetImageDownload(ImageDownload) returns(ImageDownload) {
411 option (google.api.http) = {
412 get: "/api/v1/devices/{id}/image_downloads/{name}"
413 };
414 }
415
416 // List image download db records for a given device
William Kurkian12fc0af2019-04-18 14:27:45 -0400417 rpc ListImageDownloads(common.ID) returns(ImageDownloads) {
Zack Williams52209662019-02-07 10:15:31 -0700418 option (google.api.http) = {
419 get: "/api/v1/devices/{id}/image_downloads"
420 };
421 }
422
423 // Cancel an existing image download process on a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400424 rpc CancelImageDownload(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700425 option (google.api.http) = {
426 delete: "/api/v1/devices/{id}/image_downloads/{name}"
427 };
428 }
429
430 // Activate the specified image at a standby partition
431 // to active partition.
432 // Depending on the device implementation, this call
433 // may or may not cause device reboot.
434 // If no reboot, then a reboot is required to make the
435 // activated image running on device
436 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400437 rpc ActivateImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700438 option (google.api.http) = {
439 post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
440 body: "*"
441 };
442 }
443
444 // Revert the specified image at standby partition
445 // to active partition, and revert to previous image
446 // Depending on the device implementation, this call
447 // may or may not cause device reboot.
448 // If no reboot, then a reboot is required to make the
449 // previous image running on device
450 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400451 rpc RevertImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700452 option (google.api.http) = {
453 post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
454 body: "*"
455 };
456 }
457
458 // List ports of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400459 rpc ListDevicePorts(common.ID) returns(Ports) {
Zack Williams52209662019-02-07 10:15:31 -0700460 option (google.api.http) = {
461 get: "/api/v1/devices/{id}/ports"
462 };
Zack Williams52209662019-02-07 10:15:31 -0700463 }
464
465 // List pm config of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400466 rpc ListDevicePmConfigs(common.ID) returns(PmConfigs) {
Zack Williams52209662019-02-07 10:15:31 -0700467 option (google.api.http) = {
468 get: "/api/v1/devices/{id}/pm_configs"
469 };
470 }
471
472 // Update the pm config of a device
473 rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {
474 option (google.api.http) = {
475 post: "/api/v1/devices/{id}/pm_configs"
476 body: "*"
477 };
478 }
479
480 // List all flows of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400481 rpc ListDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700482 option (google.api.http) = {
483 get: "/api/v1/devices/{id}/flows"
484 };
Zack Williams52209662019-02-07 10:15:31 -0700485 }
486
487 // List all flow groups of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400488 rpc ListDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700489 option (google.api.http) = {
490 get: "/api/v1/devices/{id}/flow_groups"
491 };
Zack Williams52209662019-02-07 10:15:31 -0700492 }
493
494 // List device types known to Voltha
495 rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {
496 option (google.api.http) = {
497 get: "/api/v1/device_types"
498 };
Zack Williams52209662019-02-07 10:15:31 -0700499 }
500
501 // Get additional information on a device type
William Kurkian12fc0af2019-04-18 14:27:45 -0400502 rpc GetDeviceType(common.ID) returns(DeviceType) {
Zack Williams52209662019-02-07 10:15:31 -0700503 option (google.api.http) = {
504 get: "/api/v1/device_types/{id}"
505 };
506 }
507
508 // List all device sharding groups
509 rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {
510 option (google.api.http) = {
511 get: "/api/v1/device_groups"
512 };
Zack Williams52209662019-02-07 10:15:31 -0700513 }
514
515 // Stream control packets to the dataplane
516 rpc StreamPacketsOut(stream openflow_13.PacketOut)
517 returns(google.protobuf.Empty) {
518 // This does not have an HTTP representation
519 }
520
521 // Receive control packet stream
522 rpc ReceivePacketsIn(google.protobuf.Empty)
523 returns(stream openflow_13.PacketIn) {
524 // This does not have an HTTP representation
525 }
526
527 rpc ReceiveChangeEvents(google.protobuf.Empty)
528 returns(stream openflow_13.ChangeEvent) {
529 // This does not have an HTTP representation
530 }
531
532 // Get additional information on a device group
William Kurkian12fc0af2019-04-18 14:27:45 -0400533 rpc GetDeviceGroup(common.ID) returns(DeviceGroup) {
Zack Williams52209662019-02-07 10:15:31 -0700534 option (google.api.http) = {
535 get: "/api/v1/device_groups/{id}"
536 };
537 }
538
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000539 rpc CreateEventFilter(EventFilter) returns(EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700540 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000541 post: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700542 body: "*"
543 };
544 }
545
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000546 // Get all filters present for a device
547 rpc GetEventFilter(common.ID) returns(EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700548 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000549 get: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700550 };
551 }
552
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000553 rpc UpdateEventFilter(EventFilter) returns(EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700554 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000555 put: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700556 body: "*"
557 };
558 }
559
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000560 rpc DeleteEventFilter(EventFilter) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700561 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000562 delete: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700563 };
564 }
565
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000566 // Get all the filters present
567 rpc ListEventFilters(google.protobuf.Empty) returns(EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700568 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000569 get: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700570 };
571 }
572
William Kurkian12fc0af2019-04-18 14:27:45 -0400573 rpc GetImages(common.ID) returns(Images) {
Zack Williams52209662019-02-07 10:15:31 -0700574 option (google.api.http) = {
575 get: "/api/v1/devices/{id}/images"
576 };
577 }
578
William Kurkian12fc0af2019-04-18 14:27:45 -0400579 rpc SelfTest(common.ID) returns(SelfTestResponse) {
Zack Williams52209662019-02-07 10:15:31 -0700580 option (google.api.http) = {
581 post: "/api/v1/devices/{id}/self_test"
582 };
583 }
584
585 // OpenOMCI MIB information
William Kurkian12fc0af2019-04-18 14:27:45 -0400586 rpc GetMibDeviceData(common.ID) returns(omci.MibDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700587 option (google.api.http) = {
588 get: "/api/v1/openomci/{id}/mib"
589 };
590 }
591
592 // OpenOMCI ALARM information
William Kurkian12fc0af2019-04-18 14:27:45 -0400593 rpc GetAlarmDeviceData(common.ID) returns(omci.AlarmDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700594 option (google.api.http) = {
595 get: "/api/v1/openomci/{id}/alarm"
596 };
597 }
598
599 // Simulate an Alarm
William Kurkian12fc0af2019-04-18 14:27:45 -0400600 rpc SimulateAlarm(SimulateAlarmRequest) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700601 option (google.api.http) = {
602 post: "/api/v1/devices/{id}/simulate_larm"
603 body: "*"
604 };
605 }
606 rpc Subscribe (OfAgentSubscriber) returns (OfAgentSubscriber) {
607 }
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400608
kesavand4a002b02020-01-23 21:29:47 -0500609 rpc EnablePort(voltha.Port) returns(google.protobuf.Empty) {
610 option (google.api.http) = {
611 post: "/v1/EnablePort"
612 body: "*"
613 };
614 }
615 rpc DisablePort(voltha.Port) returns(google.protobuf.Empty) {
616 option (google.api.http) = {
617 post: "/v1/DisablePort"
618 body: "*"
619 };
620 }
Dinesh Belwalkared6da5e2020-02-25 11:23:57 -0800621 rpc GetExtValue(common.ValueSpecifier) returns(common.ReturnValues) {
622 option (google.api.http) = {
623 get: "/api/v1/GetExtValue"
624 };
625 }
dpaul2b52e712020-06-23 13:02:28 +0530626 rpc SetExtValue(ValueSet) returns(google.protobuf.Empty) {
627 option (google.api.http) = {
628 get: "/api/v1/SetExtValue"
629 };
630 }
kesavand4a002b02020-01-23 21:29:47 -0500631
onkar.kundargi7b85fa12020-02-27 13:19:22 +0530632 // omci start and stop cli implementation
633 rpc StartOmciTestAction(OmciTestRequest) returns(TestResponse) {
634 option (google.api.http) = {
635 post: "/api/v1/start_omci_test"
636 body: "*"
637 };
638 }
Zack Williams52209662019-02-07 10:15:31 -0700639}
640