summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary 'self.methods'Stephen Finucane2022-12-191-24/+4
| | | | | | | This was used by 'run_method_with_servers', not the SDK-equivalent. Change-Id: Ia3333a95e406f430beb4f2cfb887e81ab7b72cfe Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Switch server start, server stop to SDKThrivikram Mudunuri2022-12-191-31/+19
| | | | | | Switch the server start and server stop commands from novaclient to SDK. Change-Id: I5ebfa6b2468d5f20b99ea0eab1aea9377be09b8c
* Switch server lock, unlock to sdksuneethravi2022-12-191-70/+68
| | | | | | | Switch server lock commands from novaclient to SDK. Change-Id: I042db99c9d7a0d8d207f8cdf69d786bd4fe904e7 Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/867890
* 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 "Add image metadef namespace command"Zuul2022-12-152-3/+156
|\ \ \
| * | | Add image metadef namespace commandhoosa2022-12-072-3/+156
| | | | | | | | | | | | | | | | | | | | | | | | add image metadef namespace create, delete, set, show command Change-Id: I35b1cb8ff2b1735ae3a1b405d8f2071fe449ea6e
* | | | 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 "image: Add 'image import' command"Zuul2022-12-052-5/+223
|\ \ \ \
| * | | | image: Add 'image import' commandStephen Finucane2022-11-092-5/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that we require some additional functionality in SDK for this to work properly, but it's a start. Change-Id: I87f94db6cced67f36f71685e791416f9eed16bd0 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | | 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>
* | | | Merge "Use the compute SDK in server list"Zuul2022-12-021-136/+125
|\ \ \ \ | |/ / / |/| | |
| * | | 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
* | | | Add test for creating volume from sourcewhoami-rajat2022-11-231-0/+37
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a test to create a new volume from source. We also include code changes to pass the right size i.e. either size passed by the user via --size argument or the source volume size. This case is already handled at the API layer[1] but it helps being consistent with passing the right size value as in case of creating a volume from snapshot or backup. [1] https://github.com/openstack/cinder/blob/7c1a5ce7b11964da4537fd6a7d157ede646b9e94/cinder/api/v3/volumes.py#L381-L382 Change-Id: Idc71636dad6bb678fe24f19b0836d2e9bd92d7d2
* | | Add option to create volume from backupwhoami-rajat2022-11-211-0/+73
|/ / | | | | | | | | | | | | | | Support for creating a volume from backup was added in microversio 3.47. This patch adds a --backup option to the volume create command to add that support. Change-Id: Ib26d2d335475d9aacbf77c0fd7b7cda2ba743943
* | Merge "image: Add 'image stage' command"Zuul2022-11-162-25/+80
|\ \ | |/
| * image: Add 'image stage' commandStephen Finucane2022-11-092-25/+80
| | | | | | | | | | | | | | This is the equivalent of the 'image-stage' glanceclient command. Change-Id: I10b01ef145740a2f7ffe5a8c7ce0296df0ece0bd Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "image: Simplify handling of data provided via stdin"Zuul2022-11-161-64/+30
|\ \ | |/
| * image: Simplify handling of data provided via stdinStephen Finucane2022-11-091-64/+30
| | | | | | | | | | | | | | This was unnecessarily complex. Change-Id: I8289d5ce7356d8bc89425590a7f71bca91a6d396 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "image: Ignore '--progress' if providing image data from stdin"Zuul2022-11-161-0/+31
|\ \ | |/
| * image: Ignore '--progress' if providing image data from stdinStephen Finucane2022-11-091-0/+31
| | | | | | | | | | | | | | | | You can provide data via stdin when creating an image. Using this with '--progress' makes no sense and causes an error currently. Fix this. Change-Id: I3c2d658b72a7c62931b779b0d19bb97f60a0c655 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | 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 "quota: Deprecate "force" behavior for network quotas"Zuul2022-11-051-3/+4
|\ \ \
| * | | quota: Deprecate "force" behavior for network quotasStephen Finucane2022-10-111-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In change Idc1b99492d609eb699d0a6bef6cd760458a774f6, we added a '--check-limit' option to enable "no force" behavior for network quotas. This was already the default for compute quotas. Provide a path for harmonizing the behavior of the two options by instead using a '--no-force' option which will become the eventual default for the network quotas also. Change-Id: I25828a3d68e2e900f498e17a0d01fb70be77548e Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | Merge "quota: Fix issues with delete quota command"Zuul2022-11-051-13/+14
|\ \ \ \
| * | | | quota: Fix issues with delete quota commandStephen Finucane2022-10-111-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were passing a project object rather than just the ID. Also correct a typo in the call to delete network quotas. Change-Id: I2292db7932ec01026f0e54014e3d02218792617a Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | | Merge "tests: Remove unnecessary nesting of volume resources"Zuul2022-11-0534-2567/+2378
|\ \ \ \ \ | |/ / / /
| * | | | tests: Remove unnecessary nesting of volume resourcesStephen Finucane2022-09-3034-2567/+2378
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I210ce7534d161e89115e5cb96e42ab7f27170aa1 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | | Merge "tests: Remove duplicate FakeImagev1Client"Zuul2022-11-051-7/+4
|\ \ \ \ \ | |/ / / /
| * | | | tests: Remove duplicate FakeImagev1ClientStephen Finucane2022-09-301-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I guess this was defined to avoid a circular import. There are easier ways to do this. Change-Id: Iab215a53691298413ea9d10def792008ab9edbce Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | | Merge "tests: Move fake clients to top of file"Zuul2022-11-053-123/+123
|\ \ \ \ \ | |/ / / /
| * | | | tests: Move fake clients to top of fileStephen Finucane2022-09-303-123/+123
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are important and they're easier to identify at the top of the file than nested deep inside. Change-Id: I1569c855fadfe4cdacf83ee07d08922bf3edefbc Signed-off-by: Stephen Finucane <sfinucan@redhat.com>