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 2016/06/10 10:48:21 UTC
[1/5] libcloud git commit: Fix aliyun ecs driver: version mismatch
error
Repository: libcloud
Updated Branches:
refs/heads/trunk 76cc0bb3b -> 0d9b28161
Fix aliyun ecs driver: version mismatch error
fix#800 E302 expected 2 blank lines
support ECSConnection and SLBConnection
expected 1 blank lines
fix no member named api_version
lint: commands failed
expected 2 blank lines
Aliyun ecs: Add support for creating/deleting security group
fix E501 line too long (83 > 79 characters)
fix E203 whitespace before ':'
Closes #800
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/2583d625
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/2583d625
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/2583d625
Branch: refs/heads/trunk
Commit: 2583d625a953b81ae02b6bc34ab8d06d413794bc
Parents: 76cc0bb
Author: net613 <wu...@otcaix.iscas.ac.cn>
Authored: Mon Jun 6 12:11:31 2016 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Fri Jun 10 12:47:59 2016 +0200
----------------------------------------------------------------------
libcloud/__init__.pyc | Bin 0 -> 1935 bytes
libcloud/common/aliyun.py | 19 +++++++++++---
libcloud/compute/drivers/ecs.py | 41 +++++++++++++++++++++++++++++-
libcloud/loadbalancer/drivers/slb.py | 2 +-
libcloud/utils/__init__.pyc | Bin 0 -> 1121 bytes
libcloud/utils/dist.pyc | Bin 0 -> 4025 bytes
6 files changed, 56 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/2583d625/libcloud/__init__.pyc
----------------------------------------------------------------------
diff --git a/libcloud/__init__.pyc b/libcloud/__init__.pyc
new file mode 100644
index 0000000..62724b4
Binary files /dev/null and b/libcloud/__init__.pyc differ
http://git-wip-us.apache.org/repos/asf/libcloud/blob/2583d625/libcloud/common/aliyun.py
----------------------------------------------------------------------
diff --git a/libcloud/common/aliyun.py b/libcloud/common/aliyun.py
index 062f389..4e4b5a4 100644
--- a/libcloud/common/aliyun.py
+++ b/libcloud/common/aliyun.py
@@ -180,9 +180,13 @@ class AliyunConnection(ConnectionUserAndKey):
class SignedAliyunConnection(AliyunConnection):
- def __init__(self, user_id, key, secure=True, host=None, port=None,
- url=None, timeout=None, proxy_url=None, retry_delay=None,
- backoff=None, signature_version=DEFAULT_SIGNATURE_VERSION):
+
+ api_version = None
+
+ def __init__(self, user_id, key, secure=True, host=None,
+ port=None, url=None, timeout=None, proxy_url=None,
+ retry_delay=None, backoff=None, api_version=None,
+ signature_version=DEFAULT_SIGNATURE_VERSION):
super(SignedAliyunConnection, self).__init__(user_id=user_id, key=key,
secure=secure,
host=host, port=port,
@@ -190,6 +194,7 @@ class SignedAliyunConnection(AliyunConnection):
proxy_url=proxy_url,
retry_delay=retry_delay,
backoff=backoff)
+
self.signature_version = str(signature_version)
if self.signature_version == '1.0':
@@ -198,9 +203,15 @@ class SignedAliyunConnection(AliyunConnection):
raise ValueError('Unsupported signature_version: %s' %
signature_version)
+ if api_version is not None:
+ self.api_version = str(api_version)
+ else:
+ if self.api_version is None:
+ raise ValueError('Unsupported null api_version')
+
self.signer = signer_cls(access_key=self.user_id,
access_secret=self.key,
- version=signature_version)
+ version=self.api_version)
def add_default_params(self, params):
params = self.signer.get_request_params(params=params,
http://git-wip-us.apache.org/repos/asf/libcloud/blob/2583d625/libcloud/compute/drivers/ecs.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ecs.py b/libcloud/compute/drivers/ecs.py
index c9d53f8..63d54d5 100644
--- a/libcloud/compute/drivers/ecs.py
+++ b/libcloud/compute/drivers/ecs.py
@@ -354,7 +354,7 @@ class ECSConnection(SignedAliyunConnection):
Represents a single connection to the Aliyun ECS Endpoint.
"""
- version = ECS_API_VERSION
+ api_version = ECS_API_VERSION
host = ECS_API_ENDPOINT
responseCls = AliyunXmlResponse
service_name = 'ecs'
@@ -768,6 +768,45 @@ class ECSDriver(NodeDriver):
return resp.success() and \
self._wait_until_state([node], NodeState.STOPPED)
+ def ex_create_security_groups(self, ex_description=None,
+ ex_client_token=None):
+ """
+ Create a new security groups.
+
+ :keyword ex_description: volume description
+ :type ex_description: ``unicode``
+
+ :keyword ex_client_token: a token generated by client to identify
+ each request.
+ :type ex_client_token: ``str``
+ """
+ params = {'Action': 'CreateSecurityGroup',
+ 'RegionId': self.region}
+
+ if ex_description:
+ params['Description'] = ex_description
+ if ex_client_token:
+ params['ClientToken'] = ex_client_token
+ resp = self.connection.request(self.path, params).object
+ return findtext(resp, 'SecurityGroupId', namespace=self.namespace)
+
+ def ex_delete_security_groups(self, ex_security_group_id=None):
+ """
+ Create a new security groups.
+
+ :keyword ex_description: volume description
+ :type ex_description: ``unicode``
+
+ :keyword ex_client_token: a token generated by client to identify
+ each request.
+ :type ex_client_token: ``str``
+ """
+ params = {'Action': 'DeleteSecurityGroup',
+ 'RegionId': self.region,
+ 'SecurityGroupId': ex_security_group_id}
+ resp = self.connection.request(self.path, params)
+ return resp.success()
+
def ex_list_security_groups(self, ex_filters=None):
"""
List security groups in the current region.
http://git-wip-us.apache.org/repos/asf/libcloud/blob/2583d625/libcloud/loadbalancer/drivers/slb.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/drivers/slb.py b/libcloud/loadbalancer/drivers/slb.py
index 03ca6be..492391d 100644
--- a/libcloud/loadbalancer/drivers/slb.py
+++ b/libcloud/loadbalancer/drivers/slb.py
@@ -97,7 +97,7 @@ ALGORITHM_TO_SLB_SCHEDULER = {
class SLBConnection(SignedAliyunConnection):
- version = SLB_API_VERSION
+ api_version = SLB_API_VERSION
host = SLB_API_HOST
responseCls = AliyunXmlResponse
service_name = 'slb'
http://git-wip-us.apache.org/repos/asf/libcloud/blob/2583d625/libcloud/utils/__init__.pyc
----------------------------------------------------------------------
diff --git a/libcloud/utils/__init__.pyc b/libcloud/utils/__init__.pyc
new file mode 100644
index 0000000..9aec925
Binary files /dev/null and b/libcloud/utils/__init__.pyc differ
http://git-wip-us.apache.org/repos/asf/libcloud/blob/2583d625/libcloud/utils/dist.pyc
----------------------------------------------------------------------
diff --git a/libcloud/utils/dist.pyc b/libcloud/utils/dist.pyc
new file mode 100644
index 0000000..99c4a0e
Binary files /dev/null and b/libcloud/utils/dist.pyc differ
[5/5] libcloud git commit: Update changelog.
Posted by to...@apache.org.
Update changelog.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/0d9b2816
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/0d9b2816
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/0d9b2816
Branch: refs/heads/trunk
Commit: 0d9b28161dca229f444df97a63702d8ea73389d7
Parents: 2a5fd8b
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Fri Jun 10 12:47:11 2016 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Fri Jun 10 12:48:13 2016 +0200
----------------------------------------------------------------------
CHANGES.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0d9b2816/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 0aa501d..32211b3 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -231,7 +231,7 @@ Compute
- New driver for Aliyun Elastic Compute Service.
(LIBCLOUD-802, GITHUB-712)
- [Sam Song]
+ [Sam Song, Heng Wu]
Storage
~~~~~~~
[3/5] libcloud git commit: remove utils/*pyc
Posted by to...@apache.org.
remove utils/*pyc
Closes #800
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/22999731
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/22999731
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/22999731
Branch: refs/heads/trunk
Commit: 229997319c9fbd6b5b8809c1d0f5506f5ae122f1
Parents: 3c5388a
Author: netgenius <wu...@otcaix.iscas.ac.cn>
Authored: Fri Jun 10 18:23:15 2016 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Fri Jun 10 12:48:08 2016 +0200
----------------------------------------------------------------------
libcloud/utils/__init__.pyc | Bin 1121 -> 0 bytes
libcloud/utils/dist.pyc | Bin 4025 -> 0 bytes
2 files changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/22999731/libcloud/utils/__init__.pyc
----------------------------------------------------------------------
diff --git a/libcloud/utils/__init__.pyc b/libcloud/utils/__init__.pyc
deleted file mode 100644
index 9aec925..0000000
Binary files a/libcloud/utils/__init__.pyc and /dev/null differ
http://git-wip-us.apache.org/repos/asf/libcloud/blob/22999731/libcloud/utils/dist.pyc
----------------------------------------------------------------------
diff --git a/libcloud/utils/dist.pyc b/libcloud/utils/dist.pyc
deleted file mode 100644
index 99c4a0e..0000000
Binary files a/libcloud/utils/dist.pyc and /dev/null differ
[4/5] libcloud git commit: Remove .pyc file.
Posted by to...@apache.org.
Remove .pyc file.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/2a5fd8b8
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/2a5fd8b8
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/2a5fd8b8
Branch: refs/heads/trunk
Commit: 2a5fd8b83340a55f6409725ae32d5191da5147e5
Parents: 2299973
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Fri Jun 10 12:46:25 2016 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Fri Jun 10 12:48:13 2016 +0200
----------------------------------------------------------------------
libcloud/__init__.pyc | Bin 1935 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/2a5fd8b8/libcloud/__init__.pyc
----------------------------------------------------------------------
diff --git a/libcloud/__init__.pyc b/libcloud/__init__.pyc
deleted file mode 100644
index 62724b4..0000000
Binary files a/libcloud/__init__.pyc and /dev/null differ
[2/5] libcloud git commit: rebase
Posted by to...@apache.org.
rebase
Closes #800
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/3c5388a3
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/3c5388a3
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/3c5388a3
Branch: refs/heads/trunk
Commit: 3c5388a318ff7443ea41f2df86b5248d7078246a
Parents: 2583d62
Author: netgenius <wu...@otcaix.iscas.ac.cn>
Authored: Fri Jun 10 15:50:11 2016 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Fri Jun 10 12:48:04 2016 +0200
----------------------------------------------------------------------
libcloud/compute/drivers/ecs.py | 39 ------------------------------------
1 file changed, 39 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/3c5388a3/libcloud/compute/drivers/ecs.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ecs.py b/libcloud/compute/drivers/ecs.py
index 63d54d5..2ac8afa 100644
--- a/libcloud/compute/drivers/ecs.py
+++ b/libcloud/compute/drivers/ecs.py
@@ -768,45 +768,6 @@ class ECSDriver(NodeDriver):
return resp.success() and \
self._wait_until_state([node], NodeState.STOPPED)
- def ex_create_security_groups(self, ex_description=None,
- ex_client_token=None):
- """
- Create a new security groups.
-
- :keyword ex_description: volume description
- :type ex_description: ``unicode``
-
- :keyword ex_client_token: a token generated by client to identify
- each request.
- :type ex_client_token: ``str``
- """
- params = {'Action': 'CreateSecurityGroup',
- 'RegionId': self.region}
-
- if ex_description:
- params['Description'] = ex_description
- if ex_client_token:
- params['ClientToken'] = ex_client_token
- resp = self.connection.request(self.path, params).object
- return findtext(resp, 'SecurityGroupId', namespace=self.namespace)
-
- def ex_delete_security_groups(self, ex_security_group_id=None):
- """
- Create a new security groups.
-
- :keyword ex_description: volume description
- :type ex_description: ``unicode``
-
- :keyword ex_client_token: a token generated by client to identify
- each request.
- :type ex_client_token: ``str``
- """
- params = {'Action': 'DeleteSecurityGroup',
- 'RegionId': self.region,
- 'SecurityGroupId': ex_security_group_id}
- resp = self.connection.request(self.path, params)
- return resp.success()
-
def ex_list_security_groups(self, ex_filters=None):
"""
List security groups in the current region.