libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [1/4] git commit: Update generate fixture script to treat list_* method as implemented if the corresponding iterate_* method is implemented.
Date Sat, 07 Dec 2013 19:37:11 GMT
Updated Branches:
  refs/heads/trunk 67910fd51 -> 2148ba866


Update generate fixture script to treat list_* method as implemented if the
corresponding iterate_* method is implemented.


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

Branch: refs/heads/trunk
Commit: 4848a4604867d1253f1100c323ca2a060f773b4e
Parents: 67910fd
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Sat Dec 7 20:28:51 2013 +0100
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Sat Dec 7 20:28:51 2013 +0100

----------------------------------------------------------------------
 .../generate_provider_feature_matrix_table.py    | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/4848a460/contrib/generate_provider_feature_matrix_table.py
----------------------------------------------------------------------
diff --git a/contrib/generate_provider_feature_matrix_table.py b/contrib/generate_provider_feature_matrix_table.py
index f2c73bf..ff0715b 100755
--- a/contrib/generate_provider_feature_matrix_table.py
+++ b/contrib/generate_provider_feature_matrix_table.py
@@ -56,8 +56,8 @@ BASE_API_METHODS = {
                      'balancer_list_members', 'balancer_attach_member',
                      'balancer_detach_member', 'balancer_attach_compute_node'],
     'storage_main': ['list_containers', 'list_container_objects',
-                     'create_container',
-                     'delete_container', 'upload_object',
+                     'iterate_containers', 'iterate_container_objects',
+                     'create_container', 'delete_container', 'upload_object',
                      'upload_object_via_stream', 'download_object',
                      'download_object_as_stream', 'delete_object'],
     'storage_cdn': ['enable_container_cdn', 'enable_object_cdn',
@@ -227,10 +227,17 @@ def generate_supported_methods_table(api, provider_matrix):
         provider_name = '`%s`_' % (values['name'])
         row = [provider_name]
 
-        if api == 'dns':
-            # TODO: Make it nicer
+        # TODO: Make it nicer
+        # list_* methods don't need to be implemented if iterate_* methods are
+        # implemented
+        if api == 'storage_main':
+            if values['methods']['iterate_containers']:
+                values['methods']['list_containers'] = True
+
+            if values['methods']['iterate_container_objects']:
+                values['methods']['list_container_objects'] = True
+        elif api == 'dns':
             # list_zones and list_records don't need to be implemented if
-            # iterate_* methods are implemented
             if values['methods']['iterate_zones']:
                 values['methods']['list_zones'] = True
 
@@ -239,7 +246,7 @@ def generate_supported_methods_table(api, provider_matrix):
 
         for method in base_api_methods:
             # TODO: ghetto
-            if api == 'dns' and method.startswith('iterate_'):
+            if method.startswith('iterate_'):
                 continue
 
             supported = values['methods'][method]


Mime
View raw message