When an error with non-ascii characters is caught by glanceclient, it
fails at printing it and exists with a UnicodeEncodedError. This patch
encodes errors' messages using strutils before sending them to stdout.
Fixes bug: #1200206
Change-Id: I4dabcd76ffb258840bd6a66ad23c030f34960e86
Add a '--all-tenants' option to the image-list command. This adds
'is_public=None' to the query string passed to the server, and for an
admin user results in a listing of all images present on the server
irrespective of owner or public values.
Addresses bug 1201787.
Change-Id: I38dd0752a31ebea84f16b786d205e82eba1a96bc
Add the --owner option to the v1 client's image-list command to support
filtering images based on the owner (tenant id).
Allows administrators to more easily list a particular user's images.
Note that this is far less efficient than v2 server-side owner based filtering.
Addresses bug 1201765.
Change-Id: I4ffa522b96c91e659c87f5452f2f1f44e47e806b
Adds support for creating an image to the client library only, not the CLI.
Replaced reference to deprecated BaseException.message
Related to bp glance-client-v2
Change-Id: I8e3d09d89493368d22f7b1f69f79ebd2518e289d
Provide basic but hopefully useful man page.
Also update OpenStack LCC to OpenStack Foundation in docs.
Resolves: bug 1193111
Implements blueprint: clients-man-pages
Change-Id: I9502b3d5ca75149d747d523934a6401e435924b7
Fixes bug 1179392
glanceclient.common.http.HTTPClient.get_connection_kwargs method
explicitly sets the timeout to be a float, while struc.pack is
still using LL as the format string which means 2 Long Integers.
Setting format string to fL which mean a float followed by Long
Integer.
Also, Bad file descriptor error is caused by socket being closed
to soon. Added a close() implementation to VerifiedHTTPSConnection
which will remove reference to socket before returning call to
base HTTPConnection.close(). This will avoid socket to be closed
before response body is read. Socket will close when response
close is called.
Change-Id: I3a973da3b962c7572ae0f61f6996bdd1f0048339
This is a temporary solution. Increasing the default page size (which is being
used everytime, since the client is ignoring nova's --limit param). This should
decrease the number of queries that glance does when nova requests an image
detail list.
Bug 1200257
Change-Id: I7ed4521698570cbae9c20e69ddca8b11b57c65ad
There is an upcoming patch in nova which passes identity
headers to glance client. We want to ensure that these get
passed to glance, which in turn with help the no auth
option in glance.
Resolves bug 1200761
Change-Id: Ifbef582aa4e64a2e7a46db43a9cc6cf8c3531dbd
Currently, accessing a host via ip address will pass SSL verification;
the CNAME is not checked as intended as part of verify_callback.
'preverify_ok is True' will always return false (int/bool comparison).
preverify_ok will be 1 if preverification has passed.
Fixes bug 1192229
Change-Id: Ib651548ab4289295a9b92ee039b2aff2d08aba5f
if any of the projects specify a capped client, it has the
potential for preventing that client from being tested in the
gate. To fix this we have to uncap maximum versions of all
openstack client code in all openstack projects.
Fixes bug #1200214
Change-Id: I664d2f030972a3bbb08ae1c4b1710816b54b44b2
Implement checksum image index property in the python-glanceclient
Change-Id: If1426b7938457014ef27a86d3902d53854161627
Implements: blueprint index-using-checksum-image-property
Added the CLI option image-tag-update to associate a tag to an image via API V2.
Added the CLI option image-tag-delete to delete a tag associated with an image via API V2.
Related to bp glance-client-v2
Change-Id: I76060e1982223770a6c2c0bd9376d568af0df456
Instead of globally ignoring pyflakes and
hacking warnings, only blacklist those that trigger
very frequently so far, in order to clean them
up in followup commits. Fix and start gating
on the rest already.
Change-Id: Ied7c7250061e3bf379e8286e8ce3b9e4af817faf
Causes issues with the recent re-merge with setuptools. Advice from
upstream is to stop doing explicit depends.
Change-Id: I75916a4fe2f7cf2eb8db2187c03895438aa58efd
Glanceclient implemented both functions before they landed into oslo.
Since both functions are already in oslo, it is now possible to pull
them in.
There's a small difference between glance's implementation and oslo's,
that is the later does not convert non-str objects - int, bool - to str
before trying to decode / encode them. This patch takes care of that
where necessary, more precisely, while encoding headers before doing a
new request.
Fixes bug: #1172253
Change-Id: I9a0dca31140bae28d8ec6aede515c5bb852b701b
v1.images._image_meta_to_headers currently encodes headers as a way to
ensure they're an instance of basestring. This is not necessary since
headers will be encoded later during the request. Also, all data within
the client should be already decoded.
Fixes bug: #1187013
Change-Id: I80525adbc6e9e576cfad5b576090ef9ee574c1cf
For image-updae and image-create commands, glanceclient attempts to
determine whether image data should be uploaded based on the presence
of data on stdin. Unforunately it is difficult to determine if data is
available, especially when standard in is from a pipe.
This is especially problematic for update operations, where data must
only be uploaded if the image is in queued state. For example data may
be uploaded when the user only wants to rename an image, but the rename
will be rejected because data cannot be uploaded to an unqueued image.
This patch removes the check that attempts to determine if data is
available to read as it didn't work for pipes. It also re-introduces a
check for image state in the update operation, so that glanceclient only
attempts to read data if the image being updated is in queued state.
The image state check is part of the original patchset that was removed
so the patchset could have a single focus [1]
This patch also removes a test for handling empty stdin, and adds a test
for reading stdin from a pipe.
[1] https://review.openstack.org/#/c/27536/3/glanceclient/v1/shell.py
Fixes: bug 1184566
Related to: bug 1173044
Change-Id: I8d37f6412a0bf9ca21cbd75cde6a4d5a174e5545
The patch adds tests for headers encodings, incoming data decoding,
outgoing meta encoding and filters encoding.
Fixes bug: #1187013
Change-Id: I7e59bf6c44b9d188bd3faf32fc09f309f3ad67d3
Introduce py33 to tox.ini to make testing with
python3 easier.
Change-Id: I11801a5b3fd736d8e647a8a7152e498f505108f6
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Rename tools/pip-requires to requirements.txt and tools/test-requires
to test-requirements.txt. These are standard files, and tools in the
general world are growing intelligence about them.
Change-Id: Ic220b54de5ce7c15f442b8ffcb97cd03c2344f9a
Fixes: bug #1179008
* Check for available data size in v1/shell.py/_set_data_field, don't
read if 0.
* Add test_shell.py including tests for 3x stdin scenarios:
* closed
* open and empty
* open with data
Change-Id: I6ff65b0e226be509de9cd3f021560081529283b0
Fixes: bug #1173044
THe patch updates the importutils module and uses a per-line module
specification instead of the old modules= options.
Change-Id: Ieb28780bb9034fd61942305ff1eec21b3637027a
Convert non-ascii characters within image property (key/value pair) to
unicode but utf-8 to prevent provisioning failure when cloud using qpid
backend.
This change also make the image property encoding consistency between
the image updating and the receiving. Before this, image property
updating use unicode, but receiving (get) result is utf-8.
Fixes: Bug #1180377
Change-Id: I010760c598a7e008c79f1240255708265352cdb5
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>