libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [07/10] libcloud git commit: [LIBCLOUD-802] Refactor codes according to the project convention
Date Sat, 12 Mar 2016 21:52:41 GMT
[LIBCLOUD-802] Refactor codes according to the project convention

Use immutable value for argument default
Prefer explicit arguments to kwargs
Add ALIYUN_ prefix to providers constant

Closes #712

Signed-off-by: Tomaz Muraus <tomaz@tomaz.me>


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

Branch: refs/heads/trunk
Commit: ae4c482b7d9c01f6593e842775bf74e7e81eac6d
Parents: e6002e0
Author: xg.song <samsong8610@gmail.com>
Authored: Sun Mar 6 01:47:51 2016 +0800
Committer: Tomaz Muraus <tomaz@tomaz.me>
Committed: Sat Mar 12 13:28:46 2016 -0800

----------------------------------------------------------------------
 example_aliyun_ecs.py                  |    2 +-
 example_aliyun_oss.py                  |    2 +-
 example_aliyun_slb.py                  |    4 +-
 libcloud/compute/drivers/ecs.py        | 2208 ++++++++++++++-------------
 libcloud/compute/providers.py          |    2 +-
 libcloud/compute/types.py              |    4 +-
 libcloud/loadbalancer/drivers/slb.py   |  131 +-
 libcloud/loadbalancer/providers.py     |    2 +-
 libcloud/loadbalancer/types.py         |    4 +-
 libcloud/storage/providers.py          |    2 +-
 libcloud/storage/types.py              |    4 +-
 libcloud/test/compute/test_ecs.py      |    2 +-
 libcloud/test/loadbalancer/test_slb.py |   30 +-
 13 files changed, 1289 insertions(+), 1108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/ae4c482b/example_aliyun_ecs.py
----------------------------------------------------------------------
diff --git a/example_aliyun_ecs.py b/example_aliyun_ecs.py
index 87ee13c..bbaaf00 100644
--- a/example_aliyun_ecs.py
+++ b/example_aliyun_ecs.py
@@ -17,7 +17,7 @@ from libcloud.compute.types import Provider
 from libcloud.compute.providers import get_driver
 from libcloud.compute.base import NodeAuthPassword
 
-ECSDriver = get_driver(Provider.ECS)
+ECSDriver = get_driver(Provider.ALIYUN_ECS)
 
 region = 'cn-hangzhou'
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ae4c482b/example_aliyun_oss.py
----------------------------------------------------------------------
diff --git a/example_aliyun_oss.py b/example_aliyun_oss.py
index 0d335ea..6bda227 100644
--- a/example_aliyun_oss.py
+++ b/example_aliyun_oss.py
@@ -16,7 +16,7 @@
 from libcloud.storage.types import Provider
 from libcloud.storage.providers import get_driver
 
-OSSDriver = get_driver(Provider.OSS)
+OSSDriver = get_driver(Provider.ALIYUN_OSS)
 
 your_access_key_id = ''
 your_access_key_secret = ''

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ae4c482b/example_aliyun_slb.py
----------------------------------------------------------------------
diff --git a/example_aliyun_slb.py b/example_aliyun_slb.py
index 991be8c..0b41839 100644
--- a/example_aliyun_slb.py
+++ b/example_aliyun_slb.py
@@ -19,8 +19,8 @@ from libcloud.loadbalancer.providers import get_driver
 from libcloud.loadbalancer.base import Algorithm, Member
 from libcloud.loadbalancer.types import Provider
 
-SLBDriver = get_driver(Provider.SLB)
-ECSDriver = get_node_driver(NodeProvider.ECS)
+SLBDriver = get_driver(Provider.ALIYUN_SLB)
+ECSDriver = get_node_driver(NodeProvider.ALIYUN_ECS)
 
 region = 'cn-hangzhou'
 


Mime
View raw message