From f132e3b05c231ddcd26facfb36c9d47b7ad56dca Mon Sep 17 00:00:00 2001 From: "agbarneo@optaresolutions.com" <agbarneo@optaresolutions.com> Date: Tue, 24 Sep 2024 09:14:32 +0000 Subject: [PATCH] Changed App by QKDApp and included qkd_app into proto and left object_factory --- .../service/database/models/enums/__init__.py | 0 src/common/Constants.py | 8 +++---- src/common/tools/object_factory/QKDApp.py | 24 +++++++++++++++++++ src/{app => qkd_app}/__init__.py | 0 src/{app => qkd_app}/__main__.py | 10 ++++---- .../client/QKDAppClient.py} | 2 +- src/{app => qkd_app}/client/__init__.py | 0 .../service/QKDAppService.py} | 4 ++-- .../service/QKDAppServiceServicerImpl.py} | 8 +++---- .../service/database/Engine.py | 0 .../service/database/QKDApp.py} | 8 +++---- .../service/database/__init__.py | 0 .../service/database/models/QKDAppModel.py} | 2 +- .../service/database/models/_Base.py | 0 .../service/database/models/__init__.py | 0 .../database/models/enums/QKDAppStatus.py | 2 +- .../database/models/enums/QKDAppTypes.py | 2 +- .../database/models/enums/_GrpcToEnum.py | 0 .../service/database/models/enums/__init__.py | 13 ++++++++++ .../service/database/uuids/QKDApp.py} | 2 +- .../service/database/uuids/_Builder.py | 0 .../service/rest_server/RestServer.py | 0 .../service/rest_server/__init__.py | 0 .../service/rest_server/qkd_app/Resources.py | 8 +++---- .../service/rest_server/qkd_app/__init__.py | 4 ++-- .../qkd/qkd_service_handler.py | 2 +- .../service/task_scheduler/TaskExecutor.py | 8 +++---- src/service/service/tools/ObjectKeys.py | 2 +- 28 files changed, 73 insertions(+), 36 deletions(-) delete mode 100644 src/app/service/database/models/enums/__init__.py create mode 100644 src/common/tools/object_factory/QKDApp.py rename src/{app => qkd_app}/__init__.py (100%) rename src/{app => qkd_app}/__main__.py (91%) rename src/{app/client/AppClient.py => qkd_app/client/QKDAppClient.py} (99%) rename src/{app => qkd_app}/client/__init__.py (100%) rename src/{app/service/AppService.py => qkd_app/service/QKDAppService.py} (91%) rename src/{app/AppServiceServicerImpl.py => qkd_app/service/QKDAppServiceServicerImpl.py} (92%) rename src/{app => qkd_app}/service/database/Engine.py (100%) rename src/{app/service/database/App.py => qkd_app/service/database/QKDApp.py} (97%) rename src/{app => qkd_app}/service/database/__init__.py (100%) rename src/{app/service/database/models/AppModel.py => qkd_app/service/database/models/QKDAppModel.py} (98%) rename src/{app => qkd_app}/service/database/models/_Base.py (100%) rename src/{app => qkd_app}/service/database/models/__init__.py (100%) rename src/{app => qkd_app}/service/database/models/enums/QKDAppStatus.py (95%) rename src/{app => qkd_app}/service/database/models/enums/QKDAppTypes.py (94%) rename src/{app => qkd_app}/service/database/models/enums/_GrpcToEnum.py (100%) create mode 100644 src/qkd_app/service/database/models/enums/__init__.py rename src/{app/service/database/uuids/App.py => qkd_app/service/database/uuids/QKDApp.py} (92%) rename src/{app => qkd_app}/service/database/uuids/_Builder.py (100%) rename src/{app => qkd_app}/service/rest_server/RestServer.py (100%) rename src/{app => qkd_app}/service/rest_server/__init__.py (100%) rename src/{app => qkd_app}/service/rest_server/qkd_app/Resources.py (94%) rename src/{app => qkd_app}/service/rest_server/qkd_app/__init__.py (93%) diff --git a/src/app/service/database/models/enums/__init__.py b/src/app/service/database/models/enums/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/common/Constants.py b/src/common/Constants.py index 7194cf7a2..8b2e215a0 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -61,7 +61,7 @@ class ServiceNameEnum(Enum): E2EORCHESTRATOR = 'e2e-orchestrator' OPTICALCONTROLLER = 'opticalcontroller' BGPLS = 'bgpls-speaker' - APP = 'app' + QKD_APP = 'qkd_app' KPIMANAGER = 'kpi-manager' KPIVALUEAPI = 'kpi-value-api' KPIVALUEWRITER = 'kpi-value-writer' @@ -97,7 +97,7 @@ DEFAULT_SERVICE_GRPC_PORTS = { ServiceNameEnum.FORECASTER .value : 10040, ServiceNameEnum.E2EORCHESTRATOR .value : 10050, ServiceNameEnum.OPTICALCONTROLLER .value : 10060, - ServiceNameEnum.APP .value : 10070, + ServiceNameEnum.QKD_APP .value : 10070, ServiceNameEnum.BGPLS .value : 20030, ServiceNameEnum.KPIMANAGER .value : 30010, ServiceNameEnum.KPIVALUEAPI .value : 30020, @@ -117,12 +117,12 @@ DEFAULT_SERVICE_HTTP_PORTS = { ServiceNameEnum.CONTEXT .value : 8080, ServiceNameEnum.NBI .value : 8080, ServiceNameEnum.WEBUI .value : 8004, - ServiceNameEnum.APP .value : 8005, + ServiceNameEnum.QKD_APP .value : 8005, } # Default HTTP/REST-API service base URLs DEFAULT_SERVICE_HTTP_BASEURLS = { ServiceNameEnum.NBI .value : None, ServiceNameEnum.WEBUI .value : None, - ServiceNameEnum.APP .value : None, + ServiceNameEnum.QKD_APP .value : None, } diff --git a/src/common/tools/object_factory/QKDApp.py b/src/common/tools/object_factory/QKDApp.py new file mode 100644 index 000000000..e2ea688b9 --- /dev/null +++ b/src/common/tools/object_factory/QKDApp.py @@ -0,0 +1,24 @@ +# 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. + +import copy +from typing import Dict, List, Optional +from common.Constants import DEFAULT_CONTEXT_NAME +from common.tools.object_factory.Context import json_context_id + + +def json_app_id(app_uuid : str, context_id : Optional[Dict] = None) -> Dict: + result = {'app_uuid': {'uuid': app_uuid}} + if context_id is not None: result['context_id'] = copy.deepcopy(context_id) + return result diff --git a/src/app/__init__.py b/src/qkd_app/__init__.py similarity index 100% rename from src/app/__init__.py rename to src/qkd_app/__init__.py diff --git a/src/app/__main__.py b/src/qkd_app/__main__.py similarity index 91% rename from src/app/__main__.py rename to src/qkd_app/__main__.py index 1521e4951..8cf383c25 100644 --- a/src/app/__main__.py +++ b/src/qkd_app/__main__.py @@ -18,13 +18,13 @@ from common.Constants import ServiceNameEnum from common.Settings import ( ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, get_log_level, get_metrics_port, wait_for_environment_variables) -from .AppService import AppService -from .rest_server.RestServer import RestServer -from .rest_server.qkd_app import register_qkd_app +from qkd_app.service.QKDAppService import AppService +from qkd_app.service.rest_server.RestServer import RestServer +from qkd_app.service.rest_server.qkd_app import register_qkd_app from common.message_broker.Factory import get_messagebroker_backend from common.message_broker.MessageBroker import MessageBroker -from .database.Engine import Engine -from .database.models._Base import rebuild_database +from qkd_app.service.database.Engine import Engine +from qkd_app.service.database.models._Base import rebuild_database terminate = threading.Event() LOGGER : logging.Logger = None diff --git a/src/app/client/AppClient.py b/src/qkd_app/client/QKDAppClient.py similarity index 99% rename from src/app/client/AppClient.py rename to src/qkd_app/client/QKDAppClient.py index 845d18f0c..d40e79cbd 100644 --- a/src/app/client/AppClient.py +++ b/src/qkd_app/client/QKDAppClient.py @@ -26,7 +26,7 @@ MAX_RETRIES = 15 DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') -class AppClient: +class QKDAppClient: def __init__(self, host=None, port=None): if not host: host = get_service_host(ServiceNameEnum.APP) if not port: port = get_service_port_grpc(ServiceNameEnum.APP) diff --git a/src/app/client/__init__.py b/src/qkd_app/client/__init__.py similarity index 100% rename from src/app/client/__init__.py rename to src/qkd_app/client/__init__.py diff --git a/src/app/service/AppService.py b/src/qkd_app/service/QKDAppService.py similarity index 91% rename from src/app/service/AppService.py rename to src/qkd_app/service/QKDAppService.py index 7cee05202..ed67d7aab 100644 --- a/src/app/service/AppService.py +++ b/src/qkd_app/service/QKDAppService.py @@ -16,9 +16,9 @@ import logging, sqlalchemy from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc from common.message_broker.MessageBroker import MessageBroker -from common.proto.app_qkd_pb2_grpc import add_AppServiceServicer_to_server +from common.proto.qkd_app_pb2_grpc import add_AppServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService -from app.service.AppServiceServicerImpl import AppServiceServicerImpl +from qkd_app.service.QKDAppServiceServicerImpl import AppServiceServicerImpl # Custom gRPC settings GRPC_MAX_WORKERS = 200 # multiple clients might keep connections alive for Get*Events() RPC methods diff --git a/src/app/AppServiceServicerImpl.py b/src/qkd_app/service/QKDAppServiceServicerImpl.py similarity index 92% rename from src/app/AppServiceServicerImpl.py rename to src/qkd_app/service/QKDAppServiceServicerImpl.py index fbc5ce95a..4c1879f0c 100644 --- a/src/app/AppServiceServicerImpl.py +++ b/src/qkd_app/service/QKDAppServiceServicerImpl.py @@ -18,8 +18,8 @@ from common.message_broker.MessageBroker import MessageBroker import grpc, json, logging #, deepdiff from common.proto.context_pb2 import ( Empty, Service, ServiceId, ServiceStatusEnum, ServiceTypeEnum, ContextId) -from common.proto.app_qkd_pb2 import (App, AppId, AppList, QKDAppTypesEnum) -from common.proto.app_qkd_pb2_grpc import AppServiceServicer +from common.proto.qkd_app_pb2 import (App, AppId, AppList, QKDAppTypesEnum) +from common.proto.qkd_app_pb2_grpc import AppServiceServicer from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.tools.context_queries.InterDomain import is_inter_domain #, is_multi_domain from common.tools.grpc.ConfigRules import copy_config_rules @@ -28,8 +28,8 @@ from common.tools.grpc.EndPointIds import copy_endpoint_ids from common.tools.grpc.ServiceIds import update_service_ids #from common.tools.grpc.Tools import grpc_message_to_json_string from context.client.ContextClient import ContextClient -from app.client.AppClient import AppClient -from .database.App import app_set, app_list_objs, app_get, app_get_by_server +from qkd_app.client.QKDAppClient import QKDAppClient +from .database.QKDApp import app_set, app_list_objs, app_get, app_get_by_server from common.method_wrappers.ServiceExceptions import NotFoundException LOGGER = logging.getLogger(__name__) diff --git a/src/app/service/database/Engine.py b/src/qkd_app/service/database/Engine.py similarity index 100% rename from src/app/service/database/Engine.py rename to src/qkd_app/service/database/Engine.py diff --git a/src/app/service/database/App.py b/src/qkd_app/service/database/QKDApp.py similarity index 97% rename from src/app/service/database/App.py rename to src/qkd_app/service/database/QKDApp.py index f1c8e5953..16f1264c5 100644 --- a/src/app/service/database/App.py +++ b/src/qkd_app/service/database/QKDApp.py @@ -21,15 +21,15 @@ from typing import Dict, List, Optional, Set, Tuple from common.method_wrappers.ServiceExceptions import InvalidArgumentException, NotFoundException from common.message_broker.MessageBroker import MessageBroker from common.proto.context_pb2 import Empty -from common.proto.app_qkd_pb2 import ( +from common.proto.qkd_app_pb2 import ( AppList, App, AppId) from common.tools.grpc.Tools import grpc_message_to_json_string -from .models.AppModel import AppModel +from .models.QKDAppModel import AppModel from .models.enums.QKDAppStatus import grpc_to_enum__qkd_app_status from .models.enums.QKDAppTypes import grpc_to_enum__qkd_app_types -from .uuids.App import app_get_uuid +from .uuids.QKDApp import app_get_uuid from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.App import json_app_id +from common.tools.object_factory.QKDApp import json_app_id from context.service.database.uuids.Context import context_get_uuid diff --git a/src/app/service/database/__init__.py b/src/qkd_app/service/database/__init__.py similarity index 100% rename from src/app/service/database/__init__.py rename to src/qkd_app/service/database/__init__.py diff --git a/src/app/service/database/models/AppModel.py b/src/qkd_app/service/database/models/QKDAppModel.py similarity index 98% rename from src/app/service/database/models/AppModel.py rename to src/qkd_app/service/database/models/QKDAppModel.py index c12102946..1677a35e5 100644 --- a/src/app/service/database/models/AppModel.py +++ b/src/qkd_app/service/database/models/QKDAppModel.py @@ -22,7 +22,7 @@ from .enums.QKDAppStatus import ORM_QKDAppStatusEnum from .enums.QKDAppTypes import ORM_QKDAppTypesEnum class AppModel(_Base): - __tablename__ = 'app' + __tablename__ = 'qkd_app' app_uuid = Column(UUID(as_uuid=False), primary_key=True) context_uuid = Column(UUID(as_uuid=False), nullable=False) # Supposed to be Foreign Key diff --git a/src/app/service/database/models/_Base.py b/src/qkd_app/service/database/models/_Base.py similarity index 100% rename from src/app/service/database/models/_Base.py rename to src/qkd_app/service/database/models/_Base.py diff --git a/src/app/service/database/models/__init__.py b/src/qkd_app/service/database/models/__init__.py similarity index 100% rename from src/app/service/database/models/__init__.py rename to src/qkd_app/service/database/models/__init__.py diff --git a/src/app/service/database/models/enums/QKDAppStatus.py b/src/qkd_app/service/database/models/enums/QKDAppStatus.py similarity index 95% rename from src/app/service/database/models/enums/QKDAppStatus.py rename to src/qkd_app/service/database/models/enums/QKDAppStatus.py index 7928992b0..7a296b767 100644 --- a/src/app/service/database/models/enums/QKDAppStatus.py +++ b/src/qkd_app/service/database/models/enums/QKDAppStatus.py @@ -13,7 +13,7 @@ # limitations under the License. import enum, functools -from common.proto.app_qkd_pb2 import QKDAppStatusEnum +from common.proto.qkd_app_pb2 import QKDAppStatusEnum from ._GrpcToEnum import grpc_to_enum class ORM_QKDAppStatusEnum(enum.Enum): diff --git a/src/app/service/database/models/enums/QKDAppTypes.py b/src/qkd_app/service/database/models/enums/QKDAppTypes.py similarity index 94% rename from src/app/service/database/models/enums/QKDAppTypes.py rename to src/qkd_app/service/database/models/enums/QKDAppTypes.py index abca0f1b5..8ce88a9c5 100644 --- a/src/app/service/database/models/enums/QKDAppTypes.py +++ b/src/qkd_app/service/database/models/enums/QKDAppTypes.py @@ -13,7 +13,7 @@ # limitations under the License. import enum, functools -from common.proto.app_qkd_pb2 import QKDAppTypesEnum +from common.proto.qkd_app_pb2 import QKDAppTypesEnum from ._GrpcToEnum import grpc_to_enum class ORM_QKDAppTypesEnum(enum.Enum): diff --git a/src/app/service/database/models/enums/_GrpcToEnum.py b/src/qkd_app/service/database/models/enums/_GrpcToEnum.py similarity index 100% rename from src/app/service/database/models/enums/_GrpcToEnum.py rename to src/qkd_app/service/database/models/enums/_GrpcToEnum.py diff --git a/src/qkd_app/service/database/models/enums/__init__.py b/src/qkd_app/service/database/models/enums/__init__.py new file mode 100644 index 000000000..5648545ca --- /dev/null +++ b/src/qkd_app/service/database/models/enums/__init__.py @@ -0,0 +1,13 @@ +# 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. diff --git a/src/app/service/database/uuids/App.py b/src/qkd_app/service/database/uuids/QKDApp.py similarity index 92% rename from src/app/service/database/uuids/App.py rename to src/qkd_app/service/database/uuids/QKDApp.py index a68214735..acc31250a 100644 --- a/src/app/service/database/uuids/App.py +++ b/src/qkd_app/service/database/uuids/QKDApp.py @@ -1,4 +1,4 @@ -from common.proto.app_qkd_pb2 import AppId +from common.proto.qkd_app_pb2 import AppId from common.method_wrappers.ServiceExceptions import InvalidArgumentsException from ._Builder import get_uuid_from_string, get_uuid_random diff --git a/src/app/service/database/uuids/_Builder.py b/src/qkd_app/service/database/uuids/_Builder.py similarity index 100% rename from src/app/service/database/uuids/_Builder.py rename to src/qkd_app/service/database/uuids/_Builder.py diff --git a/src/app/service/rest_server/RestServer.py b/src/qkd_app/service/rest_server/RestServer.py similarity index 100% rename from src/app/service/rest_server/RestServer.py rename to src/qkd_app/service/rest_server/RestServer.py diff --git a/src/app/service/rest_server/__init__.py b/src/qkd_app/service/rest_server/__init__.py similarity index 100% rename from src/app/service/rest_server/__init__.py rename to src/qkd_app/service/rest_server/__init__.py diff --git a/src/app/service/rest_server/qkd_app/Resources.py b/src/qkd_app/service/rest_server/qkd_app/Resources.py similarity index 94% rename from src/app/service/rest_server/qkd_app/Resources.py rename to src/qkd_app/service/rest_server/qkd_app/Resources.py index 2c6b790b8..5caa4d58a 100644 --- a/src/app/service/rest_server/qkd_app/Resources.py +++ b/src/qkd_app/service/rest_server/qkd_app/Resources.py @@ -16,17 +16,17 @@ import uuid, json from flask import request from flask_restful import Resource from common.proto.context_pb2 import Empty -from common.proto.app_qkd_pb2 import App, QKDAppTypesEnum +from common.proto.qkd_app_pb2 import App, QKDAppTypesEnum from common.Constants import DEFAULT_CONTEXT_NAME from context.client.ContextClient import ContextClient -from app.client.AppClient import AppClient +from qkd_app.client.QKDAppClient import QKDAppClient class _Resource(Resource): def __init__(self) -> None: super().__init__() self.context_client = ContextClient() - self.app_client = AppClient() + self.qkd_app_client = QKDAppClient() class Index(_Resource): def get(self): @@ -79,7 +79,7 @@ class CreateQKDApp(_Resource): # Optare: This will call our internal RegisterApp which supports the creation of both internal and external app. # Optare the verification for knowing if two parties are requesting the same app is done inside RegisterApp's function - self.app_client.RegisterApp(App(**external_app_src_dst)) + self.qkd_app_client.RegisterApp(App(**external_app_src_dst)) # Optare: Todo: Communicate by SBI with both Nodes of the new App diff --git a/src/app/service/rest_server/qkd_app/__init__.py b/src/qkd_app/service/rest_server/qkd_app/__init__.py similarity index 93% rename from src/app/service/rest_server/qkd_app/__init__.py rename to src/qkd_app/service/rest_server/qkd_app/__init__.py index 9a1ec230c..469f12243 100644 --- a/src/app/service/rest_server/qkd_app/__init__.py +++ b/src/qkd_app/service/rest_server/qkd_app/__init__.py @@ -12,11 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -from app.service.rest_server.RestServer import RestServer +from qkd_app.service.rest_server.RestServer import RestServer from .Resources import ( CreateQKDApp, Index) -URL_PREFIX = '/app' +URL_PREFIX = '/qkd_app' # Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. RESOURCES = [ diff --git a/src/service/service/service_handlers/qkd/qkd_service_handler.py b/src/service/service/service_handlers/qkd/qkd_service_handler.py index 30924ee9d..097738800 100644 --- a/src/service/service/service_handlers/qkd/qkd_service_handler.py +++ b/src/service/service/service_handlers/qkd/qkd_service_handler.py @@ -17,7 +17,7 @@ import json, logging, uuid from typing import Any, Dict, List, Optional, Tuple, Union from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.proto.context_pb2 import ConfigRule, DeviceId, Service -from common.proto.app_qkd_pb2 import App, QKDAppStatusEnum, QKDAppTypesEnum +from common.proto.qkd_app_pb2 import App, QKDAppStatusEnum, QKDAppTypesEnum from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set from common.tools.object_factory.Device import json_device_id from common.type_checkers.Checkers import chk_type diff --git a/src/service/service/task_scheduler/TaskExecutor.py b/src/service/service/task_scheduler/TaskExecutor.py index f9260233b..cff9d3aaa 100644 --- a/src/service/service/task_scheduler/TaskExecutor.py +++ b/src/service/service/task_scheduler/TaskExecutor.py @@ -20,7 +20,7 @@ from common.proto.context_pb2 import ( Connection, ConnectionId, Device, DeviceDriverEnum, DeviceId, Service, ServiceId, OpticalConfig, OpticalConfigId ) -from common.proto.app_qkd_pb2 import App +from common.proto.qkd_app_pb2 import App from common.tools.context_queries.Connection import get_connection_by_id from common.tools.context_queries.Device import get_device from common.tools.context_queries.Service import get_service_by_id @@ -28,7 +28,7 @@ from common.tools.grpc.Tools import grpc_message_to_json_string from common.tools.object_factory.Device import json_device_id from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient -from app.client.AppClient import AppClient +from app.client.QKDAppClient import QKDAppClient from service.service.service_handler_api.Exceptions import ( UnsatisfiedFilterException, UnsupportedFilterFieldException, UnsupportedFilterFieldValueException ) @@ -53,7 +53,7 @@ class TaskExecutor: self._service_handler_factory = service_handler_factory self._context_client = ContextClient() # DEPENDENCY QKD - self._app_client = AppClient() + self._qkd_app_client = QKDAppClient() self._device_client = DeviceClient() self._grpc_objects_cache : Dict[str, CacheableObject] = dict() @@ -231,6 +231,6 @@ class TaskExecutor: def register_app(self, app: App) -> None: app_key = get_app_key(app.app_id) - self._app_client.RegisterApp(app) + self._qkd_app_client.RegisterApp(app) LOGGER.info("reg registered") self._store_grpc_object(CacheableObjectType.APP, app_key, app) \ No newline at end of file diff --git a/src/service/service/tools/ObjectKeys.py b/src/service/service/tools/ObjectKeys.py index 72c00bcba..cfc719bba 100644 --- a/src/service/service/tools/ObjectKeys.py +++ b/src/service/service/tools/ObjectKeys.py @@ -13,7 +13,7 @@ # limitations under the License. from common.proto.context_pb2 import ConnectionId, DeviceId, ServiceId -from common.proto.app_qkd_pb2 import AppId +from common.proto.qkd_app_pb2 import AppId def get_connection_key(connection_id : ConnectionId) -> str: return connection_id.connection_uuid.uuid -- GitLab