The sdx-oxp-integrator
is designed to simplify interactions with various OXPO (Open eXchange Point Operator) APIs by providing a streamlined programming interface. This integrator abstracts the complexities of direct API calls and offers a consistent method to interact with different OXPO services, enhancing code readability and maintainability.
Standardize the way applications communicate with different OXPOs, regardless of their underlying API differences.
Robust error handling mechanisms are built-in to manage API response variability and ensure reliable application behavior.
Handles all aspects of authentication automatically, from token generation to renewal, ensuring seamless access to OXPO services.
Automatically parses responses into user-friendly formats, reducing the need for repetitive parsing logic in the main application code.
Easily extendible to accommodate new endpoints or changes in existing OXPO API specifications.
Integrated logging for debugging and monitoring API interactions, facilitating easier troubleshooting and performance tracking.
Copy the provided .env
file and adjust it according to your environment.
We have several container images. To build all container images, run the shell script files 1_build_kytos.sh
and 2_build_oxpos.sh
. From the project root directory, execute:
$ ./1_build_kytos.sh
$ ./2_build_oxpos.sh
A docker-compose.yml
is provided for bringing up Ampath, SAX, Tenet, ampath-topology-conversion, sax-topology-conversion, tenet-topology-conversion, MongoDB, Mininet, and an Nginx instance. To start/stop the sdx-oxp-integrator
, from the project root directory, run:
$ docker compose up
$ docker compose down
Navigate to http://localhost for testing the API.
You will need Docker installed and running. You will also need Tox and Tox-Docker. To activate a virtual environment, install the requirements, Tox, and Tox-Docker, run the script piptst.sh
:
$ ./piptst.sh
If you prefer to avoid Tox and run Pytest directly, ensure Docker Compose is up. Set the required environment variables by running:
$ . export.sh
To activate a virtual environment and install the requirements, run the script piptst.sh
:
$ ./piptst.sh
Then, run Pytest:
$ pytest
Using hand-crafted inputs (OXP Test Input) to the OXP topology/provisioning system interface (REST API) to validate end-to-end services in the data plane.
The VLAN ranges on the two ports on an inter-domain link should be the same (pre-agreed upon by the admin). Validation checks are needed when adding topologies, and VLAN translation happens within a domain, simplifying VLAN assignment after the path is obtained.
Using the AW-SDX Service data model (Service Test Input in JSON format) to the SDX-Controller service endpoint to validate if the middleware can satisfy the service request and generate the necessary breakdowns for the mock OXP systems.
Using the Meican GUI to validate if it can generate the service data model as the input to the mock SD-Controller.
These tests play a crucial role in validating the functionality and interoperability of the AtlanticWave-SDX 2.0 system, focusing on interaction between the middleware and OXP systems.
The supported OXP system needs to publish the converted OXP topology to SDX-LC and update the topology via the sdx-oxp-integrator
APIs.
SDX-LC publishes this information into the SDX Message Queue, where it is received by the SDX Controller.
A Docker Compose environment instantiates three Kytos OXPO servers: Ampath, SAX, and Tenet, and three SDX-LC servers: Ampath-LC, Sax-LC, and Tenet-LC. An SDX topology validator server and a MongoDB cluster are configured for communication.
Test commands and curl scripts for this integration test can be found at http://67.17.206.221/ as shown below:
On the swagger server, hit the blue GET button to execute a command. A box will appear as shown below:
Hit the TRY IT OUT bottom and fill in the two required parameters url and command. When the command is executed, a curl script command is provided to execute it from anywhere in a command prompt, as well as the server response.
- URL:
ampath.net
- Command:
/topology
- curl script command:
curl -X 'GET' 'http://67.17.206.221/ampath.net%2Ftopology' -H 'accept: application/json'
- URL:
sax.net
- Command:
/topology
- curl script command:
curl -X 'GET' 'http://67.17.206.221/sax.net%2Ftopology' -H 'accept: application/json'
- URL:
tenet.ac.za
- Command:
/topology
- curl script command:
curl -X 'GET' 'http://67.17.206.221/tenet.ac.za%2Ftopology' -H 'accept: application/json'
Expected Outcome
A 200 OK
API status is expected from all three OXPO servers. Any other status indicates that the environment is not pre-initialized to work with Kytos and further troubleshooting is needed before continuing.
- URL:
ampath.net
- Command:
/switches
- curl script command:
curl -X 'GET' 'http://67.17.206.221/ampath.net%2Fswitches' -H 'accept: application/json'
- URL:
sax.net
- Command:
/switches
- curl script command:
curl -X 'GET' 'http://67.17.206.221/sax.net%2Fswitches' -H 'accept: application/json'
- URL:
tenet.ac.za
- Command:
/switches
- curl script command:
curl -X 'GET' 'http://67.17.206.221/tenet.ac.za%2Fswitches' -H 'accept: application/json'
- URL:
ampath.net
- Command:
/interfaces
- curl script command:
curl -X 'GET' 'http://67.17.206.221/ampath.net%2Finterfaces' -H 'accept: application/json'
- URL:
sax.net
- Command:
/interfaces
- curl script command:
curl -X 'GET' 'http://67.17.206.221/sax.net%2Finterfaces' -H 'accept: application/json'
- URL:
tenet.ac.za
- Command:
/interfaces
- curl script command:
curl -X 'GET' 'http://67.17.206.221/tenet.ac.za%2Finterfaces' -H 'accept: application/json'
- URL:
ampath.net
- Command:
/links
- curl script command:
curl -X 'GET' 'http://67.17.206.221/ampath.net%2Flinks' -H 'accept: application/json'
- URL:
sax.net
- Command:
/links
- curl script command:
curl -X 'GET' 'http://67.17.206.221/sax.net%2Flinks' -H 'accept: application/json'
- URL:
tenet.ac.za
- Command:
/links
- curl script command:
curl -X 'GET' 'http://67.17.206.221/tenet.ac.za%2Flinks' -H 'accept: application/json'
- URL:
ampath.net
- Command:
/evcs
- curl script command:
curl -X 'GET' 'http://67.17.206.221/ampath.net%2Fevcs' -H 'accept: application/json'
- URL:
sax.net
- Command:
/evcs
- curl script command:
curl -X 'GET' 'http://67.17.206.221/sax.net%2Fevcs' -H 'accept: application/json'
- URL:
tenet.ac.za
- Command:
/evcs
- curl script command:
curl -X 'GET' 'http://67.17.206.221/tenet.ac.za%2Fevcs' -H 'accept: application/json'
- Ensure Kytos is operational in the Ampath OXPO server and a topology has been created.
- URL:
ampath.net
- Command:
/sdx/topology
- curl script command provided:
curl -X 'GET' 'http://67.17.206.221/ampath.net%2Fsdx%2Ftopology' -H 'accept: application/json'
The following image shows the result for this case:
- Validate functionality in the SAX OXP.
- URL:
sax.net
- Command:
/sdx/topology
- curl script command:
curl -X 'GET' 'http://67.17.206.221/sax.net%2Fsdx%2Ftopology' -H 'accept: application/json'
- Verify the presence of a well-established topology in the Tenet OXP.
- URL:
tenet.ac.za
- Command:
/sdx/topology
- curl script command:
curl -X 'GET' 'http://67.17.206.221/tenet.ac.za%2Fsdx%2Ftopology' -H 'accept: application/json'
- URL:
ampath.net
- Command:
/enable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/ampath.net%2Fenable%2Fall' -H 'accept: application/json'
- URL:
sax.net
- Command:
/enable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/sax.net%2Fenable%2Fall' -H 'accept: application/json'
- URL:
tenet.ac.za
- Command:
/enable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/tenet.ac.za%2Fenable%2Fall' -H 'accept: application/json'
- URL:
ampath.net
- Command:
/switch/enable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/ampath.net%2Fswitch%2Fenable%2Fall' -H 'accept: application/json'
- URL:
sax.net
- Command:
/switch/enable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/sax.net%2Fswitch%2Fenable%2Fall' -H 'accept: application/json'
- URL:
tenet.ac.za
- Command:
/switch/enable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/tenet.ac.za%2Fswitch%2Fenable%2Fall' -H 'accept: application/json'
- URL:
ampath.net
- Command:
/interface/enable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/ampath.net%2Finterface%2Fenable%2Fall' -H 'accept: application/json'
- URL:
sax.net
- Command:
/interface/enable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/sax.net%2Finterface%2Fenable%2Fall' -H 'accept: application/json'
- URL:
tenet.ac.za
- Command:
/interface/enable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/tenet.ac.za%2Finterface%2Fenable%2Fall' -H 'accept: application/json'
- URL:
ampath.net
- Command:
/link/enable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/ampath.net%2Flink%2Fenable%2Fall' -H 'accept: application/json'
- URL:
sax.net
- Command:
/link/enable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/sax.net%2Flink%2Fenable%2Fall' -H 'accept: application/json'
- URL:
tenet.ac.za
- Command:
/link/enable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/tenet.ac.za%2Flink%2Fenable%2Fall' -H 'accept: application/json'
- URL:
ampath.net
- Command:
/evc/enable
- curl script command:
curl -X 'POST' 'http://67.17.206.221/ampath.net%2Fevc%2Fenable' -H 'accept: application/json'
- URL:
sax.net
- Command:
/evc/enable
- curl script command:
curl -X 'GET' 'http://67.17.206.221/sax.net%2Fevc%2Fenable' -H 'accept: application/json'
- URL:
tenet.ac.za
- Command:
/evc/enable
- curl script command:
curl -X 'GET' 'http://67.17.206.221/tenet.ac.za%2Fevc%2Fenable' -H 'accept: application/json'
- URL:
ampath.net
- Command:
/evc/vlan/enable
- curl script command:
curl -X 'POST' 'http://67.17.206.221/ampath.net%2Fevc%2Fvlan%2Fenable' -H 'accept: application/json'
- URL:
sax.net
- Command:
/evc/enable
- curl script command:
curl -X 'POST' 'http://67.17.206.221/sax.net%2Fevc%2Fvlan%2Fenable' -H 'accept: application/json'
- URL:
tenet.ac.za
- Command:
/evc/vlan/enable
- curl script command:
curl -X 'GET' 'http://67.17.206.221/tenet.ac.za%2Fevc%2Fvlan%2Fenable' -H 'accept: application/json'
- URL:
ampath.net
- Command:
/disable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/ampath.net%2Fdisable%2Fall' -H 'accept: application/json'
- URL:
sax.net
- Command:
/disable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/sax.net%2Fdisable%2Fall' -H 'accept: application/json'
- URL:
tenet.ac.za
- Command:
/disable/all
- curl script command:
curl -X 'GET' 'http://67.17.206.221/tenet.ac.za%2Fdisable%2Fall' -H 'accept: application/json'