Skip to content

Commit

Permalink
Updated documentation to add a usage section.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbjones committed Oct 29, 2013
1 parent 9334c4d commit b441558
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
-------
```
Expand Down
2 changes: 1 addition & 1 deletion rsdns.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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='?')
Expand Down

0 comments on commit b441558

Please sign in to comment.