Skip to content
Snippets Groups Projects
Commit fc145563 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

ECOC'22 functional test:

- arranged run_test scripts and objects
- deactivated unneeded components in the deployment
- arranged LoadDescriptors Python script
- improved Tutorial page for ECOC'22 demo
parent 6d3d2383
No related branches found
No related tags found
2 merge requests!54Release 2.0.0,!4Compute component:
......@@ -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"
......
#!/bin/bash
source ecoc22/deploy_specs.sh
./deploy.sh
source tfs_runtime_env_vars.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
......@@ -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
......@@ -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
......@@ -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
......@@ -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())
......
......@@ -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',
......
......@@ -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()
......
......@@ -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)
......
......@@ -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)
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment