diff --git a/README.md b/README.md index 7b8b3dd..ad01788 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ utility scripts for manipulating a Rackspace-managed DNS zone. At this point, t were developed solely to make it easier for me to automate some tasks, but they may be useful to others. Have at it. Contributions including code, bug reports, and feedback are all welcome. +* Contributors: Matthew Jones +* Bug reports: http://github.com/mbjones/rsdns/issues + There are two main types of tools in this package: * rsdns.py: a Python commandline tool that allows you to list domains, list records in a domain, create a record in a domain, update a record in a domain, delete a record from a domain, import a domain from a BIND9 file, and to delete a whole domain * bash scripts: a set of Bash scripts that let you call the Rackspace API directly to authenticate (auth.sh), export a domain (export.sh), and show records for a domain (records.sh). These are not as useful as the python commandline tool, but are included due to the export feature. -* Contributors: Matthew Jones -* Bug reports: http://github.com/mbjones/rsdns/issues - Installation ------------ For rsdns.py, you must first install python\_clouddns using a command such as: @@ -22,6 +22,18 @@ sudo pip install python_clouddns ``` The argparse module ships with Python 2.7 and should be standard. +Usage Examples +-------------- +```sh +./rsdns.py import --file zone/db.example.org +./rsdns.py list +./rsdns.py records example.org +./rsdns.py create example.org test.magisa.org. 10.0.50.100 A +./rsdns.py update example.org test.example.org 10.0.50.200 +./rsdns.py delete example.org test.example.org +./rsdns.py deldomain example.org +``` + License ------- ``` diff --git a/rsdns.py b/rsdns.py old mode 100644 new mode 100755 index de349bf..7155136 --- a/rsdns.py +++ b/rsdns.py @@ -52,7 +52,7 @@ def main(): # Parse our command line arguments def options(): - parser = argparse.ArgumentParser(description='Commandline tool for managing DNS zones') + parser = argparse.ArgumentParser(description='Commandline tool for managing DNS zones.', epilog='Execution depends on a credentials file containing the username and apikey to be present in the working directory.') parser.add_argument('cmd', help='Command to be executed', choices=['list', 'records', 'create','update','delete','import','deldomain']) parser.add_argument('domain', help='Name of the domain on which to act', nargs='?') parser.add_argument('host', help='Hostname to be created or updated', nargs='?')