<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-openstackclient.git/openstackclient/tests/unit/image, branch 5.6.1</title>
<subtitle>opendev.org: openstack/python-openstackclient
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/'/>
<entry>
<title>Fix: create image from volume command</title>
<updated>2022-07-04T11:30:08+00:00</updated>
<author>
<name>whoami-rajat</name>
<email>rajatdhasmana@gmail.com</email>
</author>
<published>2022-06-01T09:21:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=665d93ff0721801896bf08c3cc4f189a55daae80'/>
<id>665d93ff0721801896bf08c3cc4f189a55daae80</id>
<content type='text'>
Currently the command ``openstack image create --volume`` calls cinderclient
to upload the volume to image service (glance) but OSC passes ``visibility``
and ``protected`` fields which are only available in microversion 3.1 or
greater. This generates an error if the user is using volume microversion
&lt; 3.1 and wants to create an image from volume.
This patch fixes that by only passing ``visibility`` and ``protected`` fields
when the volume microversion is 3.1 or greater and fail otherwise i.e. the
following 3 cases:
1) visibility/protected argument + mv &gt;= 3.1 = pass
2) visibility/protected argument + mv &lt; 3.1 = fail
3) not visibility/protected argument + any mv = pass

Story: 2010060
Task: 45511
Change-Id: I568a0ea0af8f7f82b16d49a6a1bb0391b99c50dc
(cherry picked from commit 9eea28ba59e44526b9d6f1ad9f80c3553d5853e2)
(cherry picked from commit 849e7e93f83a220265d11af71e2edc009c3f7bea)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the command ``openstack image create --volume`` calls cinderclient
to upload the volume to image service (glance) but OSC passes ``visibility``
and ``protected`` fields which are only available in microversion 3.1 or
greater. This generates an error if the user is using volume microversion
&lt; 3.1 and wants to create an image from volume.
This patch fixes that by only passing ``visibility`` and ``protected`` fields
when the volume microversion is 3.1 or greater and fail otherwise i.e. the
following 3 cases:
1) visibility/protected argument + mv &gt;= 3.1 = pass
2) visibility/protected argument + mv &lt; 3.1 = fail
3) not visibility/protected argument + any mv = pass

Story: 2010060
Task: 45511
Change-Id: I568a0ea0af8f7f82b16d49a6a1bb0391b99c50dc
(cherry picked from commit 9eea28ba59e44526b9d6f1ad9f80c3553d5853e2)
(cherry picked from commit 849e7e93f83a220265d11af71e2edc009c3f7bea)
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace assertItemsEqual with assertCountEqual</title>
<updated>2021-05-03T20:07:39+00:00</updated>
<author>
<name>Dirk Mueller</name>
<email>dirk@dmllr.de</email>
</author>
<published>2021-05-03T20:07:39+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=e82a05864f482acc485d1bd35a4db23452f8b2ac'/>
<id>e82a05864f482acc485d1bd35a4db23452f8b2ac</id>
<content type='text'>
assertItemsEqual was removed from Python's unittest.TestCase in
Python 3.3 [1][2]. We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertCountEqual.

[1] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277

Change-Id: I0bbffbec8889b8b3067cfe17d258f5cb16624f38
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
assertItemsEqual was removed from Python's unittest.TestCase in
Python 3.3 [1][2]. We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertCountEqual.

[1] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277

Change-Id: I0bbffbec8889b8b3067cfe17d258f5cb16624f38
</pre>
</div>
</content>
</entry>
<entry>
<title>Implements hide image</title>
<updated>2021-03-25T07:57:31+00:00</updated>
<author>
<name>Valery Tschopp</name>
<email>valery.tschopp@switch.ch</email>
</author>
<published>2021-02-02T11:56:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=383289edd8ea222ce1a6e77ed0298ecdb21608a1'/>
<id>383289edd8ea222ce1a6e77ed0298ecdb21608a1</id>
<content type='text'>
openstack image set [--hidden|--unhidden] IMAGE
openstack image list --hidden

Task: 41734
Story: 2008581
Change-Id: Ie84f10c0f7aa2e7b7f78bfadc70132a10673866e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
openstack image set [--hidden|--unhidden] IMAGE
openstack image list --hidden

Task: 41734
Story: 2008581
Change-Id: Ie84f10c0f7aa2e7b7f78bfadc70132a10673866e
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "image: Unset properties rather than setting to None"</title>
<updated>2021-01-06T11:16:25+00:00</updated>
<author>
<name>Zuul</name>
<email>zuul@review.opendev.org</email>
</author>
<published>2021-01-06T11:16:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=23afc0af92ad3446033529aaf41bbefa7109c5e9'/>
<id>23afc0af92ad3446033529aaf41bbefa7109c5e9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>image: Unset properties rather than setting to None</title>
<updated>2020-12-22T17:11:32+00:00</updated>
<author>
<name>Stephen Finucane</name>
<email>sfinucan@redhat.com</email>
</author>
<published>2020-12-22T16:46:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=29a7c9afce32e7acbd40b9e4a73140ef9e05e7f3'/>
<id>29a7c9afce32e7acbd40b9e4a73140ef9e05e7f3</id>
<content type='text'>
Currently, we attempt to unset an image property by setting it to None.
This doesn't work for known properties and is rightly rejected by the
Glance API with the following error:

  BadRequestException: 400: Client Error for url:
  http://172.20.4.87/image/v2/images/368c5751-2b0b-4a38-a255-fd146fe52d31,
  Bad Request

The solution is to actually unset the field by deleting it.

Change-Id: Ie156bedbe0f9244f82c81401679706f484caf9aa
Signed-off-by: Stephen Finucane &lt;sfinucan@redhat.com&gt;
Story: #2008463
Task: #41493
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, we attempt to unset an image property by setting it to None.
This doesn't work for known properties and is rightly rejected by the
Glance API with the following error:

  BadRequestException: 400: Client Error for url:
  http://172.20.4.87/image/v2/images/368c5751-2b0b-4a38-a255-fd146fe52d31,
  Bad Request

The solution is to actually unset the field by deleting it.

Change-Id: Ie156bedbe0f9244f82c81401679706f484caf9aa
Signed-off-by: Stephen Finucane &lt;sfinucan@redhat.com&gt;
Story: #2008463
Task: #41493
</pre>
</div>
</content>
</entry>
<entry>
<title>Add project field in image list subcommand</title>
<updated>2020-12-14T22:45:30+00:00</updated>
<author>
<name>okozachenko</name>
<email>okozachenko@vexxhost.com</email>
</author>
<published>2020-12-10T18:22:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=3c80b1b3b29307381b869f6a767e14e9d47e212f'/>
<id>3c80b1b3b29307381b869f6a767e14e9d47e212f</id>
<content type='text'>
The motivation is to filter the image by owner

Change-Id: I1f08da175a06e62a844f76b0ec18cb3332efef86
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The motivation is to filter the image by owner

Change-Id: I1f08da175a06e62a844f76b0ec18cb3332efef86
</pre>
</div>
</content>
</entry>
<entry>
<title>Make use of comparable 'FormattableColumn' subclasses</title>
<updated>2020-12-09T15:17:25+00:00</updated>
<author>
<name>Stephen Finucane</name>
<email>sfinucan@redhat.com</email>
</author>
<published>2020-11-04T16:16:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=f5b185c35728025ebfd4145c800648b34476b775'/>
<id>f5b185c35728025ebfd4145c800648b34476b775</id>
<content type='text'>
This requires fixes found in cliff 3.5.0 [1] and osc-lib 2.3.0 [2]. With
these fixes in place, we can remove the icky, still broken
'assertItemEqual' and 'assertListItemEqual' helpers.

[1] https://review.opendev.org/761421
[2] https://review.opendev.org/761394

Change-Id: Id6c26b37c3c7d5ec6761361abca57f9219b76838
Signed-off-by: Stephen Finucane &lt;sfinucan@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This requires fixes found in cliff 3.5.0 [1] and osc-lib 2.3.0 [2]. With
these fixes in place, we can remove the icky, still broken
'assertItemEqual' and 'assertListItemEqual' helpers.

[1] https://review.opendev.org/761421
[2] https://review.opendev.org/761394

Change-Id: Id6c26b37c3c7d5ec6761361abca57f9219b76838
Signed-off-by: Stephen Finucane &lt;sfinucan@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>stop image downloads to memory</title>
<updated>2020-11-25T08:25:22+00:00</updated>
<author>
<name>Simon Merrick</name>
<email>simonmerrick@catalyst.net.nz</email>
</author>
<published>2020-11-19T07:05:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=5bdcd590ecacbc0aa8db2cbafa0ab1a9f3c28ce0'/>
<id>5bdcd590ecacbc0aa8db2cbafa0ab1a9f3c28ce0</id>
<content type='text'>
 + Fixes issue with large images hogging memory
 + stream image downloads
 + output to stdout if file not specified

Change-Id: Ia01ff9b21a2dac5d0ccf2bd58a8640e88c5cbb36
Story: 2007672
Task: 39776
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 + Fixes issue with large images hogging memory
 + stream image downloads
 + output to stdout if file not specified

Change-Id: Ia01ff9b21a2dac5d0ccf2bd58a8640e88c5cbb36
Story: 2007672
Task: 39776
</pre>
</div>
</content>
</entry>
<entry>
<title>Restore behavior of image create with same name.</title>
<updated>2020-10-06T03:05:11+00:00</updated>
<author>
<name>Sam Morrison</name>
<email>sorrison@gmail.com</email>
</author>
<published>2020-10-06T03:03:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=17678c9bd6f3f4c5b9e7b5ceb27c2bd12493fba4'/>
<id>17678c9bd6f3f4c5b9e7b5ceb27c2bd12493fba4</id>
<content type='text'>
With 60e7c51df4cf061ebbb435a959ad63c7d3a296bf the behaviour of
`openstack image create` changed so that you can't create an image
with the same name. This patch restores the previous functionality.

Story: 2008229
Task: 41069

Change-Id: Ia0f4920371a918e94d1ccf9fcfcbf90ff885a455
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With 60e7c51df4cf061ebbb435a959ad63c7d3a296bf the behaviour of
`openstack image create` changed so that you can't create an image
with the same name. This patch restores the previous functionality.

Story: 2008229
Task: 41069

Change-Id: Ia0f4920371a918e94d1ccf9fcfcbf90ff885a455
</pre>
</div>
</content>
</entry>
<entry>
<title>Expose flag for forcing use of import for images</title>
<updated>2020-06-30T12:02:23+00:00</updated>
<author>
<name>Monty Taylor</name>
<email>mordred@inaugust.com</email>
</author>
<published>2020-06-23T20:45:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-openstackclient.git/commit/?id=c04ec16cf7ad2dbe7bf8edf5f6e7840c54b0efa3'/>
<id>c04ec16cf7ad2dbe7bf8edf5f6e7840c54b0efa3</id>
<content type='text'>
openstacksdk added support for using image import as a fallback
which is transparently supported here, but also provides an
override flag to allow a user to force use of import. Expose that
here.

Depends-On: https://review.opendev.org/737608
Change-Id: Ied938a8f63f305305a20ace42e9f4c84b0a5c00e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
openstacksdk added support for using image import as a fallback
which is transparently supported here, but also provides an
override flag to allow a user to force use of import. Expose that
here.

Depends-On: https://review.opendev.org/737608
Change-Id: Ied938a8f63f305305a20ace42e9f4c84b0a5c00e
</pre>
</div>
</content>
</entry>
</feed>
