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
periodic updates of latest from oslo-incubator. please
note that files no longer on oslo-incubator mean that
they have been moved to oslo.* libraries. So there's
more work needed to remove these files and switch
to appropriate libraries
Change-Id: Icd71b4b1ea9f1df526614a29277f25a7ab47b721
Changes included in this release:
$ git log 0.18.0..HEAD --no-merges --oneline
dfa98ab Updated from global requirements
6cb26fc Include owner and status option in v2 image list
5d933b0 Fix Metadef Object update issue with python-glanceclient
9f5c581 Fix functional tests in gate
1686d6a Do not crash on homedir mkdir
1f89beb Improve import related error handling
583adc3 Check image-download for redirection
9c172fb Add some basic CLI functional tests
bf413a6 Use assertIn instead of assertTrue in tests
6431fae Unorder compare in tests
5fa71aa Add release notes for 0.18.0
6d31116 Update README to work with release tools
71d9783 Create functional test base
f2a8a52 Move unit tests to standard directory
f931a20 Fixed doc example
Co-Authored-By: Louis Taylor <louis@kragniz.eu>
Change-Id: Ied7f5b4f298e2bbf4a5486eb6b7dbcea2d0e74d3
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
Glanceclient is trying to create ~/.glanceclient, and crashes if it can't
do that. In some environment (for example, when building the package
under Jenkins), writing on $HOME is simply not allowed, and Glanceclient
can simply ignore it. This patch allows the mkdir() to fail, which fixes
the issue.
Closes-Bug: #1446096
Change-Id: Ib3591fb4e54ccd2fe63a1a4815551ac10ef5b961
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
Currently when you download an image without specifying
a file or redirecting the output, the image is dumped into
the console as gibberish. We can avoid this if we
check if file is being redirected or if a file is specified.
Change-Id: I257760752f05b82b935cf19fb10573ee7ff1395d
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
Changes included in this release:
$ git log 0.17.0..0.18.0 --no-merges --oneline
8b4456a Uncap library requirements for liberty
76c9f68 Add unit tests for log_curl_request
bd0aa06 Fix https stack trace on python 3.4 client
c698b4e Fix client when using no ssl compression
64a1a0f Add SSL cert verification regression tests
c730266 Omit 'locations' as image-create parameter
a6234d1 Creating task with invalid property crashes in py3
fd2f989 Don't accept *args for client
e386e44 Stub authentication requests rather than plugins
27f70bb Remove keystoneclient mocks
02b1a05 Replace mox in tests with requests-mock
90407d9 Expose 'is_base' schema property attribute
2c08b40 Validate tag name when filtering for images
13b5a5a Remove redundant FakeSchemaAPI __init__ method
c149a94 glance image-show now have --human-readable option
42d7548 Test unit for checking update active images
6d864ef Correct help messages for image-update command
f272ab3 Generate API documentation
a1bb3eb Use any instead of False in generator
Change-Id: I687bef82afd7bb9a379297d7128a009cc051ca75
The README file needs to have links to the project documentation and bug
tracker in a parsable format in order for some of the release tools
scripts to work (particularly the one that prints the release note
email).
Change-Id: I37e0acc5ed8e1af565359290fa622456901c735e
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
Add 5 new tests that check if log_curl_request method produces proper
curl commands and add again an old test checking this method for
unicode support.
Change-Id: I64caad18d537d727835f3a7ada010ec45b20638a
Closes-Bug: 1174339
When using the client with python 3.4 and no ssl compression the following
stack trace ocurrs:
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
Closes-bug: 1442883
Related-bug: 1357430
Change-Id: I8e28f0bb1f3e866f11851247ce31470ca8c2af4f
Since the release of the 0.16.1 client, using the 'no ssl compression'
option, whether on the command line, or via the library -- Nova does this by
default -- a stack trace was generated.
Closes-bug: 1442664
Related-bug: 1357430
Change-Id: I2b8ddcb0a7ae3cfccdfc20d3ba476f3b4f4ec32d
A security bug (1357430) was introduced which meant that SSL certificate
verification was not occurring.
Add new tests which help prevent the 'requests' part of bug 115260
recurring.
Change-Id: Iaf56fd8bc34fa8f35c2fd7051f9f8424002352cf
Related-bug: 1357430
Based on current implementation, locations is reserved
attribute, so it should not be a parameter for image
create.
Closes-Bug: #1399778
Change-Id: Ie51e52157e905fdecf736125be0dac87b1a966ec