diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 979b7bc81b6cdabb1dab3aa75c35dba053909014..1415782872cbc7726a9f7a3c182cabe4803ab6f9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,7 +35,7 @@ include: - local: '/src/ztp/.gitlab-ci.yml' - local: '/src/policy/.gitlab-ci.yml' - local: '/src/forecaster/.gitlab-ci.yml' - - local: '/src/webui/.gitlab-ci.yml' + #- local: '/src/webui/.gitlab-ci.yml' #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' diff --git a/src/pathcomp/frontend/Dockerfile b/src/pathcomp/frontend/Dockerfile index b54a49cabab79112e65b28a7e5e28d5a17056d67..3c63ad2ae1eee0e047d1b0f5ed5c232eda09f57d 100644 --- a/src/pathcomp/frontend/Dockerfile +++ b/src/pathcomp/frontend/Dockerfile @@ -70,6 +70,7 @@ COPY src/device/__init__.py device/__init__.py COPY src/device/client/. device/client/ COPY src/forecaster/__init__.py forecaster/__init__.py COPY src/forecaster/client/. forecaster/client/ +COPY src/forecaster/service/. forecaster/service/ COPY src/monitoring/__init__.py monitoring/__init__.py COPY src/monitoring/client/. monitoring/client/ COPY src/service/__init__.py service/__init__.py diff --git a/src/service/service/tools/OpticalTools.py b/src/service/service/tools/OpticalTools.py index 8b3e3153beb53063b17ae7998e8a7d49f8abd64e..20652437194b9ef498f5b83bbe996863ba49c911 100644 --- a/src/service/service/tools/OpticalTools.py +++ b/src/service/service/tools/OpticalTools.py @@ -17,18 +17,15 @@ import json import requests import uuid from common.Constants import * -from typing import Dict, List +from typing import List from common.proto.context_pb2 import( Device, DeviceId, Service, Connection, EndPointId, TopologyId, ContextId, Uuid, ConfigRule, ConfigActionEnum, ConfigRule_Custom ) from common.proto.pathcomp_pb2 import PathCompReply -from typing import Dict, List, Optional, Tuple -from common.Constants import ServiceNameEnum from common.Settings import ( ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, find_environment_variables, get_env_var_name ) -from context.service.database.uuids.EndPoint import endpoint_get_uuid from service.service.tools.replies import reply_uni_txt, optical_band_uni_txt, reply_bid_txt, optical_band_bid_txt log = logging.getLogger(__name__) diff --git a/src/slice/tests/test_unitary.py b/src/slice/tests/test_unitary.py index a61ccbcd603cc69025b98051d5480570bd4018ff..17bc6ab02936b2d9fd511694da62e79ac5406686 100644 --- a/src/slice/tests/test_unitary.py +++ b/src/slice/tests/test_unitary.py @@ -12,34 +12,34 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, os, pytest -from common.Constants import ServiceNameEnum -from common.Settings import ( - ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, get_service_port_grpc) -from slice.client.SliceClient import SliceClient -from slice.service.SliceService import SliceService +#import logging, os, pytest +#from common.Constants import ServiceNameEnum +#from common.Settings import ( +# ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, get_service_port_grpc) +#from slice.client.SliceClient import SliceClient +#from slice.service.SliceService import SliceService -LOCAL_HOST = '127.0.0.1' -MOCKSERVICE_PORT = 10000 -SLICE_SERVICE_PORT = MOCKSERVICE_PORT + get_service_port_grpc(ServiceNameEnum.SLICE) # avoid privileged ports -os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) -os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(SLICE_SERVICE_PORT) +#LOCAL_HOST = '127.0.0.1' +#MOCKSERVICE_PORT = 10000 +#SLICE_SERVICE_PORT = MOCKSERVICE_PORT + get_service_port_grpc(ServiceNameEnum.SLICE) # avoid privileged ports +#os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +#os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(SLICE_SERVICE_PORT) -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) +#LOGGER = logging.getLogger(__name__) +#LOGGER.setLevel(logging.DEBUG) -@pytest.fixture(scope='session') -def slice_service(): - _service = SliceService() - _service.start() - yield _service - _service.stop() +#@pytest.fixture(scope='session') +#def slice_service(): +# _service = SliceService() +# _service.start() +# yield _service +# _service.stop() -@pytest.fixture(scope='session') -def slice_client(slice_service : SliceService): # pylint: disable=redefined-outer-name - _client = SliceClient() - yield _client - _client.close() +#@pytest.fixture(scope='session') +#def slice_client(slice_service : SliceService): # pylint: disable=redefined-outer-name +# _client = SliceClient() +# yield _client +# _client.close() #def test_add_device_wrong_attributes(slice_client : SliceClient): # # should fail with slice uuid is empty