Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Internet > DNS

    powerdnsapi 0.3

    Download button

    No screenshots available
    Downloads: 455  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.6/5)
    16 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Lasse Karstensen | More programs
    GPL / FREE
    February 27th, 2008, 17:45 GMT
    ROOT / Internet / DNS

     Read user reviews (0)  Refer to a friend  Subscribe

    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 install

    These 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 .htaccess
    may work. A symlink from powerdnsapi.py to powerdnsapi.cgi may work. (tbd)

    Verify installation

    Probably 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)
    ['domain_get_records',
    'domain_list',
    'domain_raise_serial',
    'get_domain_from_id',
    'get_id_from_domain',
    'record_add',
    'record_delete',
    'record_update',
    'system.listMethods',
    'system.methodHelp',
    'system.methodSignature']

    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)
    [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import xmlrpclib, pprint
    >>> url = 'http://your-webserver/'
    >>> rpc = xmlrpclib.ServerProxy(url)
    >>> pprint.pprint(rpc.system.listMethods())
    ['domain_get_records',
    'domain_list',
    'domain_raise_serial',
    'get_domain_from_id',
    'get_id_from_domain',
    'record_add',
    'record_delete',
    'record_update',
    'system.listMethods',
    'system.methodHelp',
    'system.methodSignature']
    >>>

    >>> pprint.pprint( rpc.domain_list().items()[0] )
    ('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)[3])
    {'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))
    248

    What'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.



    Product's homepage

      


    TAGS:

    XMLRPC server | database backend | PowerDNS API | XMLRPC | server | database

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM