In docstring of list() method of glanceclient/v1/images.py,
parameter 'return_request_id' used within **kwargs is
'return_req_id', not 'return_request_id'.
Changed 'return_request_id' to 'return_req_id'.
Change-Id: I7f4a2a5af1b13184c67fa81be971dc5139569f8b
Closes-Bug: 1573049
Enabled following hacking checks from tox.ini:
- H233 Python 3.x incompatible use of print operator
- H303 no wildcard import
- H404 multi line docstring should start with a summary
Change-Id: I2553bcd3e80c00acc08d135a1d2dadfb6cda49fe
Partial-Bugs: #1475054
Commit 1f89beb609 introduced the behaviour
that a stacktrace is printed if an exception is encountered.
This helped make the client more supportable:
$ glance --debug image-list
.
.
.
File "glanceclient/common/http.py", line 337, in get_http_client
xxx
NameError: global name 'xxx' is not defined
global name 'xxx' is not defined
The behaviour was lost at some point. This patch re-enables it.
Change-Id: I25fc8624797909d606590747f54b9cf649ade079
Closes-bug: 1563830
apiclient.base.Resource.get method requires manager.client to have
last_request_id member. Otherwise get operation fails with
AttributeError exception.
Change-Id: I0ece85e3f61f2a7f176520ddf3ebee7792e51993
Closes-bug: 1552533
you can see the default help informatiion is v2
subcommand information if input glance command
Co-Authored-By: Stuart McLaren <stuart.mclaren@hp.com>
Closes-bug: #1563649
Change-Id: I7d227f3e68aa555b2e25848618f76df4872af35d
Previously auth_token was initialized once in __init__ method.
After that we stored token in session headers. So to refresh token
users need to instantiate a new session inside http client or
re-create client itself.
In order to provide possibility to refresh token we need
to add token header before sending the request. So users can
just update auth_token attribute in the HTTPClient to refresh
user token.
Change-Id: Ifebe9011870bbddc46fc6d6a26563641d5559e97
Closes-Bug: #1563495
After the introduce of this patch set[1], cli user can't get debug
info even --debug is passed. With the patch set[1], the request
action will be performed in keystoneclient.session.Session.
However the default log level of keystoneclient module is WARNING,
so user can't get debug info from keystoneclient.session.Session.
This change set the root log level to DEBUG when --debug is
passed.
[1]: https://review.openstack.org/#/c/262220/
Change-Id: I0db0fd7ab07a0d61082b86829a671d8dbc0f2963
Closes-bug: 1551076
Now the help message of namespace and resource_type are wrong,
we could see a <unavailable> error when try to get the help
information, such as "glance help md-namespace-create".
See the patch[1] to get more information. the patch[1] added
image schema, but the metadata schema are needed as well.
This patch adds the current metadata schema into client, so that
help text can't be rendered when there schema is not available in
the system.
[1]: https://review.openstack.org/#/c/209536/3
Change-Id: I2ab94d8768114a7e5c475310ba094af653627658
Closes-Bug: #1536430
When docs are generated with pbr command 'warnerrors = True'
there are many doc problems that are shown. This patch fixes
these problems.
Change-Id: Idb804ab924782b6d7d379494987bdba2acbce568
Closes-Bug: #1557235
After commit Ieb03aaba887492819f9c58aa67f7acfcea81720e, the command
location-update is totally broken now. This patch removes the updating
for an image from non-empty to empty since it's not supported now.
And also removing the default value of metadata for location-update
cli command because now the only purpose of location-update is updating
the location's metadata, so it doesn't make sense to give it a default
value which may update existing metadata by mistake.
Closes-Bug: #1537626
Change-Id: I9ce98e6c63996bbfdbc56761055e37a871f9d3e2
In case do_image_delete() is called on an image that is
in use and can't be deleted by the driver a HTTPConflict
error is raised in glance. Catch this error and print a
propper error message.
Closes-Bug: #1551037
Change-Id: Id17098f27511df8e05e56b8df21e748921223bd9
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
A download of a deactivated image may result in a 403.
The cli should catch this error rather than stack trace.
We also catch other unexpected http responses.
Change-Id: If33fbc3a56cdb02b3ab32a6479a67fff20b4b1a9
Closes-bug: 1523612
Some of the assertions in glanceclient test are sequential, we should
better use assert_has_calls() instead of assert_any_call().
And assert_has_calls() provides more clear messages in case of failure.
Change-Id: Ie45e7c56b1c859916a1f31636c639422f1ffef28
Add possibility to generate release notes to glanceclient.
We need this because it helps to prepare good documentation
and provide useful info to Openstack users.
Change-Id: Ifce2df8ac5f3a14518a758d748964e7201a75291
If it has a value of boolean true,
this keyword indicates that the instance property SHOULD NOT be changed,
and attempts by a user agent to modify the value of this property are expected to be rejected by a server.
The value of this keyword MUST be a boolean.
The default value is false.
Further link for reference: http://json-schema.org/latest/json-schema-hypermedia.html#anchor15
Closes-Bug: #1521581
Depends-On: I279fba4099667d193609a31259057b897380d6f0
Change-Id: I96717506259c0d28500b8747369c47029b1dd9b6
Shell tests initialized glanceclient with force_auth parameter
but this parameter doesn't exist at all.
The patch fixes this behavior and modifies client mocking to
prevent from these errors in future.
Change-Id: If4b469cf8da8105204a7f1f6e80ae19b86c7daee
glance has a code specific for python2.5. We need to delete this
code cause glanceclient doesn't support neither python2.5 or
python2.6.
Change-Id: I17e4905b6e02fcfff033a6cde03324e2a47bfce2
README.rst file for functional tests and glanceclient itself
raises some warnings when passing these docs through REST
validator and build the doc:
- Need additional empty line to provide correct indent in
cloud.yaml example
- Title should be with the same length as overline.
The patch fixes these warnings.
Change-Id: I2e2ef6f838ee639d1a88256b6e321181a62cc76b