You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2013/09/19 17:25:44 UTC

[5/7] git commit: Use a better function name.

Use a better function name.


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

Branch: refs/heads/trunk
Commit: c4a2618979da4e3678434922edc148b37cf310e8
Parents: fbf6d16
Author: Tomaz Muraus <to...@apache.org>
Authored: Sat Sep 14 23:39:00 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sat Sep 14 23:39:00 2013 +0200

----------------------------------------------------------------------
 docs/examples/dns/export_zone_to_bind_format_file.py | 2 +-
 libcloud/dns/base.py                                 | 8 ++++----
 libcloud/test/dns/test_base.py                       | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/c4a26189/docs/examples/dns/export_zone_to_bind_format_file.py
----------------------------------------------------------------------
diff --git a/docs/examples/dns/export_zone_to_bind_format_file.py b/docs/examples/dns/export_zone_to_bind_format_file.py
index b50e223..cd70990 100644
--- a/docs/examples/dns/export_zone_to_bind_format_file.py
+++ b/docs/examples/dns/export_zone_to_bind_format_file.py
@@ -8,4 +8,4 @@ Cls = get_driver(Provider.ZERIGO)
 driver = Cls(*CREDENTIALS_ZERIGO)
 
 zone = driver.get_zone(zone_id=ZONE_ID)
-zone.export_to_bind_format_file(file_path='/home/user/example.com')
+zone.export_to_bind_zone_file(file_path='/home/user/example.com')

http://git-wip-us.apache.org/repos/asf/libcloud/blob/c4a26189/libcloud/dns/base.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/base.py b/libcloud/dns/base.py
index dd0bc93..5f3ff19 100644
--- a/libcloud/dns/base.py
+++ b/libcloud/dns/base.py
@@ -77,9 +77,9 @@ class Zone(object):
     def export_to_bind_format(self):
         return self.driver.export_zone_to_bind_format(zone=self)
 
-    def export_to_bind_format_file(self, file_path):
-        self.driver.export_zone_to_bind_format_file(zone=self,
-                                                    file_path=file_path)
+    def export_to_bind_zone_file(self, file_path):
+        self.driver.export_zone_to_bind_zone_file(zone=self,
+                                                  file_path=file_path)
 
     def __repr__(self):
         return ('<Zone: domain=%s, ttl=%s, provider=%s ...>' %
@@ -412,7 +412,7 @@ class DNSDriver(BaseDriver):
         output = '\n'.join(lines)
         return output
 
-    def export_zone_to_bind_format_file(self, zone, file_path):
+    def export_zone_to_bind_zone_file(self, zone, file_path):
         """
         Export Zone object to the BIND compatible format and write result to a
         file.

http://git-wip-us.apache.org/repos/asf/libcloud/blob/c4a26189/libcloud/test/dns/test_base.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_base.py b/libcloud/test/dns/test_base.py
index 5b444c2..499aa71 100644
--- a/libcloud/test/dns/test_base.py
+++ b/libcloud/test/dns/test_base.py
@@ -80,8 +80,8 @@ class BaseTestCase(unittest.TestCase):
         self.driver.list_records.return_value = mock_records
 
         result = self.driver.export_zone_to_bind_format(zone=zone)
-        self.driver.export_zone_to_bind_format_file(zone=zone,
-                                                    file_path=self.tmp_path)
+        self.driver.export_zone_to_bind_zone_file(zone=zone,
+                                                  file_path=self.tmp_path)
 
         with open(self.tmp_path, 'r') as fp:
             content = fp.read()