Commit Graph

9 Commits

Author SHA1 Message Date
zhangbailin efc945152d FUP: add missing test for PUT volume attachments API
This patch aims to address the comments in
https://review.opendev.org/#/c/693828/25/nova/tests/unit/api/openstack/compute/test_volumes.py@1342

Blueprint: destroy-instance-with-datavolume
Change-Id: Ie9ae31cf3ab7ca108f132e4e0aff56368c40e6f7
2020-04-09 09:26:05 +08:00
zhangbailin 733d4133df Allow PUT volume attachments API to modify delete_on_termination
Allow PUT /servers/{server_id}/os-volume_attachments/{volume_id}``
to support specifying ``delete_on_termination`` field in the request
body. This allows updating the attached volume's flag that controls
whether or not it is automatically deleted when the instance is deleted.

When we request 'volumeId' and 'delete_on_termination' in the requst
body to swap volume, since the new microversion it will be support
updating the swapping volume's delete flag.

Co-Authored-By: Dan Smith <dansmith@redhat.com>

Blueprint: destroy-instance-with-datavolume
Change-Id: I6ccac4e17f56b40e67c79d40f32558ef414685ea
2020-04-02 09:26:55 -07:00
zhangbailin e5b47543cf Add delete_on_termination to volume-attach API
Add the 'delete_on_termination' field to the volume attach API to support
configuring whether to delete the data volume when the instance is destroyed.

To avoid upgrade impact issues with older computes, the
'delete_on_termination' field is set in the API rather than when the BDM
is created in the compute service.

Implements: blueprint support-delete-on-termination-in-server-attach-volume
Change-Id: I55731b1822a4e32909665a2872d80895cb5b12f7
2019-09-05 20:54:56 +08:00
Ghanshyam Mann b26bc7fd7a Multiple API cleanup changes
This microversion implements below API cleanups:

1. 400 for unknown param for query param and for request body.

2. Making server representation always consistent among all APIs
   returning the complete server representation.

3. Change the default return value of ``swap`` field from the empty string
   to 0 (integer) in flavor APIs.

4. Return ``servers`` field always in the response of GET
   hypervisors API even there are no servers on hypervisor

Details: https://specs.openstack.org/openstack/nova-specs/specs/train/approved/api-consistency-cleanup.html

Partial-Implements: blueprint api-consistency-cleanup

Change-Id: I9d257a003d315b84b937dcef91f3cb41f3e24b53
2019-08-12 08:52:38 -05:00
ghanshyam 0d1743a83d Implement query param schema for volume, snapshot API
volume & snapshot API accept query param to filter volumes,
snapshots.
This commit adds json schema to validating the valid
query parameters.

There is no change in API behaviour and additionalProperty
is kept True for backward compatibility.

Partially implements blueprint json-schema-validation-for-query-param

Change-Id: I9e91ddabb2e62440f04ab3aac3b7e96a9fdd59dc
2017-11-19 16:15:39 +03:00
Artom Lifshitz 125c17465f API support for tagged device attachment
This patch adds microversion 2.49, which supports tagged attachment
of network interfaces and block devices.

Change-Id: I8d3bbe7e9a21d2694d10ee89628deb333e6b0487
Implements: blueprint virt-device-tagged-attach-detach
2017-06-30 09:05:34 +03:00
piyush110786 bc1e816695 Check added for mandatory parameter size in schema
There is a missing validation in schema for mandatory parameter
'size' during volume creation in compute.
This patch resolve the issue.

Change-Id: I44695653867a088499de8582c2e1134f15fee3b4
Closes-bug: #1530091
2015-12-30 16:17:45 +05:30
Davanum Srinivas 354e972f9f Allow to use autodetection of volume device path
API contract says, device is optional. We should allow the
device property to be nullable
http://developer.openstack.org/api-ref-compute-v2.1.html#attachVolume

Note that in python nova client "auto" is turned into None for the
device before the call is made to Nova API.

Closes-Bug: #1491325
Change-Id: Ibfd83b6abdfeec328019246a372363cada53869e
2015-09-03 14:22:03 +00:00
He Jie Xu 3e032fd45b Remove 'v3' directory for v2.1 json-schemas
This is step 4 of the remove v3 process. It moves the v2.1
json-schemas out of v3 directory, and also corrects all the
references.

Change-Id: Ibf88c38df951ed755b7431846cca7496f861c1dd
Partial-Bug: #1462901
2015-08-13 09:58:48 +08:00