From 2f520913862c7a0ae55f23f8588c199bf6e57df8 Mon Sep 17 00:00:00 2001 From: gifrerenom <lluis.gifre@cttc.es> Date: Fri, 2 Dec 2022 13:38:41 +0000 Subject: [PATCH] Common: - Increased default gRPC workers from 10 to 200 - added object factory methods for L2NM services --- src/common/Constants.py | 2 +- src/common/tools/object_factory/Service.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/common/Constants.py b/src/common/Constants.py index 964d904da..ffdfbc4e0 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -20,7 +20,7 @@ DEFAULT_LOG_LEVEL = logging.WARNING # Default gRPC server settings DEFAULT_GRPC_BIND_ADDRESS = '0.0.0.0' -DEFAULT_GRPC_MAX_WORKERS = 10 +DEFAULT_GRPC_MAX_WORKERS = 200 DEFAULT_GRPC_GRACE_PERIOD = 60 # Default HTTP server settings diff --git a/src/common/tools/object_factory/Service.py b/src/common/tools/object_factory/Service.py index 62f3dcbda..829c2f667 100644 --- a/src/common/tools/object_factory/Service.py +++ b/src/common/tools/object_factory/Service.py @@ -42,6 +42,16 @@ def json_service( 'service_config' : {'config_rules': copy.deepcopy(config_rules)}, } +def json_service_l2nm_planned( + service_uuid : str, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [], + config_rules : List[Dict] = [], context_uuid : str = DEFAULT_CONTEXT_UUID + ): + + return json_service( + service_uuid, ServiceTypeEnum.SERVICETYPE_L2NM, context_id=json_context_id(context_uuid), + status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints, + config_rules=config_rules) + def json_service_l3nm_planned( service_uuid : str, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [], config_rules : List[Dict] = [], context_uuid : str = DEFAULT_CONTEXT_UUID -- GitLab