blob: 3484e20df7e088036bfbbdec69d06cce90ba5077 [file] [log] [blame]
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: logical_layer.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
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
import common_pb2 as common__pb2
import openflow_13_pb2 as openflow__13__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='logical_layer.proto',
package='voltha',
syntax='proto3',
serialized_pb=_b('\n\x13logical_layer.proto\x12\x06voltha\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x0c\x63ommon.proto\x1a\x11openflow_13.proto\"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\xb5\x06\n\x12VolthaLogicalLayer\x12\\\n\x12ListLogicalDevices\x12\x16.google.protobuf.Empty\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\x12h\n\x0fUpdateFlowTable\x12\x17.voltha.FlowTableUpdate\x1a\x16.google.protobuf.Empty\"$\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\x12k\n\x10UpdateGroupTable\x12\x18.voltha.GroupTableUpdate\x1a\x16.google.protobuf.Empty\"%\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\x41\n\x10StreamPacketsOut\x12\x11.voltha.PacketOut\x1a\x16.google.protobuf.Empty\"\x00(\x01\x12@\n\x10ReceivePacketsIn\x12\x16.google.protobuf.Empty\x1a\x10.voltha.PacketIn\"\x00\x30\x01\x62\x06proto3')
,
dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,common__pb2.DESCRIPTOR,openflow__13__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_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=123,
serialized_end=208,
)
_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=210,
serialized_end=264,
)
_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=266,
serialized_end=318,
)
_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=321,
serialized_end=472,
)
_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=474,
serialized_end=548,
)
_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=550,
serialized_end=627,
)
_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=629,
serialized_end=680,
)
_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=682,
serialized_end=739,
)
_PACKETIN = _descriptor.Descriptor(
name='PacketIn',
full_name='voltha.PacketIn',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='voltha.PacketIn.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='packet_in', full_name='voltha.PacketIn.packet_in', 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=741,
serialized_end=810,
)
_PACKETOUT = _descriptor.Descriptor(
name='PacketOut',
full_name='voltha.PacketOut',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='voltha.PacketOut.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='packet_out', full_name='voltha.PacketOut.packet_out', 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=812,
serialized_end=884,
)
_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
_PACKETIN.fields_by_name['packet_in'].message_type = openflow__13__pb2._OFP_PACKET_IN
_PACKETOUT.fields_by_name['packet_out'].message_type = openflow__13__pb2._OFP_PACKET_OUT
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
DESCRIPTOR.message_types_by_name['PacketIn'] = _PACKETIN
DESCRIPTOR.message_types_by_name['PacketOut'] = _PACKETOUT
LogicalDevice = _reflection.GeneratedProtocolMessageType('LogicalDevice', (_message.Message,), dict(
DESCRIPTOR = _LOGICALDEVICE,
__module__ = 'logical_layer_pb2'
# @@protoc_insertion_point(class_scope:voltha.LogicalDevice)
))
_sym_db.RegisterMessage(LogicalDevice)
LogicalDevices = _reflection.GeneratedProtocolMessageType('LogicalDevices', (_message.Message,), dict(
DESCRIPTOR = _LOGICALDEVICES,
__module__ = 'logical_layer_pb2'
# @@protoc_insertion_point(class_scope:voltha.LogicalDevices)
))
_sym_db.RegisterMessage(LogicalDevices)
LogicalPorts = _reflection.GeneratedProtocolMessageType('LogicalPorts', (_message.Message,), dict(
DESCRIPTOR = _LOGICALPORTS,
__module__ = 'logical_layer_pb2'
# @@protoc_insertion_point(class_scope:voltha.LogicalPorts)
))
_sym_db.RegisterMessage(LogicalPorts)
LogicalDeviceDetails = _reflection.GeneratedProtocolMessageType('LogicalDeviceDetails', (_message.Message,), dict(
DESCRIPTOR = _LOGICALDEVICEDETAILS,
__module__ = 'logical_layer_pb2'
# @@protoc_insertion_point(class_scope:voltha.LogicalDeviceDetails)
))
_sym_db.RegisterMessage(LogicalDeviceDetails)
FlowTableUpdate = _reflection.GeneratedProtocolMessageType('FlowTableUpdate', (_message.Message,), dict(
DESCRIPTOR = _FLOWTABLEUPDATE,
__module__ = 'logical_layer_pb2'
# @@protoc_insertion_point(class_scope:voltha.FlowTableUpdate)
))
_sym_db.RegisterMessage(FlowTableUpdate)
GroupTableUpdate = _reflection.GeneratedProtocolMessageType('GroupTableUpdate', (_message.Message,), dict(
DESCRIPTOR = _GROUPTABLEUPDATE,
__module__ = 'logical_layer_pb2'
# @@protoc_insertion_point(class_scope:voltha.GroupTableUpdate)
))
_sym_db.RegisterMessage(GroupTableUpdate)
Flows = _reflection.GeneratedProtocolMessageType('Flows', (_message.Message,), dict(
DESCRIPTOR = _FLOWS,
__module__ = 'logical_layer_pb2'
# @@protoc_insertion_point(class_scope:voltha.Flows)
))
_sym_db.RegisterMessage(Flows)
FlowGroups = _reflection.GeneratedProtocolMessageType('FlowGroups', (_message.Message,), dict(
DESCRIPTOR = _FLOWGROUPS,
__module__ = 'logical_layer_pb2'
# @@protoc_insertion_point(class_scope:voltha.FlowGroups)
))
_sym_db.RegisterMessage(FlowGroups)
PacketIn = _reflection.GeneratedProtocolMessageType('PacketIn', (_message.Message,), dict(
DESCRIPTOR = _PACKETIN,
__module__ = 'logical_layer_pb2'
# @@protoc_insertion_point(class_scope:voltha.PacketIn)
))
_sym_db.RegisterMessage(PacketIn)
PacketOut = _reflection.GeneratedProtocolMessageType('PacketOut', (_message.Message,), dict(
DESCRIPTOR = _PACKETOUT,
__module__ = 'logical_layer_pb2'
# @@protoc_insertion_point(class_scope:voltha.PacketOut)
))
_sym_db.RegisterMessage(PacketOut)
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 VolthaLogicalLayerStub(object):
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.ListLogicalDevices = channel.unary_unary(
'/voltha.VolthaLogicalLayer/ListLogicalDevices',
request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
response_deserializer=LogicalDevices.FromString,
)
self.GetLogicalDevice = channel.unary_unary(
'/voltha.VolthaLogicalLayer/GetLogicalDevice',
request_serializer=common__pb2.ID.SerializeToString,
response_deserializer=LogicalDeviceDetails.FromString,
)
self.ListLogicalDevicePorts = channel.unary_unary(
'/voltha.VolthaLogicalLayer/ListLogicalDevicePorts',
request_serializer=common__pb2.ID.SerializeToString,
response_deserializer=LogicalPorts.FromString,
)
self.UpdateFlowTable = channel.unary_unary(
'/voltha.VolthaLogicalLayer/UpdateFlowTable',
request_serializer=FlowTableUpdate.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
self.ListDeviceFlows = channel.unary_unary(
'/voltha.VolthaLogicalLayer/ListDeviceFlows',
request_serializer=common__pb2.ID.SerializeToString,
response_deserializer=Flows.FromString,
)
self.UpdateGroupTable = channel.unary_unary(
'/voltha.VolthaLogicalLayer/UpdateGroupTable',
request_serializer=GroupTableUpdate.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
self.ListDeviceFlowGroups = channel.unary_unary(
'/voltha.VolthaLogicalLayer/ListDeviceFlowGroups',
request_serializer=common__pb2.ID.SerializeToString,
response_deserializer=FlowGroups.FromString,
)
self.StreamPacketsOut = channel.stream_unary(
'/voltha.VolthaLogicalLayer/StreamPacketsOut',
request_serializer=PacketOut.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
self.ReceivePacketsIn = channel.unary_stream(
'/voltha.VolthaLogicalLayer/ReceivePacketsIn',
request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
response_deserializer=PacketIn.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 StreamPacketsOut(self, request_iterator, context):
"""Stream control packets to the dataplane
This does not have an HTTP representation
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ReceivePacketsIn(self, request, context):
"""Receive control packet stream
This does not have an HTTP representation
"""
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=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
response_serializer=LogicalDevices.SerializeToString,
),
'GetLogicalDevice': grpc.unary_unary_rpc_method_handler(
servicer.GetLogicalDevice,
request_deserializer=common__pb2.ID.FromString,
response_serializer=LogicalDeviceDetails.SerializeToString,
),
'ListLogicalDevicePorts': grpc.unary_unary_rpc_method_handler(
servicer.ListLogicalDevicePorts,
request_deserializer=common__pb2.ID.FromString,
response_serializer=LogicalPorts.SerializeToString,
),
'UpdateFlowTable': grpc.unary_unary_rpc_method_handler(
servicer.UpdateFlowTable,
request_deserializer=FlowTableUpdate.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
'ListDeviceFlows': grpc.unary_unary_rpc_method_handler(
servicer.ListDeviceFlows,
request_deserializer=common__pb2.ID.FromString,
response_serializer=Flows.SerializeToString,
),
'UpdateGroupTable': grpc.unary_unary_rpc_method_handler(
servicer.UpdateGroupTable,
request_deserializer=GroupTableUpdate.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
'ListDeviceFlowGroups': grpc.unary_unary_rpc_method_handler(
servicer.ListDeviceFlowGroups,
request_deserializer=common__pb2.ID.FromString,
response_serializer=FlowGroups.SerializeToString,
),
'StreamPacketsOut': grpc.stream_unary_rpc_method_handler(
servicer.StreamPacketsOut,
request_deserializer=PacketOut.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
'ReceivePacketsIn': grpc.unary_stream_rpc_method_handler(
servicer.ReceivePacketsIn,
request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
response_serializer=PacketIn.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 StreamPacketsOut(self, request_iterator, context):
"""Stream control packets to the dataplane
This does not have an HTTP representation
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def ReceivePacketsIn(self, request, context):
"""Receive control packet stream
This does not have an HTTP representation
"""
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 StreamPacketsOut(self, request_iterator, timeout, metadata=None, with_call=False, protocol_options=None):
"""Stream control packets to the dataplane
This does not have an HTTP representation
"""
raise NotImplementedError()
StreamPacketsOut.future = None
def ReceivePacketsIn(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Receive control packet stream
This does not have an HTTP representation
"""
raise NotImplementedError()
def beta_create_VolthaLogicalLayer_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
request_deserializers = {
('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): common__pb2.ID.FromString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlowGroups'): common__pb2.ID.FromString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): common__pb2.ID.FromString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): common__pb2.ID.FromString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
('voltha.VolthaLogicalLayer', 'ReceivePacketsIn'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
('voltha.VolthaLogicalLayer', 'StreamPacketsOut'): PacketOut.FromString,
('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): FlowTableUpdate.FromString,
('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): GroupTableUpdate.FromString,
}
response_serializers = {
('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): LogicalDeviceDetails.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlowGroups'): FlowGroups.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): Flows.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): LogicalPorts.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): LogicalDevices.SerializeToString,
('voltha.VolthaLogicalLayer', 'ReceivePacketsIn'): PacketIn.SerializeToString,
('voltha.VolthaLogicalLayer', 'StreamPacketsOut'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
}
method_implementations = {
('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): face_utilities.unary_unary_inline(servicer.GetLogicalDevice),
('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', 'ReceivePacketsIn'): face_utilities.unary_stream_inline(servicer.ReceivePacketsIn),
('voltha.VolthaLogicalLayer', 'StreamPacketsOut'): face_utilities.stream_unary_inline(servicer.StreamPacketsOut),
('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): face_utilities.unary_unary_inline(servicer.UpdateFlowTable),
('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): face_utilities.unary_unary_inline(servicer.UpdateGroupTable),
}
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', 'GetLogicalDevice'): common__pb2.ID.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlowGroups'): common__pb2.ID.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): common__pb2.ID.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): common__pb2.ID.SerializeToString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
('voltha.VolthaLogicalLayer', 'ReceivePacketsIn'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
('voltha.VolthaLogicalLayer', 'StreamPacketsOut'): PacketOut.SerializeToString,
('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): FlowTableUpdate.SerializeToString,
('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): GroupTableUpdate.SerializeToString,
}
response_deserializers = {
('voltha.VolthaLogicalLayer', 'GetLogicalDevice'): LogicalDeviceDetails.FromString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlowGroups'): FlowGroups.FromString,
('voltha.VolthaLogicalLayer', 'ListDeviceFlows'): Flows.FromString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevicePorts'): LogicalPorts.FromString,
('voltha.VolthaLogicalLayer', 'ListLogicalDevices'): LogicalDevices.FromString,
('voltha.VolthaLogicalLayer', 'ReceivePacketsIn'): PacketIn.FromString,
('voltha.VolthaLogicalLayer', 'StreamPacketsOut'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
('voltha.VolthaLogicalLayer', 'UpdateFlowTable'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
('voltha.VolthaLogicalLayer', 'UpdateGroupTable'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
}
cardinalities = {
'GetLogicalDevice': cardinality.Cardinality.UNARY_UNARY,
'ListDeviceFlowGroups': cardinality.Cardinality.UNARY_UNARY,
'ListDeviceFlows': cardinality.Cardinality.UNARY_UNARY,
'ListLogicalDevicePorts': cardinality.Cardinality.UNARY_UNARY,
'ListLogicalDevices': cardinality.Cardinality.UNARY_UNARY,
'ReceivePacketsIn': cardinality.Cardinality.UNARY_STREAM,
'StreamPacketsOut': cardinality.Cardinality.STREAM_UNARY,
'UpdateFlowTable': cardinality.Cardinality.UNARY_UNARY,
'UpdateGroupTable': 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)
# @@protoc_insertion_point(module_scope)