There is a passing gate job, we can claim support for Python 3.5
in the classifier. This patch also adds the convenience py35 venv.
Change-Id: I15304210a7f32b719a910e22518d33427ddedbb9
Commands like glance md-namespace-show <namespace> fail because
of a breaking change in warlock 1.3.0's model creation factory
method.
Warlock introduced a new kwarg 'resolver' in model_factory method
but changed its position with the 'base_class' kwarg. Since we
were calling the model_factory method with positional arg, this
broke the model creation.
Closes-Bug: #1596573
Change-Id: Ic7821f4fdb1b752e0c7ed2bc486299a06bf485c1
Add unit tests to ensure that any stray output (eg print
statements) during image-download cause a test failure.
Regression test for bug 1488914.
Change-Id: Ic19ba5693d059bf7c283702e7c333672a878a1a1
Partial-bug: 1488914
The correct order of arguments to assertEqual that is expected by
testtools is (expected, observed).
This patch fixes the inverted usage of arguments in some places
that have cropped up since the last fix of this bug.
Change-Id: If8c0dcb58496bc2fcf4c635f384522a1f7d2b2af
Closes-Bug: #1259292
Image schema that is located in glance client
is seriously outdated, we need to updated it
and bring it in line with the server version.
Change-Id: I5a79a84a9c07b9ee821a71a5bd2d61cb4299ad72
As the tempest_lib is deprecated and the code has been moved into
tempest. We should use tempest.lib insteded of tempest_lib.
Change-Id: Id22f90a47056cd88f9524fc6015607c93f7d88b5
Added support to log 'X-Openstack-Request-Id' for each api call.
If glanceclient is used from command line then following log will
be logged on console if --debug flag is used.
DEBUG:glanceclient.common.http:GET call to glance-api for
http://172.26.88.20:9292/v2/schemas/image used request id
req-e0c7c97a-8fc0-4ce3-a669-d0b1eb5d7aae
If python-glanceclient is used in applications (e.g. Nova) then
following log message will be logged in service logs.
DEBUG glanceclient.common.http
[req-be074f1e-1c17-4786-b703-2a221751c8f4 demo demo] GET call to
glance-api for
http://172.26.88.20:9292/v1/images/detail?is_public=none&limit=20
used request id req-9b1dd929-df30-46b2-a8f2-dfd6ffbad3fc
DocImpact:
To use this feature user need to set 'default_log_levels' in third
party application. For example nova uses glance then in nova.conf
'default_log_levels' should be set as below:
default_log_levels = glanceclient=DEBUG
Implements: blueprint log-request-id
Change-Id: Ib04a07bac41ad2a5e997348f3b0bccc640169dc9
construct method is marked as deprecated and might be deleted
in one of future releases. So glanceclient need to be aware of
that and initialize sesssion from command line arguments directly.
Change-Id: Ie81b62b7e70bb177f178caadc41554ae88e51b05
This will force pip install to use the upper-constraints.txt specified
version of pip modules. When you don't do this, you are out on the
bleeding edge and become unstable everytime some python library in the
world changes in a way that you don't expect.
The script is needed because it cleans up the conflicting entry that
corresponds to the client before applying it to source based installation.
Change-Id: I8f168fde04bf9e421d9a39e91a041512bf4f2b79
Closes-Bug: 1563038
skip_authentication is not used as decorator for glanceclient methods.
So this method can be safely removed from glance codebase because
it is artifact from old implementation.
Change-Id: I235b4c6b835c75266d8fae1bb603685aa17ad497
This code removes unnecessary PATCH requests
for tags updating if they were not modified.
Change-Id: I8eced32f39d0c98e0b26014e7b2341ab6580ff01
Closes-bug: 1587999
This reverts commit 9e532db8b0f0ba537edef143a6f5380a2aaa1e4b.
If glanceclient is used in multi-threaded environment, then there is a
possibility of getting invalid/wrong last request-id. To avoid this,
need to use thread local storage to store last-request-id and add
public method to return this request-id to caller.
http://specs.openstack.org/openstack/openstack-specs/specs/return-request-id.html#alternatives
Change-Id: I08d8d87fc0cc291f1b930b2c0cfc110ec8394131
glanceclient/shell.py defines a main entry, however this file cannot
be executed directly because we do not call the main function in
this file. It is actually a module which will be used by
/usr/bin/glance, hence doesn't need to be executable.
Change-Id: I8b45ac7b8b88265cfc27e5ba7201e4766d9dc276
Headers were encoded in HTTPClient, but when glance client started
to use SessionClient this functionality was lost.
This commit replaces static method "encode_headers" from HTTPClient
and makes it a common function, that SessionClient can use when
converting image meta to headers.
Change-Id: If9f8020220d2a0431b4241b38b9c83c09c0d75cb
Closes-bug: #1574587
If env['OS_IMAGE_URL'] is not set then None is returned. This is then
used ignoring the endpoint_type, service_type and region_name. This
patch will use those values if the endpoint is None.
Change-Id: I76cc527b05d2be75d3dbc33123a0d71be97fe25c
Closes-bug: #1579768
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 1f89beb6098f4f6a8d8c2912392b273bc068b2e3 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