Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(807)

Unified Diff: bin/route53

Issue 8669001: Pull in upstream boto from github at bcb719937de9ac2851e632d62b777352029a6d55 (Closed) Base URL: svn://svn.chromium.org/boto
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | boto/ec2/autoscale/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/route53
diff --git a/bin/route53 b/bin/route53
index 3f6327d90c56b4a09f4ed53851a86ac8b5a6bd54..c2f2cb4cfa7cbf56a1b6b2fb7cdba2aba7c80cab 100755
--- a/bin/route53
+++ b/bin/route53
@@ -92,6 +92,17 @@ def change_record(conn, hosted_zone_id, name, type, values, ttl=600, comment="")
change2.add_value(new_value)
print changes.commit()
+def change_alias(conn, hosted_zone_id, name, type, alias_hosted_zone_id, alias_dns_name, comment=""):
+ """Delete and then add an alias to a zone"""
+ from boto.route53.record import ResourceRecordSets
+ changes = ResourceRecordSets(conn, hosted_zone_id, comment)
+ response = conn.get_all_rrsets(hosted_zone_id, type, name, maxitems=1)[0]
+ change1 = changes.add_change("DELETE", name, type)
+ change1.set_alias(response.alias_hosted_zone_id, response.alias_dns_name)
+ change2 = changes.add_change("CREATE", name, type)
+ change2.set_alias(alias_hosted_zone_id, alias_dns_name)
+ print changes.commit()
+
def help(conn, fnc=None):
"""Prints this help message"""
import inspect
« no previous file with comments | « no previous file | boto/ec2/autoscale/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698