summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/compute
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add options to "server list" command"Jenkins2017-01-261-0/+46
|\
| * Add options to "server list" commandjiahui.qiang2017-01-251-0/+46
| | | | | | | | | | | | | | Add "--deleted" and "--changes-since" options to "server list" command. Change-Id: Id94f6e5831a60b172b6cfcfca29b1d89de8db621 Closes-Bug:#1647242
* | Switch server create to block_device_mapping_v2Nikita Gerasimov2017-01-261-9/+14
|/ | | | | | | | | | | | | | | | | | | | | | | | | Current compute_client.servers.create() relies on block_device_mapping arg which is legacy[1]. "block_device_mapping" format require device_name which is leads to hard-coded hack in --volume key handler to KVM specific. "block_device_mapping_v2" format is more friendly to hypervisiors. Support of block_device_mapping_v2 appear in python-novaclient 2.16.0, openstackclient require at least 2.29.0 Makes options --volume and --block-device-mapping work simultaneously. Appends --block-device-mapping data even if --volume used. After bug 1383338 only --volume was taken when both are used. [1]http://docs.openstack.org/developer/nova/block_device_mapping.html NOTE(dtroyer): I moved the new test_boot_from_volume() functional test to Ie51b1c375c5940856ec76a5770df3c6bd18a3eba to test our previous behaviour. The only changes required to support the new behaviour should be that the empty_volume is now attached in that test. Change-Id: I7bac3d870dd9ca404093142f8bce22a62e49180d Closes-Bug: 1647406 Closes-Bug: 1497845
* Use image client for images instead of computeArtom Lifshitz2017-01-241-13/+10
| | | | | | | | | | | | | With the deprecation of the Nova proxy APIs in microversion 2.36 [1], any operation that uses a microversion higher than 2.36 and works with images will fail because the /images endpoint will return 404. This patch updates openstackclient to query images using the image client in places where previously the compute client was used. [1] http://docs.openstack.org/developer/nova/api_microversion_history.html#id33 Change-Id: Ia66e44e530799ce6531922dcf6a84e38528c8725 Closes-bug: 1630161
* Fix creating a private flavor with ID autoJens Rosenboom2017-01-051-3/+2
| | | | | | | | | When a private flavor is created with ID auto (=default) and a project is specified for it, instead of trying to add the project to the flavor called "auto" the ID of the newly created project should be used. Change-Id: I19f7a0ec26bd5d147f00ecba3312240e3601567e Closes-Bug: 1654221
* Add unit tests for usage commands in compute v2jiahui.qiang2016-12-262-0/+244
| | | | | | | | Add unit tests and fakes for command below in compute v2: usage list usage show Change-Id: Ie533e23375ca6b8ba4cb7e865d39fac652cc0195
* Add unit tests for server create in computev2jiahui.qiang2016-11-281-0/+151
| | | | | | | Unit tests for server create is not completed. Some of the code in take_action has not been tested. Change-Id: Ifd3f42400408d3437e0bc6cd42acbb6db861b1f3
* Add --long option and more columns to the hypervisor list commandYan Xing'an2016-10-271-1/+66
| | | | | | | | | | Support --long option and more columns in output of hypervisor list command, including 'Hypervisor Type', 'Host IP', 'State', and 'vCPU Used', 'vCPUs', 'Memory MB Used', 'Memory MB' with --long option. Change-Id: I0c790c7835309dded03e230cf497168e19404537 Closes-Bug: #1637074
* Adds information about private key generation for instance accessAnne Gentle2016-10-251-2/+1
| | | | | | | - Also updated the help text in the command itself. Change-Id: Ib3d4f94ef415a3f12024d0d7c000d2de20de001b Partial-Bug: 1549410
* Support "--no" option in aggregate setRui Chen2016-09-242-10/+89
| | | | | | | | | | | Supporting "--no-property" option will apply user a convenience way to clean all properties of aggregate in a short command, and this kind of behavior is the recommended way to devref. The patch add "--no-property" option in "aggregate set" command, and update related test cases and devref document. Change-Id: I7614a23c0db05144562330dc600dbab7d003d5d8 Implements: blueprint support-no-property-in-aggregate
* Replace 'MagicMock' with 'Mock'qtang2016-09-146-14/+14
| | | | | Change-Id: I7aeceede6bd3cb88cf04f398454f9758dbee20f1 Closes-Bug: #1475722
* Display hypervisor information without uptimeHironori Shiina2016-09-111-0/+70
| | | | | | | | | | | | | | Some virt drivers such as ironic virt driver doesn't implement a method to get host uptime. For such drivers, hypervisor show command displays no information although these drivers provides other host information. This patch fixes the command to display hypervisor information in case where a virt driver doesn't provide host uptime by ignoring a HTTPNotImplemented exception. Change-Id: I7bcca5862cd9c05aadaf6192cb80aa651cd77cad Closes-Bug: 1612065
* Fix regular expression for uptime in hypervisor showHironori Shiina2016-09-111-0/+8
| | | | | | | | | | | | Hypervisor show command has a few bugs as follows. - It doesn't trim an extra whitespace in the head of uptime information. - It doesn't display uptime information when the number of user is 1. This patch fixes the regular expression to match uptime information. Change-Id: Ic2f7fd9a9274466717084a0886f95f78e98a9007 Closes-Bug: 1611809
* move unit tests to new "unit" test moduleSteve Martinelli2016-09-0816-0/+6865
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