gnpy-api 0.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. gnpy_api-0.0.0/.github/workflows/main.yml +142 -0
  2. gnpy_api-0.0.0/AUTHORS +1 -0
  3. gnpy_api-0.0.0/ChangeLog +4 -0
  4. gnpy_api-0.0.0/Dockerfile +7 -0
  5. gnpy_api-0.0.0/LICENSE +28 -0
  6. gnpy_api-0.0.0/PKG-INFO +77 -0
  7. gnpy_api-0.0.0/README.md +17 -0
  8. gnpy_api-0.0.0/docs/Makefile +20 -0
  9. gnpy_api-0.0.0/docs/biblio.bib +13 -0
  10. gnpy_api-0.0.0/docs/conf.py +187 -0
  11. gnpy_api-0.0.0/docs/images/GNPy-logo.png +0 -0
  12. gnpy_api-0.0.0/docs/index.rst +20 -0
  13. gnpy_api-0.0.0/docs/intro.rst +4 -0
  14. gnpy_api-0.0.0/docs/make.bat +36 -0
  15. gnpy_api-0.0.0/gnpy_api.egg-info/PKG-INFO +77 -0
  16. gnpy_api-0.0.0/gnpy_api.egg-info/SOURCES.txt +65 -0
  17. gnpy_api-0.0.0/gnpy_api.egg-info/dependency_links.txt +1 -0
  18. gnpy_api-0.0.0/gnpy_api.egg-info/not-zip-safe +1 -0
  19. gnpy_api-0.0.0/gnpy_api.egg-info/pbr.json +1 -0
  20. gnpy_api-0.0.0/gnpy_api.egg-info/requires.txt +19 -0
  21. gnpy_api-0.0.0/gnpy_api.egg-info/top_level.txt +1 -0
  22. gnpy_api-0.0.0/gnpyapi/__init__.py +0 -0
  23. gnpy_api-0.0.0/gnpyapi/core/__init__.py +12 -0
  24. gnpy_api-0.0.0/gnpyapi/core/exception/__init__.py +1 -0
  25. gnpy_api-0.0.0/gnpyapi/core/exception/config_error.py +14 -0
  26. gnpy_api-0.0.0/gnpyapi/core/exception/equipment_error.py +14 -0
  27. gnpy_api-0.0.0/gnpyapi/core/exception/exception_handler.py +34 -0
  28. gnpy_api-0.0.0/gnpyapi/core/exception/path_computation_error.py +14 -0
  29. gnpy_api-0.0.0/gnpyapi/core/exception/topology_error.py +13 -0
  30. gnpy_api-0.0.0/gnpyapi/core/model/__init__.py +1 -0
  31. gnpy_api-0.0.0/gnpyapi/core/model/error.py +17 -0
  32. gnpy_api-0.0.0/gnpyapi/core/model/result.py +8 -0
  33. gnpy_api-0.0.0/gnpyapi/core/route/__init__.py +1 -0
  34. gnpy_api-0.0.0/gnpyapi/core/route/path_request_route.py +28 -0
  35. gnpy_api-0.0.0/gnpyapi/core/route/status_route.py +8 -0
  36. gnpy_api-0.0.0/gnpyapi/core/service/__init__.py +1 -0
  37. gnpy_api-0.0.0/gnpyapi/core/service/config_service.py +4 -0
  38. gnpy_api-0.0.0/gnpyapi/core/service/equipment_service.py +5 -0
  39. gnpy_api-0.0.0/gnpyapi/core/service/path_request_service.py +36 -0
  40. gnpy_api-0.0.0/gnpyapi/core/service/topology_service.py +5 -0
  41. gnpy_api-0.0.0/gnpyapi/exampledata/planning_demand_example.json +1578 -0
  42. gnpy_api-0.0.0/gnpyapi/tools/__init__.py +0 -0
  43. gnpy_api-0.0.0/gnpyapi/yang/gnpy-api@2021-01-06.yang +81 -0
  44. gnpy_api-0.0.0/gnpyapi/yang/gnpy-eqpt-config@2020-10-22.yang +442 -0
  45. gnpy_api-0.0.0/gnpyapi/yang/gnpy-eqpt-config@2025-01-20.yang +770 -0
  46. gnpy_api-0.0.0/gnpyapi/yang/gnpy-network-topology@2020-10-22.yang +300 -0
  47. gnpy_api-0.0.0/gnpyapi/yang/gnpy-network-topology@2025-01-20.yang +594 -0
  48. gnpy_api-0.0.0/gnpyapi/yang/gnpy-path-computation-simplified@2020-10-22.yang +559 -0
  49. gnpy_api-0.0.0/gnpyapi/yang/gnpy-path-computation@2025-01-21.yang +632 -0
  50. gnpy_api-0.0.0/gnpyapi/yang/ietf-layer0-types@2024-03-04.yang +2247 -0
  51. gnpy_api-0.0.0/gnpyapi/yang/ietf-optical-impairment-topology@2024-05-21.yang +1776 -0
  52. gnpy_api-0.0.0/gnpyapi/yang/ietf-routing-types@2017-12-04.yang +771 -0
  53. gnpy_api-0.0.0/gnpyapi/yang/ietf-te-topology@2020-08-06.yang +1952 -0
  54. gnpy_api-0.0.0/gnpyapi/yang/ietf-te-types@2022-10-21.yang +3458 -0
  55. gnpy_api-0.0.0/samples/rest_example.py +74 -0
  56. gnpy_api-0.0.0/setup.cfg +72 -0
  57. gnpy_api-0.0.0/setup.py +5 -0
  58. gnpy_api-0.0.0/tests/__init__.py +1 -0
  59. gnpy_api-0.0.0/tests/data/req/planning_demand_example.json +1578 -0
  60. gnpy_api-0.0.0/tests/data/req/planning_demand_wrong_eqpt.json +1578 -0
  61. gnpy_api-0.0.0/tests/data/req/planning_demand_wrong_topology.json +1578 -0
  62. gnpy_api-0.0.0/tests/data/res/planning_demand_res.json +1469 -0
  63. gnpy_api-0.0.0/tests/service/__init__.py +0 -0
  64. gnpy_api-0.0.0/tests/service/test_path_request_service.py +55 -0
  65. gnpy_api-0.0.0/tests/test_api.py +48 -0
  66. gnpy_api-0.0.0/tox.ini +44 -0
@@ -0,0 +1,142 @@
1
+ on:
2
+ push:
3
+ pull_request:
4
+ branches:
5
+ - main
6
+
7
+ name: GNPY-API-CI
8
+
9
+ jobs:
10
+ linters:
11
+ name: Lint Code
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ with:
16
+ fetch-depth: 0
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v4
19
+ with:
20
+ python-version: '3.10'
21
+ - name: Install dependencies
22
+ run: |
23
+ pip install tox
24
+ - name: Run linters
25
+ run: |
26
+ tox -e linters
27
+
28
+ build:
29
+ name: Tox test
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - uses: actions/checkout@v3
33
+ with:
34
+ fetch-depth: 0
35
+ - uses: fedora-python/tox-github-action@v37.0
36
+ with:
37
+ tox_env: ${{ matrix.tox_env }}
38
+ dnf_install: ${{ matrix.dnf_install }}
39
+ - uses: codecov/codecov-action@v3.1.1
40
+ if: ${{ endswith(matrix.tox_env, '-cover') }}
41
+ with:
42
+ files: ${{ github.workspace }}/cover/coverage.xml
43
+ strategy:
44
+ fail-fast: false
45
+ matrix:
46
+ tox_env:
47
+ - py38
48
+ - py39
49
+ - py310
50
+ - py311
51
+ - py312-cover
52
+ include:
53
+ - tox_env: docs
54
+ dnf_install: graphviz
55
+
56
+ release-build:
57
+ runs-on: ubuntu-latest
58
+ needs: build
59
+
60
+ steps:
61
+ - uses: actions/checkout@v4
62
+
63
+ - uses: actions/setup-python@v5
64
+ with:
65
+ python-version: "3.12"
66
+
67
+ - name: build release distributions
68
+ run: |
69
+ python -m pip install build
70
+ python -m build
71
+
72
+ - name: upload windows dists
73
+ uses: actions/upload-artifact@v4
74
+ with:
75
+ name: release-dists
76
+ path: dist/
77
+
78
+ pypi-publish:
79
+ runs-on: ubuntu-latest
80
+ needs:
81
+ - release-build
82
+ permissions:
83
+ id-token: write
84
+
85
+ steps:
86
+ - name: Retrieve release distributions
87
+ uses: actions/download-artifact@v4
88
+ with:
89
+ name: release-dists
90
+ path: dist/
91
+
92
+ - name: Publish release distributions to PyPI
93
+ uses: pypa/gh-action-pypi-publish@release/v1
94
+
95
+ other-platforms:
96
+ name: Tests on other platforms
97
+ runs-on: ${{ matrix.os }}
98
+ steps:
99
+ - uses: actions/checkout@v3
100
+ with:
101
+ fetch-depth: 0
102
+ - uses: actions/setup-python@v4
103
+ with:
104
+ python-version: ${{ matrix.python_version }}
105
+ - run: |
106
+ pip install --editable .[tests]
107
+ pytest -vv
108
+ strategy:
109
+ fail-fast: false
110
+ matrix:
111
+ include:
112
+ - os: windows-2019
113
+ python_version: "3.10"
114
+ - os: windows-2022
115
+ python_version: "3.11"
116
+ - os: windows-2022
117
+ python_version: "3.12"
118
+ - os: macos-13
119
+ python_version: "3.12"
120
+ - os: macos-14
121
+ python_version: "3.12"
122
+
123
+ paywalled-platforms:
124
+ name: Tests on paywalled platforms
125
+ if: github.repository_owner == 'Telecominfraproject'
126
+ runs-on: ${{ matrix.os }}
127
+ steps:
128
+ - uses: actions/checkout@v3
129
+ with:
130
+ fetch-depth: 0
131
+ - uses: actions/setup-python@v4
132
+ with:
133
+ python-version: ${{ matrix.python_version }}
134
+ - run: |
135
+ pip install --editable .[tests]
136
+ pytest -vv
137
+ strategy:
138
+ fail-fast: false
139
+ matrix:
140
+ include:
141
+ - os: macos-13-xlarge # Apple M1 CPU
142
+ python_version: "3.12"
gnpy_api-0.0.0/AUTHORS ADDED
@@ -0,0 +1 @@
1
+ AndreaDAmico <adamico@nec-labs.com>
@@ -0,0 +1,4 @@
1
+ CHANGES
2
+ =======
3
+
4
+ * Fixing PyPi publishing in main.yml
@@ -0,0 +1,7 @@
1
+ FROM python:3.9-slim
2
+ COPY . /oopt-gnpy-api
3
+ WORKDIR /oopt-gnpy-api
4
+ RUN apt update; apt install -y git
5
+ RUN pip install .
6
+ RUN mkdir -p /opt/application/oopt-gnpy/autodesign
7
+ CMD [ "python", "./samples/rest_example.py" ]
gnpy_api-0.0.0/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2025, Telecom Infra Project
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: gnpy-api
3
+ Version: 0.0.0
4
+ Home-page: https://github.com/Telecominfraproject/oopt-gnpy-api
5
+ Author: Telecom Infra Project
6
+ Author-email: adamico@nec-labs.com
7
+ License: BSD-3-Clause
8
+ Project-URL: Bug Tracker, https://github.com/Telecominfraproject/oopt-gnpy-api/issues
9
+ Project-URL: Documentation, https://gnpyapi.readthedocs.io/
10
+ Keywords: optics,network,fiber,communication,route,planning,optimization,api
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Intended Audience :: Telecommunications Industry
15
+ Classifier: License :: OSI Approved :: BSD License
16
+ Classifier: Natural Language :: English
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: Implementation :: CPython
25
+ Classifier: Topic :: Scientific/Engineering
26
+ Classifier: Topic :: Scientific/Engineering :: Physics
27
+ Classifier: Topic :: System :: Networking
28
+ Requires-Python: >=3.8
29
+ Description-Content-Type: text/markdown; variant=GFM
30
+ License-File: LICENSE
31
+ Requires-Dist: setuptools
32
+ Requires-Dist: gnpy==2.12.1
33
+ Requires-Dist: flask>=1.1.2
34
+ Requires-Dist: Flask-Injector
35
+ Requires-Dist: pyopenssl==25.0.0
36
+ Provides-Extra: tests
37
+ Requires-Dist: build<2,>=1.0.3; extra == "tests"
38
+ Requires-Dist: pytest<8,>=7.4.3; extra == "tests"
39
+ Requires-Dist: pyang<3,>=2.6.1; extra == "tests"
40
+ Provides-Extra: docs
41
+ Requires-Dist: alabaster<1,>=0.7.12; extra == "docs"
42
+ Requires-Dist: docutils<1,>=0.17.1; extra == "docs"
43
+ Requires-Dist: myst-parser<1,>=0.16.1; extra == "docs"
44
+ Requires-Dist: Pygments<3,>=2.11.2; extra == "docs"
45
+ Requires-Dist: rstcheck; extra == "docs"
46
+ Requires-Dist: Sphinx<6,>=5.3.0; extra == "docs"
47
+ Requires-Dist: sphinxcontrib-bibtex<3,>=2.4.1; extra == "docs"
48
+ Dynamic: author
49
+ Dynamic: author-email
50
+ Dynamic: classifier
51
+ Dynamic: description
52
+ Dynamic: description-content-type
53
+ Dynamic: home-page
54
+ Dynamic: keywords
55
+ Dynamic: license
56
+ Dynamic: license-file
57
+ Dynamic: project-url
58
+ Dynamic: requires-python
59
+
60
+ # GNPy API
61
+ [![Python versions](https://img.shields.io/pypi/pyversions/gnpy)](https://pypi.org/project/gnpy/)
62
+
63
+ REST API (experimental)
64
+ -----------------------
65
+ ``gnpyapi`` provides an experimental api for requesting several paths at once. It is based on Flask server.
66
+ You can run it through command line or Docker.
67
+
68
+
69
+
70
+ $ curl --location 'http://localhost:8080/api/v1/path-request' --header 'Content-Type: application/json' --data @gnpyapi/exampledata/planning_demand_example.json
71
+
72
+ TODO: api documentation, unit tests, real WSGI server with trusted certificates
73
+
74
+ ## Quick Start
75
+
76
+ tbd
77
+
@@ -0,0 +1,17 @@
1
+ # GNPy API
2
+ [![Python versions](https://img.shields.io/pypi/pyversions/gnpy)](https://pypi.org/project/gnpy/)
3
+
4
+ REST API (experimental)
5
+ -----------------------
6
+ ``gnpyapi`` provides an experimental api for requesting several paths at once. It is based on Flask server.
7
+ You can run it through command line or Docker.
8
+
9
+
10
+
11
+ $ curl --location 'http://localhost:8080/api/v1/path-request' --header 'Content-Type: application/json' --data @gnpyapi/exampledata/planning_demand_example.json
12
+
13
+ TODO: api documentation, unit tests, real WSGI server with trusted certificates
14
+
15
+ ## Quick Start
16
+
17
+ tbd
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line.
5
+ SPHINXOPTS =
6
+ SPHINXBUILD = python -msphinx
7
+ SPHINXPROJ = GNPyAPI
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,13 @@
1
+ @inproceedings{LeRouzic:21,
2
+ author = {E. Le Rouzic and A Lindgren and S. Melin and D. Provencher and R. Subramanian and R. Joyce and F. Moore and D. Reeves and A. Rambaldi and P. Kaczmarek and K. Weeks and S. Neidlinger and G. Agrawal and S. Krishnamoha and B. Raszczyk and T. Uhlar and R. Casellas and O. Gonzalez de Dios and V. Lopez},
3
+ booktitle = {Optical Fiber Communication Conference (OFC) 2021},
4
+ journal = {Optical Fiber Communication Conference (OFC) 2021},
5
+ keywords = {Erbium-doped fiber amplifiers; Modes; Optical circuits; Optical components; Optical networks; Optical systems},
6
+ pages = {M1B.2},
7
+ publisher = {Optica Publishing Group},
8
+ title = {Operationalizing partially disaggregated optical networks: An open standards-driven multi-vendor demonstration},
9
+ year = {2021},
10
+ url = {https://opg.optica.org/abstract.cfm?URI=OFC-2021-M1B.2},
11
+ doi = {10.1364/OFC.2021.M1B.2},
12
+ abstract = {We present and demonstrate service provisioning in partially disaggregated multi-vendor network automation scenarios with online physical impairment validation. This work uses and extends standard interfaces (OpenConfig and ONF Transport API) to retrieve network information interacting with TIP GNPy tool.},
13
+ }
@@ -0,0 +1,187 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ #
4
+ # gnpy-api documentation build configuration file, created by
5
+ # sphinx-quickstart on Mon Dec 18 14:41:01 2017.
6
+ #
7
+ # This file is execfile()d with the current directory set to its
8
+ # containing dir.
9
+ #
10
+ # Note that not all possible configuration values are present in this
11
+ # autogenerated file.
12
+ #
13
+ # All configuration values have a default; values that are commented out
14
+ # serve to show the default.
15
+
16
+ # If extensions (or modules to document with autodoc) are in another directory,
17
+ # add these directories to sys.path here. If the directory is relative to the
18
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
19
+ #
20
+ import os
21
+ import sys
22
+ sys.path.insert(0, os.path.abspath('../'))
23
+
24
+ # -- General configuration ------------------------------------------------
25
+
26
+ # If your documentation needs a minimal Sphinx version, state it here.
27
+ #
28
+ # needs_sphinx = '1.0'
29
+
30
+ # Add any Sphinx extension module names here, as strings. They can be
31
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
32
+ # ones.
33
+ extensions = ['sphinx.ext.autodoc',
34
+ 'sphinx.ext.mathjax',
35
+ 'sphinx.ext.githubpages',
36
+ 'sphinxcontrib.bibtex',
37
+ 'sphinx.ext.graphviz',
38
+ 'myst_parser',
39
+ ]
40
+
41
+ myst_enable_extensions = [
42
+ "deflist",
43
+ "dollarmath",
44
+ ]
45
+
46
+ # Add any paths that contain templates here, relative to this directory.
47
+ templates_path = ['_templates']
48
+
49
+ # The suffix(es) of source filenames.
50
+ # You can specify multiple suffix as a list of string:
51
+ #
52
+ source_suffix = ['.rst', '.md']
53
+
54
+
55
+ # The master toctree document.
56
+ master_doc = 'index'
57
+
58
+ # General information about the project.
59
+ project = 'gnpy'
60
+ copyright = '2018 - 2025, Telecom Infra Project - OOPT PSE Group'
61
+ author = 'Telecom Infra Project - OOPT PSE Group'
62
+
63
+ # The language for content autogenerated by Sphinx. Refer to documentation
64
+ # for a list of supported languages.
65
+ #
66
+ # This is also used if you do content translation via gettext catalogs.
67
+ # Usually you set "language" from the command line for these cases.
68
+ language = 'en'
69
+
70
+ # List of patterns, relative to source directory, that match files and
71
+ # directories to ignore when looking for source files.
72
+ # This patterns also effect to html_static_path and html_extra_path
73
+ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
74
+
75
+ # The name of the Pygments (syntax highlighting) style to use.
76
+ pygments_style = 'sphinx'
77
+
78
+ # If true, `todo` and `todoList` produce output, else they produce nothing.
79
+ todo_include_todos = False
80
+
81
+
82
+ # -- Options for HTML output ----------------------------------------------
83
+
84
+ # The theme to use for HTML and HTML Help pages. See the documentation for
85
+ # a list of builtin themes.
86
+ #
87
+ html_theme = 'alabaster'
88
+ html_theme_options = {
89
+ 'logo': 'images/GNPy-logo.png',
90
+ 'logo_name': False,
91
+ }
92
+
93
+ html_logo = 'images/GNPy-logo.png'
94
+
95
+ # Theme options are theme-specific and customize the look and feel of a theme
96
+ # further. For a list of options available for each theme, see the
97
+ # documentation.
98
+ #
99
+ # html_theme_options = {}
100
+
101
+ # Add any paths that contain custom static files (such as style sheets) here,
102
+ # relative to this directory. They are copied after the builtin static files,
103
+ # so a file named "default.css" will overwrite the builtin "default.css".
104
+ html_static_path = []
105
+
106
+ # Custom sidebar templates, must be a dictionary that maps document names
107
+ # to template names.
108
+ #
109
+ # This is required for the alabaster theme
110
+ # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
111
+ html_sidebars = {
112
+ '**': [
113
+ 'about.html',
114
+ 'navigation.html',
115
+ 'relations.html', # needs 'show_related': True theme option to display
116
+ 'searchbox.html',
117
+ 'donate.html',
118
+ ]
119
+ }
120
+
121
+
122
+ # -- Options for HTMLHelp output ------------------------------------------
123
+
124
+ # Output file base name for HTML help builder.
125
+ htmlhelp_basename = 'gnpyapidoc'
126
+
127
+
128
+ # -- Options for LaTeX output ---------------------------------------------
129
+
130
+ latex_elements = {
131
+ # The paper size ('letterpaper' or 'a4paper').
132
+ #
133
+ # 'papersize': 'letterpaper',
134
+
135
+ # The font size ('10pt', '11pt' or '12pt').
136
+ #
137
+ # 'pointsize': '10pt',
138
+
139
+ # Additional stuff for the LaTeX preamble.
140
+ #
141
+ # 'preamble': '',
142
+
143
+ # Latex figure (float) alignment
144
+ #
145
+ # 'figure_align': 'htbp',
146
+ }
147
+
148
+ # Grouping the document tree into LaTeX files. List of tuples
149
+ # (source start file, target name, title,
150
+ # author, documentclass [howto, manual, or own class]).
151
+ latex_documents = [
152
+ (master_doc, 'gnpyapi.tex', 'GNPy API Documentation',
153
+ 'Telecom Infra Project - OOPT PSE Group', 'manual'),
154
+ ]
155
+
156
+
157
+ # -- Options for manual page output ---------------------------------------
158
+
159
+ # One entry per manual page. List of tuples
160
+ # (source start file, name, description, authors, manual section).
161
+ man_pages = [
162
+ (master_doc, 'gnpyapi', 'GNPy API Documentation',
163
+ [author], 1)
164
+ ]
165
+
166
+
167
+ # -- Options for Texinfo output -------------------------------------------
168
+
169
+ # Grouping the document tree into Texinfo files. List of tuples
170
+ # (source start file, target name, title, author,
171
+ # dir menu entry, description, category)
172
+ texinfo_documents = [
173
+ (master_doc, 'gnpyapi', 'GNPy API Documentation',
174
+ author, 'gnpyapi', 'One line description of project.',
175
+ 'Miscellaneous'),
176
+ ]
177
+
178
+ autodoc_default_options = {
179
+ 'members': True,
180
+ 'undoc-members': True,
181
+ 'private-members': True,
182
+ 'show-inheritance': True,
183
+ }
184
+
185
+ graphviz_output_format = 'svg'
186
+
187
+ bibtex_bibfiles = ['biblio.bib']
Binary file
@@ -0,0 +1,20 @@
1
+ GNPy API : Optical Route Planning API
2
+ =====================================================================
3
+
4
+ `GNPy <http://github.com/telecominfraproject/oopt-gnpy-api>`_ is an open-source,
5
+ community-developped API for GNPy library.
6
+
7
+ tbd
8
+
9
+ .. toctree::
10
+ :maxdepth: 4
11
+
12
+ intro
13
+
14
+ Indices and tables
15
+ ==================
16
+
17
+ * :ref:`genindex`
18
+ * :ref:`modindex`
19
+ * :ref:`search`
20
+
@@ -0,0 +1,4 @@
1
+ Introduction
2
+ ============
3
+
4
+ tbd
@@ -0,0 +1,36 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=python -msphinx
9
+ )
10
+ set SOURCEDIR=.
11
+ set BUILDDIR=_build
12
+ set SPHINXPROJ=GNPyAPI
13
+
14
+ if "%1" == "" goto help
15
+
16
+ %SPHINXBUILD% >NUL 2>NUL
17
+ if errorlevel 9009 (
18
+ echo.
19
+ echo.The Sphinx module was not found. Make sure you have Sphinx installed,
20
+ echo.then set the SPHINXBUILD environment variable to point to the full
21
+ echo.path of the 'sphinx-build' executable. Alternatively you may add the
22
+ echo.Sphinx directory to PATH.
23
+ echo.
24
+ echo.If you don't have Sphinx installed, grab it from
25
+ echo.http://sphinx-doc.org/
26
+ exit /b 1
27
+ )
28
+
29
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30
+ goto end
31
+
32
+ :help
33
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34
+
35
+ :end
36
+ popd
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: gnpy-api
3
+ Version: 0.0.0
4
+ Home-page: https://github.com/Telecominfraproject/oopt-gnpy-api
5
+ Author: Telecom Infra Project
6
+ Author-email: adamico@nec-labs.com
7
+ License: BSD-3-Clause
8
+ Project-URL: Bug Tracker, https://github.com/Telecominfraproject/oopt-gnpy-api/issues
9
+ Project-URL: Documentation, https://gnpyapi.readthedocs.io/
10
+ Keywords: optics,network,fiber,communication,route,planning,optimization,api
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Intended Audience :: Telecommunications Industry
15
+ Classifier: License :: OSI Approved :: BSD License
16
+ Classifier: Natural Language :: English
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: Implementation :: CPython
25
+ Classifier: Topic :: Scientific/Engineering
26
+ Classifier: Topic :: Scientific/Engineering :: Physics
27
+ Classifier: Topic :: System :: Networking
28
+ Requires-Python: >=3.8
29
+ Description-Content-Type: text/markdown; variant=GFM
30
+ License-File: LICENSE
31
+ Requires-Dist: setuptools
32
+ Requires-Dist: gnpy==2.12.1
33
+ Requires-Dist: flask>=1.1.2
34
+ Requires-Dist: Flask-Injector
35
+ Requires-Dist: pyopenssl==25.0.0
36
+ Provides-Extra: tests
37
+ Requires-Dist: build<2,>=1.0.3; extra == "tests"
38
+ Requires-Dist: pytest<8,>=7.4.3; extra == "tests"
39
+ Requires-Dist: pyang<3,>=2.6.1; extra == "tests"
40
+ Provides-Extra: docs
41
+ Requires-Dist: alabaster<1,>=0.7.12; extra == "docs"
42
+ Requires-Dist: docutils<1,>=0.17.1; extra == "docs"
43
+ Requires-Dist: myst-parser<1,>=0.16.1; extra == "docs"
44
+ Requires-Dist: Pygments<3,>=2.11.2; extra == "docs"
45
+ Requires-Dist: rstcheck; extra == "docs"
46
+ Requires-Dist: Sphinx<6,>=5.3.0; extra == "docs"
47
+ Requires-Dist: sphinxcontrib-bibtex<3,>=2.4.1; extra == "docs"
48
+ Dynamic: author
49
+ Dynamic: author-email
50
+ Dynamic: classifier
51
+ Dynamic: description
52
+ Dynamic: description-content-type
53
+ Dynamic: home-page
54
+ Dynamic: keywords
55
+ Dynamic: license
56
+ Dynamic: license-file
57
+ Dynamic: project-url
58
+ Dynamic: requires-python
59
+
60
+ # GNPy API
61
+ [![Python versions](https://img.shields.io/pypi/pyversions/gnpy)](https://pypi.org/project/gnpy/)
62
+
63
+ REST API (experimental)
64
+ -----------------------
65
+ ``gnpyapi`` provides an experimental api for requesting several paths at once. It is based on Flask server.
66
+ You can run it through command line or Docker.
67
+
68
+
69
+
70
+ $ curl --location 'http://localhost:8080/api/v1/path-request' --header 'Content-Type: application/json' --data @gnpyapi/exampledata/planning_demand_example.json
71
+
72
+ TODO: api documentation, unit tests, real WSGI server with trusted certificates
73
+
74
+ ## Quick Start
75
+
76
+ tbd
77
+