12 Commits

Author SHA1 Message Date
Dean Troyer
39116bf594 Fix volume create --image
'volume create --image' should allow an image name to be used.

Closes-Bug: #1383333
Change-Id: I996d46db321eef2d75c3d19b480319f8a78c09b3
2014-11-18 09:35:08 -06:00
Terry Howe
dc68d3f5cf assertEquals order wrong
Change-Id: I822b6ac5b8e8c3009d1ee2d647376eff84559c11
Partial-Bug: #1277104
2014-09-04 14:47:28 +00:00
wanghong
ddb7e18974 test_find_resource fails if run alone
Currently, we set 'NAME_ATTR' attribute for Volume and Snapshot
class in volume.client.py. When we test test_find_resource alone,
the Volume and Snapshot class do not have 'NAME_ATTR' attribute since
we do not import volume.client, which causes the tests to fail.

Change-Id: I06f727ffa8d37afe1a1191c36574887fecc7a733
Closes-Bug: #1353788
2014-08-07 13:22:25 -04:00
Dean Troyer
11f3654f6e Fix PEP8 E265 errors
Change-Id: Ieb9a9af1da27d3935d1a4d3cfb61b0ccb03d099a
2014-06-27 09:12:55 -05:00
Terry Howe
0b2987fef3 Fix find_resource for keystone and cinder
The find_resource method had two hacks in in to support cinder
and keystone and I have removed those in favor of a monkey patch
for cinder.

The find_resource method used to attempt to UUID parse the id, but
it would do a manager.get anyway.  I changed it to skip the UUID
parsing.  This will make things run minorly faster and it supports
LDAP for keystone.

The find_resource used to attempt to use display_name=name_or_id
when finding.  This was a hack for cinder support, but it breaks
keystone because keystone totally messes up with the bogus filter
and keystone refuses to fix it.

Change-Id: I66e45a6341f704900f1d5321a0e70eac3d051665
Closes-Bug: #1306699
2014-06-17 10:24:26 -06:00
Matt Fischer
4ae4dc35bd Add support for extension list
- Add support in the common section for extension list. This only
   supports Identity for now. Once the APIs for volume and compute
   are supported in the respective APIs, they will be added. Once
   network is added to this client, it will be added (the API already
   supports it).
 - Include extension fakes for volume and compute for pre-enablement.

Change-Id: Iebb0156a779887d2ab06488a2a27b70b56369376
Closes-Bug: #1319115
2014-06-11 13:40:30 -06:00
Dean Troyer
870e7ddbcc Change volume create --volume-type to --type
This makes it consistent with the other --type options in OSC.  Also
add a few more volume_create tests.

Change-Id: I50ef927932cabf157ecdfd6c4faa1914b4fdf413
2014-05-15 09:25:07 -05:00
Shane Wang
8aa0b07fbc Fix misspellings in python openstackclient
Fix misspellings detected by:
* pip install misspellings
* git ls-files | grep -v locale | misspellings -f -

Change-Id: Ic0d3efa26eb9a05ce16a8319c142f5bd1ce23821
Closes-Bug: #1257295
2014-02-07 13:26:48 +08:00
Alexander Ignatov
ad4367839f Remove copyright from empty files
According to policy change in HACKING:
http://docs.openstack.org/developer/hacking/#openstack-licensing
empty files should no longer contain copyright notices.

Change-Id: Iba09a00f24dfbd1cd03c1c9f70ea216788e64d93
Closes-Bug: #1262424
2014-01-20 17:28:13 +04:00
Dean Troyer
6460f1eb35 Complete basic test infrastructure
This finally gets all of the API tests into a common framework regarding
test classes and so forth.

Change-Id: If675347129c50dcba0bfc5b6c58f5a2ca57ff46c
2013-11-18 22:11:10 -06:00
Dean Troyer
9137cc304d Do lookups for user, project in volume create
This required https://review.openstack.org/26323 in keystoneclient,
merged long ago...

Also adds some tests for 'volume create'

Change-Id: I55bededbc20b5dcf2833c59eb2b6b069703d8a9a
2013-10-25 12:21:41 -05:00
Monty Taylor
196daf859b Move tests into project package.
There are several reasons for this. One is that the majority of
OpenStack packages behave this way. The second is that it makes writing
software that extends something easier to test (which is a clear usecase
for openstackclient) And third, tests/__init__.py implies a global
package named "tests" - which I'm pretty sure we're not providing.

Change-Id: Ic708ffd92aea78c2ffc1a8579af0587af4fca4ff
2013-06-30 23:30:54 -04:00