Fix the "image register" command (OSC 5.2.0 regression)
python-openstackclient removed the usage of glanceclient between 5.1.0 and 5.2.0 (see: https://review.opendev.org/#/c/650374/). As a consequence, the openstack dataprocessing image register ... command is now broken. This fix means a few requirement bumps to align to OSC 5.2.0, even though saharaclient 3.0.0 is already released. Story: 2007501 Task: 39317 Change-Id: I377e0646303aef4984cdd6e4b6587fca9241206b
This commit is contained in:
parent
82ecc50fbe
commit
3cf5de75c1
|
@ -31,10 +31,10 @@ msgpack-python==0.4.0
|
|||
munch==2.1.0
|
||||
netaddr==0.7.18
|
||||
netifaces==0.10.4
|
||||
openstacksdk==0.11.2
|
||||
openstacksdk==0.36.0
|
||||
os-client-config==1.28.0
|
||||
os-service-types==1.2.0
|
||||
osc-lib==1.11.0
|
||||
osc-lib==2.0.0
|
||||
oslo.config==5.2.0
|
||||
oslo.context==2.19.2
|
||||
oslo.i18n==3.15.3
|
||||
|
@ -58,7 +58,7 @@ python-glanceclient==2.8.0
|
|||
python-keystoneclient==3.8.0
|
||||
python-mimeparse==1.6.0
|
||||
python-novaclient==9.1.0
|
||||
python-openstackclient==3.12.0
|
||||
python-openstackclient==5.2.0
|
||||
python-subunit==1.0.0
|
||||
pytz==2013.6
|
||||
PyYAML==3.12
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
A change in python-openstackclient 5.2.0 broke the image register command.
|
||||
The incompatibility is now solved but the python-openstackclient
|
||||
requirement has been bumped to 5.2.0.
|
|
@ -6,11 +6,11 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
|||
|
||||
Babel!=2.4.0,>=2.3.4 # BSD
|
||||
keystoneauth1>=3.4.0 # Apache-2.0
|
||||
osc-lib>=1.11.0 # Apache-2.0
|
||||
osc-lib>=2.0.0 # Apache-2.0
|
||||
oslo.log>=3.36.0 # Apache-2.0
|
||||
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
|
||||
oslo.i18n>=3.15.3 # Apache-2.0
|
||||
oslo.utils>=3.33.0 # Apache-2.0
|
||||
python-openstackclient>=3.12.0 # Apache-2.0
|
||||
python-openstackclient>=5.2.0 # Apache-2.0
|
||||
requests>=2.14.2 # Apache-2.0
|
||||
six>=1.10.0 # MIT
|
||||
|
|
|
@ -149,8 +149,8 @@ class RegisterImage(command.ShowOne):
|
|||
client = self.app.client_manager.data_processing
|
||||
image_client = self.app.client_manager.image
|
||||
|
||||
image_id = osc_utils.find_resource(
|
||||
image_client.images, parsed_args.image).id
|
||||
image_id = image_client.find_image(parsed_args.image,
|
||||
ignore_missing=False).id
|
||||
|
||||
data = client.images.update_image(
|
||||
image_id, user_name=parsed_args.username,
|
||||
|
|
|
@ -176,8 +176,8 @@ class TestRegisterImage(TestImages):
|
|||
self.image_mock.update_image.return_value = mock.Mock(
|
||||
image=IMAGE_INFO.copy())
|
||||
self.app.client_manager.image = mock.Mock()
|
||||
self.image_client = self.app.client_manager.image.images
|
||||
self.image_client.get.return_value = mock.Mock(id='id')
|
||||
self.image_client = self.app.client_manager.image
|
||||
self.image_client.find_image.return_value = mock.Mock(id='id')
|
||||
|
||||
# Command to test
|
||||
self.cmd = osc_images.RegisterImage(self.app, None)
|
||||
|
|
|
@ -176,8 +176,8 @@ class TestRegisterImage(TestImages):
|
|||
self.image_mock.update_image.return_value = mock.Mock(
|
||||
image=IMAGE_INFO.copy())
|
||||
self.app.client_manager.image = mock.Mock()
|
||||
self.image_client = self.app.client_manager.image.images
|
||||
self.image_client.get.return_value = mock.Mock(id='id')
|
||||
self.image_client = self.app.client_manager.image
|
||||
self.image_client.find_image.return_value = mock.Mock(id='id')
|
||||
|
||||
# Command to test
|
||||
self.cmd = osc_images.RegisterImage(self.app, None)
|
||||
|
|
Loading…
Reference in New Issue