Support subdomains [patch]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cirrus |
Fix Released
|
Undecided
|
Tim Kuhlman |
Bug Description
I use subdomains inside of the zones on Route 53, but cirrus does not support that. I've made some minor change that add a second parameter that is the domain/zone to attempt updating. I suppose r53.py could be updated to find the best match, but adding a second parameter is fine for my purposes.
=== modified file 'bin/update_
--- bin/update_host.py 2011-10-04 19:30:34 +0000
+++ bin/update_host.py 2012-02-24 21:48:43 +0000
@@ -28,17 +28,14 @@
return parser.parse_args()
def main():
- usage = "usage: %prog <fqdn> <-c [cname] | -a [a record] | -A [Route 53 Alias]>"
+ usage = "usage: %prog <fqdn> <domain> <-c [cname] | -a [a record] | -A [Route 53 Alias]>"
options, args = get_args(usage)
-
- if len(args) != 1:
+ print args
+ if len(args) != 2:
print usage
host = args[0] #host is fqdn
- if host.count('.') > 1:
- domain = host.split('.', 1)[1]
- else: #must be the domain root
- domain = host
+ domain = args[1] #domain is zone
if not ( os.environ.
Changed in cirrus: | |
assignee: | nobody → Tim Kuhlman (timkuhlman) |
Changed in cirrus: | |
status: | Fix Committed → Fix Released |
Thanks for the patch! I modified it a bit so it will work either with 1 argument like before or with two and checked it in.