From b85b910d760eccb2f73e686f2020c89de579478d Mon Sep 17 00:00:00 2001 From: gifrerenom <lluis.gifre@cttc.es> Date: Tue, 14 Nov 2023 18:37:53 +0000 Subject: [PATCH] PathComp - FrontEnd component: - Corrected dependencies in Dockerfile - Corrected Python requirements - Code cleanup in unitary tests --- src/pathcomp/frontend/Dockerfile | 2 ++ src/pathcomp/frontend/requirements.in | 1 + .../frontend/tests/test_unitary_pathcomp_forecaster.py | 7 ++----- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pathcomp/frontend/Dockerfile b/src/pathcomp/frontend/Dockerfile index 38b164d41..955844cf4 100644 --- a/src/pathcomp/frontend/Dockerfile +++ b/src/pathcomp/frontend/Dockerfile @@ -67,6 +67,8 @@ COPY src/context/client/. context/client/ COPY src/device/__init__.py device/__init__.py COPY src/device/client/. device/client/ COPY src/forecaster/. forecaster/ +COPY src/monitoring/__init__.py monitoring/__init__.py +COPY src/monitoring/client/. monitoring/client/ COPY src/service/__init__.py service/__init__.py COPY src/service/client/. service/client/ COPY src/slice/__init__.py slice/__init__.py diff --git a/src/pathcomp/frontend/requirements.in b/src/pathcomp/frontend/requirements.in index cec7efa49..c96d7425c 100644 --- a/src/pathcomp/frontend/requirements.in +++ b/src/pathcomp/frontend/requirements.in @@ -15,3 +15,4 @@ pandas==1.5.* requests==2.27.1 +scikit-learn==1.1.* diff --git a/src/pathcomp/frontend/tests/test_unitary_pathcomp_forecaster.py b/src/pathcomp/frontend/tests/test_unitary_pathcomp_forecaster.py index d883d516f..72ec43aff 100644 --- a/src/pathcomp/frontend/tests/test_unitary_pathcomp_forecaster.py +++ b/src/pathcomp/frontend/tests/test_unitary_pathcomp_forecaster.py @@ -12,11 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import copy, json, logging, os, pandas, pytest +import logging, os, pandas, pytest from typing import Dict, Tuple from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME from common.proto.context_pb2 import ContextId, TopologyId -from common.proto.forecaster_pb2 import ForecastLinkCapacityRequest, ForecastTopologyCapacityRequest from common.proto.kpi_sample_types_pb2 import KpiSampleType from common.proto.monitoring_pb2 import KpiDescriptor from common.proto.pathcomp_pb2 import PathCompRequest @@ -25,15 +24,13 @@ from common.tools.object_factory.Context import json_context_id from common.tools.object_factory.Topology import json_topology_id from common.tools.grpc.Tools import grpc_message_to_json from common.tools.object_factory.Constraint import ( - json_constraint_custom, json_constraint_endpoint_location_region, json_constraint_endpoint_priority, json_constraint_schedule, - json_constraint_sla_availability, json_constraint_sla_capacity, json_constraint_sla_latency) + json_constraint_schedule, json_constraint_sla_capacity, json_constraint_sla_latency) from common.tools.object_factory.Context import json_context_id from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.EndPoint import json_endpoint_id from common.tools.object_factory.Service import get_service_uuid, json_service_l3nm_planned from common.tools.timestamp.Converters import timestamp_utcnow_to_float from context.client.ContextClient import ContextClient -from forecaster.client.ForecasterClient import ForecasterClient from forecaster.tests.Tools import compose_descriptors, read_csv from monitoring.client.MonitoringClient import MonitoringClient from pathcomp.frontend.client.PathCompClient import PathCompClient -- GitLab