From d68ed2845520030143ea3362612c27d5a75df0a0 Mon Sep 17 00:00:00 2001 From: Yufeng Xin Date: Mon, 8 Jul 2024 11:01:13 -0400 Subject: [PATCH 1/5] upgrade to v2 --- README.md | 34 +- docs/ConnectionApi.md | 63 +- docs/ConnectionBody.md | 8 + docs/ConnectionQosMetrics.md | 17 + docs/ConnectionQosUnit.md | 10 + docs/ConnectionScheduling.md | 10 + docs/ConnectionV2.md | 23 + docs/ConnectionV2Endpoints.md | 10 + docs/ConnectionV2Notifications.md | 9 + docs/Location.md | 1 + docs/Topology.md | 2 +- docs/TopologyApi.md | 46 +- setup.py | 2 +- swagger_client/__init__.py | 15 +- swagger_client/api/connection_api.py | 137 ++++- swagger_client/api/link_api.py | 6 +- swagger_client/api/node_api.py | 6 +- swagger_client/api/topology_api.py | 81 +-- swagger_client/api/user_api.py | 49 +- swagger_client/api_client.py | 7 +- swagger_client/configuration.py | 25 +- swagger_client/models/__init__.py | 15 +- swagger_client/models/api_response.py | 6 +- swagger_client/models/connection.py | 6 +- swagger_client/models/connection_body.py | 89 +++ .../models/connection_qos_metrics.py | 336 +++++++++++ swagger_client/models/connection_qos_unit.py | 137 +++++ .../models/connection_scheduling.py | 137 +++++ swagger_client/models/connection_v2.py | 537 ++++++++++++++++++ .../models/connection_v2_endpoints.py | 137 +++++ .../models/connection_v2_notifications.py | 113 ++++ swagger_client/models/link.py | 6 +- swagger_client/models/location.py | 34 +- swagger_client/models/node.py | 6 +- swagger_client/models/port.py | 6 +- swagger_client/models/topology.py | 38 +- swagger_client/models/user.py | 6 +- swagger_client/rest.py | 15 +- test-requirements.txt | 3 +- test/__init__.py | 1 + test/test_api_response.py | 12 +- test/test_connection.py | 12 +- test/test_connection_api.py | 18 +- test/test_connection_body.py | 39 ++ test/test_connection_qos_metrics.py | 41 ++ test/test_connection_qos_unit.py | 41 ++ test/test_connection_scheduling.py | 41 ++ test/test_connection_v2.py | 39 ++ test/test_connection_v2_endpoints.py | 41 ++ test/test_connection_v2_notifications.py | 41 ++ test/test_link.py | 12 +- test/test_link_api.py | 11 +- test/test_location.py | 12 +- test/test_node.py | 12 +- test/test_node_api.py | 11 +- test/test_port.py | 12 +- test/test_topology.py | 12 +- test/test_topology_api.py | 17 +- test/test_user.py | 12 +- test/test_user_api.py | 11 +- tox.ini | 11 +- 61 files changed, 2295 insertions(+), 352 deletions(-) create mode 100644 docs/ConnectionBody.md create mode 100644 docs/ConnectionQosMetrics.md create mode 100644 docs/ConnectionQosUnit.md create mode 100644 docs/ConnectionScheduling.md create mode 100644 docs/ConnectionV2.md create mode 100644 docs/ConnectionV2Endpoints.md create mode 100644 docs/ConnectionV2Notifications.md create mode 100644 swagger_client/models/connection_body.py create mode 100644 swagger_client/models/connection_qos_metrics.py create mode 100644 swagger_client/models/connection_qos_unit.py create mode 100644 swagger_client/models/connection_scheduling.py create mode 100644 swagger_client/models/connection_v2.py create mode 100644 swagger_client/models/connection_v2_endpoints.py create mode 100644 swagger_client/models/connection_v2_notifications.py create mode 100644 test/test_connection_body.py create mode 100644 test/test_connection_qos_metrics.py create mode 100644 test/test_connection_qos_unit.py create mode 100644 test/test_connection_scheduling.py create mode 100644 test/test_connection_v2.py create mode 100644 test/test_connection_v2_endpoints.py create mode 100644 test/test_connection_v2_notifications.py diff --git a/README.md b/README.md index ad41a29..7bb71b2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ You can find out more about Swagger at [http://swagger.io](http://swagger.io) or This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: -- API version: 1.0.0 +- API version: 2.0.0 - Package version: 1.0.0 - Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen @@ -53,7 +53,7 @@ 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 +connection_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | ID of the connection that needs to be deleted try: # Delete connection order by ID @@ -63,7 +63,7 @@ except ApiException as 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 +connection_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | ID of connection that needs to be fetched try: # Find connection by ID @@ -74,7 +74,17 @@ except ApiException as 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 + +try: + # List all connections + api_response = api_instance.getconnections() + pprint(api_response) +except ApiException as e: + print("Exception when calling ConnectionApi->getconnections: %s\n" % e) + +# create an instance of the API class +api_instance = swagger_client.ConnectionApi(swagger_client.ApiClient(configuration)) +body = swagger_client.ConnectionBody() # ConnectionBody | order placed for creating a connection try: # Place an connection request from the SDX-Controller @@ -90,13 +100,14 @@ All URIs are relative to *https://virtserver.swaggerhub.com/SDX-Controller/1.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* | [**place_connection**](docs/ConnectionApi.md#place_connection) | **POST** /conection | Place an connection request from the SDX-Controller +*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* | [**getconnections**](docs/ConnectionApi.md#getconnections) | **GET** /connections | List all connections +*ConnectionApi* | [**place_connection**](docs/ConnectionApi.md#place_connection) | **POST** /connection | Place an connection request from the SDX-Controller *LinkApi* | [**get_link**](docs/LinkApi.md#get_link) | **GET** /link | get an existing link *NodeApi* | [**get_node**](docs/NodeApi.md#get_node) | **GET** /node | get an existing node *TopologyApi* | [**get_topology**](docs/TopologyApi.md#get_topology) | **GET** /topology | get an existing topology -*TopologyApi* | [**get_topologyby_version**](docs/TopologyApi.md#get_topologyby_version) | **GET** /topology/{version} | Find topology by version +*TopologyApi* | [**get_topologyby_grenml**](docs/TopologyApi.md#get_topologyby_grenml) | **GET** /topology/grenml | Get topology grenml *TopologyApi* | [**topology_version**](docs/TopologyApi.md#topology_version) | **GET** /topology/version | Finds topology version *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 @@ -111,6 +122,13 @@ Class | Method | HTTP request | Description - [ApiResponse](docs/ApiResponse.md) - [Connection](docs/Connection.md) + - [ConnectionBody](docs/ConnectionBody.md) + - [ConnectionQosMetrics](docs/ConnectionQosMetrics.md) + - [ConnectionQosUnit](docs/ConnectionQosUnit.md) + - [ConnectionScheduling](docs/ConnectionScheduling.md) + - [ConnectionV2](docs/ConnectionV2.md) + - [ConnectionV2Endpoints](docs/ConnectionV2Endpoints.md) + - [ConnectionV2Notifications](docs/ConnectionV2Notifications.md) - [Link](docs/Link.md) - [Location](docs/Location.md) - [Node](docs/Node.md) diff --git a/docs/ConnectionApi.md b/docs/ConnectionApi.md index b73b109..fa5009c 100644 --- a/docs/ConnectionApi.md +++ b/docs/ConnectionApi.md @@ -4,9 +4,10 @@ All URIs are relative to *https://virtserver.swaggerhub.com/SDX-Controller/1.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 -[**place_connection**](ConnectionApi.md#place_connection) | **POST** /conection | Place an connection request from the SDX-Controller +[**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 +[**getconnections**](ConnectionApi.md#getconnections) | **GET** /connections | List all connections +[**place_connection**](ConnectionApi.md#place_connection) | **POST** /connection | Place an connection request from the SDX-Controller # **delete_connection** > delete_connection(connection_id) @@ -25,7 +26,7 @@ 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 +connection_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | ID of the connection that needs to be deleted try: # Delete connection order by ID @@ -38,7 +39,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 @@ -72,7 +73,7 @@ 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 +connection_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | ID of connection that needs to be fetched try: # Find connection by ID @@ -86,7 +87,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 @@ -103,6 +104,50 @@ No authorization required [[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) +# **getconnections** +> list[Connection] getconnections() + +List all connections + +connection details + +### Example +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = swagger_client.ConnectionApi() + +try: + # List all connections + api_response = api_instance.getconnections() + pprint(api_response) +except ApiException as e: + print("Exception when calling ConnectionApi->getconnections: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[Connection]**](Connection.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +[[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) + # **place_connection** > Connection place_connection(body) @@ -118,7 +163,7 @@ 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 +body = swagger_client.ConnectionBody() # ConnectionBody | order placed for creating a connection try: # Place an connection request from the SDX-Controller @@ -132,7 +177,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Connection**](Connection.md)| order placed for creating a connection | + **body** | [**ConnectionBody**](ConnectionBody.md)| order placed for creating a connection | ### Return type diff --git a/docs/ConnectionBody.md b/docs/ConnectionBody.md new file mode 100644 index 0000000..214c5ac --- /dev/null +++ b/docs/ConnectionBody.md @@ -0,0 +1,8 @@ +# ConnectionBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ConnectionQosMetrics.md b/docs/ConnectionQosMetrics.md new file mode 100644 index 0000000..a1832a6 --- /dev/null +++ b/docs/ConnectionQosMetrics.md @@ -0,0 +1,17 @@ +# ConnectionQosMetrics + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**min_bw** | [**ConnectionQosUnit**](ConnectionQosUnit.md) | | [optional] +**max_delay** | [**ConnectionQosUnit**](ConnectionQosUnit.md) | | [optional] +**max_number_oxps** | [**ConnectionQosUnit**](ConnectionQosUnit.md) | | [optional] +**bandwidth_measured** | **float** | | [optional] +**latency_measured** | **float** | | [optional] +**packetloss_required** | **float** | | [optional] +**packetloss_measured** | **float** | | [optional] +**availability_required** | **float** | | [optional] +**availability_measured** | **float** | | [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) + diff --git a/docs/ConnectionQosUnit.md b/docs/ConnectionQosUnit.md new file mode 100644 index 0000000..c2f634b --- /dev/null +++ b/docs/ConnectionQosUnit.md @@ -0,0 +1,10 @@ +# ConnectionQosUnit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **int** | | [optional] +**strict** | **bool** | | [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) + diff --git a/docs/ConnectionScheduling.md b/docs/ConnectionScheduling.md new file mode 100644 index 0000000..179de62 --- /dev/null +++ b/docs/ConnectionScheduling.md @@ -0,0 +1,10 @@ +# ConnectionScheduling + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_time** | **datetime** | | [optional] +**end_time** | **datetime** | | [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) + diff --git a/docs/ConnectionV2.md b/docs/ConnectionV2.md new file mode 100644 index 0000000..4024fdd --- /dev/null +++ b/docs/ConnectionV2.md @@ -0,0 +1,23 @@ +# ConnectionV2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**endpoints** | [**list[ConnectionV2Endpoints]**](ConnectionV2Endpoints.md) | | +**description** | **str** | | +**notifications** | [**list[ConnectionV2Notifications]**](ConnectionV2Notifications.md) | | +**scheduling** | [**ConnectionScheduling**](ConnectionScheduling.md) | | +**qos_metrics** | [**dict(str, ConnectionQosMetrics)**](ConnectionQosMetrics.md) | | +**paths** | **list[str]** | | [optional] +**status** | **str** | Connection Status | [optional] +**complete** | **bool** | | [optional] [default to False] +**quantity** | **int** | | [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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ConnectionV2Endpoints.md b/docs/ConnectionV2Endpoints.md new file mode 100644 index 0000000..f918bb4 --- /dev/null +++ b/docs/ConnectionV2Endpoints.md @@ -0,0 +1,10 @@ +# ConnectionV2Endpoints + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**port_id** | **str** | | [optional] +**vlan** | **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) + diff --git a/docs/ConnectionV2Notifications.md b/docs/ConnectionV2Notifications.md new file mode 100644 index 0000000..4abb5b5 --- /dev/null +++ b/docs/ConnectionV2Notifications.md @@ -0,0 +1,9 @@ +# ConnectionV2Notifications + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **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) + diff --git a/docs/Location.md b/docs/Location.md index b60fd85..5413ec1 100644 --- a/docs/Location.md +++ b/docs/Location.md @@ -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) diff --git a/docs/Topology.md b/docs/Topology.md index 1cd14dd..e323572 100644 --- a/docs/Topology.md +++ b/docs/Topology.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **id** | **str** | | **name** | **str** | | **version** | **int** | | -**time_stamp** | **datetime** | | +**timestamp** | **datetime** | | **nodes** | [**list[Node]**](Node.md) | | **links** | [**list[Link]**](Link.md) | | diff --git a/docs/TopologyApi.md b/docs/TopologyApi.md index 7105505..2dfa8ae 100644 --- a/docs/TopologyApi.md +++ b/docs/TopologyApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://virtserver.swaggerhub.com/SDX-Controller/1.0.0 Method | HTTP request | Description ------------- | ------------- | ------------- [**get_topology**](TopologyApi.md#get_topology) | **GET** /topology | get an existing topology -[**get_topologyby_version**](TopologyApi.md#get_topologyby_version) | **GET** /topology/{version} | Find topology by version +[**get_topologyby_grenml**](TopologyApi.md#get_topologyby_grenml) | **GET** /topology/grenml | Get topology grenml [**topology_version**](TopologyApi.md#topology_version) | **GET** /topology/version | Finds topology version # **get_topology** @@ -52,12 +52,12 @@ No authorization required [[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) -# **get_topologyby_version** -> Topology get_topologyby_version(topology_id, version) +# **get_topologyby_grenml** +> str get_topologyby_grenml() -Find topology by version +Get topology grenml -Returns a single topology +Returns a single topology by grenml ### Example ```python @@ -67,44 +67,32 @@ import swagger_client from swagger_client.rest import ApiException from pprint import pprint -# Configure API key authorization: api_key -configuration = swagger_client.Configuration() -configuration.api_key['api_key'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' - # create an instance of the API class -api_instance = swagger_client.TopologyApi(swagger_client.ApiClient(configuration)) -topology_id = 789 # int | ID of topology to return -version = 789 # int | version of topology to return +api_instance = swagger_client.TopologyApi() try: - # Find topology by version - api_response = api_instance.get_topologyby_version(topology_id, version) + # Get topology grenml + api_response = api_instance.get_topologyby_grenml() pprint(api_response) except ApiException as e: - print("Exception when calling TopologyApi->get_topologyby_version: %s\n" % e) + print("Exception when calling TopologyApi->get_topologyby_grenml: %s\n" % e) ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **topology_id** | **int**| ID of topology to return | - **version** | **int**| version of topology to return | +This endpoint does not need any parameter. ### Return type -[**Topology**](Topology.md) +**str** ### Authorization -[api_key](../README.md#api_key) +No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json + - **Accept**: text/plain [[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) @@ -123,12 +111,8 @@ import swagger_client from swagger_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.TopologyApi(swagger_client.ApiClient(configuration)) +api_instance = swagger_client.TopologyApi() topology_id = 'topology_id_example' # str | topology id try: @@ -151,7 +135,7 @@ Name | Type | Description | Notes ### Authorization -[topology_auth](../README.md#topology_auth) +No authorization required ### HTTP request headers diff --git a/setup.py b/setup.py index 79194e4..ed80d78 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/swagger_client/__init__.py b/swagger_client/__init__.py index 238a072..c9df73d 100644 --- a/swagger_client/__init__.py +++ b/swagger_client/__init__.py @@ -5,11 +5,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -30,6 +28,15 @@ # import models into sdk package from swagger_client.models.api_response import ApiResponse from swagger_client.models.connection import Connection +from swagger_client.models.connection_body import ConnectionBody +from swagger_client.models.connection_qos_metrics import ConnectionQosMetrics +from swagger_client.models.connection_qos_unit import ConnectionQosUnit +from swagger_client.models.connection_scheduling import ConnectionScheduling +from swagger_client.models.connection_v2 import ConnectionV2 +from swagger_client.models.connection_v2_endpoints import ConnectionV2Endpoints +from swagger_client.models.connection_v2_notifications import ( + ConnectionV2Notifications, +) from swagger_client.models.link import Link from swagger_client.models.location import Location from swagger_client.models.node import Node diff --git a/swagger_client/api/connection_api.py b/swagger_client/api/connection_api.py index 6531429..2592c73 100644 --- a/swagger_client/api/connection_api.py +++ b/swagger_client/api/connection_api.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -44,7 +42,7 @@ def delete_connection(self, connection_id, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param int connection_id: ID of the connection that needs to be deleted (required) + :param str connection_id: ID of the connection that needs to be deleted (required) :return: None If the method is called asynchronously, returns the request thread. @@ -72,7 +70,7 @@ def delete_connection_with_http_info( >>> result = thread.get() :param async_req bool - :param int connection_id: ID of the connection that needs to be deleted (required) + :param str connection_id: ID of the connection that needs to be deleted (required) :return: None If the method is called asynchronously, returns the request thread. @@ -96,15 +94,16 @@ def delete_connection_with_http_info( # verify the required parameter 'connection_id' is set if "connection_id" not in params or params["connection_id"] is None: raise ValueError( - "Missing the required parameter `connection_id` " - "when calling `delete_connection`" - ) + "Missing the required parameter `connection_id` when calling `delete_connection`" + ) # noqa: E501 collection_formats = {} path_params = {} if "connection_id" in params: - path_params["connectionId"] = params["connection_id"] # noqa: E501 + path_params["connection_id"] = params[ + "connection_id" + ] # noqa: E501 query_params = [] @@ -118,7 +117,7 @@ def delete_connection_with_http_info( auth_settings = [] # noqa: E501 return self.api_client.call_api( - "/connection/{connectionId}", + "/connection/{connection_id}", "DELETE", path_params, query_params, @@ -145,7 +144,7 @@ def getconnection_by_id(self, connection_id, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param int connection_id: ID of connection that needs to be fetched (required) + :param str connection_id: ID of connection that needs to be fetched (required) :return: Connection If the method is called asynchronously, returns the request thread. @@ -173,7 +172,7 @@ def getconnection_by_id_with_http_info( >>> result = thread.get() :param async_req bool - :param int connection_id: ID of connection that needs to be fetched (required) + :param str connection_id: ID of connection that needs to be fetched (required) :return: Connection If the method is called asynchronously, returns the request thread. @@ -197,15 +196,16 @@ def getconnection_by_id_with_http_info( # verify the required parameter 'connection_id' is set if "connection_id" not in params or params["connection_id"] is None: raise ValueError( - "Missing the required parameter `connection_id` " - "when calling `getconnection_by_id`" - ) + "Missing the required parameter `connection_id` when calling `getconnection_by_id`" + ) # noqa: E501 collection_formats = {} path_params = {} if "connection_id" in params: - path_params["connectionId"] = params["connection_id"] # noqa: E501 + path_params["connection_id"] = params[ + "connection_id" + ] # noqa: E501 query_params = [] @@ -224,7 +224,7 @@ def getconnection_by_id_with_http_info( auth_settings = [] # noqa: E501 return self.api_client.call_api( - "/connection/{connectionId}", + "/connection/{connection_id}", "GET", path_params, query_params, @@ -241,6 +241,96 @@ def getconnection_by_id_with_http_info( collection_formats=collection_formats, ) + def getconnections(self, **kwargs): # noqa: E501 + """List all connections # noqa: E501 + + connection details # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.getconnections(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Connection] + If the method is called asynchronously, + returns the request thread. + """ + kwargs["_return_http_data_only"] = True + if kwargs.get("async_req"): + return self.getconnections_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.getconnections_with_http_info(**kwargs) # noqa: E501 + return data + + def getconnections_with_http_info(self, **kwargs): # noqa: E501 + """List all connections # noqa: E501 + + connection details # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.getconnections_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Connection] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append("async_req") + all_params.append("_return_http_data_only") + all_params.append("_preload_content") + all_params.append("_request_timeout") + + params = locals() + for key, val in six.iteritems(params["kwargs"]): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method getconnections" % key + ) + params[key] = val + del params["kwargs"] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/xml"] + ) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + "/connections", + "GET", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type="list[Connection]", # noqa: E501 + auth_settings=auth_settings, + async_req=params.get("async_req"), + _return_http_data_only=params.get("_return_http_data_only"), + _preload_content=params.get("_preload_content", True), + _request_timeout=params.get("_request_timeout"), + collection_formats=collection_formats, + ) + def place_connection(self, body, **kwargs): # noqa: E501 """Place an connection request from the SDX-Controller # noqa: E501 @@ -250,7 +340,7 @@ def place_connection(self, body, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param Connection body: order placed for creating a connection (required) + :param ConnectionBody body: order placed for creating a connection (required) :return: Connection If the method is called asynchronously, returns the request thread. @@ -275,7 +365,7 @@ def place_connection_with_http_info(self, body, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param Connection body: order placed for creating a connection (required) + :param ConnectionBody body: order placed for creating a connection (required) :return: Connection If the method is called asynchronously, returns the request thread. @@ -299,9 +389,8 @@ def place_connection_with_http_info(self, body, **kwargs): # noqa: E501 # verify the required parameter 'body' is set if "body" not in params or params["body"] is None: raise ValueError( - "Missing the required parameter `body` when " - "calling `place_connection`" - ) + "Missing the required parameter `body` when calling `place_connection`" + ) # noqa: E501 collection_formats = {} @@ -333,7 +422,7 @@ def place_connection_with_http_info(self, body, **kwargs): # noqa: E501 auth_settings = [] # noqa: E501 return self.api_client.call_api( - "/conection", + "/connection", "POST", path_params, query_params, diff --git a/swagger_client/api/link_api.py b/swagger_client/api/link_api.py index b89e1e1..bbe3fd9 100644 --- a/swagger_client/api/link_api.py +++ b/swagger_client/api/link_api.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/swagger_client/api/node_api.py b/swagger_client/api/node_api.py index 3b43843..f3b28a0 100644 --- a/swagger_client/api/node_api.py +++ b/swagger_client/api/node_api.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/swagger_client/api/topology_api.py b/swagger_client/api/topology_api.py index 88d8f18..07da3e1 100644 --- a/swagger_client/api/topology_api.py +++ b/swagger_client/api/topology_api.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -124,55 +122,47 @@ def get_topology_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats, ) - def get_topologyby_version( - self, topology_id, version, **kwargs - ): # noqa: E501 - """Find topology by version # noqa: E501 + def get_topologyby_grenml(self, **kwargs): # noqa: E501 + """Get topology grenml # noqa: E501 - Returns a single topology # noqa: E501 + Returns a single topology by grenml # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_topologyby_version(topology_id, version, async_req=True) + >>> thread = api.get_topologyby_grenml(async_req=True) >>> result = thread.get() :param async_req bool - :param int topology_id: ID of topology to return (required) - :param int version: version of topology to return (required) - :return: Topology + :return: str If the method is called asynchronously, returns the request thread. """ kwargs["_return_http_data_only"] = True if kwargs.get("async_req"): - return self.get_topologyby_version_with_http_info( - topology_id, version, **kwargs + return self.get_topologyby_grenml_with_http_info( + **kwargs ) # noqa: E501 else: - (data) = self.get_topologyby_version_with_http_info( - topology_id, version, **kwargs + (data) = self.get_topologyby_grenml_with_http_info( + **kwargs ) # noqa: E501 return data - def get_topologyby_version_with_http_info( - self, topology_id, version, **kwargs - ): # noqa: E501 - """Find topology by version # noqa: E501 + def get_topologyby_grenml_with_http_info(self, **kwargs): # noqa: E501 + """Get topology grenml # noqa: E501 - Returns a single topology # noqa: E501 + Returns a single topology by grenml # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_topologyby_version_with_http_info(topology_id, version, async_req=True) + >>> thread = api.get_topologyby_grenml_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param int topology_id: ID of topology to return (required) - :param int version: version of topology to return (required) - :return: Topology + :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ["topology_id", "version"] # noqa: E501 + all_params = [] # noqa: E501 all_params.append("async_req") all_params.append("_return_http_data_only") all_params.append("_preload_content") @@ -183,34 +173,16 @@ def get_topologyby_version_with_http_info( if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_topologyby_version" % key + " to method get_topologyby_grenml" % key ) params[key] = val del params["kwargs"] - # verify the required parameter 'topology_id' is set - if "topology_id" not in params or params["topology_id"] is None: - raise ValueError( - "Missing the required parameter `topology_id` " - "when calling `get_topologyby_version`" - ) - # verify the required parameter 'version' is set - if "version" not in params or params["version"] is None: - raise ValueError( - "Missing the required parameter `version` " - "when calling `get_topologyby_version`" - ) collection_formats = {} path_params = {} - if "version" in params: - path_params["version"] = params["version"] # noqa: E501 query_params = [] - if "topology_id" in params: - query_params.append( - ("topologyId", params["topology_id"]) - ) # noqa: E501 header_params = {} @@ -220,14 +192,14 @@ def get_topologyby_version_with_http_info( body_params = None # HTTP header `Accept` header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] + ["text/plain"] ) # noqa: E501 # Authentication setting - auth_settings = ["api_key"] # noqa: E501 + auth_settings = [] # noqa: E501 return self.api_client.call_api( - "/topology/{version}", + "/topology/grenml", "GET", path_params, query_params, @@ -235,7 +207,7 @@ def get_topologyby_version_with_http_info( body=body_params, post_params=form_params, files=local_var_files, - response_type="Topology", # noqa: E501 + response_type="str", # noqa: E501 auth_settings=auth_settings, async_req=params.get("async_req"), _return_http_data_only=params.get("_return_http_data_only"), @@ -306,9 +278,8 @@ def topology_version_with_http_info( # verify the required parameter 'topology_id' is set if "topology_id" not in params or params["topology_id"] is None: raise ValueError( - "Missing the required parameter `topology_id` " - "when calling `topology_version`" - ) + "Missing the required parameter `topology_id` when calling `topology_version`" + ) # noqa: E501 collection_formats = {} @@ -317,7 +288,7 @@ def topology_version_with_http_info( query_params = [] if "topology_id" in params: query_params.append( - ("topologyId", params["topology_id"]) + ("topology_id", params["topology_id"]) ) # noqa: E501 header_params = {} @@ -332,7 +303,7 @@ def topology_version_with_http_info( ) # noqa: E501 # Authentication setting - auth_settings = ["topology_auth"] # noqa: E501 + auth_settings = [] # noqa: E501 return self.api_client.call_api( "/topology/version", diff --git a/swagger_client/api/user_api.py b/swagger_client/api/user_api.py index 3038d52..f189059 100644 --- a/swagger_client/api/user_api.py +++ b/swagger_client/api/user_api.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -94,9 +92,8 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 # verify the required parameter 'body' is set if "body" not in params or params["body"] is None: raise ValueError( - "Missing the required parameter `body` " - "when calling `create_user`" - ) + "Missing the required parameter `body` when calling `create_user`" + ) # noqa: E501 collection_formats = {} @@ -200,8 +197,7 @@ def create_users_with_array_input_with_http_info( # verify the required parameter 'body' is set if "body" not in params or params["body"] is None: raise ValueError( - "Missing the required parameter `body` " - "when calling `create_users_with_array_input`" + "Missing the required parameter `body` when calling `create_users_with_array_input`" ) # noqa: E501 collection_formats = {} @@ -306,9 +302,8 @@ def create_users_with_list_input_with_http_info( # verify the required parameter 'body' is set if "body" not in params or params["body"] is None: raise ValueError( - "Missing the required parameter `body` " - "when calling `create_users_with_list_input`" - ) + "Missing the required parameter `body` when calling `create_users_with_list_input`" + ) # noqa: E501 collection_formats = {} @@ -412,9 +407,8 @@ def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 # verify the required parameter 'username' is set if "username" not in params or params["username"] is None: raise ValueError( - "Missing the required parameter `username` " - "when calling `delete_user`" - ) + "Missing the required parameter `username` when calling `delete_user`" + ) # noqa: E501 collection_formats = {} @@ -511,9 +505,8 @@ def get_user_by_name_with_http_info( # verify the required parameter 'username' is set if "username" not in params or params["username"] is None: raise ValueError( - "Missing the required parameter `username` " - "when calling `get_user_by_name`" - ) + "Missing the required parameter `username` when calling `get_user_by_name`" + ) # noqa: E501 collection_formats = {} @@ -617,15 +610,13 @@ def login_user_with_http_info( # verify the required parameter 'username' is set if "username" not in params or params["username"] is None: raise ValueError( - "Missing the required parameter `username` " - "when calling `login_user`" - ) + "Missing the required parameter `username` when calling `login_user`" + ) # noqa: E501 # verify the required parameter 'password' is set if "password" not in params or params["password"] is None: raise ValueError( - "Missing the required parameter `password` " - "when calling `login_user`" - ) + "Missing the required parameter `password` when calling `login_user`" + ) # noqa: E501 collection_formats = {} @@ -816,15 +807,13 @@ def update_user_with_http_info( # verify the required parameter 'body' is set if "body" not in params or params["body"] is None: raise ValueError( - "Missing the required parameter `body` " - "when calling `update_user`" - ) + "Missing the required parameter `body` when calling `update_user`" + ) # noqa: E501 # verify the required parameter 'username' is set if "username" not in params or params["username"] is None: raise ValueError( - "Missing the required parameter `username` " - "when calling `update_user`" - ) + "Missing the required parameter `username` when calling `update_user`" + ) # noqa: E501 collection_formats = {} diff --git a/swagger_client/api_client.py b/swagger_client/api_client.py index b7151ce..0b8d894 100644 --- a/swagger_client/api_client.py +++ b/swagger_client/api_client.py @@ -2,11 +2,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -114,7 +112,6 @@ def __call_api( _preload_content=True, _request_timeout=None, ): - config = self.configuration # header parameters diff --git a/swagger_client/configuration.py b/swagger_client/configuration.py index 21aeb39..4c796cd 100644 --- a/swagger_client/configuration.py +++ b/swagger_client/configuration.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +15,6 @@ import copy import logging import multiprocessing -import os import sys import six @@ -49,12 +46,7 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): def __init__(self): """Constructor""" # Default Base url - # self.host = "https://virtserver.swaggerhub.com/SDX-Controller/1.0.0" - self.host = "http://{}:{}/SDX-LC/{}".format( - os.getenv("SDXCONTROLLER_HOST"), - os.getenv("SDXCONTROLLER_PORT"), - os.getenv("SDXCONTROLLER_VERSION"), - ) + self.host = "https://virtserver.swaggerhub.com/SDX-Controller/1.0.0" # Temp file folder for downloading files self.temp_folder_path = None @@ -229,9 +221,12 @@ def get_basic_auth_token(self): :return: The token for basic HTTP authentication. """ - return urllib3.util.make_headers( - basic_auth=self.username + ":" + self.password - ).get("authorization") + token = "" + if self.username or self.password: + token = urllib3.util.make_headers( + basic_auth=self.username + ":" + self.password + ).get("authorization") + return token def auth_settings(self): """Gets Auth Settings dict for api client. @@ -262,7 +257,7 @@ def to_debug_report(self): "Python SDK Debug Report:\n" "OS: {env}\n" "Python Version: {pyversion}\n" - "Version of the API: 1.0.0\n" + "Version of the API: 2.0.0\n" "SDK Package Version: 1.0.0".format( env=sys.platform, pyversion=sys.version ) diff --git a/swagger_client/models/__init__.py b/swagger_client/models/__init__.py index 7999cd3..c498f72 100644 --- a/swagger_client/models/__init__.py +++ b/swagger_client/models/__init__.py @@ -4,11 +4,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -18,6 +16,15 @@ # import models into model package from swagger_client.models.api_response import ApiResponse from swagger_client.models.connection import Connection +from swagger_client.models.connection_body import ConnectionBody +from swagger_client.models.connection_qos_metrics import ConnectionQosMetrics +from swagger_client.models.connection_qos_unit import ConnectionQosUnit +from swagger_client.models.connection_scheduling import ConnectionScheduling +from swagger_client.models.connection_v2 import ConnectionV2 +from swagger_client.models.connection_v2_endpoints import ConnectionV2Endpoints +from swagger_client.models.connection_v2_notifications import ( + ConnectionV2Notifications, +) from swagger_client.models.link import Link from swagger_client.models.location import Location from swagger_client.models.node import Node diff --git a/swagger_client/models/api_response.py b/swagger_client/models/api_response.py index 7e3c7a2..077c520 100644 --- a/swagger_client/models/api_response.py +++ b/swagger_client/models/api_response.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/swagger_client/models/connection.py b/swagger_client/models/connection.py index 5357c9c..8e82342 100644 --- a/swagger_client/models/connection.py +++ b/swagger_client/models/connection.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/swagger_client/models/connection_body.py b/swagger_client/models/connection_body.py new file mode 100644 index 0000000..a40fd86 --- /dev/null +++ b/swagger_client/models/connection_body.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + SDX-Controller + + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 + + OpenAPI spec version: 2.0.0 + Contact: yxin@renci.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class ConnectionBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {} + + attribute_map = {} + + def __init__(self): # noqa: E501 + """ConnectionBody - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value, + ) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(ConnectionBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConnectionBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/connection_qos_metrics.py b/swagger_client/models/connection_qos_metrics.py new file mode 100644 index 0000000..00eb7ca --- /dev/null +++ b/swagger_client/models/connection_qos_metrics.py @@ -0,0 +1,336 @@ +# coding: utf-8 + +""" + SDX-Controller + + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 + + OpenAPI spec version: 2.0.0 + Contact: yxin@renci.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class ConnectionQosMetrics(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + "min_bw": "ConnectionQosUnit", + "max_delay": "ConnectionQosUnit", + "max_number_oxps": "ConnectionQosUnit", + "bandwidth_measured": "float", + "latency_measured": "float", + "packetloss_required": "float", + "packetloss_measured": "float", + "availability_required": "float", + "availability_measured": "float", + } + + attribute_map = { + "min_bw": "min_bw", + "max_delay": "max_delay", + "max_number_oxps": "max_number_oxps", + "bandwidth_measured": "bandwidth_measured", + "latency_measured": "latency_measured", + "packetloss_required": "packetloss_required", + "packetloss_measured": "packetloss_measured", + "availability_required": "availability_required", + "availability_measured": "availability_measured", + } + + def __init__( + self, + min_bw=None, + max_delay=None, + max_number_oxps=None, + bandwidth_measured=None, + latency_measured=None, + packetloss_required=None, + packetloss_measured=None, + availability_required=None, + availability_measured=None, + ): # noqa: E501 + """ConnectionQosMetrics - a model defined in Swagger""" # noqa: E501 + self._min_bw = None + self._max_delay = None + self._max_number_oxps = None + self._bandwidth_measured = None + self._latency_measured = None + self._packetloss_required = None + self._packetloss_measured = None + self._availability_required = None + self._availability_measured = None + self.discriminator = None + if min_bw is not None: + self.min_bw = min_bw + if max_delay is not None: + self.max_delay = max_delay + if max_number_oxps is not None: + self.max_number_oxps = max_number_oxps + if bandwidth_measured is not None: + self.bandwidth_measured = bandwidth_measured + if latency_measured is not None: + self.latency_measured = latency_measured + if packetloss_required is not None: + self.packetloss_required = packetloss_required + if packetloss_measured is not None: + self.packetloss_measured = packetloss_measured + if availability_required is not None: + self.availability_required = availability_required + if availability_measured is not None: + self.availability_measured = availability_measured + + @property + def min_bw(self): + """Gets the min_bw of this ConnectionQosMetrics. # noqa: E501 + + + :return: The min_bw of this ConnectionQosMetrics. # noqa: E501 + :rtype: ConnectionQosUnit + """ + return self._min_bw + + @min_bw.setter + def min_bw(self, min_bw): + """Sets the min_bw of this ConnectionQosMetrics. + + + :param min_bw: The min_bw of this ConnectionQosMetrics. # noqa: E501 + :type: ConnectionQosUnit + """ + + self._min_bw = min_bw + + @property + def max_delay(self): + """Gets the max_delay of this ConnectionQosMetrics. # noqa: E501 + + + :return: The max_delay of this ConnectionQosMetrics. # noqa: E501 + :rtype: ConnectionQosUnit + """ + return self._max_delay + + @max_delay.setter + def max_delay(self, max_delay): + """Sets the max_delay of this ConnectionQosMetrics. + + + :param max_delay: The max_delay of this ConnectionQosMetrics. # noqa: E501 + :type: ConnectionQosUnit + """ + + self._max_delay = max_delay + + @property + def max_number_oxps(self): + """Gets the max_number_oxps of this ConnectionQosMetrics. # noqa: E501 + + + :return: The max_number_oxps of this ConnectionQosMetrics. # noqa: E501 + :rtype: ConnectionQosUnit + """ + return self._max_number_oxps + + @max_number_oxps.setter + def max_number_oxps(self, max_number_oxps): + """Sets the max_number_oxps of this ConnectionQosMetrics. + + + :param max_number_oxps: The max_number_oxps of this ConnectionQosMetrics. # noqa: E501 + :type: ConnectionQosUnit + """ + + self._max_number_oxps = max_number_oxps + + @property + def bandwidth_measured(self): + """Gets the bandwidth_measured of this ConnectionQosMetrics. # noqa: E501 + + + :return: The bandwidth_measured of this ConnectionQosMetrics. # noqa: E501 + :rtype: float + """ + return self._bandwidth_measured + + @bandwidth_measured.setter + def bandwidth_measured(self, bandwidth_measured): + """Sets the bandwidth_measured of this ConnectionQosMetrics. + + + :param bandwidth_measured: The bandwidth_measured of this ConnectionQosMetrics. # noqa: E501 + :type: float + """ + + self._bandwidth_measured = bandwidth_measured + + @property + def latency_measured(self): + """Gets the latency_measured of this ConnectionQosMetrics. # noqa: E501 + + + :return: The latency_measured of this ConnectionQosMetrics. # noqa: E501 + :rtype: float + """ + return self._latency_measured + + @latency_measured.setter + def latency_measured(self, latency_measured): + """Sets the latency_measured of this ConnectionQosMetrics. + + + :param latency_measured: The latency_measured of this ConnectionQosMetrics. # noqa: E501 + :type: float + """ + + self._latency_measured = latency_measured + + @property + def packetloss_required(self): + """Gets the packetloss_required of this ConnectionQosMetrics. # noqa: E501 + + + :return: The packetloss_required of this ConnectionQosMetrics. # noqa: E501 + :rtype: float + """ + return self._packetloss_required + + @packetloss_required.setter + def packetloss_required(self, packetloss_required): + """Sets the packetloss_required of this ConnectionQosMetrics. + + + :param packetloss_required: The packetloss_required of this ConnectionQosMetrics. # noqa: E501 + :type: float + """ + + self._packetloss_required = packetloss_required + + @property + def packetloss_measured(self): + """Gets the packetloss_measured of this ConnectionQosMetrics. # noqa: E501 + + + :return: The packetloss_measured of this ConnectionQosMetrics. # noqa: E501 + :rtype: float + """ + return self._packetloss_measured + + @packetloss_measured.setter + def packetloss_measured(self, packetloss_measured): + """Sets the packetloss_measured of this ConnectionQosMetrics. + + + :param packetloss_measured: The packetloss_measured of this ConnectionQosMetrics. # noqa: E501 + :type: float + """ + + self._packetloss_measured = packetloss_measured + + @property + def availability_required(self): + """Gets the availability_required of this ConnectionQosMetrics. # noqa: E501 + + + :return: The availability_required of this ConnectionQosMetrics. # noqa: E501 + :rtype: float + """ + return self._availability_required + + @availability_required.setter + def availability_required(self, availability_required): + """Sets the availability_required of this ConnectionQosMetrics. + + + :param availability_required: The availability_required of this ConnectionQosMetrics. # noqa: E501 + :type: float + """ + + self._availability_required = availability_required + + @property + def availability_measured(self): + """Gets the availability_measured of this ConnectionQosMetrics. # noqa: E501 + + + :return: The availability_measured of this ConnectionQosMetrics. # noqa: E501 + :rtype: float + """ + return self._availability_measured + + @availability_measured.setter + def availability_measured(self, availability_measured): + """Sets the availability_measured of this ConnectionQosMetrics. + + + :param availability_measured: The availability_measured of this ConnectionQosMetrics. # noqa: E501 + :type: float + """ + + self._availability_measured = availability_measured + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value, + ) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(ConnectionQosMetrics, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConnectionQosMetrics): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/connection_qos_unit.py b/swagger_client/models/connection_qos_unit.py new file mode 100644 index 0000000..d285c62 --- /dev/null +++ b/swagger_client/models/connection_qos_unit.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + SDX-Controller + + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 + + OpenAPI spec version: 2.0.0 + Contact: yxin@renci.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class ConnectionQosUnit(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"value": "int", "strict": "bool"} + + attribute_map = {"value": "value", "strict": "strict"} + + def __init__(self, value=None, strict=None): # noqa: E501 + """ConnectionQosUnit - a model defined in Swagger""" # noqa: E501 + self._value = None + self._strict = None + self.discriminator = None + if value is not None: + self.value = value + if strict is not None: + self.strict = strict + + @property + def value(self): + """Gets the value of this ConnectionQosUnit. # noqa: E501 + + + :return: The value of this ConnectionQosUnit. # noqa: E501 + :rtype: int + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this ConnectionQosUnit. + + + :param value: The value of this ConnectionQosUnit. # noqa: E501 + :type: int + """ + + self._value = value + + @property + def strict(self): + """Gets the strict of this ConnectionQosUnit. # noqa: E501 + + + :return: The strict of this ConnectionQosUnit. # noqa: E501 + :rtype: bool + """ + return self._strict + + @strict.setter + def strict(self, strict): + """Sets the strict of this ConnectionQosUnit. + + + :param strict: The strict of this ConnectionQosUnit. # noqa: E501 + :type: bool + """ + + self._strict = strict + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value, + ) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(ConnectionQosUnit, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConnectionQosUnit): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/connection_scheduling.py b/swagger_client/models/connection_scheduling.py new file mode 100644 index 0000000..3375d51 --- /dev/null +++ b/swagger_client/models/connection_scheduling.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + SDX-Controller + + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 + + OpenAPI spec version: 2.0.0 + Contact: yxin@renci.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class ConnectionScheduling(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"start_time": "datetime", "end_time": "datetime"} + + attribute_map = {"start_time": "start_time", "end_time": "end_time"} + + def __init__(self, start_time=None, end_time=None): # noqa: E501 + """ConnectionScheduling - a model defined in Swagger""" # noqa: E501 + self._start_time = None + self._end_time = None + self.discriminator = None + if start_time is not None: + self.start_time = start_time + if end_time is not None: + self.end_time = end_time + + @property + def start_time(self): + """Gets the start_time of this ConnectionScheduling. # noqa: E501 + + + :return: The start_time of this ConnectionScheduling. # noqa: E501 + :rtype: datetime + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this ConnectionScheduling. + + + :param start_time: The start_time of this ConnectionScheduling. # noqa: E501 + :type: datetime + """ + + self._start_time = start_time + + @property + def end_time(self): + """Gets the end_time of this ConnectionScheduling. # noqa: E501 + + + :return: The end_time of this ConnectionScheduling. # noqa: E501 + :rtype: datetime + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this ConnectionScheduling. + + + :param end_time: The end_time of this ConnectionScheduling. # noqa: E501 + :type: datetime + """ + + self._end_time = end_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value, + ) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(ConnectionScheduling, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConnectionScheduling): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/connection_v2.py b/swagger_client/models/connection_v2.py new file mode 100644 index 0000000..c72fbf6 --- /dev/null +++ b/swagger_client/models/connection_v2.py @@ -0,0 +1,537 @@ +# coding: utf-8 + +""" + SDX-Controller + + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 + + OpenAPI spec version: 2.0.0 + Contact: yxin@renci.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class ConnectionV2(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + "name": "str", + "endpoints": "list[ConnectionV2Endpoints]", + "description": "str", + "notifications": "list[ConnectionV2Notifications]", + "scheduling": "ConnectionScheduling", + "qos_metrics": "dict(str, ConnectionQosMetrics)", + "paths": "list[str]", + "status": "str", + "complete": "bool", + "quantity": "int", + "multi_path": "bool", + "preempt": "bool", + "backup_path_type": "str", + "exclusive_links": "list[Link]", + "inclusive_links": "list[Link]", + } + + attribute_map = { + "name": "name", + "endpoints": "endpoints", + "description": "description", + "notifications": "notifications", + "scheduling": "scheduling", + "qos_metrics": "qos_metrics", + "paths": "paths", + "status": "status", + "complete": "complete", + "quantity": "quantity", + "multi_path": "multi_path", + "preempt": "preempt", + "backup_path_type": "backup_path_type", + "exclusive_links": "exclusive_links", + "inclusive_links": "inclusive_links", + } + + def __init__( + self, + name=None, + endpoints=None, + description=None, + notifications=None, + scheduling=None, + qos_metrics=None, + paths=None, + status=None, + complete=False, + quantity=None, + multi_path=None, + preempt=None, + backup_path_type=None, + exclusive_links=None, + inclusive_links=None, + ): # noqa: E501 + """ConnectionV2 - a model defined in Swagger""" # noqa: E501 + self._name = None + self._endpoints = None + self._description = None + self._notifications = None + self._scheduling = None + self._qos_metrics = None + self._paths = None + self._status = None + self._complete = None + self._quantity = None + self._multi_path = None + self._preempt = None + self._backup_path_type = None + self._exclusive_links = None + self._inclusive_links = None + self.discriminator = None + self.name = name + self.endpoints = endpoints + self.description = description + self.notifications = notifications + self.scheduling = scheduling + self.qos_metrics = qos_metrics + if paths is not None: + self.paths = paths + if status is not None: + self.status = status + if complete is not None: + self.complete = complete + if quantity is not None: + self.quantity = quantity + if multi_path is not None: + self.multi_path = multi_path + if preempt is not None: + self.preempt = preempt + if backup_path_type is not None: + self.backup_path_type = backup_path_type + if exclusive_links is not None: + self.exclusive_links = exclusive_links + if inclusive_links is not None: + self.inclusive_links = inclusive_links + + @property + def name(self): + """Gets the name of this ConnectionV2. # noqa: E501 + + + :return: The name of this ConnectionV2. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ConnectionV2. + + + :param name: The name of this ConnectionV2. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError( + "Invalid value for `name`, must not be `None`" + ) # noqa: E501 + + self._name = name + + @property + def endpoints(self): + """Gets the endpoints of this ConnectionV2. # noqa: E501 + + + :return: The endpoints of this ConnectionV2. # noqa: E501 + :rtype: list[ConnectionV2Endpoints] + """ + return self._endpoints + + @endpoints.setter + def endpoints(self, endpoints): + """Sets the endpoints of this ConnectionV2. + + + :param endpoints: The endpoints of this ConnectionV2. # noqa: E501 + :type: list[ConnectionV2Endpoints] + """ + if endpoints is None: + raise ValueError( + "Invalid value for `endpoints`, must not be `None`" + ) # noqa: E501 + + self._endpoints = endpoints + + @property + def description(self): + """Gets the description of this ConnectionV2. # noqa: E501 + + + :return: The description of this ConnectionV2. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this ConnectionV2. + + + :param description: The description of this ConnectionV2. # noqa: E501 + :type: str + """ + if description is None: + raise ValueError( + "Invalid value for `description`, must not be `None`" + ) # noqa: E501 + + self._description = description + + @property + def notifications(self): + """Gets the notifications of this ConnectionV2. # noqa: E501 + + + :return: The notifications of this ConnectionV2. # noqa: E501 + :rtype: list[ConnectionV2Notifications] + """ + return self._notifications + + @notifications.setter + def notifications(self, notifications): + """Sets the notifications of this ConnectionV2. + + + :param notifications: The notifications of this ConnectionV2. # noqa: E501 + :type: list[ConnectionV2Notifications] + """ + if notifications is None: + raise ValueError( + "Invalid value for `notifications`, must not be `None`" + ) # noqa: E501 + + self._notifications = notifications + + @property + def scheduling(self): + """Gets the scheduling of this ConnectionV2. # noqa: E501 + + + :return: The scheduling of this ConnectionV2. # noqa: E501 + :rtype: ConnectionScheduling + """ + return self._scheduling + + @scheduling.setter + def scheduling(self, scheduling): + """Sets the scheduling of this ConnectionV2. + + + :param scheduling: The scheduling of this ConnectionV2. # noqa: E501 + :type: ConnectionScheduling + """ + if scheduling is None: + raise ValueError( + "Invalid value for `scheduling`, must not be `None`" + ) # noqa: E501 + + self._scheduling = scheduling + + @property + def qos_metrics(self): + """Gets the qos_metrics of this ConnectionV2. # noqa: E501 + + + :return: The qos_metrics of this ConnectionV2. # noqa: E501 + :rtype: dict(str, ConnectionQosMetrics) + """ + return self._qos_metrics + + @qos_metrics.setter + def qos_metrics(self, qos_metrics): + """Sets the qos_metrics of this ConnectionV2. + + + :param qos_metrics: The qos_metrics of this ConnectionV2. # noqa: E501 + :type: dict(str, ConnectionQosMetrics) + """ + if qos_metrics is None: + raise ValueError( + "Invalid value for `qos_metrics`, must not be `None`" + ) # noqa: E501 + + self._qos_metrics = qos_metrics + + @property + def paths(self): + """Gets the paths of this ConnectionV2. # noqa: E501 + + + :return: The paths of this ConnectionV2. # noqa: E501 + :rtype: list[str] + """ + return self._paths + + @paths.setter + def paths(self, paths): + """Sets the paths of this ConnectionV2. + + + :param paths: The paths of this ConnectionV2. # noqa: E501 + :type: list[str] + """ + + self._paths = paths + + @property + def status(self): + """Gets the status of this ConnectionV2. # noqa: E501 + + Connection Status # noqa: E501 + + :return: The status of this ConnectionV2. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ConnectionV2. + + Connection Status # noqa: E501 + + :param status: The status of this ConnectionV2. # noqa: E501 + :type: str + """ + allowed_values = [ + "success", + "fail", + "scheduled", + "provisioining", + ] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}".format( # noqa: E501 + status, allowed_values + ) + ) + + self._status = status + + @property + def complete(self): + """Gets the complete of this ConnectionV2. # noqa: E501 + + + :return: The complete of this ConnectionV2. # noqa: E501 + :rtype: bool + """ + return self._complete + + @complete.setter + def complete(self, complete): + """Sets the complete of this ConnectionV2. + + + :param complete: The complete of this ConnectionV2. # noqa: E501 + :type: bool + """ + + self._complete = complete + + @property + def quantity(self): + """Gets the quantity of this ConnectionV2. # noqa: E501 + + + :return: The quantity of this ConnectionV2. # noqa: E501 + :rtype: int + """ + return self._quantity + + @quantity.setter + def quantity(self, quantity): + """Sets the quantity of this ConnectionV2. + + + :param quantity: The quantity of this ConnectionV2. # noqa: E501 + :type: int + """ + + self._quantity = quantity + + @property + def multi_path(self): + """Gets the multi_path of this ConnectionV2. # noqa: E501 + + + :return: The multi_path of this ConnectionV2. # noqa: E501 + :rtype: bool + """ + return self._multi_path + + @multi_path.setter + def multi_path(self, multi_path): + """Sets the multi_path of this ConnectionV2. + + + :param multi_path: The multi_path of this ConnectionV2. # noqa: E501 + :type: bool + """ + + self._multi_path = multi_path + + @property + def preempt(self): + """Gets the preempt of this ConnectionV2. # noqa: E501 + + + :return: The preempt of this ConnectionV2. # noqa: E501 + :rtype: bool + """ + return self._preempt + + @preempt.setter + def preempt(self, preempt): + """Sets the preempt of this ConnectionV2. + + + :param preempt: The preempt of this ConnectionV2. # noqa: E501 + :type: bool + """ + + self._preempt = preempt + + @property + def backup_path_type(self): + """Gets the backup_path_type of this ConnectionV2. # noqa: E501 + + + :return: The backup_path_type of this ConnectionV2. # noqa: E501 + :rtype: str + """ + return self._backup_path_type + + @backup_path_type.setter + def backup_path_type(self, backup_path_type): + """Sets the backup_path_type of this ConnectionV2. + + + :param backup_path_type: The backup_path_type of this ConnectionV2. # noqa: E501 + :type: str + """ + allowed_values = ["0", "1", "2", "3"] # noqa: E501 + if backup_path_type not in allowed_values: + raise ValueError( + "Invalid value for `backup_path_type` ({0}), must be one of {1}".format( # noqa: E501 + backup_path_type, allowed_values + ) + ) + + self._backup_path_type = backup_path_type + + @property + def exclusive_links(self): + """Gets the exclusive_links of this ConnectionV2. # noqa: E501 + + + :return: The exclusive_links of this ConnectionV2. # noqa: E501 + :rtype: list[Link] + """ + return self._exclusive_links + + @exclusive_links.setter + def exclusive_links(self, exclusive_links): + """Sets the exclusive_links of this ConnectionV2. + + + :param exclusive_links: The exclusive_links of this ConnectionV2. # noqa: E501 + :type: list[Link] + """ + + self._exclusive_links = exclusive_links + + @property + def inclusive_links(self): + """Gets the inclusive_links of this ConnectionV2. # noqa: E501 + + + :return: The inclusive_links of this ConnectionV2. # noqa: E501 + :rtype: list[Link] + """ + return self._inclusive_links + + @inclusive_links.setter + def inclusive_links(self, inclusive_links): + """Sets the inclusive_links of this ConnectionV2. + + + :param inclusive_links: The inclusive_links of this ConnectionV2. # noqa: E501 + :type: list[Link] + """ + + self._inclusive_links = inclusive_links + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value, + ) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(ConnectionV2, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConnectionV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/connection_v2_endpoints.py b/swagger_client/models/connection_v2_endpoints.py new file mode 100644 index 0000000..d50a53e --- /dev/null +++ b/swagger_client/models/connection_v2_endpoints.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + SDX-Controller + + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 + + OpenAPI spec version: 2.0.0 + Contact: yxin@renci.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class ConnectionV2Endpoints(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"port_id": "str", "vlan": "str"} + + attribute_map = {"port_id": "port_id", "vlan": "vlan"} + + def __init__(self, port_id=None, vlan=None): # noqa: E501 + """ConnectionV2Endpoints - a model defined in Swagger""" # noqa: E501 + self._port_id = None + self._vlan = None + self.discriminator = None + if port_id is not None: + self.port_id = port_id + if vlan is not None: + self.vlan = vlan + + @property + def port_id(self): + """Gets the port_id of this ConnectionV2Endpoints. # noqa: E501 + + + :return: The port_id of this ConnectionV2Endpoints. # noqa: E501 + :rtype: str + """ + return self._port_id + + @port_id.setter + def port_id(self, port_id): + """Sets the port_id of this ConnectionV2Endpoints. + + + :param port_id: The port_id of this ConnectionV2Endpoints. # noqa: E501 + :type: str + """ + + self._port_id = port_id + + @property + def vlan(self): + """Gets the vlan of this ConnectionV2Endpoints. # noqa: E501 + + + :return: The vlan of this ConnectionV2Endpoints. # noqa: E501 + :rtype: str + """ + return self._vlan + + @vlan.setter + def vlan(self, vlan): + """Sets the vlan of this ConnectionV2Endpoints. + + + :param vlan: The vlan of this ConnectionV2Endpoints. # noqa: E501 + :type: str + """ + + self._vlan = vlan + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value, + ) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(ConnectionV2Endpoints, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConnectionV2Endpoints): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/connection_v2_notifications.py b/swagger_client/models/connection_v2_notifications.py new file mode 100644 index 0000000..481c8cb --- /dev/null +++ b/swagger_client/models/connection_v2_notifications.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + SDX-Controller + + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 + + OpenAPI spec version: 2.0.0 + Contact: yxin@renci.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class ConnectionV2Notifications(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"email": "str"} + + attribute_map = {"email": "email"} + + def __init__(self, email=None): # noqa: E501 + """ConnectionV2Notifications - a model defined in Swagger""" # noqa: E501 + self._email = None + self.discriminator = None + if email is not None: + self.email = email + + @property + def email(self): + """Gets the email of this ConnectionV2Notifications. # noqa: E501 + + + :return: The email of this ConnectionV2Notifications. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this ConnectionV2Notifications. + + + :param email: The email of this ConnectionV2Notifications. # noqa: E501 + :type: str + """ + + self._email = email + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value, + ) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(ConnectionV2Notifications, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConnectionV2Notifications): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger_client/models/link.py b/swagger_client/models/link.py index 7a4c26e..6f11ad8 100644 --- a/swagger_client/models/link.py +++ b/swagger_client/models/link.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/swagger_client/models/location.py b/swagger_client/models/location.py index dadffa7..0cb98e7 100644 --- a/swagger_client/models/location.py +++ b/swagger_client/models/location.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -35,21 +33,24 @@ class Location(object): "address": "str", "latitude": "float", "longitude": "float", + "iso3166_2_lvl4": "str", } attribute_map = { "address": "address", "latitude": "latitude", "longitude": "longitude", + "iso3166_2_lvl4": "iso3166_2_lvl4", } def __init__( - self, address=None, latitude=None, longitude=None + self, address=None, latitude=None, longitude=None, iso3166_2_lvl4=None ): # noqa: E501 """Location - a model defined in Swagger""" # noqa: E501 self._address = None self._latitude = None self._longitude = None + self._iso3166_2_lvl4 = None self.discriminator = None if address is not None: self.address = address @@ -57,6 +58,8 @@ def __init__( self.latitude = latitude if longitude is not None: self.longitude = longitude + if iso3166_2_lvl4 is not None: + self.iso3166_2_lvl4 = iso3166_2_lvl4 @property def address(self): @@ -121,6 +124,27 @@ def longitude(self, longitude): self._longitude = longitude + @property + def iso3166_2_lvl4(self): + """Gets the iso3166_2_lvl4 of this Location. # noqa: E501 + + + :return: The iso3166_2_lvl4 of this Location. # noqa: E501 + :rtype: str + """ + return self._iso3166_2_lvl4 + + @iso3166_2_lvl4.setter + def iso3166_2_lvl4(self, iso3166_2_lvl4): + """Sets the iso3166_2_lvl4 of this Location. + + + :param iso3166_2_lvl4: The iso3166_2_lvl4 of this Location. # noqa: E501 + :type: str + """ + + self._iso3166_2_lvl4 = iso3166_2_lvl4 + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger_client/models/node.py b/swagger_client/models/node.py index ecbae78..9ac8ac7 100644 --- a/swagger_client/models/node.py +++ b/swagger_client/models/node.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/swagger_client/models/port.py b/swagger_client/models/port.py index 2db1d3a..a6211b0 100644 --- a/swagger_client/models/port.py +++ b/swagger_client/models/port.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/swagger_client/models/topology.py b/swagger_client/models/topology.py index 251e0da..b43cddb 100644 --- a/swagger_client/models/topology.py +++ b/swagger_client/models/topology.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -35,7 +33,7 @@ class Topology(object): "id": "str", "name": "str", "version": "int", - "time_stamp": "datetime", + "timestamp": "datetime", "nodes": "list[Node]", "links": "list[Link]", } @@ -44,7 +42,7 @@ class Topology(object): "id": "id", "name": "name", "version": "version", - "time_stamp": "time_stamp", + "timestamp": "timestamp", "nodes": "nodes", "links": "links", } @@ -54,7 +52,7 @@ def __init__( id=None, name=None, version=None, - time_stamp=None, + timestamp=None, nodes=None, links=None, ): # noqa: E501 @@ -62,14 +60,14 @@ def __init__( self._id = None self._name = None self._version = None - self._time_stamp = None + self._timestamp = None self._nodes = None self._links = None self.discriminator = None self.id = id self.name = name self.version = version - self.time_stamp = time_stamp + self.timestamp = timestamp self.nodes = nodes self.links = links @@ -149,29 +147,29 @@ def version(self, version): self._version = version @property - def time_stamp(self): - """Gets the time_stamp of this Topology. # noqa: E501 + def timestamp(self): + """Gets the timestamp of this Topology. # noqa: E501 - :return: The time_stamp of this Topology. # noqa: E501 + :return: The timestamp of this Topology. # noqa: E501 :rtype: datetime """ - return self._time_stamp + return self._timestamp - @time_stamp.setter - def time_stamp(self, time_stamp): - """Sets the time_stamp of this Topology. + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this Topology. - :param time_stamp: The time_stamp of this Topology. # noqa: E501 + :param timestamp: The timestamp of this Topology. # noqa: E501 :type: datetime """ - if time_stamp is None: + if timestamp is None: raise ValueError( - "Invalid value for `time_stamp`, must not be `None`" + "Invalid value for `timestamp`, must not be `None`" ) # noqa: E501 - self._time_stamp = time_stamp + self._timestamp = timestamp @property def nodes(self): diff --git a/swagger_client/models/user.py b/swagger_client/models/user.py index d18eb12..63321b8 100644 --- a/swagger_client/models/user.py +++ b/swagger_client/models/user.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/swagger_client/rest.py b/swagger_client/rest.py index d501fe4..452992f 100644 --- a/swagger_client/rest.py +++ b/swagger_client/rest.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -23,6 +21,7 @@ import certifi # python 2 and python 3 compatibility library +import six from six.moves.urllib.parse import urlencode try: @@ -43,11 +42,11 @@ def __init__(self, resp): def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.urllib3_response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) + return self.urllib3_response.headers.get(name, default) class RESTClientObject(object): @@ -156,7 +155,9 @@ def request( timeout = None if _request_timeout: - if isinstance(_request_timeout, (int,)): # noqa: E501,F821 + if isinstance( + _request_timeout, (int,) if six.PY3 else (int, long) + ): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif ( isinstance(_request_timeout, tuple) diff --git a/test-requirements.txt b/test-requirements.txt index 2b880da..2702246 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,6 +1,5 @@ coverage>=4.0.3 -pytest>=7.1.3 -pytest-cov>=4.0.0 +nose>=1.3.7 pluggy>=0.3.1 py>=1.4.31 randomize>=0.13 diff --git a/test/__init__.py b/test/__init__.py index e69de29..57d631c 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -0,0 +1 @@ +# coding: utf-8 diff --git a/test/test_api_response.py b/test/test_api_response.py index f1a51bb..7dfe9a4 100644 --- a/test/test_api_response.py +++ b/test/test_api_response.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,9 +14,9 @@ import unittest -# import swagger_client -# from swagger_client.models.api_response import ApiResponse # noqa: E501 -# from swagger_client.rest import ApiException +import swagger_client +from swagger_client.models.api_response import ApiResponse # noqa: E501 +from swagger_client.rest import ApiException class TestApiResponse(unittest.TestCase): diff --git a/test/test_connection.py b/test/test_connection.py index c352e07..a568caf 100644 --- a/test/test_connection.py +++ b/test/test_connection.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,9 +14,9 @@ import unittest -# import swagger_client -# from swagger_client.models.connection import Connection # noqa: E501 -# from swagger_client.rest import ApiException +import swagger_client +from swagger_client.models.connection import Connection # noqa: E501 +from swagger_client.rest import ApiException class TestConnection(unittest.TestCase): diff --git a/test/test_connection_api.py b/test/test_connection_api.py index f957884..44620dd 100644 --- a/test/test_connection_api.py +++ b/test/test_connection_api.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,10 +14,9 @@ import unittest -# import swagger_client +import swagger_client from swagger_client.api.connection_api import ConnectionApi # noqa: E501 - -# from swagger_client.rest import ApiException +from swagger_client.rest import ApiException class TestConnectionApi(unittest.TestCase): @@ -45,6 +42,13 @@ def test_getconnection_by_id(self): """ pass + def test_getconnections(self): + """Test case for getconnections + + List all connections # noqa: E501 + """ + pass + def test_place_connection(self): """Test case for place_connection diff --git a/test/test_connection_body.py b/test/test_connection_body.py new file mode 100644 index 0000000..5a59ee0 --- /dev/null +++ b/test/test_connection_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + SDX-Controller + + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 + + OpenAPI spec version: 2.0.0 + Contact: yxin@renci.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.connection_body import ConnectionBody # noqa: E501 +from swagger_client.rest import ApiException + + +class TestConnectionBody(unittest.TestCase): + """ConnectionBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testConnectionBody(self): + """Test ConnectionBody""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.connection_body.ConnectionBody() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_connection_qos_metrics.py b/test/test_connection_qos_metrics.py new file mode 100644 index 0000000..3bf3eec --- /dev/null +++ b/test/test_connection_qos_metrics.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SDX-Controller + + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 + + OpenAPI spec version: 2.0.0 + Contact: yxin@renci.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.connection_qos_metrics import ( + ConnectionQosMetrics, +) # noqa: E501 +from swagger_client.rest import ApiException + + +class TestConnectionQosMetrics(unittest.TestCase): + """ConnectionQosMetrics unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testConnectionQosMetrics(self): + """Test ConnectionQosMetrics""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.connection_qos_metrics.ConnectionQosMetrics() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_connection_qos_unit.py b/test/test_connection_qos_unit.py new file mode 100644 index 0000000..04a6a42 --- /dev/null +++ b/test/test_connection_qos_unit.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SDX-Controller + + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 + + OpenAPI spec version: 2.0.0 + Contact: yxin@renci.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.connection_qos_unit import ( + ConnectionQosUnit, +) # noqa: E501 +from swagger_client.rest import ApiException + + +class TestConnectionQosUnit(unittest.TestCase): + """ConnectionQosUnit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testConnectionQosUnit(self): + """Test ConnectionQosUnit""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.connection_qos_unit.ConnectionQosUnit() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_connection_scheduling.py b/test/test_connection_scheduling.py new file mode 100644 index 0000000..36427f0 --- /dev/null +++ b/test/test_connection_scheduling.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SDX-Controller + + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 + + OpenAPI spec version: 2.0.0 + Contact: yxin@renci.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.connection_scheduling import ( + ConnectionScheduling, +) # noqa: E501 +from swagger_client.rest import ApiException + + +class TestConnectionScheduling(unittest.TestCase): + """ConnectionScheduling unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testConnectionScheduling(self): + """Test ConnectionScheduling""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.connection_scheduling.ConnectionScheduling() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_connection_v2.py b/test/test_connection_v2.py new file mode 100644 index 0000000..ba89f4e --- /dev/null +++ b/test/test_connection_v2.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + SDX-Controller + + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 + + OpenAPI spec version: 2.0.0 + Contact: yxin@renci.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.connection_v2 import ConnectionV2 # noqa: E501 +from swagger_client.rest import ApiException + + +class TestConnectionV2(unittest.TestCase): + """ConnectionV2 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testConnectionV2(self): + """Test ConnectionV2""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.connection_v2.ConnectionV2() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_connection_v2_endpoints.py b/test/test_connection_v2_endpoints.py new file mode 100644 index 0000000..92ac84c --- /dev/null +++ b/test/test_connection_v2_endpoints.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SDX-Controller + + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 + + OpenAPI spec version: 2.0.0 + Contact: yxin@renci.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.connection_v2_endpoints import ( + ConnectionV2Endpoints, +) # noqa: E501 +from swagger_client.rest import ApiException + + +class TestConnectionV2Endpoints(unittest.TestCase): + """ConnectionV2Endpoints unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testConnectionV2Endpoints(self): + """Test ConnectionV2Endpoints""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.connection_v2_endpoints.ConnectionV2Endpoints() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_connection_v2_notifications.py b/test/test_connection_v2_notifications.py new file mode 100644 index 0000000..4362cae --- /dev/null +++ b/test/test_connection_v2_notifications.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SDX-Controller + + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 + + OpenAPI spec version: 2.0.0 + Contact: yxin@renci.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.connection_v2_notifications import ( + ConnectionV2Notifications, +) # noqa: E501 +from swagger_client.rest import ApiException + + +class TestConnectionV2Notifications(unittest.TestCase): + """ConnectionV2Notifications unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testConnectionV2Notifications(self): + """Test ConnectionV2Notifications""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.connection_v2_notifications.ConnectionV2Notifications() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_link.py b/test/test_link.py index cdf74ba..745da61 100644 --- a/test/test_link.py +++ b/test/test_link.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,9 +14,9 @@ import unittest -# import swagger_client -# from swagger_client.models.link import Link # noqa: E501 -# from swagger_client.rest import ApiException +import swagger_client +from swagger_client.models.link import Link # noqa: E501 +from swagger_client.rest import ApiException class TestLink(unittest.TestCase): diff --git a/test/test_link_api.py b/test/test_link_api.py index 059ac76..a5fd964 100644 --- a/test/test_link_api.py +++ b/test/test_link_api.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,10 +14,9 @@ import unittest -# import swagger_client +import swagger_client from swagger_client.api.link_api import LinkApi # noqa: E501 - -# from swagger_client.rest import ApiException +from swagger_client.rest import ApiException class TestLinkApi(unittest.TestCase): diff --git a/test/test_location.py b/test/test_location.py index 52043a4..46387cd 100644 --- a/test/test_location.py +++ b/test/test_location.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,9 +14,9 @@ import unittest -# import swagger_client -# from swagger_client.models.location import Location # noqa: E501 -# from swagger_client.rest import ApiException +import swagger_client +from swagger_client.models.location import Location # noqa: E501 +from swagger_client.rest import ApiException class TestLocation(unittest.TestCase): diff --git a/test/test_node.py b/test/test_node.py index a2c4e29..a502106 100644 --- a/test/test_node.py +++ b/test/test_node.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,9 +14,9 @@ import unittest -# import swagger_client -# from swagger_client.models.node import Node # noqa: E501 -# from swagger_client.rest import ApiException +import swagger_client +from swagger_client.models.node import Node # noqa: E501 +from swagger_client.rest import ApiException class TestNode(unittest.TestCase): diff --git a/test/test_node_api.py b/test/test_node_api.py index c93dd17..f119b05 100644 --- a/test/test_node_api.py +++ b/test/test_node_api.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,10 +14,9 @@ import unittest -# import swagger_client +import swagger_client from swagger_client.api.node_api import NodeApi # noqa: E501 - -# from swagger_client.rest import ApiException +from swagger_client.rest import ApiException class TestNodeApi(unittest.TestCase): diff --git a/test/test_port.py b/test/test_port.py index da68397..e491f58 100644 --- a/test/test_port.py +++ b/test/test_port.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,9 +14,9 @@ import unittest -# import swagger_client -# from swagger_client.models.port import Port # noqa: E501 -# from swagger_client.rest import ApiException +import swagger_client +from swagger_client.models.port import Port # noqa: E501 +from swagger_client.rest import ApiException class TestPort(unittest.TestCase): diff --git a/test/test_topology.py b/test/test_topology.py index 3ba51a2..d0ca528 100644 --- a/test/test_topology.py +++ b/test/test_topology.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,9 +14,9 @@ import unittest -# import swagger_client -# from swagger_client.models.topology import Topology # noqa: E501 -# from swagger_client.rest import ApiException +import swagger_client +from swagger_client.models.topology import Topology # noqa: E501 +from swagger_client.rest import ApiException class TestTopology(unittest.TestCase): diff --git a/test/test_topology_api.py b/test/test_topology_api.py index 8976a46..2b0be5f 100644 --- a/test/test_topology_api.py +++ b/test/test_topology_api.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,10 +14,9 @@ import unittest -# import swagger_client +import swagger_client from swagger_client.api.topology_api import TopologyApi # noqa: E501 - -# from swagger_client.rest import ApiException +from swagger_client.rest import ApiException class TestTopologyApi(unittest.TestCase): @@ -38,10 +35,10 @@ def test_get_topology(self): """ pass - def test_get_topologyby_version(self): - """Test case for get_topologyby_version + def test_get_topologyby_grenml(self): + """Test case for get_topologyby_grenml - Find topology by version # noqa: E501 + Get topology grenml # noqa: E501 """ pass diff --git a/test/test_user.py b/test/test_user.py index c05d0fb..ebbb38d 100644 --- a/test/test_user.py +++ b/test/test_user.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,9 +14,9 @@ import unittest -# import swagger_client -# from swagger_client.models.user import User # noqa: E501 -# from swagger_client.rest import ApiException +import swagger_client +from swagger_client.models.user import User # noqa: E501 +from swagger_client.rest import ApiException class TestUser(unittest.TestCase): diff --git a/test/test_user_api.py b/test/test_user_api.py index b20cdf9..1bb2a9e 100644 --- a/test/test_user_api.py +++ b/test/test_user_api.py @@ -3,11 +3,9 @@ """ SDX-Controller - You can find out more about Swagger at - [http://swagger.io](http://swagger.io) or on [irc.freenode.net, - #swagger](http://swagger.io/irc/). + You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 2.0.0 Contact: yxin@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,10 +14,9 @@ import unittest -# import swagger_client +import swagger_client from swagger_client.api.user_api import UserApi # noqa: E501 - -# from swagger_client.rest import ApiException +from swagger_client.rest import ApiException class TestUserApi(unittest.TestCase): diff --git a/tox.ini b/tox.ini index 84bf5b8..a310bec 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,9 @@ envlist = py3 [testenv] -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt -passenv = SDXCONTROLLER_* -commands = - pytest --cov swagger_client {posargs} +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + nosetests \ + [] From bb4016c64e99d9f25e6fabdfdacad40c807c96f5 Mon Sep 17 00:00:00 2001 From: Yufeng Xin Date: Mon, 8 Jul 2024 11:06:45 -0400 Subject: [PATCH 2/5] lint --- swagger_client/api/connection_api.py | 8 ++--- swagger_client/api/user_api.py | 32 +++++++++---------- swagger_client/models/api_response.py | 8 +++-- swagger_client/models/connection.py | 8 +++-- swagger_client/models/connection_body.py | 8 +++-- .../models/connection_qos_metrics.py | 8 +++-- swagger_client/models/connection_qos_unit.py | 8 +++-- .../models/connection_scheduling.py | 8 +++-- swagger_client/models/connection_v2.py | 8 +++-- .../models/connection_v2_endpoints.py | 8 +++-- .../models/connection_v2_notifications.py | 8 +++-- swagger_client/models/link.py | 8 +++-- swagger_client/models/location.py | 8 +++-- swagger_client/models/node.py | 8 +++-- swagger_client/models/port.py | 8 +++-- swagger_client/models/topology.py | 8 +++-- swagger_client/models/user.py | 8 +++-- swagger_client/rest.py | 6 ++-- 18 files changed, 98 insertions(+), 68 deletions(-) diff --git a/swagger_client/api/connection_api.py b/swagger_client/api/connection_api.py index 2592c73..9a78b49 100644 --- a/swagger_client/api/connection_api.py +++ b/swagger_client/api/connection_api.py @@ -412,10 +412,10 @@ def place_connection_with_http_info(self, body, **kwargs): # noqa: E501 ) # noqa: E501 # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] + header_params["Content-Type"] = ( + self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] + ) ) # noqa: E501 # Authentication setting diff --git a/swagger_client/api/user_api.py b/swagger_client/api/user_api.py index f189059..cbeacb8 100644 --- a/swagger_client/api/user_api.py +++ b/swagger_client/api/user_api.py @@ -110,10 +110,10 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 if "body" in params: body_params = params["body"] # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] + header_params["Content-Type"] = ( + self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] + ) ) # noqa: E501 # Authentication setting @@ -215,10 +215,10 @@ def create_users_with_array_input_with_http_info( if "body" in params: body_params = params["body"] # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] + header_params["Content-Type"] = ( + self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] + ) ) # noqa: E501 # Authentication setting @@ -320,10 +320,10 @@ def create_users_with_list_input_with_http_info( if "body" in params: body_params = params["body"] # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] + header_params["Content-Type"] = ( + self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] + ) ) # noqa: E501 # Authentication setting @@ -832,10 +832,10 @@ def update_user_with_http_info( if "body" in params: body_params = params["body"] # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] + header_params["Content-Type"] = ( + self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] + ) ) # noqa: E501 # Authentication setting diff --git a/swagger_client/models/api_response.py b/swagger_client/models/api_response.py index 077c520..e2c8d0f 100644 --- a/swagger_client/models/api_response.py +++ b/swagger_client/models/api_response.py @@ -127,9 +127,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/models/connection.py b/swagger_client/models/connection.py index 8e82342..af42622 100644 --- a/swagger_client/models/connection.py +++ b/swagger_client/models/connection.py @@ -328,9 +328,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/models/connection_body.py b/swagger_client/models/connection_body.py index a40fd86..558fe37 100644 --- a/swagger_client/models/connection_body.py +++ b/swagger_client/models/connection_body.py @@ -55,9 +55,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/models/connection_qos_metrics.py b/swagger_client/models/connection_qos_metrics.py index 00eb7ca..036bd00 100644 --- a/swagger_client/models/connection_qos_metrics.py +++ b/swagger_client/models/connection_qos_metrics.py @@ -302,9 +302,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/models/connection_qos_unit.py b/swagger_client/models/connection_qos_unit.py index d285c62..4b94137 100644 --- a/swagger_client/models/connection_qos_unit.py +++ b/swagger_client/models/connection_qos_unit.py @@ -103,9 +103,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/models/connection_scheduling.py b/swagger_client/models/connection_scheduling.py index 3375d51..ee5b3ca 100644 --- a/swagger_client/models/connection_scheduling.py +++ b/swagger_client/models/connection_scheduling.py @@ -103,9 +103,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/models/connection_v2.py b/swagger_client/models/connection_v2.py index c72fbf6..b59a26a 100644 --- a/swagger_client/models/connection_v2.py +++ b/swagger_client/models/connection_v2.py @@ -503,9 +503,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/models/connection_v2_endpoints.py b/swagger_client/models/connection_v2_endpoints.py index d50a53e..3d81573 100644 --- a/swagger_client/models/connection_v2_endpoints.py +++ b/swagger_client/models/connection_v2_endpoints.py @@ -103,9 +103,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/models/connection_v2_notifications.py b/swagger_client/models/connection_v2_notifications.py index 481c8cb..768a0d5 100644 --- a/swagger_client/models/connection_v2_notifications.py +++ b/swagger_client/models/connection_v2_notifications.py @@ -79,9 +79,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/models/link.py b/swagger_client/models/link.py index 6f11ad8..e65703b 100644 --- a/swagger_client/models/link.py +++ b/swagger_client/models/link.py @@ -365,9 +365,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/models/location.py b/swagger_client/models/location.py index 0cb98e7..6e6135b 100644 --- a/swagger_client/models/location.py +++ b/swagger_client/models/location.py @@ -163,9 +163,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/models/node.py b/swagger_client/models/node.py index 9ac8ac7..33ecc07 100644 --- a/swagger_client/models/node.py +++ b/swagger_client/models/node.py @@ -201,9 +201,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/models/port.py b/swagger_client/models/port.py index a6211b0..d7ad480 100644 --- a/swagger_client/models/port.py +++ b/swagger_client/models/port.py @@ -233,9 +233,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/models/topology.py b/swagger_client/models/topology.py index b43cddb..ba29151 100644 --- a/swagger_client/models/topology.py +++ b/swagger_client/models/topology.py @@ -239,9 +239,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/models/user.py b/swagger_client/models/user.py index 63321b8..9c2abf4 100644 --- a/swagger_client/models/user.py +++ b/swagger_client/models/user.py @@ -277,9 +277,11 @@ def to_dict(self): elif isinstance(value, dict): result[attr] = dict( map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, + lambda item: ( + (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item + ), value.items(), ) ) diff --git a/swagger_client/rest.py b/swagger_client/rest.py index 452992f..eb93891 100644 --- a/swagger_client/rest.py +++ b/swagger_client/rest.py @@ -72,9 +72,9 @@ def __init__(self, configuration, pools_size=4, maxsize=None): addition_pool_args = {} if configuration.assert_hostname is not None: - addition_pool_args[ - "assert_hostname" - ] = configuration.assert_hostname # noqa: E501 + addition_pool_args["assert_hostname"] = ( + configuration.assert_hostname + ) # noqa: E501 if maxsize is None: if configuration.connection_pool_maxsize is not None: From 5c8c8dabb5ac7752cab12b09b1e5ccfe7a7be865 Mon Sep 17 00:00:00 2001 From: Yufeng Xin Date: Mon, 8 Jul 2024 11:08:32 -0400 Subject: [PATCH 3/5] lint --- swagger_client/__init__.py | 7 ++----- swagger_client/models/__init__.py | 5 ++--- swagger_client/rest.py | 1 - test/test_connection_qos_metrics.py | 5 ++--- test/test_connection_qos_unit.py | 5 ++--- test/test_connection_scheduling.py | 5 ++--- test/test_connection_v2_endpoints.py | 5 ++--- test/test_connection_v2_notifications.py | 5 ++--- 8 files changed, 14 insertions(+), 24 deletions(-) diff --git a/swagger_client/__init__.py b/swagger_client/__init__.py index c9df73d..77be126 100644 --- a/swagger_client/__init__.py +++ b/swagger_client/__init__.py @@ -20,11 +20,9 @@ from swagger_client.api.node_api import NodeApi from swagger_client.api.topology_api import TopologyApi from swagger_client.api.user_api import UserApi - # import ApiClient from swagger_client.api_client import ApiClient from swagger_client.configuration import Configuration - # import models into sdk package from swagger_client.models.api_response import ApiResponse from swagger_client.models.connection import Connection @@ -34,9 +32,8 @@ from swagger_client.models.connection_scheduling import ConnectionScheduling from swagger_client.models.connection_v2 import ConnectionV2 from swagger_client.models.connection_v2_endpoints import ConnectionV2Endpoints -from swagger_client.models.connection_v2_notifications import ( - ConnectionV2Notifications, -) +from swagger_client.models.connection_v2_notifications import \ + ConnectionV2Notifications from swagger_client.models.link import Link from swagger_client.models.location import Location from swagger_client.models.node import Node diff --git a/swagger_client/models/__init__.py b/swagger_client/models/__init__.py index c498f72..c846ba8 100644 --- a/swagger_client/models/__init__.py +++ b/swagger_client/models/__init__.py @@ -22,9 +22,8 @@ from swagger_client.models.connection_scheduling import ConnectionScheduling from swagger_client.models.connection_v2 import ConnectionV2 from swagger_client.models.connection_v2_endpoints import ConnectionV2Endpoints -from swagger_client.models.connection_v2_notifications import ( - ConnectionV2Notifications, -) +from swagger_client.models.connection_v2_notifications import \ + ConnectionV2Notifications from swagger_client.models.link import Link from swagger_client.models.location import Location from swagger_client.models.node import Node diff --git a/swagger_client/rest.py b/swagger_client/rest.py index eb93891..a06f076 100644 --- a/swagger_client/rest.py +++ b/swagger_client/rest.py @@ -19,7 +19,6 @@ import ssl import certifi - # python 2 and python 3 compatibility library import six from six.moves.urllib.parse import urlencode diff --git a/test/test_connection_qos_metrics.py b/test/test_connection_qos_metrics.py index 3bf3eec..50df98f 100644 --- a/test/test_connection_qos_metrics.py +++ b/test/test_connection_qos_metrics.py @@ -15,9 +15,8 @@ import unittest import swagger_client -from swagger_client.models.connection_qos_metrics import ( - ConnectionQosMetrics, -) # noqa: E501 +from swagger_client.models.connection_qos_metrics import \ + ConnectionQosMetrics # noqa: E501 from swagger_client.rest import ApiException diff --git a/test/test_connection_qos_unit.py b/test/test_connection_qos_unit.py index 04a6a42..8cff524 100644 --- a/test/test_connection_qos_unit.py +++ b/test/test_connection_qos_unit.py @@ -15,9 +15,8 @@ import unittest import swagger_client -from swagger_client.models.connection_qos_unit import ( - ConnectionQosUnit, -) # noqa: E501 +from swagger_client.models.connection_qos_unit import \ + ConnectionQosUnit # noqa: E501 from swagger_client.rest import ApiException diff --git a/test/test_connection_scheduling.py b/test/test_connection_scheduling.py index 36427f0..a9fe054 100644 --- a/test/test_connection_scheduling.py +++ b/test/test_connection_scheduling.py @@ -15,9 +15,8 @@ import unittest import swagger_client -from swagger_client.models.connection_scheduling import ( - ConnectionScheduling, -) # noqa: E501 +from swagger_client.models.connection_scheduling import \ + ConnectionScheduling # noqa: E501 from swagger_client.rest import ApiException diff --git a/test/test_connection_v2_endpoints.py b/test/test_connection_v2_endpoints.py index 92ac84c..b1df395 100644 --- a/test/test_connection_v2_endpoints.py +++ b/test/test_connection_v2_endpoints.py @@ -15,9 +15,8 @@ import unittest import swagger_client -from swagger_client.models.connection_v2_endpoints import ( - ConnectionV2Endpoints, -) # noqa: E501 +from swagger_client.models.connection_v2_endpoints import \ + ConnectionV2Endpoints # noqa: E501 from swagger_client.rest import ApiException diff --git a/test/test_connection_v2_notifications.py b/test/test_connection_v2_notifications.py index 4362cae..3880bf2 100644 --- a/test/test_connection_v2_notifications.py +++ b/test/test_connection_v2_notifications.py @@ -15,9 +15,8 @@ import unittest import swagger_client -from swagger_client.models.connection_v2_notifications import ( - ConnectionV2Notifications, -) # noqa: E501 +from swagger_client.models.connection_v2_notifications import \ + ConnectionV2Notifications # noqa: E501 from swagger_client.rest import ApiException From 673e2e86b363c4de3de4ba8dfb416a38fff72c5f Mon Sep 17 00:00:00 2001 From: Yufeng Xin Date: Tue, 13 Aug 2024 14:07:42 -0400 Subject: [PATCH 4/5] black --- swagger_client/__init__.py | 7 ++++-- swagger_client/api/connection_api.py | 8 +++--- swagger_client/api/user_api.py | 32 ++++++++++++------------ swagger_client/models/__init__.py | 5 ++-- swagger_client/rest.py | 7 +++--- test/test_connection_qos_metrics.py | 5 ++-- test/test_connection_qos_unit.py | 5 ++-- test/test_connection_scheduling.py | 5 ++-- test/test_connection_v2_endpoints.py | 5 ++-- test/test_connection_v2_notifications.py | 5 ++-- 10 files changed, 47 insertions(+), 37 deletions(-) diff --git a/swagger_client/__init__.py b/swagger_client/__init__.py index 77be126..c9df73d 100644 --- a/swagger_client/__init__.py +++ b/swagger_client/__init__.py @@ -20,9 +20,11 @@ from swagger_client.api.node_api import NodeApi from swagger_client.api.topology_api import TopologyApi from swagger_client.api.user_api import UserApi + # import ApiClient from swagger_client.api_client import ApiClient from swagger_client.configuration import Configuration + # import models into sdk package from swagger_client.models.api_response import ApiResponse from swagger_client.models.connection import Connection @@ -32,8 +34,9 @@ from swagger_client.models.connection_scheduling import ConnectionScheduling from swagger_client.models.connection_v2 import ConnectionV2 from swagger_client.models.connection_v2_endpoints import ConnectionV2Endpoints -from swagger_client.models.connection_v2_notifications import \ - ConnectionV2Notifications +from swagger_client.models.connection_v2_notifications import ( + ConnectionV2Notifications, +) from swagger_client.models.link import Link from swagger_client.models.location import Location from swagger_client.models.node import Node diff --git a/swagger_client/api/connection_api.py b/swagger_client/api/connection_api.py index 9a78b49..2592c73 100644 --- a/swagger_client/api/connection_api.py +++ b/swagger_client/api/connection_api.py @@ -412,10 +412,10 @@ def place_connection_with_http_info(self, body, **kwargs): # noqa: E501 ) # noqa: E501 # HTTP header `Content-Type` - header_params["Content-Type"] = ( - self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] - ) + header_params[ + "Content-Type" + ] = self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] ) # noqa: E501 # Authentication setting diff --git a/swagger_client/api/user_api.py b/swagger_client/api/user_api.py index cbeacb8..f189059 100644 --- a/swagger_client/api/user_api.py +++ b/swagger_client/api/user_api.py @@ -110,10 +110,10 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 if "body" in params: body_params = params["body"] # HTTP header `Content-Type` - header_params["Content-Type"] = ( - self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] - ) + header_params[ + "Content-Type" + ] = self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] ) # noqa: E501 # Authentication setting @@ -215,10 +215,10 @@ def create_users_with_array_input_with_http_info( if "body" in params: body_params = params["body"] # HTTP header `Content-Type` - header_params["Content-Type"] = ( - self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] - ) + header_params[ + "Content-Type" + ] = self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] ) # noqa: E501 # Authentication setting @@ -320,10 +320,10 @@ def create_users_with_list_input_with_http_info( if "body" in params: body_params = params["body"] # HTTP header `Content-Type` - header_params["Content-Type"] = ( - self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] - ) + header_params[ + "Content-Type" + ] = self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] ) # noqa: E501 # Authentication setting @@ -832,10 +832,10 @@ def update_user_with_http_info( if "body" in params: body_params = params["body"] # HTTP header `Content-Type` - header_params["Content-Type"] = ( - self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] - ) + header_params[ + "Content-Type" + ] = self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] ) # noqa: E501 # Authentication setting diff --git a/swagger_client/models/__init__.py b/swagger_client/models/__init__.py index c846ba8..c498f72 100644 --- a/swagger_client/models/__init__.py +++ b/swagger_client/models/__init__.py @@ -22,8 +22,9 @@ from swagger_client.models.connection_scheduling import ConnectionScheduling from swagger_client.models.connection_v2 import ConnectionV2 from swagger_client.models.connection_v2_endpoints import ConnectionV2Endpoints -from swagger_client.models.connection_v2_notifications import \ - ConnectionV2Notifications +from swagger_client.models.connection_v2_notifications import ( + ConnectionV2Notifications, +) from swagger_client.models.link import Link from swagger_client.models.location import Location from swagger_client.models.node import Node diff --git a/swagger_client/rest.py b/swagger_client/rest.py index a06f076..452992f 100644 --- a/swagger_client/rest.py +++ b/swagger_client/rest.py @@ -19,6 +19,7 @@ import ssl import certifi + # python 2 and python 3 compatibility library import six from six.moves.urllib.parse import urlencode @@ -71,9 +72,9 @@ def __init__(self, configuration, pools_size=4, maxsize=None): addition_pool_args = {} if configuration.assert_hostname is not None: - addition_pool_args["assert_hostname"] = ( - configuration.assert_hostname - ) # noqa: E501 + addition_pool_args[ + "assert_hostname" + ] = configuration.assert_hostname # noqa: E501 if maxsize is None: if configuration.connection_pool_maxsize is not None: diff --git a/test/test_connection_qos_metrics.py b/test/test_connection_qos_metrics.py index 50df98f..3bf3eec 100644 --- a/test/test_connection_qos_metrics.py +++ b/test/test_connection_qos_metrics.py @@ -15,8 +15,9 @@ import unittest import swagger_client -from swagger_client.models.connection_qos_metrics import \ - ConnectionQosMetrics # noqa: E501 +from swagger_client.models.connection_qos_metrics import ( + ConnectionQosMetrics, +) # noqa: E501 from swagger_client.rest import ApiException diff --git a/test/test_connection_qos_unit.py b/test/test_connection_qos_unit.py index 8cff524..04a6a42 100644 --- a/test/test_connection_qos_unit.py +++ b/test/test_connection_qos_unit.py @@ -15,8 +15,9 @@ import unittest import swagger_client -from swagger_client.models.connection_qos_unit import \ - ConnectionQosUnit # noqa: E501 +from swagger_client.models.connection_qos_unit import ( + ConnectionQosUnit, +) # noqa: E501 from swagger_client.rest import ApiException diff --git a/test/test_connection_scheduling.py b/test/test_connection_scheduling.py index a9fe054..36427f0 100644 --- a/test/test_connection_scheduling.py +++ b/test/test_connection_scheduling.py @@ -15,8 +15,9 @@ import unittest import swagger_client -from swagger_client.models.connection_scheduling import \ - ConnectionScheduling # noqa: E501 +from swagger_client.models.connection_scheduling import ( + ConnectionScheduling, +) # noqa: E501 from swagger_client.rest import ApiException diff --git a/test/test_connection_v2_endpoints.py b/test/test_connection_v2_endpoints.py index b1df395..92ac84c 100644 --- a/test/test_connection_v2_endpoints.py +++ b/test/test_connection_v2_endpoints.py @@ -15,8 +15,9 @@ import unittest import swagger_client -from swagger_client.models.connection_v2_endpoints import \ - ConnectionV2Endpoints # noqa: E501 +from swagger_client.models.connection_v2_endpoints import ( + ConnectionV2Endpoints, +) # noqa: E501 from swagger_client.rest import ApiException diff --git a/test/test_connection_v2_notifications.py b/test/test_connection_v2_notifications.py index 3880bf2..4362cae 100644 --- a/test/test_connection_v2_notifications.py +++ b/test/test_connection_v2_notifications.py @@ -15,8 +15,9 @@ import unittest import swagger_client -from swagger_client.models.connection_v2_notifications import \ - ConnectionV2Notifications # noqa: E501 +from swagger_client.models.connection_v2_notifications import ( + ConnectionV2Notifications, +) # noqa: E501 from swagger_client.rest import ApiException From a6e9216a87e57e531a16f7d25052f0dfa7a6801e Mon Sep 17 00:00:00 2001 From: Yufeng Xin Date: Sat, 17 Aug 2024 16:15:37 -0400 Subject: [PATCH 5/5] lint --- swagger_client/api/connection_api.py | 8 +++---- swagger_client/api/user_api.py | 32 ++++++++++++++-------------- swagger_client/rest.py | 6 +++--- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/swagger_client/api/connection_api.py b/swagger_client/api/connection_api.py index 2592c73..9a78b49 100644 --- a/swagger_client/api/connection_api.py +++ b/swagger_client/api/connection_api.py @@ -412,10 +412,10 @@ def place_connection_with_http_info(self, body, **kwargs): # noqa: E501 ) # noqa: E501 # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] + header_params["Content-Type"] = ( + self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] + ) ) # noqa: E501 # Authentication setting diff --git a/swagger_client/api/user_api.py b/swagger_client/api/user_api.py index f189059..cbeacb8 100644 --- a/swagger_client/api/user_api.py +++ b/swagger_client/api/user_api.py @@ -110,10 +110,10 @@ def create_user_with_http_info(self, body, **kwargs): # noqa: E501 if "body" in params: body_params = params["body"] # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] + header_params["Content-Type"] = ( + self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] + ) ) # noqa: E501 # Authentication setting @@ -215,10 +215,10 @@ def create_users_with_array_input_with_http_info( if "body" in params: body_params = params["body"] # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] + header_params["Content-Type"] = ( + self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] + ) ) # noqa: E501 # Authentication setting @@ -320,10 +320,10 @@ def create_users_with_list_input_with_http_info( if "body" in params: body_params = params["body"] # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] + header_params["Content-Type"] = ( + self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] + ) ) # noqa: E501 # Authentication setting @@ -832,10 +832,10 @@ def update_user_with_http_info( if "body" in params: body_params = params["body"] # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] + header_params["Content-Type"] = ( + self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] + ) ) # noqa: E501 # Authentication setting diff --git a/swagger_client/rest.py b/swagger_client/rest.py index 452992f..eb93891 100644 --- a/swagger_client/rest.py +++ b/swagger_client/rest.py @@ -72,9 +72,9 @@ def __init__(self, configuration, pools_size=4, maxsize=None): addition_pool_args = {} if configuration.assert_hostname is not None: - addition_pool_args[ - "assert_hostname" - ] = configuration.assert_hostname # noqa: E501 + addition_pool_args["assert_hostname"] = ( + configuration.assert_hostname + ) # noqa: E501 if maxsize is None: if configuration.connection_pool_maxsize is not None: