7 Commits

Author SHA1 Message Date
Steve Martinelli
16f83c4a53 Switch to keystoneauth
move cinderclient to keystoneauth as keystoneclient's auth session,
plugins and adapter code has been deprecated.

Co-Authored-By: Paulo Ewerton <pauloewerton@lsd.ufcg.edu.br>
Co-Authored-By: Sean McGinnis <sean.mcginnis@gmail.com>
Co-Authored-By: Jamie Lennox <jamielennox@gmail.com>

Change-Id: Id4bf0e2088e8ad99e83cd4f9b8549c2aca1f65a2
2016-07-23 07:35:40 +10:00
Rui Chen
bc5ddf1e6a Fix batch deleting issue in volume_type.unset_keys()
cinderclient volume_type.unset_keys() only delete the first key even if
multiple keys are applied. The response of manager._delete() is tuple object,
it is not "None" if the deleting success, so the batch operation would
be broken when the first key is deleted successfully. The patch fix this
issue.

Change-Id: I60378a32cdc52aacdf869d69b246dec7eb6cdb77
Closes-Bug: #1596511
2016-07-06 15:15:35 +08:00
Jenkins
835747d40f Merge "Fix argument order for assertEqual to (expected, observed)" 2016-06-14 15:39:48 +00:00
reedip
ea2693b9d9 Fix argument order for assertEqual to (expected, observed)
assertEqual expects that the arguments provided to it should be
(expected, observed). If a particluar order is kept as a convention,
then it helps to provide a cleaner message to the developer if Unit
Tests fail. The following patch fixes this issue.

TrivialFix

Change-Id: I817a654733e0f3886ca85778a49aa579592f60ff
Closes-Bug: #1259292
2016-06-14 08:27:32 +00:00
Ivan Kolodyazhny
9e19357e4b Fix upload_to_image method
Commit Ie639179c5bbbaca4de62b42b368830afcfd8f7ac introduced 'visibility'
and 'protected' params. These params should be used only with
v3.1 microversion. Also these changes break current v2 users.

This patch fixes these issues.

Closes-Bug: #1584056
Change-Id: I0574631791c475bbefdb6e7d1647a20d0759df64
2016-05-20 22:55:55 +03:00
Ankit Agrawal
ef151618e1 Return wrapper classes with request_ids attribute
Return appropriate wrapper classes with request_ids attribute from
base class.

Note:
In cinderclient/base.py->_update method will return None for
qos_specs->unset_keys method and for all other cases it returns body
of type dict. At few places, wherever the _update method is called,
it converts the return value back to the resource class and in all
other cases the same return value is returned back to the caller.
It's not possible to return request_ids with None so for all cases
object of DictWithMeta will be returned from this method. Second
approach would be to return (resp, body) tuple from _update method
and wherever this method is called, return the appropriate object.
These changes will affect v1 version and since v1 is already
deprecated the above approach sounds logical.

This change is required to return 'request_id' from client to log
request_id mappings of cross projects.

Change-Id: If73c47ae2c99dea2a0b1f25771f081bb4bbc26f1
Partial-Implements: blueprint return-request-id-to-caller
2016-01-28 23:19:57 -08:00
John Griffith
e5a1304791 Move unit tests into test directory
This is the first step of moving functional testing
into the project tree.  This change just moves
all of the unit tests to be under a dedicated tests/unit
directory.

Follow up patches will add the functional directory and
start moving tempest CLI tests there.

Change-Id: I9dc0b8f761676c1b3bbdeb03e2f44b35f75c693e
2015-03-23 21:20:10 -06:00