blob: d800877adfe74c2a855c1355e83e31f152e5a416 [file] [log] [blame]
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -07001# Generated by the protocol buffer compiler. DO NOT EDIT!
2# source: voltha.proto
3
4import sys
5_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
6from google.protobuf import descriptor as _descriptor
7from google.protobuf import message as _message
8from google.protobuf import reflection as _reflection
9from google.protobuf import symbol_database as _symbol_database
10from google.protobuf import descriptor_pb2
11# @@protoc_insertion_point(imports)
12
13_sym_db = _symbol_database.Default()
14
15
16from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
17import openflow_13_pb2 as openflow__13__pb2
18
19
20DESCRIPTOR = _descriptor.FileDescriptor(
21 name='voltha.proto',
22 package='voltha',
23 syntax='proto3',
24 serialized_pb=_b('\n\x0cvoltha.proto\x12\x06voltha\x1a\x1cgoogle/api/annotations.proto\x1a\x11openflow_13.proto\"\r\n\x0bNullMessage\"v\n\x0cHealthStatus\x12/\n\x05state\x18\x01 \x01(\x0e\x32 .voltha.HealthStatus.HealthState\"5\n\x0bHealthState\x12\x0b\n\x07HEALTHY\x10\x00\x12\x0e\n\nOVERLOADED\x10\x01\x12\t\n\x05\x44YING\x10\x02\"q\n\x07\x41\x64\x64ress\x12\n\n\x02id\x18\x07 \x01(\t\x12\x0e\n\x06street\x18\x01 \x01(\t\x12\x0f\n\x07street2\x18\x02 \x01(\t\x12\x0f\n\x07street3\x18\x03 \x01(\t\x12\x0c\n\x04\x63ity\x18\x04 \x01(\t\x12\r\n\x05state\x18\x05 \x01(\t\x12\x0b\n\x03zip\x18\x06 \x01(\r\"/\n\tAddresses\x12\"\n\taddresses\x18\x01 \x03(\x0b\x32\x0f.voltha.Address\"\x9f\x01\n\x0bMoreComplex\x12$\n\x06health\x18\x01 \x01(\x0b\x32\x14.voltha.HealthStatus\x12\x13\n\x0b\x66oo_counter\x18\x02 \x01(\x05\x12\x0c\n\x04name\x18\x03 \x01(\t\x12%\n\x08\x63hildren\x18\x04 \x03(\x0b\x32\x13.voltha.MoreComplex\x12 \n\x07\x61\x64\x64ress\x18\x05 \x01(\x0b\x32\x0f.voltha.Address\"\x10\n\x02ID\x12\n\n\x02id\x18\x01 \x01(\t\"\x18\n\nSubscriber\x12\n\n\x02id\x18\x01 \x01(\t\"0\n\x0bSubscribers\x12!\n\x05items\x18\x01 \x03(\x0b\x32\x12.voltha.Subscriber\"U\n\rLogicalDevice\x12\n\n\x02id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x61tapath_id\x18\x02 \x01(\x04\x12#\n\x04\x64\x65sc\x18\x03 \x01(\x0b\x32\x15.openflow_13.ofp_desc\"6\n\x0eLogicalDevices\x12$\n\x05items\x18\x01 \x03(\x0b\x32\x15.voltha.LogicalDevice\"4\n\x0cLogicalPorts\x12$\n\x05items\x18\x01 \x03(\x0b\x32\x15.openflow_13.ofp_port\"\x97\x01\n\x14LogicalDeviceDetails\x12\n\n\x02id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x61tapath_id\x18\x02 \x01(\x04\x12#\n\x04\x64\x65sc\x18\x03 \x01(\x0b\x32\x15.openflow_13.ofp_desc\x12\x39\n\x0fswitch_features\x18\x04 \x01(\x0b\x32 .openflow_13.ofp_switch_features\"J\n\x0f\x46lowTableUpdate\x12\n\n\x02id\x18\x01 \x01(\t\x12+\n\x08\x66low_mod\x18\x02 \x01(\x0b\x32\x19.openflow_13.ofp_flow_mod\"3\n\x05\x46lows\x12*\n\x05items\x18\x01 \x03(\x0b\x32\x1b.openflow_13.ofp_flow_stats2^\n\rHealthService\x12M\n\x0fGetHealthStatus\x12\x13.voltha.NullMessage\x1a\x14.voltha.HealthStatus\"\x0f\x82\xd3\xe4\x93\x02\t\x12\x07/health2\xff\x06\n\x12VolthaLogicalLayer\x12Y\n\x12ListLogicalDevices\x12\x13.voltha.NullMessage\x1a\x16.voltha.LogicalDevices\"\x16\x82\xd3\xe4\x93\x02\x10\x12\x0e/local/devices\x12Y\n\x10GetLogicalDevice\x12\n.voltha.ID\x1a\x1c.voltha.LogicalDeviceDetails\"\x1b\x82\xd3\xe4\x93\x02\x15\x12\x13/local/devices/{id}\x12]\n\x16ListLogicalDevicePorts\x12\n.voltha.ID\x1a\x14.voltha.LogicalPorts\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/local/devices/{id}/ports\x12\x65\n\x0fUpdateFlowTable\x12\x17.voltha.FlowTableUpdate\x1a\x13.voltha.NullMessage\"$\x82\xd3\xe4\x93\x02\x1e\"\x19/local/devices/{id}/flows:\x01*\x12O\n\x0fListDeviceFlows\x12\n.voltha.ID\x1a\r.voltha.Flows\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/local/devices/{id}/flows\x12S\n\x10\x43reateSubscriber\x12\x12.voltha.Subscriber\x1a\x12.voltha.Subscriber\"\x17\x82\xd3\xe4\x93\x02\x11\"\x0c/subscribers:\x01*\x12J\n\rGetSubscriber\x12\n.voltha.ID\x1a\x12.voltha.Subscriber\"\x19\x82\xd3\xe4\x93\x02\x13\x12\x11/subscribers/{id}\x12X\n\x10UpdateSubscriber\x12\x12.voltha.Subscriber\x1a\x12.voltha.Subscriber\"\x1c\x82\xd3\xe4\x93\x02\x16\x32\x11/subscribers/{id}:\x01*\x12N\n\x10\x44\x65leteSubscriber\x12\n.voltha.ID\x1a\x13.voltha.NullMessage\"\x19\x82\xd3\xe4\x93\x02\x13*\x11/subscribers/{id}\x12Q\n\x0fListSubscribers\x12\x13.voltha.NullMessage\x1a\x13.voltha.Subscribers\"\x14\x82\xd3\xe4\x93\x02\x0e\x12\x0c/subscribers2\x85\x03\n\x0e\x45xampleService\x12H\n\rCreateAddress\x12\x0f.voltha.Address\x1a\x0f.voltha.Address\"\x15\x82\xd3\xe4\x93\x02\x0f\"\n/addresses:\x01*\x12\x42\n\nGetAddress\x12\n.voltha.ID\x1a\x0f.voltha.Address\"\x17\x82\xd3\xe4\x93\x02\x11\x12\x0f/addresses/{id}\x12M\n\rUpdateAddress\x12\x0f.voltha.Address\x1a\x0f.voltha.Address\"\x1a\x82\xd3\xe4\x93\x02\x14\x32\x0f/addresses/{id}:\x01*\x12I\n\rDeleteAddress\x12\n.voltha.ID\x1a\x13.voltha.NullMessage\"\x17\x82\xd3\xe4\x93\x02\x11*\x0f/addresses/{id}\x12K\n\rListAddresses\x12\x13.voltha.NullMessage\x1a\x11.voltha.Addresses\"\x12\x82\xd3\xe4\x93\x02\x0c\x12\n/addresses2\xfd\x04\n\x08OpenFlow\x12<\n\x08GetHello\x12\x16.openflow_13.ofp_hello\x1a\x16.openflow_13.ofp_hello\"\x00\x12\x41\n\x0b\x45\x63hoRequest\x12\x17.openflow_13.ofp_header\x1a\x17.openflow_13.ofp_header\"\x00\x12\x63\n\x13\x45xperimenterRequest\x12$.openflow_13.ofp_experimenter_header\x1a$.openflow_13.ofp_experimenter_header\"\x00\x12P\n\x11GetSwitchFeatures\x12\x17.openflow_13.ofp_header\x1a .openflow_13.ofp_switch_features\"\x00\x12L\n\x0fGetSwitchConfig\x12\x17.openflow_13.ofp_header\x1a\x1e.openflow_13.ofp_switch_config\"\x00\x12\x46\n\tSetConfig\x12\x1e.openflow_13.ofp_switch_config\x1a\x17.openflow_13.ofp_header\"\x00\x12R\n\x17ReceivePacketInMessages\x12\x17.openflow_13.ofp_header\x1a\x1a.openflow_13.ofp_packet_in\"\x00\x30\x01\x12O\n\x15SendPacketOutMessages\x12\x1b.openflow_13.ofp_packet_out\x1a\x17.openflow_13.ofp_header\"\x00\x42<\n\x13org.opencord.volthaB\x0cVolthaProtos\xaa\x02\x16Opencord.Voltha.Volthab\x06proto3')
25 ,
26 dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,openflow__13__pb2.DESCRIPTOR,])
27_sym_db.RegisterFileDescriptor(DESCRIPTOR)
28
29
30
31_HEALTHSTATUS_HEALTHSTATE = _descriptor.EnumDescriptor(
32 name='HealthState',
33 full_name='voltha.HealthStatus.HealthState',
34 filename=None,
35 file=DESCRIPTOR,
36 values=[
37 _descriptor.EnumValueDescriptor(
38 name='HEALTHY', index=0, number=0,
39 options=None,
40 type=None),
41 _descriptor.EnumValueDescriptor(
42 name='OVERLOADED', index=1, number=1,
43 options=None,
44 type=None),
45 _descriptor.EnumValueDescriptor(
46 name='DYING', index=2, number=2,
47 options=None,
48 type=None),
49 ],
50 containing_type=None,
51 options=None,
52 serialized_start=153,
53 serialized_end=206,
54)
55_sym_db.RegisterEnumDescriptor(_HEALTHSTATUS_HEALTHSTATE)
56
57
58_NULLMESSAGE = _descriptor.Descriptor(
59 name='NullMessage',
60 full_name='voltha.NullMessage',
61 filename=None,
62 file=DESCRIPTOR,
63 containing_type=None,
64 fields=[
65 ],
66 extensions=[
67 ],
68 nested_types=[],
69 enum_types=[
70 ],
71 options=None,
72 is_extendable=False,
73 syntax='proto3',
74 extension_ranges=[],
75 oneofs=[
76 ],
77 serialized_start=73,
78 serialized_end=86,
79)
80
81
82_HEALTHSTATUS = _descriptor.Descriptor(
83 name='HealthStatus',
84 full_name='voltha.HealthStatus',
85 filename=None,
86 file=DESCRIPTOR,
87 containing_type=None,
88 fields=[
89 _descriptor.FieldDescriptor(
90 name='state', full_name='voltha.HealthStatus.state', index=0,
91 number=1, type=14, cpp_type=8, label=1,
92 has_default_value=False, default_value=0,
93 message_type=None, enum_type=None, containing_type=None,
94 is_extension=False, extension_scope=None,
95 options=None),
96 ],
97 extensions=[
98 ],
99 nested_types=[],
100 enum_types=[
101 _HEALTHSTATUS_HEALTHSTATE,
102 ],
103 options=None,
104 is_extendable=False,
105 syntax='proto3',
106 extension_ranges=[],
107 oneofs=[
108 ],
109 serialized_start=88,
110 serialized_end=206,
111)
112
113
114_ADDRESS = _descriptor.Descriptor(
115 name='Address',
116 full_name='voltha.Address',
117 filename=None,
118 file=DESCRIPTOR,
119 containing_type=None,
120 fields=[
121 _descriptor.FieldDescriptor(
122 name='id', full_name='voltha.Address.id', index=0,
123 number=7, type=9, cpp_type=9, label=1,
124 has_default_value=False, default_value=_b("").decode('utf-8'),
125 message_type=None, enum_type=None, containing_type=None,
126 is_extension=False, extension_scope=None,
127 options=None),
128 _descriptor.FieldDescriptor(
129 name='street', full_name='voltha.Address.street', index=1,
130 number=1, type=9, cpp_type=9, label=1,
131 has_default_value=False, default_value=_b("").decode('utf-8'),
132 message_type=None, enum_type=None, containing_type=None,
133 is_extension=False, extension_scope=None,
134 options=None),
135 _descriptor.FieldDescriptor(
136 name='street2', full_name='voltha.Address.street2', index=2,
137 number=2, type=9, cpp_type=9, label=1,
138 has_default_value=False, default_value=_b("").decode('utf-8'),
139 message_type=None, enum_type=None, containing_type=None,
140 is_extension=False, extension_scope=None,
141 options=None),
142 _descriptor.FieldDescriptor(
143 name='street3', full_name='voltha.Address.street3', index=3,
144 number=3, type=9, cpp_type=9, label=1,
145 has_default_value=False, default_value=_b("").decode('utf-8'),
146 message_type=None, enum_type=None, containing_type=None,
147 is_extension=False, extension_scope=None,
148 options=None),
149 _descriptor.FieldDescriptor(
150 name='city', full_name='voltha.Address.city', index=4,
151 number=4, type=9, cpp_type=9, label=1,
152 has_default_value=False, default_value=_b("").decode('utf-8'),
153 message_type=None, enum_type=None, containing_type=None,
154 is_extension=False, extension_scope=None,
155 options=None),
156 _descriptor.FieldDescriptor(
157 name='state', full_name='voltha.Address.state', index=5,
158 number=5, type=9, cpp_type=9, label=1,
159 has_default_value=False, default_value=_b("").decode('utf-8'),
160 message_type=None, enum_type=None, containing_type=None,
161 is_extension=False, extension_scope=None,
162 options=None),
163 _descriptor.FieldDescriptor(
164 name='zip', full_name='voltha.Address.zip', index=6,
165 number=6, type=13, cpp_type=3, label=1,
166 has_default_value=False, default_value=0,
167 message_type=None, enum_type=None, containing_type=None,
168 is_extension=False, extension_scope=None,
169 options=None),
170 ],
171 extensions=[
172 ],
173 nested_types=[],
174 enum_types=[
175 ],
176 options=None,
177 is_extendable=False,
178 syntax='proto3',
179 extension_ranges=[],
180 oneofs=[
181 ],
182 serialized_start=208,
183 serialized_end=321,
184)
185
186
187_ADDRESSES = _descriptor.Descriptor(
188 name='Addresses',
189 full_name='voltha.Addresses',
190 filename=None,
191 file=DESCRIPTOR,
192 containing_type=None,
193 fields=[
194 _descriptor.FieldDescriptor(
195 name='addresses', full_name='voltha.Addresses.addresses', index=0,
196 number=1, type=11, cpp_type=10, label=3,
197 has_default_value=False, default_value=[],
198 message_type=None, enum_type=None, containing_type=None,
199 is_extension=False, extension_scope=None,
200 options=None),
201 ],
202 extensions=[
203 ],
204 nested_types=[],
205 enum_types=[
206 ],
207 options=None,
208 is_extendable=False,
209 syntax='proto3',
210 extension_ranges=[],
211 oneofs=[
212 ],
213 serialized_start=323,
214 serialized_end=370,
215)
216
217
218_MORECOMPLEX = _descriptor.Descriptor(
219 name='MoreComplex',
220 full_name='voltha.MoreComplex',
221 filename=None,
222 file=DESCRIPTOR,
223 containing_type=None,
224 fields=[
225 _descriptor.FieldDescriptor(
226 name='health', full_name='voltha.MoreComplex.health', index=0,
227 number=1, type=11, cpp_type=10, label=1,
228 has_default_value=False, default_value=None,
229 message_type=None, enum_type=None, containing_type=None,
230 is_extension=False, extension_scope=None,
231 options=None),
232 _descriptor.FieldDescriptor(
233 name='foo_counter', full_name='voltha.MoreComplex.foo_counter', index=1,
234 number=2, type=5, cpp_type=1, label=1,
235 has_default_value=False, default_value=0,
236 message_type=None, enum_type=None, containing_type=None,
237 is_extension=False, extension_scope=None,
238 options=None),
239 _descriptor.FieldDescriptor(
240 name='name', full_name='voltha.MoreComplex.name', index=2,
241 number=3, type=9, cpp_type=9, label=1,
242 has_default_value=False, default_value=_b("").decode('utf-8'),
243 message_type=None, enum_type=None, containing_type=None,
244 is_extension=False, extension_scope=None,
245 options=None),
246 _descriptor.FieldDescriptor(
247 name='children', full_name='voltha.MoreComplex.children', index=3,
248 number=4, type=11, cpp_type=10, label=3,
249 has_default_value=False, default_value=[],
250 message_type=None, enum_type=None, containing_type=None,
251 is_extension=False, extension_scope=None,
252 options=None),
253 _descriptor.FieldDescriptor(
254 name='address', full_name='voltha.MoreComplex.address', index=4,
255 number=5, type=11, cpp_type=10, label=1,
256 has_default_value=False, default_value=None,
257 message_type=None, enum_type=None, containing_type=None,
258 is_extension=False, extension_scope=None,
259 options=None),
260 ],
261 extensions=[
262 ],
263 nested_types=[],
264 enum_types=[
265 ],
266 options=None,
267 is_extendable=False,
268 syntax='proto3',
269 extension_ranges=[],
270 oneofs=[
271 ],
272 serialized_start=373,
273 serialized_end=532,
274)
275
276
277_ID = _descriptor.Descriptor(
278 name='ID',
279 full_name='voltha.ID',
280 filename=None,
281 file=DESCRIPTOR,
282 containing_type=None,
283 fields=[
284 _descriptor.FieldDescriptor(
285 name='id', full_name='voltha.ID.id', index=0,
286 number=1, type=9, cpp_type=9, label=1,
287 has_default_value=False, default_value=_b("").decode('utf-8'),
288 message_type=None, enum_type=None, containing_type=None,
289 is_extension=False, extension_scope=None,
290 options=None),
291 ],
292 extensions=[
293 ],
294 nested_types=[],
295 enum_types=[
296 ],
297 options=None,
298 is_extendable=False,
299 syntax='proto3',
300 extension_ranges=[],
301 oneofs=[
302 ],
303 serialized_start=534,
304 serialized_end=550,
305)
306
307
308_SUBSCRIBER = _descriptor.Descriptor(
309 name='Subscriber',
310 full_name='voltha.Subscriber',
311 filename=None,
312 file=DESCRIPTOR,
313 containing_type=None,
314 fields=[
315 _descriptor.FieldDescriptor(
316 name='id', full_name='voltha.Subscriber.id', index=0,
317 number=1, type=9, cpp_type=9, label=1,
318 has_default_value=False, default_value=_b("").decode('utf-8'),
319 message_type=None, enum_type=None, containing_type=None,
320 is_extension=False, extension_scope=None,
321 options=None),
322 ],
323 extensions=[
324 ],
325 nested_types=[],
326 enum_types=[
327 ],
328 options=None,
329 is_extendable=False,
330 syntax='proto3',
331 extension_ranges=[],
332 oneofs=[
333 ],
334 serialized_start=552,
335 serialized_end=576,
336)
337
338
339_SUBSCRIBERS = _descriptor.Descriptor(
340 name='Subscribers',
341 full_name='voltha.Subscribers',
342 filename=None,
343 file=DESCRIPTOR,
344 containing_type=None,
345 fields=[
346 _descriptor.FieldDescriptor(
347 name='items', full_name='voltha.Subscribers.items', index=0,
348 number=1, type=11, cpp_type=10, label=3,
349 has_default_value=False, default_value=[],
350 message_type=None, enum_type=None, containing_type=None,
351 is_extension=False, extension_scope=None,
352 options=None),
353 ],
354 extensions=[
355 ],
356 nested_types=[],
357 enum_types=[
358 ],
359 options=None,
360 is_extendable=False,
361 syntax='proto3',
362 extension_ranges=[],
363 oneofs=[
364 ],
365 serialized_start=578,
366 serialized_end=626,
367)
368
369
370_LOGICALDEVICE = _descriptor.Descriptor(
371 name='LogicalDevice',
372 full_name='voltha.LogicalDevice',
373 filename=None,
374 file=DESCRIPTOR,
375 containing_type=None,
376 fields=[
377 _descriptor.FieldDescriptor(
378 name='id', full_name='voltha.LogicalDevice.id', index=0,
379 number=1, type=9, cpp_type=9, label=1,
380 has_default_value=False, default_value=_b("").decode('utf-8'),
381 message_type=None, enum_type=None, containing_type=None,
382 is_extension=False, extension_scope=None,
383 options=None),
384 _descriptor.FieldDescriptor(
385 name='datapath_id', full_name='voltha.LogicalDevice.datapath_id', index=1,
386 number=2, type=4, cpp_type=4, label=1,
387 has_default_value=False, default_value=0,
388 message_type=None, enum_type=None, containing_type=None,
389 is_extension=False, extension_scope=None,
390 options=None),
391 _descriptor.FieldDescriptor(
392 name='desc', full_name='voltha.LogicalDevice.desc', index=2,
393 number=3, type=11, cpp_type=10, label=1,
394 has_default_value=False, default_value=None,
395 message_type=None, enum_type=None, containing_type=None,
396 is_extension=False, extension_scope=None,
397 options=None),
398 ],
399 extensions=[
400 ],
401 nested_types=[],
402 enum_types=[
403 ],
404 options=None,
405 is_extendable=False,
406 syntax='proto3',
407 extension_ranges=[],
408 oneofs=[
409 ],
410 serialized_start=628,
411 serialized_end=713,
412)
413
414
415_LOGICALDEVICES = _descriptor.Descriptor(
416 name='LogicalDevices',
417 full_name='voltha.LogicalDevices',
418 filename=None,
419 file=DESCRIPTOR,
420 containing_type=None,
421 fields=[
422 _descriptor.FieldDescriptor(
423 name='items', full_name='voltha.LogicalDevices.items', index=0,
424 number=1, type=11, cpp_type=10, label=3,
425 has_default_value=False, default_value=[],
426 message_type=None, enum_type=None, containing_type=None,
427 is_extension=False, extension_scope=None,
428 options=None),
429 ],
430 extensions=[
431 ],
432 nested_types=[],
433 enum_types=[
434 ],
435 options=None,
436 is_extendable=False,
437 syntax='proto3',
438 extension_ranges=[],
439 oneofs=[
440 ],
441 serialized_start=715,
442 serialized_end=769,
443)
444
445
446_LOGICALPORTS = _descriptor.Descriptor(
447 name='LogicalPorts',
448 full_name='voltha.LogicalPorts',
449 filename=None,
450 file=DESCRIPTOR,
451 containing_type=None,
452 fields=[
453 _descriptor.FieldDescriptor(
454 name='items', full_name='voltha.LogicalPorts.items', index=0,
455 number=1, type=11, cpp_type=10, label=3,
456 has_default_value=False, default_value=[],
457 message_type=None, enum_type=None, containing_type=None,
458 is_extension=False, extension_scope=None,
459 options=None),
460 ],
461 extensions=[
462 ],
463 nested_types=[],
464 enum_types=[
465 ],
466 options=None,
467 is_extendable=False,
468 syntax='proto3',
469 extension_ranges=[],
470 oneofs=[
471 ],
472 serialized_start=771,
473 serialized_end=823,
474)
475
476
477_LOGICALDEVICEDETAILS = _descriptor.Descriptor(
478 name='LogicalDeviceDetails',
479 full_name='voltha.LogicalDeviceDetails',
480 filename=None,
481 file=DESCRIPTOR,
482 containing_type=None,
483 fields=[
484 _descriptor.FieldDescriptor(
485 name='id', full_name='voltha.LogicalDeviceDetails.id', index=0,
486 number=1, type=9, cpp_type=9, label=1,
487 has_default_value=False, default_value=_b("").decode('utf-8'),
488 message_type=None, enum_type=None, containing_type=None,
489 is_extension=False, extension_scope=None,
490 options=None),
491 _descriptor.FieldDescriptor(
492 name='datapath_id', full_name='voltha.LogicalDeviceDetails.datapath_id', index=1,
493 number=2, type=4, cpp_type=4, label=1,
494 has_default_value=False, default_value=0,
495 message_type=None, enum_type=None, containing_type=None,
496 is_extension=False, extension_scope=None,
497 options=None),
498 _descriptor.FieldDescriptor(
499 name='desc', full_name='voltha.LogicalDeviceDetails.desc', index=2,
500 number=3, type=11, cpp_type=10, label=1,
501 has_default_value=False, default_value=None,
502 message_type=None, enum_type=None, containing_type=None,
503 is_extension=False, extension_scope=None,
504 options=None),
505 _descriptor.FieldDescriptor(
506 name='switch_features', full_name='voltha.LogicalDeviceDetails.switch_features', index=3,
507 number=4, type=11, cpp_type=10, label=1,
508 has_default_value=False, default_value=None,
509 message_type=None, enum_type=None, containing_type=None,
510 is_extension=False, extension_scope=None,
511 options=None),
512 ],
513 extensions=[
514 ],
515 nested_types=[],
516 enum_types=[
517 ],
518 options=None,
519 is_extendable=False,
520 syntax='proto3',
521 extension_ranges=[],
522 oneofs=[
523 ],
524 serialized_start=826,
525 serialized_end=977,
526)
527
528
529_FLOWTABLEUPDATE = _descriptor.Descriptor(
530 name='FlowTableUpdate',
531 full_name='voltha.FlowTableUpdate',
532 filename=None,
533 file=DESCRIPTOR,
534 containing_type=None,
535 fields=[
536 _descriptor.FieldDescriptor(
537 name='id', full_name='voltha.FlowTableUpdate.id', index=0,
538 number=1, type=9, cpp_type=9, label=1,
539 has_default_value=False, default_value=_b("").decode('utf-8'),
540 message_type=None, enum_type=None, containing_type=None,
541 is_extension=False, extension_scope=None,
542 options=None),
543 _descriptor.FieldDescriptor(
544 name='flow_mod', full_name='voltha.FlowTableUpdate.flow_mod', index=1,
545 number=2, type=11, cpp_type=10, label=1,
546 has_default_value=False, default_value=None,
547 message_type=None, enum_type=None, containing_type=None,
548 is_extension=False, extension_scope=None,
549 options=None),
550 ],
551 extensions=[
552 ],
553 nested_types=[],
554 enum_types=[
555 ],
556 options=None,
557 is_extendable=False,
558 syntax='proto3',
559 extension_ranges=[],
560 oneofs=[
561 ],
562 serialized_start=979,
563 serialized_end=1053,
564)
565
566
567_FLOWS = _descriptor.Descriptor(
568 name='Flows',
569 full_name='voltha.Flows',
570 filename=None,
571 file=DESCRIPTOR,
572 containing_type=None,
573 fields=[
574 _descriptor.FieldDescriptor(
575 name='items', full_name='voltha.Flows.items', index=0,
576 number=1, type=11, cpp_type=10, label=3,
577 has_default_value=False, default_value=[],
578 message_type=None, enum_type=None, containing_type=None,
579 is_extension=False, extension_scope=None,
580 options=None),
581 ],
582 extensions=[
583 ],
584 nested_types=[],
585 enum_types=[
586 ],
587 options=None,
588 is_extendable=False,
589 syntax='proto3',
590 extension_ranges=[],
591 oneofs=[
592 ],
593 serialized_start=1055,
594 serialized_end=1106,
595)
596
597_HEALTHSTATUS.fields_by_name['state'].enum_type = _HEALTHSTATUS_HEALTHSTATE
598_HEALTHSTATUS_HEALTHSTATE.containing_type = _HEALTHSTATUS
599_ADDRESSES.fields_by_name['addresses'].message_type = _ADDRESS
600_MORECOMPLEX.fields_by_name['health'].message_type = _HEALTHSTATUS
601_MORECOMPLEX.fields_by_name['children'].message_type = _MORECOMPLEX
602_MORECOMPLEX.fields_by_name['address'].message_type = _ADDRESS
603_SUBSCRIBERS.fields_by_name['items'].message_type = _SUBSCRIBER
604_LOGICALDEVICE.fields_by_name['desc'].message_type = openflow__13__pb2._OFP_DESC
605_LOGICALDEVICES.fields_by_name['items'].message_type = _LOGICALDEVICE
606_LOGICALPORTS.fields_by_name['items'].message_type = openflow__13__pb2._OFP_PORT
607_LOGICALDEVICEDETAILS.fields_by_name['desc'].message_type = openflow__13__pb2._OFP_DESC
608_LOGICALDEVICEDETAILS.fields_by_name['switch_features'].message_type = openflow__13__pb2._OFP_SWITCH_FEATURES
609_FLOWTABLEUPDATE.fields_by_name['flow_mod'].message_type = openflow__13__pb2._OFP_FLOW_MOD
610_FLOWS.fields_by_name['items'].message_type = openflow__13__pb2._OFP_FLOW_STATS
611DESCRIPTOR.message_types_by_name['NullMessage'] = _NULLMESSAGE
612DESCRIPTOR.message_types_by_name['HealthStatus'] = _HEALTHSTATUS
613DESCRIPTOR.message_types_by_name['Address'] = _ADDRESS
614DESCRIPTOR.message_types_by_name['Addresses'] = _ADDRESSES
615DESCRIPTOR.message_types_by_name['MoreComplex'] = _MORECOMPLEX
616DESCRIPTOR.message_types_by_name['ID'] = _ID
617DESCRIPTOR.message_types_by_name['Subscriber'] = _SUBSCRIBER
618DESCRIPTOR.message_types_by_name['Subscribers'] = _SUBSCRIBERS
619DESCRIPTOR.message_types_by_name['LogicalDevice'] = _LOGICALDEVICE
620DESCRIPTOR.message_types_by_name['LogicalDevices'] = _LOGICALDEVICES
621DESCRIPTOR.message_types_by_name['LogicalPorts'] = _LOGICALPORTS
622DESCRIPTOR.message_types_by_name['LogicalDeviceDetails'] = _LOGICALDEVICEDETAILS
623DESCRIPTOR.message_types_by_name['FlowTableUpdate'] = _FLOWTABLEUPDATE
624DESCRIPTOR.message_types_by_name['Flows'] = _FLOWS
625
626NullMessage = _reflection.GeneratedProtocolMessageType('NullMessage', (_message.Message,), dict(
627 DESCRIPTOR = _NULLMESSAGE,
628 __module__ = 'voltha_pb2'
629 # @@protoc_insertion_point(class_scope:voltha.NullMessage)
630 ))
631_sym_db.RegisterMessage(NullMessage)
632
633HealthStatus = _reflection.GeneratedProtocolMessageType('HealthStatus', (_message.Message,), dict(
634 DESCRIPTOR = _HEALTHSTATUS,
635 __module__ = 'voltha_pb2'
636 # @@protoc_insertion_point(class_scope:voltha.HealthStatus)
637 ))
638_sym_db.RegisterMessage(HealthStatus)
639
640Address = _reflection.GeneratedProtocolMessageType('Address', (_message.Message,), dict(
641 DESCRIPTOR = _ADDRESS,
642 __module__ = 'voltha_pb2'
643 # @@protoc_insertion_point(class_scope:voltha.Address)
644 ))
645_sym_db.RegisterMessage(Address)
646
647Addresses = _reflection.GeneratedProtocolMessageType('Addresses', (_message.Message,), dict(
648 DESCRIPTOR = _ADDRESSES,
649 __module__ = 'voltha_pb2'
650 # @@protoc_insertion_point(class_scope:voltha.Addresses)
651 ))
652_sym_db.RegisterMessage(Addresses)
653
654MoreComplex = _reflection.GeneratedProtocolMessageType('MoreComplex', (_message.Message,), dict(
655 DESCRIPTOR = _MORECOMPLEX,
656 __module__ = 'voltha_pb2'
657 # @@protoc_insertion_point(class_scope:voltha.MoreComplex)
658 ))
659_sym_db.RegisterMessage(MoreComplex)
660
661ID = _reflection.GeneratedProtocolMessageType('ID', (_message.Message,), dict(
662 DESCRIPTOR = _ID,
663 __module__ = 'voltha_pb2'
664 # @@protoc_insertion_point(class_scope:voltha.ID)
665 ))
666_sym_db.RegisterMessage(ID)
667
668Subscriber = _reflection.GeneratedProtocolMessageType('Subscriber', (_message.Message,), dict(
669 DESCRIPTOR = _SUBSCRIBER,
670 __module__ = 'voltha_pb2'
671 # @@protoc_insertion_point(class_scope:voltha.Subscriber)
672 ))
673_sym_db.RegisterMessage(Subscriber)
674
675Subscribers = _reflection.GeneratedProtocolMessageType('Subscribers', (_message.Message,), dict(
676 DESCRIPTOR = _SUBSCRIBERS,
677 __module__ = 'voltha_pb2'
678 # @@protoc_insertion_point(class_scope:voltha.Subscribers)
679 ))
680_sym_db.RegisterMessage(Subscribers)
681
682LogicalDevice = _reflection.GeneratedProtocolMessageType('LogicalDevice', (_message.Message,), dict(
683 DESCRIPTOR = _LOGICALDEVICE,
684 __module__ = 'voltha_pb2'
685 # @@protoc_insertion_point(class_scope:voltha.LogicalDevice)
686 ))
687_sym_db.RegisterMessage(LogicalDevice)
688
689LogicalDevices = _reflection.GeneratedProtocolMessageType('LogicalDevices', (_message.Message,), dict(
690 DESCRIPTOR = _LOGICALDEVICES,
691 __module__ = 'voltha_pb2'
692 # @@protoc_insertion_point(class_scope:voltha.LogicalDevices)
693 ))
694_sym_db.RegisterMessage(LogicalDevices)
695
696LogicalPorts = _reflection.GeneratedProtocolMessageType('LogicalPorts', (_message.Message,), dict(
697 DESCRIPTOR = _LOGICALPORTS,
698 __module__ = 'voltha_pb2'
699 # @@protoc_insertion_point(class_scope:voltha.LogicalPorts)
700 ))
701_sym_db.RegisterMessage(LogicalPorts)
702
703LogicalDeviceDetails = _reflection.GeneratedProtocolMessageType('LogicalDeviceDetails', (_message.Message,), dict(
704 DESCRIPTOR = _LOGICALDEVICEDETAILS,
705 __module__ = 'voltha_pb2'
706 # @@protoc_insertion_point(class_scope:voltha.LogicalDeviceDetails)
707 ))
708_sym_db.RegisterMessage(LogicalDeviceDetails)
709
710FlowTableUpdate = _reflection.GeneratedProtocolMessageType('FlowTableUpdate', (_message.Message,), dict(
711 DESCRIPTOR = _FLOWTABLEUPDATE,
712 __module__ = 'voltha_pb2'
713 # @@protoc_insertion_point(class_scope:voltha.FlowTableUpdate)
714 ))
715_sym_db.RegisterMessage(FlowTableUpdate)
716
717Flows = _reflection.GeneratedProtocolMessageType('Flows', (_message.Message,), dict(
718 DESCRIPTOR = _FLOWS,
719 __module__ = 'voltha_pb2'
720 # @@protoc_insertion_point(class_scope:voltha.Flows)
721 ))
722_sym_db.RegisterMessage(Flows)
723
724
725DESCRIPTOR.has_options = True
726DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\023org.opencord.volthaB\014VolthaProtos\252\002\026Opencord.Voltha.Voltha'))
727import grpc
728from grpc.beta import implementations as beta_implementations
729from grpc.beta import interfaces as beta_interfaces
730from grpc.framework.common import cardinality
731from grpc.framework.interfaces.face import utilities as face_utilities
732
733
734class HealthServiceStub(object):
735 """Health related services
736 """
737
738 def __init__(self, channel):
739 """Constructor.
740
741 Args:
742 channel: A grpc.Channel.
743 """
744 self.GetHealthStatus = channel.unary_unary(
745 '/voltha.HealthService/GetHealthStatus',
746 request_serializer=NullMessage.SerializeToString,
747 response_deserializer=HealthStatus.FromString,
748 )
749
750
751class HealthServiceServicer(object):
752 """Health related services
753 """
754
755 def GetHealthStatus(self, request, context):
756 """Return current health status of a Voltha instance
757 """
758 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
759 context.set_details('Method not implemented!')
760 raise NotImplementedError('Method not implemented!')
761
762
763def add_HealthServiceServicer_to_server(servicer, server):
764 rpc_method_handlers = {
765 'GetHealthStatus': grpc.unary_unary_rpc_method_handler(
766 servicer.GetHealthStatus,
767 request_deserializer=NullMessage.FromString,
768 response_serializer=HealthStatus.SerializeToString,
769 ),
770 }
771 generic_handler = grpc.method_handlers_generic_handler(
772 'voltha.HealthService', rpc_method_handlers)
773 server.add_generic_rpc_handlers((generic_handler,))
774
775
776class BetaHealthServiceServicer(object):
777 """Health related services
778 """
779 def GetHealthStatus(self, request, context):
780 """Return current health status of a Voltha instance
781 """
782 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
783
784
785class BetaHealthServiceStub(object):
786 """Health related services
787 """
788 def GetHealthStatus(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
789 """Return current health status of a Voltha instance
790 """
791 raise NotImplementedError()
792 GetHealthStatus.future = None
793
794
795def beta_create_HealthService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
796 request_deserializers = {
797 ('voltha.HealthService', 'GetHealthStatus'): NullMessage.FromString,
798 }
799 response_serializers = {
800 ('voltha.HealthService', 'GetHealthStatus'): HealthStatus.SerializeToString,
801 }
802 method_implementations = {
803 ('voltha.HealthService', 'GetHealthStatus'): face_utilities.unary_unary_inline(servicer.GetHealthStatus),
804 }
805 server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
806 return beta_implementations.server(method_implementations, options=server_options)
807
808
809def beta_create_HealthService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
810 request_serializers = {
811 ('voltha.HealthService', 'GetHealthStatus'): NullMessage.SerializeToString,
812 }
813 response_deserializers = {
814 ('voltha.HealthService', 'GetHealthStatus'): HealthStatus.FromString,
815 }
816 cardinalities = {
817 'GetHealthStatus': cardinality.Cardinality.UNARY_UNARY,
818 }
819 stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
820 return beta_implementations.dynamic_stub(channel, 'voltha.HealthService', cardinalities, options=stub_options)
821
822
823class VolthaLogicalLayerStub(object):
824
825 def __init__(self, channel):
826 """Constructor.
827
828 Args:
829 channel: A grpc.Channel.
830 """
831 self.ListLogicalDevices = channel.unary_unary(
832 '/voltha.VolthaLogicalLayer/ListLogicalDevices',
833 request_serializer=NullMessage.SerializeToString,
834 response_deserializer=LogicalDevices.FromString,
835 )
836 self.GetLogicalDevice = channel.unary_unary(
837 '/voltha.VolthaLogicalLayer/GetLogicalDevice',
838 request_serializer=ID.SerializeToString,
839 response_deserializer=LogicalDeviceDetails.FromString,
840 )
841 self.ListLogicalDevicePorts = channel.unary_unary(
842 '/voltha.VolthaLogicalLayer/ListLogicalDevicePorts',
843 request_serializer=ID.SerializeToString,
844 response_deserializer=LogicalPorts.FromString,
845 )
846 self.UpdateFlowTable = channel.unary_unary(
847 '/voltha.VolthaLogicalLayer/UpdateFlowTable',
848 request_serializer=FlowTableUpdate.SerializeToString,
849 response_deserializer=NullMessage.FromString,
850 )
851 self.ListDeviceFlows = channel.unary_unary(
852 '/voltha.VolthaLogicalLayer/ListDeviceFlows',
853 request_serializer=ID.SerializeToString,
854 response_deserializer=Flows.FromString,
855 )
856 self.CreateSubscriber = channel.unary_unary(
857 '/voltha.VolthaLogicalLayer/CreateSubscriber',
858 request_serializer=Subscriber.SerializeToString,
859 response_deserializer=Subscriber.FromString,
860 )
861 self.GetSubscriber = channel.unary_unary(
862 '/voltha.VolthaLogicalLayer/GetSubscriber',
863 request_serializer=ID.SerializeToString,
864 response_deserializer=Subscriber.FromString,
865 )
866 self.UpdateSubscriber = channel.unary_unary(
867 '/voltha.VolthaLogicalLayer/UpdateSubscriber',
868 request_serializer=Subscriber.SerializeToString,
869 response_deserializer=Subscriber.FromString,
870 )
871 self.DeleteSubscriber = channel.unary_unary(
872 '/voltha.VolthaLogicalLayer/DeleteSubscriber',
873 request_serializer=ID.SerializeToString,
874 response_deserializer=NullMessage.FromString,
875 )
876 self.ListSubscribers = channel.unary_unary(
877 '/voltha.VolthaLogicalLayer/ListSubscribers',
878 request_serializer=NullMessage.SerializeToString,
879 response_deserializer=Subscribers.FromString,
880 )
881
882
883class VolthaLogicalLayerServicer(object):
884
885 def ListLogicalDevices(self, request, context):
886 """List logical devices owned by this Voltha instance
887 """
888 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
889 context.set_details('Method not implemented!')
890 raise NotImplementedError('Method not implemented!')
891
892 def GetLogicalDevice(self, request, context):
893 """Get detailed info on logical device owned by this Voltha instance
894 """
895 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
896 context.set_details('Method not implemented!')
897 raise NotImplementedError('Method not implemented!')
898
899 def ListLogicalDevicePorts(self, request, context):
900 """List ports of a logical device
901 """
902 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
903 context.set_details('Method not implemented!')
904 raise NotImplementedError('Method not implemented!')
905
906 def UpdateFlowTable(self, request, context):
907 """Update flow table for device
908 """
909 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
910 context.set_details('Method not implemented!')
911 raise NotImplementedError('Method not implemented!')
912
913 def ListDeviceFlows(self, request, context):
914 """List all flows of a logical device
915 """
916 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
917 context.set_details('Method not implemented!')
918 raise NotImplementedError('Method not implemented!')
919
920 def CreateSubscriber(self, request, context):
921 """Create a subscriber record
922 """
923 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
924 context.set_details('Method not implemented!')
925 raise NotImplementedError('Method not implemented!')
926
927 def GetSubscriber(self, request, context):
928 """Return an subscriber by ID
929 """
930 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
931 context.set_details('Method not implemented!')
932 raise NotImplementedError('Method not implemented!')
933
934 def UpdateSubscriber(self, request, context):
935 """Update an existing subscriber record by ID
936 """
937 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
938 context.set_details('Method not implemented!')
939 raise NotImplementedError('Method not implemented!')
940
941 def DeleteSubscriber(self, request, context):
942 """Delete a subscriber record by ID
943 """
944 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
945 context.set_details('Method not implemented!')
946 raise NotImplementedError('Method not implemented!')
947
948 def ListSubscribers(self, request, context):
949 """List subscribers
950 """
951 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
952 context.set_details('Method not implemented!')
953 raise NotImplementedError('Method not implemented!')
954
955
956def add_VolthaLogicalLayerServicer_to_server(servicer, server):
957 rpc_method_handlers = {
958 'ListLogicalDevices': grpc.unary_unary_rpc_method_handler(
959 servicer.ListLogicalDevices,
960 request_deserializer=NullMessage.FromString,
961 response_serializer=LogicalDevices.SerializeToString,
962 ),
963 'GetLogicalDevice': grpc.unary_unary_rpc_method_handler(
964 servicer.GetLogicalDevice,
965 request_deserializer=ID.FromString,
966 response_serializer=LogicalDeviceDetails.SerializeToString,
967 ),
968 'ListLogicalDevicePorts': grpc.unary_unary_rpc_method_handler(
969 servicer.ListLogicalDevicePorts,
970 request_deserializer=ID.FromString,
971 response_serializer=LogicalPorts.SerializeToString,
972 ),
973 'UpdateFlowTable': grpc.unary_unary_rpc_method_handler(
974 servicer.UpdateFlowTable,
975 request_deserializer=FlowTableUpdate.FromString,
976 response_serializer=NullMessage.SerializeToString,
977 ),
978 'ListDeviceFlows': grpc.unary_unary_rpc_method_handler(
979 servicer.ListDeviceFlows,
980 request_deserializer=ID.FromString,
981 response_serializer=Flows.SerializeToString,
982 ),
983 'CreateSubscriber': grpc.unary_unary_rpc_method_handler(
984 servicer.CreateSubscriber,
985 request_deserializer=Subscriber.FromString,
986 response_serializer=Subscriber.SerializeToString,
987 ),
988 'GetSubscriber': grpc.unary_unary_rpc_method_handler(
989 servicer.GetSubscriber,
990 request_deserializer=ID.FromString,
991 response_serializer=Subscriber.SerializeToString,
992 ),
993 'UpdateSubscriber': grpc.unary_unary_rpc_method_handler(
994 servicer.UpdateSubscriber,
995 request_deserializer=Subscriber.FromString,
996 response_serializer=Subscriber.SerializeToString,
997 ),
998 'DeleteSubscriber': grpc.unary_unary_rpc_method_handler(
999 servicer.DeleteSubscriber,
1000 request_deserializer=ID.FromString,
1001 response_serializer=NullMessage.SerializeToString,
1002 ),
1003 'ListSubscribers': grpc.unary_unary_rpc_method_handler(
1004 servicer.ListSubscribers,
1005 request_deserializer=NullMessage.FromString,
1006 response_serializer=Subscribers.SerializeToString,
1007 ),
1008 }
1009 generic_handler = grpc.method_handlers_generic_handler(
1010 'voltha.VolthaLogicalLayer', rpc_method_handlers)
1011 server.add_generic_rpc_handlers((generic_handler,))
1012
1013
1014class BetaVolthaLogicalLayerServicer(object):
1015 def ListLogicalDevices(self, request, context):
1016 """List logical devices owned by this Voltha instance
1017 """
1018 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1019 def GetLogicalDevice(self, request, context):
1020 """Get detailed info on logical device owned by this Voltha instance
1021 """
1022 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1023 def ListLogicalDevicePorts(self, request, context):
1024 """List ports of a logical device
1025 """
1026 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1027 def UpdateFlowTable(self, request, context):
1028 """Update flow table for device
1029 """
1030 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1031 def ListDeviceFlows(self, request, context):
1032 """List all flows of a logical device
1033 """
1034 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1035 def CreateSubscriber(self, request, context):
1036 """Create a subscriber record
1037 """
1038 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1039 def GetSubscriber(self, request, context):
1040 """Return an subscriber by ID
1041 """
1042 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1043 def UpdateSubscriber(self, request, context):
1044 """Update an existing subscriber record by ID
1045 """
1046 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1047 def DeleteSubscriber(self, request, context):
1048 """Delete a subscriber record by ID
1049 """
1050 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1051 def ListSubscribers(self, request, context):
1052 """List subscribers
1053 """
1054 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1055
1056
1057class BetaVolthaLogicalLayerStub(object):
1058 def ListLogicalDevices(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1059 """List logical devices owned by this Voltha instance
1060 """
1061 raise NotImplementedError()
1062 ListLogicalDevices.future = None
1063 def GetLogicalDevice(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1064 """Get detailed info on logical device owned by this Voltha instance
1065 """
1066 raise NotImplementedError()
1067 GetLogicalDevice.future = None
1068 def ListLogicalDevicePorts(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1069 """List ports of a logical device
1070 """
1071 raise NotImplementedError()
1072 ListLogicalDevicePorts.future = None
1073 def UpdateFlowTable(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1074 """Update flow table for device
1075 """
1076 raise NotImplementedError()
1077 UpdateFlowTable.future = None
1078 def ListDeviceFlows(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1079 """List all flows of a logical device
1080 """
1081 raise NotImplementedError()
1082 ListDeviceFlows.future = None
1083 def CreateSubscriber(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1084 """Create a subscriber record
1085 """
1086 raise NotImplementedError()
1087 CreateSubscriber.future = None
1088 def GetSubscriber(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1089 """Return an subscriber by ID
1090 """
1091 raise NotImplementedError()
1092 GetSubscriber.future = None
1093 def UpdateSubscriber(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1094 """Update an existing subscriber record by ID
1095 """
1096 raise NotImplementedError()
1097 UpdateSubscriber.future = None
1098 def DeleteSubscriber(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1099 """Delete a subscriber record by ID
1100 """
1101 raise NotImplementedError()
1102 DeleteSubscriber.future = None
1103 def ListSubscribers(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1104 """List subscribers
1105 """
1106 raise NotImplementedError()
1107 ListSubscribers.future = None
1108
1109
1110def beta_create_VolthaLogicalLayer_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
1111 request_deserializers = {
1112 ('voltha.VolthaLogicalLayer', 'CreateSubscriber'): Subscriber.FromString,
1113 ('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): ID.FromString,
1114 ('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): ID.FromString,
1115 ('voltha.VolthaLogicalLayer', 'GetSubscriber'): ID.FromString,
1116 ('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): ID.FromString,
1117 ('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): ID.FromString,
1118 ('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): NullMessage.FromString,
1119 ('voltha.VolthaLogicalLayer', 'ListSubscribers'): NullMessage.FromString,
1120 ('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): FlowTableUpdate.FromString,
1121 ('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): Subscriber.FromString,
1122 }
1123 response_serializers = {
1124 ('voltha.VolthaLogicalLayer', 'CreateSubscriber'): Subscriber.SerializeToString,
1125 ('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): NullMessage.SerializeToString,
1126 ('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): LogicalDeviceDetails.SerializeToString,
1127 ('voltha.VolthaLogicalLayer', 'GetSubscriber'): Subscriber.SerializeToString,
1128 ('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): Flows.SerializeToString,
1129 ('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): LogicalPorts.SerializeToString,
1130 ('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): LogicalDevices.SerializeToString,
1131 ('voltha.VolthaLogicalLayer', 'ListSubscribers'): Subscribers.SerializeToString,
1132 ('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): NullMessage.SerializeToString,
1133 ('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): Subscriber.SerializeToString,
1134 }
1135 method_implementations = {
1136 ('voltha.VolthaLogicalLayer', 'CreateSubscriber'): face_utilities.unary_unary_inline(servicer.CreateSubscriber),
1137 ('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): face_utilities.unary_unary_inline(servicer.DeleteSubscriber),
1138 ('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): face_utilities.unary_unary_inline(servicer.GetLogicalDevice),
1139 ('voltha.VolthaLogicalLayer', 'GetSubscriber'): face_utilities.unary_unary_inline(servicer.GetSubscriber),
1140 ('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): face_utilities.unary_unary_inline(servicer.ListDeviceFlows),
1141 ('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): face_utilities.unary_unary_inline(servicer.ListLogicalDevicePorts),
1142 ('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): face_utilities.unary_unary_inline(servicer.ListLogicalDevices),
1143 ('voltha.VolthaLogicalLayer', 'ListSubscribers'): face_utilities.unary_unary_inline(servicer.ListSubscribers),
1144 ('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): face_utilities.unary_unary_inline(servicer.UpdateFlowTable),
1145 ('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): face_utilities.unary_unary_inline(servicer.UpdateSubscriber),
1146 }
1147 server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
1148 return beta_implementations.server(method_implementations, options=server_options)
1149
1150
1151def beta_create_VolthaLogicalLayer_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
1152 request_serializers = {
1153 ('voltha.VolthaLogicalLayer', 'CreateSubscriber'): Subscriber.SerializeToString,
1154 ('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): ID.SerializeToString,
1155 ('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): ID.SerializeToString,
1156 ('voltha.VolthaLogicalLayer', 'GetSubscriber'): ID.SerializeToString,
1157 ('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): ID.SerializeToString,
1158 ('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): ID.SerializeToString,
1159 ('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): NullMessage.SerializeToString,
1160 ('voltha.VolthaLogicalLayer', 'ListSubscribers'): NullMessage.SerializeToString,
1161 ('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): FlowTableUpdate.SerializeToString,
1162 ('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): Subscriber.SerializeToString,
1163 }
1164 response_deserializers = {
1165 ('voltha.VolthaLogicalLayer', 'CreateSubscriber'): Subscriber.FromString,
1166 ('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): NullMessage.FromString,
1167 ('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): LogicalDeviceDetails.FromString,
1168 ('voltha.VolthaLogicalLayer', 'GetSubscriber'): Subscriber.FromString,
1169 ('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): Flows.FromString,
1170 ('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): LogicalPorts.FromString,
1171 ('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): LogicalDevices.FromString,
1172 ('voltha.VolthaLogicalLayer', 'ListSubscribers'): Subscribers.FromString,
1173 ('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): NullMessage.FromString,
1174 ('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): Subscriber.FromString,
1175 }
1176 cardinalities = {
1177 'CreateSubscriber': cardinality.Cardinality.UNARY_UNARY,
1178 'DeleteSubscriber': cardinality.Cardinality.UNARY_UNARY,
1179 'GetLogicalDevice': cardinality.Cardinality.UNARY_UNARY,
1180 'GetSubscriber': cardinality.Cardinality.UNARY_UNARY,
1181 'ListDeviceFlows': cardinality.Cardinality.UNARY_UNARY,
1182 'ListLogicalDevicePorts': cardinality.Cardinality.UNARY_UNARY,
1183 'ListLogicalDevices': cardinality.Cardinality.UNARY_UNARY,
1184 'ListSubscribers': cardinality.Cardinality.UNARY_UNARY,
1185 'UpdateFlowTable': cardinality.Cardinality.UNARY_UNARY,
1186 'UpdateSubscriber': cardinality.Cardinality.UNARY_UNARY,
1187 }
1188 stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
1189 return beta_implementations.dynamic_stub(channel, 'voltha.VolthaLogicalLayer', cardinalities, options=stub_options)
1190
1191
1192class ExampleServiceStub(object):
1193 """(placeholder) This is an example service
1194 """
1195
1196 def __init__(self, channel):
1197 """Constructor.
1198
1199 Args:
1200 channel: A grpc.Channel.
1201 """
1202 self.CreateAddress = channel.unary_unary(
1203 '/voltha.ExampleService/CreateAddress',
1204 request_serializer=Address.SerializeToString,
1205 response_deserializer=Address.FromString,
1206 )
1207 self.GetAddress = channel.unary_unary(
1208 '/voltha.ExampleService/GetAddress',
1209 request_serializer=ID.SerializeToString,
1210 response_deserializer=Address.FromString,
1211 )
1212 self.UpdateAddress = channel.unary_unary(
1213 '/voltha.ExampleService/UpdateAddress',
1214 request_serializer=Address.SerializeToString,
1215 response_deserializer=Address.FromString,
1216 )
1217 self.DeleteAddress = channel.unary_unary(
1218 '/voltha.ExampleService/DeleteAddress',
1219 request_serializer=ID.SerializeToString,
1220 response_deserializer=NullMessage.FromString,
1221 )
1222 self.ListAddresses = channel.unary_unary(
1223 '/voltha.ExampleService/ListAddresses',
1224 request_serializer=NullMessage.SerializeToString,
1225 response_deserializer=Addresses.FromString,
1226 )
1227
1228
1229class ExampleServiceServicer(object):
1230 """(placeholder) This is an example service
1231 """
1232
1233 def CreateAddress(self, request, context):
1234 """Create an address record
1235 """
1236 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1237 context.set_details('Method not implemented!')
1238 raise NotImplementedError('Method not implemented!')
1239
1240 def GetAddress(self, request, context):
1241 """Return an address by ID
1242 """
1243 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1244 context.set_details('Method not implemented!')
1245 raise NotImplementedError('Method not implemented!')
1246
1247 def UpdateAddress(self, request, context):
1248 """Update an existing address record by ID
1249 """
1250 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1251 context.set_details('Method not implemented!')
1252 raise NotImplementedError('Method not implemented!')
1253
1254 def DeleteAddress(self, request, context):
1255 """Delete an address record by ID
1256 """
1257 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1258 context.set_details('Method not implemented!')
1259 raise NotImplementedError('Method not implemented!')
1260
1261 def ListAddresses(self, request, context):
1262 """Return a bit more complex objects
1263 """
1264 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1265 context.set_details('Method not implemented!')
1266 raise NotImplementedError('Method not implemented!')
1267
1268
1269def add_ExampleServiceServicer_to_server(servicer, server):
1270 rpc_method_handlers = {
1271 'CreateAddress': grpc.unary_unary_rpc_method_handler(
1272 servicer.CreateAddress,
1273 request_deserializer=Address.FromString,
1274 response_serializer=Address.SerializeToString,
1275 ),
1276 'GetAddress': grpc.unary_unary_rpc_method_handler(
1277 servicer.GetAddress,
1278 request_deserializer=ID.FromString,
1279 response_serializer=Address.SerializeToString,
1280 ),
1281 'UpdateAddress': grpc.unary_unary_rpc_method_handler(
1282 servicer.UpdateAddress,
1283 request_deserializer=Address.FromString,
1284 response_serializer=Address.SerializeToString,
1285 ),
1286 'DeleteAddress': grpc.unary_unary_rpc_method_handler(
1287 servicer.DeleteAddress,
1288 request_deserializer=ID.FromString,
1289 response_serializer=NullMessage.SerializeToString,
1290 ),
1291 'ListAddresses': grpc.unary_unary_rpc_method_handler(
1292 servicer.ListAddresses,
1293 request_deserializer=NullMessage.FromString,
1294 response_serializer=Addresses.SerializeToString,
1295 ),
1296 }
1297 generic_handler = grpc.method_handlers_generic_handler(
1298 'voltha.ExampleService', rpc_method_handlers)
1299 server.add_generic_rpc_handlers((generic_handler,))
1300
1301
1302class BetaExampleServiceServicer(object):
1303 """(placeholder) This is an example service
1304 """
1305 def CreateAddress(self, request, context):
1306 """Create an address record
1307 """
1308 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1309 def GetAddress(self, request, context):
1310 """Return an address by ID
1311 """
1312 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1313 def UpdateAddress(self, request, context):
1314 """Update an existing address record by ID
1315 """
1316 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1317 def DeleteAddress(self, request, context):
1318 """Delete an address record by ID
1319 """
1320 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1321 def ListAddresses(self, request, context):
1322 """Return a bit more complex objects
1323 """
1324 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1325
1326
1327class BetaExampleServiceStub(object):
1328 """(placeholder) This is an example service
1329 """
1330 def CreateAddress(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1331 """Create an address record
1332 """
1333 raise NotImplementedError()
1334 CreateAddress.future = None
1335 def GetAddress(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1336 """Return an address by ID
1337 """
1338 raise NotImplementedError()
1339 GetAddress.future = None
1340 def UpdateAddress(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1341 """Update an existing address record by ID
1342 """
1343 raise NotImplementedError()
1344 UpdateAddress.future = None
1345 def DeleteAddress(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1346 """Delete an address record by ID
1347 """
1348 raise NotImplementedError()
1349 DeleteAddress.future = None
1350 def ListAddresses(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1351 """Return a bit more complex objects
1352 """
1353 raise NotImplementedError()
1354 ListAddresses.future = None
1355
1356
1357def beta_create_ExampleService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
1358 request_deserializers = {
1359 ('voltha.ExampleService', 'CreateAddress'): Address.FromString,
1360 ('voltha.ExampleService', 'DeleteAddress'): ID.FromString,
1361 ('voltha.ExampleService', 'GetAddress'): ID.FromString,
1362 ('voltha.ExampleService', 'ListAddresses'): NullMessage.FromString,
1363 ('voltha.ExampleService', 'UpdateAddress'): Address.FromString,
1364 }
1365 response_serializers = {
1366 ('voltha.ExampleService', 'CreateAddress'): Address.SerializeToString,
1367 ('voltha.ExampleService', 'DeleteAddress'): NullMessage.SerializeToString,
1368 ('voltha.ExampleService', 'GetAddress'): Address.SerializeToString,
1369 ('voltha.ExampleService', 'ListAddresses'): Addresses.SerializeToString,
1370 ('voltha.ExampleService', 'UpdateAddress'): Address.SerializeToString,
1371 }
1372 method_implementations = {
1373 ('voltha.ExampleService', 'CreateAddress'): face_utilities.unary_unary_inline(servicer.CreateAddress),
1374 ('voltha.ExampleService', 'DeleteAddress'): face_utilities.unary_unary_inline(servicer.DeleteAddress),
1375 ('voltha.ExampleService', 'GetAddress'): face_utilities.unary_unary_inline(servicer.GetAddress),
1376 ('voltha.ExampleService', 'ListAddresses'): face_utilities.unary_unary_inline(servicer.ListAddresses),
1377 ('voltha.ExampleService', 'UpdateAddress'): face_utilities.unary_unary_inline(servicer.UpdateAddress),
1378 }
1379 server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
1380 return beta_implementations.server(method_implementations, options=server_options)
1381
1382
1383def beta_create_ExampleService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
1384 request_serializers = {
1385 ('voltha.ExampleService', 'CreateAddress'): Address.SerializeToString,
1386 ('voltha.ExampleService', 'DeleteAddress'): ID.SerializeToString,
1387 ('voltha.ExampleService', 'GetAddress'): ID.SerializeToString,
1388 ('voltha.ExampleService', 'ListAddresses'): NullMessage.SerializeToString,
1389 ('voltha.ExampleService', 'UpdateAddress'): Address.SerializeToString,
1390 }
1391 response_deserializers = {
1392 ('voltha.ExampleService', 'CreateAddress'): Address.FromString,
1393 ('voltha.ExampleService', 'DeleteAddress'): NullMessage.FromString,
1394 ('voltha.ExampleService', 'GetAddress'): Address.FromString,
1395 ('voltha.ExampleService', 'ListAddresses'): Addresses.FromString,
1396 ('voltha.ExampleService', 'UpdateAddress'): Address.FromString,
1397 }
1398 cardinalities = {
1399 'CreateAddress': cardinality.Cardinality.UNARY_UNARY,
1400 'DeleteAddress': cardinality.Cardinality.UNARY_UNARY,
1401 'GetAddress': cardinality.Cardinality.UNARY_UNARY,
1402 'ListAddresses': cardinality.Cardinality.UNARY_UNARY,
1403 'UpdateAddress': cardinality.Cardinality.UNARY_UNARY,
1404 }
1405 stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
1406 return beta_implementations.dynamic_stub(channel, 'voltha.ExampleService', cardinalities, options=stub_options)
1407
1408
1409class OpenFlowStub(object):
1410
1411 def __init__(self, channel):
1412 """Constructor.
1413
1414 Args:
1415 channel: A grpc.Channel.
1416 """
1417 self.GetHello = channel.unary_unary(
1418 '/voltha.OpenFlow/GetHello',
1419 request_serializer=openflow__13__pb2.ofp_hello.SerializeToString,
1420 response_deserializer=openflow__13__pb2.ofp_hello.FromString,
1421 )
1422 self.EchoRequest = channel.unary_unary(
1423 '/voltha.OpenFlow/EchoRequest',
1424 request_serializer=openflow__13__pb2.ofp_header.SerializeToString,
1425 response_deserializer=openflow__13__pb2.ofp_header.FromString,
1426 )
1427 self.ExperimenterRequest = channel.unary_unary(
1428 '/voltha.OpenFlow/ExperimenterRequest',
1429 request_serializer=openflow__13__pb2.ofp_experimenter_header.SerializeToString,
1430 response_deserializer=openflow__13__pb2.ofp_experimenter_header.FromString,
1431 )
1432 self.GetSwitchFeatures = channel.unary_unary(
1433 '/voltha.OpenFlow/GetSwitchFeatures',
1434 request_serializer=openflow__13__pb2.ofp_header.SerializeToString,
1435 response_deserializer=openflow__13__pb2.ofp_switch_features.FromString,
1436 )
1437 self.GetSwitchConfig = channel.unary_unary(
1438 '/voltha.OpenFlow/GetSwitchConfig',
1439 request_serializer=openflow__13__pb2.ofp_header.SerializeToString,
1440 response_deserializer=openflow__13__pb2.ofp_switch_config.FromString,
1441 )
1442 self.SetConfig = channel.unary_unary(
1443 '/voltha.OpenFlow/SetConfig',
1444 request_serializer=openflow__13__pb2.ofp_switch_config.SerializeToString,
1445 response_deserializer=openflow__13__pb2.ofp_header.FromString,
1446 )
1447 self.ReceivePacketInMessages = channel.unary_stream(
1448 '/voltha.OpenFlow/ReceivePacketInMessages',
1449 request_serializer=openflow__13__pb2.ofp_header.SerializeToString,
1450 response_deserializer=openflow__13__pb2.ofp_packet_in.FromString,
1451 )
1452 self.SendPacketOutMessages = channel.unary_unary(
1453 '/voltha.OpenFlow/SendPacketOutMessages',
1454 request_serializer=openflow__13__pb2.ofp_packet_out.SerializeToString,
1455 response_deserializer=openflow__13__pb2.ofp_header.FromString,
1456 )
1457
1458
1459class OpenFlowServicer(object):
1460
1461 def GetHello(self, request, context):
1462 """
1463 Hello message handshake, initiated by the client (controller)
1464 TODO http option
1465 """
1466 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1467 context.set_details('Method not implemented!')
1468 raise NotImplementedError('Method not implemented!')
1469
1470 def EchoRequest(self, request, context):
1471 """
1472 Echo request / reply, initiated by the client (controller)
1473 TODO http option
1474 """
1475 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1476 context.set_details('Method not implemented!')
1477 raise NotImplementedError('Method not implemented!')
1478
1479 def ExperimenterRequest(self, request, context):
1480 """
1481 Experimental (extension) RPC
1482 TODO http option
1483 """
1484 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1485 context.set_details('Method not implemented!')
1486 raise NotImplementedError('Method not implemented!')
1487
1488 def GetSwitchFeatures(self, request, context):
1489 """
1490 Get Switch Features
1491 TODO http option
1492 """
1493 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1494 context.set_details('Method not implemented!')
1495 raise NotImplementedError('Method not implemented!')
1496
1497 def GetSwitchConfig(self, request, context):
1498 """
1499 Get Switch Config
1500 TODO http option
1501 """
1502 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1503 context.set_details('Method not implemented!')
1504 raise NotImplementedError('Method not implemented!')
1505
1506 def SetConfig(self, request, context):
1507 """
1508 Set Config
1509 TODO http option
1510 """
1511 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1512 context.set_details('Method not implemented!')
1513 raise NotImplementedError('Method not implemented!')
1514
1515 def ReceivePacketInMessages(self, request, context):
1516 """
1517 Receive Packet-In messages
1518 TODO http option
1519 """
1520 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1521 context.set_details('Method not implemented!')
1522 raise NotImplementedError('Method not implemented!')
1523
1524 def SendPacketOutMessages(self, request, context):
1525 """
1526 Send Packet-Out messages
1527 TODO http option
1528 """
1529 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1530 context.set_details('Method not implemented!')
1531 raise NotImplementedError('Method not implemented!')
1532
1533
1534def add_OpenFlowServicer_to_server(servicer, server):
1535 rpc_method_handlers = {
1536 'GetHello': grpc.unary_unary_rpc_method_handler(
1537 servicer.GetHello,
1538 request_deserializer=openflow__13__pb2.ofp_hello.FromString,
1539 response_serializer=openflow__13__pb2.ofp_hello.SerializeToString,
1540 ),
1541 'EchoRequest': grpc.unary_unary_rpc_method_handler(
1542 servicer.EchoRequest,
1543 request_deserializer=openflow__13__pb2.ofp_header.FromString,
1544 response_serializer=openflow__13__pb2.ofp_header.SerializeToString,
1545 ),
1546 'ExperimenterRequest': grpc.unary_unary_rpc_method_handler(
1547 servicer.ExperimenterRequest,
1548 request_deserializer=openflow__13__pb2.ofp_experimenter_header.FromString,
1549 response_serializer=openflow__13__pb2.ofp_experimenter_header.SerializeToString,
1550 ),
1551 'GetSwitchFeatures': grpc.unary_unary_rpc_method_handler(
1552 servicer.GetSwitchFeatures,
1553 request_deserializer=openflow__13__pb2.ofp_header.FromString,
1554 response_serializer=openflow__13__pb2.ofp_switch_features.SerializeToString,
1555 ),
1556 'GetSwitchConfig': grpc.unary_unary_rpc_method_handler(
1557 servicer.GetSwitchConfig,
1558 request_deserializer=openflow__13__pb2.ofp_header.FromString,
1559 response_serializer=openflow__13__pb2.ofp_switch_config.SerializeToString,
1560 ),
1561 'SetConfig': grpc.unary_unary_rpc_method_handler(
1562 servicer.SetConfig,
1563 request_deserializer=openflow__13__pb2.ofp_switch_config.FromString,
1564 response_serializer=openflow__13__pb2.ofp_header.SerializeToString,
1565 ),
1566 'ReceivePacketInMessages': grpc.unary_stream_rpc_method_handler(
1567 servicer.ReceivePacketInMessages,
1568 request_deserializer=openflow__13__pb2.ofp_header.FromString,
1569 response_serializer=openflow__13__pb2.ofp_packet_in.SerializeToString,
1570 ),
1571 'SendPacketOutMessages': grpc.unary_unary_rpc_method_handler(
1572 servicer.SendPacketOutMessages,
1573 request_deserializer=openflow__13__pb2.ofp_packet_out.FromString,
1574 response_serializer=openflow__13__pb2.ofp_header.SerializeToString,
1575 ),
1576 }
1577 generic_handler = grpc.method_handlers_generic_handler(
1578 'voltha.OpenFlow', rpc_method_handlers)
1579 server.add_generic_rpc_handlers((generic_handler,))
1580
1581
1582class BetaOpenFlowServicer(object):
1583 def GetHello(self, request, context):
1584 """
1585 Hello message handshake, initiated by the client (controller)
1586 TODO http option
1587 """
1588 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1589 def EchoRequest(self, request, context):
1590 """
1591 Echo request / reply, initiated by the client (controller)
1592 TODO http option
1593 """
1594 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1595 def ExperimenterRequest(self, request, context):
1596 """
1597 Experimental (extension) RPC
1598 TODO http option
1599 """
1600 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1601 def GetSwitchFeatures(self, request, context):
1602 """
1603 Get Switch Features
1604 TODO http option
1605 """
1606 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1607 def GetSwitchConfig(self, request, context):
1608 """
1609 Get Switch Config
1610 TODO http option
1611 """
1612 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1613 def SetConfig(self, request, context):
1614 """
1615 Set Config
1616 TODO http option
1617 """
1618 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1619 def ReceivePacketInMessages(self, request, context):
1620 """
1621 Receive Packet-In messages
1622 TODO http option
1623 """
1624 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1625 def SendPacketOutMessages(self, request, context):
1626 """
1627 Send Packet-Out messages
1628 TODO http option
1629 """
1630 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
1631
1632
1633class BetaOpenFlowStub(object):
1634 def GetHello(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1635 """
1636 Hello message handshake, initiated by the client (controller)
1637 TODO http option
1638 """
1639 raise NotImplementedError()
1640 GetHello.future = None
1641 def EchoRequest(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1642 """
1643 Echo request / reply, initiated by the client (controller)
1644 TODO http option
1645 """
1646 raise NotImplementedError()
1647 EchoRequest.future = None
1648 def ExperimenterRequest(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1649 """
1650 Experimental (extension) RPC
1651 TODO http option
1652 """
1653 raise NotImplementedError()
1654 ExperimenterRequest.future = None
1655 def GetSwitchFeatures(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1656 """
1657 Get Switch Features
1658 TODO http option
1659 """
1660 raise NotImplementedError()
1661 GetSwitchFeatures.future = None
1662 def GetSwitchConfig(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1663 """
1664 Get Switch Config
1665 TODO http option
1666 """
1667 raise NotImplementedError()
1668 GetSwitchConfig.future = None
1669 def SetConfig(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1670 """
1671 Set Config
1672 TODO http option
1673 """
1674 raise NotImplementedError()
1675 SetConfig.future = None
1676 def ReceivePacketInMessages(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1677 """
1678 Receive Packet-In messages
1679 TODO http option
1680 """
1681 raise NotImplementedError()
1682 def SendPacketOutMessages(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
1683 """
1684 Send Packet-Out messages
1685 TODO http option
1686 """
1687 raise NotImplementedError()
1688 SendPacketOutMessages.future = None
1689
1690
1691def beta_create_OpenFlow_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
1692 request_deserializers = {
1693 ('voltha.OpenFlow', 'EchoRequest'): openflow__13__pb2.ofp_header.FromString,
1694 ('voltha.OpenFlow', 'ExperimenterRequest'): openflow__13__pb2.ofp_experimenter_header.FromString,
1695 ('voltha.OpenFlow', 'GetHello'): openflow__13__pb2.ofp_hello.FromString,
1696 ('voltha.OpenFlow', 'GetSwitchConfig'): openflow__13__pb2.ofp_header.FromString,
1697 ('voltha.OpenFlow', 'GetSwitchFeatures'): openflow__13__pb2.ofp_header.FromString,
1698 ('voltha.OpenFlow', 'ReceivePacketInMessages'): openflow__13__pb2.ofp_header.FromString,
1699 ('voltha.OpenFlow', 'SendPacketOutMessages'): openflow__13__pb2.ofp_packet_out.FromString,
1700 ('voltha.OpenFlow', 'SetConfig'): openflow__13__pb2.ofp_switch_config.FromString,
1701 }
1702 response_serializers = {
1703 ('voltha.OpenFlow', 'EchoRequest'): openflow__13__pb2.ofp_header.SerializeToString,
1704 ('voltha.OpenFlow', 'ExperimenterRequest'): openflow__13__pb2.ofp_experimenter_header.SerializeToString,
1705 ('voltha.OpenFlow', 'GetHello'): openflow__13__pb2.ofp_hello.SerializeToString,
1706 ('voltha.OpenFlow', 'GetSwitchConfig'): openflow__13__pb2.ofp_switch_config.SerializeToString,
1707 ('voltha.OpenFlow', 'GetSwitchFeatures'): openflow__13__pb2.ofp_switch_features.SerializeToString,
1708 ('voltha.OpenFlow', 'ReceivePacketInMessages'): openflow__13__pb2.ofp_packet_in.SerializeToString,
1709 ('voltha.OpenFlow', 'SendPacketOutMessages'): openflow__13__pb2.ofp_header.SerializeToString,
1710 ('voltha.OpenFlow', 'SetConfig'): openflow__13__pb2.ofp_header.SerializeToString,
1711 }
1712 method_implementations = {
1713 ('voltha.OpenFlow', 'EchoRequest'): face_utilities.unary_unary_inline(servicer.EchoRequest),
1714 ('voltha.OpenFlow', 'ExperimenterRequest'): face_utilities.unary_unary_inline(servicer.ExperimenterRequest),
1715 ('voltha.OpenFlow', 'GetHello'): face_utilities.unary_unary_inline(servicer.GetHello),
1716 ('voltha.OpenFlow', 'GetSwitchConfig'): face_utilities.unary_unary_inline(servicer.GetSwitchConfig),
1717 ('voltha.OpenFlow', 'GetSwitchFeatures'): face_utilities.unary_unary_inline(servicer.GetSwitchFeatures),
1718 ('voltha.OpenFlow', 'ReceivePacketInMessages'): face_utilities.unary_stream_inline(servicer.ReceivePacketInMessages),
1719 ('voltha.OpenFlow', 'SendPacketOutMessages'): face_utilities.unary_unary_inline(servicer.SendPacketOutMessages),
1720 ('voltha.OpenFlow', 'SetConfig'): face_utilities.unary_unary_inline(servicer.SetConfig),
1721 }
1722 server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
1723 return beta_implementations.server(method_implementations, options=server_options)
1724
1725
1726def beta_create_OpenFlow_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
1727 request_serializers = {
1728 ('voltha.OpenFlow', 'EchoRequest'): openflow__13__pb2.ofp_header.SerializeToString,
1729 ('voltha.OpenFlow', 'ExperimenterRequest'): openflow__13__pb2.ofp_experimenter_header.SerializeToString,
1730 ('voltha.OpenFlow', 'GetHello'): openflow__13__pb2.ofp_hello.SerializeToString,
1731 ('voltha.OpenFlow', 'GetSwitchConfig'): openflow__13__pb2.ofp_header.SerializeToString,
1732 ('voltha.OpenFlow', 'GetSwitchFeatures'): openflow__13__pb2.ofp_header.SerializeToString,
1733 ('voltha.OpenFlow', 'ReceivePacketInMessages'): openflow__13__pb2.ofp_header.SerializeToString,
1734 ('voltha.OpenFlow', 'SendPacketOutMessages'): openflow__13__pb2.ofp_packet_out.SerializeToString,
1735 ('voltha.OpenFlow', 'SetConfig'): openflow__13__pb2.ofp_switch_config.SerializeToString,
1736 }
1737 response_deserializers = {
1738 ('voltha.OpenFlow', 'EchoRequest'): openflow__13__pb2.ofp_header.FromString,
1739 ('voltha.OpenFlow', 'ExperimenterRequest'): openflow__13__pb2.ofp_experimenter_header.FromString,
1740 ('voltha.OpenFlow', 'GetHello'): openflow__13__pb2.ofp_hello.FromString,
1741 ('voltha.OpenFlow', 'GetSwitchConfig'): openflow__13__pb2.ofp_switch_config.FromString,
1742 ('voltha.OpenFlow', 'GetSwitchFeatures'): openflow__13__pb2.ofp_switch_features.FromString,
1743 ('voltha.OpenFlow', 'ReceivePacketInMessages'): openflow__13__pb2.ofp_packet_in.FromString,
1744 ('voltha.OpenFlow', 'SendPacketOutMessages'): openflow__13__pb2.ofp_header.FromString,
1745 ('voltha.OpenFlow', 'SetConfig'): openflow__13__pb2.ofp_header.FromString,
1746 }
1747 cardinalities = {
1748 'EchoRequest': cardinality.Cardinality.UNARY_UNARY,
1749 'ExperimenterRequest': cardinality.Cardinality.UNARY_UNARY,
1750 'GetHello': cardinality.Cardinality.UNARY_UNARY,
1751 'GetSwitchConfig': cardinality.Cardinality.UNARY_UNARY,
1752 'GetSwitchFeatures': cardinality.Cardinality.UNARY_UNARY,
1753 'ReceivePacketInMessages': cardinality.Cardinality.UNARY_STREAM,
1754 'SendPacketOutMessages': cardinality.Cardinality.UNARY_UNARY,
1755 'SetConfig': cardinality.Cardinality.UNARY_UNARY,
1756 }
1757 stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
1758 return beta_implementations.dynamic_stub(channel, 'voltha.OpenFlow', cardinalities, options=stub_options)
1759# @@protoc_insertion_point(module_scope)