Correctly set MX records priority for Route53 Closes #469
Signed-off-by: Tomaz Muraus <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/23be732d Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/23be732d Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/23be732d Branch: refs/heads/trunk Commit: 23be732d7cc9226f8be600702baec50fab7e31a2 Parents: 22df988 Author: VanÄ Levstik <[email protected]> Authored: Mon Feb 23 16:05:12 2015 +0100 Committer: Tomaz Muraus <[email protected]> Committed: Sat Feb 28 22:32:15 2015 +0100 ---------------------------------------------------------------------- libcloud/dns/drivers/route53.py | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/23be732d/libcloud/dns/drivers/route53.py ---------------------------------------------------------------------- diff --git a/libcloud/dns/drivers/route53.py b/libcloud/dns/drivers/route53.py index 36e06f7..7a3904b 100644 --- a/libcloud/dns/drivers/route53.py +++ b/libcloud/dns/drivers/route53.py @@ -372,6 +372,8 @@ class Route53DNSDriver(DNSDriver): rrecs = ET.SubElement(rrs, 'ResourceRecords') rrec = ET.SubElement(rrecs, 'ResourceRecord') + if 'priority' in extra: + data = '{0} {1}'.format(extra['priority'], data) ET.SubElement(rrec, 'Value').text = data uri = API_ROOT + 'hostedzone/' + zone.id + '/rrset'
