blob: 27d1fa01ff8679ce19dc0716f4e6d9aec078abe6 [file] [log] [blame]
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: voltha.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
import openflow_13_pb2 as openflow__13__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='voltha.proto',
package='voltha',
syntax='proto3',
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_entry2^\n\rHealthService\x12M\n\x0fGetHealthStatus\x12\x13.voltha.NullMessage\x1a\x14.voltha.HealthStatus\"\x0f\x82\xd3\xe4\x93\x02\t\x12\x07/health2\xc5\x08\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\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')
,
dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,openflow__13__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_HEALTHSTATUS_HEALTHSTATE = _descriptor.EnumDescriptor(
name='HealthState',
full_name='voltha.HealthStatus.HealthState',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='HEALTHY', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='OVERLOADED', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='DYING', index=2, number=2,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=153,
serialized_end=206,
)
_sym_db.RegisterEnumDescriptor(_HEALTHSTATUS_HEALTHSTATE)
_NULLMESSAGE = _descriptor.Descriptor(
name='NullMessage',
full_name='voltha.NullMessage',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=73,
serialized_end=86,
)
_HEALTHSTATUS = _descriptor.Descriptor(
name='HealthStatus',
full_name='voltha.HealthStatus',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='state', full_name='voltha.HealthStatus.state', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
_HEALTHSTATUS_HEALTHSTATE,
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=88,
serialized_end=206,
)
_ADDRESS = _descriptor.Descriptor(
name='Address',
full_name='voltha.Address',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='voltha.Address.id', index=0,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='street', full_name='voltha.Address.street', index=1,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='street2', full_name='voltha.Address.street2', index=2,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='street3', full_name='voltha.Address.street3', index=3,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='city', full_name='voltha.Address.city', index=4,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='state', full_name='voltha.Address.state', index=5,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='zip', full_name='voltha.Address.zip', index=6,
number=6, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=208,
serialized_end=321,
)
_ADDRESSES = _descriptor.Descriptor(
name='Addresses',
full_name='voltha.Addresses',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='addresses', full_name='voltha.Addresses.addresses', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=323,
serialized_end=370,
)
_MORECOMPLEX = _descriptor.Descriptor(
name='MoreComplex',
full_name='voltha.MoreComplex',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='health', full_name='voltha.MoreComplex.health', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='foo_counter', full_name='voltha.MoreComplex.foo_counter', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='name', full_name='voltha.MoreComplex.name', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='children', full_name='voltha.MoreComplex.children', index=3,
number=4, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='address', full_name='voltha.MoreComplex.address', index=4,
number=5, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=373,
serialized_end=532,
)
_ID = _descriptor.Descriptor(
name='ID',
full_name='voltha.ID',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='voltha.ID.id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=534,
serialized_end=550,
)
_SUBSCRIBER = _descriptor.Descriptor(
name='Subscriber',
full_name='voltha.Subscriber',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='voltha.Subscriber.id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=552,
serialized_end=576,
)
_SUBSCRIBERS = _descriptor.Descriptor(
name='Subscribers',
full_name='voltha.Subscribers',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='items', full_name='voltha.Subscribers.items', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=578,
serialized_end=626,
)
_LOGICALDEVICE = _descriptor.Descriptor(
name='LogicalDevice',
full_name='voltha.LogicalDevice',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='voltha.LogicalDevice.id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='datapath_id', full_name='voltha.LogicalDevice.datapath_id', index=1,
number=2, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='desc', full_name='voltha.LogicalDevice.desc', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=628,
serialized_end=713,
)
_LOGICALDEVICES = _descriptor.Descriptor(
name='LogicalDevices',
full_name='voltha.LogicalDevices',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='items', full_name='voltha.LogicalDevices.items', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=715,
serialized_end=769,
)
_LOGICALPORTS = _descriptor.Descriptor(
name='LogicalPorts',
full_name='voltha.LogicalPorts',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='items', full_name='voltha.LogicalPorts.items', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=771,
serialized_end=823,
)
_LOGICALDEVICEDETAILS = _descriptor.Descriptor(
name='LogicalDeviceDetails',
full_name='voltha.LogicalDeviceDetails',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='voltha.LogicalDeviceDetails.id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='datapath_id', full_name='voltha.LogicalDeviceDetails.datapath_id', index=1,
number=2, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='desc', full_name='voltha.LogicalDeviceDetails.desc', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='switch_features', full_name='voltha.LogicalDeviceDetails.switch_features', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=826,
serialized_end=977,
)
_FLOWTABLEUPDATE = _descriptor.Descriptor(
name='FlowTableUpdate',
full_name='voltha.FlowTableUpdate',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='voltha.FlowTableUpdate.id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='flow_mod', full_name='voltha.FlowTableUpdate.flow_mod', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=979,
serialized_end=1053,
)
_GROUPTABLEUPDATE = _descriptor.Descriptor(
name='GroupTableUpdate',
full_name='voltha.GroupTableUpdate',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='voltha.GroupTableUpdate.id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='group_mod', full_name='voltha.GroupTableUpdate.group_mod', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1055,
serialized_end=1132,
)
_FLOWS = _descriptor.Descriptor(
name='Flows',
full_name='voltha.Flows',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='items', full_name='voltha.Flows.items', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1134,
serialized_end=1185,
)
_FLOWGROUPS = _descriptor.Descriptor(
name='FlowGroups',
full_name='voltha.FlowGroups',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='items', full_name='voltha.FlowGroups.items', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1187,
serialized_end=1244,
)
_HEALTHSTATUS.fields_by_name['state'].enum_type = _HEALTHSTATUS_HEALTHSTATE
_HEALTHSTATUS_HEALTHSTATE.containing_type = _HEALTHSTATUS
_ADDRESSES.fields_by_name['addresses'].message_type = _ADDRESS
_MORECOMPLEX.fields_by_name['health'].message_type = _HEALTHSTATUS
_MORECOMPLEX.fields_by_name['children'].message_type = _MORECOMPLEX
_MORECOMPLEX.fields_by_name['address'].message_type = _ADDRESS
_SUBSCRIBERS.fields_by_name['items'].message_type = _SUBSCRIBER
_LOGICALDEVICE.fields_by_name['desc'].message_type = openflow__13__pb2._OFP_DESC
_LOGICALDEVICES.fields_by_name['items'].message_type = _LOGICALDEVICE
_LOGICALPORTS.fields_by_name['items'].message_type = openflow__13__pb2._OFP_PORT
_LOGICALDEVICEDETAILS.fields_by_name['desc'].message_type = openflow__13__pb2._OFP_DESC
_LOGICALDEVICEDETAILS.fields_by_name['switch_features'].message_type = openflow__13__pb2._OFP_SWITCH_FEATURES
_FLOWTABLEUPDATE.fields_by_name['flow_mod'].message_type = openflow__13__pb2._OFP_FLOW_MOD
_GROUPTABLEUPDATE.fields_by_name['group_mod'].message_type = openflow__13__pb2._OFP_GROUP_MOD
_FLOWS.fields_by_name['items'].message_type = openflow__13__pb2._OFP_FLOW_STATS
_FLOWGROUPS.fields_by_name['items'].message_type = openflow__13__pb2._OFP_GROUP_ENTRY
DESCRIPTOR.message_types_by_name['NullMessage'] = _NULLMESSAGE
DESCRIPTOR.message_types_by_name['HealthStatus'] = _HEALTHSTATUS
DESCRIPTOR.message_types_by_name['Address'] = _ADDRESS
DESCRIPTOR.message_types_by_name['Addresses'] = _ADDRESSES
DESCRIPTOR.message_types_by_name['MoreComplex'] = _MORECOMPLEX
DESCRIPTOR.message_types_by_name['ID'] = _ID
DESCRIPTOR.message_types_by_name['Subscriber'] = _SUBSCRIBER
DESCRIPTOR.message_types_by_name['Subscribers'] = _SUBSCRIBERS
DESCRIPTOR.message_types_by_name['LogicalDevice'] = _LOGICALDEVICE
DESCRIPTOR.message_types_by_name['LogicalDevices'] = _LOGICALDEVICES
DESCRIPTOR.message_types_by_name['LogicalPorts'] = _LOGICALPORTS
DESCRIPTOR.message_types_by_name['LogicalDeviceDetails'] = _LOGICALDEVICEDETAILS
DESCRIPTOR.message_types_by_name['FlowTableUpdate'] = _FLOWTABLEUPDATE
DESCRIPTOR.message_types_by_name['GroupTableUpdate'] = _GROUPTABLEUPDATE
DESCRIPTOR.message_types_by_name['Flows'] = _FLOWS
DESCRIPTOR.message_types_by_name['FlowGroups'] = _FLOWGROUPS
NullMessage = _reflection.GeneratedProtocolMessageType('NullMessage', (_message.Message,), dict(
DESCRIPTOR = _NULLMESSAGE,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.NullMessage)
))
_sym_db.RegisterMessage(NullMessage)
HealthStatus = _reflection.GeneratedProtocolMessageType('HealthStatus', (_message.Message,), dict(
DESCRIPTOR = _HEALTHSTATUS,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.HealthStatus)
))
_sym_db.RegisterMessage(HealthStatus)
Address = _reflection.GeneratedProtocolMessageType('Address', (_message.Message,), dict(
DESCRIPTOR = _ADDRESS,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.Address)
))
_sym_db.RegisterMessage(Address)
Addresses = _reflection.GeneratedProtocolMessageType('Addresses', (_message.Message,), dict(
DESCRIPTOR = _ADDRESSES,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.Addresses)
))
_sym_db.RegisterMessage(Addresses)
MoreComplex = _reflection.GeneratedProtocolMessageType('MoreComplex', (_message.Message,), dict(
DESCRIPTOR = _MORECOMPLEX,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.MoreComplex)
))
_sym_db.RegisterMessage(MoreComplex)
ID = _reflection.GeneratedProtocolMessageType('ID', (_message.Message,), dict(
DESCRIPTOR = _ID,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.ID)
))
_sym_db.RegisterMessage(ID)
Subscriber = _reflection.GeneratedProtocolMessageType('Subscriber', (_message.Message,), dict(
DESCRIPTOR = _SUBSCRIBER,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.Subscriber)
))
_sym_db.RegisterMessage(Subscriber)
Subscribers = _reflection.GeneratedProtocolMessageType('Subscribers', (_message.Message,), dict(
DESCRIPTOR = _SUBSCRIBERS,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.Subscribers)
))
_sym_db.RegisterMessage(Subscribers)
LogicalDevice = _reflection.GeneratedProtocolMessageType('LogicalDevice', (_message.Message,), dict(
DESCRIPTOR = _LOGICALDEVICE,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.LogicalDevice)
))
_sym_db.RegisterMessage(LogicalDevice)
LogicalDevices = _reflection.GeneratedProtocolMessageType('LogicalDevices', (_message.Message,), dict(
DESCRIPTOR = _LOGICALDEVICES,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.LogicalDevices)
))
_sym_db.RegisterMessage(LogicalDevices)
LogicalPorts = _reflection.GeneratedProtocolMessageType('LogicalPorts', (_message.Message,), dict(
DESCRIPTOR = _LOGICALPORTS,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.LogicalPorts)
))
_sym_db.RegisterMessage(LogicalPorts)
LogicalDeviceDetails = _reflection.GeneratedProtocolMessageType('LogicalDeviceDetails', (_message.Message,), dict(
DESCRIPTOR = _LOGICALDEVICEDETAILS,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.LogicalDeviceDetails)
))
_sym_db.RegisterMessage(LogicalDeviceDetails)
FlowTableUpdate = _reflection.GeneratedProtocolMessageType('FlowTableUpdate', (_message.Message,), dict(
DESCRIPTOR = _FLOWTABLEUPDATE,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.FlowTableUpdate)
))
_sym_db.RegisterMessage(FlowTableUpdate)
GroupTableUpdate = _reflection.GeneratedProtocolMessageType('GroupTableUpdate', (_message.Message,), dict(
DESCRIPTOR = _GROUPTABLEUPDATE,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.GroupTableUpdate)
))
_sym_db.RegisterMessage(GroupTableUpdate)
Flows = _reflection.GeneratedProtocolMessageType('Flows', (_message.Message,), dict(
DESCRIPTOR = _FLOWS,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.Flows)
))
_sym_db.RegisterMessage(Flows)
FlowGroups = _reflection.GeneratedProtocolMessageType('FlowGroups', (_message.Message,), dict(
DESCRIPTOR = _FLOWGROUPS,
__module__ = 'voltha_pb2'
# @@protoc_insertion_point(class_scope:voltha.FlowGroups)
))
_sym_db.RegisterMessage(FlowGroups)
DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\023org.opencord.volthaB\014VolthaProtos\252\002\026Opencord.Voltha.Voltha'))
import grpc
from grpc.beta import implementations as beta_implementations
from grpc.beta import interfaces as beta_interfaces
from grpc.framework.common import cardinality
from grpc.framework.interfaces.face import utilities as face_utilities
class HealthServiceStub(object):
"""Health related services
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetHealthStatus = channel.unary_unary(
'/voltha.HealthService/GetHealthStatus',
request_serializer=NullMessage.SerializeToString,
response_deserializer=HealthStatus.FromString,
)
class HealthServiceServicer(object):
"""Health related services
"""
def GetHealthStatus(self, request, context):
"""Return current health status of a Voltha instance
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_HealthServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetHealthStatus': grpc.unary_unary_rpc_method_handler(
servicer.GetHealthStatus,
request_deserializer=NullMessage.FromString,
response_serializer=HealthStatus.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'voltha.HealthService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
class BetaHealthServiceServicer(object):
"""Health related services
"""
def GetHealthStatus(self, request, context):
"""Return current health status of a Voltha instance
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
class BetaHealthServiceStub(object):
"""Health related services
"""
def GetHealthStatus(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Return current health status of a Voltha instance
"""
raise NotImplementedError()
GetHealthStatus.future = None
def beta_create_HealthService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
request_deserializers = {
('voltha.HealthService', 'GetHealthStatus'): NullMessage.FromString,
}
response_serializers = {
('voltha.HealthService', 'GetHealthStatus'): HealthStatus.SerializeToString,
}
method_implementations = {
('voltha.HealthService', 'GetHealthStatus'): face_utilities.unary_unary_inline(servicer.GetHealthStatus),
}
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)
return beta_implementations.server(method_implementations, options=server_options)
def beta_create_HealthService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
request_serializers = {
('voltha.HealthService', 'GetHealthStatus'): NullMessage.SerializeToString,
}
response_deserializers = {
('voltha.HealthService', 'GetHealthStatus'): HealthStatus.FromString,
}
cardinalities = {
'GetHealthStatus': cardinality.Cardinality.UNARY_UNARY,
}
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)
return beta_implementations.dynamic_stub(channel, 'voltha.HealthService', cardinalities, options=stub_options)
class VolthaLogicalLayerStub(object):
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.ListLogicalDevices = channel.unary_unary(
'/voltha.VolthaLogicalLayer/ListLogicalDevices',
request_serializer=NullMessage.SerializeToString,
response_deserializer=LogicalDevices.FromString,
)
self.GetLogicalDevice = channel.unary_unary(
'/voltha.VolthaLogicalLayer/GetLogicalDevice',
request_serializer=ID.SerializeToString,
response_deserializer=LogicalDeviceDetails.FromString,
)
self.ListLogicalDevicePorts = channel.unary_unary(
'/voltha.VolthaLogicalLayer/ListLogicalDevicePorts',
request_serializer=ID.SerializeToString,
response_deserializer=LogicalPorts.FromString,
)
self.UpdateFlowTable = channel.unary_unary(
'/voltha.VolthaLogicalLayer/UpdateFlowTable',
request_serializer=FlowTableUpdate.SerializeToString,
response_deserializer=NullMessage.FromString,
)
self.ListDeviceFlows = channel.unary_unary(
'/voltha.VolthaLogicalLayer/ListDeviceFlows',
request_serializer=ID.SerializeToString,
response_deserializer=Flows.FromString,
)
self.UpdateGroupTable = channel.unary_unary(
'/voltha.VolthaLogicalLayer/UpdateGroupTable',
request_serializer=GroupTableUpdate.SerializeToString,
response_deserializer=NullMessage.FromString,
)
self.ListDeviceFlowGroups = channel.unary_unary(
'/voltha.VolthaLogicalLayer/ListDeviceFlowGroups',
request_serializer=ID.SerializeToString,
response_deserializer=FlowGroups.FromString,
)
self.CreateSubscriber = channel.unary_unary(
'/voltha.VolthaLogicalLayer/CreateSubscriber',
request_serializer=Subscriber.SerializeToString,
response_deserializer=Subscriber.FromString,
)
self.GetSubscriber = channel.unary_unary(
'/voltha.VolthaLogicalLayer/GetSubscriber',
request_serializer=ID.SerializeToString,
response_deserializer=Subscriber.FromString,
)
self.UpdateSubscriber = channel.unary_unary(
'/voltha.VolthaLogicalLayer/UpdateSubscriber',
request_serializer=Subscriber.SerializeToString,
response_deserializer=Subscriber.FromString,
)
self.DeleteSubscriber = channel.unary_unary(
'/voltha.VolthaLogicalLayer/DeleteSubscriber',
request_serializer=ID.SerializeToString,
response_deserializer=NullMessage.FromString,
)
self.ListSubscribers = channel.unary_unary(
'/voltha.VolthaLogicalLayer/ListSubscribers',
request_serializer=NullMessage.SerializeToString,
response_deserializer=Subscribers.FromString,
)
class VolthaLogicalLayerServicer(object):
def ListLogicalDevices(self, request, context):
"""List logical devices owned by this Voltha instance
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetLogicalDevice(self, request, context):
"""Get detailed info on logical device owned by this Voltha instance
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ListLogicalDevicePorts(self, request, context):
"""List ports of a logical device
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateFlowTable(self, request, context):
"""Update flow table for device
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ListDeviceFlows(self, request, context):
"""List all flows of a logical device
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateGroupTable(self, request, context):
"""Update group tabel for device
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ListDeviceFlowGroups(self, request, context):
"""List all flow groups of a logical device
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def CreateSubscriber(self, request, context):
"""Create a subscriber record
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetSubscriber(self, request, context):
"""Return an subscriber by ID
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateSubscriber(self, request, context):
"""Update an existing subscriber record by ID
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DeleteSubscriber(self, request, context):
"""Delete a subscriber record by ID
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ListSubscribers(self, request, context):
"""List subscribers
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_VolthaLogicalLayerServicer_to_server(servicer, server):
rpc_method_handlers = {
'ListLogicalDevices': grpc.unary_unary_rpc_method_handler(
servicer.ListLogicalDevices,
request_deserializer=NullMessage.FromString,
response_serializer=LogicalDevices.SerializeToString,
),
'GetLogicalDevice': grpc.unary_unary_rpc_method_handler(
servicer.GetLogicalDevice,
request_deserializer=ID.FromString,
response_serializer=LogicalDeviceDetails.SerializeToString,
),
'ListLogicalDevicePorts': grpc.unary_unary_rpc_method_handler(
servicer.ListLogicalDevicePorts,
request_deserializer=ID.FromString,
response_serializer=LogicalPorts.SerializeToString,
),
'UpdateFlowTable': grpc.unary_unary_rpc_method_handler(
servicer.UpdateFlowTable,
request_deserializer=FlowTableUpdate.FromString,
response_serializer=NullMessage.SerializeToString,
),
'ListDeviceFlows': grpc.unary_unary_rpc_method_handler(
servicer.ListDeviceFlows,
request_deserializer=ID.FromString,
response_serializer=Flows.SerializeToString,
),
'UpdateGroupTable': grpc.unary_unary_rpc_method_handler(
servicer.UpdateGroupTable,
request_deserializer=GroupTableUpdate.FromString,
response_serializer=NullMessage.SerializeToString,
),
'ListDeviceFlowGroups': grpc.unary_unary_rpc_method_handler(
servicer.ListDeviceFlowGroups,
request_deserializer=ID.FromString,
response_serializer=FlowGroups.SerializeToString,
),
'CreateSubscriber': grpc.unary_unary_rpc_method_handler(
servicer.CreateSubscriber,
request_deserializer=Subscriber.FromString,
response_serializer=Subscriber.SerializeToString,
),
'GetSubscriber': grpc.unary_unary_rpc_method_handler(
servicer.GetSubscriber,
request_deserializer=ID.FromString,
response_serializer=Subscriber.SerializeToString,
),
'UpdateSubscriber': grpc.unary_unary_rpc_method_handler(
servicer.UpdateSubscriber,
request_deserializer=Subscriber.FromString,
response_serializer=Subscriber.SerializeToString,
),
'DeleteSubscriber': grpc.unary_unary_rpc_method_handler(
servicer.DeleteSubscriber,
request_deserializer=ID.FromString,
response_serializer=NullMessage.SerializeToString,
),
'ListSubscribers': grpc.unary_unary_rpc_method_handler(
servicer.ListSubscribers,
request_deserializer=NullMessage.FromString,
response_serializer=Subscribers.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'voltha.VolthaLogicalLayer', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
class BetaVolthaLogicalLayerServicer(object):
def ListLogicalDevices(self, request, context):
"""List logical devices owned by this Voltha instance
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetLogicalDevice(self, request, context):
"""Get detailed info on logical device owned by this Voltha instance
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def ListLogicalDevicePorts(self, request, context):
"""List ports of a logical device
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def UpdateFlowTable(self, request, context):
"""Update flow table for device
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def ListDeviceFlows(self, request, context):
"""List all flows of a logical device
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def UpdateGroupTable(self, request, context):
"""Update group tabel for device
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def ListDeviceFlowGroups(self, request, context):
"""List all flow groups of a logical device
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def CreateSubscriber(self, request, context):
"""Create a subscriber record
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetSubscriber(self, request, context):
"""Return an subscriber by ID
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def UpdateSubscriber(self, request, context):
"""Update an existing subscriber record by ID
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def DeleteSubscriber(self, request, context):
"""Delete a subscriber record by ID
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def ListSubscribers(self, request, context):
"""List subscribers
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
class BetaVolthaLogicalLayerStub(object):
def ListLogicalDevices(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""List logical devices owned by this Voltha instance
"""
raise NotImplementedError()
ListLogicalDevices.future = None
def GetLogicalDevice(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Get detailed info on logical device owned by this Voltha instance
"""
raise NotImplementedError()
GetLogicalDevice.future = None
def ListLogicalDevicePorts(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""List ports of a logical device
"""
raise NotImplementedError()
ListLogicalDevicePorts.future = None
def UpdateFlowTable(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Update flow table for device
"""
raise NotImplementedError()
UpdateFlowTable.future = None
def ListDeviceFlows(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""List all flows of a logical device
"""
raise NotImplementedError()
ListDeviceFlows.future = None
def UpdateGroupTable(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Update group tabel for device
"""
raise NotImplementedError()
UpdateGroupTable.future = None
def ListDeviceFlowGroups(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""List all flow groups of a logical device
"""
raise NotImplementedError()
ListDeviceFlowGroups.future = None
def CreateSubscriber(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Create a subscriber record
"""
raise NotImplementedError()
CreateSubscriber.future = None
def GetSubscriber(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Return an subscriber by ID
"""
raise NotImplementedError()
GetSubscriber.future = None
def UpdateSubscriber(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Update an existing subscriber record by ID
"""
raise NotImplementedError()
UpdateSubscriber.future = None
def DeleteSubscriber(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Delete a subscriber record by ID
"""
raise NotImplementedError()
DeleteSubscriber.future = None
def ListSubscribers(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""List subscribers
"""
raise NotImplementedError()
ListSubscribers.future = None
def beta_create_VolthaLogicalLayer_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
request_deserializers = {
('voltha.VolthaLogicalLayer', 'CreateSubscriber'): Subscriber.FromString,
('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): ID.FromString,
('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): ID.FromString,
('voltha.VolthaLogicalLayer', 'GetSubscriber'): ID.FromString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlowGroups'): ID.FromString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): ID.FromString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): ID.FromString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): NullMessage.FromString,
('voltha.VolthaLogicalLayer', 'ListSubscribers'): NullMessage.FromString,
('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): FlowTableUpdate.FromString,
('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): GroupTableUpdate.FromString,
('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): Subscriber.FromString,
}
response_serializers = {
('voltha.VolthaLogicalLayer', 'CreateSubscriber'): Subscriber.SerializeToString,
('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): NullMessage.SerializeToString,
('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): LogicalDeviceDetails.SerializeToString,
('voltha.VolthaLogicalLayer', 'GetSubscriber'): Subscriber.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlowGroups'): FlowGroups.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): Flows.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): LogicalPorts.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): LogicalDevices.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListSubscribers'): Subscribers.SerializeToString,
('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): NullMessage.SerializeToString,
('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): NullMessage.SerializeToString,
('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): Subscriber.SerializeToString,
}
method_implementations = {
('voltha.VolthaLogicalLayer', 'CreateSubscriber'): face_utilities.unary_unary_inline(servicer.CreateSubscriber),
('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): face_utilities.unary_unary_inline(servicer.DeleteSubscriber),
('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): face_utilities.unary_unary_inline(servicer.GetLogicalDevice),
('voltha.VolthaLogicalLayer', 'GetSubscriber'): face_utilities.unary_unary_inline(servicer.GetSubscriber),
('voltha.VolthaLogicalLayer', 'ListDeviceFlowGroups'): face_utilities.unary_unary_inline(servicer.ListDeviceFlowGroups),
('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): face_utilities.unary_unary_inline(servicer.ListDeviceFlows),
('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): face_utilities.unary_unary_inline(servicer.ListLogicalDevicePorts),
('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): face_utilities.unary_unary_inline(servicer.ListLogicalDevices),
('voltha.VolthaLogicalLayer', 'ListSubscribers'): face_utilities.unary_unary_inline(servicer.ListSubscribers),
('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): face_utilities.unary_unary_inline(servicer.UpdateFlowTable),
('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): face_utilities.unary_unary_inline(servicer.UpdateGroupTable),
('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): face_utilities.unary_unary_inline(servicer.UpdateSubscriber),
}
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)
return beta_implementations.server(method_implementations, options=server_options)
def beta_create_VolthaLogicalLayer_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
request_serializers = {
('voltha.VolthaLogicalLayer', 'CreateSubscriber'): Subscriber.SerializeToString,
('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): ID.SerializeToString,
('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): ID.SerializeToString,
('voltha.VolthaLogicalLayer', 'GetSubscriber'): ID.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlowGroups'): ID.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): ID.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): ID.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): NullMessage.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListSubscribers'): NullMessage.SerializeToString,
('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): FlowTableUpdate.SerializeToString,
('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): GroupTableUpdate.SerializeToString,
('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): Subscriber.SerializeToString,
}
response_deserializers = {
('voltha.VolthaLogicalLayer', 'CreateSubscriber'): Subscriber.FromString,
('voltha.VolthaLogicalLayer', 'DeleteSubscriber'): NullMessage.FromString,
('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): LogicalDeviceDetails.FromString,
('voltha.VolthaLogicalLayer', 'GetSubscriber'): Subscriber.FromString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlowGroups'): FlowGroups.FromString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): Flows.FromString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): LogicalPorts.FromString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): LogicalDevices.FromString,
('voltha.VolthaLogicalLayer', 'ListSubscribers'): Subscribers.FromString,
('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): NullMessage.FromString,
('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): NullMessage.FromString,
('voltha.VolthaLogicalLayer', 'UpdateSubscriber'): Subscriber.FromString,
}
cardinalities = {
'CreateSubscriber': cardinality.Cardinality.UNARY_UNARY,
'DeleteSubscriber': cardinality.Cardinality.UNARY_UNARY,
'GetLogicalDevice': cardinality.Cardinality.UNARY_UNARY,
'GetSubscriber': cardinality.Cardinality.UNARY_UNARY,
'ListDeviceFlowGroups': cardinality.Cardinality.UNARY_UNARY,
'ListDeviceFlows': cardinality.Cardinality.UNARY_UNARY,
'ListLogicalDevicePorts': cardinality.Cardinality.UNARY_UNARY,
'ListLogicalDevices': cardinality.Cardinality.UNARY_UNARY,
'ListSubscribers': cardinality.Cardinality.UNARY_UNARY,
'UpdateFlowTable': cardinality.Cardinality.UNARY_UNARY,
'UpdateGroupTable': cardinality.Cardinality.UNARY_UNARY,
'UpdateSubscriber': cardinality.Cardinality.UNARY_UNARY,
}
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)
return beta_implementations.dynamic_stub(channel, 'voltha.VolthaLogicalLayer', cardinalities, options=stub_options)
class ExampleServiceStub(object):
"""(placeholder) This is an example service
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.CreateAddress = channel.unary_unary(
'/voltha.ExampleService/CreateAddress',
request_serializer=Address.SerializeToString,
response_deserializer=Address.FromString,
)
self.GetAddress = channel.unary_unary(
'/voltha.ExampleService/GetAddress',
request_serializer=ID.SerializeToString,
response_deserializer=Address.FromString,
)
self.UpdateAddress = channel.unary_unary(
'/voltha.ExampleService/UpdateAddress',
request_serializer=Address.SerializeToString,
response_deserializer=Address.FromString,
)
self.DeleteAddress = channel.unary_unary(
'/voltha.ExampleService/DeleteAddress',
request_serializer=ID.SerializeToString,
response_deserializer=NullMessage.FromString,
)
self.ListAddresses = channel.unary_unary(
'/voltha.ExampleService/ListAddresses',
request_serializer=NullMessage.SerializeToString,
response_deserializer=Addresses.FromString,
)
class ExampleServiceServicer(object):
"""(placeholder) This is an example service
"""
def CreateAddress(self, request, context):
"""Create an address record
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetAddress(self, request, context):
"""Return an address by ID
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateAddress(self, request, context):
"""Update an existing address record by ID
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DeleteAddress(self, request, context):
"""Delete an address record by ID
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ListAddresses(self, request, context):
"""Return a bit more complex objects
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_ExampleServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'CreateAddress': grpc.unary_unary_rpc_method_handler(
servicer.CreateAddress,
request_deserializer=Address.FromString,
response_serializer=Address.SerializeToString,
),
'GetAddress': grpc.unary_unary_rpc_method_handler(
servicer.GetAddress,
request_deserializer=ID.FromString,
response_serializer=Address.SerializeToString,
),
'UpdateAddress': grpc.unary_unary_rpc_method_handler(
servicer.UpdateAddress,
request_deserializer=Address.FromString,
response_serializer=Address.SerializeToString,
),
'DeleteAddress': grpc.unary_unary_rpc_method_handler(
servicer.DeleteAddress,
request_deserializer=ID.FromString,
response_serializer=NullMessage.SerializeToString,
),
'ListAddresses': grpc.unary_unary_rpc_method_handler(
servicer.ListAddresses,
request_deserializer=NullMessage.FromString,
response_serializer=Addresses.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'voltha.ExampleService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
class BetaExampleServiceServicer(object):
"""(placeholder) This is an example service
"""
def CreateAddress(self, request, context):
"""Create an address record
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetAddress(self, request, context):
"""Return an address by ID
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def UpdateAddress(self, request, context):
"""Update an existing address record by ID
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def DeleteAddress(self, request, context):
"""Delete an address record by ID
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def ListAddresses(self, request, context):
"""Return a bit more complex objects
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
class BetaExampleServiceStub(object):
"""(placeholder) This is an example service
"""
def CreateAddress(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Create an address record
"""
raise NotImplementedError()
CreateAddress.future = None
def GetAddress(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Return an address by ID
"""
raise NotImplementedError()
GetAddress.future = None
def UpdateAddress(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Update an existing address record by ID
"""
raise NotImplementedError()
UpdateAddress.future = None
def DeleteAddress(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Delete an address record by ID
"""
raise NotImplementedError()
DeleteAddress.future = None
def ListAddresses(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Return a bit more complex objects
"""
raise NotImplementedError()
ListAddresses.future = None
def beta_create_ExampleService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
request_deserializers = {
('voltha.ExampleService', 'CreateAddress'): Address.FromString,
('voltha.ExampleService', 'DeleteAddress'): ID.FromString,
('voltha.ExampleService', 'GetAddress'): ID.FromString,
('voltha.ExampleService', 'ListAddresses'): NullMessage.FromString,
('voltha.ExampleService', 'UpdateAddress'): Address.FromString,
}
response_serializers = {
('voltha.ExampleService', 'CreateAddress'): Address.SerializeToString,
('voltha.ExampleService', 'DeleteAddress'): NullMessage.SerializeToString,
('voltha.ExampleService', 'GetAddress'): Address.SerializeToString,
('voltha.ExampleService', 'ListAddresses'): Addresses.SerializeToString,
('voltha.ExampleService', 'UpdateAddress'): Address.SerializeToString,
}
method_implementations = {
('voltha.ExampleService', 'CreateAddress'): face_utilities.unary_unary_inline(servicer.CreateAddress),
('voltha.ExampleService', 'DeleteAddress'): face_utilities.unary_unary_inline(servicer.DeleteAddress),
('voltha.ExampleService', 'GetAddress'): face_utilities.unary_unary_inline(servicer.GetAddress),
('voltha.ExampleService', 'ListAddresses'): face_utilities.unary_unary_inline(servicer.ListAddresses),
('voltha.ExampleService', 'UpdateAddress'): face_utilities.unary_unary_inline(servicer.UpdateAddress),
}
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)
return beta_implementations.server(method_implementations, options=server_options)
def beta_create_ExampleService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
request_serializers = {
('voltha.ExampleService', 'CreateAddress'): Address.SerializeToString,
('voltha.ExampleService', 'DeleteAddress'): ID.SerializeToString,
('voltha.ExampleService', 'GetAddress'): ID.SerializeToString,
('voltha.ExampleService', 'ListAddresses'): NullMessage.SerializeToString,
('voltha.ExampleService', 'UpdateAddress'): Address.SerializeToString,
}
response_deserializers = {
('voltha.ExampleService', 'CreateAddress'): Address.FromString,
('voltha.ExampleService', 'DeleteAddress'): NullMessage.FromString,
('voltha.ExampleService', 'GetAddress'): Address.FromString,
('voltha.ExampleService', 'ListAddresses'): Addresses.FromString,
('voltha.ExampleService', 'UpdateAddress'): Address.FromString,
}
cardinalities = {
'CreateAddress': cardinality.Cardinality.UNARY_UNARY,
'DeleteAddress': cardinality.Cardinality.UNARY_UNARY,
'GetAddress': cardinality.Cardinality.UNARY_UNARY,
'ListAddresses': cardinality.Cardinality.UNARY_UNARY,
'UpdateAddress': cardinality.Cardinality.UNARY_UNARY,
}
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)
return beta_implementations.dynamic_stub(channel, 'voltha.ExampleService', cardinalities, options=stub_options)
class OpenFlowStub(object):
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetHello = channel.unary_unary(
'/voltha.OpenFlow/GetHello',
request_serializer=openflow__13__pb2.ofp_hello.SerializeToString,
response_deserializer=openflow__13__pb2.ofp_hello.FromString,
)
self.EchoRequest = channel.unary_unary(
'/voltha.OpenFlow/EchoRequest',
request_serializer=openflow__13__pb2.ofp_header.SerializeToString,
response_deserializer=openflow__13__pb2.ofp_header.FromString,
)
self.ExperimenterRequest = channel.unary_unary(
'/voltha.OpenFlow/ExperimenterRequest',
request_serializer=openflow__13__pb2.ofp_experimenter_header.SerializeToString,
response_deserializer=openflow__13__pb2.ofp_experimenter_header.FromString,
)
self.GetSwitchFeatures = channel.unary_unary(
'/voltha.OpenFlow/GetSwitchFeatures',
request_serializer=openflow__13__pb2.ofp_header.SerializeToString,
response_deserializer=openflow__13__pb2.ofp_switch_features.FromString,
)
self.GetSwitchConfig = channel.unary_unary(
'/voltha.OpenFlow/GetSwitchConfig',
request_serializer=openflow__13__pb2.ofp_header.SerializeToString,
response_deserializer=openflow__13__pb2.ofp_switch_config.FromString,
)
self.SetConfig = channel.unary_unary(
'/voltha.OpenFlow/SetConfig',
request_serializer=openflow__13__pb2.ofp_switch_config.SerializeToString,
response_deserializer=openflow__13__pb2.ofp_header.FromString,
)
self.ReceivePacketInMessages = channel.unary_stream(
'/voltha.OpenFlow/ReceivePacketInMessages',
request_serializer=openflow__13__pb2.ofp_header.SerializeToString,
response_deserializer=openflow__13__pb2.ofp_packet_in.FromString,
)
self.SendPacketOutMessages = channel.unary_unary(
'/voltha.OpenFlow/SendPacketOutMessages',
request_serializer=openflow__13__pb2.ofp_packet_out.SerializeToString,
response_deserializer=openflow__13__pb2.ofp_header.FromString,
)
class OpenFlowServicer(object):
def GetHello(self, request, context):
"""
Hello message handshake, initiated by the client (controller)
TODO http option
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def EchoRequest(self, request, context):
"""
Echo request / reply, initiated by the client (controller)
TODO http option
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ExperimenterRequest(self, request, context):
"""
Experimental (extension) RPC
TODO http option
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetSwitchFeatures(self, request, context):
"""
Get Switch Features
TODO http option
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetSwitchConfig(self, request, context):
"""
Get Switch Config
TODO http option
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SetConfig(self, request, context):
"""
Set Config
TODO http option
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ReceivePacketInMessages(self, request, context):
"""
Receive Packet-In messages
TODO http option
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SendPacketOutMessages(self, request, context):
"""
Send Packet-Out messages
TODO http option
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_OpenFlowServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetHello': grpc.unary_unary_rpc_method_handler(
servicer.GetHello,
request_deserializer=openflow__13__pb2.ofp_hello.FromString,
response_serializer=openflow__13__pb2.ofp_hello.SerializeToString,
),
'EchoRequest': grpc.unary_unary_rpc_method_handler(
servicer.EchoRequest,
request_deserializer=openflow__13__pb2.ofp_header.FromString,
response_serializer=openflow__13__pb2.ofp_header.SerializeToString,
),
'ExperimenterRequest': grpc.unary_unary_rpc_method_handler(
servicer.ExperimenterRequest,
request_deserializer=openflow__13__pb2.ofp_experimenter_header.FromString,
response_serializer=openflow__13__pb2.ofp_experimenter_header.SerializeToString,
),
'GetSwitchFeatures': grpc.unary_unary_rpc_method_handler(
servicer.GetSwitchFeatures,
request_deserializer=openflow__13__pb2.ofp_header.FromString,
response_serializer=openflow__13__pb2.ofp_switch_features.SerializeToString,
),
'GetSwitchConfig': grpc.unary_unary_rpc_method_handler(
servicer.GetSwitchConfig,
request_deserializer=openflow__13__pb2.ofp_header.FromString,
response_serializer=openflow__13__pb2.ofp_switch_config.SerializeToString,
),
'SetConfig': grpc.unary_unary_rpc_method_handler(
servicer.SetConfig,
request_deserializer=openflow__13__pb2.ofp_switch_config.FromString,
response_serializer=openflow__13__pb2.ofp_header.SerializeToString,
),
'ReceivePacketInMessages': grpc.unary_stream_rpc_method_handler(
servicer.ReceivePacketInMessages,
request_deserializer=openflow__13__pb2.ofp_header.FromString,
response_serializer=openflow__13__pb2.ofp_packet_in.SerializeToString,
),
'SendPacketOutMessages': grpc.unary_unary_rpc_method_handler(
servicer.SendPacketOutMessages,
request_deserializer=openflow__13__pb2.ofp_packet_out.FromString,
response_serializer=openflow__13__pb2.ofp_header.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'voltha.OpenFlow', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
class BetaOpenFlowServicer(object):
def GetHello(self, request, context):
"""
Hello message handshake, initiated by the client (controller)
TODO http option
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def EchoRequest(self, request, context):
"""
Echo request / reply, initiated by the client (controller)
TODO http option
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def ExperimenterRequest(self, request, context):
"""
Experimental (extension) RPC
TODO http option
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetSwitchFeatures(self, request, context):
"""
Get Switch Features
TODO http option
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetSwitchConfig(self, request, context):
"""
Get Switch Config
TODO http option
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def SetConfig(self, request, context):
"""
Set Config
TODO http option
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def ReceivePacketInMessages(self, request, context):
"""
Receive Packet-In messages
TODO http option
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def SendPacketOutMessages(self, request, context):
"""
Send Packet-Out messages
TODO http option
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
class BetaOpenFlowStub(object):
def GetHello(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""
Hello message handshake, initiated by the client (controller)
TODO http option
"""
raise NotImplementedError()
GetHello.future = None
def EchoRequest(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""
Echo request / reply, initiated by the client (controller)
TODO http option
"""
raise NotImplementedError()
EchoRequest.future = None
def ExperimenterRequest(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""
Experimental (extension) RPC
TODO http option
"""
raise NotImplementedError()
ExperimenterRequest.future = None
def GetSwitchFeatures(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""
Get Switch Features
TODO http option
"""
raise NotImplementedError()
GetSwitchFeatures.future = None
def GetSwitchConfig(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""
Get Switch Config
TODO http option
"""
raise NotImplementedError()
GetSwitchConfig.future = None
def SetConfig(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""
Set Config
TODO http option
"""
raise NotImplementedError()
SetConfig.future = None
def ReceivePacketInMessages(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""
Receive Packet-In messages
TODO http option
"""
raise NotImplementedError()
def SendPacketOutMessages(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""
Send Packet-Out messages
TODO http option
"""
raise NotImplementedError()
SendPacketOutMessages.future = None
def beta_create_OpenFlow_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
request_deserializers = {
('voltha.OpenFlow', 'EchoRequest'): openflow__13__pb2.ofp_header.FromString,
('voltha.OpenFlow', 'ExperimenterRequest'): openflow__13__pb2.ofp_experimenter_header.FromString,
('voltha.OpenFlow', 'GetHello'): openflow__13__pb2.ofp_hello.FromString,
('voltha.OpenFlow', 'GetSwitchConfig'): openflow__13__pb2.ofp_header.FromString,
('voltha.OpenFlow', 'GetSwitchFeatures'): openflow__13__pb2.ofp_header.FromString,
('voltha.OpenFlow', 'ReceivePacketInMessages'): openflow__13__pb2.ofp_header.FromString,
('voltha.OpenFlow', 'SendPacketOutMessages'): openflow__13__pb2.ofp_packet_out.FromString,
('voltha.OpenFlow', 'SetConfig'): openflow__13__pb2.ofp_switch_config.FromString,
}
response_serializers = {
('voltha.OpenFlow', 'EchoRequest'): openflow__13__pb2.ofp_header.SerializeToString,
('voltha.OpenFlow', 'ExperimenterRequest'): openflow__13__pb2.ofp_experimenter_header.SerializeToString,
('voltha.OpenFlow', 'GetHello'): openflow__13__pb2.ofp_hello.SerializeToString,
('voltha.OpenFlow', 'GetSwitchConfig'): openflow__13__pb2.ofp_switch_config.SerializeToString,
('voltha.OpenFlow', 'GetSwitchFeatures'): openflow__13__pb2.ofp_switch_features.SerializeToString,
('voltha.OpenFlow', 'ReceivePacketInMessages'): openflow__13__pb2.ofp_packet_in.SerializeToString,
('voltha.OpenFlow', 'SendPacketOutMessages'): openflow__13__pb2.ofp_header.SerializeToString,
('voltha.OpenFlow', 'SetConfig'): openflow__13__pb2.ofp_header.SerializeToString,
}
method_implementations = {
('voltha.OpenFlow', 'EchoRequest'): face_utilities.unary_unary_inline(servicer.EchoRequest),
('voltha.OpenFlow', 'ExperimenterRequest'): face_utilities.unary_unary_inline(servicer.ExperimenterRequest),
('voltha.OpenFlow', 'GetHello'): face_utilities.unary_unary_inline(servicer.GetHello),
('voltha.OpenFlow', 'GetSwitchConfig'): face_utilities.unary_unary_inline(servicer.GetSwitchConfig),
('voltha.OpenFlow', 'GetSwitchFeatures'): face_utilities.unary_unary_inline(servicer.GetSwitchFeatures),
('voltha.OpenFlow', 'ReceivePacketInMessages'): face_utilities.unary_stream_inline(servicer.ReceivePacketInMessages),
('voltha.OpenFlow', 'SendPacketOutMessages'): face_utilities.unary_unary_inline(servicer.SendPacketOutMessages),
('voltha.OpenFlow', 'SetConfig'): face_utilities.unary_unary_inline(servicer.SetConfig),
}
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)
return beta_implementations.server(method_implementations, options=server_options)
def beta_create_OpenFlow_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
request_serializers = {
('voltha.OpenFlow', 'EchoRequest'): openflow__13__pb2.ofp_header.SerializeToString,
('voltha.OpenFlow', 'ExperimenterRequest'): openflow__13__pb2.ofp_experimenter_header.SerializeToString,
('voltha.OpenFlow', 'GetHello'): openflow__13__pb2.ofp_hello.SerializeToString,
('voltha.OpenFlow', 'GetSwitchConfig'): openflow__13__pb2.ofp_header.SerializeToString,
('voltha.OpenFlow', 'GetSwitchFeatures'): openflow__13__pb2.ofp_header.SerializeToString,
('voltha.OpenFlow', 'ReceivePacketInMessages'): openflow__13__pb2.ofp_header.SerializeToString,
('voltha.OpenFlow', 'SendPacketOutMessages'): openflow__13__pb2.ofp_packet_out.SerializeToString,
('voltha.OpenFlow', 'SetConfig'): openflow__13__pb2.ofp_switch_config.SerializeToString,
}
response_deserializers = {
('voltha.OpenFlow', 'EchoRequest'): openflow__13__pb2.ofp_header.FromString,
('voltha.OpenFlow', 'ExperimenterRequest'): openflow__13__pb2.ofp_experimenter_header.FromString,
('voltha.OpenFlow', 'GetHello'): openflow__13__pb2.ofp_hello.FromString,
('voltha.OpenFlow', 'GetSwitchConfig'): openflow__13__pb2.ofp_switch_config.FromString,
('voltha.OpenFlow', 'GetSwitchFeatures'): openflow__13__pb2.ofp_switch_features.FromString,
('voltha.OpenFlow', 'ReceivePacketInMessages'): openflow__13__pb2.ofp_packet_in.FromString,
('voltha.OpenFlow', 'SendPacketOutMessages'): openflow__13__pb2.ofp_header.FromString,
('voltha.OpenFlow', 'SetConfig'): openflow__13__pb2.ofp_header.FromString,
}
cardinalities = {
'EchoRequest': cardinality.Cardinality.UNARY_UNARY,
'ExperimenterRequest': cardinality.Cardinality.UNARY_UNARY,
'GetHello': cardinality.Cardinality.UNARY_UNARY,
'GetSwitchConfig': cardinality.Cardinality.UNARY_UNARY,
'GetSwitchFeatures': cardinality.Cardinality.UNARY_UNARY,
'ReceivePacketInMessages': cardinality.Cardinality.UNARY_STREAM,
'SendPacketOutMessages': cardinality.Cardinality.UNARY_UNARY,
'SetConfig': cardinality.Cardinality.UNARY_UNARY,
}
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)
return beta_implementations.dynamic_stub(channel, 'voltha.OpenFlow', cardinalities, options=stub_options)
# @@protoc_insertion_point(module_scope)