libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [04/14] git commit: Issue LIBCLOUD-363: Fix ElasticHosts bug. Now checks for HTTP 204 and HTTP 200 to determine drive imaging status.
Date Wed, 04 Sep 2013 10:28:11 GMT
Issue LIBCLOUD-363: Fix ElasticHosts bug. Now checks for HTTP 204 and HTTP 200 to determine
drive imaging status.

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


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

Branch: refs/heads/0.13.1
Commit: 847fd4cecd44f659debdb10a5f5643247e70bfb9
Parents: c10249d
Author: Bob Thompson <bob.thompson8080@gmail.com>
Authored: Tue Jul 16 14:31:17 2013 -0400
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Wed Sep 4 12:00:00 2013 +0200

----------------------------------------------------------------------
 libcloud/compute/drivers/elasticstack.py   | 2 +-
 libcloud/test/compute/test_elasticstack.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/847fd4ce/libcloud/compute/drivers/elasticstack.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/elasticstack.py b/libcloud/compute/drivers/elasticstack.py
index 7058dbd..e70a04f 100644
--- a/libcloud/compute/drivers/elasticstack.py
+++ b/libcloud/compute/drivers/elasticstack.py
@@ -276,7 +276,7 @@ class ElasticStackBaseNodeDriver(NodeDriver):
             method='POST'
         )
 
-        if response.status != 204:
+        if response.status not in (200, 204):
             raise ElasticStackException('Drive imaging failed')
 
         # We wait until the drive is imaged and then boot up the node

http://git-wip-us.apache.org/repos/asf/libcloud/blob/847fd4ce/libcloud/test/compute/test_elasticstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_elasticstack.py b/libcloud/test/compute/test_elasticstack.py
index af08dfb..7f8a0ee 100644
--- a/libcloud/test/compute/test_elasticstack.py
+++ b/libcloud/test/compute/test_elasticstack.py
@@ -215,7 +215,7 @@ class ElasticStackMockHttp(MockHttp):
 
     def _drives_0012e24a_6eae_4279_9912_3432f698cec8_image_38df0986_4d85_4b76_b502_3878ffc80161_gunzip(self,
method, url, body, headers):
         # ElasticHosts image
-        return (httplib.NO_CONTENT, body, {}, httplib.responses[httplib.NO_CONTENT])
+        return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
     def _drives_0012e24a_6eae_4279_9912_3432f698cec8_image_90aa51f2_15c0_4cff_81ee_e93aa20b9468_gunzip(self,
method, url, body, headers):
         # Skalikloud image


Mime
View raw message