Zsolt Haraszti | 7eeb2b3 | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Top-level Voltha API definition |
| 3 | * |
| 4 | * For details, see individual definition files. |
| 5 | */ |
| 6 | |
Zsolt Haraszti | a54f2ac | 2016-09-21 15:54:15 -0700 | [diff] [blame] | 7 | syntax = "proto3"; |
| 8 | |
Stephane Barbarie | 3559506 | 2018-02-08 08:34:39 -0500 | [diff] [blame] | 9 | option go_package = "github.com/opencord/voltha/protos/go/voltha"; |
| 10 | |
Zsolt Haraszti | a54f2ac | 2016-09-21 15:54:15 -0700 | [diff] [blame] | 11 | package voltha; |
| 12 | |
Zsolt Haraszti | dafefe1 | 2016-11-14 21:29:58 -0800 | [diff] [blame] | 13 | import "google/protobuf/empty.proto"; |
Khen Nursimulu | d068d81 | 2017-03-06 11:44:18 -0500 | [diff] [blame] | 14 | import "google/protobuf/any.proto"; |
Zsolt Haraszti | dafefe1 | 2016-11-14 21:29:58 -0800 | [diff] [blame] | 15 | import "google/api/annotations.proto"; |
| 16 | |
Khen Nursimulu | 7626ce1 | 2016-12-21 11:51:46 -0500 | [diff] [blame] | 17 | import "yang_options.proto"; |
| 18 | |
Zsolt Haraszti | dafefe1 | 2016-11-14 21:29:58 -0800 | [diff] [blame] | 19 | import public "meta.proto"; |
Zsolt Haraszti | 7eeb2b3 | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 20 | import public "common.proto"; |
| 21 | import public "health.proto"; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 22 | import public "logical_device.proto"; |
| 23 | import public "device.proto"; |
Zsolt Haraszti | 7eeb2b3 | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 24 | import public "adapter.proto"; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 25 | import public "openflow_13.proto"; |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 26 | import "bbf_fiber.proto"; |
| 27 | import "bbf_fiber_base.proto"; |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 28 | import "bbf_fiber_gemport_body.proto"; |
| 29 | import "bbf_fiber_multicast_distribution_set_body.proto"; |
| 30 | import "bbf_fiber_multicast_gemport_body.proto"; |
| 31 | import "bbf_fiber_tcont_body.proto"; |
| 32 | import "bbf_fiber_traffic_descriptor_profile_body.proto"; |
Chip Boling | c7d3e2d | 2018-04-06 10:16:29 -0500 | [diff] [blame] | 33 | import "omci_mib_db.proto"; |
jasonhuang | 5f3e63b | 2018-07-27 01:32:48 +0800 | [diff] [blame] | 34 | import "omci_alarm_db.proto"; |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 35 | |
Zsolt Haraszti | a54f2ac | 2016-09-21 15:54:15 -0700 | [diff] [blame] | 36 | |
| 37 | option java_package = "org.opencord.voltha"; |
| 38 | option java_outer_classname = "VolthaProtos"; |
| 39 | option csharp_namespace = "Opencord.Voltha.Voltha"; |
Zsolt Haraszti | dafefe1 | 2016-11-14 21:29:58 -0800 | [diff] [blame] | 40 | |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 41 | message DeviceGroup { |
| 42 | |
| 43 | string id = 1 [(access) = READ_ONLY]; |
| 44 | |
| 45 | repeated LogicalDevice logical_devices = 2 [(child_node) = {key: "id"}]; |
| 46 | |
| 47 | repeated Device devices = 3 [(child_node) = {key: "id"}]; |
| 48 | } |
| 49 | |
| 50 | message DeviceGroups { |
| 51 | repeated DeviceGroup items = 1; |
| 52 | } |
| 53 | |
Stephane Barbarie | 4db8ca2 | 2017-04-24 10:30:20 -0400 | [diff] [blame] | 54 | |
| 55 | message AlarmFilterRuleKey { |
khenaidoo | 4cad268 | 2017-06-12 21:42:39 -0400 | [diff] [blame] | 56 | option (yang_child_rule) = MOVE_TO_PARENT_LEVEL; |
Jonathan Hart | 8d21c32 | 2018-04-17 07:42:02 -0700 | [diff] [blame] | 57 | |
Stephane Barbarie | 4db8ca2 | 2017-04-24 10:30:20 -0400 | [diff] [blame] | 58 | enum AlarmFilterRuleKey { |
| 59 | id = 0; |
| 60 | type = 1; |
| 61 | severity = 2; |
| 62 | resource_id = 3; |
| 63 | category = 4; |
| 64 | device_id = 5; |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | message AlarmFilterRule { |
| 69 | AlarmFilterRuleKey.AlarmFilterRuleKey key = 1; |
| 70 | string value = 2; |
| 71 | } |
| 72 | message AlarmFilter { |
| 73 | string id = 1 [(access) = READ_ONLY]; |
| 74 | |
| 75 | repeated AlarmFilterRule rules = 2; |
| 76 | } |
| 77 | |
| 78 | message AlarmFilters { |
| 79 | repeated AlarmFilter filters = 1; |
| 80 | } |
| 81 | |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 82 | // Top-level (root) node for a Voltha Instance |
| 83 | message VolthaInstance { |
Khen Nursimulu | 7626ce1 | 2016-12-21 11:51:46 -0500 | [diff] [blame] | 84 | option (yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER; |
Zsolt Haraszti | dafefe1 | 2016-11-14 21:29:58 -0800 | [diff] [blame] | 85 | |
| 86 | string instance_id = 1 [(access) = READ_ONLY]; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 87 | |
Zsolt Haraszti | dafefe1 | 2016-11-14 21:29:58 -0800 | [diff] [blame] | 88 | string version = 2 [(access) = READ_ONLY]; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 89 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 90 | LogLevel.LogLevel log_level = 3; |
Zsolt Haraszti | dafefe1 | 2016-11-14 21:29:58 -0800 | [diff] [blame] | 91 | |
| 92 | HealthStatus health = 10 [(child_node) = {}]; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 93 | |
| 94 | repeated Adapter adapters = 11 [(child_node) = {key: "id" }]; |
| 95 | |
| 96 | repeated LogicalDevice logical_devices = 12 [(child_node) = {key: "id"}]; |
| 97 | |
| 98 | repeated Device devices = 13 [(child_node) = {key: "id"}]; |
| 99 | |
| 100 | repeated DeviceType device_types = 14 [(child_node) = {key: "id"}]; |
| 101 | |
| 102 | repeated DeviceGroup device_groups = 15 [(child_node) = {key: "id"}]; |
Stephane Barbarie | 4db8ca2 | 2017-04-24 10:30:20 -0400 | [diff] [blame] | 103 | |
| 104 | repeated AlarmFilter alarm_filters = 16 [(child_node) = {key: "id"}]; |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 105 | |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 106 | repeated bbf_fiber.ChannelgroupConfig channel_groups = 17 |
| 107 | [(child_node) = {key: "name"}]; |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 108 | |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 109 | repeated bbf_fiber.ChannelpartitionConfig channel_partitions = 18 |
| 110 | [(child_node) = {key: "name"}]; |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 111 | |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 112 | repeated bbf_fiber.ChannelpairConfig channel_pairs = 19 |
| 113 | [(child_node) = {key: "name"}]; |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 114 | |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 115 | repeated bbf_fiber.OntaniConfig ont_anis = 20 |
| 116 | [(child_node) = {key: "name"}]; |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 117 | |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 118 | repeated bbf_fiber.VOntaniConfig v_ont_anis = 21 |
| 119 | [(child_node) = {key: "name"}]; |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 120 | |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 121 | repeated bbf_fiber.VEnetConfig v_enets = 22 |
| 122 | [(child_node) = {key: "name"}]; |
| 123 | |
| 124 | repeated |
| 125 | bbf_fiber.TrafficDescriptorProfileData traffic_descriptor_profiles = 23 |
| 126 | [(child_node) = {key: "name"}]; |
| 127 | |
| 128 | repeated bbf_fiber.TcontsConfigData tconts = 24 |
| 129 | [(child_node) = {key: "name"}]; |
| 130 | |
| 131 | repeated bbf_fiber.GemportsConfigData gemports = 25 |
| 132 | [(child_node) = {key: "name"}]; |
| 133 | |
| 134 | repeated bbf_fiber.MulticastGemportsConfigData multicast_gemports = 26 |
| 135 | [(child_node) = {key: "name"}]; |
| 136 | |
| 137 | repeated |
| 138 | bbf_fiber.MulticastDistributionSetData multicast_distibution_sets = 27 |
| 139 | [(child_node) = {key: "name"}]; |
Chip Boling | c7d3e2d | 2018-04-06 10:16:29 -0500 | [diff] [blame] | 140 | |
| 141 | repeated |
| 142 | omci.MibDeviceData omci_mibs = 28 |
| 143 | [(child_node) = {key: "device_id"}]; |
jasonhuang | 5f3e63b | 2018-07-27 01:32:48 +0800 | [diff] [blame] | 144 | |
| 145 | repeated |
| 146 | alarm.AlarmDeviceData omci_alarms = 29 |
| 147 | [(child_node) = {key: "device_id"}]; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 148 | } |
| 149 | |
| 150 | message VolthaInstances { |
Khen Nursimulu | 7626ce1 | 2016-12-21 11:51:46 -0500 | [diff] [blame] | 151 | option (yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 152 | repeated string items = 1; |
| 153 | } |
| 154 | |
| 155 | // Voltha representing the entire Voltha cluster |
| 156 | message Voltha { |
Khen Nursimulu | 7626ce1 | 2016-12-21 11:51:46 -0500 | [diff] [blame] | 157 | option (yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 158 | |
| 159 | string version = 1 [(access) = READ_ONLY]; |
| 160 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 161 | LogLevel.LogLevel log_level = 2; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 162 | |
| 163 | repeated VolthaInstance instances = 3 [(child_node) = {key: "instance_id"}]; |
| 164 | |
| 165 | repeated Adapter adapters = 11 [(child_node) = {key: "id"}]; |
| 166 | |
| 167 | repeated LogicalDevice logical_devices = 12 [(child_node) = {key: "id"}]; |
| 168 | |
| 169 | repeated Device devices = 13 [(child_node) = {key: "id"}]; |
| 170 | |
| 171 | repeated DeviceGroup device_groups = 15 [(child_node) = {key: "id"}]; |
Zsolt Haraszti | dafefe1 | 2016-11-14 21:29:58 -0800 | [diff] [blame] | 172 | |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 173 | repeated bbf_fiber.ChannelgroupConfig channel_groups = 16 |
| 174 | [(child_node) = {key: "name"}]; |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 175 | |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 176 | repeated bbf_fiber.ChannelpartitionConfig channel_partitions = 17 |
| 177 | [(child_node) = {key: "name"}]; |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 178 | |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 179 | repeated bbf_fiber.ChannelpairConfig channel_pairs = 18 |
| 180 | [(child_node) = {key: "name"}]; |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 181 | |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 182 | repeated bbf_fiber.OntaniConfig ont_anis = 19 |
| 183 | [(child_node) = {key: "name"}]; |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 184 | |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 185 | repeated bbf_fiber.VOntaniConfig v_ont_anis = 20 |
| 186 | [(child_node) = {key: "name"}]; |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 187 | |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 188 | repeated bbf_fiber.VEnetConfig v_enets = 21 |
| 189 | [(child_node) = {key: "name"}]; |
| 190 | |
| 191 | repeated |
| 192 | bbf_fiber.TrafficDescriptorProfileData traffic_descriptor_profiles = 23 |
| 193 | [(child_node) = {key: "name"}]; |
| 194 | |
| 195 | repeated bbf_fiber.TcontsConfigData tconts = 24 |
| 196 | [(child_node) = {key: "name"}]; |
| 197 | |
| 198 | repeated bbf_fiber.GemportsConfigData gemports = 25 |
| 199 | [(child_node) = {key: "name"}]; |
| 200 | |
| 201 | repeated bbf_fiber.MulticastGemportsConfigData multicast_gemports = 26 |
| 202 | [(child_node) = {key: "name"}]; |
| 203 | |
| 204 | repeated |
| 205 | bbf_fiber.MulticastDistributionSetData multicast_distibution_sets = 27 |
| 206 | [(child_node) = {key: "name"}]; |
Chip Boling | c7d3e2d | 2018-04-06 10:16:29 -0500 | [diff] [blame] | 207 | |
| 208 | repeated |
| 209 | omci.MibDeviceData omci_mib_database = 28 |
| 210 | [(child_node) = {key: "device_id"}]; |
jasonhuang | 5f3e63b | 2018-07-27 01:32:48 +0800 | [diff] [blame] | 211 | |
| 212 | repeated |
| 213 | alarm.AlarmDeviceData omci_alarm_database = 29 |
| 214 | [(child_node) = {key: "device_id"}]; |
Zsolt Haraszti | dafefe1 | 2016-11-14 21:29:58 -0800 | [diff] [blame] | 215 | } |
| 216 | |
sathishg | 5ae8622 | 2017-06-28 15:16:29 +0530 | [diff] [blame] | 217 | // Device Self Test Response |
| 218 | message SelfTestResponse { |
| 219 | option (yang_child_rule) = MOVE_TO_PARENT_LEVEL; |
| 220 | |
| 221 | enum SelfTestResult { |
| 222 | SUCCESS = 0; |
| 223 | FAILURE = 1; |
| 224 | NOT_SUPPORTED = 2; |
| 225 | UNKNOWN_ERROR = 3; |
| 226 | } |
| 227 | SelfTestResult result = 1; |
| 228 | } |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 229 | |
Stephane Barbarie | 2940dac | 2017-08-18 14:15:17 -0400 | [diff] [blame] | 230 | message OfAgentSubscriber { |
| 231 | // ID of ofagent instance |
| 232 | string ofagent_id = 1; |
| 233 | |
| 234 | // ID of voltha instance to which the ofagent is subscribed |
| 235 | string voltha_id = 2; |
| 236 | } |
| 237 | |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 238 | /* |
| 239 | * Cluster-wide Voltha APIs |
| 240 | * |
| 241 | * These APIs are potentially dispatched to the leader of the Voltha cluster, |
| 242 | * to a specific Voltha instance which owns the given device or logical device. |
| 243 | * |
| 244 | */ |
| 245 | service VolthaGlobalService { |
Zsolt Haraszti | dafefe1 | 2016-11-14 21:29:58 -0800 | [diff] [blame] | 246 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 247 | // Get high level information on the Voltha cluster |
Zsolt Haraszti | dafefe1 | 2016-11-14 21:29:58 -0800 | [diff] [blame] | 248 | rpc GetVoltha(google.protobuf.Empty) returns(Voltha) { |
| 249 | option (google.api.http) = { |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 250 | get: "/api/v1" |
Zsolt Haraszti | dafefe1 | 2016-11-14 21:29:58 -0800 | [diff] [blame] | 251 | }; |
| 252 | } |
| 253 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 254 | // List all Voltha cluster instances |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 255 | rpc ListVolthaInstances(google.protobuf.Empty) returns(VolthaInstances) { |
| 256 | option (google.api.http) = { |
| 257 | get: "/api/v1/instances" |
| 258 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 259 | option (voltha.yang_xml_tag).xml_tag = 'items'; |
| 260 | option (voltha.yang_xml_tag).list_items_name = 'items'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 261 | } |
| 262 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 263 | // Get details on a Voltha cluster instance |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 264 | rpc GetVolthaInstance(ID) returns(VolthaInstance) { |
| 265 | option (google.api.http) = { |
| 266 | get: "/api/v1/instances/{id}" |
| 267 | }; |
| 268 | } |
| 269 | |
khenaidoo | 997edbc | 2017-07-13 10:25:58 -0400 | [diff] [blame] | 270 | // List all active adapters (plugins) in the Voltha cluster |
| 271 | rpc ListAdapters(google.protobuf.Empty) returns(Adapters) { |
| 272 | option (google.api.http) = { |
| 273 | get: "/api/v1/adapters" |
| 274 | }; |
| 275 | option (voltha.yang_xml_tag).xml_tag = 'adapters'; |
| 276 | } |
| 277 | |
| 278 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 279 | // List all logical devices managed by the Voltha cluster |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 280 | rpc ListLogicalDevices(google.protobuf.Empty) returns(LogicalDevices) { |
| 281 | option (google.api.http) = { |
| 282 | get: "/api/v1/logical_devices" |
| 283 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 284 | option (voltha.yang_xml_tag).xml_tag = 'logical_devices'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 285 | } |
| 286 | |
Nicolas Palpacuer | 75ba77f | 2018-08-27 17:26:57 -0400 | [diff] [blame] | 287 | // List all reachable logical devices managed by the Voltha cluster |
| 288 | rpc ListReachableLogicalDevices(google.protobuf.Empty) returns |
| 289 | (LogicalDevices) { |
| 290 | option (google.api.http) = { |
| 291 | get: "/api/v1/reachable_logical_devices" |
| 292 | }; |
| 293 | } |
| 294 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 295 | // Get additional information on a given logical device |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 296 | rpc GetLogicalDevice(ID) returns(LogicalDevice) { |
| 297 | option (google.api.http) = { |
| 298 | get: "/api/v1/logical_devices/{id}" |
| 299 | }; |
| 300 | } |
| 301 | |
| 302 | // List ports of a logical device |
| 303 | rpc ListLogicalDevicePorts(ID) returns(LogicalPorts) { |
| 304 | option (google.api.http) = { |
| 305 | get: "/api/v1/logical_devices/{id}/ports" |
| 306 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 307 | option (voltha.yang_xml_tag).xml_tag = 'ports'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 308 | } |
| 309 | |
Jonathan Hart | 8d21c32 | 2018-04-17 07:42:02 -0700 | [diff] [blame] | 310 | // Gets a logical device port |
| 311 | rpc GetLogicalDevicePort(LogicalPortId) returns(LogicalPort) { |
| 312 | option (google.api.http) = { |
| 313 | get: "/api/v1/logical_devices/{id}/ports/{port_id}" |
| 314 | }; |
| 315 | option (voltha.yang_xml_tag).xml_tag = 'port'; |
| 316 | } |
| 317 | |
| 318 | // Enables a logical device port |
| 319 | rpc EnableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) { |
| 320 | option (google.api.http) = { |
| 321 | post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable" |
| 322 | }; |
| 323 | } |
| 324 | |
| 325 | // Disables a logical device port |
| 326 | rpc DisableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) { |
| 327 | option (google.api.http) = { |
| 328 | post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable" |
| 329 | }; |
| 330 | } |
| 331 | |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 332 | // List all flows of a logical device |
| 333 | rpc ListLogicalDeviceFlows(ID) returns(openflow_13.Flows) { |
| 334 | option (google.api.http) = { |
| 335 | get: "/api/v1/logical_devices/{id}/flows" |
| 336 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 337 | option (voltha.yang_xml_tag).xml_tag = 'flows'; |
| 338 | option (voltha.yang_xml_tag).list_items_name = 'items'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 339 | } |
| 340 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 341 | // Update flow table for logical device |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 342 | rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate) |
| 343 | returns(google.protobuf.Empty) { |
| 344 | option (google.api.http) = { |
| 345 | post: "/api/v1/logical_devices/{id}/flows" |
| 346 | body: "*" |
| 347 | }; |
| 348 | } |
| 349 | |
Koray Kokten | 8592a23 | 2018-08-27 07:41:14 +0000 | [diff] [blame] | 350 | // Update meter table for logical device |
| 351 | rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate) |
| 352 | returns(google.protobuf.Empty) { |
| 353 | option (google.api.http) = { |
| 354 | post: "/api/v1/logical_devices/{id}/meters" |
| 355 | body: "*" |
| 356 | }; |
| 357 | } |
| 358 | |
Gamze Abaka | 53cc0a2 | 2019-01-31 12:06:11 +0000 | [diff] [blame^] | 359 | // List all meters of a logical device |
| 360 | rpc ListLogicalDeviceMeters(ID) returns (openflow_13.Meters) { |
Koray Kokten | 8592a23 | 2018-08-27 07:41:14 +0000 | [diff] [blame] | 361 | option (google.api.http) = { |
Gamze Abaka | 53cc0a2 | 2019-01-31 12:06:11 +0000 | [diff] [blame^] | 362 | get: "/api/v1/logical_devices/{id}/meters" |
Koray Kokten | 8592a23 | 2018-08-27 07:41:14 +0000 | [diff] [blame] | 363 | }; |
Gamze Abaka | 53cc0a2 | 2019-01-31 12:06:11 +0000 | [diff] [blame^] | 364 | option (voltha.yang_xml_tag).xml_tag = 'meters'; |
| 365 | option (voltha.yang_xml_tag).list_items_name = 'items'; |
Koray Kokten | 8592a23 | 2018-08-27 07:41:14 +0000 | [diff] [blame] | 366 | } |
| 367 | |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 368 | // List all flow groups of a logical device |
| 369 | rpc ListLogicalDeviceFlowGroups(ID) returns(openflow_13.FlowGroups) { |
| 370 | option (google.api.http) = { |
| 371 | get: "/api/v1/logical_devices/{id}/flow_groups" |
| 372 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 373 | option (voltha.yang_xml_tag).xml_tag = 'flow_groups'; |
| 374 | option (voltha.yang_xml_tag).list_items_name = 'items'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 375 | } |
| 376 | |
| 377 | // Update group table for device |
| 378 | rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate) |
| 379 | returns(google.protobuf.Empty) { |
| 380 | option (google.api.http) = { |
| 381 | post: "/api/v1/logical_devices/{id}/flow_groups" |
| 382 | body: "*" |
| 383 | }; |
| 384 | } |
| 385 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 386 | // List all physical devices controlled by the Voltha cluster |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 387 | rpc ListDevices(google.protobuf.Empty) returns(Devices) { |
| 388 | option (google.api.http) = { |
| 389 | get: "/api/v1/devices" |
| 390 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 391 | option (voltha.yang_xml_tag).xml_tag = 'devices'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 392 | } |
| 393 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 394 | // Get more information on a given physical device |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 395 | rpc GetDevice(ID) returns(Device) { |
| 396 | option (google.api.http) = { |
| 397 | get: "/api/v1/devices/{id}" |
| 398 | }; |
| 399 | } |
| 400 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 401 | // Pre-provision a new physical device |
| 402 | rpc CreateDevice(Device) returns(Device) { |
| 403 | option (google.api.http) = { |
| 404 | post: "/api/v1/devices" |
| 405 | body: "*" |
| 406 | }; |
| 407 | } |
| 408 | |
Khen Nursimulu | d068d81 | 2017-03-06 11:44:18 -0500 | [diff] [blame] | 409 | // Enable a device. If the device was in pre-provisioned state then it |
Jonathan Hart | 8d21c32 | 2018-04-17 07:42:02 -0700 | [diff] [blame] | 410 | // will transition to ENABLED state. If it was is DISABLED state then it |
| 411 | // will transition to ENABLED state as well. |
Khen Nursimulu | d068d81 | 2017-03-06 11:44:18 -0500 | [diff] [blame] | 412 | rpc EnableDevice(ID) returns(google.protobuf.Empty) { |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 413 | option (google.api.http) = { |
Khen Nursimulu | d068d81 | 2017-03-06 11:44:18 -0500 | [diff] [blame] | 414 | post: "/api/v1/devices/{id}/enable" |
| 415 | }; |
| 416 | } |
| 417 | |
| 418 | // Disable a device |
| 419 | rpc DisableDevice(ID) returns(google.protobuf.Empty) { |
| 420 | option (google.api.http) = { |
| 421 | post: "/api/v1/devices/{id}/disable" |
| 422 | }; |
| 423 | } |
| 424 | |
| 425 | // Reboot a device |
| 426 | rpc RebootDevice(ID) returns(google.protobuf.Empty) { |
| 427 | option (google.api.http) = { |
| 428 | post: "/api/v1/devices/{id}/reboot" |
| 429 | }; |
| 430 | } |
| 431 | |
| 432 | // Delete a device |
| 433 | rpc DeleteDevice(ID) returns(google.protobuf.Empty) { |
| 434 | option (google.api.http) = { |
| 435 | delete: "/api/v1/devices/{id}/delete" |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 436 | }; |
| 437 | } |
| 438 | |
Lydia Fang | 01f2e85 | 2017-06-28 17:24:58 -0700 | [diff] [blame] | 439 | // Request an image download to the standby partition |
| 440 | // of a device. |
| 441 | // Note that the call is expected to be non-blocking. |
| 442 | rpc DownloadImage(ImageDownload) returns(OperationResp) { |
| 443 | option (google.api.http) = { |
| 444 | post: "/api/v1/devices/{id}/image_downloads/{name}" |
| 445 | body: "*" |
| 446 | }; |
| 447 | } |
| 448 | |
| 449 | // Get image download status on a device |
| 450 | // The request retrieves progress on device and updates db record |
| 451 | rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) { |
| 452 | option (google.api.http) = { |
| 453 | get: "/api/v1/devices/{id}/image_downloads/{name}/status" |
| 454 | }; |
| 455 | } |
| 456 | |
| 457 | // Get image download db record |
| 458 | rpc GetImageDownload(ImageDownload) returns(ImageDownload) { |
| 459 | option (google.api.http) = { |
| 460 | get: "/api/v1/devices/{id}/image_downloads/{name}" |
| 461 | }; |
| 462 | } |
| 463 | |
| 464 | // List image download db records for a given device |
| 465 | rpc ListImageDownloads(ID) returns(ImageDownloads) { |
| 466 | option (google.api.http) = { |
| 467 | get: "/api/v1/devices/{id}/image_downloads" |
| 468 | }; |
| 469 | } |
| 470 | |
| 471 | // Cancel an existing image download process on a device |
| 472 | rpc CancelImageDownload(ImageDownload) returns(OperationResp) { |
| 473 | option (google.api.http) = { |
| 474 | delete: "/api/v1/devices/{id}/image_downloads/{name}" |
| 475 | }; |
| 476 | } |
| 477 | |
| 478 | // Activate the specified image at a standby partition |
| 479 | // to active partition. |
| 480 | // Depending on the device implementation, this call |
| 481 | // may or may not cause device reboot. |
| 482 | // If no reboot, then a reboot is required to make the |
| 483 | // activated image running on device |
| 484 | // Note that the call is expected to be non-blocking. |
| 485 | rpc ActivateImageUpdate(ImageDownload) returns(OperationResp) { |
| 486 | option (google.api.http) = { |
| 487 | post: "/api/v1/devices/{id}/image_downloads/{name}/image_update" |
| 488 | body: "*" |
| 489 | }; |
| 490 | } |
| 491 | |
| 492 | // Revert the specified image at standby partition |
| 493 | // to active partition, and revert to previous image |
| 494 | // Depending on the device implementation, this call |
| 495 | // may or may not cause device reboot. |
| 496 | // If no reboot, then a reboot is required to make the |
| 497 | // previous image running on device |
| 498 | // Note that the call is expected to be non-blocking. |
| 499 | rpc RevertImageUpdate(ImageDownload) returns(OperationResp) { |
| 500 | option (google.api.http) = { |
| 501 | post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert" |
| 502 | body: "*" |
| 503 | }; |
| 504 | } |
| 505 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 506 | // List ports of a device |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 507 | rpc ListDevicePorts(ID) returns(Ports) { |
| 508 | option (google.api.http) = { |
| 509 | get: "/api/v1/devices/{id}/ports" |
| 510 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 511 | option (voltha.yang_xml_tag).xml_tag = 'ports'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 512 | } |
| 513 | |
Sergio Slobodrian | a2eb52b | 2017-03-07 12:24:46 -0500 | [diff] [blame] | 514 | // List pm config of a device |
| 515 | rpc ListDevicePmConfigs(ID) returns(PmConfigs) { |
| 516 | option (google.api.http) = { |
| 517 | get: "/api/v1/devices/{id}/pm_configs" |
| 518 | }; |
| 519 | } |
| 520 | |
| 521 | // Update the pm config of a device |
Sergio Slobodrian | 2db4c10 | 2017-03-09 22:29:23 -0500 | [diff] [blame] | 522 | rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) { |
Sergio Slobodrian | a2eb52b | 2017-03-07 12:24:46 -0500 | [diff] [blame] | 523 | option (google.api.http) = { |
| 524 | post: "/api/v1/devices/{id}/pm_configs" |
| 525 | body: "*" |
| 526 | }; |
| 527 | } |
| 528 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 529 | // List all flows of a device |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 530 | rpc ListDeviceFlows(ID) returns(openflow_13.Flows) { |
| 531 | option (google.api.http) = { |
| 532 | get: "/api/v1/devices/{id}/flows" |
| 533 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 534 | option (voltha.yang_xml_tag).xml_tag = 'flows'; |
| 535 | option (voltha.yang_xml_tag).list_items_name = 'items'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 536 | } |
| 537 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 538 | // List all flow groups of a device |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 539 | rpc ListDeviceFlowGroups(ID) returns(openflow_13.FlowGroups) { |
| 540 | option (google.api.http) = { |
| 541 | get: "/api/v1/devices/{id}/flow_groups" |
| 542 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 543 | option (voltha.yang_xml_tag).xml_tag = 'flow_groups'; |
| 544 | option (voltha.yang_xml_tag).list_items_name = 'items'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 545 | } |
| 546 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 547 | // List device types known to Voltha |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 548 | rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) { |
| 549 | option (google.api.http) = { |
| 550 | get: "/api/v1/device_types" |
| 551 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 552 | option (voltha.yang_xml_tag).xml_tag = 'device_types'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 553 | } |
| 554 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 555 | // Get additional information on a device type |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 556 | rpc GetDeviceType(ID) returns(DeviceType) { |
| 557 | option (google.api.http) = { |
| 558 | get: "/api/v1/device_types/{id}" |
| 559 | }; |
| 560 | } |
| 561 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 562 | // List all device sharding groups |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 563 | rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) { |
| 564 | option (google.api.http) = { |
| 565 | get: "/api/v1/device_groups" |
| 566 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 567 | option (voltha.yang_xml_tag).xml_tag = 'device_groups'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 568 | } |
| 569 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 570 | // Get additional information on a device group |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 571 | rpc GetDeviceGroup(ID) returns(DeviceGroup) { |
| 572 | option (google.api.http) = { |
| 573 | get: "/api/v1/device_groups/{id}" |
| 574 | }; |
| 575 | } |
| 576 | |
Stephane Barbarie | 4db8ca2 | 2017-04-24 10:30:20 -0400 | [diff] [blame] | 577 | rpc CreateAlarmFilter(AlarmFilter) returns(AlarmFilter) { |
| 578 | option (google.api.http) = { |
| 579 | post: "/api/v1/alarm_filters" |
| 580 | body: "*" |
| 581 | }; |
| 582 | } |
| 583 | |
| 584 | rpc GetAlarmFilter(ID) returns(AlarmFilter) { |
| 585 | option (google.api.http) = { |
| 586 | get: "/api/v1/alarm_filters/{id}" |
| 587 | }; |
| 588 | } |
| 589 | |
| 590 | rpc UpdateAlarmFilter(AlarmFilter) returns(AlarmFilter) { |
| 591 | option (google.api.http) = { |
| 592 | put: "/api/v1/alarm_filters/{id}" |
| 593 | body: "*" |
| 594 | }; |
| 595 | } |
| 596 | |
| 597 | rpc DeleteAlarmFilter(ID) returns(google.protobuf.Empty) { |
| 598 | option (google.api.http) = { |
| 599 | delete: "/api/v1/alarm_filters/{id}" |
| 600 | }; |
| 601 | } |
| 602 | |
| 603 | rpc ListAlarmFilters(google.protobuf.Empty) returns(AlarmFilters) { |
| 604 | option (google.api.http) = { |
| 605 | get: "/api/v1/alarm_filters" |
| 606 | }; |
| 607 | } |
ggowdru | 236bd95 | 2017-06-20 20:32:55 -0700 | [diff] [blame] | 608 | |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 609 | // List all Channel Groups |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 610 | rpc GetAllChannelgroupConfig(google.protobuf.Empty) |
| 611 | returns(bbf_fiber.AllChannelgroupConfig) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 612 | option (google.api.http) = { |
| 613 | get: "/api/v1/channel_groups" |
| 614 | }; |
| 615 | } |
| 616 | // Create Channel Group |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 617 | rpc CreateChannelgroup(bbf_fiber.ChannelgroupConfig) |
| 618 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 619 | option (google.api.http) = { |
| 620 | post: "/api/v1/channel_groups/{name}" |
| 621 | body: "*" |
| 622 | }; |
| 623 | } |
| 624 | // Update Channel Group |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 625 | rpc UpdateChannelgroup(bbf_fiber.ChannelgroupConfig) |
| 626 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 627 | option (google.api.http) = { |
| 628 | post: "/api/v1/channel_groups/{name}/modify" |
| 629 | body: "*" |
| 630 | }; |
| 631 | } |
| 632 | // Delete Channel Group |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 633 | rpc DeleteChannelgroup(bbf_fiber.ChannelgroupConfig) |
| 634 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 635 | option (google.api.http) = { |
| 636 | delete: "/api/v1/channel_groups/{name}/delete" |
| 637 | }; |
| 638 | } |
| 639 | // List all channel partitions |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 640 | rpc GetAllChannelpartitionConfig(google.protobuf.Empty) |
| 641 | returns(bbf_fiber.AllChannelpartitionConfig) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 642 | option (google.api.http) = { |
| 643 | get: "/api/v1/channel_partitions" |
| 644 | }; |
| 645 | } |
| 646 | // Create a channel partition |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 647 | rpc CreateChannelpartition(bbf_fiber.ChannelpartitionConfig) |
| 648 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 649 | option (google.api.http) = { |
| 650 | post: "/api/v1/channel_partitions/{name}" |
| 651 | body: "*" |
| 652 | }; |
| 653 | } |
| 654 | // Update a channel partition |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 655 | rpc UpdateChannelpartition(bbf_fiber.ChannelpartitionConfig) |
| 656 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 657 | option (google.api.http) = { |
| 658 | post: "/api/v1/channel_partitions/{name}/modify" |
| 659 | body: "*" |
| 660 | }; |
| 661 | } |
| 662 | // Delete a channel partition |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 663 | rpc DeleteChannelpartition(bbf_fiber.ChannelpartitionConfig) |
| 664 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 665 | option (google.api.http) = { |
| 666 | delete: "/api/v1/channel_partitions/{name}/delete" |
| 667 | }; |
| 668 | } |
| 669 | |
| 670 | // List all channel pairs managed by this Voltha instance |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 671 | rpc GetAllChannelpairConfig(google.protobuf.Empty) |
| 672 | returns(bbf_fiber.AllChannelpairConfig) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 673 | option (google.api.http) = { |
| 674 | get: "/api/v1/channel_pairs" |
| 675 | }; |
| 676 | } |
| 677 | // Create a channel pair |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 678 | rpc CreateChannelpair(bbf_fiber.ChannelpairConfig) |
| 679 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 680 | option (google.api.http) = { |
| 681 | post: "/api/v1/channel_pairs/{name}" |
| 682 | body: "*" |
| 683 | }; |
| 684 | } |
| 685 | // Update a channel pair |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 686 | rpc UpdateChannelpair(bbf_fiber.ChannelpairConfig) |
| 687 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 688 | option (google.api.http) = { |
| 689 | post: "/api/v1/channel_pairs/{name}/modify" |
| 690 | body: "*" |
| 691 | }; |
| 692 | } |
| 693 | // Delete a channel pair |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 694 | rpc DeleteChannelpair(bbf_fiber.ChannelpairConfig) |
| 695 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 696 | option (google.api.http) = { |
| 697 | delete: "/api/v1/channel_pairs/{name}/delete" |
| 698 | }; |
| 699 | } |
| 700 | // List all channel terminations managed by this Voltha instance |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 701 | rpc GetAllChannelterminationConfig(ID) |
| 702 | returns(bbf_fiber.AllChannelterminationConfig) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 703 | option (google.api.http) = { |
| 704 | get: "/api/v1/devices/{id}/channel_terminations" |
| 705 | }; |
| 706 | } |
| 707 | // Create a channel termination |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 708 | rpc CreateChanneltermination(bbf_fiber.ChannelterminationConfig) |
| 709 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 710 | option (google.api.http) = { |
| 711 | post: "/api/v1/devices/{id}/channel_terminations/{name}" |
| 712 | body: "*" |
| 713 | }; |
| 714 | } |
| 715 | // Update a channel termination |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 716 | rpc UpdateChanneltermination(bbf_fiber.ChannelterminationConfig) |
| 717 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 718 | option (google.api.http) = { |
| 719 | post: "/api/v1/devices/{id}/channel_terminations/{name}/modify" |
| 720 | body: "*" |
| 721 | }; |
| 722 | } |
| 723 | // Delete a channel termination |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 724 | rpc DeleteChanneltermination(bbf_fiber.ChannelterminationConfig) |
| 725 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 726 | option (google.api.http) = { |
| 727 | delete: "/api/v1/devices/{id}/channel_terminations/{name}/delete" |
| 728 | }; |
| 729 | } |
| 730 | // List all ont configs managed by this Voltha instance |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 731 | rpc GetAllOntaniConfig(google.protobuf.Empty) |
| 732 | returns(bbf_fiber.AllOntaniConfig) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 733 | option (google.api.http) = { |
| 734 | get: "/api/v1/ont_anis" |
| 735 | }; |
| 736 | } |
| 737 | // Create an ont configs |
| 738 | rpc CreateOntani(bbf_fiber.OntaniConfig) returns(google.protobuf.Empty) { |
| 739 | option (google.api.http) = { |
| 740 | post: "/api/v1/ont_anis/{name}" |
| 741 | body: "*" |
| 742 | }; |
| 743 | } |
| 744 | // Update an ont configs |
| 745 | rpc UpdateOntani(bbf_fiber.OntaniConfig) returns(google.protobuf.Empty) { |
| 746 | option (google.api.http) = { |
| 747 | post: "/api/v1/ont_anis/{name}/modify" |
| 748 | body: "*" |
| 749 | }; |
| 750 | } |
| 751 | // Delete an ont configs |
| 752 | rpc DeleteOntani(bbf_fiber.OntaniConfig) returns(google.protobuf.Empty) { |
| 753 | option (google.api.http) = { |
| 754 | delete: "/api/v1/ont_anis/{name}/delete" |
| 755 | }; |
| 756 | } |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 757 | // List all vont configs managed by this Voltha instance |
| 758 | rpc GetAllVOntaniConfig(google.protobuf.Empty) |
| 759 | returns(bbf_fiber.AllVOntaniConfig) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 760 | option (google.api.http) = { |
| 761 | get: "/api/v1/v_ont_anis" |
| 762 | }; |
| 763 | } |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 764 | // Create a vont configs |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 765 | rpc CreateVOntani(bbf_fiber.VOntaniConfig) returns(google.protobuf.Empty) { |
| 766 | option (google.api.http) = { |
| 767 | post: "/api/v1/v_ont_anis/{name}" |
| 768 | body: "*" |
| 769 | }; |
| 770 | } |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 771 | // Update a vont configs |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 772 | rpc UpdateVOntani(bbf_fiber.VOntaniConfig) returns(google.protobuf.Empty) { |
| 773 | option (google.api.http) = { |
| 774 | post: "/api/v1/v_ont_anis/{name}/modify" |
| 775 | body: "*" |
| 776 | }; |
| 777 | } |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 778 | // Delete a vont configs |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 779 | rpc DeleteVOntani(bbf_fiber.VOntaniConfig) returns(google.protobuf.Empty) { |
| 780 | option (google.api.http) = { |
| 781 | delete: "/api/v1/v_ont_anis/{name}/delete" |
| 782 | }; |
| 783 | } |
| 784 | // List all venet configs managed by this Voltha instance |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 785 | rpc GetAllVEnetConfig(google.protobuf.Empty) |
| 786 | returns(bbf_fiber.AllVEnetConfig) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 787 | option (google.api.http) = { |
| 788 | get: "/api/v1/v_enets" |
| 789 | }; |
| 790 | } |
| 791 | // Create venet configs |
| 792 | rpc CreateVEnet(bbf_fiber.VEnetConfig) returns(google.protobuf.Empty) { |
| 793 | option (google.api.http) = { |
| 794 | post: "/api/v1/v_enets/{name}" |
| 795 | body: "*" |
| 796 | }; |
| 797 | } |
| 798 | // Update venet configs |
| 799 | rpc UpdateVEnet(bbf_fiber.VEnetConfig) returns(google.protobuf.Empty) { |
| 800 | option (google.api.http) = { |
| 801 | post: "/api/v1/v_enets/{name}/modify" |
| 802 | body: "*" |
| 803 | }; |
| 804 | } |
| 805 | // Delete venet configs |
| 806 | rpc DeleteVEnet(bbf_fiber.VEnetConfig) returns(google.protobuf.Empty) { |
| 807 | option (google.api.http) = { |
| 808 | delete: "/api/v1/v_enets/{name}/delete" |
| 809 | }; |
| 810 | } |
| 811 | |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 812 | // List all Traffic Descriptors Profiles |
| 813 | rpc GetAllTrafficDescriptorProfileData(google.protobuf.Empty) |
| 814 | returns(bbf_fiber.AllTrafficDescriptorProfileData) { |
| 815 | option (google.api.http) = { |
| 816 | get: "/api/v1/traffic_descriptor_profiles" |
| 817 | }; |
| 818 | } |
| 819 | // Create Traffic Descriptor Profile |
| 820 | rpc CreateTrafficDescriptorProfileData( |
| 821 | bbf_fiber.TrafficDescriptorProfileData) |
| 822 | returns(google.protobuf.Empty) { |
| 823 | option (google.api.http) = { |
| 824 | post: "/api/v1/traffic_descriptor_profiles/{name}" |
| 825 | body: "*" |
| 826 | }; |
| 827 | } |
| 828 | // Update Traffic Descriptor Profile |
| 829 | rpc UpdateTrafficDescriptorProfileData( |
| 830 | bbf_fiber.TrafficDescriptorProfileData) |
| 831 | returns(google.protobuf.Empty) { |
| 832 | option (google.api.http) = { |
| 833 | post: "/api/v1/traffic_descriptor_profiles/{name}/modify" |
| 834 | body: "*" |
| 835 | }; |
| 836 | } |
| 837 | // Delete Traffic Descriptor Profile |
| 838 | rpc DeleteTrafficDescriptorProfileData( |
| 839 | bbf_fiber.TrafficDescriptorProfileData) |
| 840 | returns(google.protobuf.Empty) { |
| 841 | option (google.api.http) = { |
| 842 | delete: "/api/v1/traffic_descriptor_profiles/{name}/delete" |
| 843 | }; |
| 844 | } |
| 845 | |
| 846 | // List all Tconts |
| 847 | rpc GetAllTcontsConfigData(google.protobuf.Empty) |
| 848 | returns(bbf_fiber.AllTcontsConfigData) { |
| 849 | option (google.api.http) = { |
| 850 | get: "/api/v1/tconts" |
| 851 | }; |
| 852 | } |
| 853 | // Create Tcont |
| 854 | rpc CreateTcontsConfigData(bbf_fiber.TcontsConfigData) |
| 855 | returns(google.protobuf.Empty) { |
| 856 | option (google.api.http) = { |
| 857 | post: "/api/v1/tconts/{name}" |
| 858 | body: "*" |
| 859 | }; |
| 860 | } |
| 861 | // Update Tcont |
| 862 | rpc UpdateTcontsConfigData(bbf_fiber.TcontsConfigData) |
| 863 | returns(google.protobuf.Empty) { |
| 864 | option (google.api.http) = { |
| 865 | post: "/api/v1/tconts/{name}/modify" |
| 866 | body: "*" |
| 867 | }; |
| 868 | } |
| 869 | // Delete Tcont |
| 870 | rpc DeleteTcontsConfigData(bbf_fiber.TcontsConfigData) |
| 871 | returns(google.protobuf.Empty) { |
| 872 | option (google.api.http) = { |
| 873 | delete: "/api/v1/tconts/{name}/delete" |
| 874 | }; |
| 875 | } |
| 876 | |
| 877 | // List all Gemports |
| 878 | rpc GetAllGemportsConfigData(google.protobuf.Empty) |
| 879 | returns(bbf_fiber.AllGemportsConfigData) { |
| 880 | option (google.api.http) = { |
| 881 | get: "/api/v1/gemports" |
| 882 | }; |
| 883 | } |
| 884 | // Create Gemport |
| 885 | rpc CreateGemportsConfigData(bbf_fiber.GemportsConfigData) |
| 886 | returns(google.protobuf.Empty) { |
| 887 | option (google.api.http) = { |
| 888 | post: "/api/v1/gemports/{name}" |
| 889 | body: "*" |
| 890 | }; |
| 891 | } |
| 892 | // Update Gemport |
| 893 | rpc UpdateGemportsConfigData(bbf_fiber.GemportsConfigData) |
| 894 | returns(google.protobuf.Empty) { |
| 895 | option (google.api.http) = { |
| 896 | post: "/api/v1/gemports/{name}/modify" |
| 897 | body: "*" |
| 898 | }; |
| 899 | } |
| 900 | // Delete Gemport |
| 901 | rpc DeleteGemportsConfigData(bbf_fiber.GemportsConfigData) |
| 902 | returns(google.protobuf.Empty) { |
| 903 | option (google.api.http) = { |
| 904 | delete: "/api/v1/gemports/{name}/delete" |
| 905 | }; |
| 906 | } |
| 907 | |
| 908 | // List all Multicast Gemports |
| 909 | rpc GetAllMulticastGemportsConfigData(google.protobuf.Empty) |
| 910 | returns(bbf_fiber.AllMulticastGemportsConfigData) { |
| 911 | option (google.api.http) = { |
| 912 | get: "/api/v1/multicast_gemports" |
| 913 | }; |
| 914 | } |
| 915 | // Create Multicast Gemport |
| 916 | rpc CreateMulticastGemportsConfigData( |
| 917 | bbf_fiber.MulticastGemportsConfigData) |
| 918 | returns(google.protobuf.Empty) { |
| 919 | option (google.api.http) = { |
| 920 | post: "/api/v1/multicast_gemports/{name}" |
| 921 | body: "*" |
| 922 | }; |
| 923 | } |
| 924 | // Update Multicast Gemport |
| 925 | rpc UpdateMulticastGemportsConfigData( |
| 926 | bbf_fiber.MulticastGemportsConfigData) |
| 927 | returns(google.protobuf.Empty) { |
| 928 | option (google.api.http) = { |
| 929 | post: "/api/v1/multicast_gemports/{name}/modify" |
| 930 | body: "*" |
| 931 | }; |
| 932 | } |
| 933 | // Delete Multicast Gemport |
| 934 | rpc DeleteMulticastGemportsConfigData( |
| 935 | bbf_fiber.MulticastGemportsConfigData) |
| 936 | returns(google.protobuf.Empty) { |
| 937 | option (google.api.http) = { |
| 938 | delete: "/api/v1/multicast_gemports/{name}/delete" |
| 939 | }; |
| 940 | } |
| 941 | |
| 942 | // List all Multicast Distribution Sets |
| 943 | rpc GetAllMulticastDistributionSetData(google.protobuf.Empty) |
| 944 | returns(bbf_fiber.AllMulticastDistributionSetData) { |
| 945 | option (google.api.http) = { |
| 946 | get: "/api/v1/multicast_distibution_sets" |
| 947 | }; |
| 948 | } |
| 949 | // Create Multicast Distribution Set |
| 950 | rpc CreateMulticastDistributionSetData( |
| 951 | bbf_fiber.MulticastDistributionSetData) |
| 952 | returns(google.protobuf.Empty) { |
| 953 | option (google.api.http) = { |
| 954 | post: "/api/v1/multicast_distribution_sets/{name}" |
| 955 | body: "*" |
| 956 | }; |
| 957 | } |
| 958 | // Update Multicast Distribution Set |
| 959 | rpc UpdateMulticastDistributionSetData( |
| 960 | bbf_fiber.MulticastDistributionSetData) |
| 961 | returns(google.protobuf.Empty) { |
| 962 | option (google.api.http) = { |
| 963 | post: "/api/v1/multicast_distribution_sets/{name}/modify" |
| 964 | body: "*" |
| 965 | }; |
| 966 | } |
| 967 | // Delete Multicast Distribution Set |
| 968 | rpc DeleteMulticastDistributionSetData( |
| 969 | bbf_fiber.MulticastDistributionSetData) |
| 970 | returns(google.protobuf.Empty) { |
| 971 | option (google.api.http) = { |
| 972 | delete: "/api/v1/multicast_distribution_sets/{name}/delete" |
| 973 | }; |
| 974 | } |
| 975 | |
ggowdru | 236bd95 | 2017-06-20 20:32:55 -0700 | [diff] [blame] | 976 | rpc GetImages(ID) returns(Images) { |
| 977 | option (google.api.http) = { |
| 978 | get: "/api/v1/devices/{id}/images" |
| 979 | }; |
| 980 | } |
sathishg | 5ae8622 | 2017-06-28 15:16:29 +0530 | [diff] [blame] | 981 | |
| 982 | rpc SelfTest(ID) returns(SelfTestResponse) { |
| 983 | option (google.api.http) = { |
| 984 | post: "/api/v1/devices/{id}/self_test" |
| 985 | }; |
| 986 | } |
Chip Boling | 69abce8 | 2018-06-18 09:56:23 -0500 | [diff] [blame] | 987 | |
| 988 | // OpenOMCI MIB information |
| 989 | rpc GetMibDeviceData(ID) returns(omci.MibDeviceData) { |
| 990 | option (google.api.http) = { |
| 991 | get: "/api/v1/openomci/{id}/mib" |
| 992 | }; |
| 993 | } |
jasonhuang | 5f3e63b | 2018-07-27 01:32:48 +0800 | [diff] [blame] | 994 | |
| 995 | // OpenOMCI ALARM information |
| 996 | rpc GetAlarmDeviceData(ID) returns(alarm.AlarmDeviceData) { |
| 997 | option (google.api.http) = { |
| 998 | get: "/api/v1/openomci/{id}/alarm" |
| 999 | }; |
| 1000 | } |
Scott Baker | d319095 | 2018-09-04 15:47:28 -0700 | [diff] [blame] | 1001 | |
| 1002 | // Simulate an Alarm |
| 1003 | rpc SimulateAlarm(SimulateAlarmRequest) returns(OperationResp) { |
| 1004 | option (google.api.http) = { |
| 1005 | post: "/api/v1/devices/{id}/simulate_larm" |
| 1006 | body: "*" |
| 1007 | }; |
| 1008 | } |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1009 | } |
| 1010 | |
| 1011 | /* |
| 1012 | * Per-instance APIs |
| 1013 | * |
| 1014 | * These APIs are always served locally by the Voltha instance on which the |
| 1015 | * call is made. |
| 1016 | */ |
| 1017 | service VolthaLocalService { |
| 1018 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1019 | // Get information on this Voltha instance |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1020 | rpc GetVolthaInstance(google.protobuf.Empty) returns(VolthaInstance) { |
| 1021 | option (google.api.http) = { |
| 1022 | get: "/api/v1/local" |
| 1023 | }; |
| 1024 | } |
| 1025 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1026 | // Get the health state of the Voltha instance |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1027 | rpc GetHealth(google.protobuf.Empty) returns(HealthStatus) { |
| 1028 | option (google.api.http) = { |
| 1029 | get: "/api/v1/local/health" |
| 1030 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 1031 | option (voltha.yang_xml_tag).xml_tag = 'health'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1032 | } |
| 1033 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1034 | // List all active adapters (plugins) in this Voltha instance |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1035 | rpc ListAdapters(google.protobuf.Empty) returns(Adapters) { |
| 1036 | option (google.api.http) = { |
| 1037 | get: "/api/v1/local/adapters" |
| 1038 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 1039 | option (voltha.yang_xml_tag).xml_tag = 'adapters'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1040 | } |
| 1041 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1042 | // List all logical devices managed by this Voltha instance |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1043 | rpc ListLogicalDevices(google.protobuf.Empty) returns(LogicalDevices) { |
| 1044 | option (google.api.http) = { |
| 1045 | get: "/api/v1/local/logical_devices" |
| 1046 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 1047 | option (voltha.yang_xml_tag).xml_tag = 'logical_devices'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1048 | } |
| 1049 | |
Nicolas Palpacuer | 75ba77f | 2018-08-27 17:26:57 -0400 | [diff] [blame] | 1050 | // List all reachable logical devices managed by this Voltha instance |
| 1051 | rpc ListReachableLogicalDevices(google.protobuf.Empty) returns |
| 1052 | (LogicalDevices) { |
| 1053 | option (google.api.http) = { |
| 1054 | get: "/api/v1/local/reachable_logical_devices" |
| 1055 | }; |
| 1056 | } |
| 1057 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1058 | // Get additional information on given logical device |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1059 | rpc GetLogicalDevice(ID) returns(LogicalDevice) { |
| 1060 | option (google.api.http) = { |
| 1061 | get: "/api/v1/local/logical_devices/{id}" |
| 1062 | }; |
| 1063 | } |
| 1064 | |
| 1065 | // List ports of a logical device |
| 1066 | rpc ListLogicalDevicePorts(ID) returns(LogicalPorts) { |
| 1067 | option (google.api.http) = { |
| 1068 | get: "/api/v1/local/logical_devices/{id}/ports" |
| 1069 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 1070 | option (voltha.yang_xml_tag).xml_tag = 'ports'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1071 | } |
| 1072 | |
Jonathan Hart | 8d21c32 | 2018-04-17 07:42:02 -0700 | [diff] [blame] | 1073 | // Gets a logical device port |
| 1074 | rpc GetLogicalDevicePort(LogicalPortId) returns(LogicalPort) { |
| 1075 | option (google.api.http) = { |
| 1076 | get: "/api/v1/logical_devices/{id}/ports/{port_id}" |
| 1077 | }; |
| 1078 | option (voltha.yang_xml_tag).xml_tag = 'port'; |
| 1079 | } |
| 1080 | |
| 1081 | // Enables a logical device port |
| 1082 | rpc EnableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) { |
| 1083 | option (google.api.http) = { |
| 1084 | post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable" |
| 1085 | }; |
| 1086 | } |
| 1087 | |
| 1088 | // Disables a logical device port |
| 1089 | rpc DisableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) { |
| 1090 | option (google.api.http) = { |
| 1091 | post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable" |
| 1092 | }; |
| 1093 | } |
| 1094 | |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1095 | // List all flows of a logical device |
| 1096 | rpc ListLogicalDeviceFlows(ID) returns(openflow_13.Flows) { |
| 1097 | option (google.api.http) = { |
| 1098 | get: "/api/v1/local/logical_devices/{id}/flows" |
| 1099 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 1100 | option (voltha.yang_xml_tag).xml_tag = 'flows'; |
| 1101 | option (voltha.yang_xml_tag).list_items_name = 'items'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1102 | } |
| 1103 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1104 | // Update flow table for logical device |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1105 | rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate) |
| 1106 | returns(google.protobuf.Empty) { |
| 1107 | option (google.api.http) = { |
| 1108 | post: "/api/v1/local/logical_devices/{id}/flows" |
| 1109 | body: "*" |
| 1110 | }; |
| 1111 | } |
| 1112 | |
Koray Kokten | 8592a23 | 2018-08-27 07:41:14 +0000 | [diff] [blame] | 1113 | // Update meter table for logical device |
| 1114 | rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate) |
| 1115 | returns(google.protobuf.Empty) { |
| 1116 | option (google.api.http) = { |
| 1117 | post: "/api/v1/logical_devices/{id}/meters" |
| 1118 | body: "*" |
| 1119 | }; |
| 1120 | } |
| 1121 | |
| 1122 | |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1123 | // List all flow groups of a logical device |
| 1124 | rpc ListLogicalDeviceFlowGroups(ID) returns(openflow_13.FlowGroups) { |
| 1125 | option (google.api.http) = { |
| 1126 | get: "/api/v1/local/logical_devices/{id}/flow_groups" |
| 1127 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 1128 | option (voltha.yang_xml_tag).xml_tag = 'flow_groups'; |
| 1129 | option (voltha.yang_xml_tag).list_items_name = 'items'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1130 | } |
| 1131 | |
Gamze Abaka | 53cc0a2 | 2019-01-31 12:06:11 +0000 | [diff] [blame^] | 1132 | // List all meters of a logical device |
| 1133 | rpc ListLogicalDeviceMeters(ID) returns (openflow_13.Meters) { |
| 1134 | option (google.api.http) = { |
| 1135 | get: "/api/v1/local/logical_devices/{id}/meters" |
| 1136 | }; |
| 1137 | option (voltha.yang_xml_tag).xml_tag = 'meters'; |
| 1138 | option (voltha.yang_xml_tag).list_items_name = 'items'; |
| 1139 | } |
| 1140 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1141 | // Update group table for logical device |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1142 | rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate) |
| 1143 | returns(google.protobuf.Empty) { |
| 1144 | option (google.api.http) = { |
| 1145 | post: "/api/v1/local/logical_devices/{id}/flow_groups" |
| 1146 | body: "*" |
| 1147 | }; |
| 1148 | } |
| 1149 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1150 | // List all physical devices managed by this Voltha instance |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1151 | rpc ListDevices(google.protobuf.Empty) returns(Devices) { |
| 1152 | option (google.api.http) = { |
| 1153 | get: "/api/v1/local/devices" |
| 1154 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 1155 | option (voltha.yang_xml_tag).xml_tag = 'devices'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1156 | } |
| 1157 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1158 | // Get additional information on this device |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1159 | rpc GetDevice(ID) returns(Device) { |
| 1160 | option (google.api.http) = { |
| 1161 | get: "/api/v1/local/devices/{id}" |
| 1162 | }; |
| 1163 | } |
| 1164 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1165 | // Pre-provision a new physical device |
| 1166 | rpc CreateDevice(Device) returns(Device) { |
| 1167 | option (google.api.http) = { |
| 1168 | post: "/api/v1/local/devices" |
| 1169 | body: "*" |
| 1170 | }; |
| 1171 | } |
| 1172 | |
Khen Nursimulu | d068d81 | 2017-03-06 11:44:18 -0500 | [diff] [blame] | 1173 | // Enable a device. If the device was in pre-provisioned state then it |
| 1174 | // will tansition to ENABLED state. If it was is DISABLED state then it |
| 1175 | // will tansition to ENABLED state as well. |
| 1176 | rpc EnableDevice(ID) returns(google.protobuf.Empty) { |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1177 | option (google.api.http) = { |
Khen Nursimulu | d068d81 | 2017-03-06 11:44:18 -0500 | [diff] [blame] | 1178 | post: "/api/v1/local/devices/{id}/enable" |
| 1179 | }; |
| 1180 | } |
| 1181 | |
| 1182 | // Disable a device |
| 1183 | rpc DisableDevice(ID) returns(google.protobuf.Empty) { |
| 1184 | option (google.api.http) = { |
| 1185 | post: "/api/v1/local/devices/{id}/disable" |
| 1186 | }; |
| 1187 | } |
| 1188 | |
| 1189 | // Reboot a device |
| 1190 | rpc RebootDevice(ID) returns(google.protobuf.Empty) { |
| 1191 | option (google.api.http) = { |
| 1192 | post: "/api/v1/local/devices/{id}/reboot" |
| 1193 | }; |
| 1194 | } |
| 1195 | |
| 1196 | // Delete a device |
| 1197 | rpc DeleteDevice(ID) returns(google.protobuf.Empty) { |
| 1198 | option (google.api.http) = { |
Khen Nursimulu | 29e7550 | 2017-03-07 17:26:50 -0500 | [diff] [blame] | 1199 | delete: "/api/v1/local/devices/{id}/delete" |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1200 | }; |
| 1201 | } |
| 1202 | |
Lydia Fang | 01f2e85 | 2017-06-28 17:24:58 -0700 | [diff] [blame] | 1203 | // Request an image download to the standby partition |
| 1204 | // of a device. |
| 1205 | // Note that the call is expected to be non-blocking |
| 1206 | rpc DownloadImage(ImageDownload) returns(OperationResp) { |
| 1207 | option (google.api.http) = { |
| 1208 | post: "/api/v1/local/devices/{id}/image_downloads/{name}" |
| 1209 | body: "*" |
| 1210 | }; |
| 1211 | } |
| 1212 | |
| 1213 | // Get image download status on a device |
| 1214 | // The request retrieves progress on device and updates db record |
| 1215 | rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) { |
| 1216 | option (google.api.http) = { |
| 1217 | get: "/api/v1/local/devices/{id}/image_downloads/{name}/status" |
| 1218 | }; |
| 1219 | } |
| 1220 | |
| 1221 | // Get image download db record |
| 1222 | rpc GetImageDownload(ImageDownload) returns(ImageDownload) { |
| 1223 | option (google.api.http) = { |
| 1224 | get: "/api/v1/local/devices/{id}/image_downloads/{name}" |
| 1225 | }; |
| 1226 | } |
| 1227 | |
| 1228 | // List image download db records for a given device |
| 1229 | rpc ListImageDownloads(ID) returns(ImageDownloads) { |
| 1230 | option (google.api.http) = { |
| 1231 | get: "/api/v1/local/devices/{id}/image_downloads" |
| 1232 | }; |
| 1233 | } |
| 1234 | |
| 1235 | // Cancel an image download process on a device |
| 1236 | rpc CancelImageDownload(ImageDownload) returns(OperationResp) { |
| 1237 | option (google.api.http) = { |
| 1238 | delete: "/api/v1/local/devices/{id}/image_downloads/{name}" |
| 1239 | }; |
| 1240 | } |
| 1241 | |
| 1242 | // Install and Activate a downloaded image from standby |
| 1243 | // partition to active partition |
| 1244 | // A subsequent call to reboot will cause the newly update image |
| 1245 | // to become active |
| 1246 | // Note that the call is expected to be non-blocking. |
| 1247 | rpc ActivateImageUpdate(ImageDownload) returns(OperationResp) { |
| 1248 | option (google.api.http) = { |
| 1249 | post: "/api/v1/local/devices/{id}/image_downloads/{name}/image_update" |
| 1250 | body: "*" |
| 1251 | }; |
| 1252 | } |
| 1253 | |
| 1254 | // Uninstall and deactivate an image update on a device, |
| 1255 | // and revert back to pre update image |
| 1256 | // A subsequent call to reboot will cause the pre update image |
| 1257 | // to become active |
| 1258 | // Note that the call is expected to be non-blocking. |
| 1259 | rpc RevertImageUpdate(ImageDownload) returns(OperationResp) { |
| 1260 | option (google.api.http) = { |
| 1261 | post: "/api/v1/local/devices/{id}/image_downloads/{name}/image_revert" |
| 1262 | body: "*" |
| 1263 | }; |
| 1264 | } |
| 1265 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1266 | // List ports of a device |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1267 | rpc ListDevicePorts(ID) returns(Ports) { |
| 1268 | option (google.api.http) = { |
| 1269 | get: "/api/v1/local/devices/{id}/ports" |
| 1270 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 1271 | option (voltha.yang_xml_tag).xml_tag = 'ports'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1272 | } |
| 1273 | |
Sergio Slobodrian | a2eb52b | 2017-03-07 12:24:46 -0500 | [diff] [blame] | 1274 | // List pm config of a device |
| 1275 | rpc ListDevicePmConfigs(ID) returns(PmConfigs) { |
| 1276 | option (google.api.http) = { |
| 1277 | get: "/api/v1/local/devices/{id}/pm_configs" |
| 1278 | }; |
| 1279 | } |
| 1280 | |
| 1281 | // Update the pm config of a device |
Sergio Slobodrian | 2db4c10 | 2017-03-09 22:29:23 -0500 | [diff] [blame] | 1282 | rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) { |
Sergio Slobodrian | a2eb52b | 2017-03-07 12:24:46 -0500 | [diff] [blame] | 1283 | option (google.api.http) = { |
| 1284 | post: "/api/v1/local/devices/{id}/pm_configs" |
| 1285 | body: "*" |
| 1286 | }; |
| 1287 | } |
| 1288 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1289 | // List all flows of a device |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1290 | rpc ListDeviceFlows(ID) returns(openflow_13.Flows) { |
| 1291 | option (google.api.http) = { |
| 1292 | get: "/api/v1/local/devices/{id}/flows" |
| 1293 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 1294 | option (voltha.yang_xml_tag).xml_tag = 'flows'; |
| 1295 | option (voltha.yang_xml_tag).list_items_name = 'items'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1296 | } |
| 1297 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1298 | // List all flow groups of a device |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1299 | rpc ListDeviceFlowGroups(ID) returns(openflow_13.FlowGroups) { |
| 1300 | option (google.api.http) = { |
| 1301 | get: "/api/v1/local/devices/{id}/flow_groups" |
| 1302 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 1303 | option (voltha.yang_xml_tag).xml_tag = 'flow_groups'; |
| 1304 | option (voltha.yang_xml_tag).list_items_name = 'items'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1305 | } |
| 1306 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1307 | // List device types know to Voltha instance |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1308 | rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) { |
| 1309 | option (google.api.http) = { |
| 1310 | get: "/api/v1/local/device_types" |
| 1311 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 1312 | option (voltha.yang_xml_tag).xml_tag = 'device_types'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1313 | } |
| 1314 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1315 | // Get additional information on given device type |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1316 | rpc GetDeviceType(ID) returns(DeviceType) { |
| 1317 | option (google.api.http) = { |
| 1318 | get: "/api/v1/local/device_types/{id}" |
| 1319 | }; |
| 1320 | } |
| 1321 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1322 | // List device sharding groups managed by this Voltha instance |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1323 | rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) { |
| 1324 | option (google.api.http) = { |
| 1325 | get: "/api/v1/local/device_groups" |
| 1326 | }; |
Khen Nursimulu | 3676b7c | 2017-01-31 13:48:38 -0500 | [diff] [blame] | 1327 | option (voltha.yang_xml_tag).xml_tag = 'device_groups'; |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1328 | } |
| 1329 | |
Zsolt Haraszti | 6686203 | 2016-11-28 14:28:39 -0800 | [diff] [blame] | 1330 | // Get more information on given device shard |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1331 | rpc GetDeviceGroup(ID) returns(DeviceGroup) { |
| 1332 | option (google.api.http) = { |
| 1333 | get: "/api/v1/local/device_groups/{id}" |
| 1334 | }; |
| 1335 | } |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1336 | // List all channel groups managed by this Voltha instance |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1337 | rpc GetAllChannelgroupConfig(google.protobuf.Empty) |
| 1338 | returns(bbf_fiber.AllChannelgroupConfig) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1339 | option (google.api.http) = { |
| 1340 | get: "/api/v1/local/channel_groups" |
| 1341 | }; |
| 1342 | } |
| 1343 | // Create a channel group |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1344 | rpc CreateChannelgroup(bbf_fiber.ChannelgroupConfig) |
| 1345 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1346 | option (google.api.http) = { |
| 1347 | post: "/api/v1/local/channel_groups/{name}" |
| 1348 | body: "*" |
| 1349 | }; |
| 1350 | } |
| 1351 | // Update a channel group |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1352 | rpc UpdateChannelgroup(bbf_fiber.ChannelgroupConfig) |
| 1353 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1354 | option (google.api.http) = { |
| 1355 | post: "/api/v1/local/channel_groups/{name}/modify" |
| 1356 | body: "*" |
| 1357 | }; |
| 1358 | } |
| 1359 | // Delate a channel group |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1360 | rpc DeleteChannelgroup(bbf_fiber.ChannelgroupConfig) |
| 1361 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1362 | option (google.api.http) = { |
| 1363 | delete: "/api/v1/local/channel_groups/{name}/delete" |
| 1364 | }; |
| 1365 | } |
| 1366 | // List all channel partitions managed by this Voltha instance |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1367 | rpc GetAllChannelpartitionConfig(google.protobuf.Empty) |
| 1368 | returns(bbf_fiber.AllChannelpartitionConfig) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1369 | option (google.api.http) = { |
| 1370 | get: "/api/v1/local/channel_partitions" |
| 1371 | }; |
| 1372 | } |
| 1373 | // Create a channel partition |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1374 | rpc CreateChannelpartition(bbf_fiber.ChannelpartitionConfig) |
| 1375 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1376 | option (google.api.http) = { |
| 1377 | post: "/api/v1/local/channel_partitions/{name}" |
| 1378 | body: "*" |
| 1379 | }; |
| 1380 | } |
| 1381 | // Update a channel partition |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1382 | rpc UpdateChannelpartition(bbf_fiber.ChannelpartitionConfig) |
| 1383 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1384 | option (google.api.http) = { |
| 1385 | post: "/api/v1/local/channel_partitions/{name}/modify" |
| 1386 | body: "*" |
| 1387 | }; |
| 1388 | } |
| 1389 | // Delete a channel partition |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1390 | rpc DeleteChannelpartition(bbf_fiber.ChannelpartitionConfig) |
| 1391 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1392 | option (google.api.http) = { |
| 1393 | delete: "/api/v1/local/channel_partitions/{name}/delete" |
| 1394 | }; |
| 1395 | } |
| 1396 | // List all channel pairs managed by this Voltha instance |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1397 | rpc GetAllChannelpairConfig(google.protobuf.Empty) |
| 1398 | returns(bbf_fiber.AllChannelpairConfig) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1399 | option (google.api.http) = { |
| 1400 | get: "/api/v1/local/channel_pairs" |
| 1401 | }; |
| 1402 | } |
| 1403 | // Create a channel pair |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1404 | rpc CreateChannelpair(bbf_fiber.ChannelpairConfig) |
| 1405 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1406 | option (google.api.http) = { |
| 1407 | post: "/api/v1/local/channel_pairs/{name}" |
| 1408 | body: "*" |
| 1409 | }; |
| 1410 | } |
| 1411 | // Update a channel pair |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1412 | rpc UpdateChannelpair(bbf_fiber.ChannelpairConfig) |
| 1413 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1414 | option (google.api.http) = { |
| 1415 | post: "/api/v1/local/channel_pairs/{name}/modify" |
| 1416 | body: "*" |
| 1417 | }; |
| 1418 | } |
| 1419 | // Delete a channel pair |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1420 | rpc DeleteChannelpair(bbf_fiber.ChannelpairConfig) |
| 1421 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1422 | option (google.api.http) = { |
| 1423 | delete: "/api/v1/local/channel_pairs/{name}/delete" |
| 1424 | }; |
| 1425 | } |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1426 | |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1427 | // List all channel terminations managed by this Voltha instance |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1428 | rpc GetAllChannelterminationConfig(ID) |
| 1429 | returns(bbf_fiber.AllChannelterminationConfig) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1430 | option (google.api.http) = { |
| 1431 | get: "/api/v1/local/devices/{id}/channel_terminations" |
| 1432 | }; |
| 1433 | } |
| 1434 | // Create a channel termination |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1435 | rpc CreateChanneltermination(bbf_fiber.ChannelterminationConfig) |
| 1436 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1437 | option (google.api.http) = { |
| 1438 | post: "/api/v1/local/devices/{id}/channel_terminations/{name}" |
| 1439 | body: "*" |
| 1440 | }; |
| 1441 | } |
| 1442 | // Update a channel termination |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1443 | rpc UpdateChanneltermination(bbf_fiber.ChannelterminationConfig) |
| 1444 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1445 | option (google.api.http) = { |
| 1446 | post: "/api/v1/local/devices/{id}/channel_terminations/{name}/modify" |
| 1447 | body: "*" |
| 1448 | }; |
| 1449 | } |
| 1450 | // Delete a channel termination |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1451 | rpc DeleteChanneltermination(bbf_fiber.ChannelterminationConfig) |
| 1452 | returns(google.protobuf.Empty) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1453 | option (google.api.http) = { |
| 1454 | delete: "/api/v1/local/devices/{id}/channel_terminations/{name}/delete" |
| 1455 | }; |
| 1456 | } |
| 1457 | // List all ont configs managed by this Voltha instance |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1458 | rpc GetAllOntaniConfig(google.protobuf.Empty) |
| 1459 | returns(bbf_fiber.AllOntaniConfig) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1460 | option (google.api.http) = { |
| 1461 | get: "/api/v1/local/ont_anis" |
| 1462 | }; |
| 1463 | } |
| 1464 | // Create an ont configs |
| 1465 | rpc CreateOntani(bbf_fiber.OntaniConfig) returns(google.protobuf.Empty) { |
| 1466 | option (google.api.http) = { |
| 1467 | post: "/api/v1/local/ont_anis/{name}" |
| 1468 | body: "*" |
| 1469 | }; |
| 1470 | } |
| 1471 | // Update an ont configs |
| 1472 | rpc UpdateOntani(bbf_fiber.OntaniConfig) returns(google.protobuf.Empty) { |
| 1473 | option (google.api.http) = { |
| 1474 | post: "/api/v1/local/ont_anis/{name}/modify" |
| 1475 | body: "*" |
| 1476 | }; |
| 1477 | } |
| 1478 | // Delete an ont configs |
| 1479 | rpc DeleteOntani(bbf_fiber.OntaniConfig) returns(google.protobuf.Empty) { |
| 1480 | option (google.api.http) = { |
| 1481 | delete: "/api/v1/local/ont_anis/{name}/delete" |
| 1482 | }; |
| 1483 | } |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1484 | // List all vont configs managed by this Voltha instance |
| 1485 | rpc GetAllVOntaniConfig(google.protobuf.Empty) |
| 1486 | returns(bbf_fiber.AllVOntaniConfig) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1487 | option (google.api.http) = { |
| 1488 | get: "/api/v1/local/v_ont_anis" |
| 1489 | }; |
| 1490 | } |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1491 | // Create a vont configs |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1492 | rpc CreateVOntani(bbf_fiber.VOntaniConfig) returns(google.protobuf.Empty) { |
| 1493 | option (google.api.http) = { |
| 1494 | post: "/api/v1/local/v_ont_anis/{name}" |
| 1495 | body: "*" |
| 1496 | }; |
| 1497 | } |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1498 | // Update a vont configs |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1499 | rpc UpdateVOntani(bbf_fiber.VOntaniConfig) returns(google.protobuf.Empty) { |
| 1500 | option (google.api.http) = { |
| 1501 | post: "/api/v1/local/v_ont_anis/{name}/modify" |
| 1502 | body: "*" |
| 1503 | }; |
| 1504 | } |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1505 | // Delete a vont configs |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1506 | rpc DeleteVOntani(bbf_fiber.VOntaniConfig) returns(google.protobuf.Empty) { |
| 1507 | option (google.api.http) = { |
| 1508 | delete: "/api/v1/local/v_ont_anis/{name}/delete" |
| 1509 | }; |
| 1510 | } |
| 1511 | // List all venet configs managed by this Voltha instance |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1512 | rpc GetAllVEnetConfig(google.protobuf.Empty) |
| 1513 | returns(bbf_fiber.AllVEnetConfig) { |
Nikolay Titov | 89004ec | 2017-06-19 18:22:42 -0400 | [diff] [blame] | 1514 | option (google.api.http) = { |
| 1515 | get: "/api/v1/local/v_enets" |
| 1516 | }; |
| 1517 | } |
| 1518 | // Create venet configs |
| 1519 | rpc CreateVEnet(bbf_fiber.VEnetConfig) returns(google.protobuf.Empty) { |
| 1520 | option (google.api.http) = { |
| 1521 | post: "/api/v1/local/v_enets/{name}" |
| 1522 | body: "*" |
| 1523 | }; |
| 1524 | } |
| 1525 | // Update venet configs |
| 1526 | rpc UpdateVEnet(bbf_fiber.VEnetConfig) returns(google.protobuf.Empty) { |
| 1527 | option (google.api.http) = { |
| 1528 | post: "/api/v1/local/v_enets/{name}/modify" |
| 1529 | body: "*" |
| 1530 | }; |
| 1531 | } |
| 1532 | // Delete venet configs |
| 1533 | rpc DeleteVEnet(bbf_fiber.VEnetConfig) returns(google.protobuf.Empty) { |
| 1534 | option (google.api.http) = { |
| 1535 | delete: "/api/v1/local/v_enets/{name}/delete" |
| 1536 | }; |
| 1537 | } |
Nikolay Titov | 3b31db9 | 2017-08-02 18:11:33 -0400 | [diff] [blame] | 1538 | |
| 1539 | // List all Traffic Descriptor Profiles |
| 1540 | rpc GetAllTrafficDescriptorProfileData(google.protobuf.Empty) |
| 1541 | returns(bbf_fiber.AllTrafficDescriptorProfileData) { |
| 1542 | option (google.api.http) = { |
| 1543 | get: "/api/v1/local/traffic_descriptor_profiles" |
| 1544 | }; |
| 1545 | } |
| 1546 | // Create Traffic Descriptor Profile |
| 1547 | rpc CreateTrafficDescriptorProfileData( |
| 1548 | bbf_fiber.TrafficDescriptorProfileData) |
| 1549 | returns(google.protobuf.Empty) { |
| 1550 | option (google.api.http) = { |
| 1551 | post: "/api/v1/local/traffic_descriptor_profiles/{name}" |
| 1552 | body: "*" |
| 1553 | }; |
| 1554 | } |
| 1555 | // Update Traffic Descriptor Profile |
| 1556 | rpc UpdateTrafficDescriptorProfileData( |
| 1557 | bbf_fiber.TrafficDescriptorProfileData) |
| 1558 | returns(google.protobuf.Empty) { |
| 1559 | option (google.api.http) = { |
| 1560 | post: "/api/v1/local/traffic_descriptor_profiles/{name}/modify" |
| 1561 | body: "*" |
| 1562 | }; |
| 1563 | } |
| 1564 | // Delete Traffic Descriptor Profile |
| 1565 | rpc DeleteTrafficDescriptorProfileData( |
| 1566 | bbf_fiber.TrafficDescriptorProfileData) |
| 1567 | returns(google.protobuf.Empty) { |
| 1568 | option (google.api.http) = { |
| 1569 | delete: "/api/v1/local/traffic_descriptor_profiles/{name}/delete" |
| 1570 | }; |
| 1571 | } |
| 1572 | |
| 1573 | // List all Tconts |
| 1574 | rpc GetAllTcontsConfigData(google.protobuf.Empty) |
| 1575 | returns(bbf_fiber.AllTcontsConfigData) { |
| 1576 | option (google.api.http) = { |
| 1577 | get: "/api/v1/local/tconts" |
| 1578 | }; |
| 1579 | } |
| 1580 | // Create Tcont |
| 1581 | rpc CreateTcontsConfigData(bbf_fiber.TcontsConfigData) |
| 1582 | returns(google.protobuf.Empty) { |
| 1583 | option (google.api.http) = { |
| 1584 | post: "/api/v1/local/tconts/{name}" |
| 1585 | body: "*" |
| 1586 | }; |
| 1587 | } |
| 1588 | // Update Tcont |
| 1589 | rpc UpdateTcontsConfigData(bbf_fiber.TcontsConfigData) |
| 1590 | returns(google.protobuf.Empty) { |
| 1591 | option (google.api.http) = { |
| 1592 | post: "/api/v1/local/tconts/{name}/modify" |
| 1593 | body: "*" |
| 1594 | }; |
| 1595 | } |
| 1596 | // Delete Tcont |
| 1597 | rpc DeleteTcontsConfigData(bbf_fiber.TcontsConfigData) |
| 1598 | returns(google.protobuf.Empty) { |
| 1599 | option (google.api.http) = { |
| 1600 | delete: "/api/v1/local/tconts/{name}/delete" |
| 1601 | }; |
| 1602 | } |
| 1603 | |
| 1604 | // List all Gemports |
| 1605 | rpc GetAllGemportsConfigData(google.protobuf.Empty) |
| 1606 | returns(bbf_fiber.AllGemportsConfigData) { |
| 1607 | option (google.api.http) = { |
| 1608 | get: "/api/v1/local/gemports" |
| 1609 | }; |
| 1610 | } |
| 1611 | // Create Gemport |
| 1612 | rpc CreateGemportsConfigData(bbf_fiber.GemportsConfigData) |
| 1613 | returns(google.protobuf.Empty) { |
| 1614 | option (google.api.http) = { |
| 1615 | post: "/api/v1/local/gemports/{name}" |
| 1616 | body: "*" |
| 1617 | }; |
| 1618 | } |
| 1619 | // Update Gemport |
| 1620 | rpc UpdateGemportsConfigData(bbf_fiber.GemportsConfigData) |
| 1621 | returns(google.protobuf.Empty) { |
| 1622 | option (google.api.http) = { |
| 1623 | post: "/api/v1/local/gemports/{name}/modify" |
| 1624 | body: "*" |
| 1625 | }; |
| 1626 | } |
| 1627 | // Delete Gemport |
| 1628 | rpc DeleteGemportsConfigData(bbf_fiber.GemportsConfigData) |
| 1629 | returns(google.protobuf.Empty) { |
| 1630 | option (google.api.http) = { |
| 1631 | delete: "/api/v1/local/gemports/{name}/delete" |
| 1632 | }; |
| 1633 | } |
| 1634 | |
| 1635 | // List all Multicast Gemports |
| 1636 | rpc GetAllMulticastGemportsConfigData(google.protobuf.Empty) |
| 1637 | returns(bbf_fiber.AllMulticastGemportsConfigData) { |
| 1638 | option (google.api.http) = { |
| 1639 | get: "/api/v1/local/multicast_gemports" |
| 1640 | }; |
| 1641 | } |
| 1642 | // Create Multicast Gemport |
| 1643 | rpc CreateMulticastGemportsConfigData( |
| 1644 | bbf_fiber.MulticastGemportsConfigData) |
| 1645 | returns(google.protobuf.Empty) { |
| 1646 | option (google.api.http) = { |
| 1647 | post: "/api/v1/local/multicast_gemports/{name}" |
| 1648 | body: "*" |
| 1649 | }; |
| 1650 | } |
| 1651 | // Update Multicast Gemport |
| 1652 | rpc UpdateMulticastGemportsConfigData( |
| 1653 | bbf_fiber.MulticastGemportsConfigData) |
| 1654 | returns(google.protobuf.Empty) { |
| 1655 | option (google.api.http) = { |
| 1656 | post: "/api/v1/local/multicast_gemports/{name}/modify" |
| 1657 | body: "*" |
| 1658 | }; |
| 1659 | } |
| 1660 | // Delete Multicast Gemport |
| 1661 | rpc DeleteMulticastGemportsConfigData( |
| 1662 | bbf_fiber.MulticastGemportsConfigData) |
| 1663 | returns(google.protobuf.Empty) { |
| 1664 | option (google.api.http) = { |
| 1665 | delete: "/api/v1/local/multicast_gemports/{name}/delete" |
| 1666 | }; |
| 1667 | } |
| 1668 | |
| 1669 | // List all Multicast Distribution Sets |
| 1670 | rpc GetAllMulticastDistributionSetData(google.protobuf.Empty) |
| 1671 | returns(bbf_fiber.AllMulticastDistributionSetData) { |
| 1672 | option (google.api.http) = { |
| 1673 | get: "/api/v1/local/multicast_distibution_sets" |
| 1674 | }; |
| 1675 | } |
| 1676 | // Create Multicast Distribution Set |
| 1677 | rpc CreateMulticastDistributionSetData( |
| 1678 | bbf_fiber.MulticastDistributionSetData) |
| 1679 | returns(google.protobuf.Empty) { |
| 1680 | option (google.api.http) = { |
| 1681 | post: "/api/v1/local/multicast_distribution_sets/{name}" |
| 1682 | body: "*" |
| 1683 | }; |
| 1684 | } |
| 1685 | // Update Multicast Distribution Set |
| 1686 | rpc UpdateMulticastDistributionSetData( |
| 1687 | bbf_fiber.MulticastDistributionSetData) |
| 1688 | returns(google.protobuf.Empty) { |
| 1689 | option (google.api.http) = { |
| 1690 | post: "/api/v1/local/multicast_distribution_sets/{name}/modify" |
| 1691 | body: "*" |
| 1692 | }; |
| 1693 | } |
| 1694 | // Delete Multicast Distribution Set |
| 1695 | rpc DeleteMulticastDistributionSetData( |
| 1696 | bbf_fiber.MulticastDistributionSetData) |
| 1697 | returns(google.protobuf.Empty) { |
| 1698 | option (google.api.http) = { |
| 1699 | delete: "/api/v1/local/multicast_distribution_sets/{name}/delete" |
| 1700 | }; |
| 1701 | } |
Zsolt Haraszti | 00d9a84 | 2016-11-23 11:18:23 -0800 | [diff] [blame] | 1702 | // Stream control packets to the dataplane |
| 1703 | rpc StreamPacketsOut(stream openflow_13.PacketOut) |
| 1704 | returns(google.protobuf.Empty) { |
| 1705 | // This does not have an HTTP representation |
| 1706 | } |
| 1707 | |
| 1708 | // Receive control packet stream |
| 1709 | rpc ReceivePacketsIn(google.protobuf.Empty) |
| 1710 | returns(stream openflow_13.PacketIn) { |
| 1711 | // This does not have an HTTP representation |
| 1712 | } |
| 1713 | |
Zsolt Haraszti | 217a12e | 2016-12-19 16:37:55 -0800 | [diff] [blame] | 1714 | rpc ReceiveChangeEvents(google.protobuf.Empty) |
| 1715 | returns(stream openflow_13.ChangeEvent) { |
| 1716 | // This does not have an HTTP representation |
| 1717 | } |
| 1718 | |
Stephane Barbarie | 4db8ca2 | 2017-04-24 10:30:20 -0400 | [diff] [blame] | 1719 | rpc CreateAlarmFilter(AlarmFilter) returns(AlarmFilter) { |
| 1720 | option (google.api.http) = { |
| 1721 | post: "/api/v1/local/alarm_filters" |
| 1722 | body: "*" |
| 1723 | }; |
| 1724 | } |
| 1725 | |
| 1726 | rpc GetAlarmFilter(ID) returns(AlarmFilter) { |
| 1727 | option (google.api.http) = { |
| 1728 | get: "/api/v1/local/alarm_filters/{id}" |
| 1729 | }; |
| 1730 | } |
| 1731 | |
| 1732 | rpc UpdateAlarmFilter(AlarmFilter) returns(AlarmFilter) { |
| 1733 | option (google.api.http) = { |
| 1734 | put: "/api/v1/local/alarm_filters/{id}" |
| 1735 | body: "*" |
| 1736 | }; |
| 1737 | } |
| 1738 | |
| 1739 | rpc DeleteAlarmFilter(ID) returns(google.protobuf.Empty) { |
| 1740 | option (google.api.http) = { |
| 1741 | delete: "/api/v1/local/alarm_filters/{id}" |
| 1742 | }; |
| 1743 | } |
| 1744 | |
| 1745 | rpc ListAlarmFilters(google.protobuf.Empty) returns(AlarmFilters) { |
| 1746 | option (google.api.http) = { |
| 1747 | get: "/api/v1/local/alarm_filters" |
| 1748 | }; |
| 1749 | } |
ggowdru | 236bd95 | 2017-06-20 20:32:55 -0700 | [diff] [blame] | 1750 | |
| 1751 | rpc GetImages(ID) returns(Images) { |
| 1752 | option (google.api.http) = { |
| 1753 | get: "/api/v1/local/devices/{id}/images" |
| 1754 | }; |
| 1755 | } |
sathishg | 5ae8622 | 2017-06-28 15:16:29 +0530 | [diff] [blame] | 1756 | |
| 1757 | rpc SelfTest(ID) returns(SelfTestResponse) { |
| 1758 | option (google.api.http) = { |
| 1759 | post: "/api/v1/local/devices/{id}/self_test" |
| 1760 | }; |
| 1761 | } |
Stephane Barbarie | 2940dac | 2017-08-18 14:15:17 -0400 | [diff] [blame] | 1762 | |
| 1763 | rpc Subscribe(OfAgentSubscriber) returns (OfAgentSubscriber) {} |
Chip Boling | 69abce8 | 2018-06-18 09:56:23 -0500 | [diff] [blame] | 1764 | |
| 1765 | // OpenOMCI MIB information |
| 1766 | rpc GetMibDeviceData(ID) returns(omci.MibDeviceData) { |
| 1767 | option (google.api.http) = { |
| 1768 | get: "/api/v1/openomci/{id}/mib" |
| 1769 | }; |
| 1770 | } |
jasonhuang | 5f3e63b | 2018-07-27 01:32:48 +0800 | [diff] [blame] | 1771 | |
| 1772 | // OpenOMCI ALARM information |
| 1773 | rpc GetAlarmDeviceData(ID) returns(alarm.AlarmDeviceData) { |
| 1774 | option (google.api.http) = { |
| 1775 | get: "/api/v1/openomci/{id}/alarm" |
| 1776 | }; |
| 1777 | } |
Scott Baker | d319095 | 2018-09-04 15:47:28 -0700 | [diff] [blame] | 1778 | |
| 1779 | // Simulate an Alarm |
| 1780 | rpc SimulateAlarm(SimulateAlarmRequest) returns(OperationResp) { |
| 1781 | option (google.api.http) = { |
| 1782 | post: "/api/v1/devices/{id}/simulate_alarm" |
| 1783 | body: "*" |
| 1784 | }; |
| 1785 | } |
Zsolt Haraszti | dafefe1 | 2016-11-14 21:29:58 -0800 | [diff] [blame] | 1786 | } |