blob: 359858e23f7b052c3d816ce06ac69f3c52901403 [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";
Zack Williams52209662019-02-07 10:15:31 -070024
25import "voltha_protos/omci_mib_db.proto";
26import "voltha_protos/omci_alarm_db.proto";
khenaidoo4c6543e2021-10-19 17:25:58 -040027import "voltha_protos/omci_test.proto";
Zack Williams52209662019-02-07 10:15:31 -070028
29option java_package = "org.opencord.voltha";
30option java_outer_classname = "VolthaProtos";
31option csharp_namespace = "Opencord.Voltha.Voltha";
32
Zack Williams52209662019-02-07 10:15:31 -070033// CoreInstance represents a core instance. It is data held in memory when a core
34// is running. This data is not persistent.
35message CoreInstance {
Zack Williams52209662019-02-07 10:15:31 -070036
khenaidoo4c6543e2021-10-19 17:25:58 -040037 string instance_id = 1;
Zack Williams52209662019-02-07 10:15:31 -070038
khenaidoo4c6543e2021-10-19 17:25:58 -040039 health.HealthStatus health = 2;
Zack Williams52209662019-02-07 10:15:31 -070040
41}
42
43message CoreInstances {
Zack Williams52209662019-02-07 10:15:31 -070044 repeated CoreInstance items = 1;
45}
46
dpaul2b52e712020-06-23 13:02:28 +053047
Zack Williams52209662019-02-07 10:15:31 -070048// Voltha represents the Voltha cluster data. Each Core instance will hold a subset of
49// the entire cluster. However, some items (e.g. adapters) will be held by all cores
50// for better performance
51message Voltha {
Zack Williams52209662019-02-07 10:15:31 -070052
khenaidoo4c6543e2021-10-19 17:25:58 -040053 string version = 1 ;
Zack Williams52209662019-02-07 10:15:31 -070054
khenaidoo4c6543e2021-10-19 17:25:58 -040055 repeated adapter.Adapter adapters = 2;
Zack Williams52209662019-02-07 10:15:31 -070056
khenaidoo4c6543e2021-10-19 17:25:58 -040057 repeated logical_device.LogicalDevice logical_devices = 3;
Zack Williams52209662019-02-07 10:15:31 -070058
khenaidoo4c6543e2021-10-19 17:25:58 -040059 repeated device.Device devices = 4;
Zack Williams52209662019-02-07 10:15:31 -070060
khenaidoo4c6543e2021-10-19 17:25:58 -040061 repeated device.DeviceType device_types = 5;
Zack Williams52209662019-02-07 10:15:31 -070062
khenaidoo4c6543e2021-10-19 17:25:58 -040063 reserved 6;
64 // device_groups is not used
65 // repeated DeviceGroup device_groups = 6;
Zack Williams52209662019-02-07 10:15:31 -070066
khenaidoo4c6543e2021-10-19 17:25:58 -040067 repeated event.EventFilter event_filters = 7;
Zack Williams52209662019-02-07 10:15:31 -070068
69 repeated
khenaidoo4c6543e2021-10-19 17:25:58 -040070 omci.MibDeviceData omci_mib_database = 28;
Zack Williams52209662019-02-07 10:15:31 -070071
72 repeated
khenaidoo4c6543e2021-10-19 17:25:58 -040073 omci.AlarmDeviceData omci_alarm_database = 29;
manikkaraj k166cb202019-07-28 13:05:56 -040074}
75
Zack Williams52209662019-02-07 10:15:31 -070076/*
77 * Voltha APIs
78 *
79 */
80service VolthaService {
Zack Williams52209662019-02-07 10:15:31 -070081 // Get high level information on the Voltha cluster
82 rpc GetVoltha(google.protobuf.Empty) returns(Voltha) {
83 option (google.api.http) = {
84 get: "/api/v1"
85 };
86 }
87
88 // List all Voltha cluster core instances
89 rpc ListCoreInstances(google.protobuf.Empty) returns(CoreInstances) {
90 option (google.api.http) = {
91 get: "/api/v1/instances"
92 };
Zack Williams52209662019-02-07 10:15:31 -070093 }
94
95 // Get details on a Voltha cluster instance
William Kurkian12fc0af2019-04-18 14:27:45 -040096 rpc GetCoreInstance(common.ID) returns(CoreInstance) {
Zack Williams52209662019-02-07 10:15:31 -070097 option (google.api.http) = {
98 get: "/api/v1/instances/{id}"
99 };
100 }
101
102 // List all active adapters (plugins) in the Voltha cluster
khenaidoo4c6543e2021-10-19 17:25:58 -0400103 rpc ListAdapters(google.protobuf.Empty) returns(adapter.Adapters) {
Zack Williams52209662019-02-07 10:15:31 -0700104 option (google.api.http) = {
105 get: "/api/v1/adapters"
106 };
Zack Williams52209662019-02-07 10:15:31 -0700107 }
108
109
110 // List all logical devices managed by the Voltha cluster
khenaidoo4c6543e2021-10-19 17:25:58 -0400111 rpc ListLogicalDevices(google.protobuf.Empty) returns(logical_device.LogicalDevices) {
Zack Williams52209662019-02-07 10:15:31 -0700112 option (google.api.http) = {
113 get: "/api/v1/logical_devices"
114 };
Zack Williams52209662019-02-07 10:15:31 -0700115 }
116
117 // Get additional information on a given logical device
khenaidoo4c6543e2021-10-19 17:25:58 -0400118 rpc GetLogicalDevice(common.ID) returns(logical_device.LogicalDevice) {
Zack Williams52209662019-02-07 10:15:31 -0700119 option (google.api.http) = {
120 get: "/api/v1/logical_devices/{id}"
121 };
122 }
123
124 // List ports of a logical device
khenaidoo4c6543e2021-10-19 17:25:58 -0400125 rpc ListLogicalDevicePorts(common.ID) returns(logical_device.LogicalPorts) {
Zack Williams52209662019-02-07 10:15:31 -0700126 option (google.api.http) = {
127 get: "/api/v1/logical_devices/{id}/ports"
128 };
Zack Williams52209662019-02-07 10:15:31 -0700129 }
130
131 // Gets a logical device port
khenaidoo4c6543e2021-10-19 17:25:58 -0400132 rpc GetLogicalDevicePort(logical_device.LogicalPortId) returns(logical_device.LogicalPort) {
Zack Williams52209662019-02-07 10:15:31 -0700133 option (google.api.http) = {
134 get: "/api/v1/logical_devices/{id}/ports/{port_id}"
135 };
Zack Williams52209662019-02-07 10:15:31 -0700136 }
137
138 // Enables a logical device port
khenaidoo4c6543e2021-10-19 17:25:58 -0400139 rpc EnableLogicalDevicePort(logical_device.LogicalPortId) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700140 option (google.api.http) = {
141 post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable"
142 };
143 }
144
145 // Disables a logical device port
khenaidoo4c6543e2021-10-19 17:25:58 -0400146 rpc DisableLogicalDevicePort(logical_device.LogicalPortId) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700147 option (google.api.http) = {
148 post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable"
149 };
150 }
151
152 // List all flows of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400153 rpc ListLogicalDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700154 option (google.api.http) = {
155 get: "/api/v1/logical_devices/{id}/flows"
156 };
Zack Williams52209662019-02-07 10:15:31 -0700157 }
158
159 // Update flow table for logical device
160 rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate)
161 returns(google.protobuf.Empty) {
162 option (google.api.http) = {
163 post: "/api/v1/logical_devices/{id}/flows"
164 body: "*"
165 };
166 }
167
168 // Update meter table for logical device
169 rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate)
170 returns(google.protobuf.Empty) {
171 option (google.api.http) = {
172 post: "/api/v1/logical_devices/{id}/meters"
173 body: "*"
174 };
175 }
176
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400177 // List all meters of a logical device
178 rpc ListLogicalDeviceMeters(common.ID) returns (openflow_13.Meters) {
Zack Williams52209662019-02-07 10:15:31 -0700179 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400180 get: "/api/v1/logical_devices/{id}/meters"
Zack Williams52209662019-02-07 10:15:31 -0700181 };
182 }
183
184 // List all flow groups of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400185 rpc ListLogicalDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700186 option (google.api.http) = {
187 get: "/api/v1/logical_devices/{id}/flow_groups"
188 };
Zack Williams52209662019-02-07 10:15:31 -0700189 }
190
191 // Update group table for device
192 rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate)
193 returns(google.protobuf.Empty) {
194 option (google.api.http) = {
195 post: "/api/v1/logical_devices/{id}/flow_groups"
196 body: "*"
197 };
198 }
199
200 // List all physical devices controlled by the Voltha cluster
khenaidoo4c6543e2021-10-19 17:25:58 -0400201 rpc ListDevices(google.protobuf.Empty) returns(device.Devices) {
Zack Williams52209662019-02-07 10:15:31 -0700202 option (google.api.http) = {
203 get: "/api/v1/devices"
204 };
Zack Williams52209662019-02-07 10:15:31 -0700205 }
206
207 // List all physical devices IDs controlled by the Voltha cluster
William Kurkian12fc0af2019-04-18 14:27:45 -0400208 rpc ListDeviceIds(google.protobuf.Empty) returns(common.IDs) {
Zack Williams52209662019-02-07 10:15:31 -0700209 option (google.api.http) = {
210 get: "/api/v1/deviceids"
211 };
Zack Williams52209662019-02-07 10:15:31 -0700212 }
213
214 // Request to a voltha Core to reconcile a set of devices based on their IDs
William Kurkian12fc0af2019-04-18 14:27:45 -0400215 rpc ReconcileDevices(common.IDs) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700216 option (google.api.http) = {
217 post: "/api/v1/deviceids"
218 body: "*"
219 };
220 }
221
222 // Get more information on a given physical device
khenaidoo4c6543e2021-10-19 17:25:58 -0400223 rpc GetDevice(common.ID) returns(device.Device) {
Zack Williams52209662019-02-07 10:15:31 -0700224 option (google.api.http) = {
225 get: "/api/v1/devices/{id}"
226 };
227 }
228
229 // Pre-provision a new physical device
khenaidoo4c6543e2021-10-19 17:25:58 -0400230 rpc CreateDevice(device.Device) returns(device.Device) {
Zack Williams52209662019-02-07 10:15:31 -0700231 option (google.api.http) = {
232 post: "/api/v1/devices"
233 body: "*"
234 };
235 }
236
237 // Enable a device. If the device was in pre-provisioned state then it
238 // will transition to ENABLED state. If it was is DISABLED state then it
239 // will transition to ENABLED state as well.
William Kurkian12fc0af2019-04-18 14:27:45 -0400240 rpc EnableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700241 option (google.api.http) = {
242 post: "/api/v1/devices/{id}/enable"
243 };
244 }
245
246 // Disable a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400247 rpc DisableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700248 option (google.api.http) = {
249 post: "/api/v1/devices/{id}/disable"
250 };
251 }
252
253 // Reboot a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400254 rpc RebootDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700255 option (google.api.http) = {
256 post: "/api/v1/devices/{id}/reboot"
257 };
258 }
259
260 // Delete a device
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100261 rpc DeleteDevice (common.ID) returns (google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700262 option (google.api.http) = {
263 delete: "/api/v1/devices/{id}/delete"
264 };
265 }
266
Himani Chawla503b7ce2020-10-07 13:20:03 +0530267 // Forcefully delete a device
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100268 rpc ForceDeleteDevice (common.ID) returns (google.protobuf.Empty) {
Himani Chawla503b7ce2020-10-07 13:20:03 +0530269 option (google.api.http) = {
270 delete: "/api/v1/devices/{id}/force_delete"
271 };
272 }
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100273
Zack Williams52209662019-02-07 10:15:31 -0700274 // Request an image download to the standby partition
275 // of a device.
276 // Note that the call is expected to be non-blocking.
khenaidoo4c6543e2021-10-19 17:25:58 -0400277 rpc DownloadImage(device.ImageDownload) returns(common.OperationResp) {
278 option deprecated = true;
Zack Williams52209662019-02-07 10:15:31 -0700279 option (google.api.http) = {
280 post: "/api/v1/devices/{id}/image_downloads/{name}"
281 body: "*"
282 };
283 }
284
285 // Get image download status on a device
286 // The request retrieves progress on device and updates db record
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100287 // Deprecated in voltha 2.8, will be removed
khenaidoo4c6543e2021-10-19 17:25:58 -0400288 rpc GetImageDownloadStatus(device.ImageDownload) returns(device.ImageDownload) {
289 option deprecated = true;
Zack Williams52209662019-02-07 10:15:31 -0700290 option (google.api.http) = {
291 get: "/api/v1/devices/{id}/image_downloads/{name}/status"
292 };
293 }
294
295 // Get image download db record
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100296 // Deprecated in voltha 2.8, will be removed
khenaidoo4c6543e2021-10-19 17:25:58 -0400297 rpc GetImageDownload(device.ImageDownload) returns(device.ImageDownload) {
298 option deprecated = true;
Zack Williams52209662019-02-07 10:15:31 -0700299 option (google.api.http) = {
300 get: "/api/v1/devices/{id}/image_downloads/{name}"
301 };
302 }
303
304 // List image download db records for a given device
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100305 // Deprecated in voltha 2.8, will be removed
khenaidoo4c6543e2021-10-19 17:25:58 -0400306 rpc ListImageDownloads(common.ID) returns(device.ImageDownloads) {
307 option deprecated = true;
Zack Williams52209662019-02-07 10:15:31 -0700308 option (google.api.http) = {
309 get: "/api/v1/devices/{id}/image_downloads"
310 };
311 }
312
313 // Cancel an existing image download process on a device
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100314 // Deprecated in voltha 2.8, will be removed
khenaidoo4c6543e2021-10-19 17:25:58 -0400315 rpc CancelImageDownload(device.ImageDownload) returns(common.OperationResp) {
316 option deprecated = true;
Zack Williams52209662019-02-07 10:15:31 -0700317 option (google.api.http) = {
318 delete: "/api/v1/devices/{id}/image_downloads/{name}"
319 };
320 }
321
322 // Activate the specified image at a standby partition
323 // to active partition.
324 // Depending on the device implementation, this call
325 // may or may not cause device reboot.
326 // If no reboot, then a reboot is required to make the
327 // activated image running on device
328 // Note that the call is expected to be non-blocking.
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100329 // Deprecated in voltha 2.8, will be removed
khenaidoo4c6543e2021-10-19 17:25:58 -0400330 rpc ActivateImageUpdate(device.ImageDownload) returns(common.OperationResp) {
331 option deprecated = true;
Zack Williams52209662019-02-07 10:15:31 -0700332 option (google.api.http) = {
333 post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
334 body: "*"
335 };
336 }
337
338 // Revert the specified image at standby partition
339 // to active partition, and revert to previous image
340 // Depending on the device implementation, this call
341 // may or may not cause device reboot.
342 // If no reboot, then a reboot is required to make the
343 // previous image running on device
344 // Note that the call is expected to be non-blocking.
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100345 // Deprecated in voltha 2.8, will be removed
khenaidoo4c6543e2021-10-19 17:25:58 -0400346 rpc RevertImageUpdate(device.ImageDownload) returns(common.OperationResp) {
347 option deprecated = true;
Zack Williams52209662019-02-07 10:15:31 -0700348 option (google.api.http) = {
349 post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
350 body: "*"
351 };
352 }
353
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100354 // Downloads a certain image to the standby partition of the devices
355 // Note that the call is expected to be non-blocking.
khenaidoo4c6543e2021-10-19 17:25:58 -0400356 rpc DownloadImageToDevice (device.DeviceImageDownloadRequest) returns (device.DeviceImageResponse) {
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100357 option (google.api.http) = {
358 get: "/api/v1/devices/images/download_images"
359 };
360 }
361
362 // Get image status on a number of devices devices
363 // Polled from northbound systems to get state of download/activate/commit
khenaidoo4c6543e2021-10-19 17:25:58 -0400364 rpc GetImageStatus (device.DeviceImageRequest) returns (device.DeviceImageResponse) {
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100365 option (google.api.http) = {
366 get: "/api/v1/devices/images/images_status"
367 };
368 }
369
370 // Aborts the upgrade of an image on a device
371 // To be used carefully, stops any further operations for the Image on the given devices
372 // Might also stop if possible existing work, but no guarantees are given,
373 // depends on implementation and procedure status.
khenaidoo4c6543e2021-10-19 17:25:58 -0400374 rpc AbortImageUpgradeToDevice (device.DeviceImageRequest) returns (device.DeviceImageResponse) {
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100375 option (google.api.http) = {
376 get: "/api/v1/devices/images/abort_upgrade_images"
377 };
378 }
379
380 // Get Both Active and Standby image for a given device
khenaidoo4c6543e2021-10-19 17:25:58 -0400381 rpc GetOnuImages (common.ID) returns (device.OnuImages) {
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100382 option (google.api.http) = {
383 get: "/api/v1/devices/{id}/onu_images"
384 };
385 }
386
387 // Activate the specified image from a standby partition
388 // to active partition.
389 // Depending on the device implementation, this call
390 // may or may not cause device reboot.
391 // If no reboot, then a reboot is required to make the
392 // activated image running on device
393 // Note that the call is expected to be non-blocking.
khenaidoo4c6543e2021-10-19 17:25:58 -0400394 rpc ActivateImage (device.DeviceImageRequest) returns (device.DeviceImageResponse) {
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100395 option (google.api.http) = {
396 post: "/api/v1/devices/images/activate_images"
397 body: "*"
398 };
399 }
400
401 // Commit the specified image to be default.
402 // Depending on the device implementation, this call
403 // may or may not cause device reboot.
404 // If no reboot, then a reboot is required to make the
405 // activated image running on device upon next reboot
406 // Note that the call is expected to be non-blocking.
khenaidoo4c6543e2021-10-19 17:25:58 -0400407 rpc CommitImage (device.DeviceImageRequest) returns (device.DeviceImageResponse) {
Andrea Campanella9e94e8a2021-01-19 15:21:25 +0100408 option (google.api.http) = {
409 post: "/api/v1/devices/images/commit_images"
410 body: "*"
411 };
412 }
413
Zack Williams52209662019-02-07 10:15:31 -0700414 // List ports of a device
khenaidoo4c6543e2021-10-19 17:25:58 -0400415 rpc ListDevicePorts (common.ID) returns (device.Ports) {
Zack Williams52209662019-02-07 10:15:31 -0700416 option (google.api.http) = {
417 get: "/api/v1/devices/{id}/ports"
418 };
Zack Williams52209662019-02-07 10:15:31 -0700419 }
420
421 // List pm config of a device
khenaidoo4c6543e2021-10-19 17:25:58 -0400422 rpc ListDevicePmConfigs (common.ID) returns (device.PmConfigs) {
Zack Williams52209662019-02-07 10:15:31 -0700423 option (google.api.http) = {
424 get: "/api/v1/devices/{id}/pm_configs"
425 };
426 }
427
428 // Update the pm config of a device
khenaidoo4c6543e2021-10-19 17:25:58 -0400429 rpc UpdateDevicePmConfigs(device.PmConfigs) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700430 option (google.api.http) = {
431 post: "/api/v1/devices/{id}/pm_configs"
432 body: "*"
433 };
434 }
435
436 // List all flows of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400437 rpc ListDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700438 option (google.api.http) = {
439 get: "/api/v1/devices/{id}/flows"
440 };
Zack Williams52209662019-02-07 10:15:31 -0700441 }
442
443 // List all flow groups of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400444 rpc ListDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700445 option (google.api.http) = {
446 get: "/api/v1/devices/{id}/flow_groups"
447 };
Zack Williams52209662019-02-07 10:15:31 -0700448 }
449
450 // List device types known to Voltha
khenaidoo4c6543e2021-10-19 17:25:58 -0400451 rpc ListDeviceTypes(google.protobuf.Empty) returns(device.DeviceTypes) {
Zack Williams52209662019-02-07 10:15:31 -0700452 option (google.api.http) = {
453 get: "/api/v1/device_types"
454 };
Zack Williams52209662019-02-07 10:15:31 -0700455 }
456
457 // Get additional information on a device type
khenaidoo4c6543e2021-10-19 17:25:58 -0400458 rpc GetDeviceType(common.ID) returns(device.DeviceType) {
Zack Williams52209662019-02-07 10:15:31 -0700459 option (google.api.http) = {
460 get: "/api/v1/device_types/{id}"
461 };
462 }
463
Zack Williams52209662019-02-07 10:15:31 -0700464 // Stream control packets to the dataplane
465 rpc StreamPacketsOut(stream openflow_13.PacketOut)
466 returns(google.protobuf.Empty) {
467 // This does not have an HTTP representation
468 }
469
470 // Receive control packet stream
471 rpc ReceivePacketsIn(google.protobuf.Empty)
472 returns(stream openflow_13.PacketIn) {
473 // This does not have an HTTP representation
474 }
475
476 rpc ReceiveChangeEvents(google.protobuf.Empty)
477 returns(stream openflow_13.ChangeEvent) {
478 // This does not have an HTTP representation
479 }
480
khenaidoo4c6543e2021-10-19 17:25:58 -0400481 rpc CreateEventFilter(event.EventFilter) returns(event.EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700482 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000483 post: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700484 body: "*"
485 };
486 }
487
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000488 // Get all filters present for a device
khenaidoo4c6543e2021-10-19 17:25:58 -0400489 rpc GetEventFilter(common.ID) returns(event.EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700490 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000491 get: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700492 };
493 }
494
khenaidoo4c6543e2021-10-19 17:25:58 -0400495 rpc UpdateEventFilter(event.EventFilter) returns(event.EventFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700496 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000497 put: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700498 body: "*"
499 };
500 }
501
khenaidoo4c6543e2021-10-19 17:25:58 -0400502 rpc DeleteEventFilter(event.EventFilter) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700503 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000504 delete: "/api/v1/event_filters/{id}"
Zack Williams52209662019-02-07 10:15:31 -0700505 };
506 }
507
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000508 // Get all the filters present
khenaidoo4c6543e2021-10-19 17:25:58 -0400509 rpc ListEventFilters(google.protobuf.Empty) returns(event.EventFilters) {
Zack Williams52209662019-02-07 10:15:31 -0700510 option (google.api.http) = {
Devmalya Paul96a2c9e2019-11-06 07:17:44 +0000511 get: "/api/v1/event_filters"
Zack Williams52209662019-02-07 10:15:31 -0700512 };
513 }
514
khenaidoo4c6543e2021-10-19 17:25:58 -0400515 rpc GetImages(common.ID) returns(device.Images) {
Zack Williams52209662019-02-07 10:15:31 -0700516 option (google.api.http) = {
517 get: "/api/v1/devices/{id}/images"
518 };
519 }
520
khenaidoo4c6543e2021-10-19 17:25:58 -0400521 rpc SelfTest(common.ID) returns(device.SelfTestResponse) {
Zack Williams52209662019-02-07 10:15:31 -0700522 option (google.api.http) = {
523 post: "/api/v1/devices/{id}/self_test"
524 };
525 }
526
527 // OpenOMCI MIB information
William Kurkian12fc0af2019-04-18 14:27:45 -0400528 rpc GetMibDeviceData(common.ID) returns(omci.MibDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700529 option (google.api.http) = {
530 get: "/api/v1/openomci/{id}/mib"
531 };
532 }
533
534 // OpenOMCI ALARM information
William Kurkian12fc0af2019-04-18 14:27:45 -0400535 rpc GetAlarmDeviceData(common.ID) returns(omci.AlarmDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700536 option (google.api.http) = {
537 get: "/api/v1/openomci/{id}/alarm"
538 };
539 }
540
541 // Simulate an Alarm
khenaidoo4c6543e2021-10-19 17:25:58 -0400542 rpc SimulateAlarm(device.SimulateAlarmRequest) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700543 option (google.api.http) = {
544 post: "/api/v1/devices/{id}/simulate_larm"
545 body: "*"
546 };
547 }
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400548
khenaidoo4c6543e2021-10-19 17:25:58 -0400549 rpc EnablePort(device.Port) returns(google.protobuf.Empty) {
kesavand4a002b02020-01-23 21:29:47 -0500550 option (google.api.http) = {
551 post: "/v1/EnablePort"
552 body: "*"
553 };
554 }
khenaidoo4c6543e2021-10-19 17:25:58 -0400555 rpc DisablePort(device.Port) returns(google.protobuf.Empty) {
kesavand4a002b02020-01-23 21:29:47 -0500556 option (google.api.http) = {
557 post: "/v1/DisablePort"
558 body: "*"
559 };
560 }
khenaidoo4c6543e2021-10-19 17:25:58 -0400561 rpc GetExtValue(extension.ValueSpecifier) returns(extension.ReturnValues) {
Dinesh Belwalkared6da5e2020-02-25 11:23:57 -0800562 option (google.api.http) = {
563 get: "/api/v1/GetExtValue"
564 };
565 }
khenaidoo4c6543e2021-10-19 17:25:58 -0400566 rpc SetExtValue(extension.ValueSet) returns(google.protobuf.Empty) {
dpaul2b52e712020-06-23 13:02:28 +0530567 option (google.api.http) = {
568 get: "/api/v1/SetExtValue"
569 };
570 }
kesavand4a002b02020-01-23 21:29:47 -0500571
onkar.kundargi7b85fa12020-02-27 13:19:22 +0530572 // omci start and stop cli implementation
khenaidoo4c6543e2021-10-19 17:25:58 -0400573 rpc StartOmciTestAction(omci.OmciTestRequest) returns(omci.TestResponse) {
onkar.kundargi7b85fa12020-02-27 13:19:22 +0530574 option (google.api.http) = {
575 post: "/api/v1/start_omci_test"
576 body: "*"
577 };
578 }
Zack Williams52209662019-02-07 10:15:31 -0700579}
580