summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* compute: Add missing options for 'hypervisor list'Stephen Finucane2021-01-123-7/+157
| | | | | | | Yet more pagination parameters. Change-Id: I9f0145c89ddc49c1d907e6e6e294319cf80fc6ff Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* compute: Add 'server volume update' commandStephen Finucane2021-01-127-10/+201
| | | | | | | | | | | | | | | | | | | | | | 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>
* Remove retired Karbor supportStephen Finucane2021-01-085-16/+0
| | | | | | | | | | The Karbor project is being retired in Wallaby [1]. Remove the docs for its client. [1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/018643.html Change-Id: I52d0f6a76cc9bcfc8b33f0e2cd3751859770ac8a Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* compute: Add 'server volume list' commandStephen Finucane2021-01-085-0/+307
| | | | | | | 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-083-2/+27
| | | | | | | | 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-083-3/+117
| | | | | | | | | 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-083-17/+87
| | | | | | | | | | | | | | 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-083-12/+361
|\
| * compute: Add missing options for 'server list'Stephen Finucane2021-01-073-12/+361
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-066-76/+78
| | | | | | | | | | | | | | | | | | 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-064-9/+92
| | | | | | | | | | | | | | | | 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-063-23/+82
| | | | | | | | | | | | | | 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-063-8/+64
| | | | | | | | | | | | | | | | | | | | | | | | 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-064-40/+51
| | | | | | | | | | | | | | | | | | 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-063-44/+107
|/ | | | | | | | | 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-064-115/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-063-74/+446
|\ \ | |/
| * compute: Add missing options for 'server rebuild'Stephen Finucane2020-12-093-74/+446
| | | | | | | | | | | | | | | | | | | | | | 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-063-7/+73
|\ \
| * | Add 'flavor list --min-disk', '--min-ram' optionsStephen Finucane2020-12-093-7/+73
| |/ | | | | | | | | | | | | | | 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 "image: Unset properties rather than setting to None"Zuul2021-01-063-17/+16
|\ \
| * | image: Unset properties rather than setting to NoneStephen Finucane2020-12-223-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we attempt to unset an image property by setting it to None. This doesn't work for known properties and is rightly rejected by the Glance API with the following error: BadRequestException: 400: Client Error for url: http://172.20.4.87/image/v2/images/368c5751-2b0b-4a38-a255-fd146fe52d31, Bad Request The solution is to actually unset the field by deleting it. Change-Id: Ie156bedbe0f9244f82c81401679706f484caf9aa Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Story: #2008463 Task: #41493
* | | Add support '--progress' option for 'image create'youngho choi2021-01-044-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | openstack-client doesn’t support the upload progress bar. This patch shows progressbar when create image if you added '--progress' option like a python-glanceclient. like this. [=============================>] 100% +------------------+---------------------------+ | Field | Value | +------------------+---------------------------+ | container_format | bare | | created_at | 2020-09-06T20:44:40Z | ... How to use Add the'--progress' option on the 'openstack image create' command. Code was written by referring to 'python-glanceclient' project on stable/ussuri branch Change-Id: Ic3035b49da10b6555066eee607a14a5b73797c00 task: 40003 story: 2007777
* | | Merge "Change 'Volume' to 'Block Storage'"Zuul2020-12-224-4/+4
|\ \ \
| * | | Change 'Volume' to 'Block Storage'yangxi2020-03-094-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | In volume*.rst files, 'Volume' should be instead of 'Block Storage'. Change-Id: Iafc8bfa19e87edf1ffad2340c75e9d867042cae5
* | | | Merge "Add project field in image list subcommand"Zuul2020-12-223-0/+35
|\ \ \ \
| * | | | Add project field in image list subcommandokozachenko2020-12-153-0/+35
| | |/ / | |/| | | | | | | | | | | | | | | | | | The motivation is to filter the image by owner Change-Id: I1f08da175a06e62a844f76b0ec18cb3332efef86
* | | | Merge "Add name and enabled param in ListDomain parser"Zuul2020-12-223-1/+80
|\ \ \ \
| * | | | Add name and enabled param in ListDomain parserVishakha Agarwal2020-07-213-1/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when doing openstack domain list --name xyz_id, and openstack domain list --enabled CLI raising error unrecognized arguments, whereas in api-ref document [1], user can pass name and enabled as optional query param. This addresses the above issue, by adding param --name and --enabled in parser of ListDomain. [1]https://docs.openstack.org/api-ref/identity/v3/?expanded=list-domains-detail#list-domains Change-Id: I3cdb511d3c7059ddfb802ca025188d8976c9302c
* | | | | Merge "Add option to filter instances by AZ"Zuul2020-12-222-0/+9
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Add option to filter instances by AZDmitriy Rabotyagov2020-12-012-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Make use of comparable 'FormattableColumn' subclassesStephen Finucane2020-12-0933-306/+295
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires fixes found in cliff 3.5.0 [1] and osc-lib 2.3.0 [2]. With these fixes in place, we can remove the icky, still broken 'assertItemEqual' and 'assertListItemEqual' helpers. [1] https://review.opendev.org/761421 [2] https://review.opendev.org/761394 Change-Id: Id6c26b37c3c7d5ec6761361abca57f9219b76838 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | Merge "Remove retired Searchlight support"Zuul2020-12-094-7/+0
|\ \ \ \
| * | | | Remove retired Searchlight supportGhanshyam Mann2020-12-084-7/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Searchlight project is retiring in Wallaby cycle[1]. This commit removes the support/usage of Searchlight project before its code is removed. Needed-By: https://review.opendev.org/c/openstack/searchlight/+/764526 [1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/018637.html Change-Id: Idad97343b9ce66186d50ee0560a2fded66655f9b
* | | | Update lower-constraintsStephen Finucane2020-12-081-47/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This had gotten pretty out-of-date and included a whole load of OSC plugins which I don't think we need to track from here. This updated version is simply generated via 'pip freeze' using pip >= 20.3, which includes the new dependency resolver. Change-Id: I4fb0b69dbd538f313c6fef97126c22078904c69f Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | Fix lower-constraints jobStephen Finucane2020-12-083-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pip 20.3 finally includes a proper dependency resolver. Its use is causing the following error messages on the lower-constraints job: ERROR: Cannot install ... because these package versions have conflicting dependencies. The conflict is caused by: bandit 1.1.0 depends on PyYAML>=3.1.0 cliff 3.4.0 depends on PyYAML>=3.12 openstacksdk 0.52.0 depends on PyYAML>=3.13 Bump our lower constraint for PyYAML to resolve this issue. With that resolved, we see a new issue: ERROR: Could not find a version that satisfies the requirement cryptography>=2.7 (from openstacksdk) ERROR: No matching distribution found for cryptography>=2.7 This is less self-explanatory but looking at the lower-constraints for openstacksdk 0.52.0 shows a dependency on cryptography 2.7 [1], meaning we need to bump this also. Next up, flake8-import-order seems to cause the dependency resolver to go nuts, eventually ending with the following error message in a Python 3.6 environment: Using cached enum34-1.1.2.zip (49 kB) ERROR: Command errored out with exit status 1: command: ... cwd: ... Complete output (9 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File ".../lib/python3.6/site-packages/setuptools/__init__.py", line 7, in <module> import setuptools.distutils_patch # noqa: F401 File ".../lib/python3.6/site-packages/setuptools/distutils_patch.py", line 9, in <module> import re File "/usr/lib64/python3.6/re.py", line 142, in <module> class RegexFlag(enum.IntFlag): AttributeError: module 'enum' has no attribute 'IntFlag' ---------------------------------------- A quick Google suggests this is because the enum34 package is not complete [2]. We shouldn't even be using it since our base virtualenv should at least use Python 3.6, but I guess some dependency doesn't properly restrict the dependency to <= Python 3.4. This is moved from 'test-requirements.txt' to 'tox.ini' since we don't need to use our constraints machinery for linters. Finally, the versions of bandit and hacking that pip is bringing in both requires in a newer version of babel, which in turn requires a new version of pytz. Collecting hacking>=2.0.0 ... ERROR: Cannot install oslo.i18n because these package versions have conflicting dependencies. The conflict is caused by: babel 2.9.0 depends on pytz>=2015.7 babel 2.8.1 depends on pytz>=2015.7 babel 2.8.0 depends on pytz>=2015.7 babel 2.7.0 depends on pytz>=2015.7 Seeing as we shouldn't be tracking bandit in lower-constraints, I'm not sure why we're want to bump these dependencies for just that. As above, we move these dependencies out of 'test-requirements' and into 'tox.ini' since we can do that for linters. [1] https://opendev.org/openstack/openstacksdk/src/tag/0.52.0/requirements.txt#L19 [2] https://github.com/iterative/dvc/issues/1995#issuecomment-491889669 Change-Id: I8ec738fbcabc8d8553db79a876e5592576cd18fa Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | | 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>
* | | | | Merge "Switch compute aggregate functions to SDK"Zuul2020-12-054-212/+313
|\ \ \ \ \
| * | | | | Switch compute aggregate functions to SDKArtem Goncharov2020-12-024-212/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continue journey towards having OSC consuming SDK for nova part. Depends-On: https://review.opendev.org/#/c/762131/ Change-Id: Id16e6c47aa93f02f15f49e1f59f73fecaa3e3b80
* | | | | | Merge "Switch compute flavors from novaclient/direct to SDK"Zuul2020-12-056-339/+453
|\ \ \ \ \ \ | |/ / / / / | | / / / / | |/ / / / |/| | | |
| * | | | Switch compute flavors from novaclient/direct to SDKArtem Goncharov2020-12-026-339/+453
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 documentation about login with federationpedro2020-12-023-19/+183
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation presents the parameters necessary to authenticate via federation (using password) and do a brief description of each parameter used in the process. Change-Id: Iae3b6d0b56ebd2bbbb94f9f3637b5086e75559a7
* | | | Merge "stop image downloads to memory"Zuul2020-12-024-3/+19
|\ \ \ \
| * | | | stop image downloads to memorySimon Merrick2020-11-254-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + Fixes issue with large images hogging memory + stream image downloads + output to stdout if file not specified Change-Id: Ia01ff9b21a2dac5d0ccf2bd58a8640e88c5cbb36 Story: 2007672 Task: 39776
* | | | | Merge "Add NODE and HOST parameters in "server create" help text"Zuul2020-12-011-1/+6
|\ \ \ \ \
| * | | | | 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