From 8c47a6257f1b6d8d9925ce24958340eacbd7347d Mon Sep 17 00:00:00 2001 From: Waleed Akbar <wakbar@cttc.es> Date: Tue, 7 Jan 2025 09:43:44 +0000 Subject: [PATCH] Changes in Telemetry Backend. - Added licensing information - Updated requirements for telemetry backend. --- my_deploy.sh | 1 - .../backend/drivers/emulated/EmulatedDriver.py | 14 ++++++++++++++ .../drivers/emulated/SyntheticMetricsGenerator.py | 15 ++++++++++++++- src/telemetry/backend/requirements.in | 2 ++ src/telemetry/backend/tests/messages_emulated.py | 14 ++++++++++++++ src/telemetry/backend/tests/test_emulated.py | 14 ++++++++++++++ src/telemetry/requirements.in | 2 -- 7 files changed, 58 insertions(+), 4 deletions(-) diff --git a/my_deploy.sh b/my_deploy.sh index 4aa4e43b9..f74d4982e 100755 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -21,7 +21,6 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. export TFS_COMPONENTS="context device pathcomp service slice nbi webui" -# export TFS_COMPONENTS="context device" # Uncomment to activate Monitoring (old) #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" diff --git a/src/telemetry/backend/drivers/emulated/EmulatedDriver.py b/src/telemetry/backend/drivers/emulated/EmulatedDriver.py index 650867dba..0c5712ffe 100644 --- a/src/telemetry/backend/drivers/emulated/EmulatedDriver.py +++ b/src/telemetry/backend/drivers/emulated/EmulatedDriver.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (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. + from telemetry.backend.drivers.core._Driver import _Driver from anytree import Node, Resolver from apscheduler.events import EVENT_JOB_ADDED, EVENT_JOB_REMOVED diff --git a/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py b/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py index d6606b2c1..5471fef19 100644 --- a/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py +++ b/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py @@ -1,4 +1,17 @@ -from types import NoneType +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (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 numpy as np import random import logging diff --git a/src/telemetry/backend/requirements.in b/src/telemetry/backend/requirements.in index e6a559be7..196dcc5a1 100644 --- a/src/telemetry/backend/requirements.in +++ b/src/telemetry/backend/requirements.in @@ -12,4 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. +anytree==2.8.0 confluent-kafka==2.3.* +numpy==2.2.1 diff --git a/src/telemetry/backend/tests/messages_emulated.py b/src/telemetry/backend/tests/messages_emulated.py index adf0376e9..451792327 100644 --- a/src/telemetry/backend/tests/messages_emulated.py +++ b/src/telemetry/backend/tests/messages_emulated.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (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 logging # Configure logging to ensure logs appear on the console logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') diff --git a/src/telemetry/backend/tests/test_emulated.py b/src/telemetry/backend/tests/test_emulated.py index 94eb76561..14d8a8ab9 100644 --- a/src/telemetry/backend/tests/test_emulated.py +++ b/src/telemetry/backend/tests/test_emulated.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (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 logging import time import pytest diff --git a/src/telemetry/requirements.in b/src/telemetry/requirements.in index e264104e3..503468a66 100644 --- a/src/telemetry/requirements.in +++ b/src/telemetry/requirements.in @@ -12,9 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -anytree==2.8.0 APScheduler==3.10.1 -numpy==2.2.1 psycopg2-binary==2.9.3 python-dateutil==2.8.2 python-json-logger==2.0.2 -- GitLab