Upversion python-cinderclient to 9.3.0-1
As part of the STX-Openstack upversion to ANTELOPE, the python- cinderclient is being upversioned to version 9.3.0-1, which is the latest supported on ANTELOPE [1]. All patches were updated in order to make the package buildable in the new version. This change also adds the sha256sum field to the downloader path, as it is being recommended to use it in the place of the md5sum. Note that in the new version the /v2 directory is no longer used. [1] https://releases.openstack.org/antelope/#antelope-python-cinderclient Test Plan: PASS: build-pkgs -c -p python-cinderclient Story: 2010715 Task: 48130 Change-Id: I80e733e64f3c22222c52ac1068f841efaf9e9400 Signed-off-by: Romulo Leite <romulo.leite@windriver.com>
This commit is contained in:
parent
a2bbed2381
commit
dece725ea6
@ -1,4 +1,4 @@
|
||||
From 5c420535f8b04efda7a9fac27eeaafde961db6aa Mon Sep 17 00:00:00 2001
|
||||
From 64b639e6c81a11ecf8c52ae8f331f462cce009aa Mon Sep 17 00:00:00 2001
|
||||
From: Charles Short <charles.short@windriver.com>
|
||||
Date: Wed, 27 Oct 2021 17:28:06 +0000
|
||||
Subject: [PATCH] Add package wheel
|
||||
@ -25,5 +25,5 @@ index 8acee49..0d8778c 100755
|
||||
PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages pkgos-dh_auto_test --no-py2
|
||||
endif
|
||||
--
|
||||
2.30.2
|
||||
2.25.1
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
---
|
||||
debname: python-cinderclient
|
||||
debver: 1:7.2.0-3
|
||||
debver: 1:9.3.0-1
|
||||
dl_path:
|
||||
name: python-cinderclient-debian-7.2.0-3.tar.gz
|
||||
url: https://salsa.debian.org/openstack-team/clients/python-cinderclient/-/archive/debian/7.2.0-3/python-cinderclient-debian-7.2.0-3.tar.gz
|
||||
md5sum: b2fae10096bc2cf30935afe409ed9b4c
|
||||
name: python-cinderclient-debian-9.3.0-1.tar.gz
|
||||
url: https://salsa.debian.org/openstack-team/clients/python-cinderclient/-/archive/debian/9.3.0-1/python-cinderclient-debian-9.3.0-1.tar.gz
|
||||
md5sum: 1f23aab079e908bbf8745da2d9adf137
|
||||
sha256: 962ba2fe525092fbe46bc33524f455c52627974de0023c939df3bb076b93dde2
|
||||
revision:
|
||||
dist: $STX_DIST
|
||||
GITREVCOUNT:
|
||||
|
@ -1,63 +1,24 @@
|
||||
From b9ea3db2bde72c11b5da6222c57d7ccb80143724 Mon Sep 17 00:00:00 2001
|
||||
|
||||
From 80ca3caf55c34900ab1d555f57151a01764e9d32 Mon Sep 17 00:00:00 2001
|
||||
From: Luan Nunes Utimura <LuanNunes.Utimura@windriver.com>
|
||||
Date: Mon, 6 Mar 2023 09:25:12 -0300
|
||||
Subject: [PATCH] Add location parameter for volume backup creation
|
||||
|
||||
This change adds the `location` parameter in python-cinderclient's
|
||||
`volume backup create` command to allow the optional specification of
|
||||
volume backup locations.
|
||||
|
||||
This change also updates the unit tests accordingly.
|
||||
|
||||
Signed-off-by: Luan Nunes Utimura <LuanNunes.Utimura@windriver.com>
|
||||
---
|
||||
cinderclient/tests/unit/v2/test_shell.py | 5 ++++
|
||||
.../tests/unit/v2/test_volume_backups.py | 6 ++++
|
||||
cinderclient/tests/unit/v3/test_shell.py | 20 ++++++++++++-
|
||||
cinderclient/v2/shell.py | 7 ++++-
|
||||
cinderclient/v2/volume_backups.py | 5 ++--
|
||||
cinderclient/v3/shell.py | 5 ++++
|
||||
cinderclient/v3/volume_backups.py | 30 +++++++++++--------
|
||||
7 files changed, 62 insertions(+), 16 deletions(-)
|
||||
cinderclient/tests/unit/v3/test_shell.py | 20 ++++++++++++++-
|
||||
cinderclient/v3/shell.py | 9 +++++++
|
||||
cinderclient/v3/volume_backups.py | 32 +++++++++++++++---------
|
||||
3 files changed, 48 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/cinderclient/tests/unit/v2/test_shell.py b/cinderclient/tests/unit/v2/test_shell.py
|
||||
index f6f6355..95a3af9 100644
|
||||
--- a/cinderclient/tests/unit/v2/test_shell.py
|
||||
+++ b/cinderclient/tests/unit/v2/test_shell.py
|
||||
@@ -379,6 +379,11 @@ class ShellTest(utils.TestCase):
|
||||
self.run_command('backup-create 1234 --snapshot-id 4321')
|
||||
self.assert_called('POST', '/backups')
|
||||
|
||||
+ def test_backup_location(self):
|
||||
+ self.run_command('backup-create 1234 '
|
||||
+ '--location nfs://10.10.10.10:/exports/backups')
|
||||
+ self.assert_called('POST', '/backups')
|
||||
+
|
||||
def test_multiple_backup_delete(self):
|
||||
self.run_command('backup-delete 1234 5678')
|
||||
self.assert_called_anytime('DELETE', '/backups/1234')
|
||||
diff --git a/cinderclient/tests/unit/v2/test_volume_backups.py b/cinderclient/tests/unit/v2/test_volume_backups.py
|
||||
index 700c440..09f1c0e 100644
|
||||
--- a/cinderclient/tests/unit/v2/test_volume_backups.py
|
||||
+++ b/cinderclient/tests/unit/v2/test_volume_backups.py
|
||||
@@ -52,6 +52,12 @@ class VolumeBackupsTest(utils.TestCase):
|
||||
'3c706gbg-c074-51d9-9575-385119gcdfg5')
|
||||
cs.assert_called('POST', '/backups')
|
||||
|
||||
+ def test_create_location(self):
|
||||
+ cs.backups.create('2b695faf-b963-40c8-8464-274008fbcef4',
|
||||
+ None, None, None, False, False, None,
|
||||
+ 'nfs://10.10.10.10:/exports/backups')
|
||||
+ cs.assert_called('POST', '/backups')
|
||||
+
|
||||
def test_get(self):
|
||||
backup_id = '76a17945-3c6f-435c-975b-b5685db10b62'
|
||||
back = cs.backups.get(backup_id)
|
||||
diff --git a/cinderclient/tests/unit/v3/test_shell.py b/cinderclient/tests/unit/v3/test_shell.py
|
||||
index 0332ae3..6464a73 100644
|
||||
index ee71620..9acc192 100644
|
||||
--- a/cinderclient/tests/unit/v3/test_shell.py
|
||||
+++ b/cinderclient/tests/unit/v3/test_shell.py
|
||||
@@ -1254,7 +1254,23 @@ class ShellTest(utils.TestCase):
|
||||
@@ -1443,7 +1443,23 @@ class ShellTest(utils.TestCase):
|
||||
'incremental': False,
|
||||
'force': False,
|
||||
'snapshot_id': None,
|
||||
@ -82,7 +43,7 @@ index 0332ae3..6464a73 100644
|
||||
self.assert_called('POST', '/backups', body=expected)
|
||||
|
||||
def test_backup_with_metadata(self):
|
||||
@@ -1267,6 +1283,7 @@ class ShellTest(utils.TestCase):
|
||||
@@ -1456,6 +1472,7 @@ class ShellTest(utils.TestCase):
|
||||
'incremental': False,
|
||||
'force': False,
|
||||
'snapshot_id': None,
|
||||
@ -90,7 +51,7 @@ index 0332ae3..6464a73 100644
|
||||
'metadata': {'foo': 'bar'}, }}
|
||||
self.assert_called('POST', '/backups', body=expected)
|
||||
|
||||
@@ -1280,6 +1297,7 @@ class ShellTest(utils.TestCase):
|
||||
@@ -1469,6 +1486,7 @@ class ShellTest(utils.TestCase):
|
||||
'incremental': False,
|
||||
'force': False,
|
||||
'snapshot_id': None,
|
||||
@ -98,59 +59,22 @@ index 0332ae3..6464a73 100644
|
||||
'availability_zone': 'AZ2'}}
|
||||
self.assert_called('POST', '/backups', body=expected)
|
||||
|
||||
diff --git a/cinderclient/v2/shell.py b/cinderclient/v2/shell.py
|
||||
index d41e014..a975f02 100644
|
||||
--- a/cinderclient/v2/shell.py
|
||||
+++ b/cinderclient/v2/shell.py
|
||||
@@ -1162,6 +1162,10 @@ def do_retype(cs, args):
|
||||
metavar='<snapshot-id>',
|
||||
default=None,
|
||||
help='ID of snapshot to backup. Default=None.')
|
||||
diff --git a/cinderclient/v3/shell.py b/cinderclient/v3/shell.py
|
||||
index 2542530..331318c 100644
|
||||
--- a/cinderclient/v3/shell.py
|
||||
+++ b/cinderclient/v3/shell.py
|
||||
@@ -371,6 +371,10 @@ RESET_STATE_RESOURCES = {'volume': utils.find_volume,
|
||||
help="Filters results by a migration status. Default=None. "
|
||||
"Admin only. "
|
||||
"%s" % FILTER_DEPRECATED)
|
||||
+@utils.arg('--location',
|
||||
+ metavar='<location>',
|
||||
+ default=None,
|
||||
+ help='Backup location. Default=None')
|
||||
def do_backup_create(cs, args):
|
||||
"""Creates a volume backup."""
|
||||
if args.display_name is not None:
|
||||
@@ -1177,7 +1181,8 @@ def do_backup_create(cs, args):
|
||||
args.description,
|
||||
args.incremental,
|
||||
args.force,
|
||||
- args.snapshot_id)
|
||||
+ args.snapshot_id,
|
||||
+ args.location)
|
||||
|
||||
info = {"volume_id": volume.id}
|
||||
info.update(backup._info)
|
||||
diff --git a/cinderclient/v2/volume_backups.py b/cinderclient/v2/volume_backups.py
|
||||
index bcf3e01..0a4f1c1 100644
|
||||
--- a/cinderclient/v2/volume_backups.py
|
||||
+++ b/cinderclient/v2/volume_backups.py
|
||||
@@ -46,7 +46,7 @@ class VolumeBackupManager(base.ManagerWithFind):
|
||||
def create(self, volume_id, container=None,
|
||||
name=None, description=None,
|
||||
incremental=False, force=False,
|
||||
- snapshot_id=None):
|
||||
+ snapshot_id=None, location=None):
|
||||
"""Creates a volume backup.
|
||||
|
||||
:param volume_id: The ID of the volume to backup.
|
||||
@@ -66,7 +66,8 @@ class VolumeBackupManager(base.ManagerWithFind):
|
||||
'description': description,
|
||||
'incremental': incremental,
|
||||
'force': force,
|
||||
- 'snapshot_id': snapshot_id, }}
|
||||
+ 'snapshot_id': snapshot_id,
|
||||
+ 'location': location, }}
|
||||
return self._create('/backups', body, 'backup')
|
||||
|
||||
def get(self, backup_id):
|
||||
diff --git a/cinderclient/v3/shell.py b/cinderclient/v3/shell.py
|
||||
index eaded7e..cfafe87 100644
|
||||
--- a/cinderclient/v3/shell.py
|
||||
+++ b/cinderclient/v3/shell.py
|
||||
@@ -2466,6 +2466,10 @@ def do_service_get_log(cs, args):
|
||||
@utils.arg('--metadata',
|
||||
nargs='*',
|
||||
metavar='<key=value>',
|
||||
@@ -2678,6 +2682,10 @@ def do_service_get_log(cs, args):
|
||||
metavar='<snapshot-id>',
|
||||
default=None,
|
||||
help='ID of snapshot to backup. Default=None.')
|
||||
@ -161,7 +85,7 @@ index eaded7e..cfafe87 100644
|
||||
@utils.arg('--metadata',
|
||||
nargs='*',
|
||||
metavar='<key=value>',
|
||||
@@ -2500,6 +2504,7 @@ def do_backup_create(cs, args):
|
||||
@@ -2712,6 +2720,7 @@ def do_backup_create(cs, args):
|
||||
args.incremental,
|
||||
args.force,
|
||||
args.snapshot_id,
|
||||
@ -170,10 +94,10 @@ index eaded7e..cfafe87 100644
|
||||
info = {"volume_id": volume.id}
|
||||
info.update(backup._info)
|
||||
diff --git a/cinderclient/v3/volume_backups.py b/cinderclient/v3/volume_backups.py
|
||||
index 7dd8560..66525af 100644
|
||||
index 61069c8..a72caa3 100644
|
||||
--- a/cinderclient/v3/volume_backups.py
|
||||
+++ b/cinderclient/v3/volume_backups.py
|
||||
@@ -43,7 +43,7 @@ class VolumeBackupManager(volume_backups.VolumeBackupManager):
|
||||
@@ -61,7 +61,7 @@ class VolumeBackupManager(base.ManagerWithFind):
|
||||
def create(self, volume_id, container=None,
|
||||
name=None, description=None,
|
||||
incremental=False, force=False,
|
||||
@ -182,7 +106,7 @@ index 7dd8560..66525af 100644
|
||||
"""Creates a volume backup.
|
||||
|
||||
:param volume_id: The ID of the volume to backup.
|
||||
@@ -55,17 +55,19 @@ class VolumeBackupManager(volume_backups.VolumeBackupManager):
|
||||
@@ -73,17 +73,19 @@ class VolumeBackupManager(base.ManagerWithFind):
|
||||
: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.
|
||||
@ -194,8 +118,8 @@ index 7dd8560..66525af 100644
|
||||
+ incremental, force, snapshot_id,
|
||||
+ location=location)
|
||||
|
||||
@api_versions.wraps("3.43") # noqa: F811
|
||||
def create(self, volume_id, container=None, # noqa
|
||||
@api_versions.wraps("3.43")
|
||||
def create(self, volume_id, container=None, # noqa: F811
|
||||
name=None, description=None,
|
||||
incremental=False, force=False,
|
||||
- snapshot_id=None,
|
||||
@ -205,7 +129,7 @@ index 7dd8560..66525af 100644
|
||||
"""Creates a volume backup.
|
||||
|
||||
:param volume_id: The ID of the volume to backup.
|
||||
@@ -74,28 +76,30 @@ class VolumeBackupManager(volume_backups.VolumeBackupManager):
|
||||
@@ -92,28 +94,32 @@ class VolumeBackupManager(base.ManagerWithFind):
|
||||
:param description: The description of the backup.
|
||||
:param incremental: Incremental backup.
|
||||
:param force: If True, allows an in-use volume to be backed up.
|
||||
@ -214,20 +138,21 @@ index 7dd8560..66525af 100644
|
||||
be a snapshot of the src volume, when specified,
|
||||
the new backup will be based on the snapshot.
|
||||
+ :param metadata: Key Value pairs
|
||||
+ :param location: The backup location.
|
||||
+ :param location: The backup location
|
||||
:rtype: :class:`VolumeBackup`
|
||||
"""
|
||||
# pylint: disable=function-redefined
|
||||
return self._create_backup(volume_id, container, name, description,
|
||||
- incremental, force, snapshot_id, metadata)
|
||||
+ incremental, force, snapshot_id, metadata,
|
||||
+ location=location)
|
||||
+ incremental, force, snapshot_id, metadata,
|
||||
+ location=location)
|
||||
|
||||
@api_versions.wraps("3.51") # noqa: F811
|
||||
def create(self, volume_id, container=None, name=None, description=None, # noqa
|
||||
incremental=False, force=False, snapshot_id=None, metadata=None,
|
||||
- availability_zone=None):
|
||||
+ availability_zone=None, location=None):
|
||||
@api_versions.wraps("3.51")
|
||||
def create(self, volume_id, container=None, name=None, # noqa: F811
|
||||
description=None, incremental=False, force=False,
|
||||
- snapshot_id=None, metadata=None, availability_zone=None):
|
||||
+ snapshot_id=None, metadata=None, availability_zone=None,
|
||||
+ location=None):
|
||||
return self._create_backup(volume_id, container, name, description,
|
||||
incremental, force, snapshot_id, metadata,
|
||||
- availability_zone)
|
||||
@ -239,10 +164,11 @@ index 7dd8560..66525af 100644
|
||||
- availability_zone=None):
|
||||
+ snapshot_id=None, metadata=None, availability_zone=None,
|
||||
+ location=None):
|
||||
+
|
||||
"""Creates a volume backup.
|
||||
|
||||
:param volume_id: The ID of the volume to backup.
|
||||
@@ -104,10 +108,11 @@ class VolumeBackupManager(volume_backups.VolumeBackupManager):
|
||||
@@ -122,10 +128,11 @@ class VolumeBackupManager(base.ManagerWithFind):
|
||||
:param description: The description of the backup.
|
||||
:param incremental: Incremental backup.
|
||||
:param force: If True, allows an in-use volume to be backed up.
|
||||
@ -255,7 +181,7 @@ index 7dd8560..66525af 100644
|
||||
:param availability_zone: The AZ where we want the backup stored.
|
||||
:rtype: :class:`VolumeBackup`
|
||||
"""
|
||||
@@ -118,7 +123,8 @@ class VolumeBackupManager(volume_backups.VolumeBackupManager):
|
||||
@@ -136,7 +143,8 @@ class VolumeBackupManager(base.ManagerWithFind):
|
||||
'description': description,
|
||||
'incremental': incremental,
|
||||
'force': force,
|
||||
|
Loading…
x
Reference in New Issue
Block a user