Last active
August 29, 2015 14:08
-
-
Save rudyryk/7b8c419c501804c95969 to your computer and use it in GitHub Desktop.
Simple client for PowerDNS.net service API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# | |
# No Rights Reserved | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
""" | |
Simple client for PowerDNS.net service API. | |
""" | |
from suds.client import Client as BaseClient | |
class Client(BaseClient): | |
"""Simple client for PowerDNS.net service API. | |
Methods (SOAP): | |
addNativeDomain(xs:string domainName, ) | |
addRecordToZone(xs:int zoneId, xs:string Name, | |
xs:string Type, xs:string Content, | |
xs:int TimeToLive, xs:int Priority, ) | |
deleteAllRecordsForDomain(xs:int zoneId, ) | |
deleteRecordById(xs:int recordId, ) | |
deleteZoneById(xs:int zoneId, ) | |
deleteZoneByName(xs:string zoneName, ) | |
listRecords(xs:int zoneId, ) | |
listRecordsByType(xs:int zoneId, xs:string type, ) | |
listZones() | |
renewZone(xs:int zoneId, ) | |
updateRecord(xs:int recordId, xs:string Name, | |
xs:string Type, xs:string Content, | |
xs:int TimeToLive, xs:int Priority, ) | |
Please read complete description here: | |
https://www.powerdns.net/services/express.asmx | |
""" | |
def __init__(self, apikey): | |
url = 'https://www.powerdns.net/services/express.asmx?WSDL' | |
location = '%s&apikey=%s' % (url, apikey) | |
super(Client, self).__init__(url, location=location) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment