powerdnsapi

powerdnsapi is an XMLRPC server for communicating with a database backend for PowerDNS.
Download

powerdnsapi Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Lasse Karstensen
  • Publisher web site:

powerdnsapi Tags


powerdnsapi Description

powerdnsapi is an XMLRPC server for communicating with a database backend for PowerDNS. powerdnsapi is an XMLRPC server for communicating with a database backend for PowerDNS.powerdnsapi is written in Python and uses xmlrpclib. It is run as CGI. powerdnsapi is not affiliated or in any way a part of PowerDNS. It is written by Lasse Karstensen.How to installThese are very rough at the moment.* untar the tar.gz file. (problably done this already)* copy powerdnsapi.conf.sample into powerdnsapi.conf, and edit it to your tastes. * add the comment field on your records table. ALTER TABLE records ADD comment text;* make sure your web server is able to run the server. "Addhandler .py cgi-script" in .htaccessmay work. A symlink from powerdnsapi.py to powerdnsapi.cgi may work. (tbd)Verify installationProbably easiest with a python shell. Start it with 'python'. import xmlrpclib url = "http://your-server-url/powerdnsapi.cgi" rpc = xmlrpclib.ServerProxy(url) print rpc.system.listMethods()This should print something like: (reformatted here)rpc.domain_list() is also rather safe, it prints all available zones.Example:Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import xmlrpclib, pprint>>> url = 'http://your-webserver/'>>> rpc = xmlrpclib.ServerProxy(url)>>> pprint.pprint(rpc.system.listMethods())>>> >>> pprint.pprint( rpc.domain_list().items() )('1.2.3.in-addr.arpa', {'domainid': 202, 'notified_serial': '2007022101', 'serial': '2007022101'})>>> >>> print len( rpc.domain_get_records(202))247>>> pprint.pprint( rpc.domain_get_records(202)){'comment': '', 'content': 'some-webserver.hostname.com', 'domain': 'hostname.com', 'domain_id': '202', 'id': '25001', 'name': 'www', 'prio': '0', 'ttl': '86400', 'type': 'CNAME'}>>>>>> rec = {'content': 'some-webserver.hostname.com', 'name': 'www-dev', 'type': 'CNAME', 'ttl': 3600, 'domain_id': 202 }>>> rpc.add_record(rec)>>> print len( rpc.domain_get_records(202))248What's New in This Release:· generate_list(), _update, _delete, _add. Expands a GENERATE record (from dtext/other) into n records in the database.· add and remove (master) domains.


powerdnsapi Related Software