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>
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
Support add 'delete_on_termination' field to the voume attach API to
support configuring whether to delete the data volume when the server
is destroyed.
* Updating the ``nova volume-attachments`` command to show the
``delete_on_termination`` value if 2.79 or greater is used.
* The '--delete-on-termination' option is added to the `nova volume-attach`
CLI.
Depends-On: https://review.opendev.org/#/c/673133/
Part of blueprint support-delete-on-termination-in-server-attach-volume
Change-Id: I8dcf2fd21a2fd99ca4e05bd953fbbe026be3a619
The argument to the function should be the volume ID,
not the attachment ID.So the argument name of the
function here is easy to misunderstand.
Change-Id: Ie093b6acebe8b9e8dbdfed89856666db25bcf756
The help for the `volume-update` command says:
update_server_volume(server_id, attachment_id, new_volume_id)
Update the volume identified by the attachment ID, that is
attached to the given server ID
Parameters:
server_id – The ID of the server
attachment_id – The ID of the attachment
new_volume_id – The ID of the new volume to attach
Return type:
Volume
But in reality the command takes an original volume and a
destination volume. The update help is also not very clear
regarding what the command actually does and the fact that
it's primarily a libvirt data migration from src volume to
destination volume.
This patch modifies the help to show the correct arguments
and also adds some more info regarding what the command
is doing.
Change-Id: Ia267285f85854976545c2a72c3729c1bfcb2c991
Closes-Bug: #1690397
According to recent nova changes, extension is deprecated and
1.1 is also deprecated, so to avoid confusion, remove
those comments in the code
Change-Id: Idc78af2151a0fff159c9b32595ed72a04808b7ee
23f13437dd deprecated the
purely volume or volume-snapshot related CLIs and python
API bindings during Kilo. python-cinderclient should be
used for the python API bindings now, and python-openstackclient
should be used for the CLI for those operations.
The alternate_service_type context manager is also removed
since it was only used for proxying through to the volume API
endpoint.
Since the proxy for creating volumes is removed, we have to
add python-cinderclient for testing the volume attachment
CLIs/APIs that are left intact.
Change-Id: I09a6501603667350f49b1b1fa130353a6d5272a2
Add return-request-id-to-caller function to
resources and resource managers in the following files.
The methods in the resource class and resource manager return
a wrapper class that has 'request_ids' property.
The caller can get request ids of the callee via the property.
* novaclient/v2/volume_snapshots.py
* novaclient/v2/volumes.py
* novaclient/v2/volume_types.py
Co-authored-by: Ankit Agrawal <ankit11.agrawal@nttdata.com>
Change-Id: I4de8c5cf685a5970acc92f8a58a1db26a8d9ffc7
Implements: blueprint return-request-id-to-caller
Currently, novaclient's gates are broken due to missed 'volume' service_type.
This patch changes default service type for all volume related managers to
"volumev2" and leave ability to set "volume" service_type.
Change-Id: Ia1e1d3def1e6127cc2b97797c577c15265f879bd
Closes-Bug: #1501258
Per:
http://lists.openstack.org/pipermail/openstack-dev/2015-August/072982.html
The location of subunit2html changed on the images in the gate
so update the path used in the post_test_hook.
Long-term we should just use what's in devstack-gate.
Change-Id: I5e50e7d7ad845aba26403df1df412c0a139a6dc7
Closes-Bug: #1491646
--------------
squashed with:
--------------
Don't pass null device when attaching a volume
The v2.1 API schema rejects null device values in an
os-volume_attachments request, so only include the device in the request
if one is specified on the command line.
Closes-Bug: #1491325
Change-Id: I4fa4019f19f9af6ff350db2fb6e524fa8570a6f3
The nova server liberty version is changing from 2015.2 to 12.0.0 and
the 2016.1 'M' release will be 13.0.0 so update the deprecation warnings
in the docs and code using those versions.
Depends on nova change 192406.
Change-Id: I6a35fa0dda798fad93b804d00a46af80f08d475c
This deprecates all of the volume CLIs/APIs that go directly to the
cinder API via the volume service type.
This will emit a warning each time a deprecated CLI/API is used and also
updates the help docs for the deprecated CLIs and docstrings for APIs.
The plan is to do a release once this is merged so people start seeing
it and then we'll actually remove the deprecated CLIs/APIs in the first
python-novaclient release after the Nova server 2016.1 'M' release.
DocImpact: The volume, volume-type and volume-snapshot CRUD CLIs/APIs are
deprecated and will be removed after the Nova 2016.1 release.
Use python-cinderclient or openstackclient for CLIs instead.
Use python-cinderclient or python-openstacksdk for APIs instead.
Related-Bug: #1454369
Change-Id: I4e92f924739de9b664e08117984bfb60359f2212
Currently, several of the volumes apis depend on callers to pass
service_type='volume' as a parameter when creating a client object,
to route correctly. The problem is, it makes it impossible for
callers to work with both the compute and volume endpoints at the
same time. They can either work with compute and have volumes.* calls
return 404, or they can work with volume and have servers.* images.*
flavors.* calls return 404.
The CLI sets service_type='volume' for client objects for the
following commands via a decorator:
volume-list
volume-show
volume-create
volume-delete
volume-snapshot-list
volume-snapshot-show
volume-snapshot-create
volume-snapshot-delete
volume-type-list
volume-type-create
volume-type-delete
With this change, the service_type 'volume' is set in the api,
so the decorators on the shell commands are no longer needed.
Closes-Bug: #1431154
Change-Id: I11b48ac14fa4c64d8aae528552ec5b363be384c5
nova client is not able to show the list of volumes when
querying by name.This is because cinder api accepts only
display_name as query parameter and when qeried with 'name'
parameter returns a empty list
Change-Id: Ie4ffc275d1754052d9e239d8457baf6f7fd53b83
Closes-Bug: #1430415
Module novaclient.v1_1 is used as implementation of V1.1, V2 and V3.
Since future development(microversioning) will be done across V2,
implementation should be done in appropriate module(to prevent misleading).
Despite the fact that implementation for all versions are equal, discover
method for contrib path worked only for v1.1. This patch fixes this bug and
modifies shell tests to check all versions.
Change-Id: Ib6798f4dfe177586302141f522dc593560ce6a5b