blob: 75199aae7a69ec1e8debfee00af56c30110363c8 [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
William Kurkian6ea97f82019-03-13 15:51:55 -04009option go_package = "github.com/opencord/voltha-protos/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";
26import "voltha_protos/yang_options.proto";
27
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
46message AlarmFilterRuleKey {
William Kurkian12fc0af2019-04-18 14:27:45 -040047 option (common.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
Zack Williams52209662019-02-07 10:15:31 -070048
49 enum AlarmFilterRuleKey {
50 id = 0;
51 type = 1;
52 severity = 2;
53 resource_id = 3;
54 category = 4;
55 device_id = 5;
56 }
57}
58
59message AlarmFilterRule {
60 AlarmFilterRuleKey.AlarmFilterRuleKey key = 1;
61 string value = 2;
62}
63message AlarmFilter {
64 string id = 1 [(access) = READ_ONLY];
65
66 repeated AlarmFilterRule rules = 2;
67}
68
69message AlarmFilters {
70 repeated AlarmFilter filters = 1;
71}
72
73message Logging {
William Kurkian12fc0af2019-04-18 14:27:45 -040074 common.LogLevel.LogLevel level = 1;
Zack Williams52209662019-02-07 10:15:31 -070075 string package_name = 2;
76}
77
78// CoreInstance represents a core instance. It is data held in memory when a core
79// is running. This data is not persistent.
80message CoreInstance {
William Kurkian12fc0af2019-04-18 14:27:45 -040081 option (common.yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
Zack Williams52209662019-02-07 10:15:31 -070082
83 string instance_id = 1 [(access) = READ_ONLY];
84
85 HealthStatus health = 2 [(child_node) = {}];
86
87}
88
89message CoreInstances {
William Kurkian12fc0af2019-04-18 14:27:45 -040090 option (common.yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
Zack Williams52209662019-02-07 10:15:31 -070091 repeated CoreInstance items = 1;
92}
93
94// Voltha represents the Voltha cluster data. Each Core instance will hold a subset of
95// the entire cluster. However, some items (e.g. adapters) will be held by all cores
96// for better performance
97message Voltha {
William Kurkian12fc0af2019-04-18 14:27:45 -040098 option (common.yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
Zack Williams52209662019-02-07 10:15:31 -070099
100 string version = 1 [(access) = READ_ONLY];
101
102 repeated Adapter adapters = 2 [(child_node) = {key: "id"}];
103
104 repeated LogicalDevice logical_devices = 3 [(child_node) = {key: "id"}];
105
106 repeated Device devices = 4 [(child_node) = {key: "id"}];
107
108 repeated DeviceType device_types = 5 [(child_node) = {key: "id"}];
109
110 repeated DeviceGroup device_groups = 6 [(child_node) = {key: "id"}];
111
112 repeated AlarmFilter alarm_filters = 7 [(child_node) = {key: "id"}];
113
114 repeated
115 omci.MibDeviceData omci_mib_database = 28
116 [(child_node) = {key: "device_id"}];
117
118 repeated
William Kurkian12fc0af2019-04-18 14:27:45 -0400119 omci.AlarmDeviceData omci_alarm_database = 29
Zack Williams52209662019-02-07 10:15:31 -0700120 [(child_node) = {key: "device_id"}];
121}
122
123// Device Self Test Response
124message SelfTestResponse {
William Kurkian12fc0af2019-04-18 14:27:45 -0400125 option (common.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
Zack Williams52209662019-02-07 10:15:31 -0700126
127 enum SelfTestResult {
128 SUCCESS = 0;
129 FAILURE = 1;
130 NOT_SUPPORTED = 2;
131 UNKNOWN_ERROR = 3;
132 }
133 SelfTestResult result = 1;
134}
135
136message OfAgentSubscriber {
137 // ID of ofagent instance
138 string ofagent_id = 1;
139
140 // ID of voltha instance to which the ofagent is subscribed
141 string voltha_id = 2;
142}
143
William Kurkian6ea97f82019-03-13 15:51:55 -0400144// Identifies a membership group a Core belongs to
145message Membership {
146 // Group name
147 string group_name = 1;
148
149 // Unique ID of a container within that group
150 string id = 2;
151}
152
manikkaraj k166cb202019-07-28 13:05:56 -0400153// Additional information required to process flow at device adapters
154message FlowMetadata {
155 // Meters associated with flow-update to adapter
156 repeated openflow_13.ofp_meter_config meters = 1;
157}
158
Zack Williams52209662019-02-07 10:15:31 -0700159/*
160 * Voltha APIs
161 *
162 */
163service VolthaService {
164
165 // Get more information on a given physical device
166 rpc UpdateLogLevel(Logging) returns(google.protobuf.Empty) {
167 option (google.api.http) = {
168 get: "/api/v1/logs"
169 };
170 }
171
William Kurkian6ea97f82019-03-13 15:51:55 -0400172 // Get the membership group of a Voltha Core
173 rpc GetMembership(google.protobuf.Empty) returns(Membership) {
174 option (google.api.http) = {
175 get: "/api/v1/membership"
176 };
177 }
178
179 // Set the membership group of a Voltha Core
180 rpc UpdateMembership(Membership) returns(google.protobuf.Empty) {
181 option (google.api.http) = {
182 post: "/api/v1/membership"
183 body: "*"
184 };
185 }
186
Zack Williams52209662019-02-07 10:15:31 -0700187 // Get high level information on the Voltha cluster
188 rpc GetVoltha(google.protobuf.Empty) returns(Voltha) {
189 option (google.api.http) = {
190 get: "/api/v1"
191 };
192 }
193
194 // List all Voltha cluster core instances
195 rpc ListCoreInstances(google.protobuf.Empty) returns(CoreInstances) {
196 option (google.api.http) = {
197 get: "/api/v1/instances"
198 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400199 option (common.yang_xml_tag).xml_tag = 'items';
200 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700201 }
202
203 // Get details on a Voltha cluster instance
William Kurkian12fc0af2019-04-18 14:27:45 -0400204 rpc GetCoreInstance(common.ID) returns(CoreInstance) {
Zack Williams52209662019-02-07 10:15:31 -0700205 option (google.api.http) = {
206 get: "/api/v1/instances/{id}"
207 };
208 }
209
210 // List all active adapters (plugins) in the Voltha cluster
211 rpc ListAdapters(google.protobuf.Empty) returns(Adapters) {
212 option (google.api.http) = {
213 get: "/api/v1/adapters"
214 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400215 option (common.yang_xml_tag).xml_tag = 'adapters';
Zack Williams52209662019-02-07 10:15:31 -0700216 }
217
218
219 // List all logical devices managed by the Voltha cluster
220 rpc ListLogicalDevices(google.protobuf.Empty) returns(LogicalDevices) {
221 option (google.api.http) = {
222 get: "/api/v1/logical_devices"
223 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400224 option (common.yang_xml_tag).xml_tag = 'logical_devices';
Zack Williams52209662019-02-07 10:15:31 -0700225 }
226
227 // Get additional information on a given logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400228 rpc GetLogicalDevice(common.ID) returns(LogicalDevice) {
Zack Williams52209662019-02-07 10:15:31 -0700229 option (google.api.http) = {
230 get: "/api/v1/logical_devices/{id}"
231 };
232 }
233
234 // List ports of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400235 rpc ListLogicalDevicePorts(common.ID) returns(LogicalPorts) {
Zack Williams52209662019-02-07 10:15:31 -0700236 option (google.api.http) = {
237 get: "/api/v1/logical_devices/{id}/ports"
238 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400239 option (common.yang_xml_tag).xml_tag = 'ports';
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 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400247 option (common.yang_xml_tag).xml_tag = 'port';
Zack Williams52209662019-02-07 10:15:31 -0700248 }
249
250 // Enables a logical device port
251 rpc EnableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
252 option (google.api.http) = {
253 post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable"
254 };
255 }
256
257 // Disables a logical device port
258 rpc DisableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
259 option (google.api.http) = {
260 post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable"
261 };
262 }
263
264 // List all flows of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400265 rpc ListLogicalDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700266 option (google.api.http) = {
267 get: "/api/v1/logical_devices/{id}/flows"
268 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400269 option (common.yang_xml_tag).xml_tag = 'flows';
270 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700271 }
272
273 // Update flow table for logical device
274 rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate)
275 returns(google.protobuf.Empty) {
276 option (google.api.http) = {
277 post: "/api/v1/logical_devices/{id}/flows"
278 body: "*"
279 };
280 }
281
282 // Update meter table for logical device
283 rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate)
284 returns(google.protobuf.Empty) {
285 option (google.api.http) = {
286 post: "/api/v1/logical_devices/{id}/meters"
287 body: "*"
288 };
289 }
290
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400291 // List all meters of a logical device
292 rpc ListLogicalDeviceMeters(common.ID) returns (openflow_13.Meters) {
Zack Williams52209662019-02-07 10:15:31 -0700293 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400294 get: "/api/v1/logical_devices/{id}/meters"
Zack Williams52209662019-02-07 10:15:31 -0700295 };
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400296 option (common.yang_xml_tag).xml_tag = 'meters';
297 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700298 }
299
300 // List all flow groups of a logical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400301 rpc ListLogicalDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
Zack Williams52209662019-02-07 10:15:31 -0700302 option (google.api.http) = {
303 get: "/api/v1/logical_devices/{id}/flow_groups"
304 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400305 option (common.yang_xml_tag).xml_tag = 'flow_groups';
306 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700307 }
308
309 // Update group table for device
310 rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate)
311 returns(google.protobuf.Empty) {
312 option (google.api.http) = {
313 post: "/api/v1/logical_devices/{id}/flow_groups"
314 body: "*"
315 };
316 }
317
318 // List all physical devices controlled by the Voltha cluster
319 rpc ListDevices(google.protobuf.Empty) returns(Devices) {
320 option (google.api.http) = {
321 get: "/api/v1/devices"
322 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400323 option (common.yang_xml_tag).xml_tag = 'devices';
Zack Williams52209662019-02-07 10:15:31 -0700324 }
325
326 // List all physical devices IDs controlled by the Voltha cluster
William Kurkian12fc0af2019-04-18 14:27:45 -0400327 rpc ListDeviceIds(google.protobuf.Empty) returns(common.IDs) {
Zack Williams52209662019-02-07 10:15:31 -0700328 option (google.api.http) = {
329 get: "/api/v1/deviceids"
330 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400331 option (common.yang_xml_tag).xml_tag = 'id';
332 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700333 }
334
335 // Request to a voltha Core to reconcile a set of devices based on their IDs
William Kurkian12fc0af2019-04-18 14:27:45 -0400336 rpc ReconcileDevices(common.IDs) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700337 option (google.api.http) = {
338 post: "/api/v1/deviceids"
339 body: "*"
340 };
341 }
342
343 // Get more information on a given physical device
William Kurkian12fc0af2019-04-18 14:27:45 -0400344 rpc GetDevice(common.ID) returns(Device) {
Zack Williams52209662019-02-07 10:15:31 -0700345 option (google.api.http) = {
346 get: "/api/v1/devices/{id}"
347 };
348 }
349
350 // Pre-provision a new physical device
351 rpc CreateDevice(Device) returns(Device) {
352 option (google.api.http) = {
353 post: "/api/v1/devices"
354 body: "*"
355 };
356 }
357
358 // Enable a device. If the device was in pre-provisioned state then it
359 // will transition to ENABLED state. If it was is DISABLED state then it
360 // will transition to ENABLED state as well.
William Kurkian12fc0af2019-04-18 14:27:45 -0400361 rpc EnableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700362 option (google.api.http) = {
363 post: "/api/v1/devices/{id}/enable"
364 };
365 }
366
367 // Disable a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400368 rpc DisableDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700369 option (google.api.http) = {
370 post: "/api/v1/devices/{id}/disable"
371 };
372 }
373
374 // Reboot a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400375 rpc RebootDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700376 option (google.api.http) = {
377 post: "/api/v1/devices/{id}/reboot"
378 };
379 }
380
381 // Delete a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400382 rpc DeleteDevice(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700383 option (google.api.http) = {
384 delete: "/api/v1/devices/{id}/delete"
385 };
386 }
387
388 // Request an image download to the standby partition
389 // of a device.
390 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400391 rpc DownloadImage(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700392 option (google.api.http) = {
393 post: "/api/v1/devices/{id}/image_downloads/{name}"
394 body: "*"
395 };
396 }
397
398 // Get image download status on a device
399 // The request retrieves progress on device and updates db record
400 rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {
401 option (google.api.http) = {
402 get: "/api/v1/devices/{id}/image_downloads/{name}/status"
403 };
404 }
405
406 // Get image download db record
407 rpc GetImageDownload(ImageDownload) returns(ImageDownload) {
408 option (google.api.http) = {
409 get: "/api/v1/devices/{id}/image_downloads/{name}"
410 };
411 }
412
413 // List image download db records for a given device
William Kurkian12fc0af2019-04-18 14:27:45 -0400414 rpc ListImageDownloads(common.ID) returns(ImageDownloads) {
Zack Williams52209662019-02-07 10:15:31 -0700415 option (google.api.http) = {
416 get: "/api/v1/devices/{id}/image_downloads"
417 };
418 }
419
420 // Cancel an existing image download process on a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400421 rpc CancelImageDownload(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700422 option (google.api.http) = {
423 delete: "/api/v1/devices/{id}/image_downloads/{name}"
424 };
425 }
426
427 // Activate the specified image at a standby partition
428 // to active partition.
429 // Depending on the device implementation, this call
430 // may or may not cause device reboot.
431 // If no reboot, then a reboot is required to make the
432 // activated image running on device
433 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400434 rpc ActivateImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700435 option (google.api.http) = {
436 post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
437 body: "*"
438 };
439 }
440
441 // Revert the specified image at standby partition
442 // to active partition, and revert to previous image
443 // Depending on the device implementation, this call
444 // may or may not cause device reboot.
445 // If no reboot, then a reboot is required to make the
446 // previous image running on device
447 // Note that the call is expected to be non-blocking.
William Kurkian12fc0af2019-04-18 14:27:45 -0400448 rpc RevertImageUpdate(ImageDownload) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700449 option (google.api.http) = {
450 post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
451 body: "*"
452 };
453 }
454
455 // List ports of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400456 rpc ListDevicePorts(common.ID) returns(Ports) {
Zack Williams52209662019-02-07 10:15:31 -0700457 option (google.api.http) = {
458 get: "/api/v1/devices/{id}/ports"
459 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400460 option (common.yang_xml_tag).xml_tag = 'ports';
Zack Williams52209662019-02-07 10:15:31 -0700461 }
462
463 // List pm config of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400464 rpc ListDevicePmConfigs(common.ID) returns(PmConfigs) {
Zack Williams52209662019-02-07 10:15:31 -0700465 option (google.api.http) = {
466 get: "/api/v1/devices/{id}/pm_configs"
467 };
468 }
469
470 // Update the pm config of a device
471 rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {
472 option (google.api.http) = {
473 post: "/api/v1/devices/{id}/pm_configs"
474 body: "*"
475 };
476 }
477
478 // List all flows of a device
William Kurkian12fc0af2019-04-18 14:27:45 -0400479 rpc ListDeviceFlows(common.ID) returns(openflow_13.Flows) {
Zack Williams52209662019-02-07 10:15:31 -0700480 option (google.api.http) = {
481 get: "/api/v1/devices/{id}/flows"
482 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400483 option (common.yang_xml_tag).xml_tag = 'flows';
484 option (common.yang_xml_tag).list_items_name = 'items';
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 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400492 option (common.yang_xml_tag).xml_tag = 'flow_groups';
493 option (common.yang_xml_tag).list_items_name = 'items';
Zack Williams52209662019-02-07 10:15:31 -0700494 }
495
496 // List device types known to Voltha
497 rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {
498 option (google.api.http) = {
499 get: "/api/v1/device_types"
500 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400501 option (common.yang_xml_tag).xml_tag = 'device_types';
Zack Williams52209662019-02-07 10:15:31 -0700502 }
503
504 // Get additional information on a device type
William Kurkian12fc0af2019-04-18 14:27:45 -0400505 rpc GetDeviceType(common.ID) returns(DeviceType) {
Zack Williams52209662019-02-07 10:15:31 -0700506 option (google.api.http) = {
507 get: "/api/v1/device_types/{id}"
508 };
509 }
510
511 // List all device sharding groups
512 rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {
513 option (google.api.http) = {
514 get: "/api/v1/device_groups"
515 };
William Kurkian12fc0af2019-04-18 14:27:45 -0400516 option (common.yang_xml_tag).xml_tag = 'device_groups';
Zack Williams52209662019-02-07 10:15:31 -0700517 }
518
519 // Stream control packets to the dataplane
520 rpc StreamPacketsOut(stream openflow_13.PacketOut)
521 returns(google.protobuf.Empty) {
522 // This does not have an HTTP representation
523 }
524
525 // Receive control packet stream
526 rpc ReceivePacketsIn(google.protobuf.Empty)
527 returns(stream openflow_13.PacketIn) {
528 // This does not have an HTTP representation
529 }
530
531 rpc ReceiveChangeEvents(google.protobuf.Empty)
532 returns(stream openflow_13.ChangeEvent) {
533 // This does not have an HTTP representation
534 }
535
536 // Get additional information on a device group
William Kurkian12fc0af2019-04-18 14:27:45 -0400537 rpc GetDeviceGroup(common.ID) returns(DeviceGroup) {
Zack Williams52209662019-02-07 10:15:31 -0700538 option (google.api.http) = {
539 get: "/api/v1/device_groups/{id}"
540 };
541 }
542
543 rpc CreateAlarmFilter(AlarmFilter) returns(AlarmFilter) {
544 option (google.api.http) = {
545 post: "/api/v1/alarm_filters"
546 body: "*"
547 };
548 }
549
William Kurkian12fc0af2019-04-18 14:27:45 -0400550 rpc GetAlarmFilter(common.ID) returns(AlarmFilter) {
Zack Williams52209662019-02-07 10:15:31 -0700551 option (google.api.http) = {
552 get: "/api/v1/alarm_filters/{id}"
553 };
554 }
555
556 rpc UpdateAlarmFilter(AlarmFilter) returns(AlarmFilter) {
557 option (google.api.http) = {
558 put: "/api/v1/alarm_filters/{id}"
559 body: "*"
560 };
561 }
562
William Kurkian12fc0af2019-04-18 14:27:45 -0400563 rpc DeleteAlarmFilter(common.ID) returns(google.protobuf.Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700564 option (google.api.http) = {
565 delete: "/api/v1/alarm_filters/{id}"
566 };
567 }
568
569 rpc ListAlarmFilters(google.protobuf.Empty) returns(AlarmFilters) {
570 option (google.api.http) = {
571 get: "/api/v1/alarm_filters"
572 };
573 }
574
William Kurkian12fc0af2019-04-18 14:27:45 -0400575 rpc GetImages(common.ID) returns(Images) {
Zack Williams52209662019-02-07 10:15:31 -0700576 option (google.api.http) = {
577 get: "/api/v1/devices/{id}/images"
578 };
579 }
580
William Kurkian12fc0af2019-04-18 14:27:45 -0400581 rpc SelfTest(common.ID) returns(SelfTestResponse) {
Zack Williams52209662019-02-07 10:15:31 -0700582 option (google.api.http) = {
583 post: "/api/v1/devices/{id}/self_test"
584 };
585 }
586
587 // OpenOMCI MIB information
William Kurkian12fc0af2019-04-18 14:27:45 -0400588 rpc GetMibDeviceData(common.ID) returns(omci.MibDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700589 option (google.api.http) = {
590 get: "/api/v1/openomci/{id}/mib"
591 };
592 }
593
594 // OpenOMCI ALARM information
William Kurkian12fc0af2019-04-18 14:27:45 -0400595 rpc GetAlarmDeviceData(common.ID) returns(omci.AlarmDeviceData) {
Zack Williams52209662019-02-07 10:15:31 -0700596 option (google.api.http) = {
597 get: "/api/v1/openomci/{id}/alarm"
598 };
599 }
600
601 // Simulate an Alarm
William Kurkian12fc0af2019-04-18 14:27:45 -0400602 rpc SimulateAlarm(SimulateAlarmRequest) returns(common.OperationResp) {
Zack Williams52209662019-02-07 10:15:31 -0700603 option (google.api.http) = {
604 post: "/api/v1/devices/{id}/simulate_larm"
605 body: "*"
606 };
607 }
608 rpc Subscribe (OfAgentSubscriber) returns (OfAgentSubscriber) {
609 }
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400610
Zack Williams52209662019-02-07 10:15:31 -0700611}
612