| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| |/ /
|/| /
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This test unit pretends to cover attempts to upload images with active
status.
Change-Id: Id557157b30d78af474973a9d385c34aeb8afd0c3
Closes-Bug: #1434306
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Right now all invalid tags are skipped when filtering for image list. We
should change this behaviour to raise an exception when invalid tag
value is provided.
Additionally remove misplaced `pass` from one of the tests.
Closes-Bug: 1433962
Change-Id: If5148608a70ee019697ea2dcb84e19a53222d596
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Added option '--human-readable' to image-show cli which allows users
to display image size in human-readable format.
Change-Id: Ic3452ce4560d3cf90fa7f59f98e5ff42e804f8c9
Closes-Bug: #1434381
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently when you are trying to set invalid additional property for
task using py3 interpreter it will fail, because function `unicode` does
not exist in py3.
Fix it by replacing `unicode` with `utils.exception_to_str` which is
used in other modules already.
Change-Id: I5897868f801467a2eaa7585b5f2d578cef358426
Closes-Bug: 1439513
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Changeset I49255255 has added an 'is_base' attribute for Image Schema
properties, thus allowing to differentiate between base and custom image
properties, but the client hasn't make any use of it.
This patch adds appropriate attribute to SchemaProperty class and a
helper method which allows to validate if the given property is base or
not.
The added helper method (is_base_property) should not be confused with
the existing is_core_property: the latter just checks if the property is
known to the schema, regardless of its being base or not.
Change-Id: I7c397196dad9ae5494ed2f8f3aacef3fc1ce70d8
Partial-Bug: #1323660
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Rather than testing that a certain plugin was loaded test to make sure
that the client actually did the authentication request and that the
content of that request was correct.
This means we are not so tightly bound to those specific plugins and
this can be changed in later reviews.
Change-Id: Ia3ae0069e3e0277d655f0e251196eca658f94c75
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The majority of the mocks on keystoneclient are not needed. Instead we
use the fixtures that keystoneclient provides to create well formed
responses and use requests_mock to stub out those values when accessed.
This is a closer to real usage pattern and the way that most client
projects are now handling keystoneclient auth.
Change-Id: I294aca1d11c9c5cfb4b82ad16476af4000efee1c
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
requests-mock is a tool specifically designed for mocking responses from
the requests library. Use that instead of handling mox and mock
ourselves.
Change-Id: Ifd855b8d6c1b401e29ac210593c48d2da87a571b
|
|/
|
|
|
|
|
|
|
|
|
| |
Currently, the FakeSchemaAPI in tests/utils has an overriden __init__
method which simply calls super of FakeAPI and doesn't perform any extra
operations. This is redundant, because same effect will be achieved when
__init__ definition is omitted in FakeSchemaAPI. Additionally it uses
'cls' as first param instead of 'self' which breaks naming convention.
Change-Id: I3e72adfbc7b67076748f640d74507ff28c6060d7
Closes-Bug: 1418508
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This code enables new syntax for sorting output with multiple
keys and directions based on API Working group sorting
guidelines.
It's a client code to consume API modified in change
Ie4ccfefa0492a3ac94cc7e22201f2f2be5c1cdbb
Example:
glance --os-image-api-version 2 --sort name:desc,size:asc
Implements-blueprint: glance-sorting-enhancements
DocImpact
Depends-On: Ie4ccfefa0492a3ac94cc7e22201f2f2be5c1cdbb
Change-Id: I36a9fa9f0508fea1235de2ac3a0d6a093e1af635
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds client code to consume API modified in change
Ib43b53abfba7cb5789d916a014376cf38fc5245b
Extends CLI for v2 with multiple sort dirs
Example:
glance --os-image-api-version 2 image-list \
--sort-key name --sort-dir asc --sort-key size --sort-dir desc
Implements-blueprint: glance-sorting-enhancements
DocImpact
Depends-On: Ib43b53abfba7cb5789d916a014376cf38fc5245b
Change-Id: Ia20716f3c75299f796879299da317b2e81496088
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds client code to consume API modified in change
Ib7a6aeb2df3bc5d23fe8e070290b5bfcab00c0f5
Extends CLI for v2 with multiple sort keys
Example:
glance --os-image-api-version 2 image-list --sort-key name --sort-key size
Implements-blueprint: glance-sorting-enhancements
Change-Id: If79779a4c52c8dc5c4f39192d3d247335a76ba24
DocImpact
Closes-Bug: 1221274
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Currently, glanceclient.v2.update builds a patch request that does not
match glance API.
This patch overrides the default behaviour to customize the patch
request with the right format for the API.
Co-Authored-By: Steve Lewis <steve.lewis@rackspace.com>
Fixes bug 1306774
Change-Id: If0739ac285da1e741bfa40b6c719331a5ce49319
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After fixing message displayed when client is executed without
required environment variables exported (OS_USERNAME, OS_PASSWORD,
OS_PROJECT_NAME, OS_AUTH_URL) regression tests should be added. I've
also fixed an issue causing tests using make_env method to always use
FAKE_V2_ENV, even in ShellTestWithKeystoneV3Auth.
Change-Id: I800c8fa11ee45d19f179bd030426db86a93d9f6a
Closes-Bug: 1419788
Partial-Bug: 1355252
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For example:
$ glance --os-image-api-version 2 image-create < /tmp/data
This is consistent with v1.
DocImpact
Closes-bug: 1408033
Change-Id: Ifed4ece9e4e02a46d80b49a8e4fc372f1a304241
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Mainly to improve consistency, use range() from six.moves
renames across glance.
Behaves consistently like py2 xrange() and py3 range().
Change-Id: I7c573a3a9775f454b98d25f2a14f8e9f5f4ac432
|
|\ \ \ \ |
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Other OpenStack services which instantiate a 'https' glanceclient using
ssl_compression=False and insecure=False (eg Nova, Cinder) are leaking
sockets due to glanceclient not closing the connection to the Glance
server.
This could happen for a sub-set of calls, eg 'show', 'delete', 'update'.
netstat -nopd would show the sockets would hang around forever:
... 127.0.0.1:9292 ESTABLISHED 9552/python off (0.00/0/0)
urllib's ConnectionPool relies on the garbage collector to tear down
sockets which are no longer in use. The 'verify_callback' function used to
validate SSL certs was holding a reference to the VerifiedHTTPSConnection
instance which prevented the sockets being torn down.
Change-Id: Idb3e68151c48ed623ab89d05d88ea48465429838
Closes-bug: 1423165
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This mocks out the call to python-keystoneclient's Session.get_token(),
preventing any actual calls being made to a keystone service, running or
not.
Change-Id: I24b0874d8e67b46b7c2294d4ac54efa861561dff
Closes-bug: 1423170
|
|\ \ \ \ |
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Error messages were being passed with either JSON or HTML formatting
leading to an unpleasant user experience. This strips the JSON or HTML
tags and presents the clean error message to the user.
Rewrote the lispy function to be more pythonic, added test cases
and cleaned up some pep8 violations.
Removed commented out cruft from a previous version of this
patch.
Changed the HTML details from a set to a list in order to ensure
the ordering of the exception details.
Added code to eliminate the duplicate detail messages from the list
and reordered the assertion string to match actual output.
Refactored duplicate elimination code to be more readable and
reliable.
Some reworking of the duplication elimination loop to make it
more readable.
Removed unneeded conditional to filter out empty elements.
Change-Id: I79985b3e305cb30328a3c16b025315a8e969243d
Closes-Bug: 1398838
|
|\ \ \ \
| |_|_|/
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently, on systems like Fedora and Debian, it is possible to import
urllib3 as well as requests.packages.urllib3. They functionally point to
the same code but sys.modules considers them to be separate items. When
downstream packagers unvendor urllib3 from requests, they also change
all the imports inside of the package. So if the code imports urllib3
from requests.packages.urllib3 and modifies globals in a submodule, that
will not be visible to requests since it has been rewritten to use
urllib3 (not requests.packages.urllib3). By handling this logic
ourselves, we can issue a release until upstream packages and requests
can fix this and cut a new release.
Change-Id: Ic77ce8a06d9d148a899b4b8695990fca8fdaefc5
Closes-bug: 1396550
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Deleting an already deleted image using admin user is throwing an
error "404 Not Found" which is confusing. Deleting an image that does
not exist throws "No image with a name or ID of 'image-id' exists."
Updated the code so that trying to delete an already deleted image
throws "No image with an ID of 'image-id' exists." error.
Closes-Bug: #1333119
Change-Id: I8f9a6174663337a0f48aafa029a4339c32eb2134
Co-Authored-By: Abhishek Talwar <abhishek.talwar@tcs.com>
Co-Authored-By: Kamil Rykowski <kamil.rykowski@intel.com>
|
|\ \ \ \ \
| |_|_|_|/
|/| | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This pep (included in python 2.7.9) changes the behaviour of SSL
certificate chain handling to be more py3 like.
Include required new exception behaviour in the list of
exceptions to translate under py2.
https://github.com/python/peps/blob/master/pep-0476.txt
Closes-Bug: 1404227
Change-Id: I7da1a13d1ec861a07fd96684d0431508a214a2c8
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When keyboard interrupt is received by glanceclient, the return code as
of now is 1.
But since the client was terminated by an keyboard interrupt, the return
code should be 130. (http://tldp.org/LDP/abs/html/exitcodes.html)
It is useful when people are writing automation test cases and want to
validate based on the return code.
Change-Id: Ia70116ab6f0708a0ce6eeaed07c1e7a56e68c9f4
Closes-Bug: #1373231
|
|\ \ \ \ \ \ |
|