Commit f132e3b0 authored by Alberto Gonzalez Barneo's avatar Alberto Gonzalez Barneo
Browse files

Changed App by QKDApp and included qkd_app into proto and left object_factory

parent 22c344c0
Loading
Loading
Loading
Loading
+0 −0

Empty file deleted.

+4 −4
Original line number Diff line number Diff line
@@ -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,
}
+24 −0
Original line number Diff line number Diff line
# 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
+0 −0

File moved.

+5 −5
Original line number Diff line number Diff line
@@ -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
Loading