summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2
Commit message (Collapse)AuthorAgeFilesLines
...
| * compute: Add missing options for 'hypervisor list'Stephen Finucane2021-01-121-7/+56
| | | | | | | | | | | | | | Yet more pagination parameters. Change-Id: I9f0145c89ddc49c1d907e6e6e294319cf80fc6ff Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "compute: Add 'server volume update' command"Zuul2021-01-152-8/+75
|\ \ | |/
| * compute: Add 'server volume update' commandStephen Finucane2021-01-122-8/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're not going to expose the ability to swap volumes since that's a things humans should not generally use. From the API docs [1]: When updating volumeId, this API is typically meant to only be used as part of a larger orchestrated volume migration operation initiated in the block storage service via the os-retype or os-migrate_volume volume actions. Direct usage of this API to update volumeId is not recommended and may result in needing to hard reboot the server to update details within the guest such as block storage serial IDs. Furthermore, updating volumeId via this API is only implemented by certain compute drivers. We *do* want users to have the ability to change the delete on termination behavior though, so that's what we expose. [1] https://docs.openstack.org/api-ref/compute/?expanded=update-a-volume-attachment-detail#update-a-volume-attachment Change-Id: I50938e1237b4d298521b26a5f9cb90c018dfebaf Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "Add 'server unshelve --wait' option"Zuul2021-01-111-16/+45
|\ \
| * | Add 'server unshelve --wait' optionStephen Finucane2021-01-081-16/+45
| | | | | | | | | | | | | | | | | | | | | | | | This was recently added to the 'server shelve' command. Add it now for the 'unshelve' command. Change-Id: I633dd85b60cf70b4f8610f414d82669dd6a53111 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | Merge "Add 'server shelve --offload', 'server shelve --wait' options"Zuul2021-01-111-5/+95
|\ \ \ | |/ / | | / | |/ |/|
| * Add 'server shelve --offload', 'server shelve --wait' optionsStephen Finucane2021-01-081-5/+95
| | | | | | | | | | | | | | | | | | | | | | | | The '--offload' option allows us to explicitly request that the server be offloaded once shelved or if already shelved. The '--wait' option allows us to wait for the shelve and/or offload operations to complete before returning. It is implied when attempting to offload a server than is not yet shelved. Change-Id: Id226831e3c09bc95c34b222151b27391a844b073 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | compute: Add 'server volume list' commandStephen Finucane2021-01-081-0/+73
|/ | | | | | | This replaces the old 'nova volume-attachments' command. Change-Id: Icb98766f98bd1f2469bdb6df62b4624711f98422 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* compute: Add missing options for 'server image create'Stephen Finucane2021-01-081-2/+15
| | | | | | | | Add a '--property' option to record arbitrary key/value metadata to 'meta_data.json' on the metadata server. Change-Id: I267f3290fce3692cbd1ff6a9af146c2736ee31fe Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* compute: Add missing options for 'keypair list'Stephen Finucane2021-01-081-3/+44
| | | | | | | | | Add pagination parameters, '--limit' and '--marker'. This isn't compatible with our client-side '--project' parameter so we error out for that. Change-Id: I403cf0fb7aabad4a3dfda5adae62d47ecf7faf5c Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* compute: Add missing options for 'server set'Stephen Finucane2021-01-081-17/+45
| | | | | | | | | | | | | | Add a new '--no-password' option to unset the password on an existing server. In addition, add a new '--password' option that replaces the interactive '--root-password' option. This makes sense given no other commands uses interactive password options. Checks that rely on specific API microversions now run before we execute any action, to avoid situations where an update is only partially applied. Change-Id: Ibf8717efdd418a2d95215b4d9ab2acf0d57c4a70 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Merge "compute: Add missing options for 'server list'"Zuul2021-01-081-10/+207
|\
| * compute: Add missing options for 'server list'Stephen Finucane2021-01-071-10/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | This accepts a large number of options that we weren't exposing. Add the following options: '--availability-zone', '--key-name', '--config-drive' and '--no-config-drive', '--progress', '--vm-state', '--task-state' and '--power-state'. In addition, refine the 'openstack server list --status' parameter to restrict users to the actual choices supported by the server. Change-Id: Ieeb1f22df7092e66a411b6a36eafb3e16efc2fc2 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | trivial: Use plural for appended parametersStephen Finucane2021-01-063-50/+52
| | | | | | | | | | | | | | | | | | Multiple compute commands take a '--property' parameter or variant thereof. These should be stored in a 'properties' (plural) dest for sanity's sake. Correct this. Change-Id: If393836925fa736404527d9abd212b8ac9931027 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | compute: Add 'server show --topology' optionYongli He2021-01-061-9/+37
| | | | | | | | | | | | | | | | Add support for compute microversion 2.78 by adding a '--topology' option to 'openstack server show' command that retrieves server NUMA information. Change-Id: Ie22979df2ea9082ca64a4d43b571bd4025684825
* | compute: Add 'server group create --rule' optionStephen Finucane2021-01-061-21/+49
| | | | | | | | | | | | | | This closes the remaining gap with the 2.64 compute API microversion. Change-Id: Ia42b23d813b7af6ddb1a41f4e9bdc8a6160b908c Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | compute: Fix 'hypervisor show -f yaml' outputStephen Finucane2021-01-061-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | The 'cpu_info' field returned by the 'os-hypervisors' API is an object and should be formatted as such. However, this is complicated by the fact that the object in this field is stringified until microversion 2.28 and is only returned as an actual object on later microversions. Handle the conversion from the string for older microversions and display things correctly for all releases. Change-Id: Ide31466cbb9e89c96d6bd542fe039ab5ed1fac1f Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | compute: Fix 'server group * -f yaml' outputStephen Finucane2021-01-061-11/+16
| | | | | | | | | | | | | | | | | | Make use of 'FormattableColumn'-derived formatters, which provide better output than what we were using before, particularly for the YAML output format. Change-Id: Id6d25a0a348596d5a0430ff7afbf87b049a76bc8 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | compute: Fix 'usage * -f yaml' outputStephen Finucane2021-01-061-24/+79
|/ | | | | | | | | Make use of 'FormattableColumn'-derived formatters, which provide better output than what we were using before, particularly for the YAML output format. Change-Id: Ic770f27cb1f74222636f05350f97400808adffbf Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* compute: Fix 'server * -f yaml' outputStephen Finucane2021-01-061-40/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make use of 'FormattableColumn'-derived formatters, which provide better output than what we were using before, particularly for the YAML output format. For example, compare before for the 'server show' command: $ openstack --os-compute-api-version 2.79 server show test-server -f yaml ... addresses: private=fdff:77e3:9bb4:0:f816:3eff:fe6d:a944, 10.0.0.44 flavor: disk='1', ephemeral='0', extra_specs.hw_rng:allowed='True', original_name='m1.tiny', ram='512', swap='0', vcpus='1' ... To after: $ openstack --os-compute-api-version 2.79 server show test-server -f yaml ... addresses: private: - fdff:77e3:9bb4:0:f816:3eff:fe6d:a944 - 10.0.0.44 flavor: disk: 1 ephemeral: 0 extra_specs: hw_rng:allowed: 'True' original_name: m1.tiny ram: 512 swap: 0 vcpus: 1 ... Similarly, compare before for 'server list': $ openstack --os-compute-api-version 2.79 server list -f yaml - ... Networks: private=fdff:77e3:9bb4:0:f816:3eff:fe6d:a944, 10.0.0.44 Power State: Running Properties: '' ... To after: $ openstack --os-compute-api-version 2.79 server list -f yaml - ... Networks: private: - fdff:77e3:9bb4:0:f816:3eff:fe6d:a944 - 10.0.0.44 Power State: 1 Properties: {} ... We also fix the human-readable output for the 'tags' field. Before: $ openstack --os-compute-api-version 2.79 server list ... | tags | ['bar', 'foo'] | After: $ openstack --os-compute-api-version 2.79 server list ... | tags | bar, foo | Change-Id: I7a8349106e211c57c4577b75326b39b88bd9ac1e Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Merge "trivial: Cleanup docs for 'server list'"Zuul2021-01-061-57/+85
|\
| * trivial: Cleanup docs for 'server list'Stephen Finucane2020-12-091-57/+85
| | | | | | | | | | Change-Id: I2f2033a8d49ee42eb21696a9cd28e63ad9712fad Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "compute: Add missing options for 'server rebuild'"Zuul2021-01-061-6/+143
|\ \ | |/
| * compute: Add missing options for 'server rebuild'Stephen Finucane2020-12-091-6/+143
| | | | | | | | | | | | | | | | | | | | | | This accepts a large number of options that we weren't exposing. Add the following options: '--name', '--preserve-ephemeral', '--user-data', '--no-user-data', '--trusted-image-cert' and '--no-trusted-image-certs'. In addition, rename the '--key-unset' parameter to '--no-key-name', to mimic e.g. '--no-property' on other commands. Change-Id: I61c46e18bef1f086b62a015ebdc56be91071b826 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "Add 'flavor list --min-disk', '--min-ram' options"Zuul2021-01-061-7/+36
|\ \
| * | Add 'flavor list --min-disk', '--min-ram' optionsStephen Finucane2020-12-091-7/+36
| |/ | | | | | | | | | | | | | | Allow us to filter on minimum disk and RAM, and close another gap with novaclient. Change-Id: Ib3f0bdf419675e1c35c3406fbac8a4c18ac56a33 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "Add option to filter instances by AZ"Zuul2020-12-221-0/+8
|\ \ | |/ |/|
| * Add option to filter instances by AZDmitriy Rabotyagov2020-12-011-0/+8
| | | | | | | | | | | | | | | | Since nova API microversion 2.83 it is possible for users to filter instances by AZ. However even before that this functionality was available for admin role. Change-Id: Ife4c8e81aad2ff1dde50d9f23913d9dd9397b00c
* | Merge "trivial: Cleanup docs for 'server rebuild'"Zuul2020-12-051-29/+52
|\ \
| * | trivial: Cleanup docs for 'server rebuild'Stephen Finucane2020-12-031-29/+52
| | | | | | | | | | | | | | | | | | | | | Use consistent help strings and error messages. Change-Id: I42647a6b7e67ce4b8dd5f826e20802ade691c266 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | Switch compute aggregate functions to SDKArtem Goncharov2020-12-021-127/+136
| | | | | | | | | | | | | | | | | | | | | Continue journey towards having OSC consuming SDK for nova part. Depends-On: https://review.opendev.org/#/c/762131/ Change-Id: Id16e6c47aa93f02f15f49e1f59f73fecaa3e3b80
* | | Switch compute flavors from novaclient/direct to SDKArtem Goncharov2020-12-021-122/+140
|/ / | | | | | | | | | | | | | | | | | | | | Let's switch flavors from novaclient or direct API requests onto using SDK. Microversion agreement comes out of the box. SDK normalizes property names, while OSC uses server side names. In order not to break OSC users continue using server-side names. Depends-On: https://review.opendev.org/#/c/762989/ Change-Id: I62b2ed8488ee4ac9c42051311bcfb455506ddd90
* | Add NODE and HOST parameters in "server create" help textyanpuqing2020-12-011-1/+6
|/ | | | | | | | | | Add optional parameters "NODE" and "HOST" in the help text of the server create comand for --availability-zone. Co-Authored-By: tianhui <tianhui@awcloud.com> Change-Id: I4faea8a3d3aecb21ec535e55c238c71745fc68cb Task: 24274 Story: 2003313
* Merge "Add a few selectable fields to the "openstack server list" output"Zuul2020-11-181-0/+21
|\
| * Add a few selectable fields to the "openstack server list" outputjay2020-11-051-0/+21
| | | | | | | | | | | | | | | | Added ``-c project_id | user_id | created_at`` to ``openstack server list`` command to get these columns as an output. Change-Id: I18991adf899c7b72c98bb89871bf0715d35943f0 Story: 2007925
* | Merge "trivial: Document removal of support for agents"Zuul2020-11-181-4/+24
|\ \
| * | trivial: Document removal of support for agentsStephen Finucane2020-11-171-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | We can't remove these commands for a long time, given OSC's intention to support multiple releases of OpenStack, but we can at least indicate to users that this thing might not work anymore. Change-Id: I9093cc1197a0287984d83e2020fba100d0c958b3 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | Merge "Switch 'openstack keypair' ops to use SDK"Zuul2020-11-171-38/+48
|\ \ \ | |/ / |/| |
| * | Switch 'openstack keypair' ops to use SDKArtem Goncharov2020-11-091-38/+48
| | | | | | | | | | | | | | | | | | | | | | | | Let's continue our journey and start using SDK for the keypair operations Depends-On: https://review.opendev.org/#/c/761883/ Change-Id: Id411e70b8e1a79c0e88a0e22be7ff37e5c30fcda
* | | Merge "Resolve issues with 'server migration list'"Zuul2020-11-121-3/+8
|\ \ \
| * | | Resolve issues with 'server migration list'Stephen Finucane2020-11-091-3/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'os-migrations' API accepts 'instance_uuid' and 'migration_type' query string parameters, not 'server' and 'type'. For the former, as the name would suggest, the value should be a server UUID, not a name. In addition, this is a list command and therefore should subclass the 'Lister' base class. Change-Id: I736f5575156fc04d7ada7783a1865ab3b438396f Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | Merge "Add 'openstack server evacuate' command"Zuul2020-11-091-0/+112
|\ \ \ | |/ / |/| |
| * | Add 'openstack server evacuate' commandSean Mooney2020-11-021-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a new 'openstack server evacuate' command to provide parity with the 'nova evacuate' command. The term "evacuate" is notoriously poor, in that it implies the instance is moved rather than recreated, but it is retained since people are familiar with it now. Change-Id: I1e32ca51036c501862d8e89b3144a9695d98a06f
* | | Merge "Compute: Add user id support for keypair"Zuul2020-11-041-4/+82
|\ \ \
| * | | Compute: Add user id support for keypairHe Jie Xu2020-11-021-4/+82
| |/ / | | | | | | | | | | | | | | | | | | | | | This patch adds functionality of specific the user id when create, delete, show and list keypairs. Change-Id: Ib826f1f4f5a73d1875ba0f02e124b3222c4d05ed Co-Authored-By: tianhui <tianhui@awcloud.com>
* | | Merge "Add 'openstack server migration list --type' option"Zuul2020-11-031-4/+15
|\ \ \
| * | | Add 'openstack server migration list --type' optionStephen Finucane2020-10-131-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Another gap with novaclient closed. Change-Id: Id3ca95ceda6f438fa72496ab9ab15ac09bb64fa5 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | Merge "Fix formatting of the flavor properties"Zuul2020-11-031-12/+47
|\ \ \ \
| * | | | Fix formatting of the flavor propertiesArtem Goncharov2020-11-021-12/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not stringify flavor properties to allow proper output formatting to json/yaml/etc Change-Id: I9f4c42acb85b726af87123134dd19de98fe95074
* | | | | Merge "Add support for 'keypairs list --project' parameter"Zuul2020-11-021-6/+38
|\ \ \ \ \