11 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
2c9d263611 Fix server create for boot-from-volume
* server create required --image even when booting the server from a
  volume.  Change options to require either --image or --volume to
  specify the server boot disk.  Using --volume currently uses device
  'vda' for the block mapping and ignores any other block mappings
  given in --block-device-mapping.
* server create and server show are both affected by bug 1378842 where
  an excepion was thrown when no image ID was present in the returned
  server object, which is the case for a server booted from a volume.
* Fix the remaining assertEqual() order problems in test_server.py

Closes-Bug: 1378842
Closes-Bug: 1383338
Change-Id: I5daebf4e50a765d4920088dfead95b6295af6a4d
2014-10-24 17:55:44 -05:00
Dean Troyer
89217a6557 Close files on server create, add tests
The files opened for the --files and --user-data options were never
closed, potentially leaking memory in a long-running client. Close
them if they are file objects.

Add a couple of basic tests for server create.

Change-Id: I1658b0caa2d6af17308149cb52196ee28266ddf2
2014-10-14 15:45:20 -05:00
Dean Troyer
ea2ac77a46 Fix server resize
So apparently we've never resized a server???

Fixed command args and add some tests.

Change-Id: I6c3f6fec22390e9d269b7117a42a190d2b4b80ba
2014-07-08 11:20:13 -05: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
da5e31dbb6 Fix server image create
The final find_resource() call errored because servers.create_image()
returns an image ID rather than an Image resource.  Reset expectations
and arguments.

Change-Id: I1b9132f66091f9df76198724156acb7a6fb2f6fe
2014-05-08 15:04:22 -05: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