diff --git a/my_deploy.sh b/my_deploy.sh index 4ca5459433a4683057deb4b4cec032463b5fae87..88be82b63e9e79a97ee79702de886f69a6152f94 100755 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -20,9 +20,7 @@ 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 app" - -# export load_generator +export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator" # Uncomment to activate Monitoring (old) #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" @@ -72,6 +70,10 @@ export TFS_COMPONENTS="context device pathcomp service slice nbi webui app" # export TLS_CERT_PATH="src/dlt/gateway/keys/ca.crt" #fi +# Uncomment to activate QKD App +#export TFS_COMPONENTS="${TFS_COMPONENTS} app" + + # Set the tag you want to use for your images. export TFS_IMAGE_TAG="dev" @@ -122,7 +124,7 @@ export CRDB_DEPLOY_MODE="single" export CRDB_DROP_DATABASE_IF_EXISTS="" # Disable flag for re-deploying CockroachDB from scratch. -export CRDB_REDEPLOY="YES" +export CRDB_REDEPLOY="" # ----- NATS ------------------------------------------------------------------- diff --git a/src/context/proto b/src/context/proto deleted file mode 120000 index 0ae252a7824cad03d85fa60224b87d8c779f1588..0000000000000000000000000000000000000000 --- a/src/context/proto +++ /dev/null @@ -1 +0,0 @@ -../../proto/src/python \ No newline at end of file diff --git a/src/device/requirements.in b/src/device/requirements.in index a3f6a763b5551188860eec33ea3710f6332c0662..bf5e6a2b3128f438a7c044c3f3cf9ee393de2265 100644 --- a/src/device/requirements.in +++ b/src/device/requirements.in @@ -32,6 +32,7 @@ python-json-logger==2.0.2 #pytz==2021.3 #redis==4.1.2 requests==2.27.1 +requests-mock==1.9.3 xmltodict==0.12.0 tabulate ipaddress diff --git a/src/device/tests/qkd/unit/LICENSE b/src/device/tests/qkd/unit/LICENSE deleted file mode 100644 index 6b678c507101c0682cfcd340bc97522ccabe7e4d..0000000000000000000000000000000000000000 --- a/src/device/tests/qkd/unit/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 FullStory, Inc - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/src/device/tests/qkd/unit/test_set_new_configuration.py b/src/device/tests/qkd/unit/test_set_new_configuration.py index d4b2024897305afccaf67420756a5ae92332d2c1..438e46d74f0ad1204f496aaf99e29e21f41c5805 100644 --- a/src/device/tests/qkd/unit/test_set_new_configuration.py +++ b/src/device/tests/qkd/unit/test_set_new_configuration.py @@ -30,7 +30,7 @@ def qkd_driver1(): @pytest.fixture def qkd_driver3(): # Initialize the QKD driver for QKD3 - return QKDDriver(address=MOCK_QKD1_ADDRRESS, port=MOCK_PORT3, username='user', password='pass') + return QKDDriver(address=MOCK_QKD3_ADDRRESS, port=MOCK_PORT3, username='user', password='pass') def create_qkd_app(driver, qkdn_id, backing_qkdl_id, client_app_id=None): """ diff --git a/src/tests/tools/mock_qkd_nodes/mock.py b/src/tests/tools/mock_qkd_nodes/mock.py index 2ab60c65d9fff71d74fe7176b32b7f5446c9287c..7a606f6cac855fee9852f620c595908fbb3d36da 100644 --- a/src/tests/tools/mock_qkd_nodes/mock.py +++ b/src/tests/tools/mock_qkd_nodes/mock.py @@ -1,5 +1,18 @@ -import os +# 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 os from flask import Flask, request from YangValidator import YangValidator diff --git a/src/tests/tools/mock_qkd_nodes/start.sh b/src/tests/tools/mock_qkd_nodes/start.sh index cf8ee753384e28fded56561251adc55faec43a4f..b1bc56d5a7f90809e81c73a54803fb2dc11bacd9 100755 --- a/src/tests/tools/mock_qkd_nodes/start.sh +++ b/src/tests/tools/mock_qkd_nodes/start.sh @@ -1,13 +1,26 @@ #!/bin/bash -cd "$(dirname "$0")" +# 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. +cd "$(dirname "$0")" -#!/bin/bash killbg() { for p in "${pids[@]}" ; do kill "$p"; done } + trap killbg EXIT pids=() flask --app mock run --host 0.0.0.0 --port 11111 &