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
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
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
The HTTPClient object that we are passing *args to does not accept any
args. Don't accept them from the main client interface.
Change-Id: I473bb64be95e058375ebd1e55d4bda4168c3c430
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
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
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
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
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
This test unit pretends to cover attempts to upload images with active
status.
Change-Id: Id557157b30d78af474973a9d385c34aeb8afd0c3
Closes-Bug: #1434306
Currently when you are trying to update the location of an image which
is not in queued status you will get an error from the Glance API. The
help message for --location and --copy-from arguments should be updated
to inform the user that it works only for images in queued status.
Co-Authored-By: Abhishek Talwar <abhishek.talwar@tcs.com>
Co-Authored-By: Kamil Rykowski <kamil.rykowski@intel.com>
Change-Id: I82b14ffde3f301d7ffef68e984ba4ad2ae0f8b0f
Closes-Bug: #1220809
$ git log 0.16.1..HEAD --no-merges --oneline
db5d729 Updated help for v2 member-update api
3f3066b Extend images CLI v2 with new sorting syntax
bbd27d5 Add the ability to specify the sort dir for each key
976fe17 Import sys module
fc79467 Adds the ability to sort images with multiple keys
f00f769 add examples for properties and doc build script
f6f5733 Apply expected patch format when updating tags in v2.images
a9a692b v2: read limit for list from --limit in shell
0ab5a78 Fix leaking sockets after v2 list operation
f98ab68 Fix leaking sockets after v1 list operation
6e0b1f4 removed excessive call to os.path.exists
b47925e Unit tests covering missing username or password
b64dba8 Remove duplicate 'a' in the help string of --os-image-url
6d21959 v2: Allow upload from stdin on image-create
4c7c7ad Fix v2 image create --file documentation
eeef763 Fix minor typo in version error message
Change-Id: I90d7e4a5109d82e25a63135e94193f4c4f7d4f34
help message for v2 glance member-update api
now displays the Valid Values of member status
variable.
The valid values are: pending, accepted, rejected
Change-Id: Ibe6f55c933668451b407ed9a19c520c3fbf1912a
Closes-bug: #1420707
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