This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Overview

Easyzone is a package to manage the common record types of a zone file, including SOA records. This module sits on top of the dnspython package and provides a higher level abstraction for common zone file manipulation use cases.

http://www.psychofx.com/easyzone/ http://pypi.python.org/pypi/easyzone https://bitbucket.org/chrismiles/easyzone/

Main features:

  • A high-level abstraction on top of dnspython.
  • Load a zone file into objects.
  • Modify/add/delete zone/record objects.
  • Save back to zone file.
  • Auto-update serial (if necessary).

Requirements

Build/Test/Install

Build:

$ python setup.py build

Test:

$ python setup.py test

Install:

$ python setup.py install

OR with setuptools:

$ easy_install easyzone

Examples

easyzone:

>>> from easyzone import easyzone
>>> z = easyzone.zone_from_file('example.com', '/var/namedb/example.com')
>>> z.domain
'example.com.'
>>> z.root.soa.serial
2007012902L
>>> z.root.records('NS').items
['ns1.example.com.', 'ns2.example.com.']
>>> z.root.records('MX').items
[(10, 'mail.example.com.'), (20, 'mail2.example.com.')]
>>> z.names['foo.example.com.'].records('A').items
['10.0.0.1']

>>> ns = z.root.records('NS')
>>> ns.add('ns3.example.com.')
>>> ns.items
['ns1.example.com.', 'ns2.example.com.', 'ns3.example.com.']
>>> ns.delete('ns2.example.com')
>>> ns.items
['ns1.example.com.', 'ns3.example.com.']

>>> z.save(autoserial=True)

ZoneCheck:

>>> from easyzone.zone_check import ZoneCheck
>>> c = ZoneCheck()
>>> c.isValid('example.com', '/var/named/zones/example.com')
True
>>> c.isValid('foo.com', '/var/named/zones/example.com')
False
>>> c.error
'Bad syntax'
>>>
>>> c = ZoneCheck(checkzone='/usr/sbin/named-checkzone')
>>> c.isValid('example.com', '/var/named/zones/example.com')
True
>>>

ZoneReload:

>>> from easyzone.zone_reload import ZoneReload
>>> r = ZoneReload()
>>> r.reload('example.com')
zone reload up-to-date
>>> r.reload('foo.com')
rndc: 'reload' failed: not found
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "easyzone/zone_reload.py", line 51, in reload
    raise ZoneReloadError("rndc failed with return code %d" % r)
easyzone.zone_reload.ZoneReloadError: rndc failed with return code 1
>>>
>>> r = ZoneReload(rndc='/usr/sbin/rndc')
>>> r.reload('example.com')
zone reload up-to-date
>>>
Release History

Release History

1.2.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
easyzone-1.2.2.tar.gz (6.8 kB) Copy SHA256 Checksum SHA256 Source May 22, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting