Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 | # source: voltha.proto |
| 3 | |
| 4 | import sys |
| 5 | _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
| 6 | from google.protobuf import descriptor as _descriptor |
| 7 | from google.protobuf import message as _message |
| 8 | from google.protobuf import reflection as _reflection |
| 9 | from google.protobuf import symbol_database as _symbol_database |
| 10 | from google.protobuf import descriptor_pb2 |
| 11 | # @@protoc_insertion_point(imports) |
| 12 | |
| 13 | _sym_db = _symbol_database.Default() |
| 14 | |
| 15 | |
| 16 | from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 |
| 17 | import openflow_13_pb2 as openflow__13__pb2 |
| 18 | |
| 19 | |
| 20 | DESCRIPTOR = _descriptor.FileDescriptor( |
| 21 | name='voltha.proto', |
| 22 | package='voltha', |
| 23 | syntax='proto3', |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 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\"M\n\x10GroupTableUpdate\x12\n\n\x02id\x18\x01 \x01(\t\x12-\n\tgroup_mod\x18\x02 \x01(\x0b\x32\x1a.openflow_13.ofp_group_mod\"3\n\x05\x46lows\x12*\n\x05items\x18\x01 \x03(\x0b\x32\x1b.openflow_13.ofp_flow_stats\"9\n\nFlowGroups\x12+\n\x05items\x18\x01 \x03(\x0b\x32\x1c.openflow_13.ofp_group_entry\"E\n\x08PacketIn\x12\n\n\x02id\x18\x01 \x01(\t\x12-\n\tpacket_in\x18\x02 \x01(\x0b\x32\x1a.openflow_13.ofp_packet_in\"H\n\tPacketOut\x12\n\n\x02id\x18\x01 \x01(\t\x12/\n\npacket_out\x18\x02 \x01(\x0b\x32\x1b.openflow_13.ofp_packet_out2^\n\rHealthService\x12M\n\x0fGetHealthStatus\x12\x13.voltha.NullMessage\x1a\x14.voltha.HealthStatus\"\x0f\x82\xd3\xe4\x93\x02\t\x12\x07/health2\xc4\t\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\x12h\n\x10UpdateGroupTable\x12\x18.voltha.GroupTableUpdate\x1a\x13.voltha.NullMessage\"%\x82\xd3\xe4\x93\x02\x1f\"\x1a/local/devices/{id}/groups:\x01*\x12Z\n\x14ListDeviceFlowGroups\x12\n.voltha.ID\x1a\x12.voltha.FlowGroups\"\"\x82\xd3\xe4\x93\x02\x1c\x12\x1a/local/devices/{id}/groups\x12>\n\x10StreamPacketsOut\x12\x11.voltha.PacketOut\x1a\x13.voltha.NullMessage\"\x00(\x01\x12=\n\x10ReceivePacketsIn\x12\x13.voltha.NullMessage\x1a\x10.voltha.PacketIn\"\x00\x30\x01\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') |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 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 | |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 567 | _GROUPTABLEUPDATE = _descriptor.Descriptor( |
| 568 | name='GroupTableUpdate', |
| 569 | full_name='voltha.GroupTableUpdate', |
| 570 | filename=None, |
| 571 | file=DESCRIPTOR, |
| 572 | containing_type=None, |
| 573 | fields=[ |
| 574 | _descriptor.FieldDescriptor( |
| 575 | name='id', full_name='voltha.GroupTableUpdate.id', index=0, |
| 576 | number=1, type=9, cpp_type=9, label=1, |
| 577 | has_default_value=False, default_value=_b("").decode('utf-8'), |
| 578 | message_type=None, enum_type=None, containing_type=None, |
| 579 | is_extension=False, extension_scope=None, |
| 580 | options=None), |
| 581 | _descriptor.FieldDescriptor( |
| 582 | name='group_mod', full_name='voltha.GroupTableUpdate.group_mod', index=1, |
| 583 | number=2, type=11, cpp_type=10, label=1, |
| 584 | has_default_value=False, default_value=None, |
| 585 | message_type=None, enum_type=None, containing_type=None, |
| 586 | is_extension=False, extension_scope=None, |
| 587 | options=None), |
| 588 | ], |
| 589 | extensions=[ |
| 590 | ], |
| 591 | nested_types=[], |
| 592 | enum_types=[ |
| 593 | ], |
| 594 | options=None, |
| 595 | is_extendable=False, |
| 596 | syntax='proto3', |
| 597 | extension_ranges=[], |
| 598 | oneofs=[ |
| 599 | ], |
| 600 | serialized_start=1055, |
| 601 | serialized_end=1132, |
| 602 | ) |
| 603 | |
| 604 | |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 605 | _FLOWS = _descriptor.Descriptor( |
| 606 | name='Flows', |
| 607 | full_name='voltha.Flows', |
| 608 | filename=None, |
| 609 | file=DESCRIPTOR, |
| 610 | containing_type=None, |
| 611 | fields=[ |
| 612 | _descriptor.FieldDescriptor( |
| 613 | name='items', full_name='voltha.Flows.items', index=0, |
| 614 | number=1, type=11, cpp_type=10, label=3, |
| 615 | has_default_value=False, default_value=[], |
| 616 | message_type=None, enum_type=None, containing_type=None, |
| 617 | is_extension=False, extension_scope=None, |
| 618 | options=None), |
| 619 | ], |
| 620 | extensions=[ |
| 621 | ], |
| 622 | nested_types=[], |
| 623 | enum_types=[ |
| 624 | ], |
| 625 | options=None, |
| 626 | is_extendable=False, |
| 627 | syntax='proto3', |
| 628 | extension_ranges=[], |
| 629 | oneofs=[ |
| 630 | ], |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 631 | serialized_start=1134, |
| 632 | serialized_end=1185, |
| 633 | ) |
| 634 | |
| 635 | |
| 636 | _FLOWGROUPS = _descriptor.Descriptor( |
| 637 | name='FlowGroups', |
| 638 | full_name='voltha.FlowGroups', |
| 639 | filename=None, |
| 640 | file=DESCRIPTOR, |
| 641 | containing_type=None, |
| 642 | fields=[ |
| 643 | _descriptor.FieldDescriptor( |
| 644 | name='items', full_name='voltha.FlowGroups.items', index=0, |
| 645 | number=1, type=11, cpp_type=10, label=3, |
| 646 | has_default_value=False, default_value=[], |
| 647 | message_type=None, enum_type=None, containing_type=None, |
| 648 | is_extension=False, extension_scope=None, |
| 649 | options=None), |
| 650 | ], |
| 651 | extensions=[ |
| 652 | ], |
| 653 | nested_types=[], |
| 654 | enum_types=[ |
| 655 | ], |
| 656 | options=None, |
| 657 | is_extendable=False, |
| 658 | syntax='proto3', |
| 659 | extension_ranges=[], |
| 660 | oneofs=[ |
| 661 | ], |
| 662 | serialized_start=1187, |
| 663 | serialized_end=1244, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 664 | ) |
| 665 | |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 666 | |
| 667 | _PACKETIN = _descriptor.Descriptor( |
| 668 | name='PacketIn', |
| 669 | full_name='voltha.PacketIn', |
| 670 | filename=None, |
| 671 | file=DESCRIPTOR, |
| 672 | containing_type=None, |
| 673 | fields=[ |
| 674 | _descriptor.FieldDescriptor( |
| 675 | name='id', full_name='voltha.PacketIn.id', index=0, |
| 676 | number=1, type=9, cpp_type=9, label=1, |
| 677 | has_default_value=False, default_value=_b("").decode('utf-8'), |
| 678 | message_type=None, enum_type=None, containing_type=None, |
| 679 | is_extension=False, extension_scope=None, |
| 680 | options=None), |
| 681 | _descriptor.FieldDescriptor( |
| 682 | name='packet_in', full_name='voltha.PacketIn.packet_in', index=1, |
| 683 | number=2, type=11, cpp_type=10, label=1, |
| 684 | has_default_value=False, default_value=None, |
| 685 | message_type=None, enum_type=None, containing_type=None, |
| 686 | is_extension=False, extension_scope=None, |
| 687 | options=None), |
| 688 | ], |
| 689 | extensions=[ |
| 690 | ], |
| 691 | nested_types=[], |
| 692 | enum_types=[ |
| 693 | ], |
| 694 | options=None, |
| 695 | is_extendable=False, |
| 696 | syntax='proto3', |
| 697 | extension_ranges=[], |
| 698 | oneofs=[ |
| 699 | ], |
| 700 | serialized_start=1246, |
| 701 | serialized_end=1315, |
| 702 | ) |
| 703 | |
| 704 | |
| 705 | _PACKETOUT = _descriptor.Descriptor( |
| 706 | name='PacketOut', |
| 707 | full_name='voltha.PacketOut', |
| 708 | filename=None, |
| 709 | file=DESCRIPTOR, |
| 710 | containing_type=None, |
| 711 | fields=[ |
| 712 | _descriptor.FieldDescriptor( |
| 713 | name='id', full_name='voltha.PacketOut.id', index=0, |
| 714 | number=1, type=9, cpp_type=9, label=1, |
| 715 | has_default_value=False, default_value=_b("").decode('utf-8'), |
| 716 | message_type=None, enum_type=None, containing_type=None, |
| 717 | is_extension=False, extension_scope=None, |
| 718 | options=None), |
| 719 | _descriptor.FieldDescriptor( |
| 720 | name='packet_out', full_name='voltha.PacketOut.packet_out', index=1, |
| 721 | number=2, type=11, cpp_type=10, label=1, |
| 722 | has_default_value=False, default_value=None, |
| 723 | message_type=None, enum_type=None, containing_type=None, |
| 724 | is_extension=False, extension_scope=None, |
| 725 | options=None), |
| 726 | ], |
| 727 | extensions=[ |
| 728 | ], |
| 729 | nested_types=[], |
| 730 | enum_types=[ |
| 731 | ], |
| 732 | options=None, |
| 733 | is_extendable=False, |
| 734 | syntax='proto3', |
| 735 | extension_ranges=[], |
| 736 | oneofs=[ |
| 737 | ], |
| 738 | serialized_start=1317, |
| 739 | serialized_end=1389, |
| 740 | ) |
| 741 | |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 742 | _HEALTHSTATUS.fields_by_name['state'].enum_type = _HEALTHSTATUS_HEALTHSTATE |
| 743 | _HEALTHSTATUS_HEALTHSTATE.containing_type = _HEALTHSTATUS |
| 744 | _ADDRESSES.fields_by_name['addresses'].message_type = _ADDRESS |
| 745 | _MORECOMPLEX.fields_by_name['health'].message_type = _HEALTHSTATUS |
| 746 | _MORECOMPLEX.fields_by_name['children'].message_type = _MORECOMPLEX |
| 747 | _MORECOMPLEX.fields_by_name['address'].message_type = _ADDRESS |
| 748 | _SUBSCRIBERS.fields_by_name['items'].message_type = _SUBSCRIBER |
| 749 | _LOGICALDEVICE.fields_by_name['desc'].message_type = openflow__13__pb2._OFP_DESC |
| 750 | _LOGICALDEVICES.fields_by_name['items'].message_type = _LOGICALDEVICE |
| 751 | _LOGICALPORTS.fields_by_name['items'].message_type = openflow__13__pb2._OFP_PORT |
| 752 | _LOGICALDEVICEDETAILS.fields_by_name['desc'].message_type = openflow__13__pb2._OFP_DESC |
| 753 | _LOGICALDEVICEDETAILS.fields_by_name['switch_features'].message_type = openflow__13__pb2._OFP_SWITCH_FEATURES |
| 754 | _FLOWTABLEUPDATE.fields_by_name['flow_mod'].message_type = openflow__13__pb2._OFP_FLOW_MOD |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 755 | _GROUPTABLEUPDATE.fields_by_name['group_mod'].message_type = openflow__13__pb2._OFP_GROUP_MOD |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 756 | _FLOWS.fields_by_name['items'].message_type = openflow__13__pb2._OFP_FLOW_STATS |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 757 | _FLOWGROUPS.fields_by_name['items'].message_type = openflow__13__pb2._OFP_GROUP_ENTRY |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 758 | _PACKETIN.fields_by_name['packet_in'].message_type = openflow__13__pb2._OFP_PACKET_IN |
| 759 | _PACKETOUT.fields_by_name['packet_out'].message_type = openflow__13__pb2._OFP_PACKET_OUT |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 760 | DESCRIPTOR.message_types_by_name['NullMessage'] = _NULLMESSAGE |
| 761 | DESCRIPTOR.message_types_by_name['HealthStatus'] = _HEALTHSTATUS |
| 762 | DESCRIPTOR.message_types_by_name['Address'] = _ADDRESS |
| 763 | DESCRIPTOR.message_types_by_name['Addresses'] = _ADDRESSES |
| 764 | DESCRIPTOR.message_types_by_name['MoreComplex'] = _MORECOMPLEX |
| 765 | DESCRIPTOR.message_types_by_name['ID'] = _ID |
| 766 | DESCRIPTOR.message_types_by_name['Subscriber'] = _SUBSCRIBER |
| 767 | DESCRIPTOR.message_types_by_name['Subscribers'] = _SUBSCRIBERS |
| 768 | DESCRIPTOR.message_types_by_name['LogicalDevice'] = _LOGICALDEVICE |
| 769 | DESCRIPTOR.message_types_by_name['LogicalDevices'] = _LOGICALDEVICES |
| 770 | DESCRIPTOR.message_types_by_name['LogicalPorts'] = _LOGICALPORTS |
| 771 | DESCRIPTOR.message_types_by_name['LogicalDeviceDetails'] = _LOGICALDEVICEDETAILS |
| 772 | DESCRIPTOR.message_types_by_name['FlowTableUpdate'] = _FLOWTABLEUPDATE |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 773 | DESCRIPTOR.message_types_by_name['GroupTableUpdate'] = _GROUPTABLEUPDATE |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 774 | DESCRIPTOR.message_types_by_name['Flows'] = _FLOWS |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 775 | DESCRIPTOR.message_types_by_name['FlowGroups'] = _FLOWGROUPS |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 776 | DESCRIPTOR.message_types_by_name['PacketIn'] = _PACKETIN |
| 777 | DESCRIPTOR.message_types_by_name['PacketOut'] = _PACKETOUT |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 778 | |
| 779 | NullMessage = _reflection.GeneratedProtocolMessageType('NullMessage', (_message.Message,), dict( |
| 780 | DESCRIPTOR = _NULLMESSAGE, |
| 781 | __module__ = 'voltha_pb2' |
| 782 | # @@protoc_insertion_point(class_scope:voltha.NullMessage) |
| 783 | )) |
| 784 | _sym_db.RegisterMessage(NullMessage) |
| 785 | |
| 786 | HealthStatus = _reflection.GeneratedProtocolMessageType('HealthStatus', (_message.Message,), dict( |
| 787 | DESCRIPTOR = _HEALTHSTATUS, |
| 788 | __module__ = 'voltha_pb2' |
| 789 | # @@protoc_insertion_point(class_scope:voltha.HealthStatus) |
| 790 | )) |
| 791 | _sym_db.RegisterMessage(HealthStatus) |
| 792 | |
| 793 | Address = _reflection.GeneratedProtocolMessageType('Address', (_message.Message,), dict( |
| 794 | DESCRIPTOR = _ADDRESS, |
| 795 | __module__ = 'voltha_pb2' |
| 796 | # @@protoc_insertion_point(class_scope:voltha.Address) |
| 797 | )) |
| 798 | _sym_db.RegisterMessage(Address) |
| 799 | |
| 800 | Addresses = _reflection.GeneratedProtocolMessageType('Addresses', (_message.Message,), dict( |
| 801 | DESCRIPTOR = _ADDRESSES, |
| 802 | __module__ = 'voltha_pb2' |
| 803 | # @@protoc_insertion_point(class_scope:voltha.Addresses) |
| 804 | )) |
| 805 | _sym_db.RegisterMessage(Addresses) |
| 806 | |
| 807 | MoreComplex = _reflection.GeneratedProtocolMessageType('MoreComplex', (_message.Message,), dict( |
| 808 | DESCRIPTOR = _MORECOMPLEX, |
| 809 | __module__ = 'voltha_pb2' |
| 810 | # @@protoc_insertion_point(class_scope:voltha.MoreComplex) |
| 811 | )) |
| 812 | _sym_db.RegisterMessage(MoreComplex) |
| 813 | |
| 814 | ID = _reflection.GeneratedProtocolMessageType('ID', (_message.Message,), dict( |
| 815 | DESCRIPTOR = _ID, |
| 816 | __module__ = 'voltha_pb2' |
| 817 | # @@protoc_insertion_point(class_scope:voltha.ID) |
| 818 | )) |
| 819 | _sym_db.RegisterMessage(ID) |
| 820 | |
| 821 | Subscriber = _reflection.GeneratedProtocolMessageType('Subscriber', (_message.Message,), dict( |
| 822 | DESCRIPTOR = _SUBSCRIBER, |
| 823 | __module__ = 'voltha_pb2' |
| 824 | # @@protoc_insertion_point(class_scope:voltha.Subscriber) |
| 825 | )) |
| 826 | _sym_db.RegisterMessage(Subscriber) |
| 827 | |
| 828 | Subscribers = _reflection.GeneratedProtocolMessageType('Subscribers', (_message.Message,), dict( |
| 829 | DESCRIPTOR = _SUBSCRIBERS, |
| 830 | __module__ = 'voltha_pb2' |
| 831 | # @@protoc_insertion_point(class_scope:voltha.Subscribers) |
| 832 | )) |
| 833 | _sym_db.RegisterMessage(Subscribers) |
| 834 | |
| 835 | LogicalDevice = _reflection.GeneratedProtocolMessageType('LogicalDevice', (_message.Message,), dict( |
| 836 | DESCRIPTOR = _LOGICALDEVICE, |
| 837 | __module__ = 'voltha_pb2' |
| 838 | # @@protoc_insertion_point(class_scope:voltha.LogicalDevice) |
| 839 | )) |
| 840 | _sym_db.RegisterMessage(LogicalDevice) |
| 841 | |
| 842 | LogicalDevices = _reflection.GeneratedProtocolMessageType('LogicalDevices', (_message.Message,), dict( |
| 843 | DESCRIPTOR = _LOGICALDEVICES, |
| 844 | __module__ = 'voltha_pb2' |
| 845 | # @@protoc_insertion_point(class_scope:voltha.LogicalDevices) |
| 846 | )) |
| 847 | _sym_db.RegisterMessage(LogicalDevices) |
| 848 | |
| 849 | LogicalPorts = _reflection.GeneratedProtocolMessageType('LogicalPorts', (_message.Message,), dict( |
| 850 | DESCRIPTOR = _LOGICALPORTS, |
| 851 | __module__ = 'voltha_pb2' |
| 852 | # @@protoc_insertion_point(class_scope:voltha.LogicalPorts) |
| 853 | )) |
| 854 | _sym_db.RegisterMessage(LogicalPorts) |
| 855 | |
| 856 | LogicalDeviceDetails = _reflection.GeneratedProtocolMessageType('LogicalDeviceDetails', (_message.Message,), dict( |
| 857 | DESCRIPTOR = _LOGICALDEVICEDETAILS, |
| 858 | __module__ = 'voltha_pb2' |
| 859 | # @@protoc_insertion_point(class_scope:voltha.LogicalDeviceDetails) |
| 860 | )) |
| 861 | _sym_db.RegisterMessage(LogicalDeviceDetails) |
| 862 | |
| 863 | FlowTableUpdate = _reflection.GeneratedProtocolMessageType('FlowTableUpdate', (_message.Message,), dict( |
| 864 | DESCRIPTOR = _FLOWTABLEUPDATE, |
| 865 | __module__ = 'voltha_pb2' |
| 866 | # @@protoc_insertion_point(class_scope:voltha.FlowTableUpdate) |
| 867 | )) |
| 868 | _sym_db.RegisterMessage(FlowTableUpdate) |
| 869 | |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 870 | GroupTableUpdate = _reflection.GeneratedProtocolMessageType('GroupTableUpdate', (_message.Message,), dict( |
| 871 | DESCRIPTOR = _GROUPTABLEUPDATE, |
| 872 | __module__ = 'voltha_pb2' |
| 873 | # @@protoc_insertion_point(class_scope:voltha.GroupTableUpdate) |
| 874 | )) |
| 875 | _sym_db.RegisterMessage(GroupTableUpdate) |
| 876 | |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 877 | Flows = _reflection.GeneratedProtocolMessageType('Flows', (_message.Message,), dict( |
| 878 | DESCRIPTOR = _FLOWS, |
| 879 | __module__ = 'voltha_pb2' |
| 880 | # @@protoc_insertion_point(class_scope:voltha.Flows) |
| 881 | )) |
| 882 | _sym_db.RegisterMessage(Flows) |
| 883 | |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 884 | FlowGroups = _reflection.GeneratedProtocolMessageType('FlowGroups', (_message.Message,), dict( |
| 885 | DESCRIPTOR = _FLOWGROUPS, |
| 886 | __module__ = 'voltha_pb2' |
| 887 | # @@protoc_insertion_point(class_scope:voltha.FlowGroups) |
| 888 | )) |
| 889 | _sym_db.RegisterMessage(FlowGroups) |
| 890 | |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 891 | PacketIn = _reflection.GeneratedProtocolMessageType('PacketIn', (_message.Message,), dict( |
| 892 | DESCRIPTOR = _PACKETIN, |
| 893 | __module__ = 'voltha_pb2' |
| 894 | # @@protoc_insertion_point(class_scope:voltha.PacketIn) |
| 895 | )) |
| 896 | _sym_db.RegisterMessage(PacketIn) |
| 897 | |
| 898 | PacketOut = _reflection.GeneratedProtocolMessageType('PacketOut', (_message.Message,), dict( |
| 899 | DESCRIPTOR = _PACKETOUT, |
| 900 | __module__ = 'voltha_pb2' |
| 901 | # @@protoc_insertion_point(class_scope:voltha.PacketOut) |
| 902 | )) |
| 903 | _sym_db.RegisterMessage(PacketOut) |
| 904 | |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 905 | |
| 906 | DESCRIPTOR.has_options = True |
| 907 | DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\023org.opencord.volthaB\014VolthaProtos\252\002\026Opencord.Voltha.Voltha')) |
| 908 | import grpc |
| 909 | from grpc.beta import implementations as beta_implementations |
| 910 | from grpc.beta import interfaces as beta_interfaces |
| 911 | from grpc.framework.common import cardinality |
| 912 | from grpc.framework.interfaces.face import utilities as face_utilities |
| 913 | |
| 914 | |
| 915 | class HealthServiceStub(object): |
| 916 | """Health related services |
| 917 | """ |
| 918 | |
| 919 | def __init__(self, channel): |
| 920 | """Constructor. |
| 921 | |
| 922 | Args: |
| 923 | channel: A grpc.Channel. |
| 924 | """ |
| 925 | self.GetHealthStatus = channel.unary_unary( |
| 926 | '/voltha.HealthService/GetHealthStatus', |
| 927 | request_serializer=NullMessage.SerializeToString, |
| 928 | response_deserializer=HealthStatus.FromString, |
| 929 | ) |
| 930 | |
| 931 | |
| 932 | class HealthServiceServicer(object): |
| 933 | """Health related services |
| 934 | """ |
| 935 | |
| 936 | def GetHealthStatus(self, request, context): |
| 937 | """Return current health status of a Voltha instance |
| 938 | """ |
| 939 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 940 | context.set_details('Method not implemented!') |
| 941 | raise NotImplementedError('Method not implemented!') |
| 942 | |
| 943 | |
| 944 | def add_HealthServiceServicer_to_server(servicer, server): |
| 945 | rpc_method_handlers = { |
| 946 | 'GetHealthStatus': grpc.unary_unary_rpc_method_handler( |
| 947 | servicer.GetHealthStatus, |
| 948 | request_deserializer=NullMessage.FromString, |
| 949 | response_serializer=HealthStatus.SerializeToString, |
| 950 | ), |
| 951 | } |
| 952 | generic_handler = grpc.method_handlers_generic_handler( |
| 953 | 'voltha.HealthService', rpc_method_handlers) |
| 954 | server.add_generic_rpc_handlers((generic_handler,)) |
| 955 | |
| 956 | |
| 957 | class BetaHealthServiceServicer(object): |
| 958 | """Health related services |
| 959 | """ |
| 960 | def GetHealthStatus(self, request, context): |
| 961 | """Return current health status of a Voltha instance |
| 962 | """ |
| 963 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 964 | |
| 965 | |
| 966 | class BetaHealthServiceStub(object): |
| 967 | """Health related services |
| 968 | """ |
| 969 | def GetHealthStatus(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 970 | """Return current health status of a Voltha instance |
| 971 | """ |
| 972 | raise NotImplementedError() |
| 973 | GetHealthStatus.future = None |
| 974 | |
| 975 | |
| 976 | def beta_create_HealthService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): |
| 977 | request_deserializers = { |
| 978 | ('voltha.HealthService', 'GetHealthStatus'): NullMessage.FromString, |
| 979 | } |
| 980 | response_serializers = { |
| 981 | ('voltha.HealthService', 'GetHealthStatus'): HealthStatus.SerializeToString, |
| 982 | } |
| 983 | method_implementations = { |
| 984 | ('voltha.HealthService', 'GetHealthStatus'): face_utilities.unary_unary_inline(servicer.GetHealthStatus), |
| 985 | } |
| 986 | 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) |
| 987 | return beta_implementations.server(method_implementations, options=server_options) |
| 988 | |
| 989 | |
| 990 | def beta_create_HealthService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): |
| 991 | request_serializers = { |
| 992 | ('voltha.HealthService', 'GetHealthStatus'): NullMessage.SerializeToString, |
| 993 | } |
| 994 | response_deserializers = { |
| 995 | ('voltha.HealthService', 'GetHealthStatus'): HealthStatus.FromString, |
| 996 | } |
| 997 | cardinalities = { |
| 998 | 'GetHealthStatus': cardinality.Cardinality.UNARY_UNARY, |
| 999 | } |
| 1000 | 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) |
| 1001 | return beta_implementations.dynamic_stub(channel, 'voltha.HealthService', cardinalities, options=stub_options) |
| 1002 | |
| 1003 | |
| 1004 | class VolthaLogicalLayerStub(object): |
| 1005 | |
| 1006 | def __init__(self, channel): |
| 1007 | """Constructor. |
| 1008 | |
| 1009 | Args: |
| 1010 | channel: A grpc.Channel. |
| 1011 | """ |
| 1012 | self.ListLogicalDevices = channel.unary_unary( |
| 1013 | '/voltha.VolthaLogicalLayer/ListLogicalDevices', |
| 1014 | request_serializer=NullMessage.SerializeToString, |
| 1015 | response_deserializer=LogicalDevices.FromString, |
| 1016 | ) |
| 1017 | self.GetLogicalDevice = channel.unary_unary( |
| 1018 | '/voltha.VolthaLogicalLayer/GetLogicalDevice', |
| 1019 | request_serializer=ID.SerializeToString, |
| 1020 | response_deserializer=LogicalDeviceDetails.FromString, |
| 1021 | ) |
| 1022 | self.ListLogicalDevicePorts = channel.unary_unary( |
| 1023 | '/voltha.VolthaLogicalLayer/ListLogicalDevicePorts', |
| 1024 | request_serializer=ID.SerializeToString, |
| 1025 | response_deserializer=LogicalPorts.FromString, |
| 1026 | ) |
| 1027 | self.UpdateFlowTable = channel.unary_unary( |
| 1028 | '/voltha.VolthaLogicalLayer/UpdateFlowTable', |
| 1029 | request_serializer=FlowTableUpdate.SerializeToString, |
| 1030 | response_deserializer=NullMessage.FromString, |
| 1031 | ) |
| 1032 | self.ListDeviceFlows = channel.unary_unary( |
| 1033 | '/voltha.VolthaLogicalLayer/ListDeviceFlows', |
| 1034 | request_serializer=ID.SerializeToString, |
| 1035 | response_deserializer=Flows.FromString, |
| 1036 | ) |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1037 | self.UpdateGroupTable = channel.unary_unary( |
| 1038 | '/voltha.VolthaLogicalLayer/UpdateGroupTable', |
| 1039 | request_serializer=GroupTableUpdate.SerializeToString, |
| 1040 | response_deserializer=NullMessage.FromString, |
| 1041 | ) |
| 1042 | self.ListDeviceFlowGroups = channel.unary_unary( |
| 1043 | '/voltha.VolthaLogicalLayer/ListDeviceFlowGroups', |
| 1044 | request_serializer=ID.SerializeToString, |
| 1045 | response_deserializer=FlowGroups.FromString, |
| 1046 | ) |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 1047 | self.StreamPacketsOut = channel.stream_unary( |
| 1048 | '/voltha.VolthaLogicalLayer/StreamPacketsOut', |
| 1049 | request_serializer=PacketOut.SerializeToString, |
| 1050 | response_deserializer=NullMessage.FromString, |
| 1051 | ) |
| 1052 | self.ReceivePacketsIn = channel.unary_stream( |
| 1053 | '/voltha.VolthaLogicalLayer/ReceivePacketsIn', |
| 1054 | request_serializer=NullMessage.SerializeToString, |
| 1055 | response_deserializer=PacketIn.FromString, |
| 1056 | ) |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1057 | self.CreateSubscriber = channel.unary_unary( |
| 1058 | '/voltha.VolthaLogicalLayer/CreateSubscriber', |
| 1059 | request_serializer=Subscriber.SerializeToString, |
| 1060 | response_deserializer=Subscriber.FromString, |
| 1061 | ) |
| 1062 | self.GetSubscriber = channel.unary_unary( |
| 1063 | '/voltha.VolthaLogicalLayer/GetSubscriber', |
| 1064 | request_serializer=ID.SerializeToString, |
| 1065 | response_deserializer=Subscriber.FromString, |
| 1066 | ) |
| 1067 | self.UpdateSubscriber = channel.unary_unary( |
| 1068 | '/voltha.VolthaLogicalLayer/UpdateSubscriber', |
| 1069 | request_serializer=Subscriber.SerializeToString, |
| 1070 | response_deserializer=Subscriber.FromString, |
| 1071 | ) |
| 1072 | self.DeleteSubscriber = channel.unary_unary( |
| 1073 | '/voltha.VolthaLogicalLayer/DeleteSubscriber', |
| 1074 | request_serializer=ID.SerializeToString, |
| 1075 | response_deserializer=NullMessage.FromString, |
| 1076 | ) |
| 1077 | self.ListSubscribers = channel.unary_unary( |
| 1078 | '/voltha.VolthaLogicalLayer/ListSubscribers', |
| 1079 | request_serializer=NullMessage.SerializeToString, |
| 1080 | response_deserializer=Subscribers.FromString, |
| 1081 | ) |
| 1082 | |
| 1083 | |
| 1084 | class VolthaLogicalLayerServicer(object): |
| 1085 | |
| 1086 | def ListLogicalDevices(self, request, context): |
| 1087 | """List logical devices owned by this Voltha instance |
| 1088 | """ |
| 1089 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1090 | context.set_details('Method not implemented!') |
| 1091 | raise NotImplementedError('Method not implemented!') |
| 1092 | |
| 1093 | def GetLogicalDevice(self, request, context): |
| 1094 | """Get detailed info on logical device owned by this Voltha instance |
| 1095 | """ |
| 1096 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1097 | context.set_details('Method not implemented!') |
| 1098 | raise NotImplementedError('Method not implemented!') |
| 1099 | |
| 1100 | def ListLogicalDevicePorts(self, request, context): |
| 1101 | """List ports of a logical device |
| 1102 | """ |
| 1103 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1104 | context.set_details('Method not implemented!') |
| 1105 | raise NotImplementedError('Method not implemented!') |
| 1106 | |
| 1107 | def UpdateFlowTable(self, request, context): |
| 1108 | """Update flow table for device |
| 1109 | """ |
| 1110 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1111 | context.set_details('Method not implemented!') |
| 1112 | raise NotImplementedError('Method not implemented!') |
| 1113 | |
| 1114 | def ListDeviceFlows(self, request, context): |
| 1115 | """List all flows of a logical device |
| 1116 | """ |
| 1117 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1118 | context.set_details('Method not implemented!') |
| 1119 | raise NotImplementedError('Method not implemented!') |
| 1120 | |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1121 | def UpdateGroupTable(self, request, context): |
| 1122 | """Update group tabel for device |
| 1123 | """ |
| 1124 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1125 | context.set_details('Method not implemented!') |
| 1126 | raise NotImplementedError('Method not implemented!') |
| 1127 | |
| 1128 | def ListDeviceFlowGroups(self, request, context): |
| 1129 | """List all flow groups of a logical device |
| 1130 | """ |
| 1131 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1132 | context.set_details('Method not implemented!') |
| 1133 | raise NotImplementedError('Method not implemented!') |
| 1134 | |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 1135 | def StreamPacketsOut(self, request_iterator, context): |
| 1136 | """Stream control packets to the dataplane |
| 1137 | This does not have an HTTP representation |
| 1138 | """ |
| 1139 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1140 | context.set_details('Method not implemented!') |
| 1141 | raise NotImplementedError('Method not implemented!') |
| 1142 | |
| 1143 | def ReceivePacketsIn(self, request, context): |
| 1144 | """Receive control packet stream |
| 1145 | This does not have an HTTP representation |
| 1146 | """ |
| 1147 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1148 | context.set_details('Method not implemented!') |
| 1149 | raise NotImplementedError('Method not implemented!') |
| 1150 | |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1151 | def CreateSubscriber(self, request, context): |
| 1152 | """Create a subscriber record |
| 1153 | """ |
| 1154 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1155 | context.set_details('Method not implemented!') |
| 1156 | raise NotImplementedError('Method not implemented!') |
| 1157 | |
| 1158 | def GetSubscriber(self, request, context): |
| 1159 | """Return an subscriber by ID |
| 1160 | """ |
| 1161 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1162 | context.set_details('Method not implemented!') |
| 1163 | raise NotImplementedError('Method not implemented!') |
| 1164 | |
| 1165 | def UpdateSubscriber(self, request, context): |
| 1166 | """Update an existing subscriber record by ID |
| 1167 | """ |
| 1168 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1169 | context.set_details('Method not implemented!') |
| 1170 | raise NotImplementedError('Method not implemented!') |
| 1171 | |
| 1172 | def DeleteSubscriber(self, request, context): |
| 1173 | """Delete a subscriber record by ID |
| 1174 | """ |
| 1175 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1176 | context.set_details('Method not implemented!') |
| 1177 | raise NotImplementedError('Method not implemented!') |
| 1178 | |
| 1179 | def ListSubscribers(self, request, context): |
| 1180 | """List subscribers |
| 1181 | """ |
| 1182 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1183 | context.set_details('Method not implemented!') |
| 1184 | raise NotImplementedError('Method not implemented!') |
| 1185 | |
| 1186 | |
| 1187 | def add_VolthaLogicalLayerServicer_to_server(servicer, server): |
| 1188 | rpc_method_handlers = { |
| 1189 | 'ListLogicalDevices': grpc.unary_unary_rpc_method_handler( |
| 1190 | servicer.ListLogicalDevices, |
| 1191 | request_deserializer=NullMessage.FromString, |
| 1192 | response_serializer=LogicalDevices.SerializeToString, |
| 1193 | ), |
| 1194 | 'GetLogicalDevice': grpc.unary_unary_rpc_method_handler( |
| 1195 | servicer.GetLogicalDevice, |
| 1196 | request_deserializer=ID.FromString, |
| 1197 | response_serializer=LogicalDeviceDetails.SerializeToString, |
| 1198 | ), |
| 1199 | 'ListLogicalDevicePorts': grpc.unary_unary_rpc_method_handler( |
| 1200 | servicer.ListLogicalDevicePorts, |
| 1201 | request_deserializer=ID.FromString, |
| 1202 | response_serializer=LogicalPorts.SerializeToString, |
| 1203 | ), |
| 1204 | 'UpdateFlowTable': grpc.unary_unary_rpc_method_handler( |
| 1205 | servicer.UpdateFlowTable, |
| 1206 | request_deserializer=FlowTableUpdate.FromString, |
| 1207 | response_serializer=NullMessage.SerializeToString, |
| 1208 | ), |
| 1209 | 'ListDeviceFlows': grpc.unary_unary_rpc_method_handler( |
| 1210 | servicer.ListDeviceFlows, |
| 1211 | request_deserializer=ID.FromString, |
| 1212 | response_serializer=Flows.SerializeToString, |
| 1213 | ), |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1214 | 'UpdateGroupTable': grpc.unary_unary_rpc_method_handler( |
| 1215 | servicer.UpdateGroupTable, |
| 1216 | request_deserializer=GroupTableUpdate.FromString, |
| 1217 | response_serializer=NullMessage.SerializeToString, |
| 1218 | ), |
| 1219 | 'ListDeviceFlowGroups': grpc.unary_unary_rpc_method_handler( |
| 1220 | servicer.ListDeviceFlowGroups, |
| 1221 | request_deserializer=ID.FromString, |
| 1222 | response_serializer=FlowGroups.SerializeToString, |
| 1223 | ), |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 1224 | 'StreamPacketsOut': grpc.stream_unary_rpc_method_handler( |
| 1225 | servicer.StreamPacketsOut, |
| 1226 | request_deserializer=PacketOut.FromString, |
| 1227 | response_serializer=NullMessage.SerializeToString, |
| 1228 | ), |
| 1229 | 'ReceivePacketsIn': grpc.unary_stream_rpc_method_handler( |
| 1230 | servicer.ReceivePacketsIn, |
| 1231 | request_deserializer=NullMessage.FromString, |
| 1232 | response_serializer=PacketIn.SerializeToString, |
| 1233 | ), |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1234 | 'CreateSubscriber': grpc.unary_unary_rpc_method_handler( |
| 1235 | servicer.CreateSubscriber, |
| 1236 | request_deserializer=Subscriber.FromString, |
| 1237 | response_serializer=Subscriber.SerializeToString, |
| 1238 | ), |
| 1239 | 'GetSubscriber': grpc.unary_unary_rpc_method_handler( |
| 1240 | servicer.GetSubscriber, |
| 1241 | request_deserializer=ID.FromString, |
| 1242 | response_serializer=Subscriber.SerializeToString, |
| 1243 | ), |
| 1244 | 'UpdateSubscriber': grpc.unary_unary_rpc_method_handler( |
| 1245 | servicer.UpdateSubscriber, |
| 1246 | request_deserializer=Subscriber.FromString, |
| 1247 | response_serializer=Subscriber.SerializeToString, |
| 1248 | ), |
| 1249 | 'DeleteSubscriber': grpc.unary_unary_rpc_method_handler( |
| 1250 | servicer.DeleteSubscriber, |
| 1251 | request_deserializer=ID.FromString, |
| 1252 | response_serializer=NullMessage.SerializeToString, |
| 1253 | ), |
| 1254 | 'ListSubscribers': grpc.unary_unary_rpc_method_handler( |
| 1255 | servicer.ListSubscribers, |
| 1256 | request_deserializer=NullMessage.FromString, |
| 1257 | response_serializer=Subscribers.SerializeToString, |
| 1258 | ), |
| 1259 | } |
| 1260 | generic_handler = grpc.method_handlers_generic_handler( |
| 1261 | 'voltha.VolthaLogicalLayer', rpc_method_handlers) |
| 1262 | server.add_generic_rpc_handlers((generic_handler,)) |
| 1263 | |
| 1264 | |
| 1265 | class BetaVolthaLogicalLayerServicer(object): |
| 1266 | def ListLogicalDevices(self, request, context): |
| 1267 | """List logical devices owned by this Voltha instance |
| 1268 | """ |
| 1269 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1270 | def GetLogicalDevice(self, request, context): |
| 1271 | """Get detailed info on logical device owned by this Voltha instance |
| 1272 | """ |
| 1273 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1274 | def ListLogicalDevicePorts(self, request, context): |
| 1275 | """List ports of a logical device |
| 1276 | """ |
| 1277 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1278 | def UpdateFlowTable(self, request, context): |
| 1279 | """Update flow table for device |
| 1280 | """ |
| 1281 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1282 | def ListDeviceFlows(self, request, context): |
| 1283 | """List all flows of a logical device |
| 1284 | """ |
| 1285 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1286 | def UpdateGroupTable(self, request, context): |
| 1287 | """Update group tabel for device |
| 1288 | """ |
| 1289 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1290 | def ListDeviceFlowGroups(self, request, context): |
| 1291 | """List all flow groups of a logical device |
| 1292 | """ |
| 1293 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 1294 | def StreamPacketsOut(self, request_iterator, context): |
| 1295 | """Stream control packets to the dataplane |
| 1296 | This does not have an HTTP representation |
| 1297 | """ |
| 1298 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1299 | def ReceivePacketsIn(self, request, context): |
| 1300 | """Receive control packet stream |
| 1301 | This does not have an HTTP representation |
| 1302 | """ |
| 1303 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1304 | def CreateSubscriber(self, request, context): |
| 1305 | """Create a subscriber record |
| 1306 | """ |
| 1307 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1308 | def GetSubscriber(self, request, context): |
| 1309 | """Return an subscriber by ID |
| 1310 | """ |
| 1311 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1312 | def UpdateSubscriber(self, request, context): |
| 1313 | """Update an existing subscriber record by ID |
| 1314 | """ |
| 1315 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1316 | def DeleteSubscriber(self, request, context): |
| 1317 | """Delete a subscriber record by ID |
| 1318 | """ |
| 1319 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1320 | def ListSubscribers(self, request, context): |
| 1321 | """List subscribers |
| 1322 | """ |
| 1323 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1324 | |
| 1325 | |
| 1326 | class BetaVolthaLogicalLayerStub(object): |
| 1327 | def ListLogicalDevices(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1328 | """List logical devices owned by this Voltha instance |
| 1329 | """ |
| 1330 | raise NotImplementedError() |
| 1331 | ListLogicalDevices.future = None |
| 1332 | def GetLogicalDevice(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1333 | """Get detailed info on logical device owned by this Voltha instance |
| 1334 | """ |
| 1335 | raise NotImplementedError() |
| 1336 | GetLogicalDevice.future = None |
| 1337 | def ListLogicalDevicePorts(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1338 | """List ports of a logical device |
| 1339 | """ |
| 1340 | raise NotImplementedError() |
| 1341 | ListLogicalDevicePorts.future = None |
| 1342 | def UpdateFlowTable(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1343 | """Update flow table for device |
| 1344 | """ |
| 1345 | raise NotImplementedError() |
| 1346 | UpdateFlowTable.future = None |
| 1347 | def ListDeviceFlows(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1348 | """List all flows of a logical device |
| 1349 | """ |
| 1350 | raise NotImplementedError() |
| 1351 | ListDeviceFlows.future = None |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1352 | def UpdateGroupTable(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1353 | """Update group tabel for device |
| 1354 | """ |
| 1355 | raise NotImplementedError() |
| 1356 | UpdateGroupTable.future = None |
| 1357 | def ListDeviceFlowGroups(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1358 | """List all flow groups of a logical device |
| 1359 | """ |
| 1360 | raise NotImplementedError() |
| 1361 | ListDeviceFlowGroups.future = None |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 1362 | def StreamPacketsOut(self, request_iterator, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1363 | """Stream control packets to the dataplane |
| 1364 | This does not have an HTTP representation |
| 1365 | """ |
| 1366 | raise NotImplementedError() |
| 1367 | StreamPacketsOut.future = None |
| 1368 | def ReceivePacketsIn(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1369 | """Receive control packet stream |
| 1370 | This does not have an HTTP representation |
| 1371 | """ |
| 1372 | raise NotImplementedError() |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1373 | def CreateSubscriber(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1374 | """Create a subscriber record |
| 1375 | """ |
| 1376 | raise NotImplementedError() |
| 1377 | CreateSubscriber.future = None |
| 1378 | def GetSubscriber(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1379 | """Return an subscriber by ID |
| 1380 | """ |
| 1381 | raise NotImplementedError() |
| 1382 | GetSubscriber.future = None |
| 1383 | def UpdateSubscriber(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1384 | """Update an existing subscriber record by ID |
| 1385 | """ |
| 1386 | raise NotImplementedError() |
| 1387 | UpdateSubscriber.future = None |
| 1388 | def DeleteSubscriber(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1389 | """Delete a subscriber record by ID |
| 1390 | """ |
| 1391 | raise NotImplementedError() |
| 1392 | DeleteSubscriber.future = None |
| 1393 | def ListSubscribers(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1394 | """List subscribers |
| 1395 | """ |
| 1396 | raise NotImplementedError() |
| 1397 | ListSubscribers.future = None |
| 1398 | |
| 1399 | |
| 1400 | def beta_create_VolthaLogicalLayer_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): |
| 1401 | request_deserializers = { |
| 1402 | ('voltha.VolthaLogicalLayer', 'CreateSubscriber'): Subscriber.FromString, |
| 1403 | ('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): ID.FromString, |
| 1404 | ('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): ID.FromString, |
| 1405 | ('voltha.VolthaLogicalLayer', 'GetSubscriber'): ID.FromString, |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1406 | ('voltha.VolthaLogicalLayer', 'ListDeviceFlowGroups'): ID.FromString, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1407 | ('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): ID.FromString, |
| 1408 | ('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): ID.FromString, |
| 1409 | ('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): NullMessage.FromString, |
| 1410 | ('voltha.VolthaLogicalLayer', 'ListSubscribers'): NullMessage.FromString, |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 1411 | ('voltha.VolthaLogicalLayer', 'ReceivePacketsIn'): NullMessage.FromString, |
| 1412 | ('voltha.VolthaLogicalLayer', 'StreamPacketsOut'): PacketOut.FromString, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1413 | ('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): FlowTableUpdate.FromString, |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1414 | ('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): GroupTableUpdate.FromString, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1415 | ('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): Subscriber.FromString, |
| 1416 | } |
| 1417 | response_serializers = { |
| 1418 | ('voltha.VolthaLogicalLayer', 'CreateSubscriber'): Subscriber.SerializeToString, |
| 1419 | ('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): NullMessage.SerializeToString, |
| 1420 | ('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): LogicalDeviceDetails.SerializeToString, |
| 1421 | ('voltha.VolthaLogicalLayer', 'GetSubscriber'): Subscriber.SerializeToString, |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1422 | ('voltha.VolthaLogicalLayer', 'ListDeviceFlowGroups'): FlowGroups.SerializeToString, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1423 | ('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): Flows.SerializeToString, |
| 1424 | ('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): LogicalPorts.SerializeToString, |
| 1425 | ('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): LogicalDevices.SerializeToString, |
| 1426 | ('voltha.VolthaLogicalLayer', 'ListSubscribers'): Subscribers.SerializeToString, |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 1427 | ('voltha.VolthaLogicalLayer', 'ReceivePacketsIn'): PacketIn.SerializeToString, |
| 1428 | ('voltha.VolthaLogicalLayer', 'StreamPacketsOut'): NullMessage.SerializeToString, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1429 | ('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): NullMessage.SerializeToString, |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1430 | ('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): NullMessage.SerializeToString, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1431 | ('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): Subscriber.SerializeToString, |
| 1432 | } |
| 1433 | method_implementations = { |
| 1434 | ('voltha.VolthaLogicalLayer', 'CreateSubscriber'): face_utilities.unary_unary_inline(servicer.CreateSubscriber), |
| 1435 | ('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): face_utilities.unary_unary_inline(servicer.DeleteSubscriber), |
| 1436 | ('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): face_utilities.unary_unary_inline(servicer.GetLogicalDevice), |
| 1437 | ('voltha.VolthaLogicalLayer', 'GetSubscriber'): face_utilities.unary_unary_inline(servicer.GetSubscriber), |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1438 | ('voltha.VolthaLogicalLayer', 'ListDeviceFlowGroups'): face_utilities.unary_unary_inline(servicer.ListDeviceFlowGroups), |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1439 | ('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): face_utilities.unary_unary_inline(servicer.ListDeviceFlows), |
| 1440 | ('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): face_utilities.unary_unary_inline(servicer.ListLogicalDevicePorts), |
| 1441 | ('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): face_utilities.unary_unary_inline(servicer.ListLogicalDevices), |
| 1442 | ('voltha.VolthaLogicalLayer', 'ListSubscribers'): face_utilities.unary_unary_inline(servicer.ListSubscribers), |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 1443 | ('voltha.VolthaLogicalLayer', 'ReceivePacketsIn'): face_utilities.unary_stream_inline(servicer.ReceivePacketsIn), |
| 1444 | ('voltha.VolthaLogicalLayer', 'StreamPacketsOut'): face_utilities.stream_unary_inline(servicer.StreamPacketsOut), |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1445 | ('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): face_utilities.unary_unary_inline(servicer.UpdateFlowTable), |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1446 | ('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): face_utilities.unary_unary_inline(servicer.UpdateGroupTable), |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1447 | ('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): face_utilities.unary_unary_inline(servicer.UpdateSubscriber), |
| 1448 | } |
| 1449 | 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) |
| 1450 | return beta_implementations.server(method_implementations, options=server_options) |
| 1451 | |
| 1452 | |
| 1453 | def beta_create_VolthaLogicalLayer_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): |
| 1454 | request_serializers = { |
| 1455 | ('voltha.VolthaLogicalLayer', 'CreateSubscriber'): Subscriber.SerializeToString, |
| 1456 | ('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): ID.SerializeToString, |
| 1457 | ('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): ID.SerializeToString, |
| 1458 | ('voltha.VolthaLogicalLayer', 'GetSubscriber'): ID.SerializeToString, |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1459 | ('voltha.VolthaLogicalLayer', 'ListDeviceFlowGroups'): ID.SerializeToString, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1460 | ('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): ID.SerializeToString, |
| 1461 | ('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): ID.SerializeToString, |
| 1462 | ('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): NullMessage.SerializeToString, |
| 1463 | ('voltha.VolthaLogicalLayer', 'ListSubscribers'): NullMessage.SerializeToString, |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 1464 | ('voltha.VolthaLogicalLayer', 'ReceivePacketsIn'): NullMessage.SerializeToString, |
| 1465 | ('voltha.VolthaLogicalLayer', 'StreamPacketsOut'): PacketOut.SerializeToString, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1466 | ('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): FlowTableUpdate.SerializeToString, |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1467 | ('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): GroupTableUpdate.SerializeToString, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1468 | ('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): Subscriber.SerializeToString, |
| 1469 | } |
| 1470 | response_deserializers = { |
| 1471 | ('voltha.VolthaLogicalLayer', 'CreateSubscriber'): Subscriber.FromString, |
| 1472 | ('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): NullMessage.FromString, |
| 1473 | ('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): LogicalDeviceDetails.FromString, |
| 1474 | ('voltha.VolthaLogicalLayer', 'GetSubscriber'): Subscriber.FromString, |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1475 | ('voltha.VolthaLogicalLayer', 'ListDeviceFlowGroups'): FlowGroups.FromString, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1476 | ('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): Flows.FromString, |
| 1477 | ('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): LogicalPorts.FromString, |
| 1478 | ('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): LogicalDevices.FromString, |
| 1479 | ('voltha.VolthaLogicalLayer', 'ListSubscribers'): Subscribers.FromString, |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 1480 | ('voltha.VolthaLogicalLayer', 'ReceivePacketsIn'): PacketIn.FromString, |
| 1481 | ('voltha.VolthaLogicalLayer', 'StreamPacketsOut'): NullMessage.FromString, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1482 | ('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): NullMessage.FromString, |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1483 | ('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): NullMessage.FromString, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1484 | ('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): Subscriber.FromString, |
| 1485 | } |
| 1486 | cardinalities = { |
| 1487 | 'CreateSubscriber': cardinality.Cardinality.UNARY_UNARY, |
| 1488 | 'DeleteSubscriber': cardinality.Cardinality.UNARY_UNARY, |
| 1489 | 'GetLogicalDevice': cardinality.Cardinality.UNARY_UNARY, |
| 1490 | 'GetSubscriber': cardinality.Cardinality.UNARY_UNARY, |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1491 | 'ListDeviceFlowGroups': cardinality.Cardinality.UNARY_UNARY, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1492 | 'ListDeviceFlows': cardinality.Cardinality.UNARY_UNARY, |
| 1493 | 'ListLogicalDevicePorts': cardinality.Cardinality.UNARY_UNARY, |
| 1494 | 'ListLogicalDevices': cardinality.Cardinality.UNARY_UNARY, |
| 1495 | 'ListSubscribers': cardinality.Cardinality.UNARY_UNARY, |
Zsolt Haraszti | cd22adc | 2016-10-25 00:13:06 -0700 | [diff] [blame^] | 1496 | 'ReceivePacketsIn': cardinality.Cardinality.UNARY_STREAM, |
| 1497 | 'StreamPacketsOut': cardinality.Cardinality.STREAM_UNARY, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1498 | 'UpdateFlowTable': cardinality.Cardinality.UNARY_UNARY, |
Zsolt Haraszti | 8a77438 | 2016-10-24 18:25:54 -0700 | [diff] [blame] | 1499 | 'UpdateGroupTable': cardinality.Cardinality.UNARY_UNARY, |
Zsolt Haraszti | 023ea7c | 2016-10-16 19:30:34 -0700 | [diff] [blame] | 1500 | 'UpdateSubscriber': cardinality.Cardinality.UNARY_UNARY, |
| 1501 | } |
| 1502 | 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) |
| 1503 | return beta_implementations.dynamic_stub(channel, 'voltha.VolthaLogicalLayer', cardinalities, options=stub_options) |
| 1504 | |
| 1505 | |
| 1506 | class ExampleServiceStub(object): |
| 1507 | """(placeholder) This is an example service |
| 1508 | """ |
| 1509 | |
| 1510 | def __init__(self, channel): |
| 1511 | """Constructor. |
| 1512 | |
| 1513 | Args: |
| 1514 | channel: A grpc.Channel. |
| 1515 | """ |
| 1516 | self.CreateAddress = channel.unary_unary( |
| 1517 | '/voltha.ExampleService/CreateAddress', |
| 1518 | request_serializer=Address.SerializeToString, |
| 1519 | response_deserializer=Address.FromString, |
| 1520 | ) |
| 1521 | self.GetAddress = channel.unary_unary( |
| 1522 | '/voltha.ExampleService/GetAddress', |
| 1523 | request_serializer=ID.SerializeToString, |
| 1524 | response_deserializer=Address.FromString, |
| 1525 | ) |
| 1526 | self.UpdateAddress = channel.unary_unary( |
| 1527 | '/voltha.ExampleService/UpdateAddress', |
| 1528 | request_serializer=Address.SerializeToString, |
| 1529 | response_deserializer=Address.FromString, |
| 1530 | ) |
| 1531 | self.DeleteAddress = channel.unary_unary( |
| 1532 | '/voltha.ExampleService/DeleteAddress', |
| 1533 | request_serializer=ID.SerializeToString, |
| 1534 | response_deserializer=NullMessage.FromString, |
| 1535 | ) |
| 1536 | self.ListAddresses = channel.unary_unary( |
| 1537 | '/voltha.ExampleService/ListAddresses', |
| 1538 | request_serializer=NullMessage.SerializeToString, |
| 1539 | response_deserializer=Addresses.FromString, |
| 1540 | ) |
| 1541 | |
| 1542 | |
| 1543 | class ExampleServiceServicer(object): |
| 1544 | """(placeholder) This is an example service |
| 1545 | """ |
| 1546 | |
| 1547 | def CreateAddress(self, request, context): |
| 1548 | """Create an address record |
| 1549 | """ |
| 1550 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1551 | context.set_details('Method not implemented!') |
| 1552 | raise NotImplementedError('Method not implemented!') |
| 1553 | |
| 1554 | def GetAddress(self, request, context): |
| 1555 | """Return an address by ID |
| 1556 | """ |
| 1557 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1558 | context.set_details('Method not implemented!') |
| 1559 | raise NotImplementedError('Method not implemented!') |
| 1560 | |
| 1561 | def UpdateAddress(self, request, context): |
| 1562 | """Update an existing address record by ID |
| 1563 | """ |
| 1564 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1565 | context.set_details('Method not implemented!') |
| 1566 | raise NotImplementedError('Method not implemented!') |
| 1567 | |
| 1568 | def DeleteAddress(self, request, context): |
| 1569 | """Delete an address record by ID |
| 1570 | """ |
| 1571 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1572 | context.set_details('Method not implemented!') |
| 1573 | raise NotImplementedError('Method not implemented!') |
| 1574 | |
| 1575 | def ListAddresses(self, request, context): |
| 1576 | """Return a bit more complex objects |
| 1577 | """ |
| 1578 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1579 | context.set_details('Method not implemented!') |
| 1580 | raise NotImplementedError('Method not implemented!') |
| 1581 | |
| 1582 | |
| 1583 | def add_ExampleServiceServicer_to_server(servicer, server): |
| 1584 | rpc_method_handlers = { |
| 1585 | 'CreateAddress': grpc.unary_unary_rpc_method_handler( |
| 1586 | servicer.CreateAddress, |
| 1587 | request_deserializer=Address.FromString, |
| 1588 | response_serializer=Address.SerializeToString, |
| 1589 | ), |
| 1590 | 'GetAddress': grpc.unary_unary_rpc_method_handler( |
| 1591 | servicer.GetAddress, |
| 1592 | request_deserializer=ID.FromString, |
| 1593 | response_serializer=Address.SerializeToString, |
| 1594 | ), |
| 1595 | 'UpdateAddress': grpc.unary_unary_rpc_method_handler( |
| 1596 | servicer.UpdateAddress, |
| 1597 | request_deserializer=Address.FromString, |
| 1598 | response_serializer=Address.SerializeToString, |
| 1599 | ), |
| 1600 | 'DeleteAddress': grpc.unary_unary_rpc_method_handler( |
| 1601 | servicer.DeleteAddress, |
| 1602 | request_deserializer=ID.FromString, |
| 1603 | response_serializer=NullMessage.SerializeToString, |
| 1604 | ), |
| 1605 | 'ListAddresses': grpc.unary_unary_rpc_method_handler( |
| 1606 | servicer.ListAddresses, |
| 1607 | request_deserializer=NullMessage.FromString, |
| 1608 | response_serializer=Addresses.SerializeToString, |
| 1609 | ), |
| 1610 | } |
| 1611 | generic_handler = grpc.method_handlers_generic_handler( |
| 1612 | 'voltha.ExampleService', rpc_method_handlers) |
| 1613 | server.add_generic_rpc_handlers((generic_handler,)) |
| 1614 | |
| 1615 | |
| 1616 | class BetaExampleServiceServicer(object): |
| 1617 | """(placeholder) This is an example service |
| 1618 | """ |
| 1619 | def CreateAddress(self, request, context): |
| 1620 | """Create an address record |
| 1621 | """ |
| 1622 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1623 | def GetAddress(self, request, context): |
| 1624 | """Return an address by ID |
| 1625 | """ |
| 1626 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1627 | def UpdateAddress(self, request, context): |
| 1628 | """Update an existing address record by ID |
| 1629 | """ |
| 1630 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1631 | def DeleteAddress(self, request, context): |
| 1632 | """Delete an address record by ID |
| 1633 | """ |
| 1634 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1635 | def ListAddresses(self, request, context): |
| 1636 | """Return a bit more complex objects |
| 1637 | """ |
| 1638 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1639 | |
| 1640 | |
| 1641 | class BetaExampleServiceStub(object): |
| 1642 | """(placeholder) This is an example service |
| 1643 | """ |
| 1644 | def CreateAddress(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1645 | """Create an address record |
| 1646 | """ |
| 1647 | raise NotImplementedError() |
| 1648 | CreateAddress.future = None |
| 1649 | def GetAddress(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1650 | """Return an address by ID |
| 1651 | """ |
| 1652 | raise NotImplementedError() |
| 1653 | GetAddress.future = None |
| 1654 | def UpdateAddress(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1655 | """Update an existing address record by ID |
| 1656 | """ |
| 1657 | raise NotImplementedError() |
| 1658 | UpdateAddress.future = None |
| 1659 | def DeleteAddress(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1660 | """Delete an address record by ID |
| 1661 | """ |
| 1662 | raise NotImplementedError() |
| 1663 | DeleteAddress.future = None |
| 1664 | def ListAddresses(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1665 | """Return a bit more complex objects |
| 1666 | """ |
| 1667 | raise NotImplementedError() |
| 1668 | ListAddresses.future = None |
| 1669 | |
| 1670 | |
| 1671 | def beta_create_ExampleService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): |
| 1672 | request_deserializers = { |
| 1673 | ('voltha.ExampleService', 'CreateAddress'): Address.FromString, |
| 1674 | ('voltha.ExampleService', 'DeleteAddress'): ID.FromString, |
| 1675 | ('voltha.ExampleService', 'GetAddress'): ID.FromString, |
| 1676 | ('voltha.ExampleService', 'ListAddresses'): NullMessage.FromString, |
| 1677 | ('voltha.ExampleService', 'UpdateAddress'): Address.FromString, |
| 1678 | } |
| 1679 | response_serializers = { |
| 1680 | ('voltha.ExampleService', 'CreateAddress'): Address.SerializeToString, |
| 1681 | ('voltha.ExampleService', 'DeleteAddress'): NullMessage.SerializeToString, |
| 1682 | ('voltha.ExampleService', 'GetAddress'): Address.SerializeToString, |
| 1683 | ('voltha.ExampleService', 'ListAddresses'): Addresses.SerializeToString, |
| 1684 | ('voltha.ExampleService', 'UpdateAddress'): Address.SerializeToString, |
| 1685 | } |
| 1686 | method_implementations = { |
| 1687 | ('voltha.ExampleService', 'CreateAddress'): face_utilities.unary_unary_inline(servicer.CreateAddress), |
| 1688 | ('voltha.ExampleService', 'DeleteAddress'): face_utilities.unary_unary_inline(servicer.DeleteAddress), |
| 1689 | ('voltha.ExampleService', 'GetAddress'): face_utilities.unary_unary_inline(servicer.GetAddress), |
| 1690 | ('voltha.ExampleService', 'ListAddresses'): face_utilities.unary_unary_inline(servicer.ListAddresses), |
| 1691 | ('voltha.ExampleService', 'UpdateAddress'): face_utilities.unary_unary_inline(servicer.UpdateAddress), |
| 1692 | } |
| 1693 | 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) |
| 1694 | return beta_implementations.server(method_implementations, options=server_options) |
| 1695 | |
| 1696 | |
| 1697 | def beta_create_ExampleService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): |
| 1698 | request_serializers = { |
| 1699 | ('voltha.ExampleService', 'CreateAddress'): Address.SerializeToString, |
| 1700 | ('voltha.ExampleService', 'DeleteAddress'): ID.SerializeToString, |
| 1701 | ('voltha.ExampleService', 'GetAddress'): ID.SerializeToString, |
| 1702 | ('voltha.ExampleService', 'ListAddresses'): NullMessage.SerializeToString, |
| 1703 | ('voltha.ExampleService', 'UpdateAddress'): Address.SerializeToString, |
| 1704 | } |
| 1705 | response_deserializers = { |
| 1706 | ('voltha.ExampleService', 'CreateAddress'): Address.FromString, |
| 1707 | ('voltha.ExampleService', 'DeleteAddress'): NullMessage.FromString, |
| 1708 | ('voltha.ExampleService', 'GetAddress'): Address.FromString, |
| 1709 | ('voltha.ExampleService', 'ListAddresses'): Addresses.FromString, |
| 1710 | ('voltha.ExampleService', 'UpdateAddress'): Address.FromString, |
| 1711 | } |
| 1712 | cardinalities = { |
| 1713 | 'CreateAddress': cardinality.Cardinality.UNARY_UNARY, |
| 1714 | 'DeleteAddress': cardinality.Cardinality.UNARY_UNARY, |
| 1715 | 'GetAddress': cardinality.Cardinality.UNARY_UNARY, |
| 1716 | 'ListAddresses': cardinality.Cardinality.UNARY_UNARY, |
| 1717 | 'UpdateAddress': cardinality.Cardinality.UNARY_UNARY, |
| 1718 | } |
| 1719 | 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) |
| 1720 | return beta_implementations.dynamic_stub(channel, 'voltha.ExampleService', cardinalities, options=stub_options) |
| 1721 | |
| 1722 | |
| 1723 | class OpenFlowStub(object): |
| 1724 | |
| 1725 | def __init__(self, channel): |
| 1726 | """Constructor. |
| 1727 | |
| 1728 | Args: |
| 1729 | channel: A grpc.Channel. |
| 1730 | """ |
| 1731 | self.GetHello = channel.unary_unary( |
| 1732 | '/voltha.OpenFlow/GetHello', |
| 1733 | request_serializer=openflow__13__pb2.ofp_hello.SerializeToString, |
| 1734 | response_deserializer=openflow__13__pb2.ofp_hello.FromString, |
| 1735 | ) |
| 1736 | self.EchoRequest = channel.unary_unary( |
| 1737 | '/voltha.OpenFlow/EchoRequest', |
| 1738 | request_serializer=openflow__13__pb2.ofp_header.SerializeToString, |
| 1739 | response_deserializer=openflow__13__pb2.ofp_header.FromString, |
| 1740 | ) |
| 1741 | self.ExperimenterRequest = channel.unary_unary( |
| 1742 | '/voltha.OpenFlow/ExperimenterRequest', |
| 1743 | request_serializer=openflow__13__pb2.ofp_experimenter_header.SerializeToString, |
| 1744 | response_deserializer=openflow__13__pb2.ofp_experimenter_header.FromString, |
| 1745 | ) |
| 1746 | self.GetSwitchFeatures = channel.unary_unary( |
| 1747 | '/voltha.OpenFlow/GetSwitchFeatures', |
| 1748 | request_serializer=openflow__13__pb2.ofp_header.SerializeToString, |
| 1749 | response_deserializer=openflow__13__pb2.ofp_switch_features.FromString, |
| 1750 | ) |
| 1751 | self.GetSwitchConfig = channel.unary_unary( |
| 1752 | '/voltha.OpenFlow/GetSwitchConfig', |
| 1753 | request_serializer=openflow__13__pb2.ofp_header.SerializeToString, |
| 1754 | response_deserializer=openflow__13__pb2.ofp_switch_config.FromString, |
| 1755 | ) |
| 1756 | self.SetConfig = channel.unary_unary( |
| 1757 | '/voltha.OpenFlow/SetConfig', |
| 1758 | request_serializer=openflow__13__pb2.ofp_switch_config.SerializeToString, |
| 1759 | response_deserializer=openflow__13__pb2.ofp_header.FromString, |
| 1760 | ) |
| 1761 | self.ReceivePacketInMessages = channel.unary_stream( |
| 1762 | '/voltha.OpenFlow/ReceivePacketInMessages', |
| 1763 | request_serializer=openflow__13__pb2.ofp_header.SerializeToString, |
| 1764 | response_deserializer=openflow__13__pb2.ofp_packet_in.FromString, |
| 1765 | ) |
| 1766 | self.SendPacketOutMessages = channel.unary_unary( |
| 1767 | '/voltha.OpenFlow/SendPacketOutMessages', |
| 1768 | request_serializer=openflow__13__pb2.ofp_packet_out.SerializeToString, |
| 1769 | response_deserializer=openflow__13__pb2.ofp_header.FromString, |
| 1770 | ) |
| 1771 | |
| 1772 | |
| 1773 | class OpenFlowServicer(object): |
| 1774 | |
| 1775 | def GetHello(self, request, context): |
| 1776 | """ |
| 1777 | Hello message handshake, initiated by the client (controller) |
| 1778 | TODO http option |
| 1779 | """ |
| 1780 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1781 | context.set_details('Method not implemented!') |
| 1782 | raise NotImplementedError('Method not implemented!') |
| 1783 | |
| 1784 | def EchoRequest(self, request, context): |
| 1785 | """ |
| 1786 | Echo request / reply, initiated by the client (controller) |
| 1787 | TODO http option |
| 1788 | """ |
| 1789 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1790 | context.set_details('Method not implemented!') |
| 1791 | raise NotImplementedError('Method not implemented!') |
| 1792 | |
| 1793 | def ExperimenterRequest(self, request, context): |
| 1794 | """ |
| 1795 | Experimental (extension) RPC |
| 1796 | TODO http option |
| 1797 | """ |
| 1798 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1799 | context.set_details('Method not implemented!') |
| 1800 | raise NotImplementedError('Method not implemented!') |
| 1801 | |
| 1802 | def GetSwitchFeatures(self, request, context): |
| 1803 | """ |
| 1804 | Get Switch Features |
| 1805 | TODO http option |
| 1806 | """ |
| 1807 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1808 | context.set_details('Method not implemented!') |
| 1809 | raise NotImplementedError('Method not implemented!') |
| 1810 | |
| 1811 | def GetSwitchConfig(self, request, context): |
| 1812 | """ |
| 1813 | Get Switch Config |
| 1814 | TODO http option |
| 1815 | """ |
| 1816 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1817 | context.set_details('Method not implemented!') |
| 1818 | raise NotImplementedError('Method not implemented!') |
| 1819 | |
| 1820 | def SetConfig(self, request, context): |
| 1821 | """ |
| 1822 | Set Config |
| 1823 | TODO http option |
| 1824 | """ |
| 1825 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1826 | context.set_details('Method not implemented!') |
| 1827 | raise NotImplementedError('Method not implemented!') |
| 1828 | |
| 1829 | def ReceivePacketInMessages(self, request, context): |
| 1830 | """ |
| 1831 | Receive Packet-In messages |
| 1832 | TODO http option |
| 1833 | """ |
| 1834 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1835 | context.set_details('Method not implemented!') |
| 1836 | raise NotImplementedError('Method not implemented!') |
| 1837 | |
| 1838 | def SendPacketOutMessages(self, request, context): |
| 1839 | """ |
| 1840 | Send Packet-Out messages |
| 1841 | TODO http option |
| 1842 | """ |
| 1843 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 1844 | context.set_details('Method not implemented!') |
| 1845 | raise NotImplementedError('Method not implemented!') |
| 1846 | |
| 1847 | |
| 1848 | def add_OpenFlowServicer_to_server(servicer, server): |
| 1849 | rpc_method_handlers = { |
| 1850 | 'GetHello': grpc.unary_unary_rpc_method_handler( |
| 1851 | servicer.GetHello, |
| 1852 | request_deserializer=openflow__13__pb2.ofp_hello.FromString, |
| 1853 | response_serializer=openflow__13__pb2.ofp_hello.SerializeToString, |
| 1854 | ), |
| 1855 | 'EchoRequest': grpc.unary_unary_rpc_method_handler( |
| 1856 | servicer.EchoRequest, |
| 1857 | request_deserializer=openflow__13__pb2.ofp_header.FromString, |
| 1858 | response_serializer=openflow__13__pb2.ofp_header.SerializeToString, |
| 1859 | ), |
| 1860 | 'ExperimenterRequest': grpc.unary_unary_rpc_method_handler( |
| 1861 | servicer.ExperimenterRequest, |
| 1862 | request_deserializer=openflow__13__pb2.ofp_experimenter_header.FromString, |
| 1863 | response_serializer=openflow__13__pb2.ofp_experimenter_header.SerializeToString, |
| 1864 | ), |
| 1865 | 'GetSwitchFeatures': grpc.unary_unary_rpc_method_handler( |
| 1866 | servicer.GetSwitchFeatures, |
| 1867 | request_deserializer=openflow__13__pb2.ofp_header.FromString, |
| 1868 | response_serializer=openflow__13__pb2.ofp_switch_features.SerializeToString, |
| 1869 | ), |
| 1870 | 'GetSwitchConfig': grpc.unary_unary_rpc_method_handler( |
| 1871 | servicer.GetSwitchConfig, |
| 1872 | request_deserializer=openflow__13__pb2.ofp_header.FromString, |
| 1873 | response_serializer=openflow__13__pb2.ofp_switch_config.SerializeToString, |
| 1874 | ), |
| 1875 | 'SetConfig': grpc.unary_unary_rpc_method_handler( |
| 1876 | servicer.SetConfig, |
| 1877 | request_deserializer=openflow__13__pb2.ofp_switch_config.FromString, |
| 1878 | response_serializer=openflow__13__pb2.ofp_header.SerializeToString, |
| 1879 | ), |
| 1880 | 'ReceivePacketInMessages': grpc.unary_stream_rpc_method_handler( |
| 1881 | servicer.ReceivePacketInMessages, |
| 1882 | request_deserializer=openflow__13__pb2.ofp_header.FromString, |
| 1883 | response_serializer=openflow__13__pb2.ofp_packet_in.SerializeToString, |
| 1884 | ), |
| 1885 | 'SendPacketOutMessages': grpc.unary_unary_rpc_method_handler( |
| 1886 | servicer.SendPacketOutMessages, |
| 1887 | request_deserializer=openflow__13__pb2.ofp_packet_out.FromString, |
| 1888 | response_serializer=openflow__13__pb2.ofp_header.SerializeToString, |
| 1889 | ), |
| 1890 | } |
| 1891 | generic_handler = grpc.method_handlers_generic_handler( |
| 1892 | 'voltha.OpenFlow', rpc_method_handlers) |
| 1893 | server.add_generic_rpc_handlers((generic_handler,)) |
| 1894 | |
| 1895 | |
| 1896 | class BetaOpenFlowServicer(object): |
| 1897 | def GetHello(self, request, context): |
| 1898 | """ |
| 1899 | Hello message handshake, initiated by the client (controller) |
| 1900 | TODO http option |
| 1901 | """ |
| 1902 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1903 | def EchoRequest(self, request, context): |
| 1904 | """ |
| 1905 | Echo request / reply, initiated by the client (controller) |
| 1906 | TODO http option |
| 1907 | """ |
| 1908 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1909 | def ExperimenterRequest(self, request, context): |
| 1910 | """ |
| 1911 | Experimental (extension) RPC |
| 1912 | TODO http option |
| 1913 | """ |
| 1914 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1915 | def GetSwitchFeatures(self, request, context): |
| 1916 | """ |
| 1917 | Get Switch Features |
| 1918 | TODO http option |
| 1919 | """ |
| 1920 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1921 | def GetSwitchConfig(self, request, context): |
| 1922 | """ |
| 1923 | Get Switch Config |
| 1924 | TODO http option |
| 1925 | """ |
| 1926 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1927 | def SetConfig(self, request, context): |
| 1928 | """ |
| 1929 | Set Config |
| 1930 | TODO http option |
| 1931 | """ |
| 1932 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1933 | def ReceivePacketInMessages(self, request, context): |
| 1934 | """ |
| 1935 | Receive Packet-In messages |
| 1936 | TODO http option |
| 1937 | """ |
| 1938 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1939 | def SendPacketOutMessages(self, request, context): |
| 1940 | """ |
| 1941 | Send Packet-Out messages |
| 1942 | TODO http option |
| 1943 | """ |
| 1944 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 1945 | |
| 1946 | |
| 1947 | class BetaOpenFlowStub(object): |
| 1948 | def GetHello(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1949 | """ |
| 1950 | Hello message handshake, initiated by the client (controller) |
| 1951 | TODO http option |
| 1952 | """ |
| 1953 | raise NotImplementedError() |
| 1954 | GetHello.future = None |
| 1955 | def EchoRequest(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1956 | """ |
| 1957 | Echo request / reply, initiated by the client (controller) |
| 1958 | TODO http option |
| 1959 | """ |
| 1960 | raise NotImplementedError() |
| 1961 | EchoRequest.future = None |
| 1962 | def ExperimenterRequest(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1963 | """ |
| 1964 | Experimental (extension) RPC |
| 1965 | TODO http option |
| 1966 | """ |
| 1967 | raise NotImplementedError() |
| 1968 | ExperimenterRequest.future = None |
| 1969 | def GetSwitchFeatures(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1970 | """ |
| 1971 | Get Switch Features |
| 1972 | TODO http option |
| 1973 | """ |
| 1974 | raise NotImplementedError() |
| 1975 | GetSwitchFeatures.future = None |
| 1976 | def GetSwitchConfig(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1977 | """ |
| 1978 | Get Switch Config |
| 1979 | TODO http option |
| 1980 | """ |
| 1981 | raise NotImplementedError() |
| 1982 | GetSwitchConfig.future = None |
| 1983 | def SetConfig(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1984 | """ |
| 1985 | Set Config |
| 1986 | TODO http option |
| 1987 | """ |
| 1988 | raise NotImplementedError() |
| 1989 | SetConfig.future = None |
| 1990 | def ReceivePacketInMessages(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1991 | """ |
| 1992 | Receive Packet-In messages |
| 1993 | TODO http option |
| 1994 | """ |
| 1995 | raise NotImplementedError() |
| 1996 | def SendPacketOutMessages(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 1997 | """ |
| 1998 | Send Packet-Out messages |
| 1999 | TODO http option |
| 2000 | """ |
| 2001 | raise NotImplementedError() |
| 2002 | SendPacketOutMessages.future = None |
| 2003 | |
| 2004 | |
| 2005 | def beta_create_OpenFlow_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): |
| 2006 | request_deserializers = { |
| 2007 | ('voltha.OpenFlow', 'EchoRequest'): openflow__13__pb2.ofp_header.FromString, |
| 2008 | ('voltha.OpenFlow', 'ExperimenterRequest'): openflow__13__pb2.ofp_experimenter_header.FromString, |
| 2009 | ('voltha.OpenFlow', 'GetHello'): openflow__13__pb2.ofp_hello.FromString, |
| 2010 | ('voltha.OpenFlow', 'GetSwitchConfig'): openflow__13__pb2.ofp_header.FromString, |
| 2011 | ('voltha.OpenFlow', 'GetSwitchFeatures'): openflow__13__pb2.ofp_header.FromString, |
| 2012 | ('voltha.OpenFlow', 'ReceivePacketInMessages'): openflow__13__pb2.ofp_header.FromString, |
| 2013 | ('voltha.OpenFlow', 'SendPacketOutMessages'): openflow__13__pb2.ofp_packet_out.FromString, |
| 2014 | ('voltha.OpenFlow', 'SetConfig'): openflow__13__pb2.ofp_switch_config.FromString, |
| 2015 | } |
| 2016 | response_serializers = { |
| 2017 | ('voltha.OpenFlow', 'EchoRequest'): openflow__13__pb2.ofp_header.SerializeToString, |
| 2018 | ('voltha.OpenFlow', 'ExperimenterRequest'): openflow__13__pb2.ofp_experimenter_header.SerializeToString, |
| 2019 | ('voltha.OpenFlow', 'GetHello'): openflow__13__pb2.ofp_hello.SerializeToString, |
| 2020 | ('voltha.OpenFlow', 'GetSwitchConfig'): openflow__13__pb2.ofp_switch_config.SerializeToString, |
| 2021 | ('voltha.OpenFlow', 'GetSwitchFeatures'): openflow__13__pb2.ofp_switch_features.SerializeToString, |
| 2022 | ('voltha.OpenFlow', 'ReceivePacketInMessages'): openflow__13__pb2.ofp_packet_in.SerializeToString, |
| 2023 | ('voltha.OpenFlow', 'SendPacketOutMessages'): openflow__13__pb2.ofp_header.SerializeToString, |
| 2024 | ('voltha.OpenFlow', 'SetConfig'): openflow__13__pb2.ofp_header.SerializeToString, |
| 2025 | } |
| 2026 | method_implementations = { |
| 2027 | ('voltha.OpenFlow', 'EchoRequest'): face_utilities.unary_unary_inline(servicer.EchoRequest), |
| 2028 | ('voltha.OpenFlow', 'ExperimenterRequest'): face_utilities.unary_unary_inline(servicer.ExperimenterRequest), |
| 2029 | ('voltha.OpenFlow', 'GetHello'): face_utilities.unary_unary_inline(servicer.GetHello), |
| 2030 | ('voltha.OpenFlow', 'GetSwitchConfig'): face_utilities.unary_unary_inline(servicer.GetSwitchConfig), |
| 2031 | ('voltha.OpenFlow', 'GetSwitchFeatures'): face_utilities.unary_unary_inline(servicer.GetSwitchFeatures), |
| 2032 | ('voltha.OpenFlow', 'ReceivePacketInMessages'): face_utilities.unary_stream_inline(servicer.ReceivePacketInMessages), |
| 2033 | ('voltha.OpenFlow', 'SendPacketOutMessages'): face_utilities.unary_unary_inline(servicer.SendPacketOutMessages), |
| 2034 | ('voltha.OpenFlow', 'SetConfig'): face_utilities.unary_unary_inline(servicer.SetConfig), |
| 2035 | } |
| 2036 | 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) |
| 2037 | return beta_implementations.server(method_implementations, options=server_options) |
| 2038 | |
| 2039 | |
| 2040 | def beta_create_OpenFlow_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): |
| 2041 | request_serializers = { |
| 2042 | ('voltha.OpenFlow', 'EchoRequest'): openflow__13__pb2.ofp_header.SerializeToString, |
| 2043 | ('voltha.OpenFlow', 'ExperimenterRequest'): openflow__13__pb2.ofp_experimenter_header.SerializeToString, |
| 2044 | ('voltha.OpenFlow', 'GetHello'): openflow__13__pb2.ofp_hello.SerializeToString, |
| 2045 | ('voltha.OpenFlow', 'GetSwitchConfig'): openflow__13__pb2.ofp_header.SerializeToString, |
| 2046 | ('voltha.OpenFlow', 'GetSwitchFeatures'): openflow__13__pb2.ofp_header.SerializeToString, |
| 2047 | ('voltha.OpenFlow', 'ReceivePacketInMessages'): openflow__13__pb2.ofp_header.SerializeToString, |
| 2048 | ('voltha.OpenFlow', 'SendPacketOutMessages'): openflow__13__pb2.ofp_packet_out.SerializeToString, |
| 2049 | ('voltha.OpenFlow', 'SetConfig'): openflow__13__pb2.ofp_switch_config.SerializeToString, |
| 2050 | } |
| 2051 | response_deserializers = { |
| 2052 | ('voltha.OpenFlow', 'EchoRequest'): openflow__13__pb2.ofp_header.FromString, |
| 2053 | ('voltha.OpenFlow', 'ExperimenterRequest'): openflow__13__pb2.ofp_experimenter_header.FromString, |
| 2054 | ('voltha.OpenFlow', 'GetHello'): openflow__13__pb2.ofp_hello.FromString, |
| 2055 | ('voltha.OpenFlow', 'GetSwitchConfig'): openflow__13__pb2.ofp_switch_config.FromString, |
| 2056 | ('voltha.OpenFlow', 'GetSwitchFeatures'): openflow__13__pb2.ofp_switch_features.FromString, |
| 2057 | ('voltha.OpenFlow', 'ReceivePacketInMessages'): openflow__13__pb2.ofp_packet_in.FromString, |
| 2058 | ('voltha.OpenFlow', 'SendPacketOutMessages'): openflow__13__pb2.ofp_header.FromString, |
| 2059 | ('voltha.OpenFlow', 'SetConfig'): openflow__13__pb2.ofp_header.FromString, |
| 2060 | } |
| 2061 | cardinalities = { |
| 2062 | 'EchoRequest': cardinality.Cardinality.UNARY_UNARY, |
| 2063 | 'ExperimenterRequest': cardinality.Cardinality.UNARY_UNARY, |
| 2064 | 'GetHello': cardinality.Cardinality.UNARY_UNARY, |
| 2065 | 'GetSwitchConfig': cardinality.Cardinality.UNARY_UNARY, |
| 2066 | 'GetSwitchFeatures': cardinality.Cardinality.UNARY_UNARY, |
| 2067 | 'ReceivePacketInMessages': cardinality.Cardinality.UNARY_STREAM, |
| 2068 | 'SendPacketOutMessages': cardinality.Cardinality.UNARY_UNARY, |
| 2069 | 'SetConfig': cardinality.Cardinality.UNARY_UNARY, |
| 2070 | } |
| 2071 | 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) |
| 2072 | return beta_implementations.dynamic_stub(channel, 'voltha.OpenFlow', cardinalities, options=stub_options) |
| 2073 | # @@protoc_insertion_point(module_scope) |