320 lines
14 KiB
XML
320 lines
14 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- (C) 2011-2016 OpenStack Foundation, All Rights Reserved -->
|
|
<!--*******************************************************-->
|
|
<!-- Import Common XML Entities -->
|
|
<!-- -->
|
|
<!-- You can resolve the entities with xmllint -->
|
|
<!-- -->
|
|
<!-- xmllint -noent os-volume-attachments-v2.1.wadl -->
|
|
<!--*******************************************************-->
|
|
<!DOCTYPE application [
|
|
<!ENTITY % common SYSTEM "../common.ent">
|
|
%common;
|
|
<!ENTITY % common_project SYSTEM "../../../../common_project.ent">
|
|
%common_project;
|
|
]>
|
|
<application xmlns="http://wadl.dev.java.net/2009/02"
|
|
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
|
|
xmlns:wadl="http://wadl.dev.java.net/2009/02"
|
|
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
xmlns:csapi="http://docs.openstack.org/identity/api/v3"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<grammars>
|
|
<include href="../xsd/api.xsd"/>
|
|
<include href="../xsd/api-common.xsd"/>
|
|
</grammars>
|
|
<resources base="https://servers.api.openstack.com"
|
|
xml:id="os-volume-attachments-v2.1">
|
|
<resource id="version" type="#VersionDetails" path="//v2.1">
|
|
<resource id="tenant_id" path="{tenant_id}">
|
|
&tenant_idTemplateParameter;
|
|
<resource id="Servers" path="servers">
|
|
<resource path="{server_id}" id="server_id">
|
|
&server_idTemplateParameter;
|
|
<resource path="os-volume_attachments"
|
|
type="#Volumes" id="os-volume-attachments">
|
|
<resource path="{attachment_id}"
|
|
type="#VolumeAttachmentList"
|
|
id="attachment_id">
|
|
&attachment_idTemplateParameter;
|
|
</resource>
|
|
</resource>
|
|
</resource>
|
|
</resource>
|
|
</resource>
|
|
</resource>
|
|
</resources>
|
|
<!--*******************************************************-->
|
|
<!-- Resource Types -->
|
|
<!--*******************************************************-->
|
|
<resource_type id="Volumes">
|
|
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
|
title="Volume attachment list">
|
|
<para>
|
|
A list of volume attachments that are associated with a
|
|
server.
|
|
</para>
|
|
</wadl:doc>
|
|
<method href="#attachVolume"/>
|
|
<method href="#listVolumeAttachments"/>
|
|
</resource_type>
|
|
<resource_type id="VolumeAttachmentList">
|
|
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
|
title="Volume attachment list">
|
|
<para>
|
|
A list of volume attachments that are associated with a
|
|
server.
|
|
</para>
|
|
</wadl:doc>
|
|
<method href="#getVolumeAttachmentDetails"/>
|
|
<method href="#deleteVolumeAttachment"/>
|
|
</resource_type>
|
|
|
|
<!--*******************************************************-->
|
|
<!-- All Methods -->
|
|
<!--****************************************************** -->
|
|
<!-- Volume Actions -->
|
|
<method name="POST" id="attachVolume">
|
|
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
|
title="Attach volume to server">
|
|
<para role="shortdesc">
|
|
Attaches a volume to a server.
|
|
</para>
|
|
<para>Preconditions</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
You can attach a volume to a server with an
|
|
<code>ACTIVE</code>, <code>PAUSED</code>,
|
|
<code>SHUTOFF</code>, <code>VERIFY_RESIZE</code>, or
|
|
<code>SOFT_DELETED</code> status.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
You can attach a volume to a server with a status that
|
|
is not locked.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
You can attach a volume with a <code>available</code> status.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
You can attach a volume when its volume type supports
|
|
volume attaching.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<para>Asynchronous Postconditions</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
After successfully attaching a volume to a server, the
|
|
volume status changes to <code>in-use</code>.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
You can see the attached volume when you
|
|
log in to the server.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<para>Troubleshooting</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
If the volume status remains in <code>available</code>
|
|
state, the request failed. Ensure that you meet the
|
|
preconditions and run the request again. If the
|
|
request fails again, investigate the server and the
|
|
volume status.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</wadl:doc>
|
|
<request>
|
|
<representation mediaType="application/json">
|
|
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
|
xml:lang="EN">
|
|
<xsdxt:code
|
|
href="../samples/os-volumes/attach-volume-to-server-request.json"
|
|
/>
|
|
</wadl:doc>
|
|
<param name="volumeAttachment" style="template"
|
|
type="xsd:dict">
|
|
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
|
xml:lang="EN">
|
|
<para>
|
|
A dictionary representation of a volume
|
|
attachment.
|
|
</para>
|
|
</wadl:doc>
|
|
</param>
|
|
<param name="volumeId" style="template"
|
|
type="csapi:UUID">
|
|
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
|
xml:lang="EN">
|
|
<para>
|
|
The UUID of the volume to attach.
|
|
</para>
|
|
</wadl:doc>
|
|
</param>
|
|
<param name="device" style="template"
|
|
type="xsd:string">
|
|
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
|
xml:lang="EN">
|
|
<para>
|
|
Name of the device such as, <code>/dev/vdb</code>. Omit or set this
|
|
parameter to null for auto-assignment, if supported. If you specify
|
|
this parameter, the device must not exist in the guest operating system.
|
|
</para>
|
|
</wadl:doc>
|
|
</param>
|
|
</representation>
|
|
</request>
|
|
<response status="202">
|
|
<representation mediaType="application/json">
|
|
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
|
xml:lang="EN">
|
|
<xsdxt:code
|
|
href="../samples/os-volumes/attach-volume-to-server-response.json"
|
|
/>
|
|
</wadl:doc>
|
|
</representation>
|
|
</response> &commonFaults; &getFaults;
|
|
<!-- Common, GET, postput, inProgress Faults--> &commonFaults;
|
|
&getFaults; &postPutFaults; &inProgressFault; </method>
|
|
<method name="GET" id="listVolumeAttachments">
|
|
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
|
title="List volume attachments">
|
|
<para role="shortdesc">
|
|
Lists the volume attachments for a server.
|
|
</para>
|
|
</wadl:doc>
|
|
<request>
|
|
<representation mediaType="application/json"
|
|
element="csapi:attachvolume"/>
|
|
</request>
|
|
<response status="202">
|
|
<representation mediaType="application/json">
|
|
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
|
xml:lang="EN">
|
|
<xsdxt:code
|
|
href="../samples/os-volumes/list-volume-attachments-resp.json"
|
|
/>
|
|
</wadl:doc>
|
|
</representation>
|
|
</response> &commonFaults; &getFaults;
|
|
<!-- Common, GET, postput, inProgress Faults--> &commonFaults;
|
|
&getFaults; &postPutFaults; &inProgressFault; </method>
|
|
<method name="GET" id="getVolumeAttachmentDetails">
|
|
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
|
title="Show volume attachment details">
|
|
<para role="shortdesc">
|
|
Shows details for a volume attachment.
|
|
</para>
|
|
<para>Preconditions</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
The volume must be attached to the server.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</wadl:doc>
|
|
<request>
|
|
<representation mediaType="application/json"
|
|
element="csapi:attachvolume"/>
|
|
</request>
|
|
<response status="202">
|
|
<representation mediaType="application/json">
|
|
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
|
xml:lang="EN">
|
|
<xsdxt:code
|
|
href="../samples/os-volumes/volume-attachment-detail-response.json"
|
|
/>
|
|
</wadl:doc>
|
|
</representation>
|
|
</response> &commonFaults; &getFaults;
|
|
<!-- Common, GET, postput, inProgress Faults--> &commonFaults;
|
|
&getFaults; &postPutFaults; &inProgressFault; </method>
|
|
<method name="DELETE" id="deleteVolumeAttachment">
|
|
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
|
title="Detach volume">
|
|
<para role="shortdesc">
|
|
Detaches a volume from a server.
|
|
</para>
|
|
<para>Preconditions</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
The volume must be attached to the server.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
You can detach a volume when the server
|
|
status is <code>ACTIVE</code>, <code>PAUSED</code>,
|
|
<code>SHUTOFF</code>, <code>VERIFY_RESIZE</code>, or
|
|
<code>SOFT_DELETED</code>.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
You can detach a volume when its status
|
|
is <code>in-use</code>.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
You can detach a volume from a server with
|
|
a status that is not locked.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
You cannot detach a root device volume.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<para>Asynchronous Postconditions</para>
|
|
<itemizedlist>
|
|
<listitem><para>After successfully detaching a volume,
|
|
its status changes to <code>available</code>.
|
|
</para></listitem>
|
|
<listitem><para>The detached volume is no longer visible on
|
|
the server.</para></listitem>
|
|
</itemizedlist>
|
|
<para>Troubleshooting</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
If the volume status remains in <code>available</code>
|
|
state, the request failed. Ensure that you meet the
|
|
preconditions and run the request again. If the
|
|
request fails again, investigate whether another
|
|
operation is running that causes a race condition.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
If you attempt to detach a root device volume, this
|
|
operation returns the <code>Forbidden (403)</code>
|
|
response code.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</wadl:doc>
|
|
<request>
|
|
<representation mediaType="application/json"
|
|
element="csapi:attachvolume"/>
|
|
</request>
|
|
<response status="202"/>
|
|
<!-- Common, GET, postput, inProgress Faults--> &commonFaults;
|
|
&getFaults; &postPutFaults; &inProgressFault; </method>
|
|
</application>
|