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

Merge branch 'pr-p4-ref' into 'develop'

Refactored P4 test

See merge request !290
parents 35d17a8c daf66fe6
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!290Refactored P4 test
Showing
with 68 additions and 0 deletions
# Tests for P4 functionality of TeraFlowSDN
This directory contains the necessary scripts and configurations to run tests for the P4 functionality of TFS.
This directory contains the necessary scripts and configurations to run tests for a simple port forwarding TFS program atop software-based P4 switches (using Mininet).
## Prerequisites
This test requires some custom monitoring services (latency monitoring and probe).
These services are implemented in Rust and can be found in the `./probe` directory.
To build these services on your target platform, follow the instructions in `./probe/probe-tfs/README.md`.
## Basic scripts
To run the experiments you should use the five scripts in the following order:
```
```shell
setup.sh
run_test_01_bootstrap.sh
run_test_02_create_service.sh
......@@ -13,29 +20,28 @@ run_test_03_delete_service.sh
run_test_04_cleanup.sh
```
The setup script copies the necessary artifacts to the SBI service pod. It should be run just once, after a fresh install of TFS.
The bootstrap script registers the context, topology, links and, devices to TFS.
The create service scripts establishes a service between two endpoints.
The delete service script delete the aforementioned service.
Cleanup script deletes all the objects (context, topology, links, devices) from TFS.
The `setup` script copies the necessary artefacts to the SBI service pod. It should be run just once, after a fresh install of TFS.
The `bootstrap` script registers the context, topology, links, and devices to TFS.
The `create` service script establishes a service between two endpoints.
The `delete` service script deletes the aforementioned service.
The `cleanup` script deletes all the objects (context, topology, links, and devices) from TFS.
## Objects file
The above bash scripts make use of the corresponding python scripts found under `./tests/` directory.
More important is the `./tests/Objects.py` file, which contains the definition of the Context, Topology, Devices, Links, Services. **This is the file that need changes in case of a new topology.**
More important is the `./tests/Objects.py` file, which contains the definition of the Context, Topology, Devices, Links, Services. **This is the file that needs changes in case of a new topology.**
Check the `./tests/Objects.py` file before running the experiment to make sure that the switches details are correct (ip address, port, etc.)
Check the `./tests/Objects.py` file before running the experiment to make sure that the switches' details are correct (ip address, port, etc.)
## Mininet topologies
In the `./mininet/` directory there are different mininet topology examples. The current `./tests/Objects.py` file corresponds to the `./mininet/8switch3path.py` topology. Additionally there is a backup file `./tests/topologies/6switchObjects.py` which corresponds to the `./mininet/6switch2path.py`.
## P4 artifacts
## P4 artefacts
In the `./p4/` directory there are the compiled p4 artifacts that contain the pipeline that will be pushed to the p4 switch, along with the p4-runtime definitions.
The `./setup.sh` script copies from this directory. So if you need to change p4 program, make sure to put the compiled artifacts here.
In the `./p4/` directory there are compiled p4 artefacts of the pipeline that will be pushed to the p4 switch, along with the p4-runtime definitions.
The `./setup.sh` script copies from this directory. So if you need to change p4 program, make sure to put the compiled artefacts there.
## Latency probe
In the `./probe/` directory there is a little program which calculates latency between two hosts in mininet and sends them to the Monitoring component. For specific instructions, refer to the corresponding `./probe/README.md` file.
In the `./probe/` directory there is a little program which calculates latency between two hosts in mininet and sends these measurements to the Monitoring component. For specific instructions, refer to the corresponding `./probe/README.md` file.
File moved
File moved
File moved
File moved
File moved
File moved
# Rust-tfs
Client for TFS functionalities written in Rust.
## Dependencies
This project requires the cargo Rust compiler:
```sh
sudo apt-get install protobuf-compiler cargo
```
## Build
Build sources as follows:
```sh
cargo build
```
After a successfuly build, two new executables will be generated in `target/`.
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