blob: be9ff966c19b9379433c63d3cd79b572b255098b [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
khenaidoo5fc5cea2021-08-11 17:39:16 -04009option go_package = "github.com/opencord/voltha-protos/v5/go/voltha";
Zack Williams52209662019-02-07 10:15:31 -070010
11package voltha;
12
13import "google/api/annotations.proto";
14import "google/protobuf/empty.proto";
15
Zack Williams52209662019-02-07 10:15:31 -070016import public "voltha_protos/common.proto";
khenaidoo4c6543e2021-10-19 17:25:58 -040017import "voltha_protos/health.proto";
18import "voltha_protos/logical_device.proto";
19import "voltha_protos/device.proto";
20import "voltha_protos/adapter.proto";
21import "voltha_protos/openflow_13.proto";
22import "voltha_protos/events.proto";
23import "voltha_protos/extensions.proto";
yasin sapli2bbfbb42021-11-01 14:30:10 +000024import "voltha_protos/voip_system_profile.proto";
25import "voltha_protos/voip_user_profile.proto";
Zack Williams52209662019-02-07 10:15:31 -070026
27import "voltha_protos/omci_mib_db.proto";
28import "voltha_protos/omci_alarm_db.proto";
khenaidoo4c6543e2021-10-19 17:25:58 -040029import "voltha_protos/omci_test.proto";
Zack Williams52209662019-02-07 10:15:31 -070030
31option java_package = "org.opencord.voltha";
32option java_outer_classname = "VolthaProtos";
33option csharp_namespace = "Opencord.Voltha.Voltha";
34
Zack Williams52209662019-02-07 10:15:31 -070035// CoreInstance represents a core instance. It is data held in memory when a core
36// is running. This data is not persistent.
37message CoreInstance {
Zack Williams52209662019-02-07 10:15:31 -070038
khenaidoo4c6543e2021-10-19 17:25:58 -040039 string instance_id = 1;
Zack Williams52209662019-02-07 10:15:31 -070040
khenaidoo4c6543e2021-10-19 17:25:58 -040041 health.HealthStatus health = 2;
Zack Williams52209662019-02-07 10:15:31 -070042
43}
44
45message CoreInstances {
Zack Williams52209662019-02-07 10:15:31 -070046 repeated CoreInstance items = 1;
47}
48
dpaul2b52e712020-06-23 13:02:28 +053049
Zack Williams52209662019-02-07 10:15:31 -070050// Voltha represents the Voltha cluster data. Each Core instance will hold a subset of
51// the entire cluster. However, some items (e.g. adapters) will be held by all cores
52// for better performance
53message Voltha {
Zack Williams52209662019-02-07 10:15:31 -070054
khenaidoo4c6543e2021-10-19 17:25:58 -040055 string version = 1 ;
Zack Williams52209662019-02-07 10:15:31 -070056
khenaidoo4c6543e2021-10-19 17:25:58 -040057 repeated adapter.Adapter adapters = 2;
Zack Williams52209662019-02-07 10:15:31 -070058
khenaidoo4c6543e2021-10-19 17:25:58 -040059 repeated logical_device.LogicalDevice logical_devices = 3;
Zack Williams52209662019-02-07 10:15:31 -070060
khenaidoo4c6543e2021-10-19 17:25:58 -040061 repeated device.Device devices = 4;
Zack Williams52209662019-02-07 10:15:31 -070062
khenaidoo4c6543e2021-10-19 17:25:58 -040063 repeated device.DeviceType device_types = 5;
Zack Williams52209662019-02-07 10:15:31 -070064
khenaidoo4c6543e2021-10-19 17:25:58 -040065 reserved 6;
66 // device_groups is not used
67 // repeated DeviceGroup device_groups = 6;
Zack Williams52209662019-02-07 10:15:31 -070068
khenaidoo4c6543e2021-10-19 17:25:58 -040069 repeated event.EventFilter event_filters = 7;
Zack Williams52209662019-02-07 10:15:31 -070070
71 repeated
khenaidoo4c6543e2021-10-19 17:25:58 -040072 omci.MibDeviceData omci_mib_database = 28;
Zack Williams52209662019-02-07 10:15:31 -070073
74 repeated
khenaidoo4c6543e2021-10-19 17:25:58 -040075 omci.AlarmDeviceData omci_alarm_database = 29;
manikkaraj k166cb202019-07-28 13:05:56 -040076}
77
Zack Williams52209662019-02-07 10:15:31 -070078/*
79 * Voltha APIs
80 *
81 */
82service VolthaService {
Zack Williams52209662019-02-07 10:15:31 -070083 // Get high level information on the Voltha cluster
84 rpc GetVoltha(google.protobuf.Empty) returns(Voltha) {
85 option (google.api.http) = {
86 get: "/api/v1"
87 };
88 }
89
90 // List all Voltha cluster core instances
91 rpc ListCoreInstances(google.protobuf.Empty) returns(CoreInstances) {
92 option (google.api.http) = {
93 get: "/api/v1/instances"
94 };
Zack Williams52209662019-02-07 10:15:31 -070095 }
96
97 // Get details on a Voltha cluster instance
William Kurkian12fc0af2019-04-18 14:27:45 -040098 rpc GetCoreInstance(common.ID) returns(CoreInstance) {
Zack Williams52209662019-02-07 10:15:31 -070099 option (google.api.http) = {
100 get: "/api/v1/instances/{id}"
101 };
102 }
103
104 // List all active adapters (plugins) in the Voltha cluster
khenaidoo4c6543e2021-10-19 17:25:58 -0400105 rpc ListAdapters(google.protobuf.Empty) returns(adapter.Adapters) {
Zack Williams52209662019-02-07 10:15:31 -0700106 option (google.api.http) = {
107 get: "/api/v1/adapters"
108 };
Zack Williams52209662019-02-07 10:15:31 -0700109 }
110
111
112 // List all logical devices managed by the Voltha cluster
khenaidoo4c6543e2021-10-19 17:25:58 -0400113 rpc ListLogicalDevices(google.protobuf.Empty) returns(logical_device.LogicalDevices) {
Zack Williams52209662019-02-07 10:15:31 -0700114 option (google.api.http) = {
115 get: "/api/v1/logical_devices"
116 };
Zack Williams52209662019-02-07 10:15:31 -0700117 }
118
119 // Get additional information on a given logical device
khenaidoo4c6543e2021-10-19 17:25:58 -0400120 rpc GetLogicalDevice(common.ID) returns(logical_device.LogicalDevice) {
Zack Williams52209662019-02-07 10:15:31 -0700121 option (google.api.http) = {
122 get: "/api/v1/logical_devices/{id}"
123 };
124 }
125
126 // List ports of a logical device
khenaidoo4c6543e2021-10-19 17:25:58 -0400127 rpc ListLogicalDevicePorts(common.ID) returns(logical_device.LogicalPorts) {
Zack Williams52209662019-02-07 10:15:31 -0700128 option (google.api.http) = {
129 get: "/api/v1/logical_devices/{id}/ports"
130 };
Zack Williams52209662019-02-07 10:15:31 -0700131 }
132
133 // Gets a logical device port
khenaidoo4c6543e2021-10-19 17:25:58 -0400134 rpc GetLogicalDevicePort(logical_device.LogicalPortId) returns(logical_device.LogicalPort) {
Zack Williams52209662019-02-07 10:15:31 -0700135 option (google.api.http) = {
136 get: "/api/v1/logical_devices/{id}/ports/{port_id}"
137 };
Zack Williams52209662019-02-07 10:15:31 -0700138 }
139
140 // Enables a logical device port
khenaidoo4c6543e2021-10-19 17:25:58 -0400141 rpc EnableLogicalDevicePort(logical_device.LogicalPortId) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700142 option (google.api.http) = {
143 post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable"
144 };
145 }
146
147 // Disables a logical device port
khenaidoo4c6543e2021-10-19 17:25:58 -0400148 rpc DisableLogicalDevicePort(logical_device.LogicalPortId) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700149 option (google.api.http) = {
150 post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable"
151 };
152 }
153
154 // List all flows of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400155 rpc ListLogicalDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700156 option (google.api.http) = {
157 get: "/api/v1/logical_devices/{id}/flows"
158 };
Zack Williams52209662019-02-07 10:15:31 -0700159 }
160
161 // Update flow table for logical device
162 rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate)
163 returns(google.protobuf.Empty) {
164 option (google.api.http) = {
165 post: "/api/v1/logical_devices/{id}/flows"
166 body: "*"
167 };
168 }
169
170 // Update meter table for logical device
171 rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate)
172 returns(google.protobuf.Empty) {
173 option (google.api.http) = {
174 post: "/api/v1/logical_devices/{id}/meters"
175 body: "*"
176 };
177 }
178
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400179 // List all meters of a logical device
180 rpc ListLogicalDeviceMeters(common.ID) returns (openflow_13.Meters) {
Zack Williams52209662019-02-07 10:15:31 -0700181 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400182 get: "/api/v1/logical_devices/{id}/meters"
Zack Williams52209662019-02-07 10:15:31 -0700183 };
184 }
185
186 // List all flow groups of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400187 rpc ListLogicalDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700188 option (google.api.http) = {
189 get: "/api/v1/logical_devices/{id}/flow_groups"
190 };
Zack Williams52209662019-02-07 10:15:31 -0700191 }
192
193 // Update group table for device
194 rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate)
195 returns(google.protobuf.Empty) {
196 option (google.api.http) = {
197 post: "/api/v1/logical_devices/{id}/flow_groups"
198 body: "*"
199 };
200 }
201
202 // List all physical devices controlled by the Voltha cluster
khenaidoo4c6543e2021-10-19 17:25:58 -0400203 rpc ListDevices(google.protobuf.Empty) returns(device.Devices) {
Zack Williams52209662019-02-07 10:15:31 -0700204 option (google.api.http) = {
205 get: "/api/v1/devices"
206 };
Zack Williams52209662019-02-07 10:15:31 -0700207 }
208
209 // List all physical devices IDs controlled by the Voltha cluster
William Kurkian12fc0af2019-04-18 14:27:45 -0400210 rpc ListDeviceIds(google.protobuf.Empty) returns(common.IDs) {
Zack Williams52209662019-02-07 10:15:31 -0700211 option (google.api.http) = {
212 get: "/api/v1/deviceids"
213 };
Zack Williams52209662019-02-07 10:15:31 -0700214 }
215
216 // Request to a voltha Core to reconcile a set of devices based on their IDs
William Kurkian12fc0af2019-04-18 14:27:45 -0400217 rpc ReconcileDevices(common.IDs) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700218 option (google.api.http) = {
219 post: "/api/v1/deviceids"
220 body: "*"
221 };
222 }
223
224 // Get more information on a given physical device
khenaidoo4c6543e2021-10-19 17:25:58 -0400225 rpc GetDevice(common.ID) returns(device.Device) {
Zack Williams52209662019-02-07 10:15:31 -0700226 option (google.api.http) = {
227 get: "/api/v1/devices/{id}"
228 };
229 }
230
231 // Pre-provision a new physical device
khenaidoo4c6543e2021-10-19 17:25:58 -0400232 rpc CreateDevice(device.Device) returns(device.Device) {
Zack Williams52209662019-02-07 10:15:31 -0700233 option (google.api.http) = {
234 post: "/api/v1/devices"
235 body: "*"
236 };
237 }
238
239 // Enable a device. If the device was in pre-provisioned state then it
240 // will transition to ENABLED state. If it was is DISABLED state then it
241 // will transition to ENABLED state as well.
William Kurkian12fc0af2019-04-18 14:27:45 -0400242 rpc EnableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700243 option (google.api.http) = {
244 post: "/api/v1/devices/{id}/enable"
245 };
246 }
247
248 // Disable a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400249 rpc DisableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700250 option (google.api.http) = {
251 post: "/api/v1/devices/{id}/disable"
252 };
253 }
254
255 // Reboot a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400256 rpc RebootDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700257 option (google.api.http) = {
258 post: "/api/v1/devices/{id}/reboot"
259 };
260 }
261
262 // Delete a device
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100263 rpc DeleteDevice (common.ID) returns (google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700264 option (google.api.http) = {
265 delete: "/api/v1/devices/{id}/delete"
266 };
267 }
268
Himani Chawla503b7ce2020-10-07 13:20:03 +0530269 // Forcefully delete a device
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100270 rpc ForceDeleteDevice (common.ID) returns (google.protobuf.Empty) {
Himani Chawla503b7ce2020-10-07 13:20:03 +0530271 option (google.api.http) = {
272 delete: "/api/v1/devices/{id}/force_delete"
273 };
274 }
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100275
Zack Williams52209662019-02-07 10:15:31 -0700276 // Request an image download to the standby partition
277 // of a device.
278 // Note that the call is expected to be non-blocking.
khenaidoo4c6543e2021-10-19 17:25:58 -0400279 rpc DownloadImage(device.ImageDownload) returns(common.OperationResp) {
280 option deprecated = true;
Zack Williams52209662019-02-07 10:15:31 -0700281 option (google.api.http) = {
282 post: "/api/v1/devices/{id}/image_downloads/{name}"
283 body: "*"
284 };
285 }
286
287 // Get image download status on a device
288 // The request retrieves progress on device and updates db record
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100289 // Deprecated in voltha 2.8, will be removed
khenaidoo4c6543e2021-10-19 17:25:58 -0400290 rpc GetImageDownloadStatus(device.ImageDownload) returns(device.ImageDownload) {
291 option deprecated = true;
Zack Williams52209662019-02-07 10:15:31 -0700292 option (google.api.http) = {
293 get: "/api/v1/devices/{id}/image_downloads/{name}/status"
294 };
295 }
296
297 // Get image download db record
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100298 // Deprecated in voltha 2.8, will be removed
khenaidoo4c6543e2021-10-19 17:25:58 -0400299 rpc GetImageDownload(device.ImageDownload) returns(device.ImageDownload) {
300 option deprecated = true;
Zack Williams52209662019-02-07 10:15:31 -0700301 option (google.api.http) = {
302 get: "/api/v1/devices/{id}/image_downloads/{name}"
303 };
304 }
305
306 // List image download db records for a given device
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100307 // Deprecated in voltha 2.8, will be removed
khenaidoo4c6543e2021-10-19 17:25:58 -0400308 rpc ListImageDownloads(common.ID) returns(device.ImageDownloads) {
309 option deprecated = true;
Zack Williams52209662019-02-07 10:15:31 -0700310 option (google.api.http) = {
311 get: "/api/v1/devices/{id}/image_downloads"
312 };
313 }
314
315 // Cancel an existing image download process on a device
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100316 // Deprecated in voltha 2.8, will be removed
khenaidoo4c6543e2021-10-19 17:25:58 -0400317 rpc CancelImageDownload(device.ImageDownload) returns(common.OperationResp) {
318 option deprecated = true;
Zack Williams52209662019-02-07 10:15:31 -0700319 option (google.api.http) = {
320 delete: "/api/v1/devices/{id}/image_downloads/{name}"
321 };
322 }
323
324 // Activate the specified image at a standby partition
325 // to active partition.
326 // Depending on the device implementation, this call
327 // may or may not cause device reboot.
328 // If no reboot, then a reboot is required to make the
329 // activated image running on device
330 // Note that the call is expected to be non-blocking.
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100331 // Deprecated in voltha 2.8, will be removed
khenaidoo4c6543e2021-10-19 17:25:58 -0400332 rpc ActivateImageUpdate(device.ImageDownload) returns(common.OperationResp) {
333 option deprecated = true;
Zack Williams52209662019-02-07 10:15:31 -0700334 option (google.api.http) = {
335 post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
336 body: "*"
337 };
338 }
339
340 // Revert the specified image at standby partition
341 // to active partition, and revert to previous image
342 // Depending on the device implementation, this call
343 // may or may not cause device reboot.
344 // If no reboot, then a reboot is required to make the
345 // previous image running on device
346 // Note that the call is expected to be non-blocking.
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100347 // Deprecated in voltha 2.8, will be removed
khenaidoo4c6543e2021-10-19 17:25:58 -0400348 rpc RevertImageUpdate(device.ImageDownload) returns(common.OperationResp) {
349 option deprecated = true;
Zack Williams52209662019-02-07 10:15:31 -0700350 option (google.api.http) = {
351 post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
352 body: "*"
353 };
354 }
355
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100356 // Downloads a certain image to the standby partition of the devices
357 // Note that the call is expected to be non-blocking.
khenaidoo4c6543e2021-10-19 17:25:58 -0400358 rpc DownloadImageToDevice (device.DeviceImageDownloadRequest) returns (device.DeviceImageResponse) {
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100359 option (google.api.http) = {
360 get: "/api/v1/devices/images/download_images"
361 };
362 }
363
364 // Get image status on a number of devices devices
365 // Polled from northbound systems to get state of download/activate/commit
khenaidoo4c6543e2021-10-19 17:25:58 -0400366 rpc GetImageStatus (device.DeviceImageRequest) returns (device.DeviceImageResponse) {
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100367 option (google.api.http) = {
368 get: "/api/v1/devices/images/images_status"
369 };
370 }
371
372 // Aborts the upgrade of an image on a device
373 // To be used carefully, stops any further operations for the Image on the given devices
374 // Might also stop if possible existing work, but no guarantees are given,
375 // depends on implementation and procedure status.
khenaidoo4c6543e2021-10-19 17:25:58 -0400376 rpc AbortImageUpgradeToDevice (device.DeviceImageRequest) returns (device.DeviceImageResponse) {
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100377 option (google.api.http) = {
378 get: "/api/v1/devices/images/abort_upgrade_images"
379 };
380 }
381
382 // Get Both Active and Standby image for a given device
khenaidoo4c6543e2021-10-19 17:25:58 -0400383 rpc GetOnuImages (common.ID) returns (device.OnuImages) {
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100384 option (google.api.http) = {
385 get: "/api/v1/devices/{id}/onu_images"
386 };
387 }
388
389 // Activate the specified image from a standby partition
390 // to active partition.
391 // Depending on the device implementation, this call
392 // may or may not cause device reboot.
393 // If no reboot, then a reboot is required to make the
394 // activated image running on device
395 // Note that the call is expected to be non-blocking.
khenaidoo4c6543e2021-10-19 17:25:58 -0400396 rpc ActivateImage (device.DeviceImageRequest) returns (device.DeviceImageResponse) {
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100397 option (google.api.http) = {
398 post: "/api/v1/devices/images/activate_images"
399 body: "*"
400 };
401 }
402
403 // Commit the specified image to be default.
404 // Depending on the device implementation, this call
405 // may or may not cause device reboot.
406 // If no reboot, then a reboot is required to make the
407 // activated image running on device upon next reboot
408 // Note that the call is expected to be non-blocking.
khenaidoo4c6543e2021-10-19 17:25:58 -0400409 rpc CommitImage (device.DeviceImageRequest) returns (device.DeviceImageResponse) {
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100410 option (google.api.http) = {
411 post: "/api/v1/devices/images/commit_images"
412 body: "*"
413 };
414 }
415
Zack Williams52209662019-02-07 10:15:31 -0700416 // List ports of a device
khenaidoo4c6543e2021-10-19 17:25:58 -0400417 rpc ListDevicePorts (common.ID) returns (device.Ports) {
Zack Williams52209662019-02-07 10:15:31 -0700418 option (google.api.http) = {
419 get: "/api/v1/devices/{id}/ports"
420 };
Zack Williams52209662019-02-07 10:15:31 -0700421 }
422
423 // List pm config of a device
khenaidoo4c6543e2021-10-19 17:25:58 -0400424 rpc ListDevicePmConfigs (common.ID) returns (device.PmConfigs) {
Zack Williams52209662019-02-07 10:15:31 -0700425 option (google.api.http) = {
426 get: "/api/v1/devices/{id}/pm_configs"
427 };
428 }
429
430 // Update the pm config of a device
khenaidoo4c6543e2021-10-19 17:25:58 -0400431 rpc UpdateDevicePmConfigs(device.PmConfigs) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700432 option (google.api.http) = {
433 post: "/api/v1/devices/{id}/pm_configs"
434 body: "*"
435 };
436 }
437
438 // List all flows of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400439 rpc ListDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700440 option (google.api.http) = {
441 get: "/api/v1/devices/{id}/flows"
442 };
Zack Williams52209662019-02-07 10:15:31 -0700443 }
444
445 // List all flow groups of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400446 rpc ListDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700447 option (google.api.http) = {
448 get: "/api/v1/devices/{id}/flow_groups"
449 };
Zack Williams52209662019-02-07 10:15:31 -0700450 }
451
452 // List device types known to Voltha
khenaidoo4c6543e2021-10-19 17:25:58 -0400453 rpc ListDeviceTypes(google.protobuf.Empty) returns(device.DeviceTypes) {
Zack Williams52209662019-02-07 10:15:31 -0700454 option (google.api.http) = {
455 get: "/api/v1/device_types"
456 };
Zack Williams52209662019-02-07 10:15:31 -0700457 }
458
459 // Get additional information on a device type
khenaidoo4c6543e2021-10-19 17:25:58 -0400460 rpc GetDeviceType(common.ID) returns(device.DeviceType) {
Zack Williams52209662019-02-07 10:15:31 -0700461 option (google.api.http) = {
462 get: "/api/v1/device_types/{id}"
463 };
464 }
465
Zack Williams52209662019-02-07 10:15:31 -0700466 // Stream control packets to the dataplane
467 rpc StreamPacketsOut(stream openflow_13.PacketOut)
468 returns(google.protobuf.Empty) {
469 // This does not have an HTTP representation
470 }
471
472 // Receive control packet stream
473 rpc ReceivePacketsIn(google.protobuf.Empty)
474 returns(stream openflow_13.PacketIn) {
475 // This does not have an HTTP representation
476 }
477
478 rpc ReceiveChangeEvents(google.protobuf.Empty)
479 returns(stream openflow_13.ChangeEvent) {
480 // This does not have an HTTP representation
481 }
482
khenaidoo4c6543e2021-10-19 17:25:58 -0400483 rpc CreateEventFilter(event.EventFilter) returns(event.EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700484 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000485 post: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700486 body: "*"
487 };
488 }
489
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000490 // Get all filters present for a device
khenaidoo4c6543e2021-10-19 17:25:58 -0400491 rpc GetEventFilter(common.ID) returns(event.EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700492 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000493 get: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700494 };
495 }
496
khenaidoo4c6543e2021-10-19 17:25:58 -0400497 rpc UpdateEventFilter(event.EventFilter) returns(event.EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700498 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000499 put: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700500 body: "*"
501 };
502 }
503
khenaidoo4c6543e2021-10-19 17:25:58 -0400504 rpc DeleteEventFilter(event.EventFilter) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700505 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000506 delete: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700507 };
508 }
509
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000510 // Get all the filters present
khenaidoo4c6543e2021-10-19 17:25:58 -0400511 rpc ListEventFilters(google.protobuf.Empty) returns(event.EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700512 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000513 get: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700514 };
515 }
516
khenaidoo4c6543e2021-10-19 17:25:58 -0400517 rpc GetImages(common.ID) returns(device.Images) {
Zack Williams52209662019-02-07 10:15:31 -0700518 option (google.api.http) = {
519 get: "/api/v1/devices/{id}/images"
520 };
521 }
522
khenaidoo4c6543e2021-10-19 17:25:58 -0400523 rpc SelfTest(common.ID) returns(device.SelfTestResponse) {
Zack Williams52209662019-02-07 10:15:31 -0700524 option (google.api.http) = {
525 post: "/api/v1/devices/{id}/self_test"
526 };
527 }
528
529 // OpenOMCI MIB information
William Kurkian12fc0af2019-04-18 14:27:45 -0400530 rpc GetMibDeviceData(common.ID) returns(omci.MibDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700531 option (google.api.http) = {
532 get: "/api/v1/openomci/{id}/mib"
533 };
534 }
535
536 // OpenOMCI ALARM information
William Kurkian12fc0af2019-04-18 14:27:45 -0400537 rpc GetAlarmDeviceData(common.ID) returns(omci.AlarmDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700538 option (google.api.http) = {
539 get: "/api/v1/openomci/{id}/alarm"
540 };
541 }
542
543 // Simulate an Alarm
khenaidoo4c6543e2021-10-19 17:25:58 -0400544 rpc SimulateAlarm(device.SimulateAlarmRequest) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700545 option (google.api.http) = {
546 post: "/api/v1/devices/{id}/simulate_larm"
547 body: "*"
548 };
549 }
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400550
khenaidoo4c6543e2021-10-19 17:25:58 -0400551 rpc EnablePort(device.Port) returns(google.protobuf.Empty) {
kesavand4a002b02020-01-23 21:29:47 -0500552 option (google.api.http) = {
553 post: "/v1/EnablePort"
554 body: "*"
555 };
556 }
khenaidoo4c6543e2021-10-19 17:25:58 -0400557 rpc DisablePort(device.Port) returns(google.protobuf.Empty) {
kesavand4a002b02020-01-23 21:29:47 -0500558 option (google.api.http) = {
559 post: "/v1/DisablePort"
560 body: "*"
561 };
562 }
khenaidoo4c6543e2021-10-19 17:25:58 -0400563 rpc GetExtValue(extension.ValueSpecifier) returns(extension.ReturnValues) {
Dinesh Belwalkared6da5e2020-02-25 11:23:57 -0800564 option (google.api.http) = {
565 get: "/api/v1/GetExtValue"
566 };
567 }
khenaidoo4c6543e2021-10-19 17:25:58 -0400568 rpc SetExtValue(extension.ValueSet) returns(google.protobuf.Empty) {
dpaul2b52e712020-06-23 13:02:28 +0530569 option (google.api.http) = {
570 get: "/api/v1/SetExtValue"
571 };
572 }
kesavand4a002b02020-01-23 21:29:47 -0500573
onkar.kundargi7b85fa12020-02-27 13:19:22 +0530574 // omci start and stop cli implementation
khenaidoo4c6543e2021-10-19 17:25:58 -0400575 rpc StartOmciTestAction(omci.OmciTestRequest) returns(omci.TestResponse) {
onkar.kundargi7b85fa12020-02-27 13:19:22 +0530576 option (google.api.http) = {
577 post: "/api/v1/start_omci_test"
578 body: "*"
579 };
580 }
yasin sapli2bbfbb42021-11-01 14:30:10 +0000581
582 // Saves or updates system wide configuration into voltha KV
583 rpc PutVoipSystemProfile(voip_system_profile.VoipSystemProfileRequest) returns(google.protobuf.Empty) {
584 option (google.api.http) = {
585 post: "/api/v1/voip_system_profile"
586 body: "*"
587 };
588 }
589
590 // Deletes the given profile from voltha KV
591 rpc DeleteVoipSystemProfile(common.Key) returns(google.protobuf.Empty) {
592 option (google.api.http) = {
593 delete: "/api/v1/voip_system_profile/{key}/delete"
594 };
595 }
596
597 // Saves or updates a profile (VOIP) into voltha KV
598 rpc PutVoipUserProfile(voip_user_profile.VoipUserProfileRequest) returns(google.protobuf.Empty) {
599 option (google.api.http) = {
600 post: "/api/v1/voip_user_profile"
601 body: "*"
602 };
603 }
604
605 // Deletes the given profile from voltha KV
606 rpc DeleteVoipUserProfile(common.Key) returns(google.protobuf.Empty) {
607 option (google.api.http) = {
608 delete: "/api/v1/voip_user_profile/{key}/delete"
609 };
610 }
Zack Williams52209662019-02-07 10:15:31 -0700611}
612