Merge "Add set/unset volume image metadata"
This commit is contained in:
commit
167a3c8135
@ -37,7 +37,7 @@
|
||||
A volume is a detachable block storage device similar to a USB
|
||||
hard drive. You can attach a volume to one instance at a time.
|
||||
</para>
|
||||
<para>When you create, list, update, extend, or delete volumes, the possible status
|
||||
<para>When you create, list, update, or delete volumes, the possible status
|
||||
values are:</para>
|
||||
<table rules="all" frame="border">
|
||||
<caption>Volume statuses</caption>
|
||||
@ -117,9 +117,21 @@
|
||||
<wadl:method href="#updateVolume"/>
|
||||
<wadl:method href="#deleteVolume"/>
|
||||
</wadl:resource>
|
||||
</wadl:resources>
|
||||
</section>
|
||||
<section xml:id="volume-api-v2-volumes-actions">
|
||||
<title>Volume actions</title>
|
||||
<para>
|
||||
Performs actions for a specified volume. Extends the size, resets
|
||||
statuses for, sets image metadata, or removes image metadata from
|
||||
a volume.
|
||||
</para>
|
||||
<wadl:resources xmlns:wadl="http://wadl.dev.java.net/2009/02">
|
||||
<wadl:resource href="../wadls/volume-api/src/v2/volume-api-v2.wadl#volume-action">
|
||||
<wadl:method href="#extendVolume"/>
|
||||
<wadl:method href="#resetVolume"/>
|
||||
<wadl:method href="#setVolumeimagemetadata"/>
|
||||
<wadl:method href="#unsetVolumeimagemetadata"/>
|
||||
</wadl:resource>
|
||||
</wadl:resources>
|
||||
</section>
|
||||
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"os-set_image_metadata": {
|
||||
"metadata": {
|
||||
"image_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
|
||||
"image_name": "image",
|
||||
"kernel_id": "155d900f-4e14-4e4c-a73d-069cbf4541e6",
|
||||
"ramdisk_id": "somedisk"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"os-unset_image_metadata": {
|
||||
"key": "ramdisk_id"
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- (C) 2012-2014 OpenStack Foundation, All Rights Reserved -->
|
||||
<!-- (C) 2012-2015 OpenStack Foundation, All Rights Reserved -->
|
||||
<!DOCTYPE application [
|
||||
<!ENTITY % common SYSTEM "common.ent">
|
||||
%common;
|
||||
@ -12,14 +12,6 @@
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:json="http://json-schema.org/schema#"
|
||||
xmlns:wadl="http://wadl.dev.java.net/2009/02">
|
||||
<!-- <grammars>
|
||||
<include href="grammar/requests/create-volume.json"/>
|
||||
<include href="grammar/requests/update-volume.json"/>
|
||||
<include href="grammar/requests/create-volume-type.json"/>
|
||||
<include href="grammar/requests/create-snapshot.json"/>
|
||||
<include href="grammar/requests/update-snapshot.json"/>
|
||||
<include href="grammar/requests/update-snapshot-metadata.json"/>
|
||||
</grammars> -->
|
||||
<resources base="https://volume.example.com/" xml:id="volume-v2">
|
||||
<resource id="versions" path="//">
|
||||
<method href="#listVersions"/>
|
||||
@ -73,6 +65,8 @@
|
||||
id="volume-action">
|
||||
<method href="#extendVolume"/>
|
||||
<method href="#resetVolume"/>
|
||||
<method href="#setVolumeimagemetadata"/>
|
||||
<method href="#unsetVolumeimagemetadata"/>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
@ -459,7 +453,8 @@
|
||||
title="Extend volume">
|
||||
<para role="shortdesc">
|
||||
Extends the size of a specified volume to a new size requested
|
||||
in gibibytes (GiB).
|
||||
in gibibytes (GiB). Specify the <code>os-extend</code> action
|
||||
in the request body.
|
||||
</para>
|
||||
<para>Preconditions</para>
|
||||
<itemizedlist>
|
||||
@ -494,7 +489,11 @@
|
||||
<param name="new_size" style="plain"
|
||||
type="xsd:int" required="true">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||
xml:lang="EN"><para>The new size, in gibibytes (GiB), of the volume.</para></wadl:doc>
|
||||
xml:lang="EN">
|
||||
<para>
|
||||
The new size, in gibibytes (GiB), of the volume.
|
||||
</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
</representation>
|
||||
</request>
|
||||
@ -504,7 +503,9 @@
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
||||
title="Reset volume statuses">
|
||||
<para role="shortdesc">
|
||||
Resets the volume status, volume attach status, and volume migration status.
|
||||
Resets the status, attach status, and migration status for a
|
||||
specified volume. Specify the <code>os-reset_status</code>
|
||||
action in the request body.
|
||||
</para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
@ -534,6 +535,85 @@
|
||||
</request>
|
||||
<response status="202"/>
|
||||
</method>
|
||||
<method name="POST" id="setVolumeimagemetadata">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
||||
title="Set image metadata for volume">
|
||||
<para role="shortdesc">
|
||||
Sets the image metadata for a specified volume. Specify the
|
||||
<code>os-set_image_metadata</code> action in the request body.
|
||||
</para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<representation mediaType="application/json">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||
xml:lang="EN">
|
||||
<xsdxt:code
|
||||
href="api_samples/volume_set_image_metadata_request.json"
|
||||
/>
|
||||
</wadl:doc>
|
||||
<param name="os-set_image_metadata" style="plain"
|
||||
type="xsd:string" required="true">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||
xml:lang="EN">
|
||||
<para>
|
||||
The <code>os-set_image_metadata</code> action.
|
||||
</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="metadata" style="plain"
|
||||
type="xsd:string" required="true">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||
xml:lang="EN">
|
||||
<para>
|
||||
The image metadata to add to the volume as a set
|
||||
of metadata key and value pairs.
|
||||
</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="202"/>
|
||||
</method>
|
||||
<method name="POST" id="unsetVolumeimagemetadata">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
||||
title="Remove image metadata from volume">
|
||||
<para role="shortdesc">
|
||||
Removes image metadata, by key, from a specified volume.
|
||||
Specify the <code>os-unset_image_metadata</code> action in the
|
||||
request body and the <code>key</code> for the metadata key and
|
||||
value pair that you want to remove.
|
||||
</para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<representation mediaType="application/json">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||
xml:lang="EN">
|
||||
<xsdxt:code
|
||||
href="api_samples/volume_unset_image_metadata_request.json"
|
||||
/>
|
||||
</wadl:doc>
|
||||
<param name="os-unset_image_metadata" style="plain"
|
||||
type="xsd:string" required="true">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||
xml:lang="EN">
|
||||
<para>
|
||||
The <code>os-os-unset_image_metadata</code> action.
|
||||
</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="key" style="plain"
|
||||
type="xsd:string" required="true">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||
xml:lang="EN">
|
||||
<para>
|
||||
The metadata key name for the metadata that you want to remove.
|
||||
</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="202"/>
|
||||
</method>
|
||||
<method name="GET" id="getVolumeTypes">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
||||
title="List volume types">
|
||||
|
Loading…
x
Reference in New Issue
Block a user