Skip to content
Snippets Groups Projects
Commit f7d6a431 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Updated proto files:

- formatted and corrected interdomain and slice proto files
- regenerated associated Python code files per component
parent afa196d7
No related branches found
No related tags found
2 merge requests!54Release 2.0.0,!42Interdomain Component
Showing
with 1676 additions and 694 deletions
...@@ -253,6 +253,45 @@ message ServiceEvent { ...@@ -253,6 +253,45 @@ message ServiceEvent {
ServiceId service_id = 2; ServiceId service_id = 2;
} }
// ----- Slice ---------------------------------------------------------------------------------------------------------
message SliceId {
ContextId context_id = 1;
Uuid slice_uuid = 2;
}
message Slice {
SliceId slice_id = 1;
repeated EndPointId slice_endpoint_ids = 2;
repeated Constraint slice_constraints = 3;
repeated ServiceId slice_services = 4;
repeated SliceId slice_subslice_ids = 5;
SliceStatus slice_status = 6;
}
enum SliceStatusEnum {
SLICESTATUS_UNDEFINED = 0;
SLICESTATUS_PLANNED = 1;
SLICESTATUS_INIT = 2;
SLICESTATUS_ACTIVE = 3;
SLICESTATUS_DEINIT = 4;
}
message SliceStatus {
SliceStatusEnum slice_status = 1;
}
message SliceIdList {
repeated SliceId slice_ids = 1;
}
message SliceList {
repeated Slice slices = 1;
}
message SliceEvent {
Event event = 1;
SliceId slice_id = 2;
}
// ----- Connection ---------------------------------------------------------------------------------------------------- // ----- Connection ----------------------------------------------------------------------------------------------------
message ConnectionId { message ConnectionId {
......
...@@ -16,11 +16,10 @@ syntax = "proto3"; ...@@ -16,11 +16,10 @@ syntax = "proto3";
package interdomain; package interdomain;
import "context.proto"; import "context.proto";
import "slice.proto";
service InterdomainService { service InterdomainService {
rpc Authenticate (context.TeraFlowController) returns (context.AuthenticationResult) {} rpc Authenticate (context.TeraFlowController) returns (context.AuthenticationResult) {}
rpc LookUpSlice (slice.TransportSlice ) returns (slice.SliceId ) {} rpc LookUpSlice (context.Slice ) returns (context.SliceId ) {}
rpc OrderSliceFromCatalog (slice.TransportSlice ) returns (slice.SliceStatus ) {} rpc OrderSliceFromCatalog (context.Slice ) returns (context.Slice ) {}
rpc CreateSliceAndAddToCatalog(slice.TransportSlice ) returns (slice.SliceStatus ) {} rpc CreateSliceAndAddToCatalog(context.Slice ) returns (context.Slice ) {}
} }
...@@ -18,36 +18,6 @@ package slice; ...@@ -18,36 +18,6 @@ package slice;
import "context.proto"; import "context.proto";
service SliceService { service SliceService {
rpc CreateUpdateSlice (TransportSlice) returns (SliceStatus ) {} rpc CreateUpdateSlice (context.Slice) returns (context.SliceId) {}
rpc DeleteSlice (TransportSlice) returns (context.Empty) {} rpc DeleteSlice (context.Slice) returns (context.Empty ) {}
}
message SliceEndpoint {
context.EndPoint port_id = 1;
}
message TransportSlice {
SliceId slice_id = 1;
repeated slice.SliceEndpoint endpoints = 2;
repeated context.Constraint constraints = 3;
repeated context.ServiceId services = 4;
repeated SliceId subSlicesId = 5;
SliceStatus status = 6;
}
message SliceId {
context.ContextId contextId = 1;
context.Uuid slice_id = 2;
}
message SliceStatus {
slice.SliceId slice_id = 1;
SliceStatusEnum status = 2;
}
enum SliceStatusEnum {
PLANNED = 0;
INIT = 1;
ACTIVE = 2;
DEINIT = 3;
} }
# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
This diff is collapsed.
...@@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( ...@@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
syntax='proto3', syntax='proto3',
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\rservice.proto\x12\x07service\x1a\rcontext.proto2\xfd\x01\n\x0eServiceService\x12\x37\n\rCreateService\x12\x10.context.Service\x1a\x12.context.ServiceId\"\x00\x12\x37\n\rUpdateService\x12\x10.context.Service\x1a\x12.context.ServiceId\"\x00\x12\x35\n\rDeleteService\x12\x12.context.ServiceId\x1a\x0e.context.Empty\"\x00\x12\x42\n\x11GetConnectionList\x12\x12.context.ServiceId\x1a\x17.context.ConnectionList\"\x00\x62\x06proto3' serialized_pb=b'\n\rservice.proto\x12\x07service\x1a\rcontext.proto2\xb9\x01\n\x0eServiceService\x12\x37\n\rCreateService\x12\x10.context.Service\x1a\x12.context.ServiceId\"\x00\x12\x37\n\rUpdateService\x12\x10.context.Service\x1a\x12.context.ServiceId\"\x00\x12\x35\n\rDeleteService\x12\x12.context.ServiceId\x1a\x0e.context.Empty\"\x00\x62\x06proto3'
, ,
dependencies=[context__pb2.DESCRIPTOR,]) dependencies=[context__pb2.DESCRIPTOR,])
...@@ -38,7 +38,7 @@ _SERVICESERVICE = _descriptor.ServiceDescriptor( ...@@ -38,7 +38,7 @@ _SERVICESERVICE = _descriptor.ServiceDescriptor(
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_start=42, serialized_start=42,
serialized_end=295, serialized_end=227,
methods=[ methods=[
_descriptor.MethodDescriptor( _descriptor.MethodDescriptor(
name='CreateService', name='CreateService',
...@@ -70,16 +70,6 @@ _SERVICESERVICE = _descriptor.ServiceDescriptor( ...@@ -70,16 +70,6 @@ _SERVICESERVICE = _descriptor.ServiceDescriptor(
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
), ),
_descriptor.MethodDescriptor(
name='GetConnectionList',
full_name='service.ServiceService.GetConnectionList',
index=3,
containing_service=None,
input_type=context__pb2._SERVICEID,
output_type=context__pb2._CONNECTIONLIST,
serialized_options=None,
create_key=_descriptor._internal_create_key,
),
]) ])
_sym_db.RegisterServiceDescriptor(_SERVICESERVICE) _sym_db.RegisterServiceDescriptor(_SERVICESERVICE)
......
# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
This diff is collapsed.
# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
...@@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( ...@@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
syntax='proto3', syntax='proto3',
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x13\x64\x62scanserving.proto\x12\rdbscanserving\"\x1a\n\x06Sample\x12\x10\n\x08\x66\x65\x61tures\x18\x01 \x03(\x02\"\xd6\x01\n\x10\x44\x65tectionRequest\x12\x0b\n\x03\x65ps\x18\x01 \x01(\x02\x12\x13\n\x0bmin_samples\x18\x02 \x01(\x05\x12%\n\x06metric\x18\x03 \x01(\x0e\x32\x15.dbscanserving.Metric\x12\x13\n\x0bnum_samples\x18\x04 \x01(\x05\x12\x14\n\x0cnum_features\x18\x05 \x01(\x05\x12&\n\x07samples\x18\x06 \x03(\x0b\x32\x15.dbscanserving.Sample\x12\x17\n\nidentifier\x18\x07 \x01(\x05H\x00\x88\x01\x01\x42\r\n\x0b_identifier\",\n\x11\x44\x65tectionResponse\x12\x17\n\x0f\x63luster_indices\x18\x01 \x03(\x05*\x17\n\x06Metric\x12\r\n\tEUCLIDEAN\x10\x00\x32W\n\x08\x44\x65tector\x12K\n\x06\x44\x65tect\x12\x1f.dbscanserving.DetectionRequest\x1a .dbscanserving.DetectionResponseb\x06proto3' serialized_pb=b'\n\x13\x64\x62scanserving.proto\x12\rdbscanserving\"\x1a\n\x06Sample\x12\x10\n\x08\x66\x65\x61tures\x18\x01 \x03(\x02\"\xc2\x01\n\x10\x44\x65tectionRequest\x12\x0b\n\x03\x65ps\x18\x01 \x01(\x02\x12\x13\n\x0bmin_samples\x18\x02 \x01(\x05\x12%\n\x06metric\x18\x03 \x01(\x0e\x32\x15.dbscanserving.Metric\x12\x13\n\x0bnum_samples\x18\x04 \x01(\x05\x12\x14\n\x0cnum_features\x18\x05 \x01(\x05\x12&\n\x07samples\x18\x06 \x03(\x0b\x32\x15.dbscanserving.Sample\x12\x12\n\nidentifier\x18\x07 \x01(\x05\",\n\x11\x44\x65tectionResponse\x12\x17\n\x0f\x63luster_indices\x18\x01 \x03(\x05*\x17\n\x06Metric\x12\r\n\tEUCLIDEAN\x10\x00\x32W\n\x08\x44\x65tector\x12K\n\x06\x44\x65tect\x12\x1f.dbscanserving.DetectionRequest\x1a .dbscanserving.DetectionResponseb\x06proto3'
) )
_METRIC = _descriptor.EnumDescriptor( _METRIC = _descriptor.EnumDescriptor(
...@@ -38,8 +38,8 @@ _METRIC = _descriptor.EnumDescriptor( ...@@ -38,8 +38,8 @@ _METRIC = _descriptor.EnumDescriptor(
], ],
containing_type=None, containing_type=None,
serialized_options=None, serialized_options=None,
serialized_start=329, serialized_start=309,
serialized_end=352, serialized_end=332,
) )
_sym_db.RegisterEnumDescriptor(_METRIC) _sym_db.RegisterEnumDescriptor(_METRIC)
...@@ -148,14 +148,9 @@ _DETECTIONREQUEST = _descriptor.Descriptor( ...@@ -148,14 +148,9 @@ _DETECTIONREQUEST = _descriptor.Descriptor(
syntax='proto3', syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
_descriptor.OneofDescriptor(
name='_identifier', full_name='dbscanserving.DetectionRequest._identifier',
index=0, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
], ],
serialized_start=67, serialized_start=67,
serialized_end=281, serialized_end=261,
) )
...@@ -186,15 +181,12 @@ _DETECTIONRESPONSE = _descriptor.Descriptor( ...@@ -186,15 +181,12 @@ _DETECTIONRESPONSE = _descriptor.Descriptor(
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
serialized_start=283, serialized_start=263,
serialized_end=327, serialized_end=307,
) )
_DETECTIONREQUEST.fields_by_name['metric'].enum_type = _METRIC _DETECTIONREQUEST.fields_by_name['metric'].enum_type = _METRIC
_DETECTIONREQUEST.fields_by_name['samples'].message_type = _SAMPLE _DETECTIONREQUEST.fields_by_name['samples'].message_type = _SAMPLE
_DETECTIONREQUEST.oneofs_by_name['_identifier'].fields.append(
_DETECTIONREQUEST.fields_by_name['identifier'])
_DETECTIONREQUEST.fields_by_name['identifier'].containing_oneof = _DETECTIONREQUEST.oneofs_by_name['_identifier']
DESCRIPTOR.message_types_by_name['Sample'] = _SAMPLE DESCRIPTOR.message_types_by_name['Sample'] = _SAMPLE
DESCRIPTOR.message_types_by_name['DetectionRequest'] = _DETECTIONREQUEST DESCRIPTOR.message_types_by_name['DetectionRequest'] = _DETECTIONREQUEST
DESCRIPTOR.message_types_by_name['DetectionResponse'] = _DETECTIONRESPONSE DESCRIPTOR.message_types_by_name['DetectionResponse'] = _DETECTIONRESPONSE
...@@ -231,8 +223,8 @@ _DETECTOR = _descriptor.ServiceDescriptor( ...@@ -231,8 +223,8 @@ _DETECTOR = _descriptor.ServiceDescriptor(
index=0, index=0,
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_start=354, serialized_start=334,
serialized_end=441, serialized_end=421,
methods=[ methods=[
_descriptor.MethodDescriptor( _descriptor.MethodDescriptor(
name='Detect', name='Detect',
......
# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
This diff is collapsed.
This diff is collapsed.
...@@ -12,7 +12,6 @@ _sym_db = _symbol_database.Default() ...@@ -12,7 +12,6 @@ _sym_db = _symbol_database.Default()
from . import context_pb2 as context__pb2 from . import context_pb2 as context__pb2
from . import slice_pb2 as slice__pb2
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
...@@ -21,9 +20,9 @@ DESCRIPTOR = _descriptor.FileDescriptor( ...@@ -21,9 +20,9 @@ DESCRIPTOR = _descriptor.FileDescriptor(
syntax='proto3', syntax='proto3',
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x11interdomain.proto\x12\x0binterdomain\x1a\rcontext.proto\x1a\x0bslice.proto2\xab\x02\n\x12InterdomainService\x12L\n\x0c\x41uthenticate\x12\x1b.context.TeraFlowController\x1a\x1d.context.AuthenticationResult\"\x00\x12\x36\n\x0bLookUpSlice\x12\x15.slice.TransportSlice\x1a\x0e.slice.SliceId\"\x00\x12\x44\n\x15OrderSliceFromCatalog\x12\x15.slice.TransportSlice\x1a\x12.slice.SliceStatus\"\x00\x12I\n\x1a\x43reateSliceAndAddToCatalog\x12\x15.slice.TransportSlice\x1a\x12.slice.SliceStatus\"\x00\x62\x06proto3' serialized_pb=b'\n\x11interdomain.proto\x12\x0binterdomain\x1a\rcontext.proto2\x90\x02\n\x12InterdomainService\x12L\n\x0c\x41uthenticate\x12\x1b.context.TeraFlowController\x1a\x1d.context.AuthenticationResult\"\x00\x12\x31\n\x0bLookUpSlice\x12\x0e.context.Slice\x1a\x10.context.SliceId\"\x00\x12\x39\n\x15OrderSliceFromCatalog\x12\x0e.context.Slice\x1a\x0e.context.Slice\"\x00\x12>\n\x1a\x43reateSliceAndAddToCatalog\x12\x0e.context.Slice\x1a\x0e.context.Slice\"\x00\x62\x06proto3'
, ,
dependencies=[context__pb2.DESCRIPTOR,slice__pb2.DESCRIPTOR,]) dependencies=[context__pb2.DESCRIPTOR,])
...@@ -38,8 +37,8 @@ _INTERDOMAINSERVICE = _descriptor.ServiceDescriptor( ...@@ -38,8 +37,8 @@ _INTERDOMAINSERVICE = _descriptor.ServiceDescriptor(
index=0, index=0,
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_start=63, serialized_start=50,
serialized_end=362, serialized_end=322,
methods=[ methods=[
_descriptor.MethodDescriptor( _descriptor.MethodDescriptor(
name='Authenticate', name='Authenticate',
...@@ -56,8 +55,8 @@ _INTERDOMAINSERVICE = _descriptor.ServiceDescriptor( ...@@ -56,8 +55,8 @@ _INTERDOMAINSERVICE = _descriptor.ServiceDescriptor(
full_name='interdomain.InterdomainService.LookUpSlice', full_name='interdomain.InterdomainService.LookUpSlice',
index=1, index=1,
containing_service=None, containing_service=None,
input_type=slice__pb2._TRANSPORTSLICE, input_type=context__pb2._SLICE,
output_type=slice__pb2._SLICEID, output_type=context__pb2._SLICEID,
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
), ),
...@@ -66,8 +65,8 @@ _INTERDOMAINSERVICE = _descriptor.ServiceDescriptor( ...@@ -66,8 +65,8 @@ _INTERDOMAINSERVICE = _descriptor.ServiceDescriptor(
full_name='interdomain.InterdomainService.OrderSliceFromCatalog', full_name='interdomain.InterdomainService.OrderSliceFromCatalog',
index=2, index=2,
containing_service=None, containing_service=None,
input_type=slice__pb2._TRANSPORTSLICE, input_type=context__pb2._SLICE,
output_type=slice__pb2._SLICESTATUS, output_type=context__pb2._SLICE,
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
), ),
...@@ -76,8 +75,8 @@ _INTERDOMAINSERVICE = _descriptor.ServiceDescriptor( ...@@ -76,8 +75,8 @@ _INTERDOMAINSERVICE = _descriptor.ServiceDescriptor(
full_name='interdomain.InterdomainService.CreateSliceAndAddToCatalog', full_name='interdomain.InterdomainService.CreateSliceAndAddToCatalog',
index=3, index=3,
containing_service=None, containing_service=None,
input_type=slice__pb2._TRANSPORTSLICE, input_type=context__pb2._SLICE,
output_type=slice__pb2._SLICESTATUS, output_type=context__pb2._SLICE,
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
), ),
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
import grpc import grpc
from . import context_pb2 as context__pb2 from . import context_pb2 as context__pb2
from . import slice_pb2 as slice__pb2
class InterdomainServiceStub(object): class InterdomainServiceStub(object):
...@@ -22,18 +21,18 @@ class InterdomainServiceStub(object): ...@@ -22,18 +21,18 @@ class InterdomainServiceStub(object):
) )
self.LookUpSlice = channel.unary_unary( self.LookUpSlice = channel.unary_unary(
'/interdomain.InterdomainService/LookUpSlice', '/interdomain.InterdomainService/LookUpSlice',
request_serializer=slice__pb2.TransportSlice.SerializeToString, request_serializer=context__pb2.Slice.SerializeToString,
response_deserializer=slice__pb2.SliceId.FromString, response_deserializer=context__pb2.SliceId.FromString,
) )
self.OrderSliceFromCatalog = channel.unary_unary( self.OrderSliceFromCatalog = channel.unary_unary(
'/interdomain.InterdomainService/OrderSliceFromCatalog', '/interdomain.InterdomainService/OrderSliceFromCatalog',
request_serializer=slice__pb2.TransportSlice.SerializeToString, request_serializer=context__pb2.Slice.SerializeToString,
response_deserializer=slice__pb2.SliceStatus.FromString, response_deserializer=context__pb2.Slice.FromString,
) )
self.CreateSliceAndAddToCatalog = channel.unary_unary( self.CreateSliceAndAddToCatalog = channel.unary_unary(
'/interdomain.InterdomainService/CreateSliceAndAddToCatalog', '/interdomain.InterdomainService/CreateSliceAndAddToCatalog',
request_serializer=slice__pb2.TransportSlice.SerializeToString, request_serializer=context__pb2.Slice.SerializeToString,
response_deserializer=slice__pb2.SliceStatus.FromString, response_deserializer=context__pb2.Slice.FromString,
) )
...@@ -74,18 +73,18 @@ def add_InterdomainServiceServicer_to_server(servicer, server): ...@@ -74,18 +73,18 @@ def add_InterdomainServiceServicer_to_server(servicer, server):
), ),
'LookUpSlice': grpc.unary_unary_rpc_method_handler( 'LookUpSlice': grpc.unary_unary_rpc_method_handler(
servicer.LookUpSlice, servicer.LookUpSlice,
request_deserializer=slice__pb2.TransportSlice.FromString, request_deserializer=context__pb2.Slice.FromString,
response_serializer=slice__pb2.SliceId.SerializeToString, response_serializer=context__pb2.SliceId.SerializeToString,
), ),
'OrderSliceFromCatalog': grpc.unary_unary_rpc_method_handler( 'OrderSliceFromCatalog': grpc.unary_unary_rpc_method_handler(
servicer.OrderSliceFromCatalog, servicer.OrderSliceFromCatalog,
request_deserializer=slice__pb2.TransportSlice.FromString, request_deserializer=context__pb2.Slice.FromString,
response_serializer=slice__pb2.SliceStatus.SerializeToString, response_serializer=context__pb2.Slice.SerializeToString,
), ),
'CreateSliceAndAddToCatalog': grpc.unary_unary_rpc_method_handler( 'CreateSliceAndAddToCatalog': grpc.unary_unary_rpc_method_handler(
servicer.CreateSliceAndAddToCatalog, servicer.CreateSliceAndAddToCatalog,
request_deserializer=slice__pb2.TransportSlice.FromString, request_deserializer=context__pb2.Slice.FromString,
response_serializer=slice__pb2.SliceStatus.SerializeToString, response_serializer=context__pb2.Slice.SerializeToString,
), ),
} }
generic_handler = grpc.method_handlers_generic_handler( generic_handler = grpc.method_handlers_generic_handler(
...@@ -126,8 +125,8 @@ class InterdomainService(object): ...@@ -126,8 +125,8 @@ class InterdomainService(object):
timeout=None, timeout=None,
metadata=None): metadata=None):
return grpc.experimental.unary_unary(request, target, '/interdomain.InterdomainService/LookUpSlice', return grpc.experimental.unary_unary(request, target, '/interdomain.InterdomainService/LookUpSlice',
slice__pb2.TransportSlice.SerializeToString, context__pb2.Slice.SerializeToString,
slice__pb2.SliceId.FromString, context__pb2.SliceId.FromString,
options, channel_credentials, options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata) insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
...@@ -143,8 +142,8 @@ class InterdomainService(object): ...@@ -143,8 +142,8 @@ class InterdomainService(object):
timeout=None, timeout=None,
metadata=None): metadata=None):
return grpc.experimental.unary_unary(request, target, '/interdomain.InterdomainService/OrderSliceFromCatalog', return grpc.experimental.unary_unary(request, target, '/interdomain.InterdomainService/OrderSliceFromCatalog',
slice__pb2.TransportSlice.SerializeToString, context__pb2.Slice.SerializeToString,
slice__pb2.SliceStatus.FromString, context__pb2.Slice.FromString,
options, channel_credentials, options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata) insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
...@@ -160,7 +159,7 @@ class InterdomainService(object): ...@@ -160,7 +159,7 @@ class InterdomainService(object):
timeout=None, timeout=None,
metadata=None): metadata=None):
return grpc.experimental.unary_unary(request, target, '/interdomain.InterdomainService/CreateSliceAndAddToCatalog', return grpc.experimental.unary_unary(request, target, '/interdomain.InterdomainService/CreateSliceAndAddToCatalog',
slice__pb2.TransportSlice.SerializeToString, context__pb2.Slice.SerializeToString,
slice__pb2.SliceStatus.FromString, context__pb2.Slice.FromString,
options, channel_credentials, options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata) insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
# Generated by the protocol buffer compiler. DO NOT EDIT! # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: slice.proto # source: slice.proto
"""Generated protocol buffer code.""" """Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
...@@ -21,275 +20,14 @@ DESCRIPTOR = _descriptor.FileDescriptor( ...@@ -21,275 +20,14 @@ DESCRIPTOR = _descriptor.FileDescriptor(
syntax='proto3', syntax='proto3',
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x0bslice.proto\x12\x05slice\x1a\rcontext.proto\"3\n\rSliceEndpoint\x12\"\n\x07port_id\x18\x01 \x01(\x0b\x32\x11.context.EndPoint\"\xf4\x01\n\x0eTransportSlice\x12 \n\x08slice_id\x18\x01 \x01(\x0b\x32\x0e.slice.SliceId\x12\'\n\tendpoints\x18\x02 \x03(\x0b\x32\x14.slice.SliceEndpoint\x12(\n\x0b\x63onstraints\x18\x03 \x03(\x0b\x32\x13.context.Constraint\x12$\n\x08services\x18\x04 \x03(\x0b\x32\x12.context.ServiceId\x12#\n\x0bsubSlicesId\x18\x05 \x03(\x0b\x32\x0e.slice.SliceId\x12\"\n\x06status\x18\x06 \x01(\x0b\x32\x12.slice.SliceStatus\"Q\n\x07SliceId\x12%\n\tcontextId\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12\x1f\n\x08slice_id\x18\x02 \x01(\x0b\x32\r.context.Uuid\"W\n\x0bSliceStatus\x12 \n\x08slice_id\x18\x01 \x01(\x0b\x32\x0e.slice.SliceId\x12&\n\x06status\x18\x02 \x01(\x0e\x32\x16.slice.SliceStatusEnum*@\n\x0fSliceStatusEnum\x12\x0b\n\x07PLANNED\x10\x00\x12\x08\n\x04INIT\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\n\n\x06\x44\x45INIT\x10\x03\x32\x88\x01\n\x0cSliceService\x12@\n\x11\x43reateUpdateSlice\x12\x15.slice.TransportSlice\x1a\x12.slice.SliceStatus\"\x00\x12\x36\n\x0b\x44\x65leteSlice\x12\x15.slice.TransportSlice\x1a\x0e.context.Empty\"\x00\x62\x06proto3' serialized_pb=b'\n\x0bslice.proto\x12\x05slice\x1a\rcontext.proto2x\n\x0cSliceService\x12\x37\n\x11\x43reateUpdateSlice\x12\x0e.context.Slice\x1a\x10.context.SliceId\"\x00\x12/\n\x0b\x44\x65leteSlice\x12\x0e.context.Slice\x1a\x0e.context.Empty\"\x00\x62\x06proto3'
, ,
dependencies=[context__pb2.DESCRIPTOR,]) dependencies=[context__pb2.DESCRIPTOR,])
_SLICESTATUSENUM = _descriptor.EnumDescriptor(
name='SliceStatusEnum',
full_name='slice.SliceStatusEnum',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='PLANNED', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='INIT', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='ACTIVE', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='DEINIT', index=3, number=3,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=509,
serialized_end=573,
)
_sym_db.RegisterEnumDescriptor(_SLICESTATUSENUM)
SliceStatusEnum = enum_type_wrapper.EnumTypeWrapper(_SLICESTATUSENUM)
PLANNED = 0
INIT = 1
ACTIVE = 2
DEINIT = 3
_SLICEENDPOINT = _descriptor.Descriptor(
name='SliceEndpoint',
full_name='slice.SliceEndpoint',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='port_id', full_name='slice.SliceEndpoint.port_id', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=37,
serialized_end=88,
)
_TRANSPORTSLICE = _descriptor.Descriptor(
name='TransportSlice',
full_name='slice.TransportSlice',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='slice_id', full_name='slice.TransportSlice.slice_id', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='endpoints', full_name='slice.TransportSlice.endpoints', index=1,
number=2, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='constraints', full_name='slice.TransportSlice.constraints', index=2,
number=3, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='services', full_name='slice.TransportSlice.services', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='subSlicesId', full_name='slice.TransportSlice.subSlicesId', index=4,
number=5, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='status', full_name='slice.TransportSlice.status', index=5,
number=6, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=91,
serialized_end=335,
)
_SLICEID = _descriptor.Descriptor(
name='SliceId',
full_name='slice.SliceId',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='contextId', full_name='slice.SliceId.contextId', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='slice_id', full_name='slice.SliceId.slice_id', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=337,
serialized_end=418,
)
_SLICESTATUS = _descriptor.Descriptor(
name='SliceStatus',
full_name='slice.SliceStatus',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='slice_id', full_name='slice.SliceStatus.slice_id', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='status', full_name='slice.SliceStatus.status', index=1,
number=2, 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=420,
serialized_end=507,
)
_SLICEENDPOINT.fields_by_name['port_id'].message_type = context__pb2._ENDPOINT
_TRANSPORTSLICE.fields_by_name['slice_id'].message_type = _SLICEID
_TRANSPORTSLICE.fields_by_name['endpoints'].message_type = _SLICEENDPOINT
_TRANSPORTSLICE.fields_by_name['constraints'].message_type = context__pb2._CONSTRAINT
_TRANSPORTSLICE.fields_by_name['services'].message_type = context__pb2._SERVICEID
_TRANSPORTSLICE.fields_by_name['subSlicesId'].message_type = _SLICEID
_TRANSPORTSLICE.fields_by_name['status'].message_type = _SLICESTATUS
_SLICEID.fields_by_name['contextId'].message_type = context__pb2._CONTEXTID
_SLICEID.fields_by_name['slice_id'].message_type = context__pb2._UUID
_SLICESTATUS.fields_by_name['slice_id'].message_type = _SLICEID
_SLICESTATUS.fields_by_name['status'].enum_type = _SLICESTATUSENUM
DESCRIPTOR.message_types_by_name['SliceEndpoint'] = _SLICEENDPOINT
DESCRIPTOR.message_types_by_name['TransportSlice'] = _TRANSPORTSLICE
DESCRIPTOR.message_types_by_name['SliceId'] = _SLICEID
DESCRIPTOR.message_types_by_name['SliceStatus'] = _SLICESTATUS
DESCRIPTOR.enum_types_by_name['SliceStatusEnum'] = _SLICESTATUSENUM
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
SliceEndpoint = _reflection.GeneratedProtocolMessageType('SliceEndpoint', (_message.Message,), {
'DESCRIPTOR' : _SLICEENDPOINT,
'__module__' : 'slice_pb2'
# @@protoc_insertion_point(class_scope:slice.SliceEndpoint)
})
_sym_db.RegisterMessage(SliceEndpoint)
TransportSlice = _reflection.GeneratedProtocolMessageType('TransportSlice', (_message.Message,), {
'DESCRIPTOR' : _TRANSPORTSLICE,
'__module__' : 'slice_pb2'
# @@protoc_insertion_point(class_scope:slice.TransportSlice)
})
_sym_db.RegisterMessage(TransportSlice)
SliceId = _reflection.GeneratedProtocolMessageType('SliceId', (_message.Message,), {
'DESCRIPTOR' : _SLICEID,
'__module__' : 'slice_pb2'
# @@protoc_insertion_point(class_scope:slice.SliceId)
})
_sym_db.RegisterMessage(SliceId)
SliceStatus = _reflection.GeneratedProtocolMessageType('SliceStatus', (_message.Message,), {
'DESCRIPTOR' : _SLICESTATUS,
'__module__' : 'slice_pb2'
# @@protoc_insertion_point(class_scope:slice.SliceStatus)
})
_sym_db.RegisterMessage(SliceStatus)
_SLICESERVICE = _descriptor.ServiceDescriptor( _SLICESERVICE = _descriptor.ServiceDescriptor(
...@@ -299,16 +37,16 @@ _SLICESERVICE = _descriptor.ServiceDescriptor( ...@@ -299,16 +37,16 @@ _SLICESERVICE = _descriptor.ServiceDescriptor(
index=0, index=0,
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_start=576, serialized_start=37,
serialized_end=712, serialized_end=157,
methods=[ methods=[
_descriptor.MethodDescriptor( _descriptor.MethodDescriptor(
name='CreateUpdateSlice', name='CreateUpdateSlice',
full_name='slice.SliceService.CreateUpdateSlice', full_name='slice.SliceService.CreateUpdateSlice',
index=0, index=0,
containing_service=None, containing_service=None,
input_type=_TRANSPORTSLICE, input_type=context__pb2._SLICE,
output_type=_SLICESTATUS, output_type=context__pb2._SLICEID,
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
), ),
...@@ -317,7 +55,7 @@ _SLICESERVICE = _descriptor.ServiceDescriptor( ...@@ -317,7 +55,7 @@ _SLICESERVICE = _descriptor.ServiceDescriptor(
full_name='slice.SliceService.DeleteSlice', full_name='slice.SliceService.DeleteSlice',
index=1, index=1,
containing_service=None, containing_service=None,
input_type=_TRANSPORTSLICE, input_type=context__pb2._SLICE,
output_type=context__pb2._EMPTY, output_type=context__pb2._EMPTY,
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
......
File mode changed from 100644 to 100755
# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
...@@ -11,6 +11,7 @@ from google.protobuf import symbol_database as _symbol_database ...@@ -11,6 +11,7 @@ from google.protobuf import symbol_database as _symbol_database
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
from . import context_pb2 as context__pb2
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
...@@ -19,129 +20,93 @@ DESCRIPTOR = _descriptor.FileDescriptor( ...@@ -19,129 +20,93 @@ DESCRIPTOR = _descriptor.FileDescriptor(
syntax='proto3', syntax='proto3',
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x18l3_attackmitigator.proto\"2\n\x0e\x45mptyMitigator\x12\x14\n\x07message\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_message\"\xf9\x01\n\x06Output\x12\x12\n\nconfidence\x18\x01 \x01(\x02\x12\x11\n\ttimestamp\x18\x02 \x01(\t\x12\x0c\n\x04ip_o\x18\x03 \x01(\t\x12\x10\n\x08tag_name\x18\x04 \x01(\t\x12\x0b\n\x03tag\x18\x05 \x01(\x05\x12\x0f\n\x07\x66low_id\x18\x06 \x01(\t\x12\x10\n\x08protocol\x18\x07 \x01(\t\x12\x0e\n\x06port_d\x18\x08 \x01(\t\x12\x12\n\x05ml_id\x18\t \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntime_start\x18\n \x01(\x02H\x01\x88\x01\x01\x12\x15\n\x08time_end\x18\x0b \x01(\x02H\x02\x88\x01\x01\x42\x08\n\x06_ml_idB\r\n\x0b_time_startB\x0b\n\t_time_end2r\n\x11L3Attackmitigator\x12(\n\nSendOutput\x12\x07.Output\x1a\x0f.EmptyMitigator\"\x00\x12\x33\n\rGetMitigation\x12\x0f.EmptyMitigator\x1a\x0f.EmptyMitigator\"\x00\x62\x06proto3' serialized_pb=b'\n\x18l3_attackmitigator.proto\x1a\rcontext.proto\"\xd5\x01\n\x17L3AttackmitigatorOutput\x12\x12\n\nconfidence\x18\x01 \x01(\x02\x12\x11\n\ttimestamp\x18\x02 \x01(\t\x12\x0c\n\x04ip_o\x18\x03 \x01(\t\x12\x10\n\x08tag_name\x18\x04 \x01(\t\x12\x0b\n\x03tag\x18\x05 \x01(\x05\x12\x0f\n\x07\x66low_id\x18\x06 \x01(\t\x12\x10\n\x08protocol\x18\x07 \x01(\t\x12\x0e\n\x06port_d\x18\x08 \x01(\t\x12\r\n\x05ml_id\x18\t \x01(\t\x12\x12\n\ntime_start\x18\n \x01(\x02\x12\x10\n\x08time_end\x18\x0b \x01(\x02\x32\x80\x01\n\x11L3Attackmitigator\x12\x38\n\nSendOutput\x12\x18.L3AttackmitigatorOutput\x1a\x0e.context.Empty\"\x00\x12\x31\n\rGetMitigation\x12\x0e.context.Empty\x1a\x0e.context.Empty\"\x00\x62\x06proto3'
) ,
dependencies=[context__pb2.DESCRIPTOR,])
_EMPTYMITIGATOR = _descriptor.Descriptor( _L3ATTACKMITIGATOROUTPUT = _descriptor.Descriptor(
name='EmptyMitigator', name='L3AttackmitigatorOutput',
full_name='EmptyMitigator', full_name='L3AttackmitigatorOutput',
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='message', full_name='EmptyMitigator.message', index=0, name='confidence', full_name='L3AttackmitigatorOutput.confidence', 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,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='_message', full_name='EmptyMitigator._message',
index=0, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
],
serialized_start=28,
serialized_end=78,
)
_OUTPUT = _descriptor.Descriptor(
name='Output',
full_name='Output',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='confidence', full_name='Output.confidence', index=0,
number=1, type=2, cpp_type=6, label=1, number=1, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=float(0), has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='timestamp', full_name='Output.timestamp', index=1, name='timestamp', full_name='L3AttackmitigatorOutput.timestamp', index=1,
number=2, type=9, cpp_type=9, label=1, number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'), has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='ip_o', full_name='Output.ip_o', index=2, name='ip_o', full_name='L3AttackmitigatorOutput.ip_o', index=2,
number=3, type=9, cpp_type=9, label=1, number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'), has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='tag_name', full_name='Output.tag_name', index=3, name='tag_name', full_name='L3AttackmitigatorOutput.tag_name', index=3,
number=4, type=9, cpp_type=9, label=1, number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'), has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='tag', full_name='Output.tag', index=4, name='tag', full_name='L3AttackmitigatorOutput.tag', index=4,
number=5, type=5, cpp_type=1, label=1, number=5, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0, has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='flow_id', full_name='Output.flow_id', index=5, name='flow_id', full_name='L3AttackmitigatorOutput.flow_id', index=5,
number=6, type=9, cpp_type=9, label=1, number=6, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'), has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='protocol', full_name='Output.protocol', index=6, name='protocol', full_name='L3AttackmitigatorOutput.protocol', index=6,
number=7, type=9, cpp_type=9, label=1, number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'), has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='port_d', full_name='Output.port_d', index=7, name='port_d', full_name='L3AttackmitigatorOutput.port_d', index=7,
number=8, type=9, cpp_type=9, label=1, number=8, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'), has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='ml_id', full_name='Output.ml_id', index=8, name='ml_id', full_name='L3AttackmitigatorOutput.ml_id', index=8,
number=9, type=9, cpp_type=9, label=1, number=9, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'), has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='time_start', full_name='Output.time_start', index=9, name='time_start', full_name='L3AttackmitigatorOutput.time_start', index=9,
number=10, type=2, cpp_type=6, label=1, number=10, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=float(0), has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='time_end', full_name='Output.time_end', index=10, name='time_end', full_name='L3AttackmitigatorOutput.time_end', index=10,
number=11, type=2, cpp_type=6, label=1, number=11, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=float(0), has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None, message_type=None, enum_type=None, containing_type=None,
...@@ -158,55 +123,20 @@ _OUTPUT = _descriptor.Descriptor( ...@@ -158,55 +123,20 @@ _OUTPUT = _descriptor.Descriptor(
syntax='proto3', syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
_descriptor.OneofDescriptor(
name='_ml_id', full_name='Output._ml_id',
index=0, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_time_start', full_name='Output._time_start',
index=1, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_time_end', full_name='Output._time_end',
index=2, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
], ],
serialized_start=81, serialized_start=44,
serialized_end=330, serialized_end=257,
) )
_EMPTYMITIGATOR.oneofs_by_name['_message'].fields.append( DESCRIPTOR.message_types_by_name['L3AttackmitigatorOutput'] = _L3ATTACKMITIGATOROUTPUT
_EMPTYMITIGATOR.fields_by_name['message'])
_EMPTYMITIGATOR.fields_by_name['message'].containing_oneof = _EMPTYMITIGATOR.oneofs_by_name['_message']
_OUTPUT.oneofs_by_name['_ml_id'].fields.append(
_OUTPUT.fields_by_name['ml_id'])
_OUTPUT.fields_by_name['ml_id'].containing_oneof = _OUTPUT.oneofs_by_name['_ml_id']
_OUTPUT.oneofs_by_name['_time_start'].fields.append(
_OUTPUT.fields_by_name['time_start'])
_OUTPUT.fields_by_name['time_start'].containing_oneof = _OUTPUT.oneofs_by_name['_time_start']
_OUTPUT.oneofs_by_name['_time_end'].fields.append(
_OUTPUT.fields_by_name['time_end'])
_OUTPUT.fields_by_name['time_end'].containing_oneof = _OUTPUT.oneofs_by_name['_time_end']
DESCRIPTOR.message_types_by_name['EmptyMitigator'] = _EMPTYMITIGATOR
DESCRIPTOR.message_types_by_name['Output'] = _OUTPUT
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
EmptyMitigator = _reflection.GeneratedProtocolMessageType('EmptyMitigator', (_message.Message,), { L3AttackmitigatorOutput = _reflection.GeneratedProtocolMessageType('L3AttackmitigatorOutput', (_message.Message,), {
'DESCRIPTOR' : _EMPTYMITIGATOR, 'DESCRIPTOR' : _L3ATTACKMITIGATOROUTPUT,
'__module__' : 'l3_attackmitigator_pb2'
# @@protoc_insertion_point(class_scope:EmptyMitigator)
})
_sym_db.RegisterMessage(EmptyMitigator)
Output = _reflection.GeneratedProtocolMessageType('Output', (_message.Message,), {
'DESCRIPTOR' : _OUTPUT,
'__module__' : 'l3_attackmitigator_pb2' '__module__' : 'l3_attackmitigator_pb2'
# @@protoc_insertion_point(class_scope:Output) # @@protoc_insertion_point(class_scope:L3AttackmitigatorOutput)
}) })
_sym_db.RegisterMessage(Output) _sym_db.RegisterMessage(L3AttackmitigatorOutput)
...@@ -217,16 +147,16 @@ _L3ATTACKMITIGATOR = _descriptor.ServiceDescriptor( ...@@ -217,16 +147,16 @@ _L3ATTACKMITIGATOR = _descriptor.ServiceDescriptor(
index=0, index=0,
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_start=332, serialized_start=260,
serialized_end=446, serialized_end=388,
methods=[ methods=[
_descriptor.MethodDescriptor( _descriptor.MethodDescriptor(
name='SendOutput', name='SendOutput',
full_name='L3Attackmitigator.SendOutput', full_name='L3Attackmitigator.SendOutput',
index=0, index=0,
containing_service=None, containing_service=None,
input_type=_OUTPUT, input_type=_L3ATTACKMITIGATOROUTPUT,
output_type=_EMPTYMITIGATOR, output_type=context__pb2._EMPTY,
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
), ),
...@@ -235,8 +165,8 @@ _L3ATTACKMITIGATOR = _descriptor.ServiceDescriptor( ...@@ -235,8 +165,8 @@ _L3ATTACKMITIGATOR = _descriptor.ServiceDescriptor(
full_name='L3Attackmitigator.GetMitigation', full_name='L3Attackmitigator.GetMitigation',
index=1, index=1,
containing_service=None, containing_service=None,
input_type=_EMPTYMITIGATOR, input_type=context__pb2._EMPTY,
output_type=_EMPTYMITIGATOR, output_type=context__pb2._EMPTY,
serialized_options=None, serialized_options=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
), ),
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"""Client and server classes corresponding to protobuf-defined services.""" """Client and server classes corresponding to protobuf-defined services."""
import grpc import grpc
from . import context_pb2 as context__pb2
from . import l3_attackmitigator_pb2 as l3__attackmitigator__pb2 from . import l3_attackmitigator_pb2 as l3__attackmitigator__pb2
...@@ -17,13 +17,13 @@ class L3AttackmitigatorStub(object): ...@@ -17,13 +17,13 @@ class L3AttackmitigatorStub(object):
""" """
self.SendOutput = channel.unary_unary( self.SendOutput = channel.unary_unary(
'/L3Attackmitigator/SendOutput', '/L3Attackmitigator/SendOutput',
request_serializer=l3__attackmitigator__pb2.Output.SerializeToString, request_serializer=l3__attackmitigator__pb2.L3AttackmitigatorOutput.SerializeToString,
response_deserializer=l3__attackmitigator__pb2.EmptyMitigator.FromString, response_deserializer=context__pb2.Empty.FromString,
) )
self.GetMitigation = channel.unary_unary( self.GetMitigation = channel.unary_unary(
'/L3Attackmitigator/GetMitigation', '/L3Attackmitigator/GetMitigation',
request_serializer=l3__attackmitigator__pb2.EmptyMitigator.SerializeToString, request_serializer=context__pb2.Empty.SerializeToString,
response_deserializer=l3__attackmitigator__pb2.EmptyMitigator.FromString, response_deserializer=context__pb2.Empty.FromString,
) )
...@@ -49,13 +49,13 @@ def add_L3AttackmitigatorServicer_to_server(servicer, server): ...@@ -49,13 +49,13 @@ def add_L3AttackmitigatorServicer_to_server(servicer, server):
rpc_method_handlers = { rpc_method_handlers = {
'SendOutput': grpc.unary_unary_rpc_method_handler( 'SendOutput': grpc.unary_unary_rpc_method_handler(
servicer.SendOutput, servicer.SendOutput,
request_deserializer=l3__attackmitigator__pb2.Output.FromString, request_deserializer=l3__attackmitigator__pb2.L3AttackmitigatorOutput.FromString,
response_serializer=l3__attackmitigator__pb2.EmptyMitigator.SerializeToString, response_serializer=context__pb2.Empty.SerializeToString,
), ),
'GetMitigation': grpc.unary_unary_rpc_method_handler( 'GetMitigation': grpc.unary_unary_rpc_method_handler(
servicer.GetMitigation, servicer.GetMitigation,
request_deserializer=l3__attackmitigator__pb2.EmptyMitigator.FromString, request_deserializer=context__pb2.Empty.FromString,
response_serializer=l3__attackmitigator__pb2.EmptyMitigator.SerializeToString, response_serializer=context__pb2.Empty.SerializeToString,
), ),
} }
generic_handler = grpc.method_handlers_generic_handler( generic_handler = grpc.method_handlers_generic_handler(
...@@ -79,8 +79,8 @@ class L3Attackmitigator(object): ...@@ -79,8 +79,8 @@ class L3Attackmitigator(object):
timeout=None, timeout=None,
metadata=None): metadata=None):
return grpc.experimental.unary_unary(request, target, '/L3Attackmitigator/SendOutput', return grpc.experimental.unary_unary(request, target, '/L3Attackmitigator/SendOutput',
l3__attackmitigator__pb2.Output.SerializeToString, l3__attackmitigator__pb2.L3AttackmitigatorOutput.SerializeToString,
l3__attackmitigator__pb2.EmptyMitigator.FromString, context__pb2.Empty.FromString,
options, channel_credentials, options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata) insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
...@@ -96,7 +96,7 @@ class L3Attackmitigator(object): ...@@ -96,7 +96,7 @@ class L3Attackmitigator(object):
timeout=None, timeout=None,
metadata=None): metadata=None):
return grpc.experimental.unary_unary(request, target, '/L3Attackmitigator/GetMitigation', return grpc.experimental.unary_unary(request, target, '/L3Attackmitigator/GetMitigation',
l3__attackmitigator__pb2.EmptyMitigator.SerializeToString, context__pb2.Empty.SerializeToString,
l3__attackmitigator__pb2.EmptyMitigator.FromString, context__pb2.Empty.FromString,
options, channel_credentials, options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata) insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment