Skip to content

Commit

Permalink
Merge pull request #9 from atlanticwave-sdx/8-update-to-the-sdx-lc-20
Browse files Browse the repository at this point in the history
sdx-lc 2.0.0
  • Loading branch information
YufengXin authored May 8, 2024
2 parents 5dd0a12 + 5143246 commit 7009dcc
Show file tree
Hide file tree
Showing 57 changed files with 1,445 additions and 945 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ jobs:
git clone https://github.com/atlanticwave-sdx/sdx-lc.git /tmp/sdx-lc
cd /tmp/sdx-lc
pip install -r requirements.txt
python -m swagger_server &
python -m sdx_lc &
env:
SDX_MQ_IP: 'localhost'
SDXLC_HOST: 'localhost'
SDXLC_PORT: '8080'
SDXLC_VERSION: '1.0.0'
SDXLC_VERSION: '2.0.0'
SDXLC_NAME: 'lc2'
MQ_NAME: 'hello'
MQ_HOST: 'localhost'
Expand All @@ -91,7 +91,7 @@ jobs:
env:
SDXLC_HOST: 'localhost'
SDXLC_PORT: '8080'
SDXLC_VERSION: '1.0.0'
SDXLC_VERSION: '2.0.0'

- name: Send coverage data to coveralls.io
run: |
Expand Down
50 changes: 18 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# swagger-client
# sdx_lc_client
You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 1.0.0
- Package version: 1.0.0
- API version: 2.0.0
- Package version: 2.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

## Requirements.
Expand All @@ -23,7 +23,7 @@ pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

Then import the package:
```python
import swagger_client
import sdx_lc_client
```

### Setuptools
Expand All @@ -37,7 +37,7 @@ python setup.py install --user

Then import the package:
```python
import swagger_client
import sdx_lc_client
```

## Getting Started
Expand All @@ -47,13 +47,13 @@ Please follow the [installation procedure](#installation--usage) and then run th
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
import sdx_lc_client
from sdx_lc_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ConnectionApi(swagger_client.ApiClient(configuration))
connection_id = 789 # int | ID of the connection that needs to be deleted
api_instance = sdx_lc_client.ConnectionApi(sdx_lc_client.ApiClient(configuration))
connection_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | ID of the connection that needs to be deleted

try:
# Delete connection order by ID
Expand All @@ -62,8 +62,8 @@ except ApiException as e:
print("Exception when calling ConnectionApi->delete_connection: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.ConnectionApi(swagger_client.ApiClient(configuration))
connection_id = 789 # int | ID of connection that needs to be fetched
api_instance = sdx_lc_client.ConnectionApi(sdx_lc_client.ApiClient(configuration))
connection_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | ID of connection that needs to be fetched

try:
# Find connection by ID
Expand All @@ -73,8 +73,8 @@ except ApiException as e:
print("Exception when calling ConnectionApi->getconnection_by_id: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.ConnectionApi(swagger_client.ApiClient(configuration))
body = swagger_client.Connection() # Connection | order placed for creating a connection
api_instance = sdx_lc_client.ConnectionApi(sdx_lc_client.ApiClient(configuration))
body = sdx_lc_client.Connection() # Connection | order placed for creating a connection

try:
# Place an connection request from the SDX-Controller
Expand All @@ -86,12 +86,12 @@ except ApiException as e:

## Documentation for API Endpoints

All URIs are relative to *https://virtserver.swaggerhub.com/SDX-LC/1.0.0*
All URIs are relative to *https://virtserver.swaggerhub.com/SDX-LC/2.0.0*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ConnectionApi* | [**delete_connection**](docs/ConnectionApi.md#delete_connection) | **DELETE** /connection/{connectionId} | Delete connection order by ID
*ConnectionApi* | [**getconnection_by_id**](docs/ConnectionApi.md#getconnection_by_id) | **GET** /connection/{connectionId} | Find connection by ID
*ConnectionApi* | [**delete_connection**](docs/ConnectionApi.md#delete_connection) | **DELETE** /connection/{connection_id} | Delete connection order by ID
*ConnectionApi* | [**getconnection_by_id**](docs/ConnectionApi.md#getconnection_by_id) | **GET** /connection/{connection_id} | Find connection by ID
*ConnectionApi* | [**place_connection**](docs/ConnectionApi.md#place_connection) | **POST** /conection | Place an connection request from the SDX-Controller
*LinkApi* | [**add_link**](docs/LinkApi.md#add_link) | **POST** /link | add a new link to the topology
*LinkApi* | [**delete_link**](docs/LinkApi.md#delete_link) | **DELETE** /link | Deletes a link
Expand All @@ -108,7 +108,7 @@ Class | Method | HTTP request | Description
*TopologyApi* | [**get_topologyby_version**](docs/TopologyApi.md#get_topologyby_version) | **GET** /topology/{version} | Find topology by version
*TopologyApi* | [**topology_version**](docs/TopologyApi.md#topology_version) | **GET** /topology/version | Finds topology version
*TopologyApi* | [**update_topology**](docs/TopologyApi.md#update_topology) | **PUT** /topology | Update an existing topology
*TopologyApi* | [**upload_file**](docs/TopologyApi.md#upload_file) | **POST** /topology/{topologyId}/uploadImage | uploads an topology image
*TopologyApi* | [**upload_file**](docs/TopologyApi.md#upload_file) | **POST** /topology/{topology_id}/uploadImage | uploads an topology image
*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user
*UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
*UserApi* | [**create_users_with_list_input**](docs/UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
Expand All @@ -133,21 +133,7 @@ Class | Method | HTTP request | Description

## Documentation For Authorization


## api_key

- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header

## topology_auth

- **Type**: OAuth
- **Flow**: implicit
- **Authorization URL**: http://0.0.0.0:8080/oauth/dialog
- **Scopes**:
- **write:topology**: modify topology in your account
- **read:topology**: read your topology
All endpoints do not require authorization.


## Author
Expand Down
14 changes: 14 additions & 0 deletions docs/Connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ Name | Type | Description | Notes
**quantity** | **int** | | [optional]
**start_time** | **datetime** | | [optional]
**end_time** | **datetime** | | [optional]
**multi_path** | **bool** | | [optional]
**preempt** | **bool** | | [optional]
**backup_path_type** | **str** | | [optional]
**exclusive_links** | [**list[Link]**](Link.md) | | [optional]
**inclusive_links** | [**list[Link]**](Link.md) | | [optional]
**bandwidth_required** | **float** | | [optional]
**bandwidth_measured** | **float** | | [optional]
**latency_required** | **float** | | [optional]
**latency_measured** | **float** | | [optional]
**packetloss_required** | **float** | | [optional]
**packetloss_measured** | **float** | | [optional]
**availability_required** | **float** | | [optional]
**availability_measured** | **float** | | [optional]
**paths** | **list[str]** | | [optional]
**status** | **str** | Connection Status | [optional]
**complete** | **bool** | | [optional] [default to False]

Expand Down
36 changes: 18 additions & 18 deletions docs/ConnectionApi.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# swagger_client.ConnectionApi
# sdx_lc_client.ConnectionApi

All URIs are relative to *https://virtserver.swaggerhub.com/SDX-LC/1.0.0*
All URIs are relative to *https://virtserver.swaggerhub.com/SDX-LC/2.0.0*

Method | HTTP request | Description
------------- | ------------- | -------------
[**delete_connection**](ConnectionApi.md#delete_connection) | **DELETE** /connection/{connectionId} | Delete connection order by ID
[**getconnection_by_id**](ConnectionApi.md#getconnection_by_id) | **GET** /connection/{connectionId} | Find connection by ID
[**delete_connection**](ConnectionApi.md#delete_connection) | **DELETE** /connection/{connection_id} | Delete connection order by ID
[**getconnection_by_id**](ConnectionApi.md#getconnection_by_id) | **GET** /connection/{connection_id} | Find connection by ID
[**place_connection**](ConnectionApi.md#place_connection) | **POST** /conection | Place an connection request from the SDX-Controller

# **delete_connection**
Expand All @@ -19,13 +19,13 @@ delete a connection
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
import sdx_lc_client
from sdx_lc_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ConnectionApi()
connection_id = 789 # int | ID of the connection that needs to be deleted
api_instance = sdx_lc_client.ConnectionApi()
connection_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | ID of the connection that needs to be deleted

try:
# Delete connection order by ID
Expand All @@ -38,7 +38,7 @@ except ApiException as e:

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**connection_id** | **int**| ID of the connection that needs to be deleted |
**connection_id** | [**str**](.md)| ID of the connection that needs to be deleted |

### Return type

Expand Down Expand Up @@ -66,13 +66,13 @@ connection details
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
import sdx_lc_client
from sdx_lc_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ConnectionApi()
connection_id = 789 # int | ID of connection that needs to be fetched
api_instance = sdx_lc_client.ConnectionApi()
connection_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | ID of connection that needs to be fetched

try:
# Find connection by ID
Expand All @@ -86,7 +86,7 @@ except ApiException as e:

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**connection_id** | **int**| ID of connection that needs to be fetched |
**connection_id** | [**str**](.md)| ID of connection that needs to be fetched |

### Return type

Expand All @@ -112,13 +112,13 @@ Place an connection request from the SDX-Controller
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
import sdx_lc_client
from sdx_lc_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ConnectionApi()
body = swagger_client.Connection() # Connection | order placed for creating a connection
api_instance = sdx_lc_client.ConnectionApi()
body = sdx_lc_client.Connection() # Connection | order placed for creating a connection

try:
# Place an connection request from the SDX-Controller
Expand Down
2 changes: 1 addition & 1 deletion docs/Link.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Name | Type | Description | Notes
**status** | **str** | | [optional]
**state** | **str** | | [optional]
**private_attributes** | **list[str]** | | [optional]
**time_stamp** | **datetime** | | [optional]
**timestamp** | **datetime** | | [optional]
**measurement_period** | [**LinkMeasurementPeriod**](LinkMeasurementPeriod.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
50 changes: 20 additions & 30 deletions docs/LinkApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# swagger_client.LinkApi
# sdx_lc_client.LinkApi

All URIs are relative to *https://virtserver.swaggerhub.com/SDX-LC/1.0.0*
All URIs are relative to *https://virtserver.swaggerhub.com/SDX-LC/2.0.0*

Method | HTTP request | Description
------------- | ------------- | -------------
Expand All @@ -18,17 +18,13 @@ add a new link to the topology
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
import sdx_lc_client
from sdx_lc_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: topology_auth
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LinkApi(swagger_client.ApiClient(configuration))
body = swagger_client.Link() # Link | link object that needs to be sent to the SDX LC
api_instance = sdx_lc_client.LinkApi()
body = sdx_lc_client.Link() # Link | link object that needs to be sent to the SDX LC

try:
# add a new link to the topology
Expand All @@ -49,7 +45,7 @@ void (empty response body)

### Authorization

[topology_auth](../README.md#topology_auth)
No authorization required

### HTTP request headers

Expand All @@ -59,30 +55,25 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **delete_link**
> delete_link(node_id, api_key=api_key)
> delete_link(node_id)
Deletes a link

### Example
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
import sdx_lc_client
from sdx_lc_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: topology_auth
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LinkApi(swagger_client.ApiClient(configuration))
api_instance = sdx_lc_client.LinkApi()
node_id = 789 # int | ID of link to delete
api_key = 'api_key_example' # str | (optional)

try:
# Deletes a link
api_instance.delete_link(node_id, api_key=api_key)
api_instance.delete_link(node_id)
except ApiException as e:
print("Exception when calling LinkApi->delete_link: %s\n" % e)
```
Expand All @@ -92,15 +83,14 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**node_id** | **int**| ID of link to delete |
**api_key** | **str**| | [optional]

### Return type

void (empty response body)

### Authorization

[topology_auth](../README.md#topology_auth)
No authorization required

### HTTP request headers

Expand All @@ -120,12 +110,12 @@ ID of the link
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
import sdx_lc_client
from sdx_lc_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LinkApi()
api_instance = sdx_lc_client.LinkApi()

try:
# get an existing link
Expand Down Expand Up @@ -163,13 +153,13 @@ ID of link that needs to be updated.
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
import sdx_lc_client
from sdx_lc_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LinkApi()
body = swagger_client.Link() # Link | link object that needs to be sent to the SDX LC
api_instance = sdx_lc_client.LinkApi()
body = sdx_lc_client.Link() # Link | link object that needs to be sent to the SDX LC

try:
# Update an existing link
Expand Down
1 change: 1 addition & 0 deletions docs/Location.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Name | Type | Description | Notes
**address** | **str** | | [optional]
**latitude** | **float** | | [optional]
**longitude** | **float** | | [optional]
**iso3166_2_lvl4** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Loading

0 comments on commit 7009dcc

Please sign in to comment.