diff --git a/src/tests/ecoc22/deploy_specs.sh b/src/tests/ecoc22/deploy_specs.sh index 4afe7e20fb5508fe5096dc68305ae8400b4cef31..dc75c4b2c9bfca53aa4a594d61ead62a081b4708 100644 --- a/src/tests/ecoc22/deploy_specs.sh +++ b/src/tests/ecoc22/deploy_specs.sh @@ -2,7 +2,7 @@ export TFS_REGISTRY_IMAGE="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 automation service slice compute webui" +export TFS_COMPONENTS="context device service slice compute" # automation webui # Set the tag you want to use for your images. export TFS_IMAGE_TAG="dev" diff --git a/src/tests/ecoc22/redeploy.sh b/src/tests/ecoc22/redeploy.sh new file mode 100755 index 0000000000000000000000000000000000000000..3f3986debb9aec57e7bc7f67b549b960679a987f --- /dev/null +++ b/src/tests/ecoc22/redeploy.sh @@ -0,0 +1,4 @@ +#!/bin/bash +source ecoc22/deploy_specs.sh +./deploy.sh +source tfs_runtime_env_vars.sh diff --git a/src/tests/ecoc22/run_test_01_bootstrap.sh b/src/tests/ecoc22/run_test_01_bootstrap.sh index 4e94fcb2c054749c35283a0177696b0e3d1c7b40..819991d78a499c6d6e4a10e96f6439ee5b56ed8d 100755 --- a/src/tests/ecoc22/run_test_01_bootstrap.sh +++ b/src/tests/ecoc22/run_test_01_bootstrap.sh @@ -13,4 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. +source tfs_runtime_env_vars.sh pytest --verbose src/tests/ecoc22/tests/test_functional_bootstrap.py diff --git a/src/tests/ecoc22/run_test_02_create_service.sh b/src/tests/ecoc22/run_test_02_create_service.sh index 9cab7daa2ccaa395cfe4815854edee2672b9ecdd..5a54d39d496e203ee669efda636067dcc1aa27a9 100755 --- a/src/tests/ecoc22/run_test_02_create_service.sh +++ b/src/tests/ecoc22/run_test_02_create_service.sh @@ -13,4 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. +source tfs_runtime_env_vars.sh pytest --verbose src/tests/ecoc22/tests/test_functional_create_service.py diff --git a/src/tests/ecoc22/run_test_03_delete_service.sh b/src/tests/ecoc22/run_test_03_delete_service.sh index b01ba350ac4745c8e4d52227c416d2a7d0b0184c..900e09b658c1a73664dd28dc60ef6a50a9e68570 100755 --- a/src/tests/ecoc22/run_test_03_delete_service.sh +++ b/src/tests/ecoc22/run_test_03_delete_service.sh @@ -13,4 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. +source tfs_runtime_env_vars.sh pytest --verbose src/tests/ecoc22/tests/test_functional_delete_service.py diff --git a/src/tests/ecoc22/run_test_04_cleanup.sh b/src/tests/ecoc22/run_test_04_cleanup.sh index a2925d63394309c1540acc29daa7e8884c0b9dab..4e0622e6b22d470d842d99bb4202e23e88b72982 100755 --- a/src/tests/ecoc22/run_test_04_cleanup.sh +++ b/src/tests/ecoc22/run_test_04_cleanup.sh @@ -13,4 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. +source tfs_runtime_env_vars.sh pytest --verbose src/tests/ecoc22/tests/test_functional_cleanup.py diff --git a/src/tests/ecoc22/tests/LoadDescriptors.py b/src/tests/ecoc22/tests/LoadDescriptors.py index 495b05a89cb79d8879623559f78984820b3f86cd..bd7e48366795d47624f1b8e295cbe6fa105bf8c7 100644 --- a/src/tests/ecoc22/tests/LoadDescriptors.py +++ b/src/tests/ecoc22/tests/LoadDescriptors.py @@ -15,17 +15,15 @@ import json, logging, sys from common.Settings import get_setting from context.client.ContextClient import ContextClient -from context.proto.context_pb2 import Context, Device, Link, Topology +from common.proto.context_pb2 import Context, Device, Link, Topology from device.client.DeviceClient import DeviceClient LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) def main(): - context_client = ContextClient( - get_setting('CONTEXTSERVICE_SERVICE_HOST'), get_setting('CONTEXTSERVICE_SERVICE_PORT_GRPC')) - device_client = DeviceClient( - get_setting('DEVICESERVICE_SERVICE_HOST'), get_setting('DEVICESERVICE_SERVICE_PORT_GRPC')) + context_client = ContextClient() + device_client = DeviceClient() with open('tests/ecoc22/descriptors.json', 'r', encoding='UTF-8') as f: descriptors = json.loads(f.read()) diff --git a/src/tests/ecoc22/tests/Objects.py b/src/tests/ecoc22/tests/Objects.py index 062a0051677699ec440cdcd3e4c25f589ec0ebde..33a6ad052b0bfcadb6c4e3fafdf87f4cc923faa2 100644 --- a/src/tests/ecoc22/tests/Objects.py +++ b/src/tests/ecoc22/tests/Objects.py @@ -258,7 +258,7 @@ WIM_SEP_DC2_SEC, WIM_MAP_DC2_SEC = mapping('DC2', ENDPOINT_ID_CE4_1_1, DEVICE_PE WIM_MAPPING = [WIM_MAP_DC1_PRI, WIM_MAP_DC1_SEC, WIM_MAP_DC2_PRI, WIM_MAP_DC2_SEC] WIM_SRV_VLAN_ID = 300 -WIM_SERVICE_TYPE = 'ELINE' +WIM_SERVICE_TYPE = 'ELAN' WIM_SERVICE_CONNECTION_POINTS = [ {'service_endpoint_id': WIM_SEP_DC1_PRI, 'service_endpoint_encapsulation_type': 'dot1q', diff --git a/src/tests/ecoc22/tests/test_functional_bootstrap.py b/src/tests/ecoc22/tests/test_functional_bootstrap.py index 7626ce3040a47546e6048d62c8ab0f8d24b98fa2..a787cf049ecb8bcb3f36716e739072a051cd5631 100644 --- a/src/tests/ecoc22/tests/test_functional_bootstrap.py +++ b/src/tests/ecoc22/tests/test_functional_bootstrap.py @@ -14,8 +14,8 @@ import copy, logging, pytest from common.Settings import get_setting +from common.proto.context_pb2 import Context, ContextId, Device, Empty, Link, Topology from context.client.ContextClient import ContextClient -from context.proto.context_pb2 import Context, ContextId, Device, Empty, Link, Topology from device.client.DeviceClient import DeviceClient from .Objects import CONTEXT_ID, CONTEXTS, DEVICES, LINKS, TOPOLOGIES @@ -26,14 +26,14 @@ LOGGER.setLevel(logging.DEBUG) @pytest.fixture(scope='session') def context_client(): - _client = ContextClient(get_setting('CONTEXTSERVICE_SERVICE_HOST'), get_setting('CONTEXTSERVICE_SERVICE_PORT_GRPC')) + _client = ContextClient() yield _client _client.close() @pytest.fixture(scope='session') def device_client(): - _client = DeviceClient(get_setting('DEVICESERVICE_SERVICE_HOST'), get_setting('DEVICESERVICE_SERVICE_PORT_GRPC')) + _client = DeviceClient() yield _client _client.close() diff --git a/src/tests/ecoc22/tests/test_functional_create_service.py b/src/tests/ecoc22/tests/test_functional_create_service.py index 58d87dadac44ffd9fe4168d0cbb138757d8a73c6..2928d9b353544c79a09ce0174722db61e3776702 100644 --- a/src/tests/ecoc22/tests/test_functional_create_service.py +++ b/src/tests/ecoc22/tests/test_functional_create_service.py @@ -14,10 +14,10 @@ import logging, pytest from common.Settings import get_setting +from common.proto.context_pb2 import ContextId, Empty from common.tools.grpc.Tools import grpc_message_to_json_string from compute.tests.mock_osm.MockOSM import MockOSM from context.client.ContextClient import ContextClient -from context.proto.context_pb2 import ContextId, Empty from .Objects import ( CONTEXT_ID, CONTEXTS, DEVICES, LINKS, TOPOLOGIES, WIM_MAPPING, WIM_PASSWORD, WIM_SERVICE_CONNECTION_POINTS, WIM_SERVICE_TYPE, WIM_USERNAME) diff --git a/src/tests/ecoc22/tests/test_functional_delete_service.py b/src/tests/ecoc22/tests/test_functional_delete_service.py index 51e91a5967e1696fa2fdfe7dd06d2efb46642248..89fe22b1fcdb7eeaea5edcd4c6328ffdc2445b05 100644 --- a/src/tests/ecoc22/tests/test_functional_delete_service.py +++ b/src/tests/ecoc22/tests/test_functional_delete_service.py @@ -15,6 +15,7 @@ import logging, pytest from common.DeviceTypes import DeviceTypeEnum from common.Settings import get_setting +from common.proto.context_pb2 import ContextId, Empty from common.tests.EventTools import EVENT_REMOVE, EVENT_UPDATE, check_events from common.tools.object_factory.Connection import json_connection_id from common.tools.object_factory.Device import json_device_id @@ -23,7 +24,6 @@ from common.tools.grpc.Tools import grpc_message_to_json_string from compute.tests.mock_osm.MockOSM import MockOSM from context.client.ContextClient import ContextClient from context.client.EventsCollector import EventsCollector -from context.proto.context_pb2 import ContextId, Empty from .Objects import ( CONTEXT_ID, CONTEXTS, DEVICE_O1_UUID, DEVICE_R1_UUID, DEVICE_R3_UUID, DEVICES, LINKS, TOPOLOGIES, WIM_MAPPING, WIM_PASSWORD, WIM_USERNAME) diff --git a/tutorial/2-4-ecoc22.md b/tutorial/2-4-ecoc22.md index b28fdfd1cc0fc740d5b65df069e75f6cb99c654c..6fc9333b58fe7c6da51be5eefe9167853508456a 100644 --- a/tutorial/2-4-ecoc22.md +++ b/tutorial/2-4-ecoc22.md @@ -29,6 +29,11 @@ environment as described in [Tutorial: Run Experiments Guide > 2.1. Configure Python Environment](./2-1-python-environment.md). Remember to source the scenario settings appropriately, e.g., `cd ~/tfs-ctrl && source my_deploy.sh` in each terminal you open. +Next, remember to source the environment variables created by the deployment, e.g., +`cd ~/tfs-ctrl && source tfs_runtime_env_vars.sh`. +Then, re-build the protocol buffers code from the proto files: +`./proto/generate_code_python.sh` + ## 2.4.4. Access to the WebUI and Dashboard