Commit 0740d939 authored by Francisco-Javier Moreno-Muro's avatar Francisco-Javier Moreno-Muro
Browse files

Merge branch 'develop' into feat/scenario2-workflow3-tests

parents b031e3e4 7d8a7078
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -162,6 +162,7 @@ cython_debug/

# TeraFlowSDN-generated files
tfs_runtime_env_vars.sh
tfs_runtime_env_vars*.sh
tfs_bchain_runtime_env_vars.sh
delete_local_deployment.sh
local_docker_deployment.sh
+60 −54
Original line number Diff line number Diff line
@@ -36,9 +36,13 @@ export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"}
# If not already set, set additional manifest files to be applied after the deployment
export TFS_EXTRA_MANIFESTS=${TFS_EXTRA_MANIFESTS:-""}

# If not already set, set the neew Grafana admin password
# If not already set, set the new Grafana admin password
export TFS_GRAFANA_PASSWORD=${TFS_GRAFANA_PASSWORD:-"admin123+"}

# If not already set, disable skip-build flag.
# If TFS_SKIP_BUILD is "YES", the containers are not rebuilt-retagged-repushed and existing ones are used.
export TFS_SKIP_BUILD=${TFS_SKIP_BUILD:-""}

########################################################################################################################
# Automated steps start here
########################################################################################################################
@@ -67,6 +71,7 @@ echo "export PYTHONPATH=${PYTHONPATH}" >> $ENV_VARS_SCRIPT
for COMPONENT in $TFS_COMPONENTS; do
    echo "Processing '$COMPONENT' component..."

    if [ "$TFS_SKIP_BUILD" != "YES" ]; then
        echo "  Building Docker image..."
        BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}.log"

@@ -136,6 +141,7 @@ for COMPONENT in $TFS_COMPONENTS; do
                docker push "$IMAGE_URL" > "$PUSH_LOG"
            fi
        fi
    fi

    echo "  Adapting '$COMPONENT' manifest file..."
    MANIFEST="$TMP_MANIFESTS_FOLDER/${COMPONENT}service.yaml"
+9 −9
Original line number Diff line number Diff line
@@ -4,12 +4,12 @@ This functional test shows the P4 driver with a basic connectivity test between

## Functional test folder

This functional test can be found in folder `src/tests/netx22-p4/`. 
This functional test can be found in folder `hackfest/p4`

## P4 source and Mininet topology

This test is designed to operate with a mininet deployment that contains 2 hosts and a BMv2 switch, such a topology can be found in the 'src/tests/netx22-p4/mininet' folder.
Additionally the P4 source code, along with its compiled artifacts are present in the 'src/tests/netx22-p4/mininet' folder.
This test is designed to operate with a mininet deployment that contains 2 hosts and a BMv2 switch, such a topology can be found in the 'hackfest/p4/mininet' folder.
Additionally the P4 source code, along with its compiled artifacts are present in the 'hackfest/p4/p4' folder.

## Deployment and Dependencies

@@ -50,7 +50,7 @@ start-simple: NGSDN_TOPO_PY := topo-simple.py
start-simple: _start
```

And copy the topology file from ~/tfs-ctrl/src/tests/netx22-p4/mininet/topo-simple.py to the ~/ngsdn-tutorial/mininet/ directory.
And copy the topology file from ~/tfs-ctrl/hackfest/p4/mininet/topo-simple.py to the ~/ngsdn-tutorial/mininet/ directory.

## Test Execution

@@ -70,28 +70,28 @@ client ping server

In another terminal cd to the teraflow directory and run the following
```
src/tests/netx22-p4/setup.sh
hackfest/p4/setup.sh
```
This will copy the p4 artifacts to the device pod.

Then you can bootstrap the device to the Teraflow Controller
```
src/tests/netx22-p4/run_test_01_bootstrap.sh
hackfest/p4/run_test_01_bootstrap.sh
```

Install the required rules to the p4 switch
```
src/tests/netx22-p4/run_test_02_create_service.sh
hackfest/p4/run_test_02_create_service.sh
```
You should now check the mininet terminal. The two hosts should be pinging each other as intended.

You can remove the rules from the p4 switch
```
src/tests/netx22-p4/run_test_03_delete_service.sh
hackfest/p4/run_test_03_delete_service.sh
```
The two hosts on the mininet terminal, should stop pinging.

And remove the device from the Teraflow Controller
```
src/tests/netx22-p4/run_test_04_cleanup.sh
hackfest/p4/run_test_04_cleanup.sh
```
Loading