summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/image
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Support --community in openstack image list"Zuul2018-07-251-0/+29
|\
| * Support --community in openstack image listNobuto Murata2018-07-241-0/+29
| | | | | | | | | | | | | | | | | | "--community" was added to "image create" and "image set" previously, but was missed in "image list". Change-Id: I959fdd7f67ae62c8326659ce52389228152ec019 Story: 2001925 Task: 14453
* | Fix error with image show when image name is NoneJake Yip2018-07-231-1/+2
|/ | | | | | | | Need to bump osc-lib to 1.10.0 Closes-Bug: #1736696 Depends-On: I2aab5cc1f550848bda2b90ef7ef9a60f07b88996 Change-Id: I7420204f28d36529354e5671bd88587d9b15bb06
* Add ability to filter image list by tagAdam Harwell2018-06-281-0/+14
| | | | Change-Id: I2e222d3e69df9d8d7cd472663caaee31bedd848c
* Add support to list image membersMohammed Naser2018-03-211-0/+46
| | | | | | | | The OpenStack client presently has support to add or remove members from an image, but no way to list image members. This patch addreses this issue. Change-Id: Ie85c5de23c6beb21fd6b4c04c83ddf2a116606ef
* Check that Glance returns image data before processing itMike Fedosin2018-01-051-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | Now if Glance v2 cannot find image data it returns an empty response with 204 status code, instead of raising an error. Glance client handles this situation and wraps the response with a RequestIdProxy object, whose 'wrapped' attribute is None. But when openstack client tries to parse this object using glanceclient's save_image util function, it fails with "NoneType object is not iterable" message, for the object doesn't contain any data. This patch adds additional check to prevent such behaviour and raises SystemExit exception if no data was returned from the server. Glance v1 is not affected, because it raises an error if can't find an image data. Change-Id: I016a60462ba586f9fa7585c2cfafffd7be38de7b Closes-Bug: #1741223
* Merge "Accept 0 for --min-disk and --min-ram"Zuul2017-10-212-0/+52
|\
| * Accept 0 for --min-disk and --min-ramShogoAdachi2017-10-202-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The current openstackclient implementation cannot accept 0 for --min-disk and --min-ram with the "openstack image set" command. If theses options get set to 0, the option parser in openstackclient wrongly interprets 0 as no option value. The 0 is valid for these options if administrators want to make it the default(no minimum requirements). This patch fix the parser so that it avoids only 'None'. Change-Id: Ie8ee37484c02c26f54adc56263fcd167c0ce7eb3 Closes-bug: #1719499
* | Fix 'project purge' deletes ALL images problemlihaijing2017-09-262-0/+2
|/ | | | | Closes-Bug: #1717130 Change-Id: I33c6fc7897dfee85d1c197a1267bde4abfa5bbd9
* Use flake8-import-order pluginAkihiro Motoki2017-08-174-4/+5
| | | | | | | | | | | | | | | | In reviews we usually check import grouping but it is boring. By using flake8-import-order plugin, we can avoid this. It enforces loose checking so it sounds good to use it. This flake8 plugin is already used in tempest. Note that flake8-import-order version is pinned to avoid unexpected breakage of pep8 job. Setup for unit tests of hacking rules is tweaked to disable flake8-import-order checks. This extension assumes an actual file exists and causes hacking rule unit tests. Change-Id: I12b596820727aeeb379bee16c2bc993dee9eb637
* image-list should support filters 'name','status'nidhimittalhada2017-07-121-0/+28
| | | | | | | | | nova api support parameters like 'name', 'server', 'status', etc in image-list(). So openstackclient should support this too. DocImpact Closes-Bug: #1698742 Change-Id: Ice66b409f989e6785aa3b2d42f2fdbf6e23fa0aa
* Merge "To display image size in human friendly format"Jenkins2017-06-014-4/+60
|\
| * To display image size in human friendly formatBadhmapriya Boopalan2017-01-114-4/+60
| | | | | | | | | | | | | | | | | | | | Include option '--human-readable' to 'image show' command. This option displays image size in human readable format (such as K, M, G, T,..) Related Commit: I0ef74c2ec978483fe49156c88acf5c369a8fa5c2 Closes-Bug: #1640086 Change-Id: I28cd5702925d51303d0607ed8dccf12c56434682
* | Trivial fix typosVu Cong Tuan2017-05-301-1/+1
| | | | | | | | Change-Id: I72a1da209df38e226ec02d9dbd0142ed4020c0d2
* | doc: Correct Sphinx warningsStephen Finucane2017-03-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix option-describe typos - Correct option and envvar markup, for commands that are using the reference form instead of the definition form or are marking up option arguments as options - Avoid duplicate commands - Fix some invalid docstrings - Fix some invalid indentation - Disable the murano plugin, which has invalid docs - Correct issues with- and track the network-topology spec - Include API modules in docs Change-Id: I3d5ed5e872540fe13f3e4bd5e9335829dc9a5226
* | Fix image member unit tests occasional failuresDean Troyer2017-01-121-20/+87
| | | | | | | | | | | | | | Let's try just unrolling the member status tests and not getting too fancy here. Change-Id: I30022ebd2da6d6cf1abba424d7d7fa679285f291
* | Add support for Glance 'update image members' featureJordan Pittier2017-01-041-0/+33
| | | | | | | | | | | | | | | | | | This patch adds 3 new options to the "image set" command: --accept, --reject and --pending. This updates the membership status for an image. Closes-Bug: 1620481 Change-Id: I13b8c067aad68ece9ff636fbdd83bcb3663c91b2
* | Revert "Remove marker and loop from "image list" command"Steve Martinelli2016-12-051-5/+16
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 0b6fdcbe4c3f3142fdd18bfd827653d894607941. Adapt "image list" to not loop when --marker is specified on command line. Update tests to work with current state of code. Change-Id: I8af58adf8637a9e34371c6280db40935d22bc3c3
* | clean up image choices and help textSteve Martinelli2016-11-232-10/+10
|/ | | | | | | | | | | Use choices for image set and image create commands, this aligns with our use of choices in networking commands. Also update the help text to match that of the networking commands, where we iterate through the options. Related-Bug: 1635518 Change-Id: Ib4c66b06e07f1d4e5bfe1b74053f2215cccad890
* Refactor image v1 unit tests with FakeImage classHuanxuan Ao2016-10-092-95/+185
| | | | | | | | Add FakeImage class, and refactor the unit tests with it in image v1. Change-Id: I9024ca5eca5c604e7588c1d905562bf6838309f1 Implements: bp improve-image-unittest-framework
* Replace 'MagicMock' with 'Mock'qtang2016-09-142-2/+2
| | | | | Change-Id: I7aeceede6bd3cb88cf04f398454f9758dbee20f1 Closes-Bug: #1475722
* move unit tests to new "unit" test moduleSteve Martinelli2016-09-087-0/+2402
this will better isolate the unit tests from the functional tests. unfortunately, the "integration" tests had to be lumped into the "unit" tests since we need the separation in testr.conf Change-Id: Ifd12198c1f90e4e3c951c73bfa1884ab300d8ded