Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: python-cinderclient

python-cinderclient (1:4.0.0-0ubuntu1) cosmic; urgency=low * Merge from Debian unstable. Remaining changes: - d/control: Enable autopkgtest-pkg-python testsuite. - d/gbp.conf: Retain for gbp and pristine-tar config. * d/p/skip-tests.patch: Updated with failing Py3.7 tests. * New upstream release for OpenStack Rocky. * d/control: Align (Build-)Depends with upstream. -- Corey Bryant <corey.bryant@canonical.com> Wed, 01 Aug 2018 09:52:49 -0400

Modifications :
  1. Download patch cinderclient/tests/unit/v3/test_volumes.py

    --- 1:3.5.0-3/cinderclient/tests/unit/v3/test_volumes.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/unit/v3/test_volumes.py 2018-07-27 13:30:00.000000000 +0000 @@ -26,9 +26,6 @@ from cinderclient.v3 import volumes from six.moves.urllib import parse -cs = fakes.FakeClient() -cs3 = fakes.FakeClient(api_versions.APIVersion('3.16')) - @ddt.ddt class VolumesTest(utils.TestCase): @@ -74,21 +71,17 @@ class VolumesTest(utils.TestCase): fake_volume.revert_to_snapshot, fake_snapshot) def test_create_volume(self): + cs = fakes.FakeClient(api_versions.APIVersion('3.13')) vol = cs.volumes.create(1, group_id='1234', volume_type='5678') - expected = {'volume': {'status': 'creating', - 'description': None, + expected = {'volume': {'description': None, 'availability_zone': None, 'source_volid': None, 'snapshot_id': None, 'size': 1, - 'user_id': None, 'name': None, 'imageRef': None, - 'attach_status': 'detached', 'volume_type': '5678', - 'project_id': None, 'metadata': {}, - 'source_replica': None, 'consistencygroup_id': None, 'multiattach': False, 'group_id': '1234', @@ -159,32 +152,35 @@ class VolumesTest(utils.TestCase): self._assert_request_id(vol) def test_migrate_host(self): - v = cs3.volumes.get('1234') + cs = fakes.FakeClient(api_versions.APIVersion('3.0')) + v = cs.volumes.get('1234') self._assert_request_id(v) - vol = cs3.volumes.migrate_volume(v, 'host_dest', False, False) - cs3.assert_called('POST', '/volumes/1234/action', - {'os-migrate_volume': {'host': 'host_dest', - 'force_host_copy': False, - 'lock_volume': False}}) + vol = cs.volumes.migrate_volume(v, 'host_dest', False, False) + cs.assert_called('POST', '/volumes/1234/action', + {'os-migrate_volume': {'host': 'host_dest', + 'force_host_copy': False, + 'lock_volume': False}}) self._assert_request_id(vol) def test_migrate_with_lock_volume(self): - v = cs3.volumes.get('1234') + cs = fakes.FakeClient(api_versions.APIVersion('3.0')) + v = cs.volumes.get('1234') self._assert_request_id(v) - vol = cs3.volumes.migrate_volume(v, 'dest', False, True) - cs3.assert_called('POST', '/volumes/1234/action', - {'os-migrate_volume': {'host': 'dest', - 'force_host_copy': False, - 'lock_volume': True}}) + vol = cs.volumes.migrate_volume(v, 'dest', False, True) + cs.assert_called('POST', '/volumes/1234/action', + {'os-migrate_volume': {'host': 'dest', + 'force_host_copy': False, + 'lock_volume': True}}) self._assert_request_id(vol) def test_migrate_cluster(self): - v = cs3.volumes.get('fake') + cs = fakes.FakeClient(api_versions.APIVersion('3.16')) + v = cs.volumes.get('fake') self._assert_request_id(v) - vol = cs3.volumes.migrate_volume(v, 'host_dest', False, False, - 'cluster_dest') - cs3.assert_called('POST', '/volumes/fake/action', - {'os-migrate_volume': {'cluster': 'cluster_dest', - 'force_host_copy': False, - 'lock_volume': False}}) + vol = cs.volumes.migrate_volume(v, 'host_dest', False, False, + 'cluster_dest') + cs.assert_called('POST', '/volumes/fake/action', + {'os-migrate_volume': {'cluster': 'cluster_dest', + 'force_host_copy': False, + 'lock_volume': False}}) self._assert_request_id(vol)
  2. Download patch cinderclient/tests/unit/v3/test_resource_filters.py

    --- 1:3.5.0-3/cinderclient/tests/unit/v3/test_resource_filters.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/unit/v3/test_resource_filters.py 2018-07-27 13:29:34.000000000 +0000 @@ -12,10 +12,11 @@ import ddt +from cinderclient import api_versions from cinderclient.tests.unit import utils from cinderclient.tests.unit.v3 import fakes -cs = fakes.FakeClient() +cs = fakes.FakeClient(api_versions.APIVersion('3.33')) @ddt.ddt @@ -24,7 +25,7 @@ class ResourceFilterTests(utils.TestCase {'resource': 'volume', 'query_url': '?resource=volume'}, {'resource': 'group', 'query_url': '?resource=group'}) @ddt.unpack - def test_list_messages(self, resource, query_url): + def test_list_resource_filters(self, resource, query_url): cs.resource_filters.list(resource) url = '/resource_filters' if resource is not None:
  3. Download patch releasenotes/source/queens.rst

    --- 1:3.5.0-3/releasenotes/source/queens.rst 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/releasenotes/source/queens.rst 2018-07-27 13:29:34.000000000 +0000 @@ -0,0 +1,6 @@ +=================================== + Queens Series Release Notes +=================================== + +.. release-notes:: + :branch: stable/queens
  4. Download patch releasenotes/notes/reno.cache

    --- 1:3.5.0-3/releasenotes/notes/reno.cache 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/releasenotes/notes/reno.cache 2018-07-27 13:34:25.000000000 +0000 @@ -0,0 +1,69 @@ +--- +file-contents: + releasenotes/notes/attachment-mode-8427aa6a2fa26e70.yaml: + features: ['Added the ability to specify the read-write or read-only mode of an + + attachment starting with microversion 3.54. The command line usage is + + `cinder attachment-create --mode [rw|ro]`. + + '] + releasenotes/notes/feature-cross-az-backups-9d428ad4dfc552e1.yaml: + features: ['Support cross AZ backup creation specifying desired backup service + AZ + + (added in microversion v3.51) + + '] + releasenotes/notes/remove-deprecations-621919062f867015.yaml: + upgrade: ["The following CLI options were deprecated for one or more releases\ + \ and have\nnow been removed:\n\n``--endpoint-type``\n This option has been\ + \ replaced by ``--os-endpoint-type``.\n\n``--bypass-url``\n This option has\ + \ been replaced by ``--os-endpoint``.\n\n``--os-auth-system``\n This option\ + \ has been replaced by ``--os-auth-type``.\n"] + releasenotes/notes/remove-replv1-cabf2194edb9d963.yaml: + upgrade: ['The volume creation argument ``--source-replica`` on the command line + and + + the ``source_replica`` kwarg for the ``create()`` call when using the + + cinderclient library were for the replication v1 support that was removed + + in the Mitaka release. These options have now been removed. + + '] + releasenotes/notes/support-filter-type-7yt69ub7ccbf7419.yaml: + features: ['New command option ``--filters`` is added to ``type-list`` command + to support filter types since 3.52, and it''s only valid for administrator.'] + releasenotes/notes/transfer-snapshots-555c61477835bcf7.yaml: + features: ['Starting with microversion 3.55, the volume transfer command now has + the + + ability to exclude a volume''s snapshots when transferring a volume to another + + project. The new command format is `cinder transfer-create --no-snapshots`. + + '] +notes: +- files: + - - releasenotes/notes/attachment-mode-8427aa6a2fa26e70.yaml + - !!binary | + ODI2YzVmYzE2ZDZmNTcyY2Y1NDRlM2YwYTkxMzMwYmY5MjcwMWM2OQ== + - - releasenotes/notes/remove-deprecations-621919062f867015.yaml + - !!binary | + YTMzMWYwNmRmMDE1OGZmZjI4MTYyZWFiYzc2NWYxNjQ4NTVhZmNlZQ== + - - releasenotes/notes/remove-replv1-cabf2194edb9d963.yaml + - !!binary | + MzIyNTFmMGVhMzg2MzA5OGI0ZDRkNTQzNjRjOGVlMThmZjE3MGE0NA== + - - releasenotes/notes/transfer-snapshots-555c61477835bcf7.yaml + - !!binary | + YTU1NGZhYTY1MzBmYTBiYjcwNDMwNTcyODY5YTZhMjU1NTc4MzkxMg== + version: 4.0.0 +- files: + - - releasenotes/notes/feature-cross-az-backups-9d428ad4dfc552e1.yaml + - !!binary | + MmM3NzRjYzAxNWNiNjYyNGZlMzc4MjNiNTg2ODY0YzYzNTI1YzM3OQ== + - - releasenotes/notes/support-filter-type-7yt69ub7ccbf7419.yaml + - !!binary | + NWExNTEzMjQ0Y2FmN2FjYmQ0MWUxODE0MTliYzhiNjJiZjRiY2FiYQ== + version: 3.6.0
  5. Download patch cinderclient/v2/shell.py

    --- 1:3.5.0-3/cinderclient/v2/shell.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/v2/shell.py 2018-07-27 13:30:00.000000000 +0000 @@ -208,7 +208,7 @@ def do_show(cs, args): class CheckSizeArgForCreate(argparse.Action): def __call__(self, parser, args, values, option_string=None): - if ((args.snapshot_id or args.source_volid or args.source_replica) + if ((args.snapshot_id or args.source_volid) is None and values is None): if not hasattr(args, 'backup_id') or args.backup_id is None: parser.error('Size is a required parameter if snapshot ' @@ -240,10 +240,6 @@ class CheckSizeArgForCreate(argparse.Act help='Creates volume from volume ID. Default=None.') @utils.arg('--source_volid', help=argparse.SUPPRESS) -@utils.arg('--source-replica', - metavar='<source-replica>', - default=None, - help='Creates volume from replicated volume ID. Default=None.') @utils.arg('--image-id', metavar='<image-id>', default=None, @@ -298,7 +294,7 @@ class CheckSizeArgForCreate(argparse.Act @utils.arg('--allow-multiattach', dest='multiattach', action="store_true", - help=('Allow volume to be attached more than once.' + help=('Allow volume to be attached more than once. (DEPRECATED)' ' Default=False'), default=False) def do_create(cs, args): @@ -343,7 +339,6 @@ def do_create(cs, args): imageRef=image_ref, metadata=volume_metadata, scheduler_hints=hints, - source_replica=args.source_replica, multiattach=args.multiattach) info = dict() @@ -1658,8 +1653,8 @@ def do_encryption_type_show(cs, args): @utils.arg('provider', metavar='<provider>', type=str, - help='The class that provides encryption support. ' - 'For example, LuksEncryptor.') + help='The encryption provider format. ' + 'For example, "luks" or "plain."') @utils.arg('--cipher', metavar='<cipher>', type=str, @@ -1717,7 +1712,7 @@ def do_encryption_type_create(cs, args): type=str, required=False, default=argparse.SUPPRESS, - help="Class providing encryption support (e.g. LuksEncryptor)") + help="Encryption provider format (e.g. 'luks' or 'plain').") @utils.arg('--cipher', metavar='<cipher>', type=str, @@ -2381,25 +2376,26 @@ def do_get_capabilities(cs, args): @utils.arg('volume', metavar='<volume>', - help='Cinder volume already exists in volume backend') + help='Cinder volume that already exists in the volume backend.') @utils.arg('identifier', metavar='<identifier>', - help='Name or other Identifier for existing snapshot') + help='Name or other identifier for existing snapshot. This is ' + 'backend specific.') @utils.arg('--id-type', metavar='<id-type>', default='source-name', help='Type of backend device identifier provided, ' - 'typically source-name or source-id (Default=source-name)') + 'typically source-name or source-id (Default=source-name).') @utils.arg('--name', metavar='<name>', - help='Snapshot name (Default=None)') + help='Snapshot name (Default=None).') @utils.arg('--description', metavar='<description>', - help='Snapshot description (Default=None)') + help='Snapshot description (Default=None).') @utils.arg('--metadata', nargs='*', metavar='<key=value>', - help='Metadata key=value pairs (Default=None)') + help='Metadata key=value pairs (Default=None).') def do_snapshot_manage(cs, args): """Manage an existing snapshot.""" snapshot_metadata = None @@ -2509,17 +2505,17 @@ def do_manageable_list(cs, args): @utils.arg('--marker', metavar='<marker>', default=None, - help='Begin returning volumes that appear later in the volume ' - 'list than that represented by this volume id. ' + help='Begin returning snapshots that appear later in the snapshot ' + 'list than that represented by this snapshot id. ' 'Default=None.') @utils.arg('--limit', metavar='<limit>', default=None, - help='Maximum number of volumes to return. Default=None.') + help='Maximum number of snapshots to return. Default=None.') @utils.arg('--offset', metavar='<offset>', default=None, - help='Number of volumes to skip after marker. Default=None.') + help='Number of snapshots to skip after marker. Default=None.') @utils.arg('--sort', metavar='<key>[:<direction>]', default=None,
  6. Download patch python_cinderclient.egg-info/PKG-INFO
  7. Download patch cinderclient/utils.py

    --- 1:3.5.0-3/cinderclient/utils.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/utils.py 2018-07-27 13:29:34.000000000 +0000 @@ -187,7 +187,7 @@ def print_list(objs, fields, exclude_una def _encode(src): """remove extra 'u' in PY2.""" - if six.PY2 and isinstance(src, unicode): + if six.PY2 and isinstance(src, six.text_type): return src.encode('utf-8') return src
  8. Download patch cinderclient/v3/shell.py
  9. Download patch cinderclient/tests/unit/v3/test_messages.py

    --- 1:3.5.0-3/cinderclient/tests/unit/v3/test_messages.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/unit/v3/test_messages.py 2018-07-27 13:29:34.000000000 +0000 @@ -13,16 +13,16 @@ import ddt from six.moves.urllib import parse +from cinderclient import api_versions from cinderclient.tests.unit import utils from cinderclient.tests.unit.v3 import fakes -cs = fakes.FakeClient() - @ddt.ddt class MessagesTest(utils.TestCase): def test_list_messages(self): + cs = fakes.FakeClient(api_versions.APIVersion('3.3')) cs.messages.list() cs.assert_called('GET', '/messages') @@ -30,26 +30,31 @@ class MessagesTest(utils.TestCase): 'resource_uuid', 'message_level', 'guaranteed_until', 'request_id') def test_list_messages_with_sort(self, sort_string): + cs = fakes.FakeClient(api_versions.APIVersion('3.5')) cs.messages.list(sort=sort_string) cs.assert_called('GET', '/messages?sort=%s' % parse.quote(sort_string)) @ddt.data('id', 'resource_type', 'event_id', 'resource_uuid', 'message_level', 'guaranteed_until', 'request_id') def test_list_messages_with_filters(self, filter_string): + cs = fakes.FakeClient(api_versions.APIVersion('3.5')) cs.messages.list(search_opts={filter_string: 'value'}) cs.assert_called('GET', '/messages?%s=value' % parse.quote( filter_string)) @ddt.data('fake', 'fake:asc', 'fake:desc') def test_list_messages_with_invalid_sort(self, sort_string): + cs = fakes.FakeClient(api_versions.APIVersion('3.5')) self.assertRaises(ValueError, cs.messages.list, sort=sort_string) def test_get_messages(self): + cs = fakes.FakeClient(api_versions.APIVersion('3.3')) fake_id = '1234' cs.messages.get(fake_id) cs.assert_called('GET', '/messages/%s' % fake_id) def test_delete_messages(self): + cs = fakes.FakeClient(api_versions.APIVersion('3.3')) fake_id = '1234' cs.messages.delete(fake_id) cs.assert_called('DELETE', '/messages/%s' % fake_id)
  10. Download patch releasenotes/notes/remove-replv1-cabf2194edb9d963.yaml

    --- 1:3.5.0-3/releasenotes/notes/remove-replv1-cabf2194edb9d963.yaml 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/releasenotes/notes/remove-replv1-cabf2194edb9d963.yaml 2018-07-27 13:30:00.000000000 +0000 @@ -0,0 +1,7 @@ +--- +upgrade: + - | + The volume creation argument ``--source-replica`` on the command line and + the ``source_replica`` kwarg for the ``create()`` call when using the + cinderclient library were for the replication v1 support that was removed + in the Mitaka release. These options have now been removed.
  11. Download patch debian/patches/skip-tests.patch

    --- 1:3.5.0-3/debian/patches/skip-tests.patch 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/debian/patches/skip-tests.patch 2018-08-01 13:52:49.000000000 +0000 @@ -0,0 +1,35 @@ +Description: Skip tests that are also failing upstream. +Author: Corey Bryant <corey.bryant@canonical.com> +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1749244 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1784728 + +--- a/cinderclient/tests/unit/test_shell.py ++++ b/cinderclient/tests/unit/test_shell.py +@@ -234,6 +234,7 @@ + + self.assertEqual(False, _shell.cs.client.verify_cert) + ++ @unittest.skip("bug/1749244: Skipped by Ubuntu") + @mock.patch.object(cinderclient.client.SessionClient, 'authenticate', + side_effect=exceptions.Unauthorized('No')) + def test_session_client_debug_logger(self, mock_session): +--- a/cinderclient/tests/unit/v3/test_shell.py ++++ b/cinderclient/tests/unit/v3/test_shell.py +@@ -44,6 +44,8 @@ + from requests_mock.contrib import fixture as requests_mock_fixture + import six + from six.moves.urllib import parse ++import sys ++import testtools + + import cinderclient + from cinderclient import base +@@ -111,6 +113,8 @@ + + self.assert_called('GET', url) + ++ @testtools.skipIf(sys.version_info.major == 3 and sys.version_info.minor == 7, ++ "bug/1784728: Skipped by Ubuntu, tests fail for Python 3.7") + @ddt.data( + # testcases for list volume + {'command':
  12. Download patch python_cinderclient.egg-info/pbr.json

    --- 1:3.5.0-3/python_cinderclient.egg-info/pbr.json 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/python_cinderclient.egg-info/pbr.json 2018-07-27 13:34:24.000000000 +0000 @@ -0,0 +1 @@ +{"git_version": "e76c495", "is_release": true} \ No newline at end of file
  13. Download patch python_cinderclient.egg-info/not-zip-safe

    --- 1:3.5.0-3/python_cinderclient.egg-info/not-zip-safe 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/python_cinderclient.egg-info/not-zip-safe 2018-07-27 13:34:13.000000000 +0000 @@ -0,0 +1 @@ +
  14. Download patch tools/lintstack.py

    --- 1:3.5.0-3/tools/lintstack.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/tools/lintstack.py 2018-07-27 13:29:34.000000000 +0000 @@ -16,8 +16,6 @@ """pylint error checking.""" -from __future__ import print_function - import json import re import sys @@ -70,6 +68,8 @@ class LintOutput(object): @classmethod def from_line(cls, line): m = re.search(r"(\S+):(\d+): \[(\S+)(, \S+)?] (.*)", line) + if m is None: + return None matched = m.groups() filename, lineno, code, message = (matched[0], int(matched[1]), matched[2], matched[-1]) @@ -83,13 +83,15 @@ class LintOutput(object): @classmethod def from_msg_to_dict(cls, msg): - """From the output of pylint msg, to a dict, where each key + """Convert pylint output to a dict. + + From the output of pylint msg, to a dict, where each key is a unique error identifier, value is a list of LintOutput """ result = {} for line in msg.splitlines(): obj = cls.from_line(line) - if obj.is_ignored(): + if obj is None or obj.is_ignored(): continue key = obj.key() if key not in result: @@ -147,8 +149,10 @@ class ErrorKeys(object): def run_pylint(): buff = StringIO() - reporter = text.ParseableTextReporter(output=buff) - args = ["--include-ids=y", "-E", "cinderclient"] + reporter = text.TextReporter(output=buff) + args = [ + "--msg-template='{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}'", + "-E", "cinderclient"] lint.Run(args, reporter=reporter, exit=False) val = buff.getvalue() buff.close()
  15. Download patch PKG-INFO
  16. Download patch cinderclient/tests/unit/v3/test_volume_transfers.py

    --- 1:3.5.0-3/cinderclient/tests/unit/v3/test_volume_transfers.py 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/unit/v3/test_volume_transfers.py 2018-07-27 13:29:34.000000000 +0000 @@ -0,0 +1,67 @@ +# Copyright 2018 FiberHome Telecommunication Technologies CO.,LTD +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v3 import fakes + + +cs = fakes.FakeClient() + + +class VolumeTransfersTest(utils.TestCase): + + def test_create(self): + vol = cs.transfers.create('1234') + cs.assert_called('POST', '/volume-transfers', + body={'transfer': {'volume_id': '1234', 'name': None, + 'no_snapshots': False}}) + self._assert_request_id(vol) + + def test_create_without_snapshots(self): + vol = cs.transfers.create('1234', no_snapshots=True) + cs.assert_called('POST', '/volume-transfers', + body={'transfer': {'volume_id': '1234', 'name': None, + 'no_snapshots': True}}) + self._assert_request_id(vol) + + def test_get(self): + transfer_id = '5678' + vol = cs.transfers.get(transfer_id) + cs.assert_called('GET', '/volume-transfers/%s' % transfer_id) + self._assert_request_id(vol) + + def test_list(self): + lst = cs.transfers.list() + cs.assert_called('GET', '/volume-transfers/detail') + self._assert_request_id(lst) + + def test_delete(self): + b = cs.transfers.list()[0] + vol = b.delete() + cs.assert_called('DELETE', '/volume-transfers/5678') + self._assert_request_id(vol) + vol = cs.transfers.delete('5678') + self._assert_request_id(vol) + cs.assert_called('DELETE', '/volume-transfers/5678') + vol = cs.transfers.delete(b) + cs.assert_called('DELETE', '/volume-transfers/5678') + self._assert_request_id(vol) + + def test_accept(self): + transfer_id = '5678' + auth_key = '12345' + vol = cs.transfers.accept(transfer_id, auth_key) + cs.assert_called('POST', '/volume-transfers/%s/accept' % transfer_id) + self._assert_request_id(vol)
  17. Download patch README.rst

    --- 1:3.5.0-3/README.rst 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/README.rst 2018-07-27 13:29:34.000000000 +0000 @@ -11,13 +11,9 @@ Python bindings to the OpenStack Cinder =========================================== .. image:: https://img.shields.io/pypi/v/python-cinderclient.svg - :target: https://pypi.python.org/pypi/python-cinderclient/ + :target: https://pypi.org/project/python-cinderclient/ :alt: Latest Version -.. image:: https://img.shields.io/pypi/dm/python-cinderclient.svg - :target: https://pypi.python.org/pypi/python-cinderclient/ - :alt: Downloads - This is a client for the OpenStack Cinder API. There's a Python API (the ``cinderclient`` module), and a command-line script (``cinder``). Each implements 100% of the OpenStack Cinder API. @@ -51,7 +47,7 @@ __ https://github.com/jacobian-archive/p * `Specs`_ * `How to Contribute`_ -.. _PyPi: https://pypi.python.org/pypi/python-cinderclient +.. _PyPi: https://pypi.org/project/python-cinderclient .. _Online Documentation: https://docs.openstack.org/python-cinderclient/latest/ .. _Blueprints: https://blueprints.launchpad.net/python-cinderclient .. _Bugs: https://bugs.launchpad.net/python-cinderclient
  18. Download patch doc/source/user/shell.rst

    --- 1:3.5.0-3/doc/source/user/shell.rst 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/doc/source/user/shell.rst 2018-07-27 13:29:34.000000000 +0000 @@ -37,7 +37,7 @@ For example, in Bash you'd use:: export OS_USERNAME=yourname export OS_PASSWORD=yadayadayada export OS_TENANT_NAME=myproject - export OS_AUTH_URL=http://auth.example.com:5000/v2.0 + export OS_AUTH_URL=http://auth.example.com:5000/v3 export OS_VOLUME_API_VERSION=3 From there, all shell commands take the form::
  19. Download patch cinderclient/v2/volumes.py

    --- 1:3.5.0-3/cinderclient/v2/volumes.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/v2/volumes.py 2018-07-27 13:30:00.000000000 +0000 @@ -242,7 +242,7 @@ class VolumeManager(base.ManagerWithFind volume_type=None, user_id=None, project_id=None, availability_zone=None, metadata=None, imageRef=None, scheduler_hints=None, - source_replica=None, multiattach=False): + multiattach=False): """Create a volume. :param size: Size of volume in GB @@ -251,13 +251,12 @@ class VolumeManager(base.ManagerWithFind :param name: Name of the volume :param description: Description of the volume :param volume_type: Type of volume - :param user_id: User id derived from context - :param project_id: Project id derived from context + :param user_id: User id derived from context (IGNORED) + :param project_id: Project id derived from context (IGNORED) :param availability_zone: Availability Zone to use :param metadata: Optional metadata to set on volume creation :param imageRef: reference to an image stored in glance :param source_volid: ID of source volume to clone from - :param source_replica: ID of source volume to clone replica :param scheduler_hints: (optional extension) arbitrary key-value pairs specified by the client to help boot an instance :param multiattach: Allow the volume to be attached to more than @@ -282,15 +281,10 @@ class VolumeManager(base.ManagerWithFind 'name': name, 'description': description, 'volume_type': volume_type, - 'user_id': user_id, - 'project_id': project_id, 'availability_zone': availability_zone, - 'status': "creating", - 'attach_status': "detached", 'metadata': volume_metadata, 'imageRef': imageRef, 'source_volid': source_volid, - 'source_replica': source_replica, 'multiattach': multiattach, }}
  20. Download patch cinderclient/tests/unit/test_shell.py

    --- 1:3.5.0-3/cinderclient/tests/unit/test_shell.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/unit/test_shell.py 2018-07-27 13:29:34.000000000 +0000 @@ -16,6 +16,7 @@ import re import sys import unittest +import ddt import fixtures import keystoneauth1.exceptions as ks_exc from keystoneauth1.exceptions import DiscoveryFailure @@ -36,6 +37,7 @@ from cinderclient.tests.unit.fixture_dat from cinderclient.tests.unit import utils +@ddt.ddt class ShellTest(utils.TestCase): FAKE_ENV = { @@ -131,6 +133,15 @@ class ShellTest(utils.TestCase): for r in required: self.assertThat(help_text, matchers.MatchesRegex(r, re.DOTALL | re.MULTILINE)) + + @ddt.data('backup-create --help', '--help backup-create') + def test_dash_dash_help_on_subcommand(self, cmd): + required = ['.*?^Creates a volume backup.'] + help_text = self.shell(cmd) + + for r in required: + self.assertThat(help_text, + matchers.MatchesRegex(r, re.DOTALL | re.MULTILINE)) def register_keystone_auth_fixture(self, mocker, url): mocker.register_uri('GET', url,
  21. Download patch cinderclient/client.py

    --- 1:3.5.0-3/cinderclient/client.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/client.py 2018-07-27 13:29:34.000000000 +0000 @@ -69,7 +69,7 @@ REQ_ID_HEADER = 'X-OpenStack-Request-ID' # tell keystoneclient that we can ignore the /v1|v2/{project_id} component of # the service catalog when doing discovery lookups for svc in ('volume', 'volumev2', 'volumev3'): - discover.add_catalog_discover_hack(svc, re.compile('/v[12]/\w+/?$'), '/') + discover.add_catalog_discover_hack(svc, re.compile(r'/v[12]/\w+/?$'), '/') def get_server_version(url):
  22. Download patch RELEASENOTES.rst

    --- 1:3.5.0-3/RELEASENOTES.rst 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/RELEASENOTES.rst 2018-07-27 13:34:25.000000000 +0000 @@ -0,0 +1,73 @@ +=================== +python-cinderclient +=================== + +.. _python-cinderclient_4.0.0: + +4.0.0 +===== + +.. _python-cinderclient_4.0.0_New Features: + +New Features +------------ + +.. releasenotes/notes/attachment-mode-8427aa6a2fa26e70.yaml @ b'826c5fc16d6f572cf544e3f0a91330bf92701c69' + +- Added the ability to specify the read-write or read-only mode of an + attachment starting with microversion 3.54. The command line usage is + `cinder attachment-create --mode [rw|ro]`. + +.. releasenotes/notes/transfer-snapshots-555c61477835bcf7.yaml @ b'a554faa6530fa0bb70430572869a6a2555783912' + +- Starting with microversion 3.55, the volume transfer command now has the + ability to exclude a volume's snapshots when transferring a volume to another + project. The new command format is `cinder transfer-create --no-snapshots`. + + +.. _python-cinderclient_4.0.0_Upgrade Notes: + +Upgrade Notes +------------- + +.. releasenotes/notes/remove-deprecations-621919062f867015.yaml @ b'a331f06df0158fff28162eabc765f164855afcee' + +- The following CLI options were deprecated for one or more releases and have + now been removed: + + ``--endpoint-type`` + This option has been replaced by ``--os-endpoint-type``. + + ``--bypass-url`` + This option has been replaced by ``--os-endpoint``. + + ``--os-auth-system`` + This option has been replaced by ``--os-auth-type``. + +.. releasenotes/notes/remove-replv1-cabf2194edb9d963.yaml @ b'32251f0ea3863098b4d4d54364c8ee18ff170a44' + +- The volume creation argument ``--source-replica`` on the command line and + the ``source_replica`` kwarg for the ``create()`` call when using the + cinderclient library were for the replication v1 support that was removed + in the Mitaka release. These options have now been removed. + + +.. _python-cinderclient_3.6.0: + +3.6.0 +===== + +.. _python-cinderclient_3.6.0_New Features: + +New Features +------------ + +.. releasenotes/notes/feature-cross-az-backups-9d428ad4dfc552e1.yaml @ b'2c774cc015cb6624fe37823b586864c63525c379' + +- Support cross AZ backup creation specifying desired backup service AZ + (added in microversion v3.51) + +.. releasenotes/notes/support-filter-type-7yt69ub7ccbf7419.yaml @ b'5a1513244caf7acbd41e181419bc8b62bf4bcaba' + +- New command option ``--filters`` is added to ``type-list`` command to support filter types since 3.52, and it's only valid for administrator. +
  23. Download patch cinderclient/v3/attachments.py

    --- 1:3.5.0-3/cinderclient/v3/attachments.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/v3/attachments.py 2018-07-27 13:29:34.000000000 +0000 @@ -26,18 +26,24 @@ class VolumeAttachment(base.Resource): class VolumeAttachmentManager(base.ManagerWithFind): resource_class = VolumeAttachment - def create(self, volume_id, connector, instance_id): + @api_versions.wraps('3.27') + def create(self, volume_id, connector, instance_id, mode='null'): """Create a attachment for specified volume.""" body = {'attachment': {'volume_uuid': volume_id, 'instance_uuid': instance_id, 'connector': connector}} + if self.api_version >= api_versions.APIVersion("3.54"): + if mode and mode != 'null': + body['attachment']['mode'] = mode retval = self._create('/attachments', body, 'attachment') return retval.to_dict() + @api_versions.wraps('3.27') def delete(self, attachment): """Delete an attachment by ID.""" return self._delete("/attachments/%s" % base.getid(attachment)) + @api_versions.wraps('3.27') def list(self, detailed=False, search_opts=None, marker=None, limit=None, sort_key=None, sort_dir=None, sort=None): """List all attachments.""" @@ -51,6 +57,7 @@ class VolumeAttachmentManager(base.Manag sort_dir=sort_dir, sort=sort) return self._list(url, resource_type, limit=limit) + @api_versions.wraps('3.27') def show(self, id): """Attachment show. @@ -61,6 +68,7 @@ class VolumeAttachmentManager(base.Manag return self.resource_class(self, body['attachment'], loaded=True, resp=resp) + @api_versions.wraps('3.27') def update(self, id, connector): """Attachment update.""" body = {'attachment': {'connector': connector}}
  24. Download patch releasenotes/notes/support-filter-type-7yt69ub7ccbf7419.yaml

    --- 1:3.5.0-3/releasenotes/notes/support-filter-type-7yt69ub7ccbf7419.yaml 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/releasenotes/notes/support-filter-type-7yt69ub7ccbf7419.yaml 2018-07-27 13:29:34.000000000 +0000 @@ -0,0 +1,5 @@ +--- +features: + - New command option ``--filters`` is added to ``type-list`` + command to support filter types since 3.52, and it's only + valid for administrator.
  25. Download patch python_cinderclient.egg-info/top_level.txt

    --- 1:3.5.0-3/python_cinderclient.egg-info/top_level.txt 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/python_cinderclient.egg-info/top_level.txt 2018-07-27 13:34:24.000000000 +0000 @@ -0,0 +1 @@ +cinderclient
  26. Download patch debian/compat

    --- 1:3.5.0-3/debian/compat 2018-03-11 11:52:49.000000000 +0000 +++ 1:4.0.0-0ubuntu1/debian/compat 2018-08-01 13:52:49.000000000 +0000 @@ -1 +1 @@ -9 +10
  27. Download patch .gitreview

    --- 1:3.5.0-3/.gitreview 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/.gitreview 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -[gerrit] -host=review.openstack.org -port=29418 -project=openstack/python-cinderclient.git
  28. Download patch debian/control

    --- 1:3.5.0-3/debian/control 2018-03-11 11:52:49.000000000 +0000 +++ 1:4.0.0-0ubuntu1/debian/control 2018-08-01 13:52:49.000000000 +0000 @@ -1,14 +1,15 @@ Source: python-cinderclient Section: python Priority: optional -Maintainer: Debian OpenStack <openstack-devel@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: PKG OpenStack <openstack-devel@lists.alioth.debian.org> Uploaders: Corey Bryant <corey.bryant@canonical.com>, Thomas Goirand <zigo@debian.org>, Build-Depends: - debhelper (>= 9), + debhelper (>= 10~), dh-python, - openstack-pkg-tools, + openstack-pkg-tools (>= 52~), python-all, python-pbr (>= 2.0.0), python-setuptools, @@ -16,60 +17,71 @@ Build-Depends: python3-all, python3-pbr (>= 2.0.0), python3-setuptools, + python3-sphinx (>= 1.6.2), Build-Depends-Indep: - python-babel, - python-coverage, - python-ddt, - python-fixtures, - python-hacking, - python-keystoneauth1 (>= 3.3.0), - python-mock, - python-openstackdocstheme (>= 1.17.0), + python-babel (>= 2.3.4), + python-coverage (>= 4.0), + python-ddt (>= 1.0.1), + python-fixtures (>= 3.0.0), + python-keystoneauth1 (>= 3.4.0), + python-mock (>= 2.0.0), + python-openstackdocstheme (>= 1.18.1), python-os-testr (>= 1.0.0), python-oslo.i18n (>= 3.15.3), python-oslo.serialization (>= 2.18.0), python-oslo.utils (>= 3.33.0), - python-prettytable, - python-requests-mock (>= 1.1), - python-simplejson, - python-six, + python-prettytable (>= 0.7.1), + python-requests (>= 2.10.0), + python-requests-mock (>= 1.2.0), + python-simplejson (>= 3.5.1), + python-six (>= 1.10.0), + python-stestr, python-tempest (>= 1:17.1.0), + python-testrepository (>= 0.0.18), python-testtools (>= 2.2.0), python-unittest2, - python3-babel, - python3-ddt, - python3-fixtures, - python3-keystoneauth1 (>= 3.3.0), - python3-mock, + python3-babel (>= 2.3.4), + python3-coverage (>= 4.0), + python3-ddt (>= 1.0.1), + python3-fixtures (>= 3.0.0), + python3-keystoneauth1 (>= 3.4.0), + python3-mock (>= 2.0.0), + python3-openstackdocstheme (>= 1.18.1), python3-os-testr (>= 1.0.0), python3-oslo.i18n (>= 3.15.3), python3-oslo.serialization (>= 2.18.0), python3-oslo.utils (>= 3.33.0), - python3-prettytable, - python3-requests-mock (>= 1.1), - python3-simplejson, - python3-six, + python3-prettytable (>= 0.7.1), + python3-requests (>= 2.10.0), + python3-requests-mock (>= 1.2.0), + python3-simplejson (>= 3.5.1), + python3-six (>= 1.10.0), + python3-stestr, python3-subunit, python3-tempest (>= 1:17.1.0), + python3-testrepository (>= 0.0.18), python3-testtools (>= 2.2.0), subunit, testrepository, Standards-Version: 4.1.3 -Vcs-Browser: https://salsa.debian.org/openstack-team/clients/python-cinderclient -Vcs-Git: https://salsa.debian.org/openstack-team/clients/python-cinderclient.git +Vcs-Browser: https://git.launchpad.net/~ubuntu-server-dev/ubuntu/+source/python-cinderclient +Vcs-Git: git://git.launchpad.net/~ubuntu-server-dev/ubuntu/+source/python-cinderclient Homepage: https://github.com/openstack/python-cinderclient +Testsuite: autopkgtest-pkg-python Package: python-cinderclient Architecture: all Depends: - python-babel, - python-keystoneauth1 (>= 3.3.0), + python-babel (>= 2.3.4), + python-keystoneauth1 (>= 3.4.0), python-oslo.i18n (>= 3.15.3), + python-oslo.serialization (>= 1.10.0), python-oslo.utils (>= 3.33.0), python-pbr (>= 2.0.0), - python-prettytable, - python-simplejson, - python-six, + python-prettytable (>= 0.7.1), + python-requests (>= 2.10.0), + python-simplejson (>= 3.5.1), + python-six (>= 1.10.0), ${misc:Depends}, ${python:Depends}, Provides: @@ -90,14 +102,16 @@ Description: Python bindings to the Open Package: python3-cinderclient Architecture: all Depends: - python3-babel, - python3-keystoneauth1 (>= 3.3.0), + python3-babel (>= 2.3.4), + python3-keystoneauth1 (>= 3.4.0), python3-oslo.i18n (>= 3.15.3), + python3-oslo.serialization (>= 1.10.0), python3-oslo.utils (>= 3.33.0), python3-pbr (>= 2.0.0), - python3-prettytable, - python3-simplejson, - python3-six, + python3-prettytable (>= 0.7.1), + python3-requests (>= 2.10.0), + python3-simplejson (>= 3.5.1), + python3-six (>= 1.10.0), ${misc:Depends}, ${python3:Depends}, Provides:
  29. Download patch cinderclient/tests/unit/v3/test_shell.py

    --- 1:3.5.0-3/cinderclient/tests/unit/v3/test_shell.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/unit/v3/test_shell.py 2018-07-27 13:30:00.000000000 +0000 @@ -96,6 +96,9 @@ class ShellTest(utils.TestCase): return self.shell.cs.assert_called(method, url, body, partial_body, **kwargs) + def assert_call_contained(self, url_part): + self.shell.cs.assert_in_call(url_part) + @ddt.data({'resource': None, 'query_url': None}, {'resource': 'volume', 'query_url': '?resource=volume'}, {'resource': 'group', 'query_url': '?resource=group'}) @@ -244,6 +247,26 @@ class ShellTest(utils.TestCase): self.run_command, 'list --group_id fake_id') + def test_type_list_with_filters_invalid(self): + self.assertRaises(exceptions.UnsupportedAttribute, + self.run_command, + '--os-volume-api-version 3.51 type-list ' + '--filters key=value') + + def test_type_list_with_filters(self): + self.run_command('--os-volume-api-version 3.52 type-list ' + '--filters extra_specs={key:value}') + self.assert_called('GET', mock.ANY) + self.assert_call_contained( + parse.urlencode( + {'extra_specs': + {six.text_type('key'): six.text_type('value')}})) + self.assert_call_contained(parse.urlencode({'is_public': None})) + + def test_type_list_no_filters(self): + self.run_command('--os-volume-api-version 3.52 type-list') + self.assert_called('GET', '/types?is_public=None') + @ddt.data("3.10", "3.11") def test_list_with_group_id_after_3_10(self, version): command = ('--os-volume-api-version %s list --group_id fake_id' % @@ -301,6 +324,49 @@ class ShellTest(utils.TestCase): self.assertTrue(mock_find_volume.called) self.assert_called('POST', '/attachments', body=expected) + @ddt.data({'cmd': '1234 1233', + 'body': {'instance_uuid': '1233', + 'connector': {}, + 'volume_uuid': '1234', + 'mode': 'ro'}}, + {'cmd': '1234 1233 ' + '--connect True ' + '--ip 10.23.12.23 --host server01 ' + '--platform x86_xx ' + '--ostype 123 ' + '--multipath true ' + '--mountpoint /123 ' + '--initiator aabbccdd', + 'body': {'instance_uuid': '1233', + 'connector': {'ip': '10.23.12.23', + 'host': 'server01', + 'os_type': '123', + 'multipath': 'true', + 'mountpoint': '/123', + 'initiator': 'aabbccdd', + 'platform': 'x86_xx'}, + 'volume_uuid': '1234', + 'mode': 'ro'}}, + {'cmd': 'abc 1233', + 'body': {'instance_uuid': '1233', + 'connector': {}, + 'volume_uuid': '1234', + 'mode': 'ro'}}) + @mock.patch('cinderclient.utils.find_resource') + @ddt.unpack + def test_attachment_create_with_mode(self, mock_find_volume, cmd, body): + mock_find_volume.return_value = volumes.Volume(self, + {'id': '1234'}, + loaded=True) + command = ('--os-volume-api-version 3.54 ' + 'attachment-create ' + '--mode ro ') + command += cmd + self.run_command(command) + expected = {'attachment': body} + self.assertTrue(mock_find_volume.called) + self.assert_called('POST', '/attachments', body=expected) + @mock.patch.object(volumes.VolumeManager, 'findall') def test_attachment_create_duplicate_name_vol(self, mock_findall): found = [volumes.Volume(self, {'id': '7654', 'name': 'abc'}, @@ -526,13 +592,8 @@ class ShellTest(utils.TestCase): '--volume-type 4321 1') self.assert_called('GET', '/volumes/1234') expected = {'volume': {'imageRef': None, - 'project_id': None, - 'status': 'creating', 'size': 1, - 'user_id': None, 'availability_zone': None, - 'source_replica': None, - 'attach_status': 'detached', 'source_volid': None, 'consistencygroup_id': None, 'group_id': '5678', @@ -555,13 +616,8 @@ class ShellTest(utils.TestCase): self.run_command(cmd) self.assert_called('GET', '/volumes/1234') expected = {'volume': {'imageRef': None, - 'project_id': None, - 'status': 'creating', - 'user_id': None, 'size': None, 'availability_zone': None, - 'source_replica': None, - 'attach_status': 'detached', 'source_volid': None, 'consistencygroup_id': None, 'name': None, @@ -665,12 +721,12 @@ class ShellTest(utils.TestCase): @ddt.unpack def test_group_create_from_src(self, grp_snap_id, src_grp_id, src): expected = {'create-from-src': {'name': 'test-1', - 'description': 'test-1-desc', - 'user_id': None, - 'project_id': None, - 'status': 'creating', - 'group_snapshot_id': grp_snap_id, - 'source_group_id': src_grp_id}} + 'description': 'test-1-desc'}} + if grp_snap_id: + expected['create-from-src']['group_snapshot_id'] = grp_snap_id + elif src_grp_id: + expected['create-from-src']['source_group_id'] = src_grp_id + cmd = ('--os-volume-api-version 3.14 ' 'group-create-from-src --name test-1 ' '--description test-1-desc ') @@ -1107,6 +1163,19 @@ class ShellTest(utils.TestCase): 'metadata': {'foo': 'bar'}, }} self.assert_called('POST', '/backups', body=expected) + def test_backup_with_az(self): + self.run_command('--os-volume-api-version 3.51 backup-create ' + '--availability-zone AZ2 --name 1234 1234') + expected = {'backup': {'volume_id': 1234, + 'container': None, + 'name': '1234', + 'description': None, + 'incremental': False, + 'force': False, + 'snapshot_id': None, + 'availability_zone': 'AZ2'}} + self.assert_called('POST', '/backups', body=expected) + @mock.patch("cinderclient.utils.print_list") def test_snapshot_list_with_userid(self, mock_print_list): """Ensure 3.41 provides User ID header.""" @@ -1251,13 +1320,24 @@ class ShellTest(utils.TestCase): self.run_command('--os-volume-api-version 3.24 ' 'work-cleanup --cluster clustername --host hostname ' '--binary binaryname --is-up false --disabled true ' - '--resource-id uuid --resource-type Volume') + '--resource-id uuid --resource-type Volume ' + '--service-id 1') expected = {'cluster_name': 'clustername', 'host': 'hostname', 'binary': 'binaryname', 'is_up': 'false', 'disabled': 'true', 'resource_id': 'uuid', - 'resource_type': 'Volume'} + 'resource_type': 'Volume', + 'service_id': 1} self.assert_called('POST', '/workers/cleanup', body=expected) + + def test_create_transfer(self): + self.run_command('--os-volume-api-version 3.55 transfer-create ' + '--no-snapshots 1234') + expected = {'transfer': {'volume_id': 1234, + 'name': None, + 'no_snapshots': True + }} + self.assert_called('POST', '/volume-transfers', body=expected)
  30. Download patch cinderclient/tests/unit/v3/test_group_snapshots.py

    --- 1:3.5.0-3/cinderclient/tests/unit/v3/test_group_snapshots.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/unit/v3/test_group_snapshots.py 2018-07-27 13:29:34.000000000 +0000 @@ -16,11 +16,11 @@ import ddt +from cinderclient import api_versions from cinderclient.tests.unit import utils from cinderclient.tests.unit.v3 import fakes - -cs = fakes.FakeClient() +cs = fakes.FakeClient(api_versions.APIVersion('3.14')) @ddt.ddt
  31. Download patch cinderclient/v3/workers.py

    --- 1:3.5.0-3/cinderclient/v3/workers.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/v3/workers.py 2018-07-27 13:29:34.000000000 +0000 @@ -16,6 +16,7 @@ """ Interface to workers API """ +from cinderclient import api_versions from cinderclient.apiclient import base as common_base from cinderclient import base @@ -33,6 +34,7 @@ class Service(base.Resource): class WorkerManager(base.Manager): base_url = '/workers' + @api_versions.wraps('3.24') def clean(self, **filters): url = self.base_url + '/cleanup' resp, body = self.api.client.post(url, body=filters)
  32. Download patch lower-constraints.txt

    --- 1:3.5.0-3/lower-constraints.txt 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/lower-constraints.txt 2018-07-27 13:29:34.000000000 +0000 @@ -0,0 +1,64 @@ +asn1crypto==0.23.0 +Babel==2.3.4 +cffi==1.7.0 +cliff==2.8.0 +cmd2==0.8.0 +coverage==4.0 +cryptography==2.1 +ddt==1.0.1 +debtcollector==1.2.0 +extras==1.0.0 +fasteners==0.7.0 +fixtures==3.0.0 +flake8==2.5.5 +future==0.16.0 +hacking==0.12.0 +idna==2.6 +iso8601==0.1.11 +jsonschema==2.6.0 +keystoneauth1==3.4.0 +linecache2==1.0.0 +mccabe==0.2.1 +mock==2.0.0 +monotonic==0.6 +msgpack-python==0.4.0 +netaddr==0.7.18 +netifaces==0.10.4 +os-testr==1.0.0 +oslo.concurrency==3.25.0 +oslo.config==5.2.0 +oslo.context==2.19.2 +oslo.i18n==3.15.3 +oslo.log==3.36.0 +oslo.serialization==2.18.0 +oslo.utils==3.33.0 +paramiko==2.0.0 +pbr==2.0.0 +pep8==1.5.7 +prettytable==0.7.1 +pyasn1==0.1.8 +pycparser==2.18 +pyflakes==0.8.1 +pyinotify==0.9.6 +pyparsing==2.1.0 +pyperclip==1.5.27 +python-dateutil==2.5.3 +python-mimeparse==1.6.0 +python-subunit==1.0.0 +pytz==2013.6 +PyYAML==3.12 +reno==2.5.0 +requests-mock==1.2.0 +requests==2.14.2 +rfc3986==0.3.1 +simplejson==3.5.1 +six==1.10.0 +stestr==1.0.0 +stevedore==1.20.0 +tempest==17.1.0 +testrepository==0.0.18 +testtools==2.2.0 +traceback2==1.4.0 +unittest2==1.1.0 +urllib3==1.21.1 +wrapt==1.7.0
  33. Download patch ChangeLog
  34. Download patch tox.ini

    --- 1:3.5.0-3/tox.ini 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/tox.ini 2018-07-27 13:29:34.000000000 +0000 @@ -20,24 +20,29 @@ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.pyc" -delete - ostestr {posargs} + stestr run '{posargs}' + stestr slowest whitelist_externals = find [testenv:pep8] +basepython = python3 commands = flake8 [testenv:pylint] +basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/requirements.txt - pylint==0.26.0 + pylint==1.9.1 commands = bash tools/lintstack.sh whitelist_externals = bash [testenv:venv] +basepython = python3 commands = {posargs} [testenv:cover] +basepython = python3 setenv = {[testenv]setenv} PYTHON=coverage run --source cinderclient --parallel-mode @@ -48,6 +53,7 @@ commands = coverage xml -o cover/coverage.xml [testenv:docs] +basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/requirements.txt @@ -55,6 +61,7 @@ deps = commands = sphinx-build -b html doc/source doc/build/html [testenv:releasenotes] +basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/requirements.txt @@ -62,11 +69,12 @@ deps = commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:functional] -commands = ostestr {posargs} +basepython = python3 +commands = stestr run '{posargs}' setenv = {[testenv]setenv} OS_TEST_PATH = ./cinderclient/tests/functional - OS_VOLUME_API_VERSION = 2 + OS_VOLUME_API_VERSION = 3 # The OS_CACERT environment variable should be passed to the test # environments to specify a CA bundle file to use in verifying a # TLS (https) server certificate. @@ -76,3 +84,10 @@ passenv = OS_* show-source = True ignore = H404,H405,E122,E123,E128,E251 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build + +[testenv:lower-constraints] +basepython = python3 +deps = + -c{toxinidir}/lower-constraints.txt + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/requirements.txt
  35. Download patch cinderclient/tests/functional/test_volume_create_cli.py

    --- 1:3.5.0-3/cinderclient/tests/functional/test_volume_create_cli.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/functional/test_volume_create_cli.py 2018-07-27 13:29:34.000000000 +0000 @@ -27,7 +27,7 @@ class CinderVolumeNegativeTests(base.Cli @ddt.data( ('', (r'Size is a required parameter')), ('-1', (r'Invalid volume size provided for create request')), - ('0', (r'Invalid input received')), + ('0', (r"Volume size '0' must be an integer and greater than 0")), ('size', (r'invalid int value')), ('0.2', (r'invalid int value')), ('2 GB', (r'unrecognized arguments')),
  36. Download patch test-requirements.txt

    --- 1:3.5.0-3/test-requirements.txt 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/test-requirements.txt 2018-07-27 13:29:34.000000000 +0000 @@ -7,9 +7,9 @@ coverage!=4.4,>=4.0 # Apache-2.0 ddt>=1.0.1 # MIT fixtures>=3.0.0 # Apache-2.0/BSD mock>=2.0.0 # BSD -requests-mock>=1.1.0 # Apache-2.0 +reno>=2.5.0 # Apache-2.0 +requests-mock>=1.2.0 # Apache-2.0 tempest>=17.1.0 # Apache-2.0 testtools>=2.2.0 # MIT -testrepository>=0.0.18 # Apache-2.0/BSD -os-testr>=1.0.0 # Apache-2.0 +stestr>=1.0.0 # Apache-2.0 oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
  37. Download patch cinderclient/v3/group_snapshots.py

    --- 1:3.5.0-3/cinderclient/v3/group_snapshots.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/v3/group_snapshots.py 2018-07-27 13:29:34.000000000 +0000 @@ -44,6 +44,7 @@ class GroupSnapshotManager(base.ManagerW """Manage :class:`GroupSnapshot` resources.""" resource_class = GroupSnapshot + @api_versions.wraps('3.14') def create(self, group_id, name=None, description=None, user_id=None, project_id=None): @@ -67,6 +68,7 @@ class GroupSnapshotManager(base.ManagerW return self._create('/group_snapshots', body, 'group_snapshot') + @api_versions.wraps('3.14') def get(self, group_snapshot_id): """Get a group snapshot. @@ -86,6 +88,7 @@ class GroupSnapshotManager(base.ManagerW body = {'status': state} if state else {} return self._action('reset_status', group_snapshot, body) + @api_versions.wraps('3.14') def list(self, detailed=True, search_opts=None): """Lists all group snapshots. @@ -102,6 +105,7 @@ class GroupSnapshotManager(base.ManagerW return self._list("/group_snapshots%s%s" % (detail, query_string), "group_snapshots") + @api_versions.wraps('3.14') def delete(self, group_snapshot): """Delete a group_snapshot. @@ -109,6 +113,7 @@ class GroupSnapshotManager(base.ManagerW """ return self._delete("/group_snapshots/%s" % base.getid(group_snapshot)) + @api_versions.wraps('3.14') def update(self, group_snapshot, **kwargs): """Update the name or description for a group_snapshot.
  38. Download patch doc/source/index.rst

    --- 1:3.5.0-3/doc/source/index.rst 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/doc/source/index.rst 2018-07-27 13:29:34.000000000 +0000 @@ -26,7 +26,8 @@ API:: >>> auth = loader.load_from_options(auth_url=AUTH_URL, ... username=USERNAME, ... password=PASSWORD, - ... project_id=PROJECT_ID) + ... project_id=PROJECT_ID, + ... user_domain_name=USER_DOMAIN_NAME) >>> sess = session.Session(auth=auth) >>> cinder = client.Client(VERSION, session=sess) >>> cinder.volumes.list()
  39. Download patch cinderclient/tests/functional/test_volume_extend_cli.py

    --- 1:3.5.0-3/cinderclient/tests/functional/test_volume_extend_cli.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/functional/test_volume_extend_cli.py 2018-07-27 13:29:34.000000000 +0000 @@ -28,8 +28,10 @@ class CinderVolumeExtendNegativeTests(ba @ddt.data( ('', (r'too few arguments|the following arguments are required')), - ('-1', (r'New size for extend must be greater than current size')), - ('0', (r'Invalid input received')), + ('-1', (r'Invalid input for field/attribute new_size. Value: -1. ' + r'-1 is less than the minimum of 1')), + ('0', (r'Invalid input for field/attribute new_size. Value: 0. ' + r'0 is less than the minimum of 1')), ('size', (r'invalid int value')), ('0.2', (r'invalid int value')), ('2 GB', (r'unrecognized arguments')),
  40. Download patch doc/requirements.txt

    --- 1:3.5.0-3/doc/requirements.txt 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/doc/requirements.txt 2018-07-27 13:29:34.000000000 +0000 @@ -2,6 +2,6 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. # These are needed for docs generation -openstackdocstheme>=1.17.0 # Apache-2.0 +openstackdocstheme>=1.18.1 # Apache-2.0 reno>=2.5.0 # Apache-2.0 -sphinx!=1.6.6,>=1.6.2 # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
  41. Download patch cinderclient/v3/client.py

    --- 1:3.5.0-3/cinderclient/v3/client.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/v3/client.py 2018-07-27 13:29:34.000000000 +0000 @@ -13,8 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -import logging - from cinderclient import api_versions from cinderclient import client from cinderclient.v3 import attachments @@ -112,9 +110,6 @@ class Client(object): setattr(self, extension.name, extension.manager_class(self)) - if not logger: - logger = logging.getLogger(__name__) - self.client = client._construct_http_client( username=username, password=password,
  42. Download patch releasenotes/notes/attachment-mode-8427aa6a2fa26e70.yaml

    --- 1:3.5.0-3/releasenotes/notes/attachment-mode-8427aa6a2fa26e70.yaml 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/releasenotes/notes/attachment-mode-8427aa6a2fa26e70.yaml 2018-07-27 13:29:34.000000000 +0000 @@ -0,0 +1,6 @@ +--- +features: + - | + Added the ability to specify the read-write or read-only mode of an + attachment starting with microversion 3.54. The command line usage is + `cinder attachment-create --mode [rw|ro]`.
  43. Download patch .gitignore

    --- 1:3.5.0-3/.gitignore 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -/.* -!.gitignore -!.mailmap -!.testr.conf -.*.sw? -subunit.log -*,cover -cover -covhtml -*.pyc -AUTHORS -ChangeLog -doc/build -releasenotes/build -build -dist -cinderclient/versioninfo -python_cinderclient.egg-info
  44. Download patch doc/source/cli/details.rst

    --- 1:3.5.0-3/doc/source/cli/details.rst 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/doc/source/cli/details.rst 2018-07-27 13:29:34.000000000 +0000 @@ -4341,11 +4341,18 @@ cinder type-list .. code-block:: console - usage: cinder type-list + usage: cinder type-list [--filters <key=value> [<key=value> ...]] Lists available 'volume types'. (Only admin and tenant users will see private types) +**Optional arguments:** + +``--filters [<key=value> [<key=value> ...]]`` + Filter key and value pairs. Please use 'cinder list-filters' + to check enabled filters from server, Default=None. + (Supported by API version 3.52 and later) + .. _cinder_type-show: cinder type-show
  45. Download patch bindep.txt

    --- 1:3.5.0-3/bindep.txt 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/bindep.txt 2018-07-27 13:29:34.000000000 +0000 @@ -0,0 +1,13 @@ +# This is a cross-platform list tracking distribution packages needed by tests; +# see https://docs.openstack.org/infra/bindep/ for additional information. + +gettext +libffi-dev [platform:dpkg] +libffi-devel [platform:rpm] +libssl-dev [platform:ubuntu-xenial] +locales [platform:debian] +python-dev [platform:dpkg] +python-devel [platform:rpm] +python3-all-dev [platform:ubuntu !platform:ubuntu-precise] +python3-dev [platform:dpkg] +python3-devel [platform:fedora]
  46. Download patch cinderclient/tests/unit/v3/test_attachments.py

    --- 1:3.5.0-3/cinderclient/tests/unit/v3/test_attachments.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/unit/v3/test_attachments.py 2018-07-27 13:29:34.000000000 +0000 @@ -14,23 +14,24 @@ # License for the specific language governing permissions and limitations # under the License. +from cinderclient import api_versions from cinderclient.tests.unit import utils from cinderclient.tests.unit.v3 import fakes -cs = fakes.FakeClient() - class AttachmentsTest(utils.TestCase): def test_create_attachment(self): + cs = fakes.FakeClient(api_versions.APIVersion('3.27')) att = cs.attachments.create( 'e84fda45-4de4-4ce4-8f39-fc9d3b0aa05e', {}, - '557ad76c-ce54-40a3-9e91-c40d21665cc3') + '557ad76c-ce54-40a3-9e91-c40d21665cc3', + 'null') cs.assert_called('POST', '/attachments') self.assertEqual(fakes.fake_attachment['attachment'], att) def test_complete_attachment(self): - att = cs.attachments.complete( - 'a232e9ae') + cs = fakes.FakeClient(api_versions.APIVersion('3.44')) + att = cs.attachments.complete('a232e9ae') self.assertTrue(att.ok)
  47. Download patch cinderclient/v3/volumes.py

    --- 1:3.5.0-3/cinderclient/v3/volumes.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/v3/volumes.py 2018-07-27 13:30:00.000000000 +0000 @@ -77,7 +77,7 @@ class VolumeManager(volumes.VolumeManage volume_type=None, user_id=None, project_id=None, availability_zone=None, metadata=None, imageRef=None, scheduler_hints=None, - source_replica=None, multiattach=False, backup_id=None): + multiattach=False, backup_id=None): """Create a volume. :param size: Size of volume in GB @@ -87,13 +87,12 @@ class VolumeManager(volumes.VolumeManage :param name: Name of the volume :param description: Description of the volume :param volume_type: Type of volume - :param user_id: User id derived from context - :param project_id: Project id derived from context + :param user_id: User id derived from context (IGNORED) + :param project_id: Project id derived from context (IGNORED) :param availability_zone: Availability Zone to use :param metadata: Optional metadata to set on volume creation :param imageRef: reference to an image stored in glance :param source_volid: ID of source volume to clone from - :param source_replica: ID of source volume to clone replica :param scheduler_hints: (optional extension) arbitrary key-value pairs specified by the client to help boot an instance :param multiattach: Allow the volume to be attached to more than @@ -119,15 +118,10 @@ class VolumeManager(volumes.VolumeManage 'name': name, 'description': description, 'volume_type': volume_type, - 'user_id': user_id, - 'project_id': project_id, 'availability_zone': availability_zone, - 'status': "creating", - 'attach_status': "detached", 'metadata': volume_metadata, 'imageRef': imageRef, 'source_volid': source_volid, - 'source_replica': source_replica, 'multiattach': multiattach, 'backup_id': backup_id }} @@ -151,6 +145,7 @@ class VolumeManager(volumes.VolumeManage return self._action('revert', volume, info={'snapshot_id': base.getid(snapshot.id)}) + @api_versions.wraps('3.12') def summary(self, all_tenants): """Get volumes summary.""" url = "/volumes/summary"
  48. Download patch python_cinderclient.egg-info/entry_points.txt

    --- 1:3.5.0-3/python_cinderclient.egg-info/entry_points.txt 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/python_cinderclient.egg-info/entry_points.txt 2018-07-27 13:34:24.000000000 +0000 @@ -0,0 +1,6 @@ +[console_scripts] +cinder = cinderclient.shell:main + +[keystoneauth1.plugin] +noauth = cinderclient.contrib.noauth:CinderNoAuthLoader +
  49. Download patch python_cinderclient.egg-info/requires.txt

    --- 1:3.5.0-3/python_cinderclient.egg-info/requires.txt 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/python_cinderclient.egg-info/requires.txt 2018-07-27 13:34:24.000000000 +0000 @@ -0,0 +1,8 @@ +pbr!=2.1.0,>=2.0.0 +PrettyTable<0.8,>=0.7.1 +keystoneauth1>=3.4.0 +simplejson>=3.5.1 +Babel!=2.4.0,>=2.3.4 +six>=1.10.0 +oslo.i18n>=3.15.3 +oslo.utils>=3.33.0
  50. Download patch doc/source/user/cinder.rst

    --- 1:3.5.0-3/doc/source/user/cinder.rst 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/doc/source/user/cinder.rst 2018-07-27 13:29:34.000000000 +0000 @@ -31,12 +31,12 @@ variables:: export OS_USERNAME=user export OS_PASSWORD=pass export OS_TENANT_NAME=myproject - export OS_AUTH_URL=http://auth.example.com:5000/v2.0 + export OS_AUTH_URL=http://auth.example.com:5000/v3 You can select an API version to use by `--os-volume-api-version` option or by setting corresponding environment variable:: - export OS_VOLUME_API_VERSION=2 + export OS_VOLUME_API_VERSION=3 OPTIONS
  51. Download patch releasenotes/notes/transfer-snapshots-555c61477835bcf7.yaml

    --- 1:3.5.0-3/releasenotes/notes/transfer-snapshots-555c61477835bcf7.yaml 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/releasenotes/notes/transfer-snapshots-555c61477835bcf7.yaml 2018-07-27 13:29:34.000000000 +0000 @@ -0,0 +1,6 @@ +--- +features: + - | + Starting with microversion 3.55, the volume transfer command now has the + ability to exclude a volume's snapshots when transferring a volume to another + project. The new command format is `cinder transfer-create --no-snapshots`.
  52. Download patch cinderclient/tests/unit/v3/fakes.py

    --- 1:3.5.0-3/cinderclient/tests/unit/v3/fakes.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/unit/v3/fakes.py 2018-07-27 13:29:34.000000000 +0000 @@ -630,6 +630,45 @@ class FakeHTTPClient(fake_v2.FakeHTTPCli def get_resource_filters(self, **kw): return 200, {}, {'resource_filters': []} + def get_volume_transfers_detail(self, **kw): + base_uri = 'http://localhost:8776' + tenant_id = '0fa851f6668144cf9cd8c8419c1646c1' + transfer1 = '5678' + transfer2 = 'f625ec3e-13dd-4498-a22a-50afd534cc41' + return (200, {}, + {'transfers': [ + fake_v2._stub_transfer_full(transfer1, base_uri, + tenant_id), + fake_v2._stub_transfer_full(transfer2, base_uri, + tenant_id)]}) + + def get_volume_transfers_5678(self, **kw): + base_uri = 'http://localhost:8776' + tenant_id = '0fa851f6668144cf9cd8c8419c1646c1' + transfer1 = '5678' + return (200, {}, + {'transfer': + fake_v2._stub_transfer_full(transfer1, base_uri, tenant_id)}) + + def delete_volume_transfers_5678(self, **kw): + return (202, {}, None) + + def post_volume_transfers(self, **kw): + base_uri = 'http://localhost:8776' + tenant_id = '0fa851f6668144cf9cd8c8419c1646c1' + transfer1 = '5678' + return (202, {}, + {'transfer': fake_v2._stub_transfer(transfer1, base_uri, + tenant_id)}) + + def post_volume_transfers_5678_accept(self, **kw): + base_uri = 'http://localhost:8776' + tenant_id = '0fa851f6668144cf9cd8c8419c1646c1' + transfer1 = '5678' + return (200, {}, + {'transfer': fake_v2._stub_transfer(transfer1, base_uri, + tenant_id)}) + def fake_request_get(): versions = {'versions': [{'id': 'v1.0',
  53. Download patch releasenotes/source/index.rst

    --- 1:3.5.0-3/releasenotes/source/index.rst 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/releasenotes/source/index.rst 2018-07-27 13:29:34.000000000 +0000 @@ -6,6 +6,7 @@ :maxdepth: 1 unreleased + queens pike ocata newton
  54. Download patch cinderclient/tests/unit/v2/test_volumes.py

    --- 1:3.5.0-3/cinderclient/tests/unit/v2/test_volumes.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/unit/v2/test_volumes.py 2018-07-27 13:30:00.000000000 +0000 @@ -90,20 +90,15 @@ class VolumesTest(utils.TestCase): def test_create_volume_with_hint(self): vol = cs.volumes.create(1, scheduler_hints='uuid') - expected = {'volume': {'status': 'creating', - 'description': None, + expected = {'volume': {'description': None, 'availability_zone': None, 'source_volid': None, 'snapshot_id': None, 'size': 1, - 'user_id': None, 'name': None, 'imageRef': None, - 'attach_status': 'detached', 'volume_type': None, - 'project_id': None, 'metadata': {}, - 'source_replica': None, 'consistencygroup_id': None, 'multiattach': False}, 'OS-SCH-HNT:scheduler_hints': 'uuid'}
  55. Download patch setup.cfg

    --- 1:3.5.0-3/setup.cfg 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/setup.cfg 2018-07-27 13:34:26.000000000 +0000 @@ -1,50 +1,46 @@ [metadata] name = python-cinderclient summary = OpenStack Block Storage API Client Library -description-file = - README.rst +description-file = + README.rst author = OpenStack author-email = openstack-dev@lists.openstack.org home-page = https://docs.openstack.org/python-cinderclient/latest/ -classifier = - Development Status :: 5 - Production/Stable - Environment :: Console - Environment :: OpenStack - Intended Audience :: Information Technology - Intended Audience :: System Administrators - License :: OSI Approved :: Apache Software License - Operating System :: POSIX :: Linux - Programming Language :: Python - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.7 - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.5 - +classifier = + Development Status :: 5 - Production/Stable + Environment :: Console + Environment :: OpenStack + Intended Audience :: Information Technology + Intended Audience :: System Administrators + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.5 [global] -setup-hooks = - pbr.hooks.setup_hook +setup-hooks = + pbr.hooks.setup_hook [files] -packages = - cinderclient +packages = + cinderclient [entry_points] -console_scripts = - cinder = cinderclient.shell:main - -keystoneauth1.plugin = - noauth = cinderclient.contrib.noauth:CinderNoAuthLoader - -[build_sphinx] -builder = html man -all-files = 1 -warning-is-error = 1 -source-dir = doc/source -build-dir = doc/build +console_scripts = + cinder = cinderclient.shell:main +keystoneauth1.plugin = + noauth = cinderclient.contrib.noauth:CinderNoAuthLoader [upload_sphinx] upload-dir = doc/build/html [wheel] universal = 1 + +[egg_info] +tag_build = +tag_date = 0 +
  56. Download patch cinderclient/v3/volume_backups.py

    --- 1:3.5.0-3/cinderclient/v3/volume_backups.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/v3/volume_backups.py 2018-07-27 13:29:34.000000000 +0000 @@ -57,14 +57,8 @@ class VolumeBackupManager(volume_backups the new backup will be based on the snapshot. :rtype: :class:`VolumeBackup` """ - body = {'backup': {'volume_id': volume_id, - 'container': container, - 'name': name, - 'description': description, - 'incremental': incremental, - 'force': force, - 'snapshot_id': snapshot_id, }} - return self._create('/backups', body, 'backup') + return self._create_backup(volume_id, container, name, description, + incremental, force, snapshot_id) @api_versions.wraps("3.43") # noqa: F811 def create(self, volume_id, container=None, @@ -87,12 +81,46 @@ class VolumeBackupManager(volume_backups :rtype: :class:`VolumeBackup` """ # pylint: disable=function-redefined + return self._create_backup(volume_id, container, name, description, + incremental, force, snapshot_id, metadata) + + @api_versions.wraps("3.51") # noqa: F811 + def create(self, volume_id, container=None, name=None, description=None, + incremental=False, force=False, snapshot_id=None, metadata=None, + availability_zone=None): + return self._create_backup(volume_id, container, name, description, + incremental, force, snapshot_id, metadata, + availability_zone) + + def _create_backup(self, volume_id, container=None, name=None, + description=None, incremental=False, force=False, + snapshot_id=None, metadata=None, + availability_zone=None): + """Creates a volume backup. + + :param volume_id: The ID of the volume to backup. + :param container: The name of the backup service container. + :param name: The name of the backup. + :param description: The description of the backup. + :param incremental: Incremental backup. + :param force: If True, allows an in-use volume to be backed up. + :param metadata: Key Value pairs + :param snapshot_id: The ID of the snapshot to backup. This should + be a snapshot of the src volume, when specified, + the new backup will be based on the snapshot. + :param availability_zone: The AZ where we want the backup stored. + :rtype: :class:`VolumeBackup` + """ + # pylint: disable=function-redefined body = {'backup': {'volume_id': volume_id, 'container': container, 'name': name, 'description': description, 'incremental': incremental, 'force': force, - 'snapshot_id': snapshot_id, - 'metadata': metadata, }} + 'snapshot_id': snapshot_id, }} + if metadata: + body['backup']['metadata'] = metadata + if availability_zone: + body['backup']['availability_zone'] = availability_zone return self._create('/backups', body, 'backup')
  57. Download patch cinderclient/v3/groups.py

    --- 1:3.5.0-3/cinderclient/v3/groups.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/v3/groups.py 2018-07-27 13:29:34.000000000 +0000 @@ -111,13 +111,20 @@ class GroupManager(base.ManagerWithFind) :param project_id: Project id derived from context :rtype: A dictionary containing Group metadata """ + + # NOTE(wanghao): According the API schema in cinder side, client + # should NOT specify the group_snapshot_id and source_group_id at + # same time, even one of them is None. + if group_snapshot_id: + create_key = 'group_snapshot_id' + create_value = group_snapshot_id + elif source_group_id: + create_key = 'source_group_id' + create_value = source_group_id + body = {'create-from-src': {'name': name, 'description': description, - 'group_snapshot_id': group_snapshot_id, - 'source_group_id': source_group_id, - 'user_id': user_id, - 'project_id': project_id, - 'status': "creating", }} + create_key: create_value}} self.run_hooks('modify_body_for_action', body, 'create-from-src')
  58. Download patch debian/patches/series

    --- 1:3.5.0-3/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/debian/patches/series 2018-08-01 13:52:49.000000000 +0000 @@ -0,0 +1 @@ +skip-tests.patch
  59. Download patch requirements.txt

    --- 1:3.5.0-3/requirements.txt 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/requirements.txt 2018-07-27 13:29:34.000000000 +0000 @@ -3,7 +3,7 @@ # process, which may cause wedges in the gate later. pbr!=2.1.0,>=2.0.0 # Apache-2.0 PrettyTable<0.8,>=0.7.1 # BSD -keystoneauth1>=3.3.0 # Apache-2.0 +keystoneauth1>=3.4.0 # Apache-2.0 simplejson>=3.5.1 # MIT Babel!=2.4.0,>=2.3.4 # BSD six>=1.10.0 # MIT
  60. Download patch cinderclient/v3/volume_transfers.py

    --- 1:3.5.0-3/cinderclient/v3/volume_transfers.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/v3/volume_transfers.py 2018-07-27 13:29:34.000000000 +0000 @@ -17,4 +17,70 @@ Volume transfer interface (v3 extension). """ -from cinderclient.v2.volume_transfers import * # flake8: noqa +from cinderclient import api_versions +from cinderclient import base +from cinderclient import utils +from cinderclient.v2 import volume_transfers + + +VolumeTransfer = volume_transfers.VolumeTransfer + + +class VolumeTransferManager(volume_transfers.VolumeTransferManager): + @api_versions.wraps("3.55") + def create(self, volume_id, name=None, no_snapshots=False): + """Creates a volume transfer. + + :param volume_id: The ID of the volume to transfer. + :param name: The name of the transfer. + :param no_snapshots: Transfer volumes without snapshots. + :rtype: :class:`VolumeTransfer` + """ + body = {'transfer': {'volume_id': volume_id, + 'name': name, + 'no_snapshots': no_snapshots}} + return self._create('/volume-transfers', body, 'transfer') + + @api_versions.wraps("3.55") + def accept(self, transfer_id, auth_key): + """Accept a volume transfer. + + :param transfer_id: The ID of the transfer to accept. + :param auth_key: The auth_key of the transfer. + :rtype: :class:`VolumeTransfer` + """ + body = {'accept': {'auth_key': auth_key}} + return self._create('/volume-transfers/%s/accept' % transfer_id, + body, 'transfer') + + @api_versions.wraps("3.55") + def get(self, transfer_id): + """Show details of a volume transfer. + + :param transfer_id: The ID of the volume transfer to display. + :rtype: :class:`VolumeTransfer` + """ + return self._get("/volume-transfers/%s" % transfer_id, "transfer") + + @api_versions.wraps("3.55") + def list(self, detailed=True, search_opts=None): + """Get a list of all volume transfer. + + :rtype: list of :class:`VolumeTransfer` + """ + query_string = utils.build_query_param(search_opts) + + detail = "" + if detailed: + detail = "/detail" + + return self._list("/volume-transfers%s%s" % (detail, query_string), + "transfers") + + @api_versions.wraps("3.55") + def delete(self, transfer_id): + """Delete a volume transfer. + + :param transfer_id: The :class:`VolumeTransfer` to delete. + """ + return self._delete("/volume-transfers/%s" % base.getid(transfer_id))
  61. Download patch python_cinderclient.egg-info/SOURCES.txt
  62. Download patch cinderclient/api_versions.py

    --- 1:3.5.0-3/cinderclient/api_versions.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/api_versions.py 2018-07-27 13:29:34.000000000 +0000 @@ -29,7 +29,7 @@ LOG = logging.getLogger(__name__) # key is a deprecated version and value is an alternative version. DEPRECATED_VERSIONS = {"1": "2"} DEPRECATED_VERSION = "2.0" -MAX_VERSION = "3.50" +MAX_VERSION = "3.52" MIN_VERSION = "3.0" _SUBSTITUTIONS = {}
  63. Download patch cinderclient/v3/volume_types.py

    --- 1:3.5.0-3/cinderclient/v3/volume_types.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/v3/volume_types.py 2018-07-27 13:29:34.000000000 +0000 @@ -15,6 +15,7 @@ """Volume Type interface.""" +from six.moves.urllib import parse from cinderclient.apiclient import base as common_base from cinderclient import base @@ -84,12 +85,24 @@ class VolumeTypeManager(base.ManagerWith def list(self, search_opts=None, is_public=None): """Lists all volume types. - :rtype: list of :class:`VolumeType`. - """ - query_string = '' - if not is_public: - query_string = '?is_public=%s' % is_public - return self._list("/types%s" % (query_string), "volume_types") + :param search_opts: Optional search filters. + :param is_public: Whether to only get public types. + :return: List of :class:`VolumeType`. + """ + if not search_opts: + search_opts = dict() + + # Remove 'all_tenants' option added by ManagerWithFind.findall(), + # as it is not a valid search option for volume_types. + search_opts.pop('all_tenants', None) + + # Need to keep backwards compatibility with is_public usage. If it + # isn't included then cinder will assume you want is_public=True, which + # negatively affects the results. + search_opts['is_public'] = is_public + + query_string = "?%s" % parse.urlencode(search_opts) + return self._list("/types%s" % query_string, "volume_types") def get(self, volume_type): """Get a specific volume type.
  64. Download patch cinderclient/shell.py

    --- 1:3.5.0-3/cinderclient/shell.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/shell.py 2018-07-27 13:29:34.000000000 +0000 @@ -173,13 +173,6 @@ class OpenStackCinderShell(object): % DEFAULT_CINDER_ENDPOINT_TYPE) parser.add_argument('--os_endpoint_type', help=argparse.SUPPRESS) - parser.add_argument('--endpoint-type', - metavar='<endpoint-type>', - dest='os_endpoint_type', - help=_('DEPRECATED! Use --os-endpoint-type.')) - parser.add_argument('--endpoint_type', - dest='os_endpoint_type', - help=argparse.SUPPRESS) parser.add_argument('--os-volume-api-version', metavar='<volume-api-ver>', @@ -192,18 +185,6 @@ class OpenStackCinderShell(object): parser.add_argument('--os_volume_api_version', help=argparse.SUPPRESS) - parser.add_argument('--bypass-url', - metavar='<bypass-url>', - dest='os_endpoint', - default=utils.env('CINDERCLIENT_BYPASS_URL', - default=utils.env('CINDER_ENDPOINT')), - help=_("DEPRECATED! Use os_endpoint. " - "Use this API endpoint instead of the " - "Service Catalog. Defaults to " - "env[CINDERCLIENT_BYPASS_URL].")) - parser.add_argument('--bypass_url', - help=argparse.SUPPRESS) - parser.add_argument('--os-endpoint', metavar='<os-endpoint>', dest='os_endpoint', @@ -245,7 +226,7 @@ class OpenStackCinderShell(object): default_auth_plugin = 'password' # Passing [] to loading.register_auth_argparse_arguments to avoid - # the auth_type being overriden by the command line. + # the auth_type being overridden by the command line. loading.register_auth_argparse_arguments( parser, [], default=default_auth_plugin) @@ -269,15 +250,6 @@ class OpenStackCinderShell(object): parser.add_argument('--os_auth_type', help=argparse.SUPPRESS) - parser.add_argument('--os-auth-system', - metavar='<os-auth-system>', - dest='os_auth_type', - default=env_plugin, - help=_('DEPRECATED! Use --os-auth-type. ' - 'Defaults to env[OS_AUTH_SYSTEM].')) - parser.add_argument('--os_auth_system', - help=argparse.SUPPRESS) - parser.set_defaults(os_username=utils.env('OS_USERNAME', 'CINDER_USERNAME')) parser.add_argument('--os_username', @@ -576,6 +548,12 @@ class OpenStackCinderShell(object): do_help, args) self.parser = subcommand_parser + if argv and len(argv) > 1 and '--help' in argv: + argv = [x for x in argv if x != '--help'] + if argv[0] in self.subcommands: + self.subcommands[argv[0]].print_help() + return 0 + if options.help or not argv: subcommand_parser.print_help() return 0
  65. Download patch doc/source/contributor/unit_tests.rst

    --- 1:3.5.0-3/doc/source/contributor/unit_tests.rst 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/doc/source/contributor/unit_tests.rst 2018-07-27 13:29:34.000000000 +0000 @@ -30,7 +30,7 @@ options and what the test run does by de Running a subset of tests using tox ----------------------------------- One common activity is to just run a single test, you can do this with tox -simply by specifying to just run py27 or py34 tests against a single test:: +simply by specifying to just run py27 or py35 tests against a single test:: tox -epy27 -- -n cinderclient.tests.unit.v2.test_volumes.VolumesTest.test_attach @@ -41,105 +41,6 @@ Or all tests in the test_volumes.py file For more information on these options and how to run tests, please see the `ostestr documentation <https://docs.openstack.org/os-testr/latest/>`_. -Run tests wrapper script ------------------------- - -In addition you can also use the wrapper script run_tests.sh by simply -executing:: - - ./run_tests.sh - -This script is a wrapper around the testr testrunner and the flake8 checker. -Note that there has been talk around deprecating this wrapper and this method of -testing, it's currently available still but it may be good to get used to using -tox or even ostestr directly. - -Documentation is left in place for those that still use it. - -Flags ------ - -The ``run_tests.sh`` script supports several flags. You can view a list of -flags by doing:: - - run_tests.sh -h - -This will show the following help information:: - Usage: ./run_tests.sh [OPTION]... - Run cinderclient's test suite(s) - - -V, --virtual-env Always use virtualenv. Install automatically if not present - -N, --no-virtual-env Don't use virtualenv. Run tests in local environment - -s, --no-site-packages Isolate the virtualenv from the global Python environment - -r, --recreate-db Recreate the test database (deprecated, as this is now the default). - -n, --no-recreate-db Don't recreate the test database. - -f, --force Force a clean re-build of the virtual environment. Useful when dependencies have been added. - -u, --update Update the virtual environment with any newer package versions - -p, --pep8 Just run PEP8 and HACKING compliance check - -P, --no-pep8 Don't run static code checks - -c, --coverage Generate coverage report - -d, --debug Run tests with testtools instead of testr. This allows you to use the debugger. - -h, --help Print this usage message - --hide-elapsed Don't print the elapsed time for each test along with slow test list - --virtual-env-path <path> Location of the virtualenv directory - Default: $(pwd) - --virtual-env-name <name> Name of the virtualenv directory - Default: .venv - --tools-path <dir> Location of the tools directory - Default: $(pwd) - - Note: with no options specified, the script will try to run the tests in a virtual environment, - If no virtualenv is found, the script will ask if you would like to create one. If you - prefer to run tests NOT in a virtual environment, simply pass the -N option. - -Because ``run_tests.sh`` is a wrapper around testr, it also accepts the same -flags as testr. See the documentation for details about these additional flags: -`ostestr documentation <https://docs.openstack.org/os-testr/latest/>`_. - -.. _nose options documentation: http://readthedocs.org/docs/nose/en/latest/usage.html#options - -Suppressing logging output when tests fail ------------------------------------------- - -By default, when one or more unit test fails, all of the data sent to the -logger during the failed tests will appear on standard output, which typically -consists of many lines of texts. The logging output can make it difficult to -identify which specific tests have failed, unless your terminal has a large -scrollback buffer or you have redirected output to a file. - -You can suppress the logging output by calling ``run_tests.sh`` with the nose -flag:: - - --nologcapture - -Virtualenv ----------- - -By default, the tests use the Python packages installed inside a virtualenv. -(This is equivalent to using the ``-V, --virtualenv`` flag). If the virtualenv -does not exist, it will be created the first time the tests are run. - -If you wish to recreate the virtualenv, call ``run_tests.sh`` with the flag:: - - -f, --force - -Recreating the virtualenv is useful if the package dependencies have changed -since the virtualenv was last created. If the ``requirements.txt`` or -``tools/install_venv.py`` files have changed, it's a good idea to recreate the -virtualenv. - -By default, the unit tests will see both the packages in the virtualenv and -the packages that have been installed in the Python global environment. In -some cases, the packages in the Python global environment may cause a conflict -with the packages in the virtualenv. If this occurs, you can isolate the -virtualenv from the global environment by using the flag:: - - -s, --no-site packages - -If you do not wish to use a virtualenv at all, use the flag:: - - -N, --no-virtual-env - Gotchas -------
  66. Download patch AUTHORS
  67. Download patch doc/source/cli/index.rst

    --- 1:3.5.0-3/doc/source/cli/index.rst 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/doc/source/cli/index.rst 2018-07-27 13:29:34.000000000 +0000 @@ -31,12 +31,12 @@ variables:: export OS_USERNAME=user export OS_PASSWORD=pass export OS_TENANT_NAME=myproject - export OS_AUTH_URL=http://auth.example.com:5000/v2.0 + export OS_AUTH_URL=http://auth.example.com:5000/v3 You can select an API version to use by `--os-volume-api-version` option or by setting corresponding environment variable:: - export OS_VOLUME_API_VERSION=2 + export OS_VOLUME_API_VERSION=3 OPTIONS
  68. Download patch cinderclient/tests/functional/test_cli.py

    --- 1:3.5.0-3/cinderclient/tests/functional/test_cli.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/functional/test_cli.py 2018-07-27 13:29:34.000000000 +0000 @@ -17,7 +17,14 @@ from cinderclient.tests.functional impor class CinderVolumeTests(base.ClientTestBase): """Check of base cinder volume commands.""" - VOLUME_PROPERTY = ('attachment_ids', 'attached_servers', + CREATE_VOLUME_PROPERTY = ('attachments', 'multiattach', + 'os-vol-tenant-attr:tenant_id', + 'availability_zone', 'bootable', + 'created_at', 'description', 'encrypted', 'id', + 'metadata', 'name', 'size', 'status', + 'user_id', 'volume_type') + + SHOW_VOLUME_PROPERTY = ('attachment_ids', 'attached_servers', 'availability_zone', 'bootable', 'created_at', 'description', 'encrypted', 'id', 'metadata', 'name', 'size', 'status', @@ -26,7 +33,7 @@ class CinderVolumeTests(base.ClientTestB def test_volume_create_delete_id(self): """Create and delete a volume by ID.""" volume = self.object_create('volume', params='1') - self.assert_object_details(self.VOLUME_PROPERTY, volume.keys()) + self.assert_object_details(self.CREATE_VOLUME_PROPERTY, volume.keys()) self.object_delete('volume', volume['id']) self.check_object_deleted('volume', volume['id']) @@ -44,7 +51,7 @@ class CinderVolumeTests(base.ClientTestB output = self.cinder('show', params='TestVolumeShow') volume = self._get_property_from_output(output) self.assertEqual('TestVolumeShow', volume['name']) - self.assert_object_details(self.VOLUME_PROPERTY, volume.keys()) + self.assert_object_details(self.SHOW_VOLUME_PROPERTY, volume.keys()) self.object_delete('volume', volume['id']) self.check_object_deleted('volume', volume['id'])
  69. Download patch .zuul.yaml

    --- 1:3.5.0-3/.zuul.yaml 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/.zuul.yaml 2018-07-27 13:29:34.000000000 +0000 @@ -24,8 +24,11 @@ - project: - name: openstack/python-cinderclient check: jobs: - cinderclient-dsvm-functional - cinderclient-dsvm-functional-identity-v3-only + - openstack-tox-lower-constraints + gate: + jobs: + - openstack-tox-lower-constraints
  70. Download patch debian/gbp.conf

    --- 1:3.5.0-3/debian/gbp.conf 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/debian/gbp.conf 2018-08-01 13:52:49.000000000 +0000 @@ -0,0 +1,7 @@ +[DEFAULT] +debian-branch = master +upstream-tag = %(version)s +pristine-tar = True + +[buildpackage] +export-dir = ../build-area
  71. Download patch cinderclient/tests/unit/v3/test_groups.py

    --- 1:3.5.0-3/cinderclient/tests/unit/v3/test_groups.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/unit/v3/test_groups.py 2018-07-27 13:29:34.000000000 +0000 @@ -16,10 +16,11 @@ import ddt +from cinderclient import api_versions from cinderclient.tests.unit import utils from cinderclient.tests.unit.v3 import fakes -cs = fakes.FakeClient() +cs = fakes.FakeClient(api_versions.APIVersion('3.13')) @ddt.ddt @@ -123,16 +124,13 @@ class GroupsTest(utils.TestCase): self._assert_request_id(grp) def test_create_group_from_src_snap(self): + cs = fakes.FakeClient(api_versions.APIVersion('3.14')) grp = cs.groups.create_from_src('5678', None, name='group') expected = { 'create-from-src': { - 'status': 'creating', 'description': None, - 'user_id': None, 'name': 'group', - 'group_snapshot_id': '5678', - 'project_id': None, - 'source_group_id': None + 'group_snapshot_id': '5678' } } cs.assert_called('POST', '/groups/action', @@ -140,16 +138,13 @@ class GroupsTest(utils.TestCase): self._assert_request_id(grp) def test_create_group_from_src_group_(self): + cs = fakes.FakeClient(api_versions.APIVersion('3.14')) grp = cs.groups.create_from_src(None, '5678', name='group') expected = { 'create-from-src': { - 'status': 'creating', 'description': None, - 'user_id': None, 'name': 'group', - 'source_group_id': '5678', - 'project_id': None, - 'group_snapshot_id': None + 'source_group_id': '5678' } } cs.assert_called('POST', '/groups/action', @@ -157,6 +152,7 @@ class GroupsTest(utils.TestCase): self._assert_request_id(grp) def test_enable_replication_group(self): + cs = fakes.FakeClient(api_versions.APIVersion('3.38')) expected = {'enable_replication': {}} g0 = cs.groups.list()[0] grp = g0.enable_replication() @@ -170,6 +166,7 @@ class GroupsTest(utils.TestCase): cs.assert_called('POST', '/groups/1234/action', body=expected) def test_disable_replication_group(self): + cs = fakes.FakeClient(api_versions.APIVersion('3.38')) expected = {'disable_replication': {}} g0 = cs.groups.list()[0] grp = g0.disable_replication() @@ -183,6 +180,7 @@ class GroupsTest(utils.TestCase): cs.assert_called('POST', '/groups/1234/action', body=expected) def test_failover_replication_group(self): + cs = fakes.FakeClient(api_versions.APIVersion('3.38')) expected = {'failover_replication': {'allow_attached_volume': False, 'secondary_backend_id': None}} @@ -198,6 +196,7 @@ class GroupsTest(utils.TestCase): cs.assert_called('POST', '/groups/1234/action', body=expected) def test_list_replication_targets(self): + cs = fakes.FakeClient(api_versions.APIVersion('3.38')) expected = {'list_replication_targets': {}} g0 = cs.groups.list()[0] grp = g0.list_replication_targets()
  72. Download patch cinderclient/shell_utils.py

    --- 1:3.5.0-3/cinderclient/shell_utils.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/shell_utils.py 2018-07-27 13:29:34.000000000 +0000 @@ -27,6 +27,10 @@ _quota_infos = ['Type', 'In_use', 'Reser def print_volume_image(image): + if 'volume_type' in image[1]['os-volume_upload_image']: + volume_type_name = ( + image[1]['os-volume_upload_image']['volume_type']['name']) + image[1]['os-volume_upload_image']['volume_type'] = volume_type_name utils.print_dict(image[1]['os-volume_upload_image'])
  73. Download patch releasenotes/notes/remove-deprecations-621919062f867015.yaml

    --- 1:3.5.0-3/releasenotes/notes/remove-deprecations-621919062f867015.yaml 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/releasenotes/notes/remove-deprecations-621919062f867015.yaml 2018-07-27 13:29:34.000000000 +0000 @@ -0,0 +1,15 @@ +--- +upgrade: + - | + The following CLI options were deprecated for one or more releases and have + now been removed: + + ``--endpoint-type`` + This option has been replaced by ``--os-endpoint-type``. + + ``--bypass-url`` + This option has been replaced by ``--os-endpoint``. + + ``--os-auth-system`` + This option has been replaced by ``--os-auth-type``. +
  74. Download patch python_cinderclient.egg-info/dependency_links.txt

    --- 1:3.5.0-3/python_cinderclient.egg-info/dependency_links.txt 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/python_cinderclient.egg-info/dependency_links.txt 2018-07-27 13:34:24.000000000 +0000 @@ -0,0 +1 @@ +
  75. Download patch releasenotes/notes/feature-cross-az-backups-9d428ad4dfc552e1.yaml

    --- 1:3.5.0-3/releasenotes/notes/feature-cross-az-backups-9d428ad4dfc552e1.yaml 1970-01-01 00:00:00.000000000 +0000 +++ 1:4.0.0-0ubuntu1/releasenotes/notes/feature-cross-az-backups-9d428ad4dfc552e1.yaml 2018-07-27 13:29:34.000000000 +0000 @@ -0,0 +1,5 @@ +--- +features: + - | + Support cross AZ backup creation specifying desired backup service AZ + (added in microversion v3.51)
  76. Download patch cinderclient/tests/unit/v2/test_shell.py

    --- 1:3.5.0-3/cinderclient/tests/unit/v2/test_shell.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/unit/v2/test_shell.py 2018-07-27 13:30:00.000000000 +0000 @@ -94,13 +94,8 @@ class ShellTest(utils.TestCase): self.run_command('create --metadata key1="--test1" 1') self.assert_called('GET', '/volumes/1234') expected = {'volume': {'imageRef': None, - 'project_id': None, - 'status': 'creating', 'size': 1, - 'user_id': None, 'availability_zone': None, - 'source_replica': None, - 'attach_status': 'detached', 'source_volid': None, 'consistencygroup_id': None, 'name': None, @@ -115,13 +110,8 @@ class ShellTest(utils.TestCase): self.run_command('create --metadata key1="--t1" --name="t" 1') self.assert_called('GET', '/volumes/1234') expected = {'volume': {'imageRef': None, - 'project_id': None, - 'status': 'creating', 'size': 1, - 'user_id': None, 'availability_zone': None, - 'source_replica': None, - 'attach_status': 'detached', 'source_volid': None, 'consistencygroup_id': None, 'name': '"t"', @@ -135,13 +125,8 @@ class ShellTest(utils.TestCase): def test_delimit_metadata_args(self): self.run_command('create --metadata key1="test1" key2="test2" 1') expected = {'volume': {'imageRef': None, - 'project_id': None, - 'status': 'creating', 'size': 1, - 'user_id': None, 'availability_zone': None, - 'source_replica': None, - 'attach_status': 'detached', 'source_volid': None, 'consistencygroup_id': None, 'name': None, @@ -157,13 +142,8 @@ class ShellTest(utils.TestCase): self.run_command('create --metadata key1="t1" --name="t" 1') self.assert_called('GET', '/volumes/1234') expected = {'volume': {'imageRef': None, - 'project_id': None, - 'status': 'creating', 'size': 1, - 'user_id': None, 'availability_zone': None, - 'source_replica': None, - 'attach_status': 'detached', 'source_volid': None, 'consistencygroup_id': None, 'name': '"t"', @@ -345,19 +325,9 @@ class ShellTest(utils.TestCase): self.assert_called_anytime('POST', '/volumes', partial_body=expected) self.assert_called('GET', '/volumes/1234') - def test_create_volume_from_replica(self): - expected = {'volume': {'size': None}} - - expected['volume']['source_replica'] = '1234' - self.run_command('create --source-replica=1234') - self.assert_called_anytime('POST', '/volumes', partial_body=expected) - self.assert_called('GET', '/volumes/1234') - def test_create_volume_from_image(self): - expected = {'volume': {'status': 'creating', - 'size': 1, - 'imageRef': '1234', - 'attach_status': 'detached'}} + expected = {'volume': {'size': 1, + 'imageRef': '1234'}} self.run_command('create --image=1234 1') self.assert_called_anytime('POST', '/volumes', partial_body=expected) self.assert_called('GET', '/volumes/1234') @@ -386,8 +356,7 @@ class ShellTest(utils.TestCase): self.assertRaises(SystemExit, self.run_command, 'create') def test_create_size_zero_if_not_snapshot_or_clone(self): - expected = {'volume': {'status': 'creating', - 'size': 0}} + expected = {'volume': {'size': 0}} self.run_command('create 0') self.assert_called_anytime('POST', '/volumes', partial_body=expected) self.assert_called('GET', '/volumes/1234')
  77. Download patch cinderclient/tests/unit/fakes.py

    --- 1:3.5.0-3/cinderclient/tests/unit/fakes.py 2018-01-23 22:58:59.000000000 +0000 +++ 1:4.0.0-0ubuntu1/cinderclient/tests/unit/fakes.py 2018-07-27 13:29:34.000000000 +0000 @@ -51,17 +51,23 @@ class FakeClient(object): result = False return result + def assert_in_call(self, url_part): + """Assert a call contained a part in its URL.""" + assert self.client.callstack, "Expected call but no calls were made" + + called = self.client.callstack[-1][1] + assert url_part in called, 'Expected %s in call but found %s' % ( + url_part, called) + def assert_called(self, method, url, body=None, partial_body=None, pos=-1, **kwargs): - """ - Assert than an API method was just called. - """ + """Assert than an API method was just called.""" expected = (method, url) - called = self.client.callstack[pos][0:2] - assert self.client.callstack, ("Expected %s %s but no calls " "were made." % expected) + called = self.client.callstack[pos][0:2] + assert expected == called, 'Expected %s %s; got %s %s' % ( expected + called)
  78. Download patch cinderclient/apiclient/client.py
  1. python-cinderclient