summaryrefslogtreecommitdiff
path: root/novaclient
Commit message (Collapse)AuthorAgeFilesLines
* Typo - nova CLI deprecation warningHEADmasterDavid Wlazlo2023-05-172-3/+3
| | | | Change-Id: I1e604867bd00d51caebcb049777bbc675a398969
* Bump microversion to 2.9518.3.0Artom Lifshitz2023-02-022-1/+3
| | | | | | | There are no client-side changes for either 2.94 or 2.95, so just do the bump and add release notes. Change-Id: I8c2bfd48526840fc618820b9ae6a12dc98cdef45
* Merge "tests: Fix Python 3.11 compatibility"Zuul2022-12-151-4/+12
|\
| * tests: Fix Python 3.11 compatibilityStephen Finucane2022-12-121-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The argparse lib in Python 3.11 will not allow you to register a subparser more than once with the same name. We were inadvertently doing this in two of our unit tests as part of our check for version handling. There's no need for this. Stop doing it and simply create a new parser each time. An unnecessary check is removed from one of the tests since it confuses matters. Change-Id: I93827f84c456c9f6960e30e2424b67947254752c Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | trivial: Remove use of kwargsStephen Finucane2022-12-122-146/+278
|/ | | | | | | | | | | Make use of a "sentinel" object to allow us to remove the use of kwargs and provide a more helpful docstring. With any luck, Python will support these objects natively in a future release [1]. [1] https://www.python.org/dev/peps/pep-0661/ Change-Id: I411c0393754c8fe8a6698f0d278b73f12209ace8 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Remove unnecessary testing code18.2.0Takashi Natsume2022-09-191-16/+7
| | | | | | | | Now PrettyTable >= 0.7.2 in requirements.txt, remove code for PrettyTable < 0.7.2. Change-Id: Ie6edcc24fbb67394ff8abe0c5f18ad2bed6903ab Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* MV 2.93 - Add support to rebuild boot volumewhoami-rajat2022-09-062-1/+2
| | | | | | | | | | | This patch bumps the API microversion to 2.93 to allow rebuilding a volume backed instance. Implements: blueprint volume-backed-server-rebuild Depends-On: https://review.opendev.org/c/openstack/nova/+/830883 Change-Id: Ie46df7ad76082e7631bb26243abed4dc3b1f40ac
* Fix a fixture for keypairs tests18.1.0Takashi Natsume2022-08-052-7/+12
| | | | | | | | | | | | | This patch is a follow-up for I03570d0a49b73021de91dc50b65b1bbf5d4b878b. The following file is for shell (CLI) tests, so it does not need to be changed anymore. * novaclient/tests/unit/v2/fakes.py Change-Id: I3b1cf5d402b04854177265f2ba429956edb73203 Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* Merge "Add support for 2.92 : keypair import mandatory"Zuul2022-08-024-3/+50
|\
| * Add support for 2.92 : keypair import mandatorySylvain Bauza2022-07-284-3/+50
| | | | | | | | | | | | | | | | | | Now, when creating a keypair, the 'public_key' parameter is now mandatory. Depends-On: https://review.opendev.org/c/openstack/nova/+/849133 Implements: blueprint keypair-generation-removal Change-Id: I03570d0a49b73021de91dc50b65b1bbf5d4b878b
* | Merge "Microversion 2.91: Support specifying destination host to unshelve"Zuul2022-08-025-5/+173
|\ \ | |/
| * Microversion 2.91: Support specifying destination host to unshelveRené Ribaud2022-07-285-5/+173
| | | | | | | | | | | | | | | | | | | | This patch adds ``host`` to novaclient api. This can help administrators to specify a ``host`` to unshelve a shelve offloaded server from 2.91 microversion. Depends-On: https://review.opendev.org/c/openstack/nova/+/831507 Implements: blueprint unshelve-to-host Change-Id: I7efc8f0b0ef159e16cefee761bff5d7e90d0c427
* | Update pre-commit hook, hacking versionsStephen Finucane2022-04-083-15/+22
| | | | | | | | | | | | | | | | | | This was done with 'pre-commit autoupdate'. An invalid message is removed from the requirements.txt files as it no longer applies with pip's new dependency resolver. Change-Id: I01c3ece51f81d67c740e6faca6b77df7c9932435 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Deprecate nova CLIStephen Finucane2022-04-062-9/+32
|/ | | | | | | | | | | | It is time to signal that we're fully committed to delivering a pure OSC experience. Based on the neutron change from 6 (!!) years ago [1] [1] https://github.com/openstack/python-neutronclient/commit/3a64a7a166be25d40436fd40c8351a79267bd3c4 Change-Id: Ib80548e104a751179f36f2a6ebff9916d38fdf1e Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Microversion 2.90 - Configurable hostnamesxena-em17.6.0Stephen Finucane2021-09-025-36/+296
| | | | | | Change-Id: Icd4362a07196e59bafcdfaff44323ce1386d4f55 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Depends-On: https://review.opendev.org/c/openstack/nova/+/778550/
* tests: Add missing 'nova update' unit testsStephen Finucane2021-09-022-0/+32
| | | | | | | | | We have functional tests for the 'nova update' commands, but no unit tests to verify e.g. that we can't set a description for the server before microversion 2.19. Add such tests. Change-Id: I9af89655a7e7276446a881fd28d21ddd6581048c Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Microversion 2.89 - os-volume_attachmentsLee Yarwood2021-08-243-1/+24
| | | | | Depends-On: https://review.opendev.org/c/openstack/nova/+/804275 Change-Id: If6275dbd3795047c111ac507a12b034e60029df8
* Use importlib instead of impTakashi Kajinami2021-08-161-4/+9
| | | | | | | ... because the imp module is deprecated since Python 3.4 . Closes-Bug: #1937904 Change-Id: Ia3f83df336fd243c25f7471d56a44370c11bb5e1
* Use Block Storage API v3 instead of API v2Takashi Kajinami2021-07-271-1/+1
| | | | | | | Block Storage API v2 was deprecated during Pike cycle and is being removed during Xena cycle, and current v3 API should be used instead. Change-Id: I4b4c08d65e642866d81d7fd12a7c82162a0b979e
* Refactor constructing request bodyTakashi Natsume2021-05-061-24/+27
| | | | | | | | | Add a private static method to construct a request body for create requests in the novaclient.v2.volumes.VolumeManager class. Change-Id: I884ad4b471e3d196255901499c75a1a2f0535f65 Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* Add unit tests for client loggermelanie witt2021-04-101-0/+12
| | | | | | | | | | | | | Change I53caceb08667eb12e27016731868e8015dd10e34 fixed a bug where we weren't using our novaclient logger default when a logger was not passed to the Client constructor. This adds unit tests to assert the fixed behavior and protect against regression. Related-Bug: #1921388 Change-Id: I9f622c01a6b1abe328a60de6d3e438e68872dd80
* When creating a client, pass the default loggerRadomir Dopieralski2021-03-251-1/+1
| | | | | | | | | | | When a client is created without a logger, novaclient creates a default logger, but it's then not used, because it's not passed to the factory function. Because of that, all novaclient calls are getting logged as 'keystoneauth.session' instead of 'novaclient.v2.client' as they should. Closes-bug: 1921388 Change-Id: I53caceb08667eb12e27016731868e8015dd10e34
* Add support for microversion v2.8817.4.0Stephen Finucane2021-03-026-31/+212
| | | | | | | | | | | The key change here is that the 'GET /os-hypervisors/{id}/uptime' API will now returns a HTTP 404 starting in 2.88. The 'GET /os-hypervisors/{id}' will instead now include an 'uptime' value. The 'novaclient.v2.hypervisors.HypervisorManager.uptime' method is updated to handle this. Change-Id: Ib99fbd820a586c14527ff64b319df0b7a44e1b8b Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Deprecate agent commands and APIs17.3.0Takashi Natsume2021-01-134-12/+53
| | | | | | | | | | | | | | | | | The os-agents APIs have been removed by the following change. I9512f605dd2b3b0e88c951ed086250d57056303d This patch makes commands related to the APIs deprecated in accordance with the following policy. * https://docs.openstack.org/python-novaclient/latest/contributor/deprecation-policy.html The API bindings related to the APIs remains as they are because python-openstackclient depends on the API bindings. Change-Id: I89d7877e23e8802fe77987a7b24ea247e08d5218 Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* Fix undesirable raw Python errorTakashi Natsume2021-01-042-0/+6
| | | | | | | | | | | | | | | Using the novaclient without a subcommand while passing an optional argument triggers the raw Python error `ERROR: 'Namespace' object has no attribute 'func'`. This bug can be reproduced by issuing the command `nova --os-compute-api-version 2.87`. Added a default value to `func` and an empty value to `command` as placeholders so that a help message is shown instead of the Python error. Change-Id: Ic3e87b67f6d27d40b03d7d8e520fa0f79a4d09e5 Closes-Bug: #1903727 Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* Fix a functional test for 'nova agent-list'Takashi Natsume2021-01-031-2/+10
| | | | | | | | | | | | | | The os-agents APIs have been removed by the following change. I9512f605dd2b3b0e88c951ed086250d57056303d This patch fixes a gate failure. A subsequent patch will make things related to the os-agents APIs deprecated. Change-Id: I9dab95fda5902bf9619393eb2c4a22d9f395d65a Closes-Bug: #1909899 Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* Remove unused codeTakashi Natsume2020-07-312-40/+0
| | | | | | | | The code has not been used since If0161a89877f19f24e91d780cf227fdc48e7e860 . Change-Id: I106404f9d12814fec2ec2bf16cdd100834085912 Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* Add a cleanup for a server in a functional testTakashi Natsume2020-07-281-0/+2
| | | | | | | | | | | | | | A VM instance is created in the following functional test. * novaclient.tests.functional.v2.test_instance_action. TestInstanceActionCLIV262.test_show_actions_with_host However the VM instance is not deleted after the functional test. Add a cleanup for the server in the functional test. Change-Id: I8c2a6f91739d50baa283b37b16de67c542ea691b Closes-Bug: #1889283 Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* Merge "use stevedore to load extensions"Zuul2020-07-092-16/+24
|\
| * use stevedore to load extensionsDoug Hellmann2020-07-082-16/+24
| | | | | | | | | | | | | | | | | | | | | | Importing pkg_resources causes the app to scan the entire import path for all distributions, not just those providing entry points. The scanner in stevedore will have a cache of the entry point data, making it significantly faster. This will be especially useful in command line programs like python-openstackclient. Change-Id: Ic5eb9401c8ea3bd9624b818e0ffb8dcc13f61559 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
* | Switch legacy Zuul jobs to native Zuul v3 jobsTakashi Natsume2020-07-083-60/+48
|/ | | | | | | | | | | | | Replace the 'novaclient-dsvm-functional' legacy Zuul job with the 'python-novaclient-functional' native Zuul v3 job. See https://governance.openstack.org/tc/goals/selected/victoria/native-zuulv3-jobs.html for more details. Change-Id: I35b5699b8b0814f2d17a37e024286cd440047ec8 Signed-off-by: Takashi Natsume <takanattie@gmail.com> Co-Authored-By: Andrey Kurilin <andr.kurilin@gmail.com>
* Merge "Use unittest.mock instead of third party mock"Zuul2020-04-2714-17/+14
|\
| * Use unittest.mock instead of third party mockTakashi Natsume2020-04-2614-17/+14
| | | | | | | | | | | | | | | | Now that we no longer support py27, we can use the standard library unittest.mock module instead of the third party mock lib. Change-Id: I4d45ae17f6f84f945f5dd049a929216ce6b6b58e Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* | Remove future importsTakashi Natsume2020-04-262-3/+0
|/ | | | | | | | These particular imports are no longer needed in a Python 3-only world. Change-Id: I405b32c8cdd60fb19270a8f6fe2e2728022f7c6e Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* Merge "Microversion 2.87 - Stable device boot from volume rescue"17.0.0Zuul2020-04-102-1/+2
|\
| * Microversion 2.87 - Stable device boot from volume rescueLee Yarwood2020-04-102-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This microversion is used to request a stable device rescue for boot from volume instances and will only succeed when the compute hosting the instance reports the COMPUTE_RESCUE_BFV trait. No changes are required within novaclient so this change only bumps API_MAX_VERSION. Depends-On: https://review.opendev.org/#/c/701430/ Change-Id: I7885b8558db7657abbfe1f45877f52e947f5f655
* | Merge "Microversion 2.86 - Extra spec validation"Zuul2020-04-102-1/+2
|\ \ | |/
| * Microversion 2.86 - Extra spec validationLee Yarwood2020-04-092-1/+2
| | | | | | | | | | | | | | | | | | | | | | This microversion introduces extra spec validation within the API. No changes are required within novaclient so this change only bumps API_MAX_VERSION. Depends-On: https://review.opendev.org/#/c/708436/ Change-Id: Ic8fef7ee363435e9ac728b87d494593fcc6defc0
* | FUP: Add volume-update CLI pre V285 testszhangbailin2020-04-101-0/+12
|/ | | | | | | | | This commit mainly to fix some comments from [1]. [1]https://review.opendev.org/#/c/712651/19/novaclient/tests/unit/v2/test_shell.py@4001 Blueprint: destroy-instance-with-datavolume Change-Id: Id809f22d0da2cdedf33a2c0df202f3953fd01673
* Microversion 2.85: Change volume-update CLIzhangbailin2020-04-095-9/+116
| | | | | | | | | | | | | This commit add a new CLI ``nova volume-update [--[no-]delete-on-termination] <server> <src_volume> <dest_volume>`` to update 'delete_on_termination' for an attached volume, that the user can decide whether to delete attached volumes when destroying the server. Depends-On: https://review.opendev.org/#/c/711194/ Change-Id: I1fc64fb6e6611c92c6b72265e1bf4b32e9c45f0a Blueprint: destroy-instance-with-datavolume
* Make 'server list --config-drive' a boolean optionStephen Finucane2020-04-084-29/+43
| | | | | | | | | | | | Instead of passing through whatever the user provides and exposing this bug in the REST API, simply make the opt a boolean one in expectation of a day where the API issues have been resolved. This also introduces machinery necessary to use more of these types of opts in the future. Change-Id: I9033540ac65ac0ee7337f16bdd002060652092ea Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Microversion 2.84 - action event fault detailszhangbailin2020-04-082-1/+2
| | | | | | | | | | | | | | | This patch adds support for microversion 2.84 "Expose instance action event details out of the API" [1]. [1] https://review.opendev.org/#/c/694430/ No changes are required in the novaclient side, so just increment the microversion. Depends-On: https://review.opendev.org/#/c/694430/ Implements blueprint action-event-fault-details Change-Id: I1d71284de9a5f25f4554dd2ec7291d5706381de7
* Microversion 2.83 - Add more filters for the nova list commandVictor Coutellier2020-04-075-6/+130
| | | | | | | | | | | | | | | | | | | Add these new filters, admin-only until microversion 2.82: - availability-zone - config-drive - key-name - power-state - task-state - vm-state - progress Existing user filter will be available to non admin since microversion 2.83. Part of blueprint non-admin-filter-instance-by-az Change-Id: Id2b5e600c0a41790830823031b20983808cb5ace
* Microversion 2.82 - nova cyborg interactionTakashi Natsume2020-03-122-1/+2
| | | | | | | | | | | | | This patch adds support for microversion 2.82 "Define Cyborg ARQ binding notification event" (*). *: I7a626544d8221dc0eeb5672986ca897ce4718be8 No changes are required in the novaclient side, so just increment the microversion. Change-Id: I3a8a2f8b5ced5519082f0b7609702d4f62be88ac Implements: blueprint nova-cyborg-interaction
* Don't print user_data for 'nova show'Stephen Finucane2020-02-262-2/+2
| | | | | | | | | | User data is a blob of data that the user can specify when they launch an instance. It's generally binary data, which means it's not something we should show by default on the CLI. Stop doing that. Change-Id: If8f6cc040d0077a7902a5fd425e67d74d7925a46 Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Closes-Bug: #1669140
* Random cleanupsStephen Finucane2020-02-214-7/+7
| | | | | | | | Remove some cruft from Sphinx config files, drop the use of 'u' prefixed strings, which are unnecessary in Python 3, and generally tidy stuff up. Change-Id: Ib0f33576e160ec842d7fc82b4fcfee99829623d7 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Bump to hacking 2.xStephen Finucane2020-02-215-8/+8
| | | | | | | This is compatible with Python 3-only syntax. Change-Id: I462f4242b9a5f8d8cd6b0cb3d328dfd9d93ba200 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Remove sixStephen Finucane2020-02-2128-369/+278
| | | | | | | | Mostly a find-replace job. Let's do this now so we don't have to carry it for the next decade. Change-Id: I7bef9fb7c6895f746cee1aca6522786f38b9857c Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* trivial: Remove 'u' prefix from stringStephen Finucane2020-02-211-1/+1
| | | | | | | | | | | It looks like nova is using 'repr()' in some validation error logging. On Python 2.7, this would result in unicode strings (which most web apps use) being output as "u'foo'", while in Python 3 these would just be "'foo'". Since nova only supports Python 3 now, we only have to support the Python 3 string formatting variant in our tests too. Change-Id: I546c06a3251e86f39e2e7db48e04ec382c8da854 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Merge "Add minor version [21] to the test_versions"Zuul2019-11-131-3/+6
|\