Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,3 @@ target/

#Ipython Notebook
.ipynb_checkpoints
swagger-codegen-cli.jar
2 changes: 1 addition & 1 deletion .swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.14
3.0.36
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# ref: https://docs.travis-ci.com/user/languages/python
language: python
python:
- "2.7"
- "3.2"
- "3.3"
- "3.4"
Expand Down
65 changes: 51 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -135,7 +174,6 @@ Class | Method | HTTP request | Description
- [Zone](docs/Zone.md)
- [Zones](docs/Zones.md)


## Documentation For Authorization


Expand All @@ -149,4 +187,3 @@ Class | Method | HTTP request | Description
## Author



11 changes: 11 additions & 0 deletions docs/Autoprimary.md
Original file line number Diff line number Diff line change
@@ -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)

172 changes: 172 additions & 0 deletions docs/AutoprimaryApi.md
Original file line number Diff line number Diff line change
@@ -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)

1 change: 0 additions & 1 deletion docs/CacheFlushResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


1 change: 0 additions & 1 deletion docs/Comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


7 changes: 3 additions & 4 deletions docs/ConfigApi.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion docs/ConfigSetting.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


2 changes: 1 addition & 1 deletion docs/Cryptokey.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Loading