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
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>
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>
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
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>
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
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
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>
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] 3a64a7a166
Change-Id: Ib80548e104a751179f36f2a6ebff9916d38fdf1e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
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>
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
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>
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 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
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>
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>
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>
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>
The code has not been used
since If0161a89877f19f24e91d780cf227fdc48e7e860 .
Change-Id: I106404f9d12814fec2ec2bf16cdd100834085912
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
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>
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>
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>
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>
These particular imports are no longer needed
in a Python 3-only world.
Change-Id: I405b32c8cdd60fb19270a8f6fe2e2728022f7c6e
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
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
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
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
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>
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
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
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
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
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>
This is compatible with Python 3-only syntax.
Change-Id: I462f4242b9a5f8d8cd6b0cb3d328dfd9d93ba200
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
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>