From ee02870cfb862ce5c52eb9f4a82b93be5ebf64db Mon Sep 17 00:00:00 2001 From: PArmingol <pablo.armingolrobles@telefonica.com> Date: Thu, 8 Feb 2024 12:55:48 +0100 Subject: [PATCH] code cleanup --- .../tid/bgp4Peer/peer/SaveTopologyinDB.java | 15 +++++++++ .../src/main/proto/grpcService.proto | 18 ++++++++--- .../src/main/proto/updateServiceGrpc.java | 32 +++++++++++++------ .../service/tools/protos/grpcService.proto | 14 ++++++++ src/common/Constants.py | 2 +- 5 files changed, 67 insertions(+), 14 deletions(-) diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SaveTopologyinDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SaveTopologyinDB.java index 83e8e225e..bd27bb87a 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SaveTopologyinDB.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SaveTopologyinDB.java @@ -1,3 +1,18 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + +// 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. + + package eu.teraflow.tid.bgp4Peer.peer; import java.net.Inet4Address; diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/proto/grpcService.proto b/src/bgpls_speaker/service/java/netphony-topology/src/main/proto/grpcService.proto index 746c47942..ec8accd8b 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/proto/grpcService.proto +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/proto/grpcService.proto @@ -1,10 +1,20 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// 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. + syntax = "proto3"; package src.main.proto; -//el modulo java abre la comunicacion -//cliente(java) manda la info al servidor(python) -//el modulo en python responde con ok - message updateRequest { string addressFamilyID = 1; diff --git a/src/bgpls_speaker/service/java/netphony-topology/target/generated-sources/protobuf/grpc-java/src/main/proto/updateServiceGrpc.java b/src/bgpls_speaker/service/java/netphony-topology/target/generated-sources/protobuf/grpc-java/src/main/proto/updateServiceGrpc.java index ebf16742a..7b6ef8da0 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/target/generated-sources/protobuf/grpc-java/src/main/proto/updateServiceGrpc.java +++ b/src/bgpls_speaker/service/java/netphony-topology/target/generated-sources/protobuf/grpc-java/src/main/proto/updateServiceGrpc.java @@ -1,3 +1,17 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + +// 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. + package src.main.proto; import static io.grpc.MethodDescriptor.generateFullMethodName; @@ -17,7 +31,7 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; /** * <pre> - * Defining a Service, a Service can have multiple RPC operations + * Defining a Service, a Service can have multiple RPC operations * </pre> */ @javax.annotation.Generated( @@ -86,14 +100,14 @@ public final class updateServiceGrpc { /** * <pre> - * Defining a Service, a Service can have multiple RPC operations + * Defining a Service, a Service can have multiple RPC operations * </pre> */ public static abstract class updateServiceImplBase implements io.grpc.BindableService { /** * <pre> - * MODIFY HERE: Update the return to streaming return. + * MODIFY HERE: Update the return to streaming return. * </pre> */ public void update(src.main.proto.GrpcService.updateRequest request, @@ -116,7 +130,7 @@ public final class updateServiceGrpc { /** * <pre> - * Defining a Service, a Service can have multiple RPC operations + * Defining a Service, a Service can have multiple RPC operations * </pre> */ public static final class updateServiceStub extends io.grpc.stub.AbstractStub<updateServiceStub> { @@ -137,7 +151,7 @@ public final class updateServiceGrpc { /** * <pre> - * MODIFY HERE: Update the return to streaming return. + * MODIFY HERE: Update the return to streaming return. * </pre> */ public void update(src.main.proto.GrpcService.updateRequest request, @@ -149,7 +163,7 @@ public final class updateServiceGrpc { /** * <pre> - * Defining a Service, a Service can have multiple RPC operations + * Defining a Service, a Service can have multiple RPC operations * </pre> */ public static final class updateServiceBlockingStub extends io.grpc.stub.AbstractStub<updateServiceBlockingStub> { @@ -170,7 +184,7 @@ public final class updateServiceGrpc { /** * <pre> - * MODIFY HERE: Update the return to streaming return. + * MODIFY HERE: Update the return to streaming return. * </pre> */ public src.main.proto.GrpcService.updateResponse update(src.main.proto.GrpcService.updateRequest request) { @@ -181,7 +195,7 @@ public final class updateServiceGrpc { /** * <pre> - * Defining a Service, a Service can have multiple RPC operations + * Defining a Service, a Service can have multiple RPC operations * </pre> */ public static final class updateServiceFutureStub extends io.grpc.stub.AbstractStub<updateServiceFutureStub> { @@ -202,7 +216,7 @@ public final class updateServiceGrpc { /** * <pre> - * MODIFY HERE: Update the return to streaming return. + * MODIFY HERE: Update the return to streaming return. * </pre> */ public com.google.common.util.concurrent.ListenableFuture<src.main.proto.GrpcService.updateResponse> update( diff --git a/src/bgpls_speaker/service/tools/protos/grpcService.proto b/src/bgpls_speaker/service/tools/protos/grpcService.proto index 8d73bd734..7aba63912 100644 --- a/src/bgpls_speaker/service/tools/protos/grpcService.proto +++ b/src/bgpls_speaker/service/tools/protos/grpcService.proto @@ -1,3 +1,17 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// 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. + syntax = "proto3"; package src.main.proto; diff --git a/src/common/Constants.py b/src/common/Constants.py index 0819c6e99..c7ba01f69 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -16,7 +16,7 @@ import logging from enum import Enum # Default logging level -DEFAULT_LOG_LEVEL = logging.DEBUG +DEFAULT_LOG_LEVEL = logging.WARNING # Default gRPC server settings DEFAULT_GRPC_BIND_ADDRESS = '0.0.0.0' -- GitLab