summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/compute/v2
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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
* | Merge "Fix typos"Zuul2022-05-161-2/+2
|\ \
| * | Fix typosCyril Roelandt2021-10-261-2/+2
| | | | | | | | | | | | Change-Id: Idd502c8df21da79ff3b9339870f38378f5337879
* | | Refactor network fakes to sdk properties PART 4Nurmatov Mamatisa2022-04-291-4/+4
| |/ |/| | | | | | | | | | | | | | | | | Included resources: port network_agent network_flavor_profile network_rbac Change-Id: I2e71a3c0fefb56ddcc75865c95746550e2710aa3
* | compute: Add 'Security Groups' for 'server list'Thobias Salazar Trevisan2022-03-151-0/+2
| | | | | | | | | | | | | | Add a column with security groups name for --long option on server list. Change-Id: I7062f224e18c3c8ac96a06d7ce97f9fab473bdb9
* | compute: Move server migrations commands to their own fileStephen Finucane2022-03-092-985/+1028
| | | | | | | | | | | | | | | | The 'openstackclient.compute.v2.server' module is getting rather large. The server migration commands don't need to be in there. Move them. Change-Id: I8b2600cfd9f8e37d3093c52c7222d85e84e7fc89 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | compute: Allow retrieval of migration by UUIDStephen Finucane2022-03-091-0/+208
| | | | | | | | | | | | | | | | | | The nova API doesn't allow you to retrieve migration records by UUID, only ID. This is confusing. Work around it by listing records and filtering this list. Change-Id: I932c9c70420e85056509513e005bb78168e70611 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "image: Remove FakeImage test helper"Zuul2022-02-094-28/+19
|\ \
| * | image: Remove FakeImage test helperStephen Finucane2021-11-174-28/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | We're no longer creating fake versions of glanceclient's 'Resource' object but rather openstacksdk objects. As such, there's no point nesting things under a fake resource class. Change-Id: I39cd5302622f4542db9eebcccfad0cb90d077441 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | Merge "compute: Don't warn if disk overcommit params unset"Zuul2022-02-091-10/+10
|\ \ \
| * | | compute: Don't warn if disk overcommit params unsetStephen Finucane2021-11-031-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to a small logic error, we were emitting a warning about a deprecated option when the user tried to live migrate an instance using microversion 2.25 even though the user hadn't actually set that option. Correct this. Change-Id: Ib61e817bd4ced9b5533e7c7f9d8f0b45fe81c211 Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Story: 2009657 Task: 43836
* | | | Switch compute service list, delete and set to sdk.Ritvik Vinodkumar2022-01-142-96/+164
| | | | | | | | | | | | | | | | | | | | | | | | Switch the compute service commands from novaclient to SDK. Change-Id: I16498905101d6c2702a3ccbaf8cf5e3098d51992
* | | | Merge "Include hosts in aggregate list --long"Zuul2021-12-251-0/+2
|\ \ \ \
| * | | | Include hosts in aggregate list --longDavid Caro2021-06-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it easier to get the total list of aggregates and the hosts belonging to each of them (specially for scripting purposes). Change-Id: I94833c15075ae655bc11e7c0fc47c0abad5846fc Signed-off-by: David Caro <me@dcaro.es>
* | | | | Merge "compute: Return information about fixed IP"Zuul2021-12-252-28/+117
|\ \ \ \ \
| * | | | | compute: Return information about fixed IPStephen Finucane2021-12-142-28/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compute API provides this information to us. We might as well use it. Change-Id: I5608fa80745975ce49712718452cfe296c0f64d2 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | | | Merge "Switch add fixed IP to SDK"Zuul2021-12-251-45/+179
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Switch add fixed IP to SDKRitvik Vinodkumar2021-12-141-45/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the add fixed IP command from novaclient to SDK. Change-Id: I4752ea7b4bfc17e04b8f46dbe9a68d938501a89e
* | | | | | compute: Pass through args to sshHugh Saunders2021-12-151-5/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why limit a user to preset ssh arguments? Capture them all and send them along to ssh to deal with. This allows users to use the full range of ssh arguments, including specifying a command to run on the instance. For example: openstack server ssh -4 upg -- -l cirros -i ~/id_rsa_upg "date; uptime" SSH arguments that openstackclient currently mirrors are deprecated except for -4 and -6, as they are useful for retrieving the correct instance IP. Change-Id: Ia50786d5eee52688e180550fe16aeb8af610154b Co-authored-by: Stephen Finucane <stephen@that.guru>
* | | | | | compute: Fix weird option definition for 'server ssh'Stephen Finucane2021-12-151-0/+77
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argparse allows you to specify multiple options for a given argument when declaring the argument. For some reason, we weren't doing this for the 'server ssh' command. There's no apparent reason for doing things this way and it's been that way since the beginning (2013) so let's not do that. We also add unit tests since they were missing and should exist. Change-Id: I67a9e6516d7057266210cd4083e9ddeb1cfaa5de Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | | Fix RemoveServerVolumeDr. Jens Harbott2021-12-081-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nova API we're using to delete a server volume attachment needs to be handed a volume, not a volume attachment. Also make sure that we create an error if the volume isn't actually attached to the server. Signed-off-by: Dr. Jens Harbott <harbott@osism.tech> Co-authored-by: Stephen Finucane <sfinucan@redhat.com> Change-Id: I12abd3787ea47acb4da282d00fdc1989405a0564
* | | | | Merge "compute: Show flavor in 'server list' with API >= 2.47"Zuul2021-11-301-240/+318
|\ \ \ \ \
| * | | | | compute: Show flavor in 'server list' with API >= 2.47Khomesh Thakre2021-11-301-240/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the issue where the flavor name was empty in server list output. This requires somewhat invasive unit test changes to reflect the changed API response from the server, but this has the upside of meaning we don't need new tests since what we have validates things. Also drop the flavor ID column as it is removed from the compute API. Change-Id: Ica3320242a38901c1180b2b29109c9474366fde0 Signed-off-by: Khomesh Thakre <khomeshthakre24@gmail.com> Story: 2008257 Task: 41113
* | | | | | Merge "Switch openstack server remove port/network to using sdk"Zuul2021-11-301-8/+11
|\ \ \ \ \ \
| * | | | | | Switch openstack server remove port/network to using sdkDiwei Zhu2021-11-291-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1540c1f52e9a107dba20eeea9dc323c5510fe2b1
* | | | | | | Merge "Switch server suspend and server resume to SDK"Zuul2021-11-301-4/+4
|\ \ \ \ \ \ \