summaryrefslogtreecommitdiff
path: root/openstackclient/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge "compute: Add support for 'server boot --nic ...,tag=<tag>'"Zuul2021-03-041-0/+107
|\ \ \ \ \ | |/ / / /
| * | | | compute: Add support for 'server boot --nic ...,tag=<tag>'Stephen Finucane2021-01-211-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been around for a long time but was not exposed via OSC. Close this gap. Change-Id: I71aabf10f791f68ee7405ffb5e8317cc96cb3b38 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | | Merge "compute: Improve 'server create --nic' option parsing"Zuul2021-03-041-52/+52
|\ \ \ \ \ | |/ / / /
| * | | | compute: Improve 'server create --nic' option parsingStephen Finucane2021-01-211-52/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the parsing of this option by making use of a custom action. Change-Id: I670ff5109522d533ef4e62a79116e49a35c4e8fa Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | | Merge "compute: Add missing options for 'server event list'"Zuul2021-03-041-1/+234
|\ \ \ \ \ | |/ / / / | | | | / | |_|_|/ |/| | |
| * | | compute: Add missing options for 'server event list'Stephen Finucane2021-01-211-1/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add pagination parameters, '--limit' and '--offset', and filtering parameters, '--changes-since' and '--changes-before'. Change-Id: Ieca8267c3b204ae2db580502cc8fe72c95eddf09 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | Merge "Add --name to port list"Zuul2021-03-031-0/+20
|\ \ \ \
| * | | | Add --name to port listBrian Haley2021-02-231-0/+20
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The neutron API supports filtering ports by name, but the CLI was missing support for it like it does for other networking resources. Change-Id: I4ff339e18656013218a26f045b205cb7a02dd2fb Story: #2008654
* | | | Merge "compute: Add missing options for 'server group list'"Zuul2021-03-031-4/+43
|\ \ \ \ | | |/ / | |/| |
| * | | compute: Add missing options for 'server group list'Stephen Finucane2021-01-211-4/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add pagination parameters, '--limit' and '--offset'. It's unfortunate that we can't use '--marker' like elsewhere but that requires server-side support to be truly effective. Change-Id: I186adc8cdf28e9c540ad22bca6684d9dd892976a Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | Merge "compute: Add 'server * --all-projects' option"Zuul2021-03-031-0/+66
|\ \ \ \ | |/ / /
| * | | compute: Add 'server * --all-projects' optionStephen Finucane2021-01-211-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an '--all-projects' option to a number of commands: - server delete - server start - server stop This is in addition to 'server list', which already supports this option. This option allows users to request the corresponding action on one or more servers using the server names when that server exists in another project. This is admin-only by default. As part of this work, we also introduce a 'boolenv' helper function that allows us to parse the environment variable as a boolean using 'bool_from_string' helper provided by oslo.utils. This could probably be clever and it has the unfortunate side effect of modifying the help text in environments where this is configured, but it's good enough for now. It also appears to add a new dependency, in the form of oslo.utils, but that dependency was already required by osc-lib and probably more. Change-Id: I4811f8f66dcb14ed99cc1cfb80b00e2d77afe45f Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | Add 'address_group' type support to rbac commandsMiguel Lavalle2021-02-101-1/+5
| |/ / |/| | | | | | | | | | | Depends-On: https://review.opendev.org/c/openstack/neutron/+/772460 Change-Id: Icd5e96d180364b979d1e93fcb39f9133a41a06e5
* | | Merge "Add device profile to ``port``"Zuul2021-01-222-0/+30
|\ \ \ | |/ / |/| |
| * | Add device profile to ``port``Rodolfo Alonso Hernandez2021-01-192-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | Added device profile parameter to ``port create`` command. Related-Bug: #1906602 Change-Id: I4c222ac334d3a0a0ee568ed1e0bc8518baa375e1
* | | Merge "Support remote-address-group in SG rules"Zuul2021-01-202-0/+44
|\ \ \ | |/ / |/| |
| * | Support remote-address-group in SG rulesHang Yang2021-01-122-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | Add support for using remote-address-group in security group rules. Change-Id: Ib1972244d484839943bc3cda07519a6c6d4b945a Implements: blueprint address-groups-in-sg-rules Depends-On: https://review.opendev.org/755644
* | | Merge "compute: Improve 'server migration list' options"Zuul2021-01-151-19/+32
|\ \ \
| * | | compute: Improve 'server migration list' optionsStephen Finucane2021-01-121-19/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve both the '--user' and '--project' options to allow names as well as UUIDs. There's no release note included since this entire command was added in change I15b4a5aca8d0dee59dd293e7b1c7272cdfbeea20, which hasn't been included in a release yet. Change-Id: I7654f3ffc54d38d5cfb03d8d1b2f4dc4fb06fb3d Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | Merge "compute: Add '--force' option to 'server delete'"Zuul2021-01-151-0/+21
|\ \ \ \ | |/ / /
| * | | compute: Add '--force' option to 'server delete'Stephen Finucane2021-01-121-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an admin-only operation by default but can be useful. Change-Id: I25a4da697e27c0fba4d28b504377667eb18f15fe Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | Merge "compute: Add missing options for 'hypervisor list'"Zuul2021-01-151-0/+96
|\ \ \ \ | |/ / /
| * | | compute: Add missing options for 'hypervisor list'Stephen Finucane2021-01-121-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Yet more pagination parameters. Change-Id: I9f0145c89ddc49c1d907e6e6e294319cf80fc6ff Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | Merge "compute: Add 'server volume update' command"Zuul2021-01-151-0/+120
|\ \ \ \ | |/ / / | | / / | |/ / |/| |
| * | compute: Add 'server volume update' commandStephen Finucane2021-01-121-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 "network: Address nits for I3c313fc9329837dde67815901528a34dca98ebcc"Zuul2021-01-121-4/+3
|\ \ \
| * | | network: Address nits for I3c313fc9329837dde67815901528a34dca98ebccStephen Finucane2021-01-121-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Address comments left in the review for $subject. Change-Id: I69449112027736152c9fb62f5fe427efd6a25107 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | Merge "Support Neutron Address Group CRUD"Zuul2021-01-113-0/+753
|\ \ \ \ | |/ / /
| * | | Support Neutron Address Group CRUDHang Yang2020-12-243-0/+753
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for Neutron address group CRUD operations. Subsequent patches will be added to use address groups in security group rules. Change-Id: I3c313fc9329837dde67815901528a34dca98ebcc Implements: blueprint address-groups-in-sg-rules Depends-On: https://review.opendev.org/738274 Depends-On: https://review.opendev.org/745594
* | | | Merge "Add 'server unshelve --wait' option"Zuul2021-01-111-29/+51
|\ \ \ \
| * | | | Add 'server unshelve --wait' optionStephen Finucane2021-01-081-29/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-112-7/+117
|\ \ \ \ \ | |/ / / / | | | / / | |_|/ / |/| | |
| * | | Add 'server shelve --offload', 'server shelve --wait' optionsStephen Finucane2021-01-082-7/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-082-0/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the old 'nova volume-attachments' command. Change-Id: Icb98766f98bd1f2469bdb6df62b4624711f98422 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | tests: Remove unused fake methodStephen Finucane2021-01-081-19/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | The FakeServerMigration.get_server_migrations method was added in change I15b4a5aca8d0dee59dd293e7b1c7272cdfbeea20 but has never been used. Remove it. Change-Id: I6089c5200737b9319a8e96f2a2fc18b7cdd6b2c6 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | compute: Add missing options for 'server image create'Stephen Finucane2021-01-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+138
|\ \ \
| * | | compute: Add missing options for 'server list'Stephen Finucane2021-01-071-2/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-5/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-062-29/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-20/+22
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | 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-062-75/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 "compute: Add missing options for 'server rebuild'"Zuul2021-01-061-68/+290
|\ \ \
| * | | compute: Add missing options for 'server rebuild'Stephen Finucane2020-12-091-68/+290
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+31
|\ \ \