libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [1/6] git commit: Modify update_record method so user doesn't need to specify all the arguments.
Date Fri, 21 Mar 2014 14:35:45 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk 428e14823 -> cd680cc76


Modify update_record method so user doesn't need to specify all the arguments.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/ae7d6aeb
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/ae7d6aeb
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/ae7d6aeb

Branch: refs/heads/trunk
Commit: ae7d6aebb7fafbc1ea2368da89e8ecfbaf6e62d8
Parents: 428e148
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Fri Mar 21 13:39:24 2014 +0100
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Fri Mar 21 13:39:24 2014 +0100

----------------------------------------------------------------------
 libcloud/dns/drivers/route53.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/ae7d6aeb/libcloud/dns/drivers/route53.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/route53.py b/libcloud/dns/drivers/route53.py
index 38abca8..09dc250 100644
--- a/libcloud/dns/drivers/route53.py
+++ b/libcloud/dns/drivers/route53.py
@@ -190,7 +190,18 @@ class Route53DNSDriver(DNSDriver):
         return Record(id=id, name=name, type=type, data=data, zone=zone,
                       driver=self, extra=extra)
 
-    def update_record(self, record, name, type, data, extra):
+    def update_record(self, record, name=None, type=None, data=None,
+                      extra=None):
+
+        if not name:
+            name = record.name
+
+        if not type:
+            type = record.type
+
+        if not extra:
+            extra = record.extra
+
         batch = [
             ('DELETE', record.name, record.type, record.data, record.extra),
             ('CREATE', name, type, data, extra)]


Mime
View raw message