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 2015/06/06 12:23:14 UTC
[1/3] libcloud git commit: Updated CloudSigma's NODE_STATE_MAP to use
new-ish NodeStates
Repository: libcloud
Updated Branches:
refs/heads/trunk 13fe5a557 -> 590c7197a
Updated CloudSigma's NODE_STATE_MAP to use new-ish NodeStates
Closes #517
Signed-off-by: Tomaz Muraus <to...@tomaz.me>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/73ea41fd
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/73ea41fd
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/73ea41fd
Branch: refs/heads/trunk
Commit: 73ea41fdf26bd4698b06254e7dce57a92ee81939
Parents: 601526b
Author: Chris O'Brien <ch...@gmail.com>
Authored: Wed May 13 19:14:47 2015 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Tue May 26 23:15:11 2015 +0200
----------------------------------------------------------------------
libcloud/compute/drivers/cloudsigma.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/73ea41fd/libcloud/compute/drivers/cloudsigma.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudsigma.py b/libcloud/compute/drivers/cloudsigma.py
index 834062c..4611dc6 100644
--- a/libcloud/compute/drivers/cloudsigma.py
+++ b/libcloud/compute/drivers/cloudsigma.py
@@ -984,10 +984,10 @@ class CloudSigma_2_0_NodeDriver(CloudSigmaNodeDriver):
NODE_STATE_MAP = {
'starting': NodeState.PENDING,
'stopping': NodeState.PENDING,
- 'unavailable': NodeState.PENDING,
+ 'unavailable': NodeState.ERROR,
'running': NodeState.RUNNING,
'stopped': NodeState.STOPPED,
- 'paused': NodeState.STOPPED
+ 'paused': NodeState.PAUSED
}
def __init__(self, key, secret, secure=True, host=None, port=None,
[3/3] libcloud git commit: [LIBCLOUD-716] Fix port type error.
Posted by to...@apache.org.
[LIBCLOUD-716] Fix port type error.
Closes #533
Signed-off-by: Tomaz Muraus <to...@tomaz.me>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/590c7197
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/590c7197
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/590c7197
Branch: refs/heads/trunk
Commit: 590c7197ab073f5b2145f02ae7115396ccdbf008
Parents: 1d1c357
Author: Avi Weit <we...@il.ibm.com>
Authored: Wed Jun 3 11:22:45 2015 +0000
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Sat Jun 6 18:18:59 2015 +0800
----------------------------------------------------------------------
CHANGES.rst | 5 +++++
libcloud/common/base.py | 6 +++++-
libcloud/test/compute/test_openstack.py | 6 +++---
3 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/590c7197/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index b8bd91f..95be3bd 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -22,6 +22,11 @@ General
file would throw an exception if the text contained non-ascii characters.
[Tomaz Muraus]
+- Fix a bug with connection code throwing an exception if a port was a unicode
+ type and not a str or int.
+ (GITHUB-533, LIBCLOUD-716)
+ [Avi Weit]
+
Compute
~~~~~~~
http://git-wip-us.apache.org/repos/asf/libcloud/blob/590c7197/libcloud/common/base.py
----------------------------------------------------------------------
diff --git a/libcloud/common/base.py b/libcloud/common/base.py
index fa2f82a..d147ee3 100644
--- a/libcloud/common/base.py
+++ b/libcloud/common/base.py
@@ -532,7 +532,7 @@ class Connection(object):
if ":" in netloc:
netloc, port = netloc.rsplit(":")
- port = port
+ port = int(port)
if not port:
if scheme == "http":
@@ -541,6 +541,7 @@ class Connection(object):
port = 443
host = netloc
+ port = int(port)
return (host, port, secure, request_path)
@@ -570,6 +571,9 @@ class Connection(object):
host = host or self.host
port = port or self.port
+ # Make sure port is an int
+ port = int(port)
+
if not hasattr(kwargs, 'host'):
kwargs.update({'host': host})
http://git-wip-us.apache.org/repos/asf/libcloud/blob/590c7197/libcloud/test/compute/test_openstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_openstack.py b/libcloud/test/compute/test_openstack.py
index d80d6ce..feb5a0c 100644
--- a/libcloud/test/compute/test_openstack.py
+++ b/libcloud/test/compute/test_openstack.py
@@ -687,7 +687,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin):
# assert that we use the base url and not the auth url
self.assertEqual(self.driver.connection.host, 'ex_force_base_url.com')
- self.assertEqual(self.driver.connection.port, '666')
+ self.assertEqual(self.driver.connection.port, 666)
self.assertEqual(self.driver.connection.request_path, '/forced_url')
def test_get_endpoint_populates_host_port_and_request_path(self):
@@ -699,7 +699,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin):
# assert that we use the result of get endpoint
self.assertEqual(self.driver.connection.host, 'endpoint_auth_url.com')
- self.assertEqual(self.driver.connection.port, '1555')
+ self.assertEqual(self.driver.connection.port, 1555)
self.assertEqual(self.driver.connection.request_path, '/service_url')
def test_set_auth_token_populates_host_port_and_request_path(self):
@@ -712,7 +712,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin):
# assert that we use the base url and not the auth url
self.assertEqual(
self.driver.connection.host, 'some_other_ex_force_base_url.com')
- self.assertEqual(self.driver.connection.port, '1222')
+ self.assertEqual(self.driver.connection.port, 1222)
self.assertEqual(self.driver.connection.request_path, '/some-service')
def test_auth_token_without_base_url_raises_exception(self):
[2/3] libcloud git commit: Merge branch 'trunk' of
https://git-wip-us.apache.org/repos/asf/libcloud into trunk
Posted by to...@apache.org.
Merge branch 'trunk' of https://git-wip-us.apache.org/repos/asf/libcloud into trunk
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/1d1c3570
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/1d1c3570
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/1d1c3570
Branch: refs/heads/trunk
Commit: 1d1c35707236a16c755b2e0127a48174aaf2dfae
Parents: 73ea41f 13fe5a5
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Sat Jun 6 17:46:43 2015 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Sat Jun 6 17:46:43 2015 +0800
----------------------------------------------------------------------
CHANGES.rst | 4 +
libcloud/compute/drivers/cloudstack.py | 105 ++++++++++++++++++++++++++
libcloud/test/compute/test_cloudstack.py | 14 ++++
3 files changed, 123 insertions(+)
----------------------------------------------------------------------