Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-glanceclient for
openSUSE:Factory checked in at 2021-05-10 15:37:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-glanceclient (Old)
and /work/SRC/openSUSE:Factory/.python-glanceclient.new.2988 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-glanceclient"
Mon May 10 15:37:20 2021 rev:34 rq:889966 version:3.3.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-glanceclient/python-glanceclient.changes
2020-10-26 16:15:54.210914491 +0100
+++
/work/SRC/openSUSE:Factory/.python-glanceclient.new.2988/python-glanceclient.changes
2021-05-10 15:39:33.701519640 +0200
@@ -1,0 +2,9 @@
+Sun May 2 17:21:26 UTC 2021 - [email protected]
+
+- update to version 3.3.0
+ - Add Python3 wallaby unit tests
+ - Get tasks associated with image
+ - bump mccabe in lc to unblock the gate
+ - Update master for stable/victoria
+
+-------------------------------------------------------------------
Old:
----
python-glanceclient-3.2.2.tar.gz
New:
----
python-glanceclient-3.3.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-glanceclient.spec ++++++
--- /var/tmp/diff_new_pack.2Y2pyE/_old 2021-05-10 15:39:34.137517856 +0200
+++ /var/tmp/diff_new_pack.2Y2pyE/_new 2021-05-10 15:39:34.141517839 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-glanceclient
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,14 @@
Name: python-glanceclient
-Version: 3.2.2
+Version: 3.3.0
Release: 0
+Epoch: 0
Summary: Python API and CLI for OpenStack Glance
License: Apache-2.0
Group: Development/Languages/Python
-URL: https://launchpad.net/python-glanceclient
-Source0:
https://files.pythonhosted.org/packages/source/p/python-glanceclient/python-glanceclient-3.2.2.tar.gz
+URL: https://docs.openstack.org/python-glanceclient
+Source0:
https://files.pythonhosted.org/packages/source/p/python-glanceclient/python-glanceclient-3.3.0.tar.gz
BuildRequires: openstack-macros
BuildRequires: python3-PrettyTable >= 0.7.1
BuildRequires: python3-ddt
@@ -48,7 +49,6 @@
%package -n python3-glanceclient
Summary: Python API and CLI for OpenStack Glance
-Group: Development/Languages/Python
Requires: python3-PrettyTable >= 0.7.1
Requires: python3-keystoneauth1 >= 3.6.2
Requires: python3-oslo.i18n >= 3.15.3
@@ -83,15 +83,15 @@
This package contains auto-generated documentation.
%prep
-%autosetup -p1 -n python-glanceclient-3.2.2
+%autosetup -p1 -n python-glanceclient-3.3.0
%py_req_cleanup
%build
%py3_build
# generate html docs
-PBR_VERSION=3.2.2 %sphinx_build -b html doc/source doc/build/html
-PBR_VERSION=3.2.2 %sphinx_build -b man doc/source doc/build/man
+PBR_VERSION=3.3.0 %sphinx_build -b html doc/source doc/build/html
+PBR_VERSION=3.3.0 %sphinx_build -b man doc/source doc/build/man
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
rm -rf doc/build/man/.{doctrees,buildinfo}
++++++ _service ++++++
--- /var/tmp/diff_new_pack.2Y2pyE/_old 2021-05-10 15:39:34.165517741 +0200
+++ /var/tmp/diff_new_pack.2Y2pyE/_new 2021-05-10 15:39:34.165517741 +0200
@@ -1,8 +1,8 @@
<services>
<service mode="disabled" name="renderspec">
- <param
name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/victoria/openstack/python-glanceclient/python-glanceclient.spec.j2</param>
+ <param
name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/wallaby/openstack/python-glanceclient/python-glanceclient.spec.j2</param>
<param name="output-name">python-glanceclient.spec</param>
- <param
name="requirements">https://opendev.org/openstack/python-glanceclient/raw/branch/stable/victoria/requirements.txt</param>
+ <param
name="requirements">https://opendev.org/openstack/python-glanceclient/raw/branch/stable/wallaby/requirements.txt</param>
<param name="changelog-email">[email protected]</param>
<param name="changelog-provider">gh,openstack,python-glanceclient</param>
</service>
++++++ python-glanceclient-3.2.2.tar.gz -> python-glanceclient-3.3.0.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-glanceclient-3.2.2/.zuul.yaml
new/python-glanceclient-3.3.0/.zuul.yaml
--- old/python-glanceclient-3.2.2/.zuul.yaml 2020-09-09 18:15:55.000000000
+0200
+++ new/python-glanceclient-3.3.0/.zuul.yaml 2021-03-11 11:29:19.000000000
+0100
@@ -82,7 +82,7 @@
- lib-forward-testing-python3
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- - openstack-python3-victoria-jobs
+ - openstack-python3-wallaby-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
check:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-glanceclient-3.2.2/ChangeLog
new/python-glanceclient-3.3.0/ChangeLog
--- old/python-glanceclient-3.2.2/ChangeLog 2020-09-09 18:16:52.000000000
+0200
+++ new/python-glanceclient-3.3.0/ChangeLog 2021-03-11 11:29:50.000000000
+0100
@@ -1,6 +1,14 @@
CHANGES
=======
+3.3.0
+-----
+
+* Get tasks associated with image
+* bump mccabe in lc to unblock the gate
+* Add Python3 wallaby unit tests
+* Update master for stable/victoria
+
3.2.2
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-glanceclient-3.2.2/PKG-INFO
new/python-glanceclient-3.3.0/PKG-INFO
--- old/python-glanceclient-3.2.2/PKG-INFO 2020-09-09 18:16:52.000000000
+0200
+++ new/python-glanceclient-3.3.0/PKG-INFO 2021-03-11 11:29:50.971411000
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: python-glanceclient
-Version: 3.2.2
+Version: 3.3.0
Summary: OpenStack Image API Client Library
Home-page: https://docs.openstack.org/python-glanceclient/latest/
Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-glanceclient-3.2.2/glanceclient/common/utils.py
new/python-glanceclient-3.3.0/glanceclient/common/utils.py
--- old/python-glanceclient-3.2.2/glanceclient/common/utils.py 2020-09-09
18:15:55.000000000 +0200
+++ new/python-glanceclient-3.3.0/glanceclient/common/utils.py 2021-03-11
11:29:19.000000000 +0100
@@ -173,6 +173,34 @@
return ', '.join("'%s'" % i for i in l)
+def has_version(client, version):
+ versions = client.get('/versions')[1].get('versions')
+ supported = ['SUPPORTED', 'CURRENT']
+ for version_struct in versions:
+ if version_struct['id'] == version:
+ return version_struct['status'] in supported
+ return False
+
+
+def print_dict_list(objects, fields):
+ pt = prettytable.PrettyTable([f for f in fields], caching=False)
+ pt.align = 'l'
+ for o in objects:
+ row = []
+ for field in fields:
+ field_name = field.lower().replace(' ', '_')
+ # NOTE (abhishekk) mapping field to actual name in the
+ # structure.
+ if field_name == 'task_id':
+ field_name = 'id'
+ data = o.get(field_name, '')
+ row.append(data)
+
+ pt.add_row(row)
+
+ print(encodeutils.safe_decode(pt.get_string()))
+
+
def print_list(objs, fields, formatters=None, field_settings=None):
'''Prints a list of objects.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-glanceclient-3.2.2/glanceclient/tests/unit/v2/base.py
new/python-glanceclient-3.3.0/glanceclient/tests/unit/v2/base.py
--- old/python-glanceclient-3.2.2/glanceclient/tests/unit/v2/base.py
2020-09-09 18:15:55.000000000 +0200
+++ new/python-glanceclient-3.3.0/glanceclient/tests/unit/v2/base.py
2021-03-11 11:29:19.000000000 +0100
@@ -38,6 +38,13 @@
return resources
+ def get_associated_image_tasks(self, *args, **kwargs):
+ resource = self.controller.get_associated_image_tasks(
+ *args, **kwargs)
+
+ self._assertRequestId(resource)
+ return resource
+
def get(self, *args, **kwargs):
resource = self.controller.get(*args, **kwargs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-glanceclient-3.2.2/glanceclient/tests/unit/v2/test_images.py
new/python-glanceclient-3.3.0/glanceclient/tests/unit/v2/test_images.py
--- old/python-glanceclient-3.2.2/glanceclient/tests/unit/v2/test_images.py
2020-09-09 18:15:55.000000000 +0200
+++ new/python-glanceclient-3.3.0/glanceclient/tests/unit/v2/test_images.py
2021-03-11 11:29:19.000000000 +0100
@@ -20,6 +20,7 @@
import ddt
+from glanceclient.common import utils as common_utils
from glanceclient import exc
from glanceclient.tests.unit.v2 import base
from glanceclient.tests import utils
@@ -674,6 +675,19 @@
]},
),
},
+ '/v2/images/3a4560a1-e585-443e-9b39-553b46ec92d1/tasks': {
+ 'GET': (
+ {},
+ {'tasks': [
+ {
+ 'id': '6f99bf80-2ee6-47cf-acfe-1f1fabb7e810',
+ 'status': 'succeed',
+ 'message': 'Copied 44 MiB',
+ 'updated_at': '2021-03-01T18:28:26.000000'
+ }
+ ]},
+ ),
+ },
}
schema_fixtures = {
@@ -715,6 +729,22 @@
self.controller = base.BaseController(self.api, self.schema_api,
images.Controller)
+ def test_image_tasks_supported(self):
+ with mock.patch.object(common_utils,
+ 'has_version') as mock_has_version:
+ mock_has_version.return_value = True
+ image_tasks = self.controller.get_associated_image_tasks(
+ '3a4560a1-e585-443e-9b39-553b46ec92d1')
+ self.assertEqual(1, len(image_tasks['tasks']))
+
+ def test_image_tasks_not_supported(self):
+ with mock.patch.object(common_utils,
+ 'has_version') as mock_has_version:
+ mock_has_version.return_value = False
+ self.assertRaises(exc.HTTPNotImplemented,
+ self.controller.get_associated_image_tasks,
+ '3a4560a1-e585-443e-9b39-553b46ec92d1')
+
def test_list_images(self):
images = self.controller.list()
self.assertEqual('3a4560a1-e585-443e-9b39-553b46ec92d1', images[0].id)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-glanceclient-3.2.2/glanceclient/tests/unit/v2/test_shell_v2.py
new/python-glanceclient-3.3.0/glanceclient/tests/unit/v2/test_shell_v2.py
--- old/python-glanceclient-3.2.2/glanceclient/tests/unit/v2/test_shell_v2.py
2020-09-09 18:15:55.000000000 +0200
+++ new/python-glanceclient-3.3.0/glanceclient/tests/unit/v2/test_shell_v2.py
2021-03-11 11:29:19.000000000 +0100
@@ -113,6 +113,7 @@
utils.print_list = mock.Mock()
utils.print_dict = mock.Mock()
utils.save_image = mock.Mock()
+ utils.print_dict_list = mock.Mock()
def assert_exits_with_msg(self, func, func_args, err_msg=None):
with mock.patch.object(utils, 'exit') as mocked_utils_exit:
@@ -562,6 +563,57 @@
'size': 1024},
max_column_width=120)
+ def _test_do_image_tasks(self, verbose=False, supported=True):
+ args = self._make_args({'id': 'pass', 'verbose': verbose})
+ expected_columns = ["Message", "Status", "Updated at"]
+ expected_output = {
+ "tasks": [
+ {
+ "image_id": "pass",
+ "id": "task_1",
+ "user_id": "user_1",
+ "request_id": "request_id_1",
+ "message": "fake_message",
+ "status": "status",
+ }
+ ]
+ }
+
+ if verbose:
+ columns_to_prepend = ['Image Id', 'Task Id']
+ columns_to_extend = ['User Id', 'Request Id',
+ 'Result', 'Owner', 'Input', 'Expires at']
+ expected_columns = (columns_to_prepend + expected_columns +
+ columns_to_extend)
+ expected_output["tasks"][0]["Result"] = "Fake Result"
+ expected_output["tasks"][0]["Owner"] = "Fake Owner"
+ expected_output["tasks"][0]["Input"] = "Fake Input"
+ expected_output["tasks"][0]["Expires at"] = "Fake Expiry"
+
+ with mock.patch.object(self.gc.images,
+ 'get_associated_image_tasks') as mocked_tasks:
+ if supported:
+ mocked_tasks.return_value = expected_output
+ else:
+ mocked_tasks.side_effect = exc.HTTPNotImplemented
+ test_shell.do_image_tasks(self.gc, args)
+ mocked_tasks.assert_called_once_with('pass')
+ if supported:
+ utils.print_dict_list.assert_called_once_with(
+ expected_output['tasks'], expected_columns)
+
+ def test_do_image_tasks_without_verbose(self):
+ self._test_do_image_tasks()
+
+ def test_do_image_tasks_with_verbose(self):
+ self._test_do_image_tasks(verbose=True)
+
+ def test_do_image_tasks_unsupported(self):
+ with mock.patch('glanceclient.common.utils.exit') as mock_exit:
+ self._test_do_image_tasks(supported=False)
+ mock_exit.assert_called_once_with(
+ 'Server does not support image tasks API (v2.12)')
+
@mock.patch('sys.stdin', autospec=True)
def test_do_image_create_no_user_props(self, mock_stdin):
args = self._make_args({'name': 'IMG-01', 'disk_format': 'vhd',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-glanceclient-3.2.2/glanceclient/v2/images.py
new/python-glanceclient-3.3.0/glanceclient/v2/images.py
--- old/python-glanceclient-3.2.2/glanceclient/v2/images.py 2020-09-09
18:15:55.000000000 +0200
+++ new/python-glanceclient-3.3.0/glanceclient/v2/images.py 2021-03-11
11:29:19.000000000 +0100
@@ -197,6 +197,25 @@
return self._get(image_id)
@utils.add_req_id_to_object()
+ def get_associated_image_tasks(self, image_id):
+ """Get the tasks associated with an image.
+
+ :param image_id: ID of the image
+ :raises: exc.HTTPNotImplemented if Glance is not new enough to support
+ this API (v2.12).
+ """
+ # NOTE (abhishekk): Verify that /v2i/images/%s/tasks is supported by
+ # glance
+ if utils.has_version(self.http_client, 'v2.12'):
+ url = '/v2/images/%s/tasks' % image_id
+ resp, body = self.http_client.get(url)
+ body.pop('self', None)
+ return body, resp
+ else:
+ raise exc.HTTPNotImplemented(
+ 'This operation is not supported by Glance.')
+
+ @utils.add_req_id_to_object()
def data(self, image_id, do_checksum=True, allow_md5_fallback=False):
"""Retrieve data of an image.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-glanceclient-3.2.2/glanceclient/v2/shell.py
new/python-glanceclient-3.3.0/glanceclient/v2/shell.py
--- old/python-glanceclient-3.2.2/glanceclient/v2/shell.py 2020-09-09
18:15:55.000000000 +0200
+++ new/python-glanceclient-3.3.0/glanceclient/v2/shell.py 2021-03-11
11:29:19.000000000 +0100
@@ -468,6 +468,24 @@
utils.print_image(image, args.human_readable, int(args.max_column_width))
[email protected]('id', metavar='<IMAGE_ID>', help=_('ID of image to get tasks.'))
+def do_image_tasks(gc, args):
+ """Get tasks associated with image"""
+ columns = ['Message', 'Status', 'Updated at']
+ if args.verbose:
+ columns_to_prepend = ['Image Id', 'Task Id']
+ columns_to_extend = ['User Id', 'Request Id',
+ 'Result', 'Owner', 'Input', 'Expires at']
+ columns = columns_to_prepend + columns + columns_to_extend
+ try:
+ tasks = gc.images.get_associated_image_tasks(args.id)
+ utils.print_dict_list(tasks['tasks'], columns)
+ except exc.HTTPNotFound:
+ utils.exit('Image %s not found.' % args.id)
+ except exc.HTTPNotImplemented:
+ utils.exit('Server does not support image tasks API (v2.12)')
+
+
@utils.arg('--image-id', metavar='<IMAGE_ID>', required=True,
help=_('Image to display members of.'))
def do_member_list(gc, args):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-glanceclient-3.2.2/lower-constraints.txt
new/python-glanceclient-3.3.0/lower-constraints.txt
--- old/python-glanceclient-3.2.2/lower-constraints.txt 2020-09-09
18:15:55.000000000 +0200
+++ new/python-glanceclient-3.3.0/lower-constraints.txt 2021-03-11
11:29:19.000000000 +0100
@@ -25,7 +25,7 @@
keystoneauth1==3.6.2
linecache2==1.0.0
MarkupSafe==1.0
-mccabe==0.2.1
+mccabe==0.6.0
monotonic==0.6
msgpack-python==0.4.0
netaddr==0.7.18
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-glanceclient-3.2.2/python_glanceclient.egg-info/PKG-INFO
new/python-glanceclient-3.3.0/python_glanceclient.egg-info/PKG-INFO
--- old/python-glanceclient-3.2.2/python_glanceclient.egg-info/PKG-INFO
2020-09-09 18:16:52.000000000 +0200
+++ new/python-glanceclient-3.3.0/python_glanceclient.egg-info/PKG-INFO
2021-03-11 11:29:50.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: python-glanceclient
-Version: 3.2.2
+Version: 3.3.0
Summary: OpenStack Image API Client Library
Home-page: https://docs.openstack.org/python-glanceclient/latest/
Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-glanceclient-3.2.2/python_glanceclient.egg-info/SOURCES.txt
new/python-glanceclient-3.3.0/python_glanceclient.egg-info/SOURCES.txt
--- old/python-glanceclient-3.2.2/python_glanceclient.egg-info/SOURCES.txt
2020-09-09 18:16:52.000000000 +0200
+++ new/python-glanceclient-3.3.0/python_glanceclient.egg-info/SOURCES.txt
2021-03-11 11:29:50.000000000 +0100
@@ -126,6 +126,7 @@
releasenotes/notes/headers-encoding-bug-rocky-889ccd885a9cc4e8.yaml
releasenotes/notes/hidden-images-support-9e2277ad62bf0d31.yaml
releasenotes/notes/http-headers-per-rfc-8187-aafa3199f863be81.yaml
+releasenotes/notes/image-tasks-api-ee3ea043557a1dfa.yaml
releasenotes/notes/log-request-id-e7f67a23a0ed5c7b.yaml
releasenotes/notes/multi-store-import-45d05a6193ef2c04.yaml
releasenotes/notes/multi-store-support-acc7ad0e7e8b6f99.yaml
@@ -151,6 +152,7 @@
releasenotes/source/train.rst
releasenotes/source/unreleased.rst
releasenotes/source/ussuri.rst
+releasenotes/source/victoria.rst
releasenotes/source/_static/.placeholder
releasenotes/source/_templates/.placeholder
tools/fix_ca_bundle.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-glanceclient-3.2.2/python_glanceclient.egg-info/pbr.json
new/python-glanceclient-3.3.0/python_glanceclient.egg-info/pbr.json
--- old/python-glanceclient-3.2.2/python_glanceclient.egg-info/pbr.json
2020-09-09 18:16:52.000000000 +0200
+++ new/python-glanceclient-3.3.0/python_glanceclient.egg-info/pbr.json
2021-03-11 11:29:50.000000000 +0100
@@ -1 +1 @@
-{"git_version": "8a63928", "is_release": true}
\ No newline at end of file
+{"git_version": "f802c71", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-glanceclient-3.2.2/releasenotes/notes/image-tasks-api-ee3ea043557a1dfa.yaml
new/python-glanceclient-3.3.0/releasenotes/notes/image-tasks-api-ee3ea043557a1dfa.yaml
---
old/python-glanceclient-3.2.2/releasenotes/notes/image-tasks-api-ee3ea043557a1dfa.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/python-glanceclient-3.3.0/releasenotes/notes/image-tasks-api-ee3ea043557a1dfa.yaml
2021-03-11 11:29:19.000000000 +0100
@@ -0,0 +1,5 @@
+---
+features:
+ - |
+ Support for showing tasks associated with given image.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-glanceclient-3.2.2/releasenotes/source/index.rst
new/python-glanceclient-3.3.0/releasenotes/source/index.rst
--- old/python-glanceclient-3.2.2/releasenotes/source/index.rst 2020-09-09
18:15:55.000000000 +0200
+++ new/python-glanceclient-3.3.0/releasenotes/source/index.rst 2021-03-11
11:29:19.000000000 +0100
@@ -6,6 +6,7 @@
:maxdepth: 1
unreleased
+ victoria
ussuri
train
stein
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-glanceclient-3.2.2/releasenotes/source/victoria.rst
new/python-glanceclient-3.3.0/releasenotes/source/victoria.rst
--- old/python-glanceclient-3.2.2/releasenotes/source/victoria.rst
1970-01-01 01:00:00.000000000 +0100
+++ new/python-glanceclient-3.3.0/releasenotes/source/victoria.rst
2021-03-11 11:29:19.000000000 +0100
@@ -0,0 +1,6 @@
+=============================
+Victoria Series Release Notes
+=============================
+
+.. release-notes::
+ :branch: stable/victoria