This commit enables new flake8 checks:
* E265 block comment should start with '# '
* H405 multi line docstring summary not separated with an empty line
* E123 closing bracket does not match indentation of opening bracket's line
* H238 old style class declaration, use new style (inherit from `object`)
* E128 continuation line under-indented for visual indent
and makes related changes in the code.
Change-Id: Ie993afc930f6b74d7a990bcaa9fc0e9f5ba1585c
Add new tests for v2 tasks module to cover following cases:
- getting list of tasks using the marker
- getting list of tasks using sort_key & sort_dir keys
Change-Id: Ic126999ebb16e51cc472fe8f86dfe1fced0bc016
Closes-Bug: 1433637
Several tests with cert verification are broken. This
code fixes it by setting right imports. Also some typos
are fixed too.
Change-Id: Ie014f90714c3dabee65459fd704dd11b1770c7de
Closed-Bug: #1472234
mock 1.1.0 was released on 10 July 2015 which prevents users from using
non-existent assertion methods. This broke the test in the diff.
Co-Authored-By: Ian Cordasco <graffatcolmingov@gmail.com>
Closes-Bug: #1473454
Change-Id: I162b76bbd7d96c96787a8dd8f9642ca1c80c596a
The v2 Glance client implementation ignores the marker attribute if
it's passed to the client as part of the kwargs. Include support
for the attribute, as the v1 client supports it and it makes it
easier to work with the Glance client.
Change-Id: Ifaa59129bc4178212b890ea591673cb154e0f110
Closes-bug: 1465373
As stated in the OpenStack Hacking Guidelines, it is prefered
that only modules should be imported.
Also updated tox.ini to ignore opestack/common among others.
Change-Id: I2f0a603c31052eadee581c11880c0ec6bd392829
This fixes a bug where if iteration is interrupted, we're stuck until
the iterable is garbage collected, which can be a very long time (e.g. if
the iterable is held in an exception stack frame).
Co-authored-by: Stuart McLaren <stuart.mclaren@hp.com>
Change-Id: Ibe9990e8c337c117a978b1cd8ec388c4bc6d3b4b
Closes-bug: 1461678
To make this work we create a different HTTPClient that extends the
basic keystoneclient Adapter. The Adapter is a standard set of
parameters that all clients should know how to use like region_name and
user_agent. We extend this with the glance specific response
manipulation like loading and sending iterables.
Implements: bp session-objects
Change-Id: Ie8eb4bbf7d1a037099a6d4b272cab70525fbfc85
Show the owner and status information when adding -v or --verbose
to the image-list command.
Closes-bug: #1381514
Change-Id: I90bf622147b12ed157072fad0823af58223caf91
Disallowed fields(schema, created_at and updated_at) were
getting deleted from Metadef namespace instead of Metadef object.
Change-Id: Id80e204c7af1ac6926c66627d290a15c4e6b00d9
Closes-Bug: #1433884
The check-glanceclient-dsvm-functional gate job was failing due to the
functional tests not picking up valid OpenStack credentials.
Update how we aquire credentials -- fixes side effect of how tox 2.0
handles environment variables.
Change-Id: Ia665dc9673d09421508476d05039d2da8a5e1a29
Closes-bug: 1455102
If there was a problem importing a library we would incorrectly raise
an unsupported version error:
$ glance --os-image-api-version 1 image-list
"1" is not a supported API version. Example values are "1" or "2".
We should change this to provide information on the failed import, eg:
$ glance --os-image-api-version 1 image-list
No module named badimport
We also now raise the full stacktrace in this case if '--debug' is passed
on the command line.
Change-Id: I1c687ae6c5da239090b0b7a4a855b3271a9076da
Related-bug: 1402632
Now Glance /images/detail API of v1 supports parameter
'changes-since' to query deleted images. But it's missed
in client. This patch will add the parameter.
Related-Bug: #1432701
Change-Id: Id38e3a78b4b2ef680ea04d35e32beb4b9c8efa00
Since `assertIn` is provided for checking if value exists in given
container, it is not formal to use `assertTrue` for it.
Change-Id: Ie1392839b5ca436957463bb29f2784d48cfcbf75
On occassion the values from schema are presented in a different order.
Compare them in an unordered way as we only care that both are present.
Change-Id: Ib2d44587196f43c73f4b0a3796fac9f4dc20f20f
This will allow adding 'check-glanceclient-dsvm-functional' tests in
the gate, similar to:
* check-novaclient-dsvm-functional
* check-keystoneclient-dsvm-functional
* check-neutronclient-dsvm-functional
* etc
Change-Id: Id970db52695db7dc53206aa05fe573995b57aa78
This patch moves the glanceclient unit tests to the standard directory
(xxxclient/tests/unit) in preparation for adding functional gate tests
'check-glanceclient-dsvm-functional' in the same vein as existing client
tests for other projects, eg:
* check-novaclient-dsvm-functional
* check-keystoneclient-dsvm-functional
* check-neutronclient-dsvm-functional
Change-Id: I29d4b9e3a428c851575ee9afde40d6df583456c4