summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2/server.py
Commit message (Collapse)AuthorAgeFilesLines
* 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-061-19/+18
| | | | | | | | | | | | | | | | | | 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: 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 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
* | 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>
* | 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 "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 "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 "trivial: Rework 'CreateServer' function"Zuul2020-10-301-117/+178
|\ \ \
| * | | trivial: Rework 'CreateServer' functionStephen Finucane2020-10-291-117/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This rather complex function has had stuff tacked on over the years. Help make working with it a bit easier through liberal application of whitespace and some nicer indentation. Some option help text is improved based on changes to modern nova. Change-Id: I8154dd395dd904c3bcd180a7d0f9037b7e0be64f Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | Merge "Cleanup of 'server migration list' command"Zuul2020-10-211-84/+109
|\ \ \ \ | | |/ / | |/| |
| * | | Cleanup of 'server migration list' commandStephen Finucane2020-10-131-84/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Address some post merge nits. Change-Id: Ie59521d81fab191194f6c1a114b007fa17f5299f Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | Merge "Compute: Add tag support for server add fixed ip"Zuul2020-10-151-5/+25
|\ \ \ \ | |_|/ / |/| | |
| * | | Compute: Add tag support for server add fixed iptianhui2020-10-121-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I62ed4729dead9f91630d1f568c834c9642965558 Story: 2002195 Task: 21679
* | | | Compute: Add tags support for servertianhui2020-10-141-1/+114
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If065602792958ff0145ae9f2e05f5b7a3177905c Story: 2002006 Task: 19641
* | | | Merge "Compute: Add tag support for server add volume"Zuul2020-10-141-21/+43
|\ \ \ \
| * | | | Compute: Add tag support for server add volumetianhui2020-10-091-21/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id9f2e09426f6824e9ca672bf7808b5165c650a69 Story: 2002195 Task: 21675
* | | | | Merge "Add 'server migration force complete' command"Zuul2020-10-141-0/+38
|\ \ \ \ \ | | |_|/ / | |/| | |
| * | | | Add 'server migration force complete' commandjay2020-10-131-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is equivalent to novaclient's 'live-migration-force-complete' command. Change-Id: Ic4dc639afa16cdf8c5a46774895e850d92985292 Story: 2007513 Task: 39293
* | | | | Merge "Add 'server migration abort' command"Zuul2020-10-141-0/+38
|\ \ \ \ \ | |/ / / /
| * | | | Add 'server migration abort' commandhackertron2020-10-131-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is equivalent to nova client's 'live-migration-abort' command. Change-Id: I0ff520ccfdf2de52c427affad7bef4554c86a06f Story: 2007489 Task: 39210
* | | | | Merge "compute: Add --password option for openstack server create"Zuul2020-10-131-0/+6
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | compute: Add --password option for openstack server createZhaokun Fu2020-10-131-0/+6
| | |/ / | |/| | | | | | | | | | | | | | | | | | Change-Id: Iaf923200efe023655a58ac5acac0b087d2fd5366 Story: #1708570 Task: #13780
* | | | Merge "Remove oslo.utils"Zuul2020-10-131-5/+5
|\ \ \ \
| * | | | Remove oslo.utilsMonty Taylor2020-10-121-5/+5
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Oslo things are really server-side oriented and are heavy-weight for client things. Remove oslo.utils and just use iso8601 and importlib directly. It's not actually a bad library, but pulling it and its other deps in just for a couple of wrapper methods is a bit much here. oslo.i18n, fwiw, is lightweight and helpful. Change-Id: I463993170c03a1d98c47ab6a3c19131b7fca1099
* | | | Merge "Add an error message when server bind floating IP"Zuul2020-10-131-0/+4
|\ \ \ \
| * | | | Add an error message when server bind floating IPyanpuqing2020-10-121-0/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we add a floating IP for the server with no fixed IP, CLI doesn't report an error and nothing happens. The patch adds an error message when the server which don't have fixed IP bind floating IP. Change-Id: I400f2bab08521bb7fa443d87c7f45cc79eb80694 Task: 27941 Story: 2004346
* | | | Merge "Compute: Add tag support for server add network"Zuul2020-10-131-1/+25
|\ \ \ \
| * | | | Compute: Add tag support for server add networktianhui2020-10-121-1/+25
| |/ / / | | | | | | | | | | | | | | | | | | | | Change-Id: I31a66b2d4dac44052a71f43a5a67836247ccac64 Story: 2002195 Task: 21678
* | | | Merge "Compute: Add tag support for server add port"Zuul2020-10-131-1/+24
|\ \ \ \
| * | | | Compute: Add tag support for server add porttianhui2020-10-121-1/+24
| |/ / / | | | | | | | | | | | | | | | | | | | | Change-Id: Ice6bf5fb57afeb10862c870b42732dcf166772d1 Story: 2002195 Task: 21676
* | | | Merge "Add server migration list CLI"Zuul2020-10-121-0/+161
|\ \ \ \ | |/ / / |/| | |
| * | | Add server migration list CLIzhangbailin2020-09-241-0/+161
| | |/ | |/| | | | | | | | | | | | | | | | | | | Add ``openstack server migration list`` to fetch server migrations. Part of blueprint add-user-id-field-to-the-migrations-table Change-Id: I15b4a5aca8d0dee59dd293e7b1c7272cdfbeea20
* | | Merge "Remove usage of six"Zuul2020-10-091-3/+2
|\ \ \ | |_|/ |/| |
| * | Remove usage of sixsongwenping2020-10-071-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With python3.x, classes can use 'metaclass=' instead of 'six.add_metaclass', 'six.iteritems' and 'six.iterkeys' can be replaced by 'items' and 'keys', 'six.moves.urllib.parse' can be replaced by 'urllib.parse', 'six.StringIO' and 'six.moves.cStringIO' can be replaced by 'io.StringIO', 'six.text_type' and 'six.string_type' are just 'str'. Change-Id: I84848c0bf8ab3c36dd821141191e2725e4e3b58b
* | | Merge "Add 'openstack server create --use-config-drive'"Zuul2020-10-091-12/+33
|\ \ \ | |/ / |/| |