python-openstackclient/openstackclient/api
Imtiaz Chowdhury 1bd2bf67da Fixes image api URL endpoint for certain scenario
openstackclient fails to get image list when the image api endpoint
has 'v2' substring in the URL. Instead of checking whether the api
endpoint URL terminates with '/v2', the current logic is checking
whether 'v2' appears anywhere in the endpoint string.

This issue was discovered on a production setup where certain
server names had 'v2' in their names. For example, when a hostname
is gopher.dev20.com, the image list APIs fail.

This commit updates the unit test to reflect this scenario. Without
the change in openstackclient/api/image_v2.py, all the unit tests
fail.

Co-Authored-By: sergio.carvalho@workday.com
Change-Id: I26b85afd646938272dbabe8e045b337b7df58c7d
Closes-Bug: 1652827
2017-01-04 18:14:10 +00:00
..
__init__.py Add low-level API base class 2014-09-29 12:32:45 -05:00
api.py Fix missing i18n supports in api/ and shell.py 2016-06-14 11:03:56 -05:00
auth.py Add importing file to import warnings 2016-08-30 09:21:02 -05:00
auth_plugin.py remove unused LOG 2016-07-09 23:23:38 +08:00
image_v1.py Fixes image api URL endpoint for certain scenario 2017-01-04 18:14:10 +00:00
image_v2.py Fixes image api URL endpoint for certain scenario 2017-01-04 18:14:10 +00:00
object_store_v1.py Add option "--name" to command "openstack object create" 2016-09-26 22:42:10 -04:00
utils.py Fix typos in docstrings and comments 2016-04-06 10:30:39 +07:00