This repository extends GNPy with additional interfaces, allowing for more flexible control and interaction with its simulation engine. These interfaces can be used to integrate GNPy into software-defined networking (SDN) architectures or other external applications.
GNPy is an open-source Python-based library that models and evaluates the performance of optical networks. It is widely used for path computation, QoT (Quality of Transmission) estimation, and network planning.
Clone the repository and install the package:
python3 setup.py installor if you want to install it in a docker container:
docker docker build ./ -t gnpy-apipip install gnpy-apiComing....
Start the REST API server:
python ./samples/rest_example.pySee the help for the REST API:
python ./samples/rest_example.py -hSend example data to the REST API:
curl --location 'https://localhost:8080/api/v0.1/path-request' --header 'Content-Type: application/json' --data @gnpyapi/exampledata/planning_demand_example.json -kDifferent versions of this interface extension are compatible with specific versions of GNPy. Please refer to the table below to ensure that you are using a supported version combination.
| Interface Version | Compatible GNPy Version | Notes |
|---|---|---|
v0.1.x |
>=2.12.1 |
Initial release |
To check your GNPy version, run:
pip show gnpyRefer to the official GNPy documentation for information about network modeling and simulation capabilities.
API documentation is available in the docs folder.