diff --git a/.gitignore b/.gitignore index 4c007de..a655050 100644 --- a/.gitignore +++ b/.gitignore @@ -62,4 +62,3 @@ target/ #Ipython Notebook .ipynb_checkpoints -swagger-codegen-cli.jar diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION index 3eb2ae3..3356a5d 100644 --- a/.swagger-codegen/VERSION +++ b/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.14 \ No newline at end of file +3.0.36 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 86211e2..dd6c445 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ # ref: https://docs.travis-ci.com/user/languages/python language: python python: - - "2.7" - "3.2" - "3.3" - "3.4" diff --git a/README.md b/README.md index 39b042b..ed601ea 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ No description provided (generated by Swagger Codegen https://github.com/swagger This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: -- API version: 0.0.13 -- Package version: 1.0.4 -- Build package: io.swagger.codegen.languages.PythonClientCodegen +- API version: 0.0.15 +- Package version: 1.0.5 +- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen ## Requirements. @@ -58,26 +58,64 @@ configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' # configuration.api_key_prefix['X-API-Key'] = 'Bearer' # create an instance of the API class -api_instance = powerdns_client.ConfigApi(powerdns_client.ApiClient(configuration)) -server_id = 'server_id_example' # str | The id of the server to retrieve +api_instance = powerdns_client.AutoprimaryApi(powerdns_client.ApiClient(configuration)) +autoprimary = powerdns_client.Autoprimary() # Autoprimary | autoprimary entry to add +server_id = 'server_id_example' # str | The id of the server to manage the list of autoprimaries on try: - # Returns all ConfigSettings for a single server - api_response = api_instance.get_config(server_id) - pprint(api_response) + # Add an autoprimary + api_instance.create_autoprimary(autoprimary, server_id) except ApiException as e: - print("Exception when calling ConfigApi->get_config: %s\n" % e) + print("Exception when calling AutoprimaryApi->create_autoprimary: %s\n" % e) + +# Configure API key authorization: APIKeyHeader +configuration = powerdns_client.Configuration() +configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-API-Key'] = 'Bearer' + +# create an instance of the API class +api_instance = powerdns_client.AutoprimaryApi(powerdns_client.ApiClient(configuration)) +server_id = 'server_id_example' # str | The id of the server to delete the autoprimary from +ip = 'ip_example' # str | IP address of autoprimary +nameserver = 'nameserver_example' # str | DNS name of the autoprimary + +try: + # Delete the autoprimary entry + api_instance.delete_autoprimary(server_id, ip, nameserver) +except ApiException as e: + print("Exception when calling AutoprimaryApi->delete_autoprimary: %s\n" % e) + +# Configure API key authorization: APIKeyHeader +configuration = powerdns_client.Configuration() +configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-API-Key'] = 'Bearer' + +# create an instance of the API class +api_instance = powerdns_client.AutoprimaryApi(powerdns_client.ApiClient(configuration)) +server_id = 'server_id_example' # str | The id of the server to manage the list of autoprimaries on +try: + # Get a list of autoprimaries + api_response = api_instance.get_autoprimaries(server_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AutoprimaryApi->get_autoprimaries: %s\n" % e) ``` ## Documentation for API Endpoints -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to */api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AutoprimaryApi* | [**create_autoprimary**](docs/AutoprimaryApi.md#create_autoprimary) | **POST** /servers/{server_id}/autoprimaries | Add an autoprimary +*AutoprimaryApi* | [**delete_autoprimary**](docs/AutoprimaryApi.md#delete_autoprimary) | **DELETE** /servers/{server_id}/autoprimaries/{ip}/{nameserver} | Delete the autoprimary entry +*AutoprimaryApi* | [**get_autoprimaries**](docs/AutoprimaryApi.md#get_autoprimaries) | **GET** /servers/{server_id}/autoprimaries | Get a list of autoprimaries *ConfigApi* | [**get_config**](docs/ConfigApi.md#get_config) | **GET** /servers/{server_id}/config | Returns all ConfigSettings for a single server *ConfigApi* | [**get_config_setting**](docs/ConfigApi.md#get_config_setting) | **GET** /servers/{server_id}/config/{config_setting_name} | Returns a specific ConfigSetting for a single server +*DefaultApi* | [**error**](docs/DefaultApi.md#error) | **GET** /error | Will always generate an error *SearchApi* | [**search_data**](docs/SearchApi.md#search_data) | **GET** /servers/{server_id}/search-data | Search the data inside PowerDNS *ServersApi* | [**cache_flush_by_name**](docs/ServersApi.md#cache_flush_by_name) | **PUT** /servers/{server_id}/cache/flush | Flush a cache-entry by name *ServersApi* | [**list_server**](docs/ServersApi.md#list_server) | **GET** /servers/{server_id} | List a server @@ -106,17 +144,18 @@ Class | Method | HTTP request | Description *ZonesApi* | [**list_zones**](docs/ZonesApi.md#list_zones) | **GET** /servers/{server_id}/zones | List all Zones in a server *ZonesApi* | [**notify_zone**](docs/ZonesApi.md#notify_zone) | **PUT** /servers/{server_id}/zones/{zone_id}/notify | Send a DNS NOTIFY to all slaves. *ZonesApi* | [**patch_zone**](docs/ZonesApi.md#patch_zone) | **PATCH** /servers/{server_id}/zones/{zone_id} | Creates/modifies/deletes RRsets present in the payload and their comments. Returns 204 No Content on success. -*ZonesApi* | [**put_zone**](docs/ZonesApi.md#put_zone) | **PUT** /servers/{server_id}/zones/{zone_id} | Modifies basic zone data (metadata). +*ZonesApi* | [**put_zone**](docs/ZonesApi.md#put_zone) | **PUT** /servers/{server_id}/zones/{zone_id} | Modifies basic zone data. *ZonesApi* | [**rectify_zone**](docs/ZonesApi.md#rectify_zone) | **PUT** /servers/{server_id}/zones/{zone_id}/rectify | Rectify the zone data. - ## Documentation For Models + - [Autoprimary](docs/Autoprimary.md) - [CacheFlushResult](docs/CacheFlushResult.md) - [Comment](docs/Comment.md) - [ConfigSetting](docs/ConfigSetting.md) - [Cryptokey](docs/Cryptokey.md) - [Error](docs/Error.md) + - [InlineResponse200](docs/InlineResponse200.md) - [MapStatisticItem](docs/MapStatisticItem.md) - [Metadata](docs/Metadata.md) - [RRSet](docs/RRSet.md) @@ -135,7 +174,6 @@ Class | Method | HTTP request | Description - [Zone](docs/Zone.md) - [Zones](docs/Zones.md) - ## Documentation For Authorization @@ -149,4 +187,3 @@ Class | Method | HTTP request | Description ## Author - diff --git a/docs/Autoprimary.md b/docs/Autoprimary.md new file mode 100644 index 0000000..307a9b0 --- /dev/null +++ b/docs/Autoprimary.md @@ -0,0 +1,11 @@ +# Autoprimary + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip** | **str** | IP address of the autoprimary server | [optional] +**nameserver** | **str** | DNS name of the autoprimary server | [optional] +**account** | **str** | Account name for the autoprimary server | [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/AutoprimaryApi.md b/docs/AutoprimaryApi.md new file mode 100644 index 0000000..d5bc94f --- /dev/null +++ b/docs/AutoprimaryApi.md @@ -0,0 +1,172 @@ +# powerdns_client.AutoprimaryApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_autoprimary**](AutoprimaryApi.md#create_autoprimary) | **POST** /servers/{server_id}/autoprimaries | Add an autoprimary +[**delete_autoprimary**](AutoprimaryApi.md#delete_autoprimary) | **DELETE** /servers/{server_id}/autoprimaries/{ip}/{nameserver} | Delete the autoprimary entry +[**get_autoprimaries**](AutoprimaryApi.md#get_autoprimaries) | **GET** /servers/{server_id}/autoprimaries | Get a list of autoprimaries + +# **create_autoprimary** +> create_autoprimary(autoprimary, server_id) + +Add an autoprimary + +This methods add a new autoprimary server. + +### Example +```python +from __future__ import print_function +import time +import powerdns_client +from powerdns_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: APIKeyHeader +configuration = powerdns_client.Configuration() +configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-API-Key'] = 'Bearer' + +# create an instance of the API class +api_instance = powerdns_client.AutoprimaryApi(powerdns_client.ApiClient(configuration)) +autoprimary = powerdns_client.Autoprimary() # Autoprimary | autoprimary entry to add +server_id = 'server_id_example' # str | The id of the server to manage the list of autoprimaries on + +try: + # Add an autoprimary + api_instance.create_autoprimary(autoprimary, server_id) +except ApiException as e: + print("Exception when calling AutoprimaryApi->create_autoprimary: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **autoprimary** | [**Autoprimary**](Autoprimary.md)| autoprimary entry to add | + **server_id** | **str**| The id of the server to manage the list of autoprimaries on | + +### Return type + +void (empty response body) + +### Authorization + +[APIKeyHeader](../README.md#APIKeyHeader) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_autoprimary** +> delete_autoprimary(server_id, ip, nameserver) + +Delete the autoprimary entry + +### Example +```python +from __future__ import print_function +import time +import powerdns_client +from powerdns_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: APIKeyHeader +configuration = powerdns_client.Configuration() +configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-API-Key'] = 'Bearer' + +# create an instance of the API class +api_instance = powerdns_client.AutoprimaryApi(powerdns_client.ApiClient(configuration)) +server_id = 'server_id_example' # str | The id of the server to delete the autoprimary from +ip = 'ip_example' # str | IP address of autoprimary +nameserver = 'nameserver_example' # str | DNS name of the autoprimary + +try: + # Delete the autoprimary entry + api_instance.delete_autoprimary(server_id, ip, nameserver) +except ApiException as e: + print("Exception when calling AutoprimaryApi->delete_autoprimary: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **server_id** | **str**| The id of the server to delete the autoprimary from | + **ip** | **str**| IP address of autoprimary | + **nameserver** | **str**| DNS name of the autoprimary | + +### Return type + +void (empty response body) + +### Authorization + +[APIKeyHeader](../README.md#APIKeyHeader) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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_autoprimaries** +> Autoprimary get_autoprimaries(server_id) + +Get a list of autoprimaries + +### Example +```python +from __future__ import print_function +import time +import powerdns_client +from powerdns_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: APIKeyHeader +configuration = powerdns_client.Configuration() +configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-API-Key'] = 'Bearer' + +# create an instance of the API class +api_instance = powerdns_client.AutoprimaryApi(powerdns_client.ApiClient(configuration)) +server_id = 'server_id_example' # str | The id of the server to manage the list of autoprimaries on + +try: + # Get a list of autoprimaries + api_response = api_instance.get_autoprimaries(server_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AutoprimaryApi->get_autoprimaries: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **server_id** | **str**| The id of the server to manage the list of autoprimaries on | + +### Return type + +[**Autoprimary**](Autoprimary.md) + +### Authorization + +[APIKeyHeader](../README.md#APIKeyHeader) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + diff --git a/docs/CacheFlushResult.md b/docs/CacheFlushResult.md index 222ceac..ff5a0fd 100644 --- a/docs/CacheFlushResult.md +++ b/docs/CacheFlushResult.md @@ -8,4 +8,3 @@ 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/Comment.md b/docs/Comment.md index 1531c75..dca4343 100644 --- a/docs/Comment.md +++ b/docs/Comment.md @@ -9,4 +9,3 @@ 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/ConfigApi.md b/docs/ConfigApi.md index 0b91468..b099198 100644 --- a/docs/ConfigApi.md +++ b/docs/ConfigApi.md @@ -1,13 +1,12 @@ # powerdns_client.ConfigApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to */api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**get_config**](ConfigApi.md#get_config) | **GET** /servers/{server_id}/config | Returns all ConfigSettings for a single server [**get_config_setting**](ConfigApi.md#get_config_setting) | **GET** /servers/{server_id}/config/{config_setting_name} | Returns a specific ConfigSetting for a single server - # **get_config** > list[ConfigSetting] get_config(server_id) @@ -55,7 +54,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -111,7 +110,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) diff --git a/docs/ConfigSetting.md b/docs/ConfigSetting.md index 3b271ab..9766e50 100644 --- a/docs/ConfigSetting.md +++ b/docs/ConfigSetting.md @@ -9,4 +9,3 @@ 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/Cryptokey.md b/docs/Cryptokey.md index 35b9353..cb05739 100644 --- a/docs/Cryptokey.md +++ b/docs/Cryptokey.md @@ -10,10 +10,10 @@ Name | Type | Description | Notes **published** | **bool** | Whether or not the DNSKEY record is published in the zone | [optional] **dnskey** | **str** | The DNSKEY record for this key | [optional] **ds** | **list[str]** | An array of DS records for this key | [optional] +**cds** | **list[str]** | An array of DS records for this key, filtered by CDS publication settings | [optional] **privatekey** | **str** | The private key in ISC format | [optional] **algorithm** | **str** | The name of the algorithm of the key, should be a mnemonic | [optional] **bits** | **int** | The size of the key | [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/DefaultApi.md b/docs/DefaultApi.md new file mode 100644 index 0000000..28b8874 --- /dev/null +++ b/docs/DefaultApi.md @@ -0,0 +1,55 @@ +# powerdns_client.DefaultApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**error**](DefaultApi.md#error) | **GET** /error | Will always generate an error + +# **error** +> error() + +Will always generate an error + +### Example +```python +from __future__ import print_function +import time +import powerdns_client +from powerdns_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: APIKeyHeader +configuration = powerdns_client.Configuration() +configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-API-Key'] = 'Bearer' + +# create an instance of the API class +api_instance = powerdns_client.DefaultApi(powerdns_client.ApiClient(configuration)) + +try: + # Will always generate an error + api_instance.error() +except ApiException as e: + print("Exception when calling DefaultApi->error: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[APIKeyHeader](../README.md#APIKeyHeader) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + diff --git a/docs/Error.md b/docs/Error.md index ab6e888..36a8c78 100644 --- a/docs/Error.md +++ b/docs/Error.md @@ -8,4 +8,3 @@ 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/InlineResponse200.md b/docs/InlineResponse200.md new file mode 100644 index 0000000..2176b9a --- /dev/null +++ b/docs/InlineResponse200.md @@ -0,0 +1,8 @@ +# InlineResponse200 + +## 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/MapStatisticItem.md b/docs/MapStatisticItem.md index e612b0c..7902795 100644 --- a/docs/MapStatisticItem.md +++ b/docs/MapStatisticItem.md @@ -9,4 +9,3 @@ 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/Metadata.md b/docs/Metadata.md index a4d3ec4..d378024 100644 --- a/docs/Metadata.md +++ b/docs/Metadata.md @@ -8,4 +8,3 @@ 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/RRSet.md b/docs/RRSet.md index fd38494..9e75470 100644 --- a/docs/RRSet.md +++ b/docs/RRSet.md @@ -12,4 +12,3 @@ 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/Record.md b/docs/Record.md index d7e2083..499f2eb 100644 --- a/docs/Record.md +++ b/docs/Record.md @@ -8,4 +8,3 @@ 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/RingStatisticItem.md b/docs/RingStatisticItem.md index 6e4ec40..48f5903 100644 --- a/docs/RingStatisticItem.md +++ b/docs/RingStatisticItem.md @@ -10,4 +10,3 @@ 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/SearchApi.md b/docs/SearchApi.md index a24733d..c0b5229 100644 --- a/docs/SearchApi.md +++ b/docs/SearchApi.md @@ -1,12 +1,11 @@ # powerdns_client.SearchApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to */api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**search_data**](SearchApi.md#search_data) | **GET** /servers/{server_id}/search-data | Search the data inside PowerDNS - # **search_data** > SearchResults search_data(server_id, q, max, object_type=object_type) @@ -62,7 +61,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) diff --git a/docs/SearchResult.md b/docs/SearchResult.md index 007c35a..f512b4b 100644 --- a/docs/SearchResult.md +++ b/docs/SearchResult.md @@ -14,4 +14,3 @@ 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/SearchResultComment.md b/docs/SearchResultComment.md index 231baa2..dec380c 100644 --- a/docs/SearchResultComment.md +++ b/docs/SearchResultComment.md @@ -11,4 +11,3 @@ 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/SearchResultRecord.md b/docs/SearchResultRecord.md index 7c0166b..ad71b05 100644 --- a/docs/SearchResultRecord.md +++ b/docs/SearchResultRecord.md @@ -14,4 +14,3 @@ 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/SearchResultZone.md b/docs/SearchResultZone.md index 60bebe8..ff60ae3 100644 --- a/docs/SearchResultZone.md +++ b/docs/SearchResultZone.md @@ -9,4 +9,3 @@ 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/SearchResults.md b/docs/SearchResults.md index 2ac851d..273f2b2 100644 --- a/docs/SearchResults.md +++ b/docs/SearchResults.md @@ -6,4 +6,3 @@ 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/Server.md b/docs/Server.md index 1edc0c0..0433a77 100644 --- a/docs/Server.md +++ b/docs/Server.md @@ -13,4 +13,3 @@ 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/Servers.md b/docs/Servers.md index 462408a..b0edd33 100644 --- a/docs/Servers.md +++ b/docs/Servers.md @@ -6,4 +6,3 @@ 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/ServersApi.md b/docs/ServersApi.md index 578ad7a..dd85e88 100644 --- a/docs/ServersApi.md +++ b/docs/ServersApi.md @@ -1,6 +1,6 @@ # powerdns_client.ServersApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to */api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -8,7 +8,6 @@ Method | HTTP request | Description [**list_server**](ServersApi.md#list_server) | **GET** /servers/{server_id} | List a server [**list_servers**](ServersApi.md#list_servers) | **GET** /servers | List all servers - # **cache_flush_by_name** > CacheFlushResult cache_flush_by_name(server_id, domain) @@ -58,7 +57,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -110,7 +109,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -158,7 +157,7 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) diff --git a/docs/SimpleStatisticItem.md b/docs/SimpleStatisticItem.md index 50c0093..b98c7ed 100644 --- a/docs/SimpleStatisticItem.md +++ b/docs/SimpleStatisticItem.md @@ -8,4 +8,3 @@ 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/StatisticItem.md b/docs/StatisticItem.md index 9ef41f8..12a9785 100644 --- a/docs/StatisticItem.md +++ b/docs/StatisticItem.md @@ -9,4 +9,3 @@ 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/StatsApi.md b/docs/StatsApi.md index bc58a33..fe24b69 100644 --- a/docs/StatsApi.md +++ b/docs/StatsApi.md @@ -1,14 +1,13 @@ # powerdns_client.StatsApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to */api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**get_stats**](StatsApi.md#get_stats) | **GET** /servers/{server_id}/statistics | Query statistics. - # **get_stats** -> list[object] get_stats(server_id, statistic=statistic, includerings=includerings) +> get_stats(server_id, statistic=statistic, includerings=includerings) Query statistics. @@ -36,8 +35,7 @@ includerings = true # bool | “true” (default) or “false”, whether to inc try: # Query statistics. - api_response = api_instance.get_stats(server_id, statistic=statistic, includerings=includerings) - pprint(api_response) + api_instance.get_stats(server_id, statistic=statistic, includerings=includerings) except ApiException as e: print("Exception when calling StatsApi->get_stats: %s\n" % e) ``` @@ -52,7 +50,7 @@ Name | Type | Description | Notes ### Return type -**list[object]** +void (empty response body) ### Authorization @@ -60,7 +58,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) diff --git a/docs/TSIGKey.md b/docs/TSIGKey.md index 794fe05..76d7b86 100644 --- a/docs/TSIGKey.md +++ b/docs/TSIGKey.md @@ -11,4 +11,3 @@ 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/TsigkeyApi.md b/docs/TsigkeyApi.md index 6d76f90..1a9b2e3 100644 --- a/docs/TsigkeyApi.md +++ b/docs/TsigkeyApi.md @@ -1,6 +1,6 @@ # powerdns_client.TsigkeyApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to */api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -10,9 +10,8 @@ Method | HTTP request | Description [**list_tsig_keys**](TsigkeyApi.md#list_tsig_keys) | **GET** /servers/{server_id}/tsigkeys | Get all TSIGKeys on the server, except the actual key [**put_tsig_key**](TsigkeyApi.md#put_tsig_key) | **PUT** /servers/{server_id}/tsigkeys/{tsigkey_id} | - # **create_tsig_key** -> TSIGKey create_tsig_key(server_id, tsigkey) +> TSIGKey create_tsig_key(tsigkey, server_id) Add a TSIG key @@ -34,12 +33,12 @@ configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = powerdns_client.TsigkeyApi(powerdns_client.ApiClient(configuration)) -server_id = 'server_id_example' # str | The id of the server tsigkey = powerdns_client.TSIGKey() # TSIGKey | The TSIGKey to add +server_id = 'server_id_example' # str | The id of the server try: # Add a TSIG key - api_response = api_instance.create_tsig_key(server_id, tsigkey) + api_response = api_instance.create_tsig_key(tsigkey, server_id) pprint(api_response) except ApiException as e: print("Exception when calling TsigkeyApi->create_tsig_key: %s\n" % e) @@ -49,8 +48,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **server_id** | **str**| The id of the server | **tsigkey** | [**TSIGKey**](TSIGKey.md)| The TSIGKey to add | + **server_id** | **str**| The id of the server | ### Return type @@ -115,7 +114,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -169,7 +168,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -221,13 +220,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **put_tsig_key** -> TSIGKey put_tsig_key(server_id, tsigkey_id, tsigkey) +> TSIGKey put_tsig_key(tsigkey, server_id, tsigkey_id) @@ -249,12 +248,12 @@ configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = powerdns_client.TsigkeyApi(powerdns_client.ApiClient(configuration)) +tsigkey = powerdns_client.TSIGKey() # TSIGKey | A (possibly stripped down) TSIGKey object with the new values server_id = 'server_id_example' # str | The id of the server to retrieve the key from tsigkey_id = 'tsigkey_id_example' # str | The id of the TSIGkey. Should match the \"id\" field in the TSIGKey object -tsigkey = powerdns_client.TSIGKey() # TSIGKey | A (possibly stripped down) TSIGKey object with the new values try: - api_response = api_instance.put_tsig_key(server_id, tsigkey_id, tsigkey) + api_response = api_instance.put_tsig_key(tsigkey, server_id, tsigkey_id) pprint(api_response) except ApiException as e: print("Exception when calling TsigkeyApi->put_tsig_key: %s\n" % e) @@ -264,9 +263,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **tsigkey** | [**TSIGKey**](TSIGKey.md)| A (possibly stripped down) TSIGKey object with the new values | **server_id** | **str**| The id of the server to retrieve the key from | **tsigkey_id** | **str**| The id of the TSIGkey. Should match the \"id\" field in the TSIGKey object | - **tsigkey** | [**TSIGKey**](TSIGKey.md)| A (possibly stripped down) TSIGKey object with the new values | ### Return type diff --git a/docs/Zone.md b/docs/Zone.md index dcfd063..feeeb41 100644 --- a/docs/Zone.md +++ b/docs/Zone.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **name** | **str** | Name of the zone (e.g. “example.com.”) MUST have a trailing dot | [optional] **type** | **str** | Set to “Zone” | [optional] **url** | **str** | API endpoint for this zone | [optional] -**kind** | **str** | Zone kind, one of “Native”, “Master”, “Slave” | [optional] +**kind** | **str** | Zone kind, one of “Native”, “Master”, “Slave”, “Producer”, “Consumer” | [optional] **rrsets** | [**list[RRSet]**](RRSet.md) | RRSets in this zone (for zones/{zone_id} endpoint only; omitted during GET on the .../zones list endpoint) | [optional] **serial** | **int** | The SOA serial number | [optional] **notified_serial** | **int** | The SOA serial notifications have been sent out for | [optional] @@ -19,8 +19,9 @@ Name | Type | Description | Notes **presigned** | **bool** | Whether or not the zone is pre-signed | [optional] **soa_edit** | **str** | The SOA-EDIT metadata item | [optional] **soa_edit_api** | **str** | The SOA-EDIT-API metadata item | [optional] -**api_rectify** | **bool** | Whether or not the zone will be rectified on data changes via the API | [optional] +**api_rectify** | **bool** | Whether or not the zone will be rectified on data changes via the API | [optional] **zone** | **str** | MAY contain a BIND-style zone file when creating a zone | [optional] +**catalog** | **str** | The catalog this zone is a member of | [optional] **account** | **str** | MAY be set. Its value is defined by local policy | [optional] **nameservers** | **list[str]** | MAY be sent in client bodies during creation, and MUST NOT be sent by the server. Simple list of strings of nameserver names, including the trailing dot. Not required for slave zones. | [optional] **master_tsig_key_ids** | **list[str]** | The id of the TSIG keys used for master operation in this zone | [optional] @@ -28,4 +29,3 @@ 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/ZonecryptokeyApi.md b/docs/ZonecryptokeyApi.md index 683de22..d10e870 100644 --- a/docs/ZonecryptokeyApi.md +++ b/docs/ZonecryptokeyApi.md @@ -1,6 +1,6 @@ # powerdns_client.ZonecryptokeyApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to */api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -10,9 +10,8 @@ Method | HTTP request | Description [**list_cryptokeys**](ZonecryptokeyApi.md#list_cryptokeys) | **GET** /servers/{server_id}/zones/{zone_id}/cryptokeys | Get all CryptoKeys for a zone, except the privatekey [**modify_cryptokey**](ZonecryptokeyApi.md#modify_cryptokey) | **PUT** /servers/{server_id}/zones/{zone_id}/cryptokeys/{cryptokey_id} | This method (de)activates a key from zone_name specified by cryptokey_id - # **create_cryptokey** -> Cryptokey create_cryptokey(server_id, zone_id, cryptokey) +> Cryptokey create_cryptokey(cryptokey, server_id, zone_id) Creates a Cryptokey @@ -34,13 +33,13 @@ configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = powerdns_client.ZonecryptokeyApi(powerdns_client.ApiClient(configuration)) +cryptokey = powerdns_client.Cryptokey() # Cryptokey | Add a Cryptokey server_id = 'server_id_example' # str | The id of the server to retrieve zone_id = 'zone_id_example' # str | -cryptokey = powerdns_client.Cryptokey() # Cryptokey | Add a Cryptokey try: # Creates a Cryptokey - api_response = api_instance.create_cryptokey(server_id, zone_id, cryptokey) + api_response = api_instance.create_cryptokey(cryptokey, server_id, zone_id) pprint(api_response) except ApiException as e: print("Exception when calling ZonecryptokeyApi->create_cryptokey: %s\n" % e) @@ -50,9 +49,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **cryptokey** | [**Cryptokey**](Cryptokey.md)| Add a Cryptokey | **server_id** | **str**| The id of the server to retrieve | **zone_id** | **str**| | - **cryptokey** | [**Cryptokey**](Cryptokey.md)| Add a Cryptokey | ### Return type @@ -119,7 +118,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -175,7 +174,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -229,13 +228,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **modify_cryptokey** -> modify_cryptokey(server_id, zone_id, cryptokey_id, cryptokey) +> modify_cryptokey(cryptokey, server_id, zone_id, cryptokey_id) This method (de)activates a key from zone_name specified by cryptokey_id @@ -255,14 +254,14 @@ configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = powerdns_client.ZonecryptokeyApi(powerdns_client.ApiClient(configuration)) +cryptokey = powerdns_client.Cryptokey() # Cryptokey | the Cryptokey server_id = 'server_id_example' # str | The id of the server to retrieve zone_id = 'zone_id_example' # str | cryptokey_id = 'cryptokey_id_example' # str | Cryptokey to manipulate -cryptokey = powerdns_client.Cryptokey() # Cryptokey | the Cryptokey try: # This method (de)activates a key from zone_name specified by cryptokey_id - api_instance.modify_cryptokey(server_id, zone_id, cryptokey_id, cryptokey) + api_instance.modify_cryptokey(cryptokey, server_id, zone_id, cryptokey_id) except ApiException as e: print("Exception when calling ZonecryptokeyApi->modify_cryptokey: %s\n" % e) ``` @@ -271,10 +270,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **cryptokey** | [**Cryptokey**](Cryptokey.md)| the Cryptokey | **server_id** | **str**| The id of the server to retrieve | **zone_id** | **str**| | **cryptokey_id** | **str**| Cryptokey to manipulate | - **cryptokey** | [**Cryptokey**](Cryptokey.md)| the Cryptokey | ### Return type diff --git a/docs/ZonemetadataApi.md b/docs/ZonemetadataApi.md index b1aef30..5ae0b99 100644 --- a/docs/ZonemetadataApi.md +++ b/docs/ZonemetadataApi.md @@ -1,6 +1,6 @@ # powerdns_client.ZonemetadataApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to */api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -10,9 +10,8 @@ Method | HTTP request | Description [**list_metadata**](ZonemetadataApi.md#list_metadata) | **GET** /servers/{server_id}/zones/{zone_id}/metadata | Get all the Metadata associated with the zone. [**modify_metadata**](ZonemetadataApi.md#modify_metadata) | **PUT** /servers/{server_id}/zones/{zone_id}/metadata/{metadata_kind} | Replace the content of a single kind of domain metadata. - # **create_metadata** -> create_metadata(server_id, zone_id, metadata) +> create_metadata(metadata, server_id, zone_id) Creates a set of metadata entries @@ -34,13 +33,13 @@ configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = powerdns_client.ZonemetadataApi(powerdns_client.ApiClient(configuration)) +metadata = powerdns_client.Metadata() # Metadata | Metadata object with list of values to create server_id = 'server_id_example' # str | The id of the server to retrieve zone_id = 'zone_id_example' # str | -metadata = powerdns_client.Metadata() # Metadata | Metadata object with list of values to create try: # Creates a set of metadata entries - api_instance.create_metadata(server_id, zone_id, metadata) + api_instance.create_metadata(metadata, server_id, zone_id) except ApiException as e: print("Exception when calling ZonemetadataApi->create_metadata: %s\n" % e) ``` @@ -49,9 +48,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **metadata** | [**Metadata**](Metadata.md)| Metadata object with list of values to create | **server_id** | **str**| The id of the server to retrieve | **zone_id** | **str**| | - **metadata** | [**Metadata**](Metadata.md)| Metadata object with list of values to create | ### Return type @@ -118,7 +117,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -174,7 +173,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -228,13 +227,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **modify_metadata** -> Metadata modify_metadata(server_id, zone_id, metadata_kind, metadata) +> Metadata modify_metadata(metadata, server_id, zone_id, metadata_kind) Replace the content of a single kind of domain metadata. @@ -256,14 +255,14 @@ configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = powerdns_client.ZonemetadataApi(powerdns_client.ApiClient(configuration)) +metadata = powerdns_client.Metadata() # Metadata | metadata to add/create server_id = 'server_id_example' # str | The id of the server to retrieve zone_id = 'zone_id_example' # str | metadata_kind = 'metadata_kind_example' # str | The kind of metadata -metadata = powerdns_client.Metadata() # Metadata | metadata to add/create try: # Replace the content of a single kind of domain metadata. - api_response = api_instance.modify_metadata(server_id, zone_id, metadata_kind, metadata) + api_response = api_instance.modify_metadata(metadata, server_id, zone_id, metadata_kind) pprint(api_response) except ApiException as e: print("Exception when calling ZonemetadataApi->modify_metadata: %s\n" % e) @@ -273,10 +272,10 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **metadata** | [**Metadata**](Metadata.md)| metadata to add/create | **server_id** | **str**| The id of the server to retrieve | **zone_id** | **str**| | **metadata_kind** | **str**| The kind of metadata | - **metadata** | [**Metadata**](Metadata.md)| metadata to add/create | ### Return type diff --git a/docs/Zones.md b/docs/Zones.md index dce2fea..4c9124c 100644 --- a/docs/Zones.md +++ b/docs/Zones.md @@ -6,4 +6,3 @@ 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/ZonesApi.md b/docs/ZonesApi.md index 371dbcd..c92bbd2 100644 --- a/docs/ZonesApi.md +++ b/docs/ZonesApi.md @@ -1,6 +1,6 @@ # powerdns_client.ZonesApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to */api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -12,12 +12,11 @@ Method | HTTP request | Description [**list_zones**](ZonesApi.md#list_zones) | **GET** /servers/{server_id}/zones | List all Zones in a server [**notify_zone**](ZonesApi.md#notify_zone) | **PUT** /servers/{server_id}/zones/{zone_id}/notify | Send a DNS NOTIFY to all slaves. [**patch_zone**](ZonesApi.md#patch_zone) | **PATCH** /servers/{server_id}/zones/{zone_id} | Creates/modifies/deletes RRsets present in the payload and their comments. Returns 204 No Content on success. -[**put_zone**](ZonesApi.md#put_zone) | **PUT** /servers/{server_id}/zones/{zone_id} | Modifies basic zone data (metadata). +[**put_zone**](ZonesApi.md#put_zone) | **PUT** /servers/{server_id}/zones/{zone_id} | Modifies basic zone data. [**rectify_zone**](ZonesApi.md#rectify_zone) | **PUT** /servers/{server_id}/zones/{zone_id}/rectify | Rectify the zone data. - # **axfr_export_zone** -> str axfr_export_zone(server_id, zone_id) +> InlineResponse200 axfr_export_zone(server_id, zone_id) Returns the zone in AXFR format. @@ -57,7 +56,7 @@ Name | Type | Description | Notes ### Return type -**str** +[**InlineResponse200**](InlineResponse200.md) ### Authorization @@ -65,7 +64,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -120,13 +119,13 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **create_zone** -> Zone create_zone(server_id, zone_struct, rrsets=rrsets) +> Zone create_zone(zone_struct, server_id, rrsets=rrsets) Creates a new domain, returns the Zone on creation. @@ -146,13 +145,13 @@ configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = powerdns_client.ZonesApi(powerdns_client.ApiClient(configuration)) -server_id = 'server_id_example' # str | The id of the server to retrieve zone_struct = powerdns_client.Zone() # Zone | The zone struct to patch with +server_id = 'server_id_example' # str | The id of the server to retrieve rrsets = true # bool | “true” (default) or “false”, whether to include the “rrsets” in the response Zone object. (optional) (default to true) try: # Creates a new domain, returns the Zone on creation. - api_response = api_instance.create_zone(server_id, zone_struct, rrsets=rrsets) + api_response = api_instance.create_zone(zone_struct, server_id, rrsets=rrsets) pprint(api_response) except ApiException as e: print("Exception when calling ZonesApi->create_zone: %s\n" % e) @@ -162,8 +161,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **server_id** | **str**| The id of the server to retrieve | **zone_struct** | [**Zone**](Zone.md)| The zone struct to patch with | + **server_id** | **str**| The id of the server to retrieve | **rrsets** | **bool**| “true” (default) or “false”, whether to include the “rrsets” in the response Zone object. | [optional] [default to true] ### Return type @@ -229,13 +228,13 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **list_zone** -> Zone list_zone(server_id, zone_id, rrsets=rrsets) +> Zone list_zone(server_id, zone_id, rrsets=rrsets, rrset_name=rrset_name, rrset_type=rrset_type) zone managed by a server @@ -258,10 +257,12 @@ api_instance = powerdns_client.ZonesApi(powerdns_client.ApiClient(configuration) server_id = 'server_id_example' # str | The id of the server to retrieve zone_id = 'zone_id_example' # str | The id of the zone to retrieve rrsets = true # bool | “true” (default) or “false”, whether to include the “rrsets” in the response Zone object. (optional) (default to true) +rrset_name = 'rrset_name_example' # str | Limit output to RRsets for this name. (optional) +rrset_type = 'rrset_type_example' # str | Limit output to the RRset of this type. Can only be used together with rrset_name. (optional) try: # zone managed by a server - api_response = api_instance.list_zone(server_id, zone_id, rrsets=rrsets) + api_response = api_instance.list_zone(server_id, zone_id, rrsets=rrsets, rrset_name=rrset_name, rrset_type=rrset_type) pprint(api_response) except ApiException as e: print("Exception when calling ZonesApi->list_zone: %s\n" % e) @@ -274,6 +275,8 @@ Name | Type | Description | Notes **server_id** | **str**| The id of the server to retrieve | **zone_id** | **str**| The id of the zone to retrieve | **rrsets** | **bool**| “true” (default) or “false”, whether to include the “rrsets” in the response Zone object. | [optional] [default to true] + **rrset_name** | **str**| Limit output to RRsets for this name. | [optional] + **rrset_type** | **str**| Limit output to the RRset of this type. Can only be used together with rrset_name. | [optional] ### Return type @@ -285,7 +288,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -328,7 +331,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **server_id** | **str**| The id of the server to retrieve | - **zone** | **str**| When set to the name of a zone, only this zone is returned. If no zone with that name exists, the response is an empty array. This can e.g. be used to check if a zone exists in the database without having to guess/encode the zone's id or to check if a zone exists. | [optional] + **zone** | **str**| When set to the name of a zone, only this zone is returned. If no zone with that name exists, the response is an empty array. This can e.g. be used to check if a zone exists in the database without having to guess/encode the zone's id or to check if a zone exists. | [optional] **dnssec** | **bool**| “true” (default) or “false”, whether to include the “dnssec” and ”edited_serial” fields in the Zone objects. Setting this to ”false” will make the query a lot faster. | [optional] [default to true] ### Return type @@ -341,7 +344,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -396,13 +399,13 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **patch_zone** -> patch_zone(server_id, zone_id, zone_struct) +> patch_zone(zone_struct, server_id, zone_id) Creates/modifies/deletes RRsets present in the payload and their comments. Returns 204 No Content on success. @@ -422,13 +425,13 @@ configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = powerdns_client.ZonesApi(powerdns_client.ApiClient(configuration)) +zone_struct = powerdns_client.Zone() # Zone | The zone struct to patch with server_id = 'server_id_example' # str | The id of the server to retrieve zone_id = 'zone_id_example' # str | -zone_struct = powerdns_client.Zone() # Zone | The zone struct to patch with try: # Creates/modifies/deletes RRsets present in the payload and their comments. Returns 204 No Content on success. - api_instance.patch_zone(server_id, zone_id, zone_struct) + api_instance.patch_zone(zone_struct, server_id, zone_id) except ApiException as e: print("Exception when calling ZonesApi->patch_zone: %s\n" % e) ``` @@ -437,9 +440,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **zone_struct** | [**Zone**](Zone.md)| The zone struct to patch with | **server_id** | **str**| The id of the server to retrieve | **zone_id** | **str**| | - **zone_struct** | [**Zone**](Zone.md)| The zone struct to patch with | ### Return type @@ -457,11 +460,11 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **put_zone** -> put_zone(server_id, zone_id, zone_struct) +> put_zone(zone_struct, server_id, zone_id) -Modifies basic zone data (metadata). +Modifies basic zone data. -Allowed fields in client body: all except id, url and name. Returns 204 No Content on success. +The only fields in the zone structure which can be modified are: kind, masters, catalog, account, soa_edit, soa_edit_api, api_rectify, dnssec, and nsec3param. All other fields are ignored. ### Example ```python @@ -479,13 +482,13 @@ configuration.api_key['X-API-Key'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = powerdns_client.ZonesApi(powerdns_client.ApiClient(configuration)) +zone_struct = powerdns_client.Zone() # Zone | The zone struct to patch with server_id = 'server_id_example' # str | The id of the server to retrieve zone_id = 'zone_id_example' # str | -zone_struct = powerdns_client.Zone() # Zone | The zone struct to patch with try: - # Modifies basic zone data (metadata). - api_instance.put_zone(server_id, zone_id, zone_struct) + # Modifies basic zone data. + api_instance.put_zone(zone_struct, server_id, zone_id) except ApiException as e: print("Exception when calling ZonesApi->put_zone: %s\n" % e) ``` @@ -494,9 +497,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **zone_struct** | [**Zone**](Zone.md)| The zone struct to patch with | **server_id** | **str**| The id of the server to retrieve | **zone_id** | **str**| | - **zone_struct** | [**Zone**](Zone.md)| The zone struct to patch with | ### Return type @@ -564,7 +567,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) diff --git a/git_push.sh b/git_push.sh index b67032f..ae01b18 100644 --- a/git_push.sh +++ b/git_push.sh @@ -8,12 +8,12 @@ git_repo_id=$2 release_note=$3 if [ "$git_user_id" = "" ]; then - git_user_id="nrfta" + git_user_id="GIT_USER_ID" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then - git_repo_id="python-powerdns-client" + git_repo_id="GIT_REPO_ID" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi @@ -23,7 +23,7 @@ if [ "$release_note" = "" ]; then fi # Initialize the local directory as a Git repository - +git init # Adds the files in the local repository and stages them for commit. git add . @@ -44,7 +44,7 @@ if [ "$git_remote" = "" ]; then # git remote not defined fi - +git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" diff --git a/powerdns_client/__init__.py b/powerdns_client/__init__.py index 2d490b6..caf75f8 100644 --- a/powerdns_client/__init__.py +++ b/powerdns_client/__init__.py @@ -7,16 +7,17 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import # import apis into sdk package +from powerdns_client.api.autoprimary_api import AutoprimaryApi from powerdns_client.api.config_api import ConfigApi +from powerdns_client.api.default_api import DefaultApi from powerdns_client.api.search_api import SearchApi from powerdns_client.api.servers_api import ServersApi from powerdns_client.api.stats_api import StatsApi @@ -24,16 +25,17 @@ from powerdns_client.api.zonecryptokey_api import ZonecryptokeyApi from powerdns_client.api.zonemetadata_api import ZonemetadataApi from powerdns_client.api.zones_api import ZonesApi - # import ApiClient from powerdns_client.api_client import ApiClient from powerdns_client.configuration import Configuration # import models into sdk package +from powerdns_client.models.autoprimary import Autoprimary from powerdns_client.models.cache_flush_result import CacheFlushResult from powerdns_client.models.comment import Comment from powerdns_client.models.config_setting import ConfigSetting from powerdns_client.models.cryptokey import Cryptokey from powerdns_client.models.error import Error +from powerdns_client.models.inline_response200 import InlineResponse200 from powerdns_client.models.map_statistic_item import MapStatisticItem from powerdns_client.models.metadata import Metadata from powerdns_client.models.rr_set import RRSet diff --git a/powerdns_client/api/__init__.py b/powerdns_client/api/__init__.py index 53c8324..aeaa61b 100644 --- a/powerdns_client/api/__init__.py +++ b/powerdns_client/api/__init__.py @@ -3,7 +3,9 @@ # flake8: noqa # import apis into api package +from powerdns_client.api.autoprimary_api import AutoprimaryApi from powerdns_client.api.config_api import ConfigApi +from powerdns_client.api.default_api import DefaultApi from powerdns_client.api.search_api import SearchApi from powerdns_client.api.servers_api import ServersApi from powerdns_client.api.stats_api import StatsApi diff --git a/powerdns_client/api/autoprimary_api.py b/powerdns_client/api/autoprimary_api.py new file mode 100644 index 0000000..56b4809 --- /dev/null +++ b/powerdns_client/api/autoprimary_api.py @@ -0,0 +1,342 @@ +# coding: utf-8 + +""" + PowerDNS Authoritative HTTP API + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 0.0.15 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from powerdns_client.api_client import ApiClient + + +class AutoprimaryApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_autoprimary(self, autoprimary, server_id, **kwargs): # noqa: E501 + """Add an autoprimary # noqa: E501 + + This methods add a new autoprimary server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_autoprimary(autoprimary, server_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Autoprimary autoprimary: autoprimary entry to add (required) + :param str server_id: The id of the server to manage the list of autoprimaries on (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_autoprimary_with_http_info(autoprimary, server_id, **kwargs) # noqa: E501 + else: + (data) = self.create_autoprimary_with_http_info(autoprimary, server_id, **kwargs) # noqa: E501 + return data + + def create_autoprimary_with_http_info(self, autoprimary, server_id, **kwargs): # noqa: E501 + """Add an autoprimary # noqa: E501 + + This methods add a new autoprimary server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_autoprimary_with_http_info(autoprimary, server_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Autoprimary autoprimary: autoprimary entry to add (required) + :param str server_id: The id of the server to manage the list of autoprimaries on (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['autoprimary', 'server_id'] # 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 create_autoprimary" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'autoprimary' is set + if ('autoprimary' not in params or + params['autoprimary'] is None): + raise ValueError("Missing the required parameter `autoprimary` when calling `create_autoprimary`") # noqa: E501 + # verify the required parameter 'server_id' is set + if ('server_id' not in params or + params['server_id'] is None): + raise ValueError("Missing the required parameter `server_id` when calling `create_autoprimary`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server_id' in params: + path_params['server_id'] = params['server_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'autoprimary' in params: + body_params = params['autoprimary'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['APIKeyHeader'] # noqa: E501 + + return self.api_client.call_api( + '/servers/{server_id}/autoprimaries', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 delete_autoprimary(self, server_id, ip, nameserver, **kwargs): # noqa: E501 + """Delete the autoprimary entry # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_autoprimary(server_id, ip, nameserver, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str server_id: The id of the server to delete the autoprimary from (required) + :param str ip: IP address of autoprimary (required) + :param str nameserver: DNS name of the autoprimary (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_autoprimary_with_http_info(server_id, ip, nameserver, **kwargs) # noqa: E501 + else: + (data) = self.delete_autoprimary_with_http_info(server_id, ip, nameserver, **kwargs) # noqa: E501 + return data + + def delete_autoprimary_with_http_info(self, server_id, ip, nameserver, **kwargs): # noqa: E501 + """Delete the autoprimary entry # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_autoprimary_with_http_info(server_id, ip, nameserver, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str server_id: The id of the server to delete the autoprimary from (required) + :param str ip: IP address of autoprimary (required) + :param str nameserver: DNS name of the autoprimary (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['server_id', 'ip', 'nameserver'] # 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 delete_autoprimary" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'server_id' is set + if ('server_id' not in params or + params['server_id'] is None): + raise ValueError("Missing the required parameter `server_id` when calling `delete_autoprimary`") # noqa: E501 + # verify the required parameter 'ip' is set + if ('ip' not in params or + params['ip'] is None): + raise ValueError("Missing the required parameter `ip` when calling `delete_autoprimary`") # noqa: E501 + # verify the required parameter 'nameserver' is set + if ('nameserver' not in params or + params['nameserver'] is None): + raise ValueError("Missing the required parameter `nameserver` when calling `delete_autoprimary`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server_id' in params: + path_params['server_id'] = params['server_id'] # noqa: E501 + if 'ip' in params: + path_params['ip'] = params['ip'] # noqa: E501 + if 'nameserver' in params: + path_params['nameserver'] = params['nameserver'] # noqa: E501 + + 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['APIKeyHeader'] # noqa: E501 + + return self.api_client.call_api( + '/servers/{server_id}/autoprimaries/{ip}/{nameserver}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 get_autoprimaries(self, server_id, **kwargs): # noqa: E501 + """Get a list of autoprimaries # 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_autoprimaries(server_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str server_id: The id of the server to manage the list of autoprimaries on (required) + :return: Autoprimary + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_autoprimaries_with_http_info(server_id, **kwargs) # noqa: E501 + else: + (data) = self.get_autoprimaries_with_http_info(server_id, **kwargs) # noqa: E501 + return data + + def get_autoprimaries_with_http_info(self, server_id, **kwargs): # noqa: E501 + """Get a list of autoprimaries # 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_autoprimaries_with_http_info(server_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str server_id: The id of the server to manage the list of autoprimaries on (required) + :return: Autoprimary + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['server_id'] # 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 get_autoprimaries" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'server_id' is set + if ('server_id' not in params or + params['server_id'] is None): + raise ValueError("Missing the required parameter `server_id` when calling `get_autoprimaries`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server_id' in params: + path_params['server_id'] = params['server_id'] # noqa: E501 + + 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['APIKeyHeader'] # noqa: E501 + + return self.api_client.call_api( + '/servers/{server_id}/autoprimaries', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Autoprimary', # 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) diff --git a/powerdns_client/api/config_api.py b/powerdns_client/api/config_api.py index a85e89c..6e0acb1 100644 --- a/powerdns_client/api/config_api.py +++ b/powerdns_client/api/config_api.py @@ -5,12 +5,11 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -107,10 +106,6 @@ def get_config_with_http_info(self, server_id, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -214,10 +209,6 @@ def get_config_setting_with_http_info(self, server_id, config_setting_name, **kw header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 diff --git a/powerdns_client/api/default_api.py b/powerdns_client/api/default_api.py new file mode 100644 index 0000000..56f45fa --- /dev/null +++ b/powerdns_client/api/default_api.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + PowerDNS Authoritative HTTP API + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 0.0.15 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from powerdns_client.api_client import ApiClient + + +class DefaultApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def error(self, **kwargs): # noqa: E501 + """Will always generate an error # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.error(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.error_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.error_with_http_info(**kwargs) # noqa: E501 + return data + + def error_with_http_info(self, **kwargs): # noqa: E501 + """Will always generate an error # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + 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 error" % 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']) # noqa: E501 + + # Authentication setting + auth_settings = ['APIKeyHeader'] # noqa: E501 + + return self.api_client.call_api( + '/error', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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) diff --git a/powerdns_client/api/search_api.py b/powerdns_client/api/search_api.py index 34be65b..3547096 100644 --- a/powerdns_client/api/search_api.py +++ b/powerdns_client/api/search_api.py @@ -5,12 +5,11 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -129,10 +128,6 @@ def search_data_with_http_info(self, server_id, q, max, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 diff --git a/powerdns_client/api/servers_api.py b/powerdns_client/api/servers_api.py index 11b4849..da603e4 100644 --- a/powerdns_client/api/servers_api.py +++ b/powerdns_client/api/servers_api.py @@ -5,12 +5,11 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -115,10 +114,6 @@ def cache_flush_by_name_with_http_info(self, server_id, domain, **kwargs): # no header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -212,10 +207,6 @@ def list_server_with_http_info(self, server_id, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -301,10 +292,6 @@ def list_servers_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 diff --git a/powerdns_client/api/stats_api.py b/powerdns_client/api/stats_api.py index 865ce44..b6d9765 100644 --- a/powerdns_client/api/stats_api.py +++ b/powerdns_client/api/stats_api.py @@ -5,12 +5,11 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -46,7 +45,7 @@ def get_stats(self, server_id, **kwargs): # noqa: E501 :param str server_id: The id of the server to retrieve (required) :param str statistic: When set to the name of a specific statistic, only this value is returned. If no statistic with that name exists, the response has a 422 status and an error message. :param bool includerings: “true” (default) or “false”, whether to include the Ring items, which can contain thousands of log messages or queried domains. Setting this to ”false” may make the response a lot smaller. - :return: list[object] + :return: None If the method is called asynchronously, returns the request thread. """ @@ -70,7 +69,7 @@ def get_stats_with_http_info(self, server_id, **kwargs): # noqa: E501 :param str server_id: The id of the server to retrieve (required) :param str statistic: When set to the name of a specific statistic, only this value is returned. If no statistic with that name exists, the response has a 422 status and an error message. :param bool includerings: “true” (default) or “false”, whether to include the Ring items, which can contain thousands of log messages or queried domains. Setting this to ”false” may make the response a lot smaller. - :return: list[object] + :return: None If the method is called asynchronously, returns the request thread. """ @@ -117,10 +116,6 @@ def get_stats_with_http_info(self, server_id, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -132,7 +127,7 @@ def get_stats_with_http_info(self, server_id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='list[object]', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/powerdns_client/api/tsigkey_api.py b/powerdns_client/api/tsigkey_api.py index ed49bae..bfac860 100644 --- a/powerdns_client/api/tsigkey_api.py +++ b/powerdns_client/api/tsigkey_api.py @@ -5,12 +5,11 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -33,47 +32,47 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_tsig_key(self, server_id, tsigkey, **kwargs): # noqa: E501 + def create_tsig_key(self, tsigkey, server_id, **kwargs): # noqa: E501 """Add a TSIG key # noqa: E501 This methods add a new TSIGKey. The actual key can be generated by the server or be provided by the client # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_tsig_key(server_id, tsigkey, async_req=True) + >>> thread = api.create_tsig_key(tsigkey, server_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str server_id: The id of the server (required) :param TSIGKey tsigkey: The TSIGKey to add (required) + :param str server_id: The id of the server (required) :return: TSIGKey If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_tsig_key_with_http_info(server_id, tsigkey, **kwargs) # noqa: E501 + return self.create_tsig_key_with_http_info(tsigkey, server_id, **kwargs) # noqa: E501 else: - (data) = self.create_tsig_key_with_http_info(server_id, tsigkey, **kwargs) # noqa: E501 + (data) = self.create_tsig_key_with_http_info(tsigkey, server_id, **kwargs) # noqa: E501 return data - def create_tsig_key_with_http_info(self, server_id, tsigkey, **kwargs): # noqa: E501 + def create_tsig_key_with_http_info(self, tsigkey, server_id, **kwargs): # noqa: E501 """Add a TSIG key # noqa: E501 This methods add a new TSIGKey. The actual key can be generated by the server or be provided by the client # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_tsig_key_with_http_info(server_id, tsigkey, async_req=True) + >>> thread = api.create_tsig_key_with_http_info(tsigkey, server_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str server_id: The id of the server (required) :param TSIGKey tsigkey: The TSIGKey to add (required) + :param str server_id: The id of the server (required) :return: TSIGKey If the method is called asynchronously, returns the request thread. """ - all_params = ['server_id', 'tsigkey'] # noqa: E501 + all_params = ['tsigkey', 'server_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -88,14 +87,14 @@ def create_tsig_key_with_http_info(self, server_id, tsigkey, **kwargs): # noqa: ) params[key] = val del params['kwargs'] - # verify the required parameter 'server_id' is set - if ('server_id' not in params or - params['server_id'] is None): - raise ValueError("Missing the required parameter `server_id` when calling `create_tsig_key`") # noqa: E501 # verify the required parameter 'tsigkey' is set if ('tsigkey' not in params or params['tsigkey'] is None): raise ValueError("Missing the required parameter `tsigkey` when calling `create_tsig_key`") # noqa: E501 + # verify the required parameter 'server_id' is set + if ('server_id' not in params or + params['server_id'] is None): + raise ValueError("Missing the required parameter `server_id` when calling `create_tsig_key`") # noqa: E501 collection_formats = {} @@ -222,10 +221,6 @@ def delete_tsig_key_with_http_info(self, server_id, tsigkey_id, **kwargs): # no header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -327,10 +322,6 @@ def get_tsig_key_with_http_info(self, server_id, tsigkey_id, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -424,10 +415,6 @@ def list_tsig_keys_with_http_info(self, server_id, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -447,49 +434,49 @@ def list_tsig_keys_with_http_info(self, server_id, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def put_tsig_key(self, server_id, tsigkey_id, tsigkey, **kwargs): # noqa: E501 + def put_tsig_key(self, tsigkey, server_id, tsigkey_id, **kwargs): # noqa: E501 """put_tsig_key # noqa: E501 The TSIGKey at tsigkey_id can be changed in multiple ways: * Changing the Name, this will remove the key with tsigkey_id after adding. * Changing the Algorithm * Changing the Key Only the relevant fields have to be provided in the request body. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_tsig_key(server_id, tsigkey_id, tsigkey, async_req=True) + >>> thread = api.put_tsig_key(tsigkey, server_id, tsigkey_id, async_req=True) >>> result = thread.get() :param async_req bool + :param TSIGKey tsigkey: A (possibly stripped down) TSIGKey object with the new values (required) :param str server_id: The id of the server to retrieve the key from (required) :param str tsigkey_id: The id of the TSIGkey. Should match the \"id\" field in the TSIGKey object (required) - :param TSIGKey tsigkey: A (possibly stripped down) TSIGKey object with the new values (required) :return: TSIGKey If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.put_tsig_key_with_http_info(server_id, tsigkey_id, tsigkey, **kwargs) # noqa: E501 + return self.put_tsig_key_with_http_info(tsigkey, server_id, tsigkey_id, **kwargs) # noqa: E501 else: - (data) = self.put_tsig_key_with_http_info(server_id, tsigkey_id, tsigkey, **kwargs) # noqa: E501 + (data) = self.put_tsig_key_with_http_info(tsigkey, server_id, tsigkey_id, **kwargs) # noqa: E501 return data - def put_tsig_key_with_http_info(self, server_id, tsigkey_id, tsigkey, **kwargs): # noqa: E501 + def put_tsig_key_with_http_info(self, tsigkey, server_id, tsigkey_id, **kwargs): # noqa: E501 """put_tsig_key # noqa: E501 The TSIGKey at tsigkey_id can be changed in multiple ways: * Changing the Name, this will remove the key with tsigkey_id after adding. * Changing the Algorithm * Changing the Key Only the relevant fields have to be provided in the request body. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_tsig_key_with_http_info(server_id, tsigkey_id, tsigkey, async_req=True) + >>> thread = api.put_tsig_key_with_http_info(tsigkey, server_id, tsigkey_id, async_req=True) >>> result = thread.get() :param async_req bool + :param TSIGKey tsigkey: A (possibly stripped down) TSIGKey object with the new values (required) :param str server_id: The id of the server to retrieve the key from (required) :param str tsigkey_id: The id of the TSIGkey. Should match the \"id\" field in the TSIGKey object (required) - :param TSIGKey tsigkey: A (possibly stripped down) TSIGKey object with the new values (required) :return: TSIGKey If the method is called asynchronously, returns the request thread. """ - all_params = ['server_id', 'tsigkey_id', 'tsigkey'] # noqa: E501 + all_params = ['tsigkey', 'server_id', 'tsigkey_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -504,6 +491,10 @@ def put_tsig_key_with_http_info(self, server_id, tsigkey_id, tsigkey, **kwargs): ) params[key] = val del params['kwargs'] + # verify the required parameter 'tsigkey' is set + if ('tsigkey' not in params or + params['tsigkey'] is None): + raise ValueError("Missing the required parameter `tsigkey` when calling `put_tsig_key`") # noqa: E501 # verify the required parameter 'server_id' is set if ('server_id' not in params or params['server_id'] is None): @@ -512,10 +503,6 @@ def put_tsig_key_with_http_info(self, server_id, tsigkey_id, tsigkey, **kwargs): if ('tsigkey_id' not in params or params['tsigkey_id'] is None): raise ValueError("Missing the required parameter `tsigkey_id` when calling `put_tsig_key`") # noqa: E501 - # verify the required parameter 'tsigkey' is set - if ('tsigkey' not in params or - params['tsigkey'] is None): - raise ValueError("Missing the required parameter `tsigkey` when calling `put_tsig_key`") # noqa: E501 collection_formats = {} diff --git a/powerdns_client/api/zonecryptokey_api.py b/powerdns_client/api/zonecryptokey_api.py index fb4f0a9..c729d74 100644 --- a/powerdns_client/api/zonecryptokey_api.py +++ b/powerdns_client/api/zonecryptokey_api.py @@ -5,12 +5,11 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -33,49 +32,49 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_cryptokey(self, server_id, zone_id, cryptokey, **kwargs): # noqa: E501 + def create_cryptokey(self, cryptokey, server_id, zone_id, **kwargs): # noqa: E501 """Creates a Cryptokey # noqa: E501 This method adds a new key to a zone. The key can either be generated or imported by supplying the content parameter. if content, bits and algo are null, a key will be generated based on the default-ksk-algorithm and default-ksk-size settings for a KSK and the default-zsk-algorithm and default-zsk-size options for a ZSK. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_cryptokey(server_id, zone_id, cryptokey, async_req=True) + >>> thread = api.create_cryptokey(cryptokey, server_id, zone_id, async_req=True) >>> result = thread.get() :param async_req bool + :param Cryptokey cryptokey: Add a Cryptokey (required) :param str server_id: The id of the server to retrieve (required) :param str zone_id: (required) - :param Cryptokey cryptokey: Add a Cryptokey (required) :return: Cryptokey If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_cryptokey_with_http_info(server_id, zone_id, cryptokey, **kwargs) # noqa: E501 + return self.create_cryptokey_with_http_info(cryptokey, server_id, zone_id, **kwargs) # noqa: E501 else: - (data) = self.create_cryptokey_with_http_info(server_id, zone_id, cryptokey, **kwargs) # noqa: E501 + (data) = self.create_cryptokey_with_http_info(cryptokey, server_id, zone_id, **kwargs) # noqa: E501 return data - def create_cryptokey_with_http_info(self, server_id, zone_id, cryptokey, **kwargs): # noqa: E501 + def create_cryptokey_with_http_info(self, cryptokey, server_id, zone_id, **kwargs): # noqa: E501 """Creates a Cryptokey # noqa: E501 This method adds a new key to a zone. The key can either be generated or imported by supplying the content parameter. if content, bits and algo are null, a key will be generated based on the default-ksk-algorithm and default-ksk-size settings for a KSK and the default-zsk-algorithm and default-zsk-size options for a ZSK. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_cryptokey_with_http_info(server_id, zone_id, cryptokey, async_req=True) + >>> thread = api.create_cryptokey_with_http_info(cryptokey, server_id, zone_id, async_req=True) >>> result = thread.get() :param async_req bool + :param Cryptokey cryptokey: Add a Cryptokey (required) :param str server_id: The id of the server to retrieve (required) :param str zone_id: (required) - :param Cryptokey cryptokey: Add a Cryptokey (required) :return: Cryptokey If the method is called asynchronously, returns the request thread. """ - all_params = ['server_id', 'zone_id', 'cryptokey'] # noqa: E501 + all_params = ['cryptokey', 'server_id', 'zone_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -90,6 +89,10 @@ def create_cryptokey_with_http_info(self, server_id, zone_id, cryptokey, **kwarg ) params[key] = val del params['kwargs'] + # verify the required parameter 'cryptokey' is set + if ('cryptokey' not in params or + params['cryptokey'] is None): + raise ValueError("Missing the required parameter `cryptokey` when calling `create_cryptokey`") # noqa: E501 # verify the required parameter 'server_id' is set if ('server_id' not in params or params['server_id'] is None): @@ -98,10 +101,6 @@ def create_cryptokey_with_http_info(self, server_id, zone_id, cryptokey, **kwarg if ('zone_id' not in params or params['zone_id'] is None): raise ValueError("Missing the required parameter `zone_id` when calling `create_cryptokey`") # noqa: E501 - # verify the required parameter 'cryptokey' is set - if ('cryptokey' not in params or - params['cryptokey'] is None): - raise ValueError("Missing the required parameter `cryptokey` when calling `create_cryptokey`") # noqa: E501 collection_formats = {} @@ -238,10 +237,6 @@ def delete_cryptokey_with_http_info(self, server_id, zone_id, cryptokey_id, **kw header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -351,10 +346,6 @@ def get_cryptokey_with_http_info(self, server_id, zone_id, cryptokey_id, **kwarg header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -456,10 +447,6 @@ def list_cryptokeys_with_http_info(self, server_id, zone_id, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -479,49 +466,49 @@ def list_cryptokeys_with_http_info(self, server_id, zone_id, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def modify_cryptokey(self, server_id, zone_id, cryptokey_id, cryptokey, **kwargs): # noqa: E501 + def modify_cryptokey(self, cryptokey, server_id, zone_id, cryptokey_id, **kwargs): # noqa: E501 """This method (de)activates a key from zone_name specified by cryptokey_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.modify_cryptokey(server_id, zone_id, cryptokey_id, cryptokey, async_req=True) + >>> thread = api.modify_cryptokey(cryptokey, server_id, zone_id, cryptokey_id, async_req=True) >>> result = thread.get() :param async_req bool + :param Cryptokey cryptokey: the Cryptokey (required) :param str server_id: The id of the server to retrieve (required) :param str zone_id: (required) :param str cryptokey_id: Cryptokey to manipulate (required) - :param Cryptokey cryptokey: the Cryptokey (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.modify_cryptokey_with_http_info(server_id, zone_id, cryptokey_id, cryptokey, **kwargs) # noqa: E501 + return self.modify_cryptokey_with_http_info(cryptokey, server_id, zone_id, cryptokey_id, **kwargs) # noqa: E501 else: - (data) = self.modify_cryptokey_with_http_info(server_id, zone_id, cryptokey_id, cryptokey, **kwargs) # noqa: E501 + (data) = self.modify_cryptokey_with_http_info(cryptokey, server_id, zone_id, cryptokey_id, **kwargs) # noqa: E501 return data - def modify_cryptokey_with_http_info(self, server_id, zone_id, cryptokey_id, cryptokey, **kwargs): # noqa: E501 + def modify_cryptokey_with_http_info(self, cryptokey, server_id, zone_id, cryptokey_id, **kwargs): # noqa: E501 """This method (de)activates a key from zone_name specified by cryptokey_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.modify_cryptokey_with_http_info(server_id, zone_id, cryptokey_id, cryptokey, async_req=True) + >>> thread = api.modify_cryptokey_with_http_info(cryptokey, server_id, zone_id, cryptokey_id, async_req=True) >>> result = thread.get() :param async_req bool + :param Cryptokey cryptokey: the Cryptokey (required) :param str server_id: The id of the server to retrieve (required) :param str zone_id: (required) :param str cryptokey_id: Cryptokey to manipulate (required) - :param Cryptokey cryptokey: the Cryptokey (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['server_id', 'zone_id', 'cryptokey_id', 'cryptokey'] # noqa: E501 + all_params = ['cryptokey', 'server_id', 'zone_id', 'cryptokey_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -536,6 +523,10 @@ def modify_cryptokey_with_http_info(self, server_id, zone_id, cryptokey_id, cryp ) params[key] = val del params['kwargs'] + # verify the required parameter 'cryptokey' is set + if ('cryptokey' not in params or + params['cryptokey'] is None): + raise ValueError("Missing the required parameter `cryptokey` when calling `modify_cryptokey`") # noqa: E501 # verify the required parameter 'server_id' is set if ('server_id' not in params or params['server_id'] is None): @@ -548,10 +539,6 @@ def modify_cryptokey_with_http_info(self, server_id, zone_id, cryptokey_id, cryp if ('cryptokey_id' not in params or params['cryptokey_id'] is None): raise ValueError("Missing the required parameter `cryptokey_id` when calling `modify_cryptokey`") # noqa: E501 - # verify the required parameter 'cryptokey' is set - if ('cryptokey' not in params or - params['cryptokey'] is None): - raise ValueError("Missing the required parameter `cryptokey` when calling `modify_cryptokey`") # noqa: E501 collection_formats = {} diff --git a/powerdns_client/api/zonemetadata_api.py b/powerdns_client/api/zonemetadata_api.py index dcf7cd9..e247bf5 100644 --- a/powerdns_client/api/zonemetadata_api.py +++ b/powerdns_client/api/zonemetadata_api.py @@ -5,12 +5,11 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -33,49 +32,49 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_metadata(self, server_id, zone_id, metadata, **kwargs): # noqa: E501 + def create_metadata(self, metadata, server_id, zone_id, **kwargs): # noqa: E501 """Creates a set of metadata entries # noqa: E501 Creates a set of metadata entries of given kind for the zone. Existing metadata entries for the zone with the same kind are not overwritten. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_metadata(server_id, zone_id, metadata, async_req=True) + >>> thread = api.create_metadata(metadata, server_id, zone_id, async_req=True) >>> result = thread.get() :param async_req bool + :param Metadata metadata: Metadata object with list of values to create (required) :param str server_id: The id of the server to retrieve (required) :param str zone_id: (required) - :param Metadata metadata: Metadata object with list of values to create (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_metadata_with_http_info(server_id, zone_id, metadata, **kwargs) # noqa: E501 + return self.create_metadata_with_http_info(metadata, server_id, zone_id, **kwargs) # noqa: E501 else: - (data) = self.create_metadata_with_http_info(server_id, zone_id, metadata, **kwargs) # noqa: E501 + (data) = self.create_metadata_with_http_info(metadata, server_id, zone_id, **kwargs) # noqa: E501 return data - def create_metadata_with_http_info(self, server_id, zone_id, metadata, **kwargs): # noqa: E501 + def create_metadata_with_http_info(self, metadata, server_id, zone_id, **kwargs): # noqa: E501 """Creates a set of metadata entries # noqa: E501 Creates a set of metadata entries of given kind for the zone. Existing metadata entries for the zone with the same kind are not overwritten. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_metadata_with_http_info(server_id, zone_id, metadata, async_req=True) + >>> thread = api.create_metadata_with_http_info(metadata, server_id, zone_id, async_req=True) >>> result = thread.get() :param async_req bool + :param Metadata metadata: Metadata object with list of values to create (required) :param str server_id: The id of the server to retrieve (required) :param str zone_id: (required) - :param Metadata metadata: Metadata object with list of values to create (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['server_id', 'zone_id', 'metadata'] # noqa: E501 + all_params = ['metadata', 'server_id', 'zone_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -90,6 +89,10 @@ def create_metadata_with_http_info(self, server_id, zone_id, metadata, **kwargs) ) params[key] = val del params['kwargs'] + # verify the required parameter 'metadata' is set + if ('metadata' not in params or + params['metadata'] is None): + raise ValueError("Missing the required parameter `metadata` when calling `create_metadata`") # noqa: E501 # verify the required parameter 'server_id' is set if ('server_id' not in params or params['server_id'] is None): @@ -98,10 +101,6 @@ def create_metadata_with_http_info(self, server_id, zone_id, metadata, **kwargs) if ('zone_id' not in params or params['zone_id'] is None): raise ValueError("Missing the required parameter `zone_id` when calling `create_metadata`") # noqa: E501 - # verify the required parameter 'metadata' is set - if ('metadata' not in params or - params['metadata'] is None): - raise ValueError("Missing the required parameter `metadata` when calling `create_metadata`") # noqa: E501 collection_formats = {} @@ -238,10 +237,6 @@ def delete_metadata_with_http_info(self, server_id, zone_id, metadata_kind, **kw header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -351,10 +346,6 @@ def get_metadata_with_http_info(self, server_id, zone_id, metadata_kind, **kwarg header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -456,10 +447,6 @@ def list_metadata_with_http_info(self, server_id, zone_id, **kwargs): # noqa: E header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -479,51 +466,51 @@ def list_metadata_with_http_info(self, server_id, zone_id, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def modify_metadata(self, server_id, zone_id, metadata_kind, metadata, **kwargs): # noqa: E501 + def modify_metadata(self, metadata, server_id, zone_id, metadata_kind, **kwargs): # noqa: E501 """Replace the content of a single kind of domain metadata. # noqa: E501 Creates a set of metadata entries of given kind for the zone. Existing metadata entries for the zone with the same kind are removed. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.modify_metadata(server_id, zone_id, metadata_kind, metadata, async_req=True) + >>> thread = api.modify_metadata(metadata, server_id, zone_id, metadata_kind, async_req=True) >>> result = thread.get() :param async_req bool + :param Metadata metadata: metadata to add/create (required) :param str server_id: The id of the server to retrieve (required) :param str zone_id: (required) :param str metadata_kind: The kind of metadata (required) - :param Metadata metadata: metadata to add/create (required) :return: Metadata If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.modify_metadata_with_http_info(server_id, zone_id, metadata_kind, metadata, **kwargs) # noqa: E501 + return self.modify_metadata_with_http_info(metadata, server_id, zone_id, metadata_kind, **kwargs) # noqa: E501 else: - (data) = self.modify_metadata_with_http_info(server_id, zone_id, metadata_kind, metadata, **kwargs) # noqa: E501 + (data) = self.modify_metadata_with_http_info(metadata, server_id, zone_id, metadata_kind, **kwargs) # noqa: E501 return data - def modify_metadata_with_http_info(self, server_id, zone_id, metadata_kind, metadata, **kwargs): # noqa: E501 + def modify_metadata_with_http_info(self, metadata, server_id, zone_id, metadata_kind, **kwargs): # noqa: E501 """Replace the content of a single kind of domain metadata. # noqa: E501 Creates a set of metadata entries of given kind for the zone. Existing metadata entries for the zone with the same kind are removed. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.modify_metadata_with_http_info(server_id, zone_id, metadata_kind, metadata, async_req=True) + >>> thread = api.modify_metadata_with_http_info(metadata, server_id, zone_id, metadata_kind, async_req=True) >>> result = thread.get() :param async_req bool + :param Metadata metadata: metadata to add/create (required) :param str server_id: The id of the server to retrieve (required) :param str zone_id: (required) :param str metadata_kind: The kind of metadata (required) - :param Metadata metadata: metadata to add/create (required) :return: Metadata If the method is called asynchronously, returns the request thread. """ - all_params = ['server_id', 'zone_id', 'metadata_kind', 'metadata'] # noqa: E501 + all_params = ['metadata', 'server_id', 'zone_id', 'metadata_kind'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -538,6 +525,10 @@ def modify_metadata_with_http_info(self, server_id, zone_id, metadata_kind, meta ) params[key] = val del params['kwargs'] + # verify the required parameter 'metadata' is set + if ('metadata' not in params or + params['metadata'] is None): + raise ValueError("Missing the required parameter `metadata` when calling `modify_metadata`") # noqa: E501 # verify the required parameter 'server_id' is set if ('server_id' not in params or params['server_id'] is None): @@ -550,10 +541,6 @@ def modify_metadata_with_http_info(self, server_id, zone_id, metadata_kind, meta if ('metadata_kind' not in params or params['metadata_kind'] is None): raise ValueError("Missing the required parameter `metadata_kind` when calling `modify_metadata`") # noqa: E501 - # verify the required parameter 'metadata' is set - if ('metadata' not in params or - params['metadata'] is None): - raise ValueError("Missing the required parameter `metadata` when calling `modify_metadata`") # noqa: E501 collection_formats = {} diff --git a/powerdns_client/api/zones_api.py b/powerdns_client/api/zones_api.py index a5af8f4..65b0df9 100644 --- a/powerdns_client/api/zones_api.py +++ b/powerdns_client/api/zones_api.py @@ -5,12 +5,11 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -44,7 +43,7 @@ def axfr_export_zone(self, server_id, zone_id, **kwargs): # noqa: E501 :param async_req bool :param str server_id: The id of the server to retrieve (required) :param str zone_id: The id of the zone to retrieve (required) - :return: str + :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ @@ -66,7 +65,7 @@ def axfr_export_zone_with_http_info(self, server_id, zone_id, **kwargs): # noqa :param async_req bool :param str server_id: The id of the server to retrieve (required) :param str zone_id: The id of the zone to retrieve (required) - :return: str + :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ @@ -115,10 +114,6 @@ def axfr_export_zone_with_http_info(self, server_id, zone_id, **kwargs): # noqa header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -130,7 +125,7 @@ def axfr_export_zone_with_http_info(self, server_id, zone_id, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type='InlineResponse200', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -222,10 +217,6 @@ def axfr_retrieve_zone_with_http_info(self, server_id, zone_id, **kwargs): # no header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -245,17 +236,17 @@ def axfr_retrieve_zone_with_http_info(self, server_id, zone_id, **kwargs): # no _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def create_zone(self, server_id, zone_struct, **kwargs): # noqa: E501 + def create_zone(self, zone_struct, server_id, **kwargs): # noqa: E501 """Creates a new domain, returns the Zone on creation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_zone(server_id, zone_struct, async_req=True) + >>> thread = api.create_zone(zone_struct, server_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str server_id: The id of the server to retrieve (required) :param Zone zone_struct: The zone struct to patch with (required) + :param str server_id: The id of the server to retrieve (required) :param bool rrsets: “true” (default) or “false”, whether to include the “rrsets” in the response Zone object. :return: Zone If the method is called asynchronously, @@ -263,29 +254,29 @@ def create_zone(self, server_id, zone_struct, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_zone_with_http_info(server_id, zone_struct, **kwargs) # noqa: E501 + return self.create_zone_with_http_info(zone_struct, server_id, **kwargs) # noqa: E501 else: - (data) = self.create_zone_with_http_info(server_id, zone_struct, **kwargs) # noqa: E501 + (data) = self.create_zone_with_http_info(zone_struct, server_id, **kwargs) # noqa: E501 return data - def create_zone_with_http_info(self, server_id, zone_struct, **kwargs): # noqa: E501 + def create_zone_with_http_info(self, zone_struct, server_id, **kwargs): # noqa: E501 """Creates a new domain, returns the Zone on creation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_zone_with_http_info(server_id, zone_struct, async_req=True) + >>> thread = api.create_zone_with_http_info(zone_struct, server_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str server_id: The id of the server to retrieve (required) :param Zone zone_struct: The zone struct to patch with (required) + :param str server_id: The id of the server to retrieve (required) :param bool rrsets: “true” (default) or “false”, whether to include the “rrsets” in the response Zone object. :return: Zone If the method is called asynchronously, returns the request thread. """ - all_params = ['server_id', 'zone_struct', 'rrsets'] # noqa: E501 + all_params = ['zone_struct', 'server_id', 'rrsets'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -300,14 +291,14 @@ def create_zone_with_http_info(self, server_id, zone_struct, **kwargs): # noqa: ) params[key] = val del params['kwargs'] - # verify the required parameter 'server_id' is set - if ('server_id' not in params or - params['server_id'] is None): - raise ValueError("Missing the required parameter `server_id` when calling `create_zone`") # noqa: E501 # verify the required parameter 'zone_struct' is set if ('zone_struct' not in params or params['zone_struct'] is None): raise ValueError("Missing the required parameter `zone_struct` when calling `create_zone`") # noqa: E501 + # verify the required parameter 'server_id' is set + if ('server_id' not in params or + params['server_id'] is None): + raise ValueError("Missing the required parameter `server_id` when calling `create_zone`") # noqa: E501 collection_formats = {} @@ -436,10 +427,6 @@ def delete_zone_with_http_info(self, server_id, zone_id, **kwargs): # noqa: E50 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -471,6 +458,8 @@ def list_zone(self, server_id, zone_id, **kwargs): # noqa: E501 :param str server_id: The id of the server to retrieve (required) :param str zone_id: The id of the zone to retrieve (required) :param bool rrsets: “true” (default) or “false”, whether to include the “rrsets” in the response Zone object. + :param str rrset_name: Limit output to RRsets for this name. + :param str rrset_type: Limit output to the RRset of this type. Can only be used together with rrset_name. :return: Zone If the method is called asynchronously, returns the request thread. @@ -494,12 +483,14 @@ def list_zone_with_http_info(self, server_id, zone_id, **kwargs): # noqa: E501 :param str server_id: The id of the server to retrieve (required) :param str zone_id: The id of the zone to retrieve (required) :param bool rrsets: “true” (default) or “false”, whether to include the “rrsets” in the response Zone object. + :param str rrset_name: Limit output to RRsets for this name. + :param str rrset_type: Limit output to the RRset of this type. Can only be used together with rrset_name. :return: Zone If the method is called asynchronously, returns the request thread. """ - all_params = ['server_id', 'zone_id', 'rrsets'] # noqa: E501 + all_params = ['server_id', 'zone_id', 'rrsets', 'rrset_name', 'rrset_type'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -534,6 +525,10 @@ def list_zone_with_http_info(self, server_id, zone_id, **kwargs): # noqa: E501 query_params = [] if 'rrsets' in params: query_params.append(('rrsets', params['rrsets'])) # noqa: E501 + if 'rrset_name' in params: + query_params.append(('rrset_name', params['rrset_name'])) # noqa: E501 + if 'rrset_type' in params: + query_params.append(('rrset_type', params['rrset_type'])) # noqa: E501 header_params = {} @@ -545,10 +540,6 @@ def list_zone_with_http_info(self, server_id, zone_id, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -650,10 +641,6 @@ def list_zones_with_http_info(self, server_id, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -757,10 +744,6 @@ def notify_zone_with_http_info(self, server_id, zone_id, **kwargs): # noqa: E50 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 @@ -780,47 +763,47 @@ def notify_zone_with_http_info(self, server_id, zone_id, **kwargs): # noqa: E50 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def patch_zone(self, server_id, zone_id, zone_struct, **kwargs): # noqa: E501 + def patch_zone(self, zone_struct, server_id, zone_id, **kwargs): # noqa: E501 """Creates/modifies/deletes RRsets present in the payload and their comments. Returns 204 No Content on success. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_zone(server_id, zone_id, zone_struct, async_req=True) + >>> thread = api.patch_zone(zone_struct, server_id, zone_id, async_req=True) >>> result = thread.get() :param async_req bool + :param Zone zone_struct: The zone struct to patch with (required) :param str server_id: The id of the server to retrieve (required) :param str zone_id: (required) - :param Zone zone_struct: The zone struct to patch with (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.patch_zone_with_http_info(server_id, zone_id, zone_struct, **kwargs) # noqa: E501 + return self.patch_zone_with_http_info(zone_struct, server_id, zone_id, **kwargs) # noqa: E501 else: - (data) = self.patch_zone_with_http_info(server_id, zone_id, zone_struct, **kwargs) # noqa: E501 + (data) = self.patch_zone_with_http_info(zone_struct, server_id, zone_id, **kwargs) # noqa: E501 return data - def patch_zone_with_http_info(self, server_id, zone_id, zone_struct, **kwargs): # noqa: E501 + def patch_zone_with_http_info(self, zone_struct, server_id, zone_id, **kwargs): # noqa: E501 """Creates/modifies/deletes RRsets present in the payload and their comments. Returns 204 No Content on success. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_zone_with_http_info(server_id, zone_id, zone_struct, async_req=True) + >>> thread = api.patch_zone_with_http_info(zone_struct, server_id, zone_id, async_req=True) >>> result = thread.get() :param async_req bool + :param Zone zone_struct: The zone struct to patch with (required) :param str server_id: The id of the server to retrieve (required) :param str zone_id: (required) - :param Zone zone_struct: The zone struct to patch with (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['server_id', 'zone_id', 'zone_struct'] # noqa: E501 + all_params = ['zone_struct', 'server_id', 'zone_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -835,6 +818,10 @@ def patch_zone_with_http_info(self, server_id, zone_id, zone_struct, **kwargs): ) params[key] = val del params['kwargs'] + # verify the required parameter 'zone_struct' is set + if ('zone_struct' not in params or + params['zone_struct'] is None): + raise ValueError("Missing the required parameter `zone_struct` when calling `patch_zone`") # noqa: E501 # verify the required parameter 'server_id' is set if ('server_id' not in params or params['server_id'] is None): @@ -843,10 +830,6 @@ def patch_zone_with_http_info(self, server_id, zone_id, zone_struct, **kwargs): if ('zone_id' not in params or params['zone_id'] is None): raise ValueError("Missing the required parameter `zone_id` when calling `patch_zone`") # noqa: E501 - # verify the required parameter 'zone_struct' is set - if ('zone_struct' not in params or - params['zone_struct'] is None): - raise ValueError("Missing the required parameter `zone_struct` when calling `patch_zone`") # noqa: E501 collection_formats = {} @@ -893,49 +876,49 @@ def patch_zone_with_http_info(self, server_id, zone_id, zone_struct, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def put_zone(self, server_id, zone_id, zone_struct, **kwargs): # noqa: E501 - """Modifies basic zone data (metadata). # noqa: E501 + def put_zone(self, zone_struct, server_id, zone_id, **kwargs): # noqa: E501 + """Modifies basic zone data. # noqa: E501 - Allowed fields in client body: all except id, url and name. Returns 204 No Content on success. # noqa: E501 + The only fields in the zone structure which can be modified are: kind, masters, catalog, account, soa_edit, soa_edit_api, api_rectify, dnssec, and nsec3param. All other fields are ignored. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_zone(server_id, zone_id, zone_struct, async_req=True) + >>> thread = api.put_zone(zone_struct, server_id, zone_id, async_req=True) >>> result = thread.get() :param async_req bool + :param Zone zone_struct: The zone struct to patch with (required) :param str server_id: The id of the server to retrieve (required) :param str zone_id: (required) - :param Zone zone_struct: The zone struct to patch with (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.put_zone_with_http_info(server_id, zone_id, zone_struct, **kwargs) # noqa: E501 + return self.put_zone_with_http_info(zone_struct, server_id, zone_id, **kwargs) # noqa: E501 else: - (data) = self.put_zone_with_http_info(server_id, zone_id, zone_struct, **kwargs) # noqa: E501 + (data) = self.put_zone_with_http_info(zone_struct, server_id, zone_id, **kwargs) # noqa: E501 return data - def put_zone_with_http_info(self, server_id, zone_id, zone_struct, **kwargs): # noqa: E501 - """Modifies basic zone data (metadata). # noqa: E501 + def put_zone_with_http_info(self, zone_struct, server_id, zone_id, **kwargs): # noqa: E501 + """Modifies basic zone data. # noqa: E501 - Allowed fields in client body: all except id, url and name. Returns 204 No Content on success. # noqa: E501 + The only fields in the zone structure which can be modified are: kind, masters, catalog, account, soa_edit, soa_edit_api, api_rectify, dnssec, and nsec3param. All other fields are ignored. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_zone_with_http_info(server_id, zone_id, zone_struct, async_req=True) + >>> thread = api.put_zone_with_http_info(zone_struct, server_id, zone_id, async_req=True) >>> result = thread.get() :param async_req bool + :param Zone zone_struct: The zone struct to patch with (required) :param str server_id: The id of the server to retrieve (required) :param str zone_id: (required) - :param Zone zone_struct: The zone struct to patch with (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['server_id', 'zone_id', 'zone_struct'] # noqa: E501 + all_params = ['zone_struct', 'server_id', 'zone_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -950,6 +933,10 @@ def put_zone_with_http_info(self, server_id, zone_id, zone_struct, **kwargs): # ) params[key] = val del params['kwargs'] + # verify the required parameter 'zone_struct' is set + if ('zone_struct' not in params or + params['zone_struct'] is None): + raise ValueError("Missing the required parameter `zone_struct` when calling `put_zone`") # noqa: E501 # verify the required parameter 'server_id' is set if ('server_id' not in params or params['server_id'] is None): @@ -958,10 +945,6 @@ def put_zone_with_http_info(self, server_id, zone_id, zone_struct, **kwargs): # if ('zone_id' not in params or params['zone_id'] is None): raise ValueError("Missing the required parameter `zone_id` when calling `put_zone`") # noqa: E501 - # verify the required parameter 'zone_struct' is set - if ('zone_struct' not in params or - params['zone_struct'] is None): - raise ValueError("Missing the required parameter `zone_struct` when calling `put_zone`") # noqa: E501 collection_formats = {} @@ -1092,10 +1075,6 @@ def rectify_zone_with_http_info(self, server_id, zone_id, **kwargs): # noqa: E5 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['APIKeyHeader'] # noqa: E501 diff --git a/powerdns_client/api_client.py b/powerdns_client/api_client.py index 2f9748a..e155716 100644 --- a/powerdns_client/api_client.py +++ b/powerdns_client/api_client.py @@ -4,11 +4,10 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import datetime @@ -66,26 +65,18 @@ def __init__(self, configuration=None, header_name=None, header_value=None, configuration = Configuration() self.configuration = configuration - # Use the pool property to lazily initialize the ThreadPool. - self._pool = None + self.pool = ThreadPool() self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.4/python' + self.user_agent = 'Swagger-Codegen/1.0.5/python' def __del__(self): - if self._pool is not None: - self._pool.close() - self._pool.join() - - @property - def pool(self): - if self._pool is None: - self._pool = ThreadPool() - return self._pool + self.pool.close() + self.pool.join() @property def user_agent(self): @@ -532,10 +523,14 @@ def __deserialize_file(self, response): filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition).group(1) path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - + response_data = response.data + with open(path, "wb") as f: + if isinstance(response_data, str): + # change str to bytes so we can write it + response_data = response_data.encode('utf-8') + f.write(response_data) + else: + f.write(response_data) return path def __deserialize_primitive(self, data, klass): @@ -600,7 +595,7 @@ def __deserialize_datatime(self, string): ) def __hasattr(self, object, name): - return name in object.__class__.__dict__ + return name in object.__class__.__dict__ def __deserialize_model(self, data, klass): """Deserializes list or dict to model. @@ -610,8 +605,7 @@ def __deserialize_model(self, data, klass): :return: model object. """ - if (not klass.swagger_types and - not self.__hasattr(klass, 'get_real_child_model')): + if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): return data kwargs = {} diff --git a/powerdns_client/configuration.py b/powerdns_client/configuration.py index 20612b7..24ff574 100644 --- a/powerdns_client/configuration.py +++ b/powerdns_client/configuration.py @@ -5,12 +5,11 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import copy @@ -23,24 +22,31 @@ from six.moves import http_client as httplib -class Configuration(object): +class TypeWithDefault(type): + def __init__(cls, name, bases, dct): + super(TypeWithDefault, cls).__init__(name, bases, dct) + cls._default = None + + def __call__(cls): + if cls._default is None: + cls._default = type.__call__(cls) + return copy.copy(cls._default) + + def set_default(cls, default): + cls._default = copy.copy(default) + + +class Configuration(six.with_metaclass(TypeWithDefault, object)): """NOTE: This class is auto generated by the swagger code generator program. Ref: https://github.com/swagger-api/swagger-codegen Do not edit the class manually. """ - _default = None - def __init__(self): """Constructor""" - if self._default: - for key in self._default.__dict__.keys(): - self.__dict__[key] = copy.copy(self._default.__dict__[key]) - return - # Default Base url - self.host = "https://localhost/api/v1" + self.host = "/api/v1" # Temp file folder for downloading files self.temp_folder_path = None @@ -55,7 +61,6 @@ def __init__(self): self.username = "" # Password for HTTP basic authentication self.password = "" - # Logging Settings self.logger = {} self.logger["package_logger"] = logging.getLogger("powerdns_client") @@ -96,10 +101,6 @@ def __init__(self): # Safe chars for path_param self.safe_chars_for_path_param = '' - @classmethod - def set_default(cls, default): - cls._default = default - @property def logger_file(self): """The logger file. @@ -202,10 +203,9 @@ def get_api_key_with_prefix(self, identifier): :param identifier: The identifier of apiKey. :return: The token for api key authentication. """ - if self.refresh_api_key_hook: self.refresh_api_key_hook(self) - + key = self.api_key.get(identifier) if key: prefix = self.api_key_prefix.get(identifier) @@ -236,7 +236,6 @@ def auth_settings(self): 'key': 'X-API-Key', 'value': self.get_api_key_with_prefix('X-API-Key') }, - } def to_debug_report(self): @@ -247,6 +246,6 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 0.0.13\n"\ - "SDK Package Version: 1.0.4".\ + "Version of the API: 0.0.15\n"\ + "SDK Package Version: 1.0.5".\ format(env=sys.platform, pyversion=sys.version) diff --git a/powerdns_client/models/__init__.py b/powerdns_client/models/__init__.py index bb09f99..97bdbc6 100644 --- a/powerdns_client/models/__init__.py +++ b/powerdns_client/models/__init__.py @@ -6,20 +6,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import # import models into model package +from powerdns_client.models.autoprimary import Autoprimary from powerdns_client.models.cache_flush_result import CacheFlushResult from powerdns_client.models.comment import Comment from powerdns_client.models.config_setting import ConfigSetting from powerdns_client.models.cryptokey import Cryptokey from powerdns_client.models.error import Error +from powerdns_client.models.inline_response200 import InlineResponse200 from powerdns_client.models.map_statistic_item import MapStatisticItem from powerdns_client.models.metadata import Metadata from powerdns_client.models.rr_set import RRSet diff --git a/powerdns_client/models/autoprimary.py b/powerdns_client/models/autoprimary.py new file mode 100644 index 0000000..77eb0d3 --- /dev/null +++ b/powerdns_client/models/autoprimary.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + PowerDNS Authoritative HTTP API + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 0.0.15 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Autoprimary(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 = { + 'ip': 'str', + 'nameserver': 'str', + 'account': 'str' + } + + attribute_map = { + 'ip': 'ip', + 'nameserver': 'nameserver', + 'account': 'account' + } + + def __init__(self, ip=None, nameserver=None, account=None): # noqa: E501 + """Autoprimary - a model defined in Swagger""" # noqa: E501 + self._ip = None + self._nameserver = None + self._account = None + self.discriminator = None + if ip is not None: + self.ip = ip + if nameserver is not None: + self.nameserver = nameserver + if account is not None: + self.account = account + + @property + def ip(self): + """Gets the ip of this Autoprimary. # noqa: E501 + + IP address of the autoprimary server # noqa: E501 + + :return: The ip of this Autoprimary. # noqa: E501 + :rtype: str + """ + return self._ip + + @ip.setter + def ip(self, ip): + """Sets the ip of this Autoprimary. + + IP address of the autoprimary server # noqa: E501 + + :param ip: The ip of this Autoprimary. # noqa: E501 + :type: str + """ + + self._ip = ip + + @property + def nameserver(self): + """Gets the nameserver of this Autoprimary. # noqa: E501 + + DNS name of the autoprimary server # noqa: E501 + + :return: The nameserver of this Autoprimary. # noqa: E501 + :rtype: str + """ + return self._nameserver + + @nameserver.setter + def nameserver(self, nameserver): + """Sets the nameserver of this Autoprimary. + + DNS name of the autoprimary server # noqa: E501 + + :param nameserver: The nameserver of this Autoprimary. # noqa: E501 + :type: str + """ + + self._nameserver = nameserver + + @property + def account(self): + """Gets the account of this Autoprimary. # noqa: E501 + + Account name for the autoprimary server # noqa: E501 + + :return: The account of this Autoprimary. # noqa: E501 + :rtype: str + """ + return self._account + + @account.setter + def account(self, account): + """Sets the account of this Autoprimary. + + Account name for the autoprimary server # noqa: E501 + + :param account: The account of this Autoprimary. # noqa: E501 + :type: str + """ + + self._account = account + + 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(Autoprimary, 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, Autoprimary): + 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/powerdns_client/models/cache_flush_result.py b/powerdns_client/models/cache_flush_result.py index 4767791..ec61a5c 100644 --- a/powerdns_client/models/cache_flush_result.py +++ b/powerdns_client/models/cache_flush_result.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class CacheFlushResult(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 @@ -42,11 +39,9 @@ class CacheFlushResult(object): def __init__(self, count=None, result=None): # noqa: E501 """CacheFlushResult - a model defined in Swagger""" # noqa: E501 - self._count = None self._result = None self.discriminator = None - if count is not None: self.count = count if result is not None: diff --git a/powerdns_client/models/comment.py b/powerdns_client/models/comment.py index f38b0f3..648e31f 100644 --- a/powerdns_client/models/comment.py +++ b/powerdns_client/models/comment.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class Comment(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 @@ -44,12 +41,10 @@ class Comment(object): def __init__(self, content=None, account=None, modified_at=None): # noqa: E501 """Comment - a model defined in Swagger""" # noqa: E501 - self._content = None self._account = None self._modified_at = None self.discriminator = None - if content is not None: self.content = content if account is not None: diff --git a/powerdns_client/models/config_setting.py b/powerdns_client/models/config_setting.py index 4fc7bd2..bf1976e 100644 --- a/powerdns_client/models/config_setting.py +++ b/powerdns_client/models/config_setting.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class ConfigSetting(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 @@ -44,12 +41,10 @@ class ConfigSetting(object): def __init__(self, name=None, type=None, value=None): # noqa: E501 """ConfigSetting - a model defined in Swagger""" # noqa: E501 - self._name = None self._type = None self._value = None self.discriminator = None - if name is not None: self.name = name if type is not None: diff --git a/powerdns_client/models/cryptokey.py b/powerdns_client/models/cryptokey.py index 93e48f7..1e91abb 100644 --- a/powerdns_client/models/cryptokey.py +++ b/powerdns_client/models/cryptokey.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class Cryptokey(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 @@ -38,6 +35,7 @@ class Cryptokey(object): 'published': 'bool', 'dnskey': 'str', 'ds': 'list[str]', + 'cds': 'list[str]', 'privatekey': 'str', 'algorithm': 'str', 'bits': 'int' @@ -51,14 +49,14 @@ class Cryptokey(object): 'published': 'published', 'dnskey': 'dnskey', 'ds': 'ds', + 'cds': 'cds', 'privatekey': 'privatekey', 'algorithm': 'algorithm', 'bits': 'bits' } - def __init__(self, type=None, id=None, keytype=None, active=None, published=None, dnskey=None, ds=None, privatekey=None, algorithm=None, bits=None): # noqa: E501 + def __init__(self, type=None, id=None, keytype=None, active=None, published=None, dnskey=None, ds=None, cds=None, privatekey=None, algorithm=None, bits=None): # noqa: E501 """Cryptokey - a model defined in Swagger""" # noqa: E501 - self._type = None self._id = None self._keytype = None @@ -66,11 +64,11 @@ def __init__(self, type=None, id=None, keytype=None, active=None, published=None self._published = None self._dnskey = None self._ds = None + self._cds = None self._privatekey = None self._algorithm = None self._bits = None self.discriminator = None - if type is not None: self.type = type if id is not None: @@ -85,6 +83,8 @@ def __init__(self, type=None, id=None, keytype=None, active=None, published=None self.dnskey = dnskey if ds is not None: self.ds = ds + if cds is not None: + self.cds = cds if privatekey is not None: self.privatekey = privatekey if algorithm is not None: @@ -257,6 +257,29 @@ def ds(self, ds): self._ds = ds + @property + def cds(self): + """Gets the cds of this Cryptokey. # noqa: E501 + + An array of DS records for this key, filtered by CDS publication settings # noqa: E501 + + :return: The cds of this Cryptokey. # noqa: E501 + :rtype: list[str] + """ + return self._cds + + @cds.setter + def cds(self, cds): + """Sets the cds of this Cryptokey. + + An array of DS records for this key, filtered by CDS publication settings # noqa: E501 + + :param cds: The cds of this Cryptokey. # noqa: E501 + :type: list[str] + """ + + self._cds = cds + @property def privatekey(self): """Gets the privatekey of this Cryptokey. # noqa: E501 diff --git a/powerdns_client/models/error.py b/powerdns_client/models/error.py index f5299db..f5ab816 100644 --- a/powerdns_client/models/error.py +++ b/powerdns_client/models/error.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class Error(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 @@ -42,11 +39,9 @@ class Error(object): def __init__(self, error=None, errors=None): # noqa: E501 """Error - a model defined in Swagger""" # noqa: E501 - self._error = None self._errors = None self.discriminator = None - self.error = error if errors is not None: self.errors = errors diff --git a/powerdns_client/models/inline_response200.py b/powerdns_client/models/inline_response200.py new file mode 100644 index 0000000..21defb4 --- /dev/null +++ b/powerdns_client/models/inline_response200.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + PowerDNS Authoritative HTTP API + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 0.0.15 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InlineResponse200(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 + """InlineResponse200 - 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(InlineResponse200, 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, InlineResponse200): + 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/powerdns_client/models/map_statistic_item.py b/powerdns_client/models/map_statistic_item.py index 222c8d6..b573b46 100644 --- a/powerdns_client/models/map_statistic_item.py +++ b/powerdns_client/models/map_statistic_item.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class MapStatisticItem(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 @@ -44,12 +41,10 @@ class MapStatisticItem(object): def __init__(self, name=None, type=None, value=None): # noqa: E501 """MapStatisticItem - a model defined in Swagger""" # noqa: E501 - self._name = None self._type = None self._value = None self.discriminator = None - if name is not None: self.name = name if type is not None: diff --git a/powerdns_client/models/metadata.py b/powerdns_client/models/metadata.py index c66d781..fea9784 100644 --- a/powerdns_client/models/metadata.py +++ b/powerdns_client/models/metadata.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class Metadata(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 @@ -42,11 +39,9 @@ class Metadata(object): def __init__(self, kind=None, metadata=None): # noqa: E501 """Metadata - a model defined in Swagger""" # noqa: E501 - self._kind = None self._metadata = None self.discriminator = None - if kind is not None: self.kind = kind if metadata is not None: diff --git a/powerdns_client/models/record.py b/powerdns_client/models/record.py index bf0f380..2bfdc02 100644 --- a/powerdns_client/models/record.py +++ b/powerdns_client/models/record.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class Record(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 @@ -42,11 +39,9 @@ class Record(object): def __init__(self, content=None, disabled=None): # noqa: E501 """Record - a model defined in Swagger""" # noqa: E501 - self._content = None self._disabled = None self.discriminator = None - self.content = content if disabled is not None: self.disabled = disabled diff --git a/powerdns_client/models/ring_statistic_item.py b/powerdns_client/models/ring_statistic_item.py index a1a1b52..eaaa63c 100644 --- a/powerdns_client/models/ring_statistic_item.py +++ b/powerdns_client/models/ring_statistic_item.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class RingStatisticItem(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 @@ -46,13 +43,11 @@ class RingStatisticItem(object): def __init__(self, name=None, type=None, size=None, value=None): # noqa: E501 """RingStatisticItem - a model defined in Swagger""" # noqa: E501 - self._name = None self._type = None self._size = None self._value = None self.discriminator = None - if name is not None: self.name = name if type is not None: diff --git a/powerdns_client/models/rr_set.py b/powerdns_client/models/rr_set.py index fcd6d4d..6627ec4 100644 --- a/powerdns_client/models/rr_set.py +++ b/powerdns_client/models/rr_set.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class RRSet(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 @@ -50,7 +47,6 @@ class RRSet(object): def __init__(self, name=None, type=None, ttl=None, changetype=None, records=None, comments=None): # noqa: E501 """RRSet - a model defined in Swagger""" # noqa: E501 - self._name = None self._type = None self._ttl = None @@ -58,7 +54,6 @@ def __init__(self, name=None, type=None, ttl=None, changetype=None, records=None self._records = None self._comments = None self.discriminator = None - self.name = name self.type = type self.ttl = ttl diff --git a/powerdns_client/models/search_result.py b/powerdns_client/models/search_result.py index faf71aa..4f71b55 100644 --- a/powerdns_client/models/search_result.py +++ b/powerdns_client/models/search_result.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class SearchResult(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 @@ -54,7 +51,6 @@ class SearchResult(object): def __init__(self, content=None, disabled=None, name=None, object_type=None, zone_id=None, zone=None, type=None, ttl=None): # noqa: E501 """SearchResult - a model defined in Swagger""" # noqa: E501 - self._content = None self._disabled = None self._name = None @@ -64,7 +60,6 @@ def __init__(self, content=None, disabled=None, name=None, object_type=None, zon self._type = None self._ttl = None self.discriminator = None - if content is not None: self.content = content if disabled is not None: diff --git a/powerdns_client/models/search_result_comment.py b/powerdns_client/models/search_result_comment.py index 2ebad3d..c5b9593 100644 --- a/powerdns_client/models/search_result_comment.py +++ b/powerdns_client/models/search_result_comment.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class SearchResultComment(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 @@ -48,14 +45,12 @@ class SearchResultComment(object): def __init__(self, content=None, name=None, object_type=None, zone_id=None, zone=None): # noqa: E501 """SearchResultComment - a model defined in Swagger""" # noqa: E501 - self._content = None self._name = None self._object_type = None self._zone_id = None self._zone = None self.discriminator = None - if content is not None: self.content = content if name is not None: diff --git a/powerdns_client/models/search_result_record.py b/powerdns_client/models/search_result_record.py index 12bb42b..1cc62aa 100644 --- a/powerdns_client/models/search_result_record.py +++ b/powerdns_client/models/search_result_record.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class SearchResultRecord(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 @@ -54,7 +51,6 @@ class SearchResultRecord(object): def __init__(self, content=None, disabled=None, name=None, object_type=None, zone_id=None, zone=None, type=None, ttl=None): # noqa: E501 """SearchResultRecord - a model defined in Swagger""" # noqa: E501 - self._content = None self._disabled = None self._name = None @@ -64,7 +60,6 @@ def __init__(self, content=None, disabled=None, name=None, object_type=None, zon self._type = None self._ttl = None self.discriminator = None - if content is not None: self.content = content if disabled is not None: diff --git a/powerdns_client/models/search_result_zone.py b/powerdns_client/models/search_result_zone.py index cc03bea..838affd 100644 --- a/powerdns_client/models/search_result_zone.py +++ b/powerdns_client/models/search_result_zone.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class SearchResultZone(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 @@ -44,12 +41,10 @@ class SearchResultZone(object): def __init__(self, name=None, object_type=None, zone_id=None): # noqa: E501 """SearchResultZone - a model defined in Swagger""" # noqa: E501 - self._name = None self._object_type = None self._zone_id = None self.discriminator = None - if name is not None: self.name = name if object_type is not None: diff --git a/powerdns_client/models/search_results.py b/powerdns_client/models/search_results.py index 05efc80..2fd472c 100644 --- a/powerdns_client/models/search_results.py +++ b/powerdns_client/models/search_results.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class SearchResults(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 diff --git a/powerdns_client/models/server.py b/powerdns_client/models/server.py index 08b030a..bd3a6cf 100644 --- a/powerdns_client/models/server.py +++ b/powerdns_client/models/server.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class Server(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 @@ -52,7 +49,6 @@ class Server(object): def __init__(self, type=None, id=None, daemon_type=None, version=None, url=None, config_url=None, zones_url=None): # noqa: E501 """Server - a model defined in Swagger""" # noqa: E501 - self._type = None self._id = None self._daemon_type = None @@ -61,7 +57,6 @@ def __init__(self, type=None, id=None, daemon_type=None, version=None, url=None, self._config_url = None self._zones_url = None self.discriminator = None - if type is not None: self.type = type if id is not None: diff --git a/powerdns_client/models/servers.py b/powerdns_client/models/servers.py index 46fb45d..1ea497c 100644 --- a/powerdns_client/models/servers.py +++ b/powerdns_client/models/servers.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class Servers(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 diff --git a/powerdns_client/models/simple_statistic_item.py b/powerdns_client/models/simple_statistic_item.py index 1e9a71f..121f45d 100644 --- a/powerdns_client/models/simple_statistic_item.py +++ b/powerdns_client/models/simple_statistic_item.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class SimpleStatisticItem(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 @@ -42,11 +39,9 @@ class SimpleStatisticItem(object): def __init__(self, name=None, value=None): # noqa: E501 """SimpleStatisticItem - a model defined in Swagger""" # noqa: E501 - self._name = None self._value = None self.discriminator = None - if name is not None: self.name = name if value is not None: diff --git a/powerdns_client/models/statistic_item.py b/powerdns_client/models/statistic_item.py index 4ab4ed2..978862f 100644 --- a/powerdns_client/models/statistic_item.py +++ b/powerdns_client/models/statistic_item.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class StatisticItem(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 @@ -44,12 +41,10 @@ class StatisticItem(object): def __init__(self, name=None, type=None, value=None): # noqa: E501 """StatisticItem - a model defined in Swagger""" # noqa: E501 - self._name = None self._type = None self._value = None self.discriminator = None - if name is not None: self.name = name if type is not None: diff --git a/powerdns_client/models/tsig_key.py b/powerdns_client/models/tsig_key.py index 2a6d44e..2f968b2 100644 --- a/powerdns_client/models/tsig_key.py +++ b/powerdns_client/models/tsig_key.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class TSIGKey(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 @@ -48,14 +45,12 @@ class TSIGKey(object): def __init__(self, name=None, id=None, algorithm=None, key=None, type=None): # noqa: E501 """TSIGKey - a model defined in Swagger""" # noqa: E501 - self._name = None self._id = None self._algorithm = None self._key = None self._type = None self.discriminator = None - if name is not None: self.name = name if id is not None: diff --git a/powerdns_client/models/zone.py b/powerdns_client/models/zone.py index 3a63768..13e6aac 100644 --- a/powerdns_client/models/zone.py +++ b/powerdns_client/models/zone.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class Zone(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 @@ -49,6 +46,7 @@ class Zone(object): 'soa_edit_api': 'str', 'api_rectify': 'bool', 'zone': 'str', + 'catalog': 'str', 'account': 'str', 'nameservers': 'list[str]', 'master_tsig_key_ids': 'list[str]', @@ -74,15 +72,15 @@ class Zone(object): 'soa_edit_api': 'soa_edit_api', 'api_rectify': 'api_rectify', 'zone': 'zone', + 'catalog': 'catalog', 'account': 'account', 'nameservers': 'nameservers', 'master_tsig_key_ids': 'master_tsig_key_ids', 'slave_tsig_key_ids': 'slave_tsig_key_ids' } - def __init__(self, id=None, name=None, type=None, url=None, kind=None, rrsets=None, serial=None, notified_serial=None, edited_serial=None, masters=None, dnssec=None, nsec3param=None, nsec3narrow=None, presigned=None, soa_edit=None, soa_edit_api=None, api_rectify=None, zone=None, account=None, nameservers=None, master_tsig_key_ids=None, slave_tsig_key_ids=None): # noqa: E501 + def __init__(self, id=None, name=None, type=None, url=None, kind=None, rrsets=None, serial=None, notified_serial=None, edited_serial=None, masters=None, dnssec=None, nsec3param=None, nsec3narrow=None, presigned=None, soa_edit=None, soa_edit_api=None, api_rectify=None, zone=None, catalog=None, account=None, nameservers=None, master_tsig_key_ids=None, slave_tsig_key_ids=None): # noqa: E501 """Zone - a model defined in Swagger""" # noqa: E501 - self._id = None self._name = None self._type = None @@ -101,12 +99,12 @@ def __init__(self, id=None, name=None, type=None, url=None, kind=None, rrsets=No self._soa_edit_api = None self._api_rectify = None self._zone = None + self._catalog = None self._account = None self._nameservers = None self._master_tsig_key_ids = None self._slave_tsig_key_ids = None self.discriminator = None - if id is not None: self.id = id if name is not None: @@ -143,6 +141,8 @@ def __init__(self, id=None, name=None, type=None, url=None, kind=None, rrsets=No self.api_rectify = api_rectify if zone is not None: self.zone = zone + if catalog is not None: + self.catalog = catalog if account is not None: self.account = account if nameservers is not None: @@ -248,7 +248,7 @@ def url(self, url): def kind(self): """Gets the kind of this Zone. # noqa: E501 - Zone kind, one of “Native”, “Master”, “Slave” # noqa: E501 + Zone kind, one of “Native”, “Master”, “Slave”, “Producer”, “Consumer” # noqa: E501 :return: The kind of this Zone. # noqa: E501 :rtype: str @@ -259,12 +259,12 @@ def kind(self): def kind(self, kind): """Sets the kind of this Zone. - Zone kind, one of “Native”, “Master”, “Slave” # noqa: E501 + Zone kind, one of “Native”, “Master”, “Slave”, “Producer”, “Consumer” # noqa: E501 :param kind: The kind of this Zone. # noqa: E501 :type: str """ - allowed_values = ["Native", "Master", "Slave"] # noqa: E501 + allowed_values = ["Native", "Master", "Slave", "Producer", "Consumer"] # noqa: E501 if kind not in allowed_values: raise ValueError( "Invalid value for `kind` ({0}), must be one of {1}" # noqa: E501 @@ -530,7 +530,7 @@ def soa_edit_api(self, soa_edit_api): def api_rectify(self): """Gets the api_rectify of this Zone. # noqa: E501 - Whether or not the zone will be rectified on data changes via the API # noqa: E501 + Whether or not the zone will be rectified on data changes via the API # noqa: E501 :return: The api_rectify of this Zone. # noqa: E501 :rtype: bool @@ -541,7 +541,7 @@ def api_rectify(self): def api_rectify(self, api_rectify): """Sets the api_rectify of this Zone. - Whether or not the zone will be rectified on data changes via the API # noqa: E501 + Whether or not the zone will be rectified on data changes via the API # noqa: E501 :param api_rectify: The api_rectify of this Zone. # noqa: E501 :type: bool @@ -572,6 +572,29 @@ def zone(self, zone): self._zone = zone + @property + def catalog(self): + """Gets the catalog of this Zone. # noqa: E501 + + The catalog this zone is a member of # noqa: E501 + + :return: The catalog of this Zone. # noqa: E501 + :rtype: str + """ + return self._catalog + + @catalog.setter + def catalog(self, catalog): + """Sets the catalog of this Zone. + + The catalog this zone is a member of # noqa: E501 + + :param catalog: The catalog of this Zone. # noqa: E501 + :type: str + """ + + self._catalog = catalog + @property def account(self): """Gets the account of this Zone. # noqa: E501 diff --git a/powerdns_client/models/zones.py b/powerdns_client/models/zones.py index 4283ad4..6ac65c2 100644 --- a/powerdns_client/models/zones.py +++ b/powerdns_client/models/zones.py @@ -5,24 +5,21 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class Zones(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 diff --git a/powerdns_client/rest.py b/powerdns_client/rest.py index 0e60ad2..abf7f53 100644 --- a/powerdns_client/rest.py +++ b/powerdns_client/rest.py @@ -5,12 +5,11 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import io @@ -216,11 +215,6 @@ def request(self, method, url, query_params=None, headers=None, if _preload_content: r = RESTResponse(r) - # In the python 3, the response.data is bytes. - # we need to decode it to string. - if six.PY3: - r.data = r.data.decode('utf8') - # log response body logger.debug("response body: %s", r.data) diff --git a/setup.py b/setup.py index 5467c20..12154e0 100644 --- a/setup.py +++ b/setup.py @@ -5,16 +5,15 @@ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - OpenAPI spec version: 0.0.13 + OpenAPI spec version: 0.0.15 Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from setuptools import setup, find_packages # noqa: H301 NAME = "powerdns-client" -VERSION = "1.0.4" +VERSION = "1.0.5" # To install the library, run the following # # python setup.py install @@ -22,16 +21,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools -REQUIRES = [ - "certifi>=2017.4.17", - "python-dateutil>=2.1", - "six>=1.10", - "urllib3>=1.23" -] - - -with open("README.md", "r", encoding="utf-8") as fh: - long_description = fh.read() +REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] setup( name=NAME, @@ -43,5 +33,7 @@ install_requires=REQUIRES, packages=find_packages(), include_package_data=True, - long_description=long_description, + long_description="""\ + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + """ ) diff --git a/test/test_autoprimary.py b/test/test_autoprimary.py new file mode 100644 index 0000000..6cd087d --- /dev/null +++ b/test/test_autoprimary.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + PowerDNS Authoritative HTTP API + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 0.0.15 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import powerdns_client +from powerdns_client.models.autoprimary import Autoprimary # noqa: E501 +from powerdns_client.rest import ApiException + + +class TestAutoprimary(unittest.TestCase): + """Autoprimary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAutoprimary(self): + """Test Autoprimary""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.autoprimary.Autoprimary() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_autoprimary_api.py b/test/test_autoprimary_api.py new file mode 100644 index 0000000..8b8cc24 --- /dev/null +++ b/test/test_autoprimary_api.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + PowerDNS Authoritative HTTP API + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 0.0.15 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import powerdns_client +from powerdns_client.api.autoprimary_api import AutoprimaryApi # noqa: E501 +from powerdns_client.rest import ApiException + + +class TestAutoprimaryApi(unittest.TestCase): + """AutoprimaryApi unit test stubs""" + + def setUp(self): + self.api = AutoprimaryApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_autoprimary(self): + """Test case for create_autoprimary + + Add an autoprimary # noqa: E501 + """ + pass + + def test_delete_autoprimary(self): + """Test case for delete_autoprimary + + Delete the autoprimary entry # noqa: E501 + """ + pass + + def test_get_autoprimaries(self): + """Test case for get_autoprimaries + + Get a list of autoprimaries # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_default_api.py b/test/test_default_api.py new file mode 100644 index 0000000..792b720 --- /dev/null +++ b/test/test_default_api.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + PowerDNS Authoritative HTTP API + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 0.0.15 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import powerdns_client +from powerdns_client.api.default_api import DefaultApi # noqa: E501 +from powerdns_client.rest import ApiException + + +class TestDefaultApi(unittest.TestCase): + """DefaultApi unit test stubs""" + + def setUp(self): + self.api = DefaultApi() # noqa: E501 + + def tearDown(self): + pass + + def test_error(self): + """Test case for error + + Will always generate an error # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response200.py b/test/test_inline_response200.py new file mode 100644 index 0000000..95ff74b --- /dev/null +++ b/test/test_inline_response200.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + PowerDNS Authoritative HTTP API + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 0.0.15 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import powerdns_client +from powerdns_client.models.inline_response200 import InlineResponse200 # noqa: E501 +from powerdns_client.rest import ApiException + + +class TestInlineResponse200(unittest.TestCase): + """InlineResponse200 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse200(self): + """Test InlineResponse200""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.inline_response200.InlineResponse200() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/tox.ini b/tox.ini index 3d0be61..a310bec 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27, py3 +envlist = py3 [testenv] deps=-r{toxinidir}/requirements.txt