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 2013/09/13 15:31:00 UTC
[01/21] git commit: Update changes.
Updated Branches:
refs/heads/0.13.2 [created] c4b3daae9
Update changes.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/34fb0141
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/34fb0141
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/34fb0141
Branch: refs/heads/0.13.2
Commit: 34fb01417a065352962deee48344903efa4e5c2c
Parents: 7e18941
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Wed Sep 4 12:35:23 2013 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Sep 4 12:35:23 2013 +0200
----------------------------------------------------------------------
CHANGES | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/34fb0141/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 663fa23..ca90c84 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,6 @@
-*- coding: utf-8 -*-
-Changes with Apache Libcloud in development
+Changes with Apache Libcloud 0.13.1
*) General
[16/21] git commit: LIBCLOUD-396: Do not set Content-Length if
present in raw requests
Posted by to...@apache.org.
LIBCLOUD-396: Do not set Content-Length if present in raw requests
Signed-off-by: Tomaz Muraus <to...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/bca57629
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/bca57629
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/bca57629
Branch: refs/heads/0.13.2
Commit: bca5762906e466dcc405ee057e440e021bfcdcf4
Parents: b571b43
Author: Ivan Kusalic <iv...@ikusalic.com>
Authored: Thu Sep 12 15:22:47 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:20:19 2013 +0200
----------------------------------------------------------------------
libcloud/common/base.py | 9 +++------
libcloud/test/test_connection.py | 16 +++++++++++++++-
2 files changed, 18 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/bca57629/libcloud/common/base.py
----------------------------------------------------------------------
diff --git a/libcloud/common/base.py b/libcloud/common/base.py
index 4ffdbd5..f32f3ec 100644
--- a/libcloud/common/base.py
+++ b/libcloud/common/base.py
@@ -592,13 +592,10 @@ class Connection(object):
headers.update({'Host': self.host})
if data:
- # Encode data if provided
data = self.encode_data(data)
- headers.update({'Content-Length': str(len(data))})
- else:
- # Only send Content-Length 0 with POST and PUT request
- if method.upper() in ['POST', 'PUT']:
- headers.update({'Content-Length': '0'})
+ headers['Content-Length'] = str(len(data))
+ elif method.upper() in ['POST', 'PUT'] and not raw:
+ headers['Content-Length'] = '0'
params, headers = self.pre_connect_hook(params, headers)
http://git-wip-us.apache.org/repos/asf/libcloud/blob/bca57629/libcloud/test/test_connection.py
----------------------------------------------------------------------
diff --git a/libcloud/test/test_connection.py b/libcloud/test/test_connection.py
index 798f7ec..646d253 100644
--- a/libcloud/test/test_connection.py
+++ b/libcloud/test/test_connection.py
@@ -17,7 +17,7 @@
import sys
import unittest
-from mock import Mock
+from mock import Mock, call
from libcloud.common.base import Connection
@@ -68,6 +68,20 @@ class ConnectionClassTestCase(unittest.TestCase):
call_kwargs = con.connection.request.call_args[1]
self.assertEqual(call_kwargs['headers']['Content-Length'], '0')
+ # No data, raw request, do not touch Content-Length if present
+ for method in ['POST', 'PUT', 'post', 'put']:
+ con.request('/test', method=method, data=None,
+ headers={'Content-Length': '42'}, raw=True)
+ putheader_call_list = con.connection.putheader.call_args_list
+ self.assertIn(call('Content-Length', '42'), putheader_call_list)
+
+ # '' as data, raw request, do not touch Content-Length if present
+ for method in ['POST', 'PUT', 'post', 'put']:
+ con.request('/test', method=method, data=None,
+ headers={'Content-Length': '42'}, raw=True)
+ putheader_call_list = con.connection.putheader.call_args_list
+ self.assertIn(call('Content-Length', '42'), putheader_call_list)
+
# 'a' as data, content length should be present
for method in ['POST', 'PUT', 'post', 'put']:
con.request('/test', method=method, data='a')
[19/21] git commit: Fix test failure - use libcloud.test.unittest
which correctly uses unittest2 in Python < 2.7.
Posted by to...@apache.org.
Fix test failure - use libcloud.test.unittest which correctly uses unittest2 in
Python < 2.7.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/4d1fecfd
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/4d1fecfd
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/4d1fecfd
Branch: refs/heads/0.13.2
Commit: 4d1fecfd904c8a8e6c8eff3d378d2f0c3117eaca
Parents: 5cc9ddf
Author: Tomaz Muraus <to...@apache.org>
Authored: Thu Sep 12 19:34:16 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:21:41 2013 +0200
----------------------------------------------------------------------
libcloud/test/test_connection.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/4d1fecfd/libcloud/test/test_connection.py
----------------------------------------------------------------------
diff --git a/libcloud/test/test_connection.py b/libcloud/test/test_connection.py
index 646d253..892ec6e 100644
--- a/libcloud/test/test_connection.py
+++ b/libcloud/test/test_connection.py
@@ -15,10 +15,10 @@
# limitations under the License.
import sys
-import unittest
from mock import Mock, call
+from libcloud.test import unittest
from libcloud.common.base import Connection
[06/21] git commit: Add a test for CloudStack compute driver which
verifies that driver throws an exception if user instantiates the driver
correctly, but doesn't provider host and path argument.
Posted by to...@apache.org.
Add a test for CloudStack compute driver which verifies that driver throws an
exception if user instantiates the driver correctly, but doesn't provider host
and path argument.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/0bdaad00
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/0bdaad00
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/0bdaad00
Branch: refs/heads/0.13.2
Commit: 0bdaad00cd31dcfac0dbc906c6ca6e93a28792bd
Parents: d84dead
Author: Tomaz Muraus <to...@apache.org>
Authored: Sat Aug 17 16:45:55 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:15:24 2013 +0200
----------------------------------------------------------------------
libcloud/test/compute/test_cloudstack.py | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0bdaad00/libcloud/test/compute/test_cloudstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_cloudstack.py b/libcloud/test/compute/test_cloudstack.py
index 31562ff..2f27539 100644
--- a/libcloud/test/compute/test_cloudstack.py
+++ b/libcloud/test/compute/test_cloudstack.py
@@ -27,7 +27,8 @@ except ImportError:
import json
from libcloud.compute.drivers.cloudstack import CloudStackNodeDriver
-from libcloud.compute.types import DeploymentError, LibcloudError
+from libcloud.compute.types import DeploymentError, LibcloudError, Provider
+from libcloud.compute.providers import get_driver
from libcloud.compute.base import Node, NodeImage, NodeSize, NodeLocation
from libcloud.test import unittest
@@ -48,6 +49,19 @@ class CloudStackNodeDriverTest(unittest.TestCase, TestCaseMixin):
CloudStackMockHttp.fixture_tag = 'default'
self.driver.connection.poll_interval = 0.0
+ def test_user_must_provide_host_and_path(self):
+ expected_msg = 'When instantiating CloudStack driver directly ' + \
+ 'you also need to provide host and path argument'
+ cls = get_driver(Provider.CLOUDSTACK)
+
+ self.assertRaisesRegexp(Exception, expected_msg, cls,
+ 'key', 'secret')
+
+ try:
+ cls('key', 'secret', True, 'localhost', '/path')
+ except Exception:
+ self.fail('host and path provided but driver raised an exception')
+
def test_create_node_immediate_failure(self):
size = self.driver.list_sizes()[0]
image = self.driver.list_images()[0]
[13/21] git commit: Issue LIBCLOUD-364: Added Ubuntu Linux 12.04 to
ElasticHosts.
Posted by to...@apache.org.
Issue LIBCLOUD-364: Added Ubuntu Linux 12.04 to ElasticHosts.
Signed-off-by: Tomaz Muraus <to...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/abacf9cc
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/abacf9cc
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/abacf9cc
Branch: refs/heads/0.13.2
Commit: abacf9cc4b944d6dcb5ab75812be68344888b842
Parents: 7532bbf
Author: Bob Thompson <bo...@gmail.com>
Authored: Tue Jul 16 14:16:16 2013 -0400
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:18:26 2013 +0200
----------------------------------------------------------------------
libcloud/compute/drivers/elastichosts.py | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/abacf9cc/libcloud/compute/drivers/elastichosts.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/elastichosts.py b/libcloud/compute/drivers/elastichosts.py
index ea801ee..01ab5ca 100644
--- a/libcloud/compute/drivers/elastichosts.py
+++ b/libcloud/compute/drivers/elastichosts.py
@@ -89,6 +89,12 @@ STANDARD_DRIVES = {
'size_gunzipped': '1GB',
'supports_deployment': True,
},
+ '62f512cd-82c7-498e-88d8-a09ac2ef20e7': {
+ 'uuid': '62f512cd-82c7-498e-88d8-a09ac2ef20e7',
+ 'description': 'Ubuntu Linux 12.04',
+ 'size_gunzipped': '1GB',
+ 'supports_deployment': True,
+ },
'b9d0eb72-d273-43f1-98e3-0d4b87d372c0': {
'uuid': 'b9d0eb72-d273-43f1-98e3-0d4b87d372c0',
'description': 'Windows Web Server 2008',
[08/21] git commit: Modify CloudStackLB driver to throw if user
instantiates it directly, but doesn't pass in host and path.
Posted by to...@apache.org.
Modify CloudStackLB driver to throw if user instantiates it directly, but
doesn't pass in host and path.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/522ba246
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/522ba246
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/522ba246
Branch: refs/heads/0.13.2
Commit: 522ba246dbde78c49c25579afda215129b5b6207
Parents: b82afcf
Author: Tomaz Muraus <to...@apache.org>
Authored: Sat Aug 17 16:59:52 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:16:48 2013 +0200
----------------------------------------------------------------------
libcloud/loadbalancer/drivers/cloudstack.py | 22 +++++++++++++++++--
libcloud/test/loadbalancer/test_cloudstack.py | 25 +++++++++++++++++++---
2 files changed, 42 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/522ba246/libcloud/loadbalancer/drivers/cloudstack.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/drivers/cloudstack.py b/libcloud/loadbalancer/drivers/cloudstack.py
index 0a4e8a7..1cedfcc 100644
--- a/libcloud/loadbalancer/drivers/cloudstack.py
+++ b/libcloud/loadbalancer/drivers/cloudstack.py
@@ -16,6 +16,7 @@
from libcloud.common.cloudstack import CloudStackDriverMixIn
from libcloud.loadbalancer.base import LoadBalancer, Member, Driver, Algorithm
from libcloud.loadbalancer.base import DEFAULT_ALGORITHM
+from libcloud.loadbalancer.types import Provider
from libcloud.loadbalancer.types import State
from libcloud.utils.misc import reverse_dict
@@ -26,6 +27,7 @@ class CloudStackLBDriver(CloudStackDriverMixIn, Driver):
api_name = 'cloudstack_lb'
name = 'CloudStack'
website = 'http://cloudstack.org/'
+ type = Provider.CLOUDSTACK
_VALUE_TO_ALGORITHM_MAP = {
'roundrobin': Algorithm.ROUND_ROBIN,
@@ -37,11 +39,27 @@ class CloudStackLBDriver(CloudStackDriverMixIn, Driver):
'Active': State.RUNNING,
}
- def __init__(self, *args, **kwargs):
+ def __init__(self, key, secret=None, secure=True, host=None,
+ path=None, port=None, *args, **kwargs):
"""
@inherits: L{Driver.__init__}
"""
- super(CloudStackLBDriver, self).__init__(*args, **kwargs)
+ host = host if host else self.host
+ path = path if path else self.path
+
+ if path is not None:
+ self.path = path
+
+ if host is not None:
+ self.host = host
+
+ if (self.type == Provider.CLOUDSTACK) and (not host or not path):
+ raise Exception('When instantiating CloudStack driver directly ' +
+ 'you also need to provide host and path argument')
+
+ super(CloudStackLBDriver, self).__init__(key=key, secret=secret,
+ secure=secure,
+ host=host, port=port)
def list_protocols(self):
"""
http://git-wip-us.apache.org/repos/asf/libcloud/blob/522ba246/libcloud/test/loadbalancer/test_cloudstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_cloudstack.py b/libcloud/test/loadbalancer/test_cloudstack.py
index 6c924b9..25b9cfb 100644
--- a/libcloud/test/loadbalancer/test_cloudstack.py
+++ b/libcloud/test/loadbalancer/test_cloudstack.py
@@ -11,6 +11,8 @@ from libcloud.utils.py3 import urlparse
from libcloud.utils.py3 import parse_qsl
from libcloud.common.types import LibcloudError
+from libcloud.loadbalancer.types import Provider
+from libcloud.loadbalancer.providers import get_driver
from libcloud.loadbalancer.base import LoadBalancer, Member, Algorithm
from libcloud.loadbalancer.drivers.cloudstack import CloudStackLBDriver
@@ -21,13 +23,30 @@ class CloudStackLBTests(unittest.TestCase):
def setUp(self):
CloudStackLBDriver.connectionCls.conn_classes = \
(None, CloudStackMockHttp)
+
+ CloudStackLBDriver.path = '/test/path'
+ CloudStackLBDriver.type = -1
+ CloudStackLBDriver.name = 'CloudStack'
self.driver = CloudStackLBDriver('apikey', 'secret')
- self.driver.path = '/test/path'
- self.driver.type = -1
- self.driver.name = 'CloudStack'
CloudStackMockHttp.fixture_tag = 'default'
self.driver.connection.poll_interval = 0.0
+ def test_user_must_provide_host_and_path(self):
+ CloudStackLBDriver.path = None
+ CloudStackLBDriver.type = Provider.CLOUDSTACK
+
+ expected_msg = 'When instantiating CloudStack driver directly ' + \
+ 'you also need to provide host and path argument'
+ cls = get_driver(Provider.CLOUDSTACK)
+
+ self.assertRaisesRegexp(Exception, expected_msg, cls,
+ 'key', 'secret')
+
+ try:
+ cls('key', 'secret', True, 'localhost', '/path')
+ except Exception:
+ self.fail('host and path provided but driver raised an exception')
+
def test_list_supported_algorithms(self):
algorithms = self.driver.list_supported_algorithms()
[17/21] git commit: Add a comment which clarifies why Content-Length:
0 is not sent if "raw" mode is used.
Posted by to...@apache.org.
Add a comment which clarifies why Content-Length: 0 is not sent if "raw" mode is
used.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/d7152c78
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/d7152c78
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/d7152c78
Branch: refs/heads/0.13.2
Commit: d7152c78bfd59e4722fea7304d1b62029abcd395
Parents: bca5762
Author: Tomaz Muraus <to...@apache.org>
Authored: Thu Sep 12 17:35:31 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:20:23 2013 +0200
----------------------------------------------------------------------
libcloud/common/base.py | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/d7152c78/libcloud/common/base.py
----------------------------------------------------------------------
diff --git a/libcloud/common/base.py b/libcloud/common/base.py
index f32f3ec..f3ecfb6 100644
--- a/libcloud/common/base.py
+++ b/libcloud/common/base.py
@@ -595,6 +595,12 @@ class Connection(object):
data = self.encode_data(data)
headers['Content-Length'] = str(len(data))
elif method.upper() in ['POST', 'PUT'] and not raw:
+ # Only send Content-Length 0 with POST and PUT request.
+ #
+ # Note: Content-Length is not added when using "raw" mode means
+ # means that headers are upfront and the body is sent at some point
+ # later on. With raw mode user can specify Content-Length with
+ # "data" not being set.
headers['Content-Length'] = '0'
params, headers = self.pre_connect_hook(params, headers)
[02/21] git commit: Bump version to 0.13.1.
Posted by to...@apache.org.
Bump version to 0.13.1.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/9bebad3a
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/9bebad3a
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/9bebad3a
Branch: refs/heads/0.13.2
Commit: 9bebad3a70216b7a3aa1f83208ce0d5c591a45ee
Parents: 34fb014
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Wed Sep 4 12:35:39 2013 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Sep 4 12:35:39 2013 +0200
----------------------------------------------------------------------
libcloud/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/9bebad3a/libcloud/__init__.py
----------------------------------------------------------------------
diff --git a/libcloud/__init__.py b/libcloud/__init__.py
index acba9a2..90ef9cf 100644
--- a/libcloud/__init__.py
+++ b/libcloud/__init__.py
@@ -20,7 +20,7 @@ libcloud provides a unified interface to the cloud computing resources.
"""
__all__ = ['__version__', 'enable_debug']
-__version__ = '0.13.0'
+__version__ = '0.13.1'
import os
import atexit
[21/21] git commit: Bump version.
Posted by to...@apache.org.
Bump version.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/c4b3daae
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/c4b3daae
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/c4b3daae
Branch: refs/heads/0.13.2
Commit: c4b3daae946049652a500a8515929b4cbf14a6b4
Parents: 5192c39
Author: Tomaz Muraus <to...@apache.org>
Authored: Fri Sep 13 15:28:03 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:28:03 2013 +0200
----------------------------------------------------------------------
libcloud/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/c4b3daae/libcloud/__init__.py
----------------------------------------------------------------------
diff --git a/libcloud/__init__.py b/libcloud/__init__.py
index 90ef9cf..a857a7d 100644
--- a/libcloud/__init__.py
+++ b/libcloud/__init__.py
@@ -20,7 +20,7 @@ libcloud provides a unified interface to the cloud computing resources.
"""
__all__ = ['__version__', 'enable_debug']
-__version__ = '0.13.1'
+__version__ = '0.13.2'
import os
import atexit
[11/21] git commit: Update CHANGES.
Posted by to...@apache.org.
Update CHANGES.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/310def9c
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/310def9c
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/310def9c
Branch: refs/heads/0.13.2
Commit: 310def9c16340b5a7e6fb774ae1a9a533de6a7be
Parents: 7db7757
Author: Tomaz Muraus <to...@apache.org>
Authored: Sat Aug 17 17:51:48 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:16:59 2013 +0200
----------------------------------------------------------------------
CHANGES | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/310def9c/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 45d12f5..f067028 100644
--- a/CHANGES
+++ b/CHANGES
@@ -42,6 +42,12 @@ Changes with Apache Libcloud 0.13.1
(LIBCLOUD-378)
[Mahendra M]
+ *) Load Balancer
+
+ - Expose CloudStack driver directly through the Provider.CLOUDSTACK
+ constant.
+ [Tomaz Muraus]
+
Changes with Apache Libcloud 0.13.0:
*) General
[10/21] git commit: Use unittest2.
Posted by to...@apache.org.
Use unittest2.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/7db7757d
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/7db7757d
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/7db7757d
Branch: refs/heads/0.13.2
Commit: 7db7757d552c774f598d479fb8d5a6a26717d9a6
Parents: f5ad5ba
Author: Tomaz Muraus <to...@apache.org>
Authored: Sat Aug 17 17:17:12 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:16:55 2013 +0200
----------------------------------------------------------------------
libcloud/test/loadbalancer/test_cloudstack.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/7db7757d/libcloud/test/loadbalancer/test_cloudstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_cloudstack.py b/libcloud/test/loadbalancer/test_cloudstack.py
index 25b9cfb..bea57fd 100644
--- a/libcloud/test/loadbalancer/test_cloudstack.py
+++ b/libcloud/test/loadbalancer/test_cloudstack.py
@@ -1,5 +1,4 @@
import sys
-import unittest
try:
import simplejson as json
@@ -16,6 +15,7 @@ from libcloud.loadbalancer.providers import get_driver
from libcloud.loadbalancer.base import LoadBalancer, Member, Algorithm
from libcloud.loadbalancer.drivers.cloudstack import CloudStackLBDriver
+from libcloud.test import unittest
from libcloud.test import MockHttpTestCase
from libcloud.test.file_fixtures import LoadBalancerFileFixtures
[18/21] git commit: Update changes.
Posted by to...@apache.org.
Update changes.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/5cc9ddf6
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5cc9ddf6
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5cc9ddf6
Branch: refs/heads/0.13.2
Commit: 5cc9ddf616428fc7edcd797ea148de9c299ca5d6
Parents: d7152c7
Author: Tomaz Muraus <to...@apache.org>
Authored: Fri Sep 13 15:21:33 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:21:33 2013 +0200
----------------------------------------------------------------------
CHANGES | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/5cc9ddf6/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 29db668..645b858 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,14 @@
Changes with Apache Libcloud 0.13.2
+ *) General
+
+ - Don't sent Content-Length: 0 header with POST and PUT request if "raw"
+ mode is used. This fixes a regression which could cause broken behavior
+ in some storage driver when uploading a file from disk.
+ (LIBCLOUD-396)
+ [Ivan Kusalic]
+
*) DNS
- Modify Zerigo driver to include record TTL in the record 'extra' attribute
@@ -136,11 +144,11 @@ Changes with Apache Libcloud 0.13.0:
(LIBCLOUD-333)
[sebastien goasguen]
- - Add extension methods for managing security groups to the CloudStack
+ - Add extension methods for managing security groups to the CloudStack
driver. (LIBCLOUD-332)
[sebastien goasguen]
- - Add extension methods for starting and stoping the node to the
+ - Add extension methods for starting and stoping the node to the
CloudStack driver. (LIBCLOUD-338)
[sebastien goasguen]
[07/21] git commit: Add a provider constant for CloudStack
loadbalancer driver and expose it through get_driver.
Posted by to...@apache.org.
Add a provider constant for CloudStack loadbalancer driver and expose it through
get_driver.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b82afcf4
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b82afcf4
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b82afcf4
Branch: refs/heads/0.13.2
Commit: b82afcf492792c4f7fe2858f743d042e9979b5e6
Parents: 0bdaad0
Author: Tomaz Muraus <to...@apache.org>
Authored: Sat Aug 17 16:59:09 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:15:32 2013 +0200
----------------------------------------------------------------------
libcloud/loadbalancer/providers.py | 5 ++++-
libcloud/loadbalancer/types.py | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/b82afcf4/libcloud/loadbalancer/providers.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/providers.py b/libcloud/loadbalancer/providers.py
index cf2411d..3ed140d 100644
--- a/libcloud/loadbalancer/providers.py
+++ b/libcloud/loadbalancer/providers.py
@@ -35,7 +35,10 @@ DRIVERS = {
Provider.BRIGHTBOX:
('libcloud.loadbalancer.drivers.brightbox', 'BrightboxLBDriver'),
Provider.ELB:
- ('libcloud.loadbalancer.drivers.elb', 'ElasticLBDriver')
+ ('libcloud.loadbalancer.drivers.elb', 'ElasticLBDriver'),
+ Provider.CLOUDSTACK:
+ ('libcloud.loadbalancer.drivers.cloudstack', 'CloudStackLBDriver')
+
}
http://git-wip-us.apache.org/repos/asf/libcloud/blob/b82afcf4/libcloud/loadbalancer/types.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/types.py b/libcloud/loadbalancer/types.py
index 95f4a9f..6608ca4 100644
--- a/libcloud/loadbalancer/types.py
+++ b/libcloud/loadbalancer/types.py
@@ -38,6 +38,7 @@ class Provider(object):
RACKSPACE_UK = 'rackspace_uk'
BRIGHTBOX = 'brightbox'
ELB = 'elb'
+ CLOUDSTACK = 'cloudstack'
class State(object):
[14/21] git commit: LIBCLOUD-357: Modified ElasticHosts to store
drive UUID in 'extra' field.
Posted by to...@apache.org.
LIBCLOUD-357: Modified ElasticHosts to store drive UUID in 'extra' field.
Signed-off-by: Tomaz Muraus <to...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/64181eb2
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/64181eb2
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/64181eb2
Branch: refs/heads/0.13.2
Commit: 64181eb27b00264211c5580b0471bc07360ebb27
Parents: abacf9c
Author: Bob Thompson <bo...@gmail.com>
Authored: Wed Jul 3 11:22:02 2013 -0400
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:19:30 2013 +0200
----------------------------------------------------------------------
libcloud/compute/drivers/elasticstack.py | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/64181eb2/libcloud/compute/drivers/elasticstack.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/elasticstack.py b/libcloud/compute/drivers/elasticstack.py
index e70a04f..603fdf7 100644
--- a/libcloud/compute/drivers/elasticstack.py
+++ b/libcloud/compute/drivers/elasticstack.py
@@ -469,6 +469,14 @@ class ElasticStackBaseNodeDriver(NodeDriver):
if 'vnc:password' in data:
extra['vnc:password'] = data['vnc:password']
+ boot_device = data['boot']
+
+ if isinstance(boot_device, list):
+ for device in boot_device:
+ extra[device] = data[device]
+ else:
+ extra[boot_device] = data[boot_device]
+
if ssh_password:
extra.update({'password': ssh_password})
[09/21] git commit: Add a test case for ninefold loadbalancer driver.
Posted by to...@apache.org.
Add a test case for ninefold loadbalancer driver.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/f5ad5baa
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/f5ad5baa
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/f5ad5baa
Branch: refs/heads/0.13.2
Commit: f5ad5baac9a9e1a360ffb6834d39fdb1ec1f9d22
Parents: 522ba24
Author: Tomaz Muraus <to...@apache.org>
Authored: Sat Aug 17 17:10:13 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:16:51 2013 +0200
----------------------------------------------------------------------
libcloud/test/loadbalancer/test_ninefold.py | 15 +++++++++++++++
1 file changed, 15 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f5ad5baa/libcloud/test/loadbalancer/test_ninefold.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_ninefold.py b/libcloud/test/loadbalancer/test_ninefold.py
new file mode 100644
index 0000000..c3c514f
--- /dev/null
+++ b/libcloud/test/loadbalancer/test_ninefold.py
@@ -0,0 +1,15 @@
+import sys
+import unittest
+
+from libcloud.loadbalancer.types import Provider
+from libcloud.loadbalancer.providers import get_driver
+
+
+class NinefoldLbTestCase(unittest.TestCase):
+ def test_driver_instantiation(self):
+ cls = get_driver(Provider.NINEFOLD)
+ cls('username', 'key')
+
+
+if __name__ == '__main__':
+ sys.exit(unittest.main())
[04/21] git commit: Modify Zerigo driver to include record TTL in the
record 'extra' attribute if a record has a TTL set.
Posted by to...@apache.org.
Modify Zerigo driver to include record TTL in the record 'extra' attribute
if a record has a TTL set.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/ebcfe186
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/ebcfe186
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/ebcfe186
Branch: refs/heads/0.13.2
Commit: ebcfe1867f0072ad66573bf874ef68b53747c176
Parents: 602b6a7
Author: Tomaz Muraus <to...@apache.org>
Authored: Fri Sep 6 23:31:45 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:11:44 2013 +0200
----------------------------------------------------------------------
CHANGES | 8 ++++++++
libcloud/dns/drivers/zerigo.py | 6 +++++-
libcloud/test/dns/fixtures/zerigo/list_records.xml | 13 +++++++++++++
libcloud/test/dns/test_zerigo.py | 5 ++++-
4 files changed, 30 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/ebcfe186/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index ca90c84..249d2d0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,13 @@
-*- coding: utf-8 -*-
+Changes with Apache Libcloud 0.13.2
+
+ *) DNS
+
+ - Modify Zerigo driver to include record TTL in the record 'extra' attribute
+ if a record has a TTL set.
+ [Tomaz Muraus]
+
Changes with Apache Libcloud 0.13.1
*) General
http://git-wip-us.apache.org/repos/asf/libcloud/blob/ebcfe186/libcloud/dns/drivers/zerigo.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/zerigo.py b/libcloud/dns/drivers/zerigo.py
index 404b8da..e92c2c3 100644
--- a/libcloud/dns/drivers/zerigo.py
+++ b/libcloud/dns/drivers/zerigo.py
@@ -423,9 +423,13 @@ class ZerigoDNSDriver(DNSDriver):
state = findtext(element=elem, xpath='state')
fqdn = findtext(element=elem, xpath='fqdn')
priority = findtext(element=elem, xpath='priority')
+ ttl = findtext(element=elem, xpath='ttl')
+
+ if ttl:
+ ttl = int(ttl)
extra = {'notes': notes, 'state': state, 'fqdn': fqdn,
- 'priority': priority}
+ 'priority': priority, 'ttl': ttl}
record = Record(id=id, name=name, type=type, data=data,
zone=zone, driver=self, extra=extra)
http://git-wip-us.apache.org/repos/asf/libcloud/blob/ebcfe186/libcloud/test/dns/fixtures/zerigo/list_records.xml
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/fixtures/zerigo/list_records.xml b/libcloud/test/dns/fixtures/zerigo/list_records.xml
index d2e9530..f0826cf 100644
--- a/libcloud/test/dns/fixtures/zerigo/list_records.xml
+++ b/libcloud/test/dns/fixtures/zerigo/list_records.xml
@@ -12,4 +12,17 @@
<updated-at type="datetime">2008-12-07T02:51:13Z</updated-at>
<zone-id type="integer">12345678</zone-id>
</host>
+ <host>
+ <created-at type="datetime">2008-12-07T02:51:13Z</created-at>
+ <data>172.16.16.2</data>
+ <fqdn>test.example.com</fqdn>
+ <host-type>A</host-type>
+ <hostname>test</hostname>
+ <id type="integer">23456789</id>
+ <notes nil="true"/>
+ <priority type="integer" nil="true"/>
+ <ttl type="integer">3600</ttl>
+ <updated-at type="datetime">2008-12-07T02:51:13Z</updated-at>
+ <zone-id type="integer">12345678</zone-id>
+ </host>
</hosts>
http://git-wip-us.apache.org/repos/asf/libcloud/blob/ebcfe186/libcloud/test/dns/test_zerigo.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_zerigo.py b/libcloud/test/dns/test_zerigo.py
index 9bf26f1..de4a5d4 100644
--- a/libcloud/test/dns/test_zerigo.py
+++ b/libcloud/test/dns/test_zerigo.py
@@ -65,12 +65,15 @@ class ZerigoTests(unittest.TestCase):
zone = self.driver.list_zones()[0]
records = list(self.driver.list_records(zone=zone))
- self.assertEqual(len(records), 1)
+ self.assertEqual(len(records), 2)
self.assertEqual(records[0].name, 'www')
self.assertEqual(records[0].type, RecordType.A)
self.assertEqual(records[0].data, '172.16.16.1')
self.assertEqual(records[0].extra['fqdn'], 'www.example.com')
+ self.assertEqual(records[1].name, 'test')
+ self.assertEqual(records[1].extra['ttl'], 3600)
+
def test_list_records_no_results(self):
zone = self.driver.list_zones()[0]
ZerigoMockHttp.type = 'NO_RESULTS'
[03/21] git commit: Comment out some bad tests which rely on dict
ordering and fix a typo in the gandi driver.
Posted by to...@apache.org.
Comment out some bad tests which rely on dict ordering and fix a typo in the
gandi driver.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/602b6a7a
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/602b6a7a
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/602b6a7a
Branch: refs/heads/0.13.2
Commit: 602b6a7a27dca6990a38eb887e1d6615826387d5
Parents: 9bebad3
Author: Tomaz Muraus <to...@apache.org>
Authored: Fri Aug 23 15:25:05 2013 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Sep 4 12:53:12 2013 +0200
----------------------------------------------------------------------
libcloud/compute/drivers/gandi.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/602b6a7a/libcloud/compute/drivers/gandi.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gandi.py b/libcloud/compute/drivers/gandi.py
index 1278173..8d311bf 100644
--- a/libcloud/compute/drivers/gandi.py
+++ b/libcloud/compute/drivers/gandi.py
@@ -64,7 +64,7 @@ INSTANCE_TYPES = {
'disk': 50,
'bandwidth': 100,
},
- 'extra-large': {
+ 'x-large': {
'id': 'x-large',
'name': 'Extra Large instance',
'cpu': 4,
[05/21] git commit: Modify values in the Record 'extra' dictionary
attribute in the Zerigo DNS driver to be set to None instead of an empty
string ('') if a value for the provided key is not set.
Posted by to...@apache.org.
Modify values in the Record 'extra' dictionary attribute in the Zerigo DNS
driver to be set to None instead of an empty string ('') if a value for
the provided key is not set.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/d84dead8
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/d84dead8
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/d84dead8
Branch: refs/heads/0.13.2
Commit: d84dead876bc23930ba4d692e9212eb47a82c8ac
Parents: ebcfe18
Author: Tomaz Muraus <to...@apache.org>
Authored: Fri Sep 6 23:36:26 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:11:52 2013 +0200
----------------------------------------------------------------------
CHANGES | 5 +++++
libcloud/dns/drivers/zerigo.py | 10 +++++-----
libcloud/test/dns/test_zerigo.py | 2 ++
libcloud/utils/xml.py | 13 +++++++++++--
4 files changed, 23 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/d84dead8/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 249d2d0..45d12f5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,11 @@ Changes with Apache Libcloud 0.13.2
if a record has a TTL set.
[Tomaz Muraus]
+ - Modify values in the Record 'extra' dictionary attribute in the Zerigo DNS
+ driver to be set to None instead of an empty string ('') if a value for
+ the provided key is not set.
+ [Tomaz Muraus]
+
Changes with Apache Libcloud 0.13.1
*) General
http://git-wip-us.apache.org/repos/asf/libcloud/blob/d84dead8/libcloud/dns/drivers/zerigo.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/zerigo.py b/libcloud/dns/drivers/zerigo.py
index e92c2c3..0ff16e0 100644
--- a/libcloud/dns/drivers/zerigo.py
+++ b/libcloud/dns/drivers/zerigo.py
@@ -419,11 +419,11 @@ class ZerigoDNSDriver(DNSDriver):
type = self._string_to_record_type(type)
data = findtext(element=elem, xpath='data')
- notes = findtext(element=elem, xpath='notes')
- state = findtext(element=elem, xpath='state')
- fqdn = findtext(element=elem, xpath='fqdn')
- priority = findtext(element=elem, xpath='priority')
- ttl = findtext(element=elem, xpath='ttl')
+ notes = findtext(element=elem, xpath='notes', no_text_value=None)
+ state = findtext(element=elem, xpath='state', no_text_value=None)
+ fqdn = findtext(element=elem, xpath='fqdn', no_text_value=None)
+ priority = findtext(element=elem, xpath='priority', no_text_value=None)
+ ttl = findtext(element=elem, xpath='ttl', no_text_value=None)
if ttl:
ttl = int(ttl)
http://git-wip-us.apache.org/repos/asf/libcloud/blob/d84dead8/libcloud/test/dns/test_zerigo.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_zerigo.py b/libcloud/test/dns/test_zerigo.py
index de4a5d4..16aa827 100644
--- a/libcloud/test/dns/test_zerigo.py
+++ b/libcloud/test/dns/test_zerigo.py
@@ -70,6 +70,8 @@ class ZerigoTests(unittest.TestCase):
self.assertEqual(records[0].type, RecordType.A)
self.assertEqual(records[0].data, '172.16.16.1')
self.assertEqual(records[0].extra['fqdn'], 'www.example.com')
+ self.assertEqual(records[0].extra['notes'], None)
+ self.assertEqual(records[0].extra['priority'], None)
self.assertEqual(records[1].name, 'test')
self.assertEqual(records[1].extra['ttl'], 3600)
http://git-wip-us.apache.org/repos/asf/libcloud/blob/d84dead8/libcloud/utils/xml.py
----------------------------------------------------------------------
diff --git a/libcloud/utils/xml.py b/libcloud/utils/xml.py
index 71aa7cc..d05b843 100644
--- a/libcloud/utils/xml.py
+++ b/libcloud/utils/xml.py
@@ -22,8 +22,17 @@ def fixxpath(xpath, namespace=None):
return '/'.join(['{%s}%s' % (namespace, e) for e in xpath.split('/')])
-def findtext(element, xpath, namespace=None):
- return element.findtext(fixxpath(xpath=xpath, namespace=namespace))
+def findtext(element, xpath, namespace=None, no_text_value=''):
+ """
+ :param no_text_value: Value to return if the provided element has no text
+ value.
+ :type no_text_value: ``object``
+ """
+ value = element.findtext(fixxpath(xpath=xpath, namespace=namespace))
+
+ if value == '':
+ return no_text_value
+ return value
def findattr(element, xpath, namespace=None):
[20/21] git commit: Update changes.
Posted by to...@apache.org.
Update changes.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/5192c393
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5192c393
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5192c393
Branch: refs/heads/0.13.2
Commit: 5192c393a75f0a93e0409d1f2fa6ef1d3b6f7373
Parents: 4d1fecf
Author: Tomaz Muraus <to...@apache.org>
Authored: Fri Sep 13 15:25:24 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:25:24 2013 +0200
----------------------------------------------------------------------
CHANGES | 32 ++++++++++++++++++++++----------
1 file changed, 22 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/5192c393/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 645b858..b7747f7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,28 @@ Changes with Apache Libcloud 0.13.2
(LIBCLOUD-396)
[Ivan Kusalic]
+ *) Compute
+
+ - Added Ubuntu Linux 12.04 image to ElasticHost driver image list.
+ (LIBCLOUD-364)
+ [Bob Thompson]
+
+ - Update ElasticHosts driver to store drive UUID in the node 'extra' field.
+ (LIBCLOUD-357)
+ [Bob Thompson]
+
+ *) Storage
+
+ - Store last_modified timestamp in the Object extra dictionary in the S3
+ driver. (LIBCLOUD-373)
+ [Stefan Friesel]
+
+ *) Load Balancer
+
+ - Expose CloudStack driver directly through the Provider.CLOUDSTACK
+ constant.
+ [Tomaz Muraus]
+
*) DNS
- Modify Zerigo driver to include record TTL in the record 'extra' attribute
@@ -50,16 +72,6 @@ Changes with Apache Libcloud 0.13.1
(LIBCLOUD-378)
[Mahendra M]
- - Store last_modified timestamp in the Object extra dictionary in the S3
- driver. (LIBCLOUD-373)
- [Stefan Friesel]
-
- *) Load Balancer
-
- - Expose CloudStack driver directly through the Provider.CLOUDSTACK
- constant.
- [Tomaz Muraus]
-
Changes with Apache Libcloud 0.13.0:
*) General
[15/21] git commit: LIBCLOUD-357: Updated unit tests for ElasticStack
to ensure driver UUID is stored in 'extra' field.
Posted by to...@apache.org.
LIBCLOUD-357: Updated unit tests for ElasticStack to ensure driver UUID is stored in 'extra' field.
Signed-off-by: Tomaz Muraus <to...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b571b436
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b571b436
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b571b436
Branch: refs/heads/0.13.2
Commit: b571b43690f64bdbefa0e0e99604e50c327b47f5
Parents: 64181eb
Author: Bob Thompson <bo...@gmail.com>
Authored: Fri Jul 5 08:55:00 2013 -0400
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:19:35 2013 +0200
----------------------------------------------------------------------
libcloud/test/compute/test_elasticstack.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/b571b436/libcloud/test/compute/test_elasticstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_elasticstack.py b/libcloud/test/compute/test_elasticstack.py
index 7f8a0ee..5d30bbd 100644
--- a/libcloud/test/compute/test_elasticstack.py
+++ b/libcloud/test/compute/test_elasticstack.py
@@ -105,6 +105,7 @@ class ElasticStackTestCase(object):
self.assertEqual(node.public_ips[0], "1.2.3.4")
self.assertEqual(node.public_ips[1], "1.2.3.5")
self.assertEqual(node.extra['smp'], 1)
+ self.assertEqual(node.extra['ide:0:0'], "b6049e7a-aa1b-47f9-b21d-cdf2354e28d3")
def test_list_sizes(self):
images = self.driver.list_sizes()
@@ -194,20 +195,20 @@ class ElasticStackMockHttp(MockHttp):
fixtures = ComputeFileFixtures('elastichosts')
def _servers_info_UNAUTHORIZED(self, method, url, body, headers):
- return (httplib.UNAUTHORIZED, body, {}, httplib.responses[httplib.NO_CONTENT])
+ return (httplib.UNAUTHORIZED, body, {}, httplib.responses[httplib.NO_CONTENT])
def _servers_info_MALFORMED(self, method, url, body, headers):
- body = "{malformed: '"
- return (httplib.OK, body, {}, httplib.responses[httplib.NO_CONTENT])
+ body = "{malformed: '"
+ return (httplib.OK, body, {}, httplib.responses[httplib.NO_CONTENT])
def _servers_info_PARSE_ERROR(self, method, url, body, headers):
- return (505, body, {}, httplib.responses[httplib.NO_CONTENT])
+ return (505, body, {}, httplib.responses[httplib.NO_CONTENT])
def _servers_b605ca90_c3e6_4cee_85f8_a8ebdf8f9903_reset(self, method, url, body, headers):
- return (httplib.NO_CONTENT, body, {}, httplib.responses[httplib.NO_CONTENT])
+ return (httplib.NO_CONTENT, body, {}, httplib.responses[httplib.NO_CONTENT])
def _servers_b605ca90_c3e6_4cee_85f8_a8ebdf8f9903_destroy(self, method, url, body, headers):
- return (httplib.NO_CONTENT, body, {}, httplib.responses[httplib.NO_CONTENT])
+ return (httplib.NO_CONTENT, body, {}, httplib.responses[httplib.NO_CONTENT])
def _drives_create(self, method, url, body, headers):
body = self.fixtures.load('drives_create.json')
[12/21] git commit: Store last_modified timestamp in the Object extra
dictionary in the S3 driver.
Posted by to...@apache.org.
Store last_modified timestamp in the Object extra dictionary in the S3 driver.
Contributed by Stefan Friesel, part of LIBCLOUD-373.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/7532bbf7
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/7532bbf7
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/7532bbf7
Branch: refs/heads/0.13.2
Commit: 7532bbf7abbbdaa51d005eb23310831f887af0f6
Parents: 310def9
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Aug 19 19:37:32 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Sep 13 15:17:20 2013 +0200
----------------------------------------------------------------------
CHANGES | 4 ++++
libcloud/storage/drivers/s3.py | 6 +++++-
libcloud/test/storage/test_s3.py | 1 +
3 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/7532bbf7/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index f067028..29db668 100644
--- a/CHANGES
+++ b/CHANGES
@@ -42,6 +42,10 @@ Changes with Apache Libcloud 0.13.1
(LIBCLOUD-378)
[Mahendra M]
+ - Store last_modified timestamp in the Object extra dictionary in the S3
+ driver. (LIBCLOUD-373)
+ [Stefan Friesel]
+
*) Load Balancer
- Expose CloudStack driver directly through the Provider.CLOUDSTACK
http://git-wip-us.apache.org/repos/asf/libcloud/blob/7532bbf7/libcloud/storage/drivers/s3.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/s3.py b/libcloud/storage/drivers/s3.py
index 5b20035..f802d47 100644
--- a/libcloud/storage/drivers/s3.py
+++ b/libcloud/storage/drivers/s3.py
@@ -851,6 +851,10 @@ class S3StorageDriver(StorageDriver):
namespace=self.namespace)
meta_data = {'owner': {'id': owner_id,
'display_name': owner_display_name}}
+ last_modified = findtext(element=element,
+ xpath='LastModified',
+ namespace=self.namespace)
+ extra = {'last_modified': last_modified}
obj = Object(name=findtext(element=element, xpath='Key',
namespace=self.namespace),
@@ -858,7 +862,7 @@ class S3StorageDriver(StorageDriver):
namespace=self.namespace)),
hash=findtext(element=element, xpath='ETag',
namespace=self.namespace).replace('"', ''),
- extra=None,
+ extra=extra,
meta_data=meta_data,
container=container,
driver=self
http://git-wip-us.apache.org/repos/asf/libcloud/blob/7532bbf7/libcloud/test/storage/test_s3.py
----------------------------------------------------------------------
diff --git a/libcloud/test/storage/test_s3.py b/libcloud/test/storage/test_s3.py
index 9f35169..4756010 100644
--- a/libcloud/test/storage/test_s3.py
+++ b/libcloud/test/storage/test_s3.py
@@ -459,6 +459,7 @@ class S3Tests(unittest.TestCase):
self.assertEqual(obj.hash, '4397da7a7649e8085de9916c240e8166')
self.assertEqual(obj.size, 1234567)
self.assertEqual(obj.container.name, 'test_container')
+ self.assertEqual(obj.extra['last_modified'], '2011-04-09T19:05:18.000Z')
self.assertTrue('owner' in obj.meta_data)
def test_list_container_objects_iterator_has_more(self):