Upversion python-openstackclient to v6.2.0-1

As part of the STX-Openstack upversion to ANTELOPE, the python-
openstackclient is being upversioned to version 6.2.0-1, which is the
latest supported on ANTELOPE [1].

All patches were updated so the package can be build. Note that on the
0002-Add-location-parameter-for-volume-backup-creation.patch, the end
part of the patch had to be removed [2], because on this new version,
the openstackclient it added a `**kwargs` argument [3], making it
unnecessary to specify the location argument.

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.

[1] https://releases.openstack.org/antelope/#antelope-python-openstackclient
[2] https://opendev.org/starlingx/openstack-armada-app/src/branch/master/upstream/openstack/python-openstackclient/debian/patches/0002-Add-location-parameter-for-volume-backup-creation.patch#L119
[3] https://salsa.debian.org/openstack-team/clients/python-openstackclient/-/blob/debian/6.2.0-1/openstackclient/volume/v2/volume_backup.py#L171

Test Plan:
PASS: Build the python-openstackclient package

Story: 2010715
Task: 48137

Change-Id: I3318b6b54acbcfce67a3f56edd7076fb1b5ac2a2
Signed-off-by: Lucas de Ataides <lucas.deataidesbarreto@windriver.com>
This commit is contained in:
Lucas de Ataides 2023-06-21 12:50:02 -03:00
parent f7f7690444
commit daf24aede7
5 changed files with 55 additions and 62 deletions

View File

@ -1,4 +1,4 @@
From 15fc36263fb7274f3a55e9375b398ec497d00062 Mon Sep 17 00:00:00 2001
From 25a9e8325b319aba48fe2f5703381af2823887f6 Mon Sep 17 00:00:00 2001
From: Charles Short <charles.short@windriver.com>
Date: Wed, 27 Oct 2021 13:57:42 +0000
Subject: [PATCH] Add wheel package
@ -12,10 +12,10 @@ Signed-off-by: Charles Short <charles.short@windriver.com>
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/debian/control b/debian/control
index fc25eefa..0c8b0fab 100644
index b1951c76..71609fa8 100644
--- a/debian/control
+++ b/debian/control
@@ -127,3 +127,24 @@ Description: OpenStack Command-line Client - Python 3.x
@@ -126,3 +126,24 @@ Description: OpenStack Command-line Client - Python 3.x
operations in OpenStack.
.
This package contains the Python 3.x module.
@ -41,7 +41,7 @@ index fc25eefa..0c8b0fab 100644
+ .
+ This package contains the Python wheel.
diff --git a/debian/rules b/debian/rules
index c097f4de..490e4394 100755
index 98193bc2..8c257cd8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,7 @@ override_dh_auto_build:
@ -54,5 +54,5 @@ index c097f4de..490e4394 100755
# Generate bash completion
pkgos-gen-completion --py3 openstack
--
2.30.2
2.25.1

View File

@ -1,7 +1,7 @@
From 7c189ae05ef789bf030ddf224934dc804669d256 Mon Sep 17 00:00:00 2001
From 4e07c23b3d1a3d194545fe2ee4e8ba3281f447a4 Mon Sep 17 00:00:00 2001
From: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Date: Thu, 2 Jun 2022 20:20:50 +0300
Subject: [PATCH 2/2] Allow external bash completion
Subject: [PATCH] Allow external bash completion
Don't generate the bash completion at build time, as it is different
than the one generated at runtime. Allow bash completion to be
@ -16,13 +16,13 @@ Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
diff --git a/debian/python3-openstackclient.dirs b/debian/python3-openstackclient.dirs
new file mode 100644
index 0000000..bc3b680
index 00000000..bc3b6805
--- /dev/null
+++ b/debian/python3-openstackclient.dirs
@@ -0,0 +1 @@
+etc/bash_completion.d/
diff --git a/debian/rules b/debian/rules
index 490e439..1472e19 100755
index 8c257cd8..9b71b705 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,9 +14,6 @@ override_dh_auto_build:
@ -34,7 +34,7 @@ index 490e439..1472e19 100755
-
override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
pkgos-dh_auto_test --no-py2 'openstackclient\.tests\.(?!(.*test_shell\.TestShellCli\.test_shell_args_precedence.*|.*test_shell\.TestShellCliEnv\.test_shell_args_precedence_.*))'
pkgos-dh_auto_test --no-py2 'openstackclient\.tests.*'
--
2.34.1
2.25.1

View File

@ -1,10 +1,11 @@
---
debname: python-openstackclient
debver: 5.4.0-4
debver: 6.2.0-1
dl_path:
name: python-openstackclient-debian-5.4.0-4.tar.gz
url: https://salsa.debian.org/openstack-team/clients/python-openstackclient/-/archive/debian/5.4.0-4/python-openstackclient-debian-5.4.0-4.tar.gz
md5sum: 499b5a71ab02769a5706832aa53276a7
name: python-openstackclient-debian-6.2.0-1.tar.gz
url: https://salsa.debian.org/openstack-team/clients/python-openstackclient/-/archive/debian/6.2.0-1/python-openstackclient-debian-6.2.0-1.tar.gz
md5sum: db8235ad534de91738f1dab8e3865a8a
sha256sum: 91e35f3e6bc8113cdd228709360b383e0c4e7c7f884bb3ec47e61f37c4110da3
revision:
dist: $STX_DIST
GITREVCOUNT:

View File

@ -1,4 +1,4 @@
From 98f5f373e068032ae89d205edb12ab9b62e39d3e Mon Sep 17 00:00:00 2001
From ceb23453a2ac814e752393aaef841a1024f243d8 Mon Sep 17 00:00:00 2001
From: Luan Nunes Utimura <LuanNunes.Utimura@windriver.com>
Date: Fri, 24 Feb 2023 08:47:48 -0300
Subject: [PATCH] Add plugin entry point sorting mechanism
@ -45,11 +45,11 @@ default in the list.
Signed-off-by: Luan Nunes Utimura <LuanNunes.Utimura@windriver.com>
---
openstackclient/common/clientmanager.py | 173 +++++++++++++++++++++++-
openstackclient/shell.py | 33 ++++-
2 files changed, 202 insertions(+), 4 deletions(-)
openstackclient/shell.py | 32 ++++-
2 files changed, 202 insertions(+), 3 deletions(-)
diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py
index 36c3ce26..3b859c67 100644
index 1ed6aa24..def7f2ca 100644
--- a/openstackclient/common/clientmanager.py
+++ b/openstackclient/common/clientmanager.py
@@ -19,14 +19,17 @@ import importlib
@ -70,7 +70,7 @@ index 36c3ce26..3b859c67 100644
USER_AGENT = 'python-openstackclient'
@@ -141,11 +144,177 @@ class ClientManager(clientmanager.ClientManager):
@@ -143,11 +146,177 @@ class ClientManager(clientmanager.ClientManager):
# Plugin Support
@ -251,24 +251,23 @@ index 36c3ce26..3b859c67 100644
# Different versions of stevedore use different
diff --git a/openstackclient/shell.py b/openstackclient/shell.py
index 755af24d..52d50256 100644
index bc88e1f1..1db9eaca 100644
--- a/openstackclient/shell.py
+++ b/openstackclient/shell.py
@@ -21,7 +21,9 @@ import sys
@@ -20,7 +20,9 @@ import sys
from osc_lib.api import auth
from osc_lib.command import commandmanager
+from osc_lib.i18n import _
from osc_lib import shell
+from osc_lib import utils
import six
import openstackclient
@@ -31,14 +33,26 @@ from openstackclient.common import clientmanager
from openstackclient.common import clientmanager
@@ -29,6 +31,19 @@ from openstackclient.common import clientmanager
DEFAULT_DOMAIN = 'default'
-class OpenStackShell(shell.OpenStackShell):
+class CommandManager(commandmanager.CommandManager):
+ def load_commands(self, namespace):
+ """Load all commands from an entry point."""
@ -280,11 +279,12 @@ index 755af24d..52d50256 100644
+ else ep.name)
+ self.commands[cmd_name] = ep.entry_point
+ return
+
+class OpenStackShell(shell.OpenStackShell):
def __init__(self):
+
class OpenStackShell(shell.OpenStackShell):
def __init__(self):
@@ -36,7 +51,7 @@ class OpenStackShell(shell.OpenStackShell):
super(OpenStackShell, self).__init__(
description=__doc__.strip(),
version=openstackclient.__version__,
@ -293,7 +293,7 @@ index 755af24d..52d50256 100644
deferred_help=True)
self.api_version = {}
@@ -52,6 +66,18 @@ class OpenStackShell(shell.OpenStackShell):
@@ -50,6 +65,18 @@ class OpenStackShell(shell.OpenStackShell):
version)
parser = clientmanager.build_plugin_option_parser(parser)
parser = auth.build_auth_plugins_option_parser(parser)
@ -312,7 +312,7 @@ index 755af24d..52d50256 100644
return parser
def _final_defaults(self):
@@ -64,6 +90,9 @@ class OpenStackShell(shell.OpenStackShell):
@@ -62,6 +89,9 @@ class OpenStackShell(shell.OpenStackShell):
else:
self._auth_type = 'password'

View File

@ -1,4 +1,4 @@
From fdcd730533f402daa0487995d1fa57b0867bf2b4 Mon Sep 17 00:00:00 2001
From 7919bad45b4ed340e780fa6617309d4c2b9142fc Mon Sep 17 00:00:00 2001
From: Luan Nunes Utimura <LuanNunes.Utimura@windriver.com>
Date: Mon, 6 Mar 2023 09:52:22 -0300
Subject: [PATCH] Add location parameter for volume backup creation
@ -13,26 +13,26 @@ Signed-off-by: Luan Nunes Utimura <LuanNunes.Utimura@windriver.com>
---
openstackclient/tests/unit/volume/v2/fakes.py | 1 +
.../tests/unit/volume/v2/test_volume_backup.py | 8 ++++++++
openstackclient/volume/v2/volume_backup.py | 6 ++++++
3 files changed, 15 insertions(+)
openstackclient/volume/v2/volume_backup.py | 5 +++++
3 files changed, 14 insertions(+)
diff --git a/openstackclient/tests/unit/volume/v2/fakes.py b/openstackclient/tests/unit/volume/v2/fakes.py
index 5f18990e..62b5d5cb 100644
index a3ef142f..2e320863 100644
--- a/openstackclient/tests/unit/volume/v2/fakes.py
+++ b/openstackclient/tests/unit/volume/v2/fakes.py
@@ -548,6 +548,7 @@ class FakeBackup(object):
"size": random.randint(1, 20),
"status": "error",
"availability_zone": 'zone' + uuid.uuid4().hex,
+ "location": 'location-' + uuid.uuid4().hex,
}
@@ -553,6 +553,7 @@ def create_one_backup(attrs=None):
"size": random.randint(1, 20),
"status": "error",
"availability_zone": 'zone' + uuid.uuid4().hex,
+ "location": 'location-' + uuid.uuid4().hex,
}
# Overwrite default attributes.
# Overwrite default attributes.
diff --git a/openstackclient/tests/unit/volume/v2/test_volume_backup.py b/openstackclient/tests/unit/volume/v2/test_volume_backup.py
index 4e1f7ee1..9417fe77 100644
index 7d00b8bf..6c22f3b6 100644
--- a/openstackclient/tests/unit/volume/v2/test_volume_backup.py
+++ b/openstackclient/tests/unit/volume/v2/test_volume_backup.py
@@ -49,6 +49,7 @@ class TestBackupCreate(TestBackup):
@@ -50,6 +50,7 @@ class TestBackupCreate(TestBackup):
'container',
'description',
'id',
@ -40,7 +40,7 @@ index 4e1f7ee1..9417fe77 100644
'name',
'object_count',
'size',
@@ -61,6 +62,7 @@ class TestBackupCreate(TestBackup):
@@ -62,6 +63,7 @@ class TestBackupCreate(TestBackup):
new_backup.container,
new_backup.description,
new_backup.id,
@ -48,7 +48,7 @@ index 4e1f7ee1..9417fe77 100644
new_backup.name,
new_backup.object_count,
new_backup.size,
@@ -87,6 +89,7 @@ class TestBackupCreate(TestBackup):
@@ -88,6 +90,7 @@ class TestBackupCreate(TestBackup):
"--force",
"--incremental",
"--snapshot", self.new_backup.snapshot_id,
@ -56,7 +56,7 @@ index 4e1f7ee1..9417fe77 100644
self.new_backup.volume_id,
]
verifylist = [
@@ -96,6 +99,7 @@ class TestBackupCreate(TestBackup):
@@ -97,6 +100,7 @@ class TestBackupCreate(TestBackup):
("force", True),
("incremental", True),
("snapshot", self.new_backup.snapshot_id),
@ -64,7 +64,7 @@ index 4e1f7ee1..9417fe77 100644
("volume", self.new_backup.volume_id),
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
@@ -110,6 +114,7 @@ class TestBackupCreate(TestBackup):
@@ -111,6 +115,7 @@ class TestBackupCreate(TestBackup):
force=True,
incremental=True,
snapshot_id=self.new_backup.snapshot_id,
@ -72,15 +72,15 @@ index 4e1f7ee1..9417fe77 100644
)
self.assertEqual(self.columns, columns)
self.assertEqual(self.data, data)
@@ -137,6 +142,7 @@ class TestBackupCreate(TestBackup):
@@ -139,6 +144,7 @@ class TestBackupCreate(TestBackup):
description=None,
force=False,
incremental=False,
snapshot_id=None,
+ location=None,
metadata={"foo": "bar", "wow": "much-cool"},
)
self.assertEqual(self.columns, columns)
self.assertEqual(self.data, data)
@@ -492,6 +498,7 @@ class TestBackupShow(TestBackup):
@@ -852,6 +858,7 @@ class TestBackupShow(TestBackup):
'container',
'description',
'id',
@ -88,7 +88,7 @@ index 4e1f7ee1..9417fe77 100644
'name',
'object_count',
'size',
@@ -504,6 +511,7 @@ class TestBackupShow(TestBackup):
@@ -864,6 +871,7 @@ class TestBackupShow(TestBackup):
backup.container,
backup.description,
backup.id,
@ -97,10 +97,10 @@ index 4e1f7ee1..9417fe77 100644
backup.object_count,
backup.size,
diff --git a/openstackclient/volume/v2/volume_backup.py b/openstackclient/volume/v2/volume_backup.py
index c336f6c9..5de4f7f3 100644
index d96b28e9..5626f756 100644
--- a/openstackclient/volume/v2/volume_backup.py
+++ b/openstackclient/volume/v2/volume_backup.py
@@ -87,6 +87,11 @@ class CreateVolumeBackup(command.ShowOne):
@@ -88,6 +88,11 @@ class CreateVolumeBackup(command.ShowOne):
metavar="<snapshot>",
help=_("Snapshot to backup (name or ID)")
)
@ -112,14 +112,6 @@ index c336f6c9..5de4f7f3 100644
parser.add_argument(
'--force',
action='store_true',
@@ -117,6 +122,7 @@ class CreateVolumeBackup(command.ShowOne):
force=parsed_args.force,
incremental=parsed_args.incremental,
snapshot_id=snapshot_id,
+ location=parsed_args.location,
)
backup._info.pop("links", None)
return zip(*sorted(backup._info.items()))
--
2.25.1