Hello community,

here is the log from the commit of package openstack-glance for 
openSUSE:Factory checked in at 2013-03-08 09:28:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openstack-glance (Old)
 and      /work/SRC/openSUSE:Factory/.openstack-glance.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openstack-glance", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/openstack-glance/openstack-glance.changes        
2013-02-08 07:12:47.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.openstack-glance.new/openstack-glance.changes   
2013-03-08 09:28:49.000000000 +0100
@@ -1,0 +2,14 @@
+Wed Mar  6 15:25:21 UTC 2013 - [email protected]
+
+- Update to version 2012.2.4+git.1362583521.1fb759d:
+  + Swallow UserWarning from glance-cache-manage
+  + Avoid dangling partial image on size/checksum mismatch
+
+--------------------------------------------------------------------
+Tue Mar  5 17:17:04 UTC 2013 - [email protected]
+
+- Update to version 2012.2.4+git.1362503824.afe6166:
+  + Fix broken JSON schemas in v2 tests
+  + Prints list-cached dates in isoformat
+
+--------------------------------------------------------------------

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

Other differences:
------------------
++++++ openstack-glance-doc.spec ++++++
--- /var/tmp/diff_new_pack.LARyCp/_old  2013-03-08 09:28:51.000000000 +0100
+++ /var/tmp/diff_new_pack.LARyCp/_new  2013-03-08 09:28:51.000000000 +0100
@@ -19,7 +19,7 @@
 %define component glance
 
 Name:           openstack-%{component}-doc
-Version:        2012.2.4+git.1360133885.98d9928
+Version:        2012.2.4+git.1362583521.1fb759d
 Release:        1
 License:        Apache-2.0
 Summary:        OpenStack Image Service (Glance) - Documentation

++++++ openstack-glance.spec ++++++
--- /var/tmp/diff_new_pack.LARyCp/_old  2013-03-08 09:28:51.000000000 +0100
+++ /var/tmp/diff_new_pack.LARyCp/_new  2013-03-08 09:28:51.000000000 +0100
@@ -22,7 +22,7 @@
 %define username openstack-%{component}
 
 Name:           openstack-%{component}
-Version:        2012.2.4+git.1360133885.98d9928
+Version:        2012.2.4+git.1362583521.1fb759d
 Release:        1
 License:        Apache-2.0
 Summary:        OpenStack Image Service (Glance)

++++++ glance-stable-folsom.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glance-2012.2.4/AUTHORS new/glance-2012.2.4/AUTHORS
--- old/glance-2012.2.4/AUTHORS 2013-02-01 02:08:26.000000000 +0100
+++ new/glance-2012.2.4/AUTHORS 2013-03-06 04:21:00.000000000 +0100
@@ -28,6 +28,7 @@
 Eldar Nugaev <[email protected]>
 Eoghan Glynn <[email protected]>
 Ewan Mellor <[email protected]>
+Flaper Fesp <[email protected]>
 Gabriel Hurley <[email protected]>
 Gerardo Porras <[email protected]>
 Hengqing Hu <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glance-2012.2.4/ChangeLog 
new/glance-2012.2.4/ChangeLog
--- old/glance-2012.2.4/ChangeLog       2013-02-01 02:08:25.000000000 +0100
+++ new/glance-2012.2.4/ChangeLog       2013-03-06 04:20:59.000000000 +0100
@@ -1,3 +1,93 @@
+commit 1fb759d3d2b20b6c04bd3d2c76aa6c9547a1f360
+Merge: f5c0222 03dc862
+Author: Jenkins <[email protected]>
+Date:   Wed Mar 6 03:14:11 2013 +0000
+
+    Merge "Avoid dangling partial image on size/checksum mismatch" into 
stable/folsom
+
+commit f5c0222f7c36074d4b96a1d3bdd0e7960420d89d
+Merge: afe6166 12d28c3
+Author: Jenkins <[email protected]>
+Date:   Wed Mar 6 02:25:13 2013 +0000
+
+    Merge "Swallow UserWarning from glance-cache-manage" into stable/folsom
+
+commit afe61664ac5f933622e349da1c0a92d134a81230
+Author: Flaper Fesp <[email protected]>
+Date:   Mon Jan 21 11:00:58 2013 +0100
+
+    Prints list-cached dates in isoformat
+    
+    Converts dates printed by list-cached to a human readable format
+    (isoformat). It now checks whether the image last_access time is == 0.0
+    and prints "Not Accessed Yet" if so.
+    
+    * Updates openstack.common.timeutils
+    * Fixes bug 1102334
+    
+    Change-Id: I6f60525d8419d45e6962b936a2661825b606cba2
+
+ bin/glance-cache-manage                            |   14 ++++++-
+ glance/openstack/common/timeutils.py               |   42 ++++++++++++++++++--
+ .../functional/v1/test_bin_glance_cache_manage.py  |   13 ++++++
+ 3 files changed, 63 insertions(+), 6 deletions(-)
+
+commit ee1356006e610c04f31299c383941377b4809769
+Author: Brian Waldon <[email protected]>
+Date:   Tue Feb 26 10:47:02 2013 -0800
+
+    Fix broken JSON schemas in v2 tests
+    
+    * The required attribute is not allowed in draft 4 of JSON schema
+    * The dependency on jsonschema can be relaxed back to all versions
+    
+    Change-Id: Id0767cfe2fe46d73999563896f851ffb01aa9489
+
+ glance/tests/unit/v2/test_images_resource.py |    2 --
+ 1 file changed, 2 deletions(-)
+
+commit 12d28c36983ee066a1b62fc66f9fc396a1405fa7
+Author: Eoghan Glynn <[email protected]>
+Date:   Tue Feb 19 11:36:38 2013 +0000
+
+    Swallow UserWarning from glance-cache-manage
+    
+    Fixes bug 1129445
+    
+    Previously, we exposed internal technical debt as an apparent
+    user-facing warning.
+    
+    Now the warning is swallowed in the internal case, but continues
+    to be seen by external users of this library.
+    
+    Note that this fix is not relevant on master, as that the warning
+    no longer occurs in that case.
+    
+    Change-Id: I30a835e0024acac8841b4746968abe7cae9e14cb
+
+ bin/glance-cache-manage |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit 03dc862281feb2124368bcaa4fa766ba0ce99a14
+Author: Eoghan Glynn <[email protected]>
+Date:   Mon Feb 11 18:43:18 2013 +0000
+
+    Avoid dangling partial image on size/checksum mismatch
+    
+    Fixes bug 1122299
+    
+    Previously, when the supplied image size or checksum didn't match
+    the calculated values, partial image image data was left dangling
+    in the backend store.
+    
+    Now, we clean up when the mismatch is detected.
+    
+    Change-Id: I916d78ef3b2065e87df31ec4fb405915417d68aa
+
+ glance/api/v1/images.py                |   14 +++++++++-----
+ glance/tests/functional/v1/test_api.py |   29 +++++++++++++++++++++++++----
+ 2 files changed, 34 insertions(+), 9 deletions(-)
+
 commit 98d9928aaf6d437182cea63e3f1c6c48d08015dc
 Author: Mark McLoughlin <[email protected]>
 Date:   Thu Jan 31 21:32:51 2013 +0000
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glance-2012.2.4/bin/glance-cache-manage 
new/glance-2012.2.4/bin/glance-cache-manage
--- old/glance-2012.2.4/bin/glance-cache-manage 2013-02-01 02:06:18.000000000 
+0100
+++ new/glance-2012.2.4/bin/glance-cache-manage 2013-03-06 04:18:30.000000000 
+0100
@@ -26,6 +26,7 @@
 import os
 import sys
 import time
+import warnings
 
 # If ../glance/__init__.py exists, add ../ to Python search path, so that
 # it will override what happens to be installed in /usr/(local/)lib/python...
@@ -37,9 +38,13 @@
 
 gettext.install('glance', unicode=1)
 
-from glance import client as glance_client
+with warnings.catch_warnings():
+    warnings.simplefilter("ignore")
+    from glance import client as glance_client
+
 from glance.common import exception
 from glance.common import utils
+from glance.openstack.common import timeutils
 from glance.version import version_info as version
 
 
@@ -102,10 +107,19 @@
     print pretty_table.make_header()
 
     for image in images:
+        last_modified = image['last_modified']
+        last_modified = timeutils.iso8601_from_timestamp(last_modified)
+
+        last_accessed = image['last_accessed']
+        if last_accessed == 0:
+            last_accessed = "N/A"
+        else:
+            last_accessed = timeutils.iso8601_from_timestamp(last_accessed)
+
         print pretty_table.make_row(
             image['image_id'],
-            image['last_accessed'],
-            image['last_modified'],
+            last_accessed,
+            last_modified,
             image['size'],
             image['hits'])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glance-2012.2.4/glance/api/v1/images.py 
new/glance-2012.2.4/glance/api/v1/images.py
--- old/glance-2012.2.4/glance/api/v1/images.py 2013-02-01 02:06:18.000000000 
+0100
+++ new/glance-2012.2.4/glance/api/v1/images.py 2013-03-06 04:18:30.000000000 
+0100
@@ -445,6 +445,7 @@
                             "status to 'killed'.") % locals()
                     LOG.error(msg)
                     self._safe_kill(req, image_id)
+                    self._initiate_deletion(req, location, image_id)
                     raise HTTPBadRequest(explanation=msg,
                                          content_type="text/plain",
                                          request=req)
@@ -810,6 +811,13 @@
 
         return {'image_meta': image_meta}
 
+    @staticmethod
+    def _initiate_deletion(req, location, id):
+        if CONF.delayed_delete:
+            schedule_delayed_delete_from_backend(location, id)
+        else:
+            safe_delete_from_backend(location, req.context, id)
+
     @utils.mutating
     def delete(self, req, id):
         """
@@ -856,11 +864,7 @@
             # to delete the image if the backend doesn't yet store it.
             # See https://bugs.launchpad.net/glance/+bug/747799
             if image['location']:
-                if CONF.delayed_delete:
-                    schedule_delayed_delete_from_backend(image['location'], id)
-                else:
-                    safe_delete_from_backend(image['location'],
-                                             req.context, id)
+                self._initiate_deletion(req, image['location'], id)
         except exception.NotFound, e:
             msg = ("Failed to find image to delete: %(e)s" % locals())
             for line in msg.split('\n'):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glance-2012.2.4/glance/openstack/common/timeutils.py 
new/glance-2012.2.4/glance/openstack/common/timeutils.py
--- old/glance-2012.2.4/glance/openstack/common/timeutils.py    2013-02-01 
02:06:18.000000000 +0100
+++ new/glance-2012.2.4/glance/openstack/common/timeutils.py    2013-03-06 
04:18:30.000000000 +0100
@@ -84,6 +84,11 @@
     return datetime.datetime.utcnow()
 
 
+def iso8601_from_timestamp(timestamp):
+    """Returns a iso8601 formated date from timestamp"""
+    return isotime(datetime.datetime.utcfromtimestamp(timestamp))
+
+
 utcnow.override_time = None
 
 
@@ -120,7 +125,36 @@
 
 
 def unmarshall_time(tyme):
-    """Unmarshall a datetime dict."""
-    return datetime.datetime(day=tyme['day'], month=tyme['month'],
-                 year=tyme['year'], hour=tyme['hour'], minute=tyme['minute'],
-                 second=tyme['second'], microsecond=tyme['microsecond'])
+    return datetime.datetime(day=tyme['day'],
+                             month=tyme['month'],
+                             year=tyme['year'],
+                             hour=tyme['hour'],
+                             minute=tyme['minute'],
+                             second=tyme['second'],
+                             microsecond=tyme['microsecond'])
+
+
+def delta_seconds(before, after):
+    """
+    Compute the difference in seconds between two date, time, or
+    datetime objects (as a float, to microsecond resolution).
+    """
+    delta = after - before
+    try:
+        return delta.total_seconds()
+    except AttributeError:
+        return ((delta.days * 24 * 3600) + delta.seconds +
+                float(delta.microseconds) / (10 ** 6))
+
+
+def is_soon(dt, window):
+    """
+    Determines if time is going to happen in the next window seconds.
+
+    :params dt: the time
+    :params window: minimum seconds to remain to consider the time not soon
+
+    :return: True if expiration is within the given duration
+    """
+    soon = (utcnow() + datetime.timedelta(seconds=window))
+    return normalize_time(dt) < soon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/glance-2012.2.4/glance/tests/functional/v1/test_api.py 
new/glance-2012.2.4/glance/tests/functional/v1/test_api.py
--- old/glance-2012.2.4/glance/tests/functional/v1/test_api.py  2013-02-01 
02:06:18.000000000 +0100
+++ new/glance-2012.2.4/glance/tests/functional/v1/test_api.py  2013-03-06 
04:18:30.000000000 +0100
@@ -20,6 +20,7 @@
 import datetime
 import hashlib
 import json
+import os
 import tempfile
 
 import httplib2
@@ -1452,21 +1453,41 @@
 
         self.stop_servers()
 
-    @skip_if_disabled
-    def test_mismatched_size(self):
+    def _do_test_mismatched_attribute(self, attribute, value):
         """
-        Test mismatched size.
+        Test mismatched attribute.
         """
         self.cleanup()
         self.start_servers(**self.__dict__.copy())
 
         image_data = "*" * FIVE_KB
         headers = minimal_headers('Image1')
-        headers['x-image-meta-size'] = str(FIVE_KB + 1)
+        headers[attribute] = value
         path = "http://%s:%d/v1/images"; % ("127.0.0.1", self.api_port)
         http = httplib2.Http()
         response, content = http.request(path, 'POST', headers=headers,
                                          body=image_data)
         self.assertEqual(response.status, 400)
 
+        images_dir = os.path.join(self.test_dir, 'images')
+        image_count = len([name for name in os.listdir(images_dir)
+                           if os.path.isfile(name)])
+        self.assertEquals(image_count, 0)
+
         self.stop_servers()
+
+    @skip_if_disabled
+    def test_mismatched_size(self):
+        """
+        Test mismatched size.
+        """
+        self._do_test_mismatched_attribute('x-image-meta-size',
+                                           str(FIVE_KB + 1))
+
+    @skip_if_disabled
+    def test_mismatched_checksum(self):
+        """
+        Test mismatched checksum.
+        """
+        self._do_test_mismatched_attribute('x-image-meta-checksum',
+                                           'foobar')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/glance-2012.2.4/glance/tests/functional/v1/test_bin_glance_cache_manage.py 
new/glance-2012.2.4/glance/tests/functional/v1/test_bin_glance_cache_manage.py
--- 
old/glance-2012.2.4/glance/tests/functional/v1/test_bin_glance_cache_manage.py  
    2013-02-01 02:06:18.000000000 +0100
+++ 
new/glance-2012.2.4/glance/tests/functional/v1/test_bin_glance_cache_manage.py  
    2013-03-06 04:18:30.000000000 +0100
@@ -17,6 +17,7 @@
 
 """Functional test case that utilizes the bin/glance-cache-manage CLI tool"""
 
+import datetime
 import hashlib
 import httplib2
 import json
@@ -76,6 +77,16 @@
         self.assertEqual(0, exitcode)
         return image_id in out
 
+    def iso_date(self, image_id):
+        """
+        Return True if supplied image ID is cached, False otherwise
+        """
+        cmd = "bin/glance-cache-manage --port=%d list-cached" % self.api_port
+
+        exitcode, out, err = execute(cmd)
+
+        return datetime.date.today().isoformat() in out
+
     def test_no_cache_enabled(self):
         """
         Test that cache index command works
@@ -132,6 +143,8 @@
         self.assertTrue(self.is_image_cached(ids[1]),
                         "%s is not cached." % ids[1])
 
+        self.assertTrue(self.iso_date(ids[1]))
+
         self.stop_servers()
 
     def test_queue(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/glance-2012.2.4/glance/tests/unit/v2/test_images_resource.py 
new/glance-2012.2.4/glance/tests/unit/v2/test_images_resource.py
--- old/glance-2012.2.4/glance/tests/unit/v2/test_images_resource.py    
2013-02-01 02:06:18.000000000 +0100
+++ new/glance-2012.2.4/glance/tests/unit/v2/test_images_resource.py    
2013-03-06 04:18:30.000000000 +0100
@@ -1105,7 +1105,6 @@
         custom_image_properties = {
             'pants': {
                 'type': 'string',
-                'required': True,
                 'enum': ['on', 'off'],
             },
         }
@@ -1541,7 +1540,6 @@
         custom_image_properties = {
             'color': {
                 'type': 'string',
-                'required': True,
                 'enum': ['red', 'green'],
             },
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glance-2012.2.4/glance/versioninfo 
new/glance-2012.2.4/glance/versioninfo
--- old/glance-2012.2.4/glance/versioninfo      2013-02-01 02:08:24.000000000 
+0100
+++ new/glance-2012.2.4/glance/versioninfo      2013-03-06 04:20:58.000000000 
+0100
@@ -1 +1 @@
-2012.2.4~20130201.1.g98d9928
+2012.2.4~20130306.7.g1fb759d

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

Reply via email to