13 Commits

Author SHA1 Message Date
wanghong
470b7e53a8 add multi-delete support for compute/image/net/volume
This is part1, add support for these objects:
compute.server
imagev1.image
imagev2.image
network.network
volume.volume
volume.backup
volume.snapshot

Closes-Bug: #1400597
Change-Id: Ice21fee85203a8a55417e0ead8b509b8fd6705c1
2014-12-23 09:31:10 +08:00
Dean Troyer
936722d59f Add arg to 'server image create' tests
The 'protected' column was not being checked.  Also add it to
image.fakes.IMAGE.

Change-Id: Ie431e9871a7da78b5a3924bfbc51d5575d994d86
2014-11-14 16:13:01 -06:00
Dean Troyer
ca783f4659 Close files on image create
The file opened for --file was never closed.  Close it if it is a
file object.

Change-Id: I7bd120a2413de42339771d01e8fd1894d38c3011
2014-10-14 15:37:23 -05:00
Jenkins
7b70143695 Merge "Add more columns to image list output" 2014-07-26 22:20:19 +00:00
Steve Martinelli
6e1fa8b27d Change V2 image tests to actually run V2 image code
The current tests for image do not run v2 image code, changing
that portion also made it's only test fail.
I opted to change the image delete code and not the test, since
passing the object ID is more in line with the rest of the
project code.

Change-Id: I62e13c063a5d68279dbbf31e59266db6285d73bf
2014-07-25 01:16:01 -04:00
Steve Martinelli
e1c32b8224 Add more columns to image list output
Add disk_format, container_format, size and status to image list
command. Added tests as well.

Change-Id: I8e3822c6d46d0020fc706955c026549f6c635587
Closes-Bug: #1348475
2014-07-25 01:09:59 -04:00
Cyril Roelandt
169587ddbd Python 3: do not use __builtin__
Use six.moves.builtins instead, this works with both Python 2 and 3.

Change-Id: I57e7257d4f06c805f26383e0778ad104d50ea139
2014-07-03 00:27:35 +02:00
Dean Troyer
6380b8b959 Image create and set command updates and tests
Refactor image create and set commands to properly handle properties.
This is particularly tricky with exclusive booleans as in this case leaving
both choices off the command line should NOT assume a default value but
leave the existing value unchanged.

Properties were not being updated correctly in the 'image set' command.
Refactor it to use the same pattern as in other SetXxx commands.
Add tests for arg handling.

Change-Id: I123a64c9b4feecab25a3e2013cc047f55b1c9967
2014-06-16 23:30:46 -04:00
Terry Howe
e6e0dbf754 Add --volume option to image create command
Add ability to create an image from a volume.
* Added --volume command to image create
* Added --force option to image create
* Added block to access volume manager in image create
* Tests added for the volume option

Change-Id: I3910a2b5e04acd0d15dd230747ba6ebca07aa316
Closes-Bug: #1207615
2014-03-05 11:26:13 -07: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
200ed62054 Add server image create command
Translation of 'nova image-create', with tests!

Change-Id: I8a833aeff6f291e4774063ed235876eb2ba9c13c
2013-11-18 23:40:11 -06: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
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