747 Commits

Author SHA1 Message Date
Jenkins
dc3dd87de9 Merge "Import only modules and update tox.ini" 2015-06-18 19:52:43 +00:00
Cindy Pallares
997c12d3ab Import only modules and update tox.ini
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
2015-06-17 10:56:37 -05:00
OpenStack Proposal Bot
081080534c Updated from global requirements
Change-Id: I9b3c158fecbbd36587cb0a1e402bdf1598af2b69
2015-06-16 19:22:51 +00:00
Jenkins
71d8528364 Merge "Close iterables at the end of iteration" 2015-06-16 19:01:18 +00:00
Jenkins
0d22e821f9 Merge "Add parameter 'changes-since' for image-list of v1" 2015-06-15 18:11:27 +00:00
Jenkins
e863cb3f94 Merge "cleanup openstack-common.conf and sync updated files" 2015-06-14 20:09:05 +00:00
Robert Collins
43621dc1ac Close iterables at the end of iteration
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
2015-06-11 18:11:39 +00:00
Jamie Lennox
5ce9c7dc96 Make glanceclient accept a session object
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
2015-06-11 13:11:56 +00:00
Davanum Srinivas
5e85d61fb9 cleanup openstack-common.conf and sync updated files
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
2015-06-10 11:59:12 +00:00
Nikhil Komawar
db6420b447 Add release notes for 0.19.0
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
0.19.0
2015-06-10 10:04:23 +01:00
Louis Taylor
dfa98ab04c Updated from global requirements
Also update hacking to

    hacking>=0.10.0,<0.11

to get around breakage with pbr dependency.

Change-Id: Ic5e2d8df6993397ee4d1b087d96cc6667bd72acc
2015-06-05 15:23:33 +00:00
Jenkins
d80c70e58a Merge "Improve import related error handling" 2015-05-26 18:20:16 +00:00
Jenkins
7ab3490978 Merge "Fixed doc example" 2015-05-26 17:16:57 +00:00
Jenkins
064822181a Merge "Fix Metadef Object update issue with python-glanceclient" 2015-05-26 14:59:51 +00:00
Jenkins
85078098e7 Merge "Use assertIn instead of assertTrue in tests" 2015-05-26 09:55:18 +00:00
Jenkins
0bf3bfe94f Merge "Unorder compare in tests" 2015-05-26 01:29:03 +00:00
Jenkins
2eb5292e9d Merge "Include owner and status option in v2 image list" 2015-05-25 21:15:12 +00:00
Jenkins
0c244b24bd Merge "Check image-download for redirection" 2015-05-25 21:15:09 +00:00
Jenkins
048e763b75 Merge "Fix functional tests in gate" 2015-05-25 17:29:27 +00:00
Cindy Pallares
6cb26fc2bf Include owner and status option in v2 image list
Show the owner and status information when adding -v or --verbose
to the image-list command.

Closes-bug: #1381514
Change-Id: I90bf622147b12ed157072fad0823af58223caf91
2015-05-22 01:56:42 -05:00
Lakshmi N Sampath
5d933b0dd5 Fix Metadef Object update issue with python-glanceclient
Disallowed fields(schema, created_at and updated_at) were
getting deleted from Metadef namespace instead of Metadef object.

Change-Id: Id80e204c7af1ac6926c66627d290a15c4e6b00d9
Closes-Bug: #1433884
2015-05-18 13:49:52 +02:00
Jenkins
e180dbf12c Merge "Add release notes for 0.18.0" 2015-05-18 00:25:19 +00:00
Stuart McLaren
9f5c58193b Fix functional tests in gate
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
2015-05-15 13:18:00 -04:00
Jenkins
688f902305 Merge "Do not crash on homedir mkdir" 2015-05-14 19:14:38 +00:00
Thomas Goirand
1686d6aa53 Do not crash on homedir mkdir
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
2015-05-14 15:41:24 +00:00
Stuart McLaren
1f89beb609 Improve import related error handling
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
2015-05-08 12:51:02 +00:00
Fei Long Wang
116fac8ae8 Add parameter 'changes-since' for image-list of v1
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
2015-05-06 14:58:44 +12:00
Cindy Pallares
583adc34f8 Check image-download for redirection
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
2015-05-05 13:17:39 -05:00
Louis Taylor
9c172fb056 Add some basic CLI functional tests
This ports over most of the functional glanceclient cli tests out from
tempest.

Change-Id: I59d409ade72c289ed9942ce374cae732a40518aa
2015-05-01 17:03:40 +00:00
Kamil Rykowski
bf413a6539 Use assertIn instead of assertTrue in tests
Since `assertIn` is provided for checking if value exists in given
container, it is not formal to use `assertTrue` for it.

Change-Id: Ie1392839b5ca436957463bb29f2784d48cfcbf75
2015-04-29 10:31:22 +02:00
Jenkins
9fac2a557e Merge "Create functional test base" 2015-04-28 22:51:23 +00:00
Jamie Lennox
6431fae545 Unorder compare in tests
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
2015-04-29 04:12:35 +10:00
Jenkins
d4d7fdc354 Merge "Move unit tests to standard directory" 2015-04-28 16:33:58 +00:00
Louis Taylor
5fa71aa560 Add release notes for 0.18.0
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
2015-04-23 13:31:11 +01:00
Doug Hellmann
6d3111614d Update README to work with release tools
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
2015-04-21 15:21:16 +00:00
Stuart McLaren
71d97836f8 Create functional test base
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
2015-04-18 17:43:01 +00:00
Stuart McLaren
f2a8a520e7 Move unit tests to standard directory
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
2015-04-18 17:42:20 +00:00
Jenkins
825c4a5df2 Merge "Correct help messages for image-update command" 2015-04-18 10:00:59 +00:00
Doug Hellmann
8b4456a220 Uncap library requirements for liberty
Change-Id: I5760af63dba65fadb21065d822e1f9c1865c328a
Depends-On: Ib948b756b8e6ca47a4c9c44c48031e54b7386a06
2015-04-16 18:13:00 +00:00
Jenkins
dfcce08710 Merge "Omit 'locations' as image-create parameter" 2015-04-15 20:49:12 +00:00
Jenkins
9184429830 Merge "Fix https stack trace on python 3.4 client" 2015-04-15 11:07:38 +00:00
Jenkins
6a2e9f3602 Merge "Fix client when using no ssl compression" 2015-04-15 11:05:20 +00:00
Jenkins
4753ee34ee Merge "Add unit tests for log_curl_request" 2015-04-15 05:31:19 +00:00
Jenkins
b9338ce2da Merge "Add SSL cert verification regression tests" 2015-04-14 16:19:25 +00:00
Michal Dulko
76c9f68ab6 Add unit tests for log_curl_request
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
2015-04-14 10:00:51 +02:00
Jenkins
549761c6b8 Merge "Test unit for checking update active images" 2015-04-13 00:07:28 +00:00
Stuart McLaren
bd0aa0672e Fix https stack trace on python 3.4 client
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
2015-04-11 11:04:23 +00:00
Stuart McLaren
c698b4e322 Fix client when using no ssl compression
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
2015-04-11 11:03:54 +00:00
Stuart McLaren
64a1a0fdcc Add SSL cert verification regression tests
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
2015-04-11 11:00:19 +00:00
Fei Long Wang
c73026634c Omit 'locations' as image-create parameter
Based on current implementation, locations is reserved
attribute, so it should not be a parameter for image
create.

Closes-Bug: #1399778

Change-Id: Ie51e52157e905fdecf736125be0dac87b1a966ec
2015-04-11 00:02:22 +12:00