summaryrefslogtreecommitdiff
path: root/openstackclient/tests/image
Commit message (Collapse)AuthorAgeFilesLines
* Add status column for "openstack image list"xiexs2015-11-292-17/+28
| | | | | | | | | Actually, the status column is useful for the user. So, it`s better to output this info by default (or, user had to specify the extra option, i.e. --long). Change-Id: Id2a9f86f0de5310f8f5ff9a46bf1b7411094b519 Closes-Bug: #1519181
* Merge "Add --owner to `image create`"Jenkins2015-11-121-2/+4
|\
| * Add --owner to `image create`NiallBunting2015-11-061-2/+4
| | | | | | | | | | | | | | This adds --owner to `image create`. This is backwards compatable with v1. Change-Id: I9e79cf880c91a1386419db729818d23dfe632179 Depends-On: I8d572a070bbb04dccdd051b8e0ad199c5754746e
* | Fix issue when displaying image_memberlin-hua-cheng2015-10-231-3/+1
|/ | | | | | | | image_member doesn't have a _info attribute, glanceclient returns warlock object instead of a Resource object. Change-Id: If6e7c4bd404454bd6cbe8c111879c1afa1380211 Closes-Bug: #1509054
* image set should not show the resourceSteve Martinelli2015-10-062-14/+3
| | | | | | | | the rest of OSC set commands do not show the resource after it has been updated. unless the update fails then we report back a failure, otherwise the user should assume everything went fine. Change-Id: I2bd4188450c3853b4a1bc25f80fc9450cda32bdd
* Add tags to `image set`NiallBunting2015-10-062-4/+94
| | | | | | | | | | | | This adds --tag to the v2 version of `image set`. This is another step to compatability between the osc image api. Added merge of tags into existing tags and handling duplicates, and tests for same. Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com> Change-Id: Ie800fcbf8bbc0978c54ace3278750a18023e8ce4
* Clean up Image v2 image set commandDean Troyer2015-10-061-33/+174
| | | | | | | | | | | | | | | | Make the Image v2 image set command meet at the intersection of the v1 image set command and the v2 image create command: * Add visibility to the deadopts list and remove the option * Put the options in the same order as v1 image set * Make the help text match * Add --properties * Move the additional options that do not appear in either v1 image set or v2 image create after --property as they are really pre-defined properties * Add tests for v2 image set to match v1 and then some * Put the SetImage class in v2/image.py in alphabetical order Change-Id: I102b914e8ad09a014f6fdd846c5766b6c2eaadb8
* Merge "Glance `image set` Resolve Fracturing"Jenkins2015-09-231-2/+1
|\
| * Glance `image set` Resolve FracturingNiallBunting2015-09-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently `image set` uses the new api, where other parts of osc the old api is used. This deprecates the v2 api in favour of the v1 to maintain the same commands across osc. However the functionality now remains there as people could now be using this functionality. This also adds the --unprotected argument, as in the previous version if --protected was not supplied it would just make the argument --unprotected without the users explicit consent. The patch also fixes the documentation for image set as it was outdated. Change-Id: I990d20332c80165102badef7ac94ddbeb7824950 Closes-Bug: 1498092
* | Add image create support for image v2Monty Taylor2015-09-211-0/+186
|/ | | | | | | | | | | We have it for v1, but v2 is the future. There are two differences, things in v2 do not go into a properties dict, and the actual image data needs to get uploaded as a second step. Closes-Bug: 1405562 Co-Authored-By: Niall Bunting <niall.bunting@hp.com> Co-Authored-By: Sean Perry <sean.perry@hp.com> Change-Id: If7b81c4a6746c8a1eb0302c96e045fb0f457d67b
* add image member commands for image APIchengkunye2015-07-202-0/+170
| | | | | | | | | This commit adds the following commands: image project add image project remove Closes-Bug: 1402420 Change-Id: I07954e9fa43a3ad6078dd939ecedf9f038299e7b
* Merge "Move update code from image create command"Jenkins2015-07-021-67/+65
|\
| * Move update code from image create commandMarek Aufart2015-07-021-67/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Openstack image create command updates existing image (with same name) by default. That might be confusing since glance allows create multiple images with same names and may lead to unwanted image update by image create command. Image update code was moved from image create action to image set action. BackwardsIncompatibleImpact Change-Id: I1686c6544c366262efab9e33c066d5f8a667f707 Closes-Bug: #1461817
* | Add functional tests for image setTerryHowe2015-06-161-2/+4
|/ | | | | | | | | | | | | | | | This patch includes functional tests for image set and it includes a change to use the OSC utils.format_dict method to format the properties. This will give a more user friendly format to the image commands and it gives a more consistent testable format to the output. Instead of: {u'a': u'b', u'c': u'd'} The user will see: a=b, c=d Change-Id: Ib396316586ffc5dbab231064d5b6dc9425507934
* Add support for v2 image set commandAmey Bhide2015-05-271-0/+50
| | | | | Partial-Bug: #1405562 Change-Id: Ie30802d720a247748c45099c38450cc6c76bbc2a
* Add missing properties to image set commandAmey Bhide2015-05-251-0/+9
| | | | | | | | Enable user to update the following image properties from OSC: container-format, disk-format, size Closes-Bug: #1446362 Change-Id: Id9f40f15702e8f14f0327a37fcc7d7971338c258
* Add image show testsDean Troyer2015-05-013-4/+162
| | | | | | | | | Image v2 uses warlock objects rather than the usua Resource objects so we need to test for those. This adds a subset of the Image v2 schema that should be enough to test for proper warlock image handling. Depends-On: Ic95db2f63d9f5f37e29f0d7e048397da311fbf8c Change-Id: Ib89cce87f110a554f40e726718e31d39b500a6ae
* Handle the pagination for image listTerryHowe2015-04-202-13/+30
| | | | | | | Handle the paginatiion for image list. We were sorting the data here, so nothing lost for the generator. Change-Id: I2d7d4b3d5c9f650953f309c971ac53b64f6f7f77
* Add sort support to image listzhiyuan_cai2015-02-062-0/+56
| | | | | | | | | | Add sort support to image list by sorting items in the client side. The parameter syntax follows this spec[1]. [1] https://review.openstack.org/#/c/145544/ Change-Id: I42b487d18f00f937db1938daa46487cea2a896ab Closes-Bug: #1410251
* Add filter to image listDean Troyer2015-01-272-12/+132
| | | | | | | | | | | | | | | * Hides previously broken --page-size option * Adds --property to image list for filtering on properties * Adds Visibility, Protected, Owner, Properties/Tags to --long output * Adds api.utils.simple_filter() for selecting matches out of a list of objects * Adds tests for all of the above * Updates image docs There are additional filtering options to be added in later reviews. Change-Id: I32feff0ad61aae749b33621c817658d7dc90c3aa Closes-bug: 1401902
* fix the wrong order of assertEqual argswanghong2015-01-272-8/+8
| | | | | | Let's fix them thoroughly. Change-Id: I8a1f042fb614b05c9836a49041f3883638b870b0
* Begin low-level API for Image v1 and v2Dean Troyer2015-01-202-53/+208
| | | | | | | | | image list for v1 and v2: * Add --public|--private to command parsers * Implement local public/private filtering for v1 image_list() * Pass public/private filter to server for v2 image_list() Change-Id: Ie7c24ea2d1bf2b3b1b7fa342eb45fee45894634d
* add multi-delete support for compute/image/net/volumewanghong2014-12-232-2/+2
| | | | | | | | | | | | | | 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
* Add arg to 'server image create' testsDean Troyer2014-11-141-1/+4
| | | | | | | The 'protected' column was not being checked. Also add it to image.fakes.IMAGE. Change-Id: Ie431e9871a7da78b5a3924bfbc51d5575d994d86
* Close files on image createDean Troyer2014-10-141-5/+12
| | | | | | | The file opened for --file was never closed. Close it if it is a file object. Change-Id: I7bd120a2413de42339771d01e8fd1894d38c3011
* Merge "Add more columns to image list output"Jenkins2014-07-262-0/+90
|\
| * Add more columns to image list outputSteve Martinelli2014-07-252-0/+90
| | | | | | | | | | | | | | | | Add disk_format, container_format, size and status to image list command. Added tests as well. Change-Id: I8e3822c6d46d0020fc706955c026549f6c635587 Closes-Bug: #1348475
* | Change V2 image tests to actually run V2 image codeSteve Martinelli2014-07-251-1/+1
|/ | | | | | | | | | 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
* Python 3: do not use __builtin__Cyril Roelandt2014-07-031-1/+1
| | | | | | Use six.moves.builtins instead, this works with both Python 2 and 3. Change-Id: I57e7257d4f06c805f26383e0778ad104d50ea139
* Image create and set command updates and testsDean Troyer2014-06-162-47/+382
| | | | | | | | | | | | | 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
* Add --volume option to image create commandTerry Howe2014-03-051-0/+76
| | | | | | | | | | | 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
* Remove copyright from empty filesAlexander Ignatov2014-01-203-42/+0
| | | | | | | | | 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
* Add server image create commandDean Troyer2013-11-181-1/+4
| | | | | | Translation of 'nova image-create', with tests! Change-Id: I8a833aeff6f291e4774063ed235876eb2ba9c13c
* Complete basic test infrastructureDean Troyer2013-11-187-51/+246
| | | | | | | This finally gets all of the API tests into a common framework regarding test classes and so forth. Change-Id: If675347129c50dcba0bfc5b6c58f5a2ca57ff46c
* Move tests into project package.Monty Taylor2013-06-302-0/+65
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