When the image locations are blank, glance client will get a http response
with no content, glance client should show user no data could be found,
instead of processing the blank response body that will lead to exception.
Glance client will also get a 204 response when an image is in a queued
state (this is true for 'master' and liberty/kilo/juno based servers).
Closes-Bug: #1472449
Co-Authored-by: Stuart McLaren <stuart.mclaren@hp.com>
Change-Id: I5d3d02d6aa7c8dd054cd2933e15b4a26e91afea1
The help for image-create states that --file 'Must be present if images
are not passed to the client via stdin.'
However, doing image-create without --file is a valid operation - it
queues a file to be created.
Change-Id: I8167c6a891fa2540c84e3b888031d90a34a9b5fc
image-create unit tests still checks for obsolete v1 params --location
and --copy-from
remove checking of these params
Closes-bug: 1521044
Change-Id: I75ae1a200ab319b7fb818b4ccfe784af5ef8ff88
The __eq__ of apiclient.base.Resource will return True,
if the two objects have same id, even if they have different
other attributes value. The behavior is weird and don't
match the semantics of object equal. The objects that have
different value should be different objects.
Fix this issue and add some test cases in this patch.
Change-Id: I24ba39bf90d727116f256de46241746520efbfee
Closes-Bug: #1499369
Fix typo `glance --os-image-api-version 1 helpNone` in help
in python-glanceclient.
Change-Id: I21bd7a7a5809e7c5fca4c8df1275321a9014bc6f
Closes-bug: #1506049
We need all the headers to be safe strings so they can be joined
together and not become an unicode string in doing so.
This fixes a bug when creating an image with non-ascii characters in the
name.
This is required for python 2.6 compatibility.
Change-Id: I66ebc27edf4ccd8f903399da58705711c372536d
Closes-Bug: 1448080
Now, when use "glance help" to show the help message, the description
of 'image-create' is missing.
Change-Id: I748209222c540e0024580dccac850ea465d176b4
Closes-bug: #1510340
devstack produces a file called clouds.yaml already with credentials in
it. Rather than producing our own config file to run functional tests,
just consume the clouds.yaml file that's already there.
Closes-Bug: #1507386
Change-Id: I82c071b2cd903b9578d1f2ec515882c815812692
Add translation support for v2 shell help messages. It allows
to detect the messages that needs to be translated for translation
team.
Change-Id: Id1fb0355090d4e223d13c15100e6726e15563670
As stated in i18n guide it is normal to import i18n functions
(_, _LW..) directly and we can include i18n functions in
hacking exceptions.
Also there is no need to make exceptions for six moves
because pep8 passes correctly without it.
Change-Id: I9c9aa490f1447bb7ae221809df7bc110c27d1336
Pass the subcomand's arguments instead of the base ones to the endpoint
creation call when quering the `/versions` endpoint. Passing the wrong
arguments will end in the auth_requirement not being identified and an
error 'Expected Endpoint' will be raised as no endpoint will be gotten
from keystone.
This patch also removes an unnecessary mock in the test code related to
this fix.
Depends-On Iefeb9bc123f8c65fecd0cba585ecd3eb349b23a6
Change-Id: I46088130b9175798e3719e43f48dc474fbc8a251
Closes-bug: #1504058
It turns out the server does not support this, and the underlying
code gets very unhappy.
Co-Authored-By:Itisha <ishadewan07@gmail.com>
Change-Id: If67c11da28adbb2d793430d122e3930cc278737f
Client doesn't support image deletion in batches in v2 now.
It's useful. So it's need to add it.
Change-Id: Idf5a6890b3fd01a65fecab2033b21367c30bc6b1
Closes-bug:#1485407
When running just 'glance' under python3, we will get the error:
ERROR: 'Namespace' object has no attribute 'func'
This is because map() is used to decode sys.argv, but under Python3
it returns a map object which is an iterable. Some code later tries
to use this in a boolean context and it will always return True,
even if it's empty.
Change-Id: I2f03e462cb813833b75b9f2de7badd10b10cddff
Closes-Bug: #1295356
Self is not meant to exist as it is a READ ONLY property, that is not
meant to exist as something the user can change.
Closes-bug: 1496024
Change-Id: I28fd51a4cbef40fc7c90999fe8121611c7f89f21
i18n library is present in openstack.common but we also have
glanceclient module that supports the same functionality.
In order to be consistent and exclude dependencies on
oslo-incubator code we need to use glanceclient.i18n module only.
Change-Id: Iae9722d7903034bfa6fb8afadbb1f1292c29203e
The common identity params need to be requested from keystone
client instead of storing them in glance client.
Change-Id: If1260fb1e01b1fff798e9ce170e58ac62521d97d