19 Commits

Author SHA1 Message Date
Ildiko Vancsa
7e6ae9afd9 [api] Allow multi-attach in compute api
This change introduces a new microversion which must be used
to create a server from a multiattach volume or attach a multiattach
volume to an existing server instance.

Attaching a multiattach volume to a shelved offloaded instance is not
supported since an instance in that state does not have a compute host
so we can't tell if the compute would support the multiattach volume
or not. This is consistent with the tagged attach validation with 2.49.

When creating a server from a multiattach volume, we'll check to see
if all computes in all cells are upgraded to the point of even supporting
the compute side changes, otherwise the server create request fails with
a 409. We do this because we don't know which compute node the scheduler
will pick and we don't have any compute capability filtering in the
scheduler for multiattach volumes (that may be a future improvement).

Similarly, when attaching a multiattach volume to an existing instance,
if the compute isn't new enough to support multiattach or the virt
driver simply doesn't support the capability, a 409 response is returned.
Presumably, operators will use AZs/aggregates to organize which hosts
support multiattach if they have a mixed hypervisor deployment, or will
simply disable multiattach support via Cinder policy.

The unit tests are covering error conditions with the new flow. A new
functional scenario test is added for happy path testing of the new boot
from multiattach volume flow and attaching a multiattach volume to more
than one instance.

Tempest integration testing for multiattach is added in change
I80c20914c03d7371e798ca3567c37307a0d54aaa.

Devstack support for multiattach is added in change
I46b7eabf6a28f230666f6933a087f73cb4408348.

Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com>

Implements: blueprint multi-attach-volume
Change-Id: I02120ef8767c3f9c9497bff67101e57e204ed6f4
2018-01-22 10:45:13 -05:00
Mark Giles
b40d949b31 Do not attempt volume swap when guest is stopped/suspended
A swap on a stopped or suspended instance will fail silently. Remove
these allowed instance states on swap_volume:

suspended, stopped, soft_deleted

Change-Id: Iff17f7cee7a56037b35d1a361a0b3279d0a885d6
Closes-Bug: #1673090
2017-10-26 11:14:24 +00:00
Jenkins
296c214ed0 Merge "Fix parameters and description for os-volume_attachments" 2017-07-13 01:13:31 +00:00
zhangdaolong
7cb913077f Fix parameters and description for os-volume_attachments
Now the code implementation for the api show and delete for
os-volume_attachments and the description of the document
does not match.

Change-Id: Ib15532d628713d771a835e9825a1c699a7ea4fcb
2017-07-06 13:34:14 +08: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
Jenkins
88bc8dc5ce Merge "api-ref: fix description of volumeAttachment for attach/swap-volume" 2017-03-31 19:30:48 +00:00
ghanshyam
49cade591f Fix 'server' and 'instance' occurrence in api-ref
some api-ref have sentence like '..for a server instance'
which is inconsistent and confusing as we use server for VM terminology.
I think here 'instance' word is being considered object of server which
is wrong.

We should always mention server only.

part of bp:api-ref-in-rst-pike

Change-Id: I32afe56cfc66b34b76d1f7e1b507d3d5e722e6a1
2017-03-28 02:54:11 +00:00
Matt Riedemann
dbd1efd744 api-ref: fix description of volumeAttachment for attach/swap-volume
The description of the volumeAttachment request parameter was actually
the description of the response parameter, which included more fields
than we allow on the POST and PUT requests for os-volume_attachments.

This fixes the descriptions for both POST and PUT and also includes a
tiny fix for the wording on the existing volumeAttachment parameter.

Change-Id: I4ccd4ac12e24b232925875fdb5fb568c2bfaf417
Closes-Bug: #1675536
2017-03-23 16:00:46 -04:00
Diana Clarke
fdba403d09 Add offset & limit docs & tests
A number of endpoints enable pagination via 'limit' & 'offset' query
parameters, but don't document or test this functionality.

 - os-cells
 - os-security-groups
 - os-server-groups
 - os-snapshots
 - os-virtual-interfaces
 - os-volume-attachments
 - os-volumes

Change-Id: I5b0ad25f7282f4a13bbb6f21b76e986e1008936a
2017-02-02 12:28:06 -05:00
Takashi NATSUME
6ab20bc523 api-ref: Fix 'id' (attachment_id) parameters
At first, the 'attachment_id_resp' in parameters.yaml was defined
as 'required' in I3789a4ad36e30728024f2aa122403b0e53b1e741
for os-volume_attachments.inc.
Then it was changed to 'optional' in
I0c1d183c5aaf6fb796be30fa5627bd5644ea689f
for os-volumes.inc.
So currently 'id' (attachment_id) parameters in
os-volume_attachments.inc are wrong.
They should be 'required'. So fix them.

Change-Id: I403a9eb1b08a840cbb2b82cb37f1b49c6edb87c9
Closes-Bug: #1608842
2016-12-13 06:18:05 +00:00
Jenkins
c2341b5112 Merge "Add description for v2.20 changes in api-ref" 2016-09-19 14:16:22 +00:00
stewie925
2b4ac81cf8 Body Verification of api-ref os-volume-attachments.inc
This patch verifies that the title and introductory description 
that precedes each rest method clearly reflects the context of the 
respective rest method.  Thus no changes are necessary - the
'body verification' tag is removed for this commit.

part of bp:api-ref-in-rst

Change-Id: I61cfdb5a0b8f8e1d8d60bd306c4952f2bc9ec537
2016-09-14 16:16:26 +00:00
jichenjc
a4c86804e6 Add description for v2.20 changes in api-ref
v2.20 allows shelved and shelve_offload instance to attach and
detach volume, add descriptions for that

Implements: blueprint api-ref-in-rst-ocata
Change-Id: Ib1349c2ef9d69cfc74212fd48ff10f913a5ce134
2016-09-10 05:23:01 +08:00
Sean Dague
c9f5ad3bcf remove /v2.1/{tenant_id} from all urls
As discussed at summit, the version part of the URL is not really
relevant, or a thing a user should be filling out themselves, this
should instead be set by the service catalog and extracted from the
token.

This removes it's reference in all documented REST urls, and adds a
new section describing how one gets the base URL for all calls.

Change-Id: I4306b8c3de0225e54f3909dd8a1fb293c4e5944c
2016-06-03 08:47:33 -04:00
Takashi NATSUME
79f030f18f api-ref: Example verification for os-volume_attachments.inc
Change-Id: I1f5ba0453b0dc964f48471e4aecaaaa800699da1
Implements: blueprint api-ref-in-rst
2016-05-13 14:38:53 +00:00
Takashi NATSUME
05b0da8062 api-ref: Parameter verification for os-volume_attachments.inc
Change-Id: I3789a4ad36e30728024f2aa122403b0e53b1e741
Implements: blueprint api-ref-in-rst
2016-05-13 14:38:13 +00:00
Takashi NATSUME
8bb1081fe3 api-ref: Method verification for os-volume_attachments.inc
Change-Id: I560908b28c1193622ee6e042322024fc6d0df5d6
Implements: blueprint api-ref-in-rst
2016-05-12 10:14:07 +09:00
Sean Dague
d929b9fc76 add tags to files for the content verification phase
This adds a set of tags in comments to the beginning of files so that
we can process them according to the documentation here:
https://wiki.openstack.org/wiki/NovaAPIRef

Part of bp:api-ref-in-rst

Change-Id: I17cf584dafb5bd969c12f51b7e7185d92365bf93
2016-04-20 16:21:58 -04:00
Sean Dague
d4e2771440 Import RST files for documentation
This is the results of the RST conversion from WADL. It creates a
single index plus a bunch of included files which represent sections
of the API document. This is the starting point for fixing the
documentation.

Change-Id: I7d561c2ecdcd864172dedb54a551f17ad3bdfe26
2016-04-13 07:34:45 -04:00