summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/compute
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Update 'host list' and 'host show' command to use sdk"Zuul2023-02-221-42/+63
|\
| * Update 'host list' and 'host show' command to use sdkHarsh Mutha2022-12-201-42/+63
| | | | | | | | Change-Id: I3813ff604ba46112ebd358509ea4f28ee38ca3ee
* | Merge "Finish switching server migration to sdk"Zuul2023-02-212-137/+140
|\ \
| * | Finish switching server migration to sdkViolet Kurtz2022-12-142-137/+140
| | | | | | | | | | | | Change-Id: Ic0e6dfdc986989599bfc73b8c274631232161c25
* | | Merge "tests: Use fake SDK Migration object"Zuul2023-02-212-60/+42
|\ \ \ | |/ /
| * | tests: Use fake SDK Migration objectStephen Finucane2023-01-042-60/+42
| |/ | | | | | | | | | | | | | | We missed this when migrating the 'server migration list' command across. Change-Id: Ide05a0289020764829f1dbc416be5336fdf37d84 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "Switch server volume update to sdk"Zuul2023-02-211-49/+66
|\ \
| * | Switch server volume update to sdkRitvik Vinodkumar2022-12-151-49/+66
| | | | | | | | | | | | | | | | | | Switch the server volume update command from novaclient to SDK. Change-Id: Ib9876775bcf8268344da1a58ab0dd1695cb83ece
* | | Merge "Switch list server volume to sdk"Zuul2023-02-213-152/+81
|\ \ \ | |/ / | | / | |/ |/|
| * Switch list server volume to sdkRitvik Vinodkumar2022-12-153-152/+81
| | | | | | | | | | | | | | Switch the server volume list command from novaclient to SDK. Modified functional test for server add/remove volume. Change-Id: I5b4ab7d0275aec2e02451c5371319ac350af6a5f
* | Merge "Switch server dump create to using sdk"Zuul2022-12-152-9/+29
|\ \
| * | Switch server dump create to using sdkDiwei Zhu2022-12-152-9/+29
| |/ | | | | | | | | Change-Id: I8e2a4651bff1f739fa98533cd47074b143b2e3d6 Co-authored-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "Use the SDK in server migration list"Zuul2022-12-151-62/+58
|\ \
| * | Use the SDK in server migration listDaniel Wilson2022-11-301-62/+58
| | | | | | | | | | | | | | | | | | | | | Update server migration list to use the OpenStack SDK instead of directly using the nova interface. Change-Id: I40dc95ee47e7c33ebf596f8ad437228b4bb0ab33
* | | Merge "Use the SDK for server show"Zuul2022-12-151-12/+5
|\ \ \
| * | | Use the SDK for server showDaniel Wilson2022-12-111-12/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the SDK for the server show command. This change modifies a helper function that is used by server show as well as other commands that print information about an individual server. The helper still uses novaclient APIs when additional OpenStack requests are needed since some of its callers are still using the nova client. Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/864340 Change-Id: Ic253184ee5f911ec2052419d328260dc4664b273
* | | | Merge "Fix parameter handling in server add fixed ip cmd"Zuul2022-12-151-8/+5
|\ \ \ \
| * | | | Fix parameter handling in server add fixed ip cmdDr. Jens Harbott2022-12-121-8/+5
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fixed_ip_address parameter needs to be passed in a hash with key "ip_address" in order to be processed by the server, the previous arg was simply being ignored. Added a functional test for better coverage. Closes-Bug: 1998927 Change-Id: I6956d2642d8e80fc10c3739f0a571aa7ba276b1a
* | | | Merge "Migrate hypervisor stats commands to SDK"Zuul2022-12-152-68/+44
|\ \ \ \
| * | | | Migrate hypervisor stats commands to SDKAriel-Berkowicz2022-12-122-68/+44
| |/ / / | | | | | | | | | | | | Change-Id: I43b2071f5108c28f6881c8e99d4b06e87c83ddfa
* | | | Fix server list error with --long and -c optionsThobias Salazar Trevisan2022-12-141-0/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using options --long and -c and specifying same columns added by --long option, it passes duplicated column names to prettytable and report the following error: Field names must be unique! This patch removes duplicated columns. Change-Id: I9c0bd09c50dac568ca1980a6b53a6c544b85c2aa
* | | Merge "compute: Allow users to manually specify bootable volumes"Zuul2022-12-051-6/+38
|\ \ \
| * | | compute: Allow users to manually specify bootable volumesStephen Finucane2022-12-011-6/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a server with an attached volume, you can specify a block device with a 'boot_index' of '0' and this will become the bootable device. OSC allows users to do this by using either the '--volume' option or a combination of the '--image' and '--boot-from-volume' options, but we should also allow them to do it the "hard way" via the '--block-device' option. For example: openstack server create \ --block-device uuid=0a89ecd8-1fe2-45f0-94da-7789067911c9,boot_index=0 \ --block-device uuid=589266ef-fd88-46e9-b7b2-94503ce8f88f,boot_index=1 \ ... \ my-server Make this possible. Change-Id: Ia48449fecbc590346630807b1c7da40102d53b33 Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Story: 2010376 Task: 46617
* | | | Merge "tests: Add test for multiple blocks devices"Zuul2022-12-051-19/+35
|\ \ \ \ | |/ / / | | / / | |/ / |/| |
| * | tests: Add test for multiple blocks devicesStephen Finucane2022-12-011-19/+35
| |/ | | | | | | | | | | | | | | The 'server create' command should support multiple '--block-device' parameters. Prove it. Change-Id: I1bd83287efdbbe11774053b694bae99b6a4ebdf5 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Use the compute SDK in server listDaniel Wilson2022-11-291-136/+125
|/ | | | | | | | Update server list to use the compute component of the OpenStack SDK instead of directly using the nova interface. This change depends on SDK version 0.102.0 for automatic client-side query filters. Change-Id: Ib9985812bfd98320b75f3a82bb594a0daa6e4d93
* Merge "Moved hypervisor to the SDK"Zuul2022-11-162-163/+201
|\
| * Moved hypervisor to the SDKViolet Kurtz2022-11-092-163/+201
| | | | | | | | Change-Id: Ie955fb4d27c30e044626732a1f3e0f141cb85aa5
* | Merge "Use the compute SDK in usage commands"Zuul2022-11-161-27/+18
|\ \
| * | Use the compute SDK in usage commandsDaniel Wilson2022-10-251-27/+18
| | | | | | | | | | | | | | | | | | | | | Update usage list and usage show to use the compute component of the OpenStack SDK instead of directly using the nova interface. Change-Id: I1c4d2247c9c1a577ed9efad7e8332e7c9b974ad5
* | | compute: Add missing microversion check for networksStephen Finucane2022-11-081-17/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'auto' and 'none' network allocation policies are only supported on compute API microversion 2.37 or later. Enforce this in the code. Change-Id: I90f8fb1e61ead4bd406ea76bbeb731b913805b13 Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Story: 2010385 Task: 46657
* | | compute: Fix '--network none/auto' handlingStephen Finucane2022-11-081-12/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should lookup a network called 'none' or 'auto', not do the equivalent on '--nic none' or '--nic auto'. Correct this. Change-Id: I3c5acc49bfe8162d8fb6110603da56d56090b78f Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Story: 2010385 Task: 46658
* | | Merge "compute: Add '--no-network', '--auto-network' flags"Zuul2022-11-081-14/+44
|\ \ \
| * | | compute: Add '--no-network', '--auto-network' flagsStephen Finucane2022-10-261-14/+44
| |/ / | | | | | | | | | | | | | | | | | | These are aliases for '--nic none' and '--nic auto', respectively. Change-Id: I7b4f7e5c3769a813bd8b2b9cd6090c6fe501e13d Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | Merge "tests: Remove unnecessary nesting of volume resources"Zuul2022-11-051-3/+3
|\ \ \ | |/ / |/| |
| * | tests: Remove unnecessary nesting of volume resourcesStephen Finucane2022-09-301-3/+3
| | | | | | | | | | | | | | | Change-Id: I210ce7534d161e89115e5cb96e42ab7f27170aa1 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | Merge "Speed up standard flavor list command"Zuul2022-09-301-0/+57
|\ \ \
| * | | Speed up standard flavor list commandPavlo Shchelokovskyy2022-09-301-0/+57
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | currently this command tries to fetch extra_specs for any flavor that does not have them (which is quite usual), regardless if the command was even asked to display them (--long) at all. This significantly slows down this command as it makes a lot of unnecessary REST calls, one per each flavor to fetch extra_specs for. With this patch, client only attempts to fetch flavor extra_specs if the user actually called the client with --long. Change-Id: Ia36414d891a41b641d7a9a04f0a1e7d43cfee351 Story: 2010343 Task: 46484
* | | Merge "compute: Only retrieve necessary images"Zuul2022-09-301-5/+19
|\ \ \
| * | | compute: Only retrieve necessary imagesStephen Finucane2022-04-121-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Glance API allows us to filter by multiple IDs using the 'in:' operator. Take advantage of this to speed up listing of server in larger deployments where image counts in the hundreds (or even thousands) are not uncommon. Unfortunately the Nova API does not support something similar for listing flavors. Boo. Change-Id: I7d3222d0b0b8bf72b4ff3e429bc49e621b569979 Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/837613
* | | | Merge "Fix wrong assertion methods"Zuul2022-09-301-1/+1
|\ \ \ \
| * | | | Fix wrong assertion methodsTakashi Natsume2022-09-231-1/+1
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | Change-Id: Iebf4840662e87e59a06b56f1b5248728cba03c24 Story: 2010288 Task: 46261 Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* | | | Replace assertItemsEqual with assertCountEqualTakashi Natsume2022-09-191-6/+6
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assertItemsEqual were replaced with assertCountEqual in I0bbffbec8889b8b3067cfe17d258f5cb16624f38. However the following changes add assertItemsEqual after that. * I1095100efb27b8559412469f0a9d07fc0a3db9d5 * Ic230c2c5cda8255d8f2c422880aeac81670b2df3 * Ica3320242a38901c1180b2b29109c9474366fde0 So Replace assertItemsEqual with assertCountEqual again. Change-Id: I11ff1748225e434f64dbaf7b88dc80ba28a5e2a0 Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* | | compute: Add support for microversion 2.93whoami-rajat2022-09-141-0/+97
| | | | | | | | | | | | | | | | | | | | | Add '--reimage-boot-volume' and '--no-reimage-boot-volume parameters' to the rebuild command to allow rebuilding of volume backed instances. Change-Id: I4a6e30b2cf12f32202a2d9ef1ced347e1dd139f3
* | | compute: Require image when rebuilding a volume-backed serverwhoami-rajat2022-09-141-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A volume-backed server will have no image attribute (or rather the image property will be set to the empty string). As such, if you want to try rebuild you will need to specify an image [*]. Enforce this. [*] Before microversion 2.93, this must be the same image. However, we don't touch on that here. This will be addressed later. Change-Id: I6842dabd7acb4e3a78f894e55e616625757eb6a4 Story: 2010297 Task: 46290
* | | Microversion 2.91: Support specifying destination host to unshelveRené Ribaud2022-08-221-2/+177
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | This patch adds a new parameter ``--host`` to ``openstack server unshelve`` command. This can help administrators to specify an ``host`` to unshelve a shelve offloaded server. And add new parameter ``--no-availability-zone`` to unpin a server availability These parameters are available in the 2.91 microversion. Depends-On: https://review.opendev.org/c/openstack/python-novaclient/+/831651 Implements: blueprint unshelve-to-host Change-Id: I7986adc7563f63bcd4b3caf5eb7bc4329b4e1eca
* | Migrate server_groups to the new APIViolet Kurtz2022-08-022-221/+159
| | | | | | | | | | | | Moved the server_groups to the new API. Change-Id: Ied7bd6f56e277f0c5efcd5ba028765f9be65050f
* | Merge "Add more filter option of columns for server list -c COLUMN"Zuul2022-06-201-0/+14
|\ \
| * | Add more filter option of columns for server list -c COLUMNJIHOJU2022-04-191-0/+14
| |/ | | | | | | | | | | | | | | | | | | | | | | In order to improve the convenient of use, columns corresponding to the "--long" option has been added so that it can be used in the filter. Currently filterable columns include the following: 'ID', 'Name', 'Status', 'Networks', 'Image', 'Flavor'. Story: 2009150 Task: 43113 Change-Id: I6760ca5da0e3707d1d746ae5eeec7d9162020d15
* | Add 'Host Status' to 'server list --long' with >= v2.16melanie witt2022-05-161-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the 'Host Status' field is shown only for 'server show' but not for 'server list'. The host_status can be helpful for users who are having issues with servers that show a status of ACTIVE, as it can show a hint about the compute host status when nova policy is configured to allow it. Story: 2009689 Task: 44003 Change-Id: I6209cf52044218b7b32ab2fa5712574f12ba2f5f