Open Traffic Generator API defines a standard, model-driven and vendor-neutral interface for emulating layer 2-7 network devices and generating test traffic.
This repository is a collaborative effort and produces artifacts to offer a foundation for other tools and/or implementations that want to use a model first
approach.
Ixia-c is a reference implementation of traffic generator described by these data models and API.
The focus of this repository is the following:
- a modeling guide outlining best practices
- a consistent set of OpenAPI vendor-neutral data and API models
- continuous build process that generates and validates artifacts
- a generated OpenAPI artifact
The models in this repo are under development and are subject to change, especially the models under the
device
node. All efforts will be made to keep them backwards compatible.
Please make sure that the client setup meets Python Prerequisites.
-
Clone this project,
cd
inside it and make changes to spec following the modelling guide. -
Generate bundled spec called
openapi.yaml
insideartifacts/
.python -m pip install -r requirements.txt python build.py
-
To preview documentation and interact with schema, copy contents of
openapi.yaml
inside https://editor.swagger.io/. -
Upon pushing changes,
artifacts/openapi.yaml
andartifacts/otg.proto
will be auto-generated and committed back to repository.
-
Please make sure you have
python
andpip
installed on your system.You may have to use
python3
orabsolute path to python executable
depending on Python Installation on system, instead ofpython
.python -m pip --help
Please see pip installation guide, if you don't see a help message.
-
It is recommended that you use a python virtual environment for development.
python -m pip install --upgrade virtualenv # create virtual environment inside `env/` and activate it. python -m virtualenv .env # on linux source .env/bin/activate # on windows .env\Scripts\activate on Windows
NOTE: If you do not wish to activate virtual env, you use
env/bin/python
(orenv\scripts\python
on Windows) instead ofpython
.
The open-traffic-generator organization welcomes new members to join this open source community project and contribute to its development.