Hello community,

here is the log from the commit of package python-apache-libcloud for 
openSUSE:Factory checked in at 2013-09-26 19:44:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-apache-libcloud (Old)
 and      /work/SRC/openSUSE:Factory/.python-apache-libcloud.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-apache-libcloud"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-apache-libcloud/python-apache-libcloud.changes
    2013-09-08 11:43:26.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-apache-libcloud.new/python-apache-libcloud.changes
       2013-09-26 19:44:01.000000000 +0200
@@ -1,0 +2,26 @@
+Sun Sep 22 13:37:35 UTC 2013 - [email protected]
+
+- Updated to 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.
+- Compute:
+  - Added Ubuntu Linux 12.04 image to ElasticHost driver image list.
+   (LIBCLOUD-364)
+  - Update ElasticHosts driver to store drive UUID in the node 'extra' field.
+   (LIBCLOUD-357)
+- Storage:
+  - Store last_modified timestamp in the Object extra dictionary in the S3
+    driver. (LIBCLOUD-373)
+- Load Balancer:
+  - Expose CloudStack driver directly through the Provider.CLOUDSTACK
+    constant.
+- DNS:
+  - Modify Zerigo driver to include record TTL in the record 'extra' attribute
+    if a record has a TTL set.
+  - 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.
+
+-------------------------------------------------------------------

Old:
----
  apache-libcloud-0.13.1.tar.bz2

New:
----
  apache-libcloud-0.13.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-apache-libcloud.spec ++++++
--- /var/tmp/diff_new_pack.qDYOlU/_old  2013-09-26 19:44:02.000000000 +0200
+++ /var/tmp/diff_new_pack.qDYOlU/_new  2013-09-26 19:44:02.000000000 +0200
@@ -16,7 +16,7 @@
 #
 
 Name:           python-apache-libcloud
-Version:        0.13.1
+Version:        0.13.2
 Release:        1
 License:        Apache-2.0
 Summary:        Abstract away differences among multiple cloud provider APIs

++++++ apache-libcloud-0.13.1.tar.bz2 -> apache-libcloud-0.13.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apache-libcloud-0.13.1/CHANGES 
new/apache-libcloud-0.13.2/CHANGES
--- old/apache-libcloud-0.13.1/CHANGES  2013-09-04 12:35:20.000000000 +0200
+++ new/apache-libcloud-0.13.2/CHANGES  2013-09-15 17:40:43.000000000 +0200
@@ -1,5 +1,48 @@
                                    -*- coding: utf-8 -*-
 
+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]
+
+  *) 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
+     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
@@ -113,11 +156,11 @@
       (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]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apache-libcloud-0.13.1/PKG-INFO 
new/apache-libcloud-0.13.2/PKG-INFO
--- old/apache-libcloud-0.13.1/PKG-INFO 2013-09-04 12:56:25.000000000 +0200
+++ new/apache-libcloud-0.13.2/PKG-INFO 2013-09-15 17:44:36.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: apache-libcloud
-Version: 0.13.1
+Version: 0.13.2
 Summary: A standard Python library that abstracts away differences among 
multiple cloud provider APIs. For more information and documentation, please 
see http://libcloud.apache.org
 Home-page: http://libcloud.apache.org/
 Author: Apache Software Foundation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apache-libcloud-0.13.1/libcloud/__init__.py 
new/apache-libcloud-0.13.2/libcloud/__init__.py
--- old/apache-libcloud-0.13.1/libcloud/__init__.py     2013-09-04 
12:35:35.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/__init__.py     2013-09-15 
17:40:43.000000000 +0200
@@ -20,7 +20,7 @@
 """
 
 __all__ = ['__version__', 'enable_debug']
-__version__ = '0.13.1'
+__version__ = '0.13.2'
 
 import os
 import atexit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apache-libcloud-0.13.1/libcloud/common/base.py 
new/apache-libcloud-0.13.2/libcloud/common/base.py
--- old/apache-libcloud-0.13.1/libcloud/common/base.py  2013-09-04 
12:31:14.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/common/base.py  2013-09-15 
17:40:43.000000000 +0200
@@ -592,13 +592,16 @@
             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:
+            # 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)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/compute/drivers/elastichosts.py 
new/apache-libcloud-0.13.2/libcloud/compute/drivers/elastichosts.py
--- old/apache-libcloud-0.13.1/libcloud/compute/drivers/elastichosts.py 
2013-09-04 12:31:14.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/compute/drivers/elastichosts.py 
2013-09-15 17:40:04.000000000 +0200
@@ -89,6 +89,12 @@
         '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',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/compute/drivers/elasticstack.py 
new/apache-libcloud-0.13.2/libcloud/compute/drivers/elasticstack.py
--- old/apache-libcloud-0.13.1/libcloud/compute/drivers/elasticstack.py 
2013-09-04 12:31:14.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/compute/drivers/elasticstack.py 
2013-09-15 17:40:04.000000000 +0200
@@ -469,6 +469,14 @@
         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})
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/dns/drivers/zerigo.py 
new/apache-libcloud-0.13.2/libcloud/dns/drivers/zerigo.py
--- old/apache-libcloud-0.13.1/libcloud/dns/drivers/zerigo.py   2013-09-04 
12:31:05.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/dns/drivers/zerigo.py   2013-09-15 
17:40:04.000000000 +0200
@@ -419,13 +419,17 @@
         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')
+        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)
 
         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)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/loadbalancer/drivers/cloudstack.py 
new/apache-libcloud-0.13.2/libcloud/loadbalancer/drivers/cloudstack.py
--- old/apache-libcloud-0.13.1/libcloud/loadbalancer/drivers/cloudstack.py      
2013-09-04 12:31:14.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/loadbalancer/drivers/cloudstack.py      
2013-09-15 17:40:04.000000000 +0200
@@ -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 @@
     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 @@
         '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):
         """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/loadbalancer/providers.py 
new/apache-libcloud-0.13.2/libcloud/loadbalancer/providers.py
--- old/apache-libcloud-0.13.1/libcloud/loadbalancer/providers.py       
2013-09-04 12:31:14.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/loadbalancer/providers.py       
2013-09-15 17:40:04.000000000 +0200
@@ -35,7 +35,10 @@
         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')
+
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/loadbalancer/types.py 
new/apache-libcloud-0.13.2/libcloud/loadbalancer/types.py
--- old/apache-libcloud-0.13.1/libcloud/loadbalancer/types.py   2013-09-04 
12:31:14.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/loadbalancer/types.py   2013-09-15 
17:40:04.000000000 +0200
@@ -38,6 +38,7 @@
     RACKSPACE_UK = 'rackspace_uk'
     BRIGHTBOX = 'brightbox'
     ELB = 'elb'
+    CLOUDSTACK = 'cloudstack'
 
 
 class State(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/storage/drivers/s3.py 
new/apache-libcloud-0.13.2/libcloud/storage/drivers/s3.py
--- old/apache-libcloud-0.13.1/libcloud/storage/drivers/s3.py   2013-09-04 
12:31:14.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/storage/drivers/s3.py   2013-09-15 
17:40:43.000000000 +0200
@@ -851,6 +851,10 @@
                                       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 @@
                                        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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/test/compute/test_cloudstack.py 
new/apache-libcloud-0.13.2/libcloud/test/compute/test_cloudstack.py
--- old/apache-libcloud-0.13.1/libcloud/test/compute/test_cloudstack.py 
2013-09-04 12:31:14.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/test/compute/test_cloudstack.py 
2013-09-15 17:40:43.000000000 +0200
@@ -27,7 +27,8 @@
     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 @@
         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]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/test/compute/test_elasticstack.py 
new/apache-libcloud-0.13.2/libcloud/test/compute/test_elasticstack.py
--- old/apache-libcloud-0.13.1/libcloud/test/compute/test_elasticstack.py       
2013-09-04 12:31:14.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/test/compute/test_elasticstack.py       
2013-09-15 17:40:04.000000000 +0200
@@ -105,6 +105,7 @@
         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 @@
     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')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/test/dns/fixtures/zerigo/list_records.xml 
new/apache-libcloud-0.13.2/libcloud/test/dns/fixtures/zerigo/list_records.xml
--- 
old/apache-libcloud-0.13.1/libcloud/test/dns/fixtures/zerigo/list_records.xml   
    2013-09-04 12:31:05.000000000 +0200
+++ 
new/apache-libcloud-0.13.2/libcloud/test/dns/fixtures/zerigo/list_records.xml   
    2013-09-15 17:40:04.000000000 +0200
@@ -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>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/test/dns/test_zerigo.py 
new/apache-libcloud-0.13.2/libcloud/test/dns/test_zerigo.py
--- old/apache-libcloud-0.13.1/libcloud/test/dns/test_zerigo.py 2013-09-04 
12:31:05.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/test/dns/test_zerigo.py 2013-09-15 
17:40:04.000000000 +0200
@@ -65,11 +65,16 @@
         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[0].extra['notes'], None)
+        self.assertEqual(records[0].extra['priority'], None)
+
+        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]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/test/loadbalancer/test_cloudstack.py 
new/apache-libcloud-0.13.2/libcloud/test/loadbalancer/test_cloudstack.py
--- old/apache-libcloud-0.13.1/libcloud/test/loadbalancer/test_cloudstack.py    
2013-09-04 12:31:14.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/test/loadbalancer/test_cloudstack.py    
2013-09-15 17:40:43.000000000 +0200
@@ -1,5 +1,4 @@
 import sys
-import unittest
 
 try:
     import simplejson as json
@@ -11,9 +10,12 @@
 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
 
+from libcloud.test import unittest
 from libcloud.test import MockHttpTestCase
 from libcloud.test.file_fixtures import LoadBalancerFileFixtures
 
@@ -21,13 +23,30 @@
     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()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/test/loadbalancer/test_ninefold.py 
new/apache-libcloud-0.13.2/libcloud/test/loadbalancer/test_ninefold.py
--- old/apache-libcloud-0.13.1/libcloud/test/loadbalancer/test_ninefold.py      
1970-01-01 01:00:00.000000000 +0100
+++ new/apache-libcloud-0.13.2/libcloud/test/loadbalancer/test_ninefold.py      
2013-09-15 17:40:04.000000000 +0200
@@ -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())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/test/storage/test_s3.py 
new/apache-libcloud-0.13.2/libcloud/test/storage/test_s3.py
--- old/apache-libcloud-0.13.1/libcloud/test/storage/test_s3.py 2013-09-04 
12:31:14.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/test/storage/test_s3.py 2013-09-15 
17:40:43.000000000 +0200
@@ -459,6 +459,7 @@
         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):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apache-libcloud-0.13.1/libcloud/test/test_connection.py 
new/apache-libcloud-0.13.2/libcloud/test/test_connection.py
--- old/apache-libcloud-0.13.1/libcloud/test/test_connection.py 2013-09-04 
12:31:05.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/test/test_connection.py 2013-09-15 
17:40:04.000000000 +0200
@@ -15,10 +15,10 @@
 # limitations under the License.
 
 import sys
-import unittest
 
-from mock import Mock
+from mock import Mock, call
 
+from libcloud.test import unittest
 from libcloud.common.base import Connection
 
 
@@ -68,6 +68,20 @@
             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')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apache-libcloud-0.13.1/libcloud/utils/xml.py 
new/apache-libcloud-0.13.2/libcloud/utils/xml.py
--- old/apache-libcloud-0.13.1/libcloud/utils/xml.py    2013-09-04 
12:31:05.000000000 +0200
+++ new/apache-libcloud-0.13.2/libcloud/utils/xml.py    2013-09-15 
17:40:04.000000000 +0200
@@ -22,8 +22,17 @@
     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):

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to