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
argparse was external in python 2.6 but not anymore, remove it from
requirements.
This should help with pip 8.0 that gets confused in this situation.
Installation of the external argparse is not needed.
Change-Id: Ib7e74912b36c1b5ccb514e31fac35efeff57378d
Currently location-add, location-delete and location-update
shows <ID> in help messages as metavar for image id. It may be
not clear to the users so we need to change this to <IMAGE_ID>.
Change-Id: I59c787e449fa34bc792de179993c55f59734b9fe
Closes-Bug: #1535220
Current description of instance-uuid may confuse users because
they may think that instance-uuid can serve as basis for image
but it just stores instance-uuid as image-metadata.
So we need to enhance the description in glanceclient.
Change-Id: I55829d106c9d25374df6538b3071104ee5f215f2
Closes-Bug: #1496822
Not getsocketopts is presented in GreenSocket for Linux.
See the bug for the info. So we don't need to patch it anymore.
Closes-Bug: #1348269
Change-Id: Ie2211238656eddfb0af5f3ef84ab638f6248a10a
Due to the change in python versions greater then 2.7.8, messages
that SSL certificate handling module is producing are different
from the error messages produced in earlier versions of py27.
Fixed how the following test cases of TestHTTPSVerifyCert class
are handling erroneous SSL certification messages:
- test_v2_requests_valid_cert_no_key
- test_v2_requests_bad_cert
- test_v2_requests_bad_ca
Closes-Bug:1499355
Change-Id: I3b939292ba0042bced5cc91a26e2593450f9cafe
Glance client has a custom check that generates exception if
location has not been returned by image-get request.
This check should on server side and it should be managed by
policy rules when do location-add action.
That also allows to increase possibility of migrating Heat
to v2[1].
NOTE: After this patch, we'll raise a HTTPBadRequest from
server side instead of HTTPConflict when a user adds a
duplicate location.
[1]: https://review.openstack.org/#/c/240450/
Co-Authored-By: wangxiyuan <wangxiyuan@huawei.com>
Change-Id: I778ad2a97805b4d85eb0430c603c27a0a1c148e0
Closes-bug: #1493026
When no token or endpoint, it creates a session and from there
taken the necessary values.
This commit proposes to transfer a session in such cases.
This will avoid unnecessary actions and some of the problems.
Change-Id: Idc874b6c01e915e52904604d59e8e0b460e71621
Partial-bug: #1519546
These are server-generated, not user-generated, and schema validation
should not be necessary.
Rework a unit test that enforces this; bad data should be blocked
at ingest, not blocked on reads.
Co-authored-by: Stuart McLaren <stuart.mclaren@hp.com>
Change-Id: Ib1926fec0e858b6eed43c7931a6d6c3a1708e70e
Closes-Bug: 1501046