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 2019/07/15 21:30:11 UTC
[libcloud] 17/19: Bail early if driver doesn't implement a method.
This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git
commit 6f6673e421a0bbd2e3d6dbc5fbc8208115bcdf23
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Mon Jul 15 23:23:33 2019 +0200
Bail early if driver doesn't implement a method.
---
contrib/generate_provider_feature_matrix_table.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/contrib/generate_provider_feature_matrix_table.py b/contrib/generate_provider_feature_matrix_table.py
index 57bb6e4..3d8b300 100755
--- a/contrib/generate_provider_feature_matrix_table.py
+++ b/contrib/generate_provider_feature_matrix_table.py
@@ -307,13 +307,17 @@ def generate_providers_table(api):
for method_name in base_api_methods:
base_method = base_methods[method_name]
- driver_method = driver_methods[method_name]
+
if method_name == 'deploy_node':
features = getattr(cls, 'features', {}).get('create_node', [])
is_implemented = len(features) >= 1
else:
- is_implemented = (id(driver_method) != id(base_method))
+ if method_name not in driver_methods:
+ is_implemented = False
+ else:
+ driver_method = driver_methods[method_name]
+ is_implemented = (id(driver_method) != id(base_method))
result[name]['methods'][method_name] = is_implemented