WADL to RST migration in cinder tree

This patch is for converting API Reference to RST and host it
in the Cinder tree.
This patch contains all the RST for cinder to bring over to their
repos to begin building API reference information from within.
This contains .inc files which have all the contents of the .rst files
but are grouped together for easier editing

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.

Cleaning task will be done once this part is merged.

As we have removed XML API support in Newton release, we need to
remove XML from API reference as well.

But we still have installations which are using XML.
So implementation plan is to first merge this patch in Newton release
keeping XML for now, then I will backport same to stable branches.
After that I will remove same from Newton release to match API
reference with actual API implementation.

Implements: bp api-reference-to-rst
Change-Id: I865ac922538bfa5bd45c24eb4bc49f5e966dc811
This commit is contained in:
Sheel Rana 2016-05-13 00:33:12 +05:30
parent 73868becf3
commit 8659ff0ef5
241 changed files with 11232 additions and 0 deletions

3
.gitignore vendored
View File

@ -31,5 +31,8 @@ tags
# Files created by Sphinx build
doc/build
#Files created for API reference
api-ref/build
# Files created by releasenotes build
releasenotes/build

0
api-ref/ext/__init__.py Normal file
View File

View File

@ -0,0 +1,352 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""This provides a sphinx extension able to create the HTML needed
for the api-ref website.
It contains 2 new stanzas.
.. rest_method:: GET /foo/bar
Which is designed to be used as the first stanza in a new section to
state that section is about that REST method. During processing the
rest stanza will be reparented to be before the section in question,
and used as a show/hide selector for it's details.
.. rest_parameters:: file.yaml
- name1: name_in_file1
- name2: name_in_file2
- name3: name_in_file3
Which is designed to build structured tables for either response or
request parameters. The stanza takes a value which is a file to lookup
details about the parameters in question.
The contents of the stanza are a yaml list of key / value pairs. The
key is the name of the parameter to be shown in the table. The value
is the key in the file.yaml where all other metadata about the
parameter will be extracted. This allows for reusing parameter
definitions widely in API definitions, but still providing for control
in both naming and ordering of parameters at every declaration.
"""
from docutils import nodes
from docutils.parsers.rst.directives.tables import Table
from docutils.statemachine import ViewList
from sphinx.util.compat import Directive
import six
import yaml
def full_name(cls):
return cls.__module__ + '.' + cls.__name__
class rest_method(nodes.Part, nodes.Element):
"""rest_method custom node type
We specify a custom node type for rest_method so that we can
accumulate all the data about the rest method, but not render as
part of the normal rendering process. This means that we need a
renderer for every format we wish to support with this.
"""
pass
class rest_expand_all(nodes.Part, nodes.Element):
pass
class RestExpandAllDirective(Directive):
has_content = True
def run(self):
return [rest_expand_all()]
class RestMethodDirective(Directive):
# this enables content in the directive
has_content = True
def run(self):
lineno = self.state_machine.abs_line_number()
target = nodes.target()
section = nodes.section(classes=["detail-control"])
node = rest_method()
method, sep, url = self.content[0].partition(' ')
node['method'] = method
node['url'] = url
node['target'] = self.state.parent.attributes['ids'][0]
temp_target = "%s-selector" % node['target']
target = nodes.target(ids=[temp_target])
self.state.add_target(temp_target, '', target, lineno)
section += node
return [target, section]
class RestParametersDirective(Table):
headers = ["Name", "In", "Type", "Description"]
def yaml_from_file(self, fpath):
"""Collect Parameter stanzas from inline + file.
This allows use to reference an external file for the actual
parameter definitions.
"""
try:
with open(fpath, 'r') as stream:
lookup = yaml.load(stream)
except IOError:
self.env.warn(
self.env.docname,
"Parameters file %s not found" % fpath)
return
except yaml.YAMLError as exc:
self.app.warn(exc)
raise
content = "\n".join(self.content)
parsed = yaml.load(content)
new_content = list()
for paramlist in parsed:
for name, ref in paramlist.items():
if ref in lookup:
new_content.append((name, lookup[ref]))
else:
self.env.warn(
"%s:%s " % (
self.state_machine.node.source,
self.state_machine.node.line),
("No field definition for ``%s`` found in ``%s``. "
" Skipping." % (ref, fpath)))
self.yaml = new_content
def run(self):
self.env = self.state.document.settings.env
self.app = self.env.app
# Make sure we have some content, which should be yaml that
# defines some parameters.
if not self.content:
error = self.state_machine.reporter.error(
'No parameters defined',
nodes.literal_block(self.block_text, self.block_text),
line=self.lineno)
return [error]
if not len(self.arguments) >= 1:
self.state_machine.reporter.error(
'No reference file defined',
nodes.literal_block(self.block_text, self.block_text),
line=self.lineno)
return [error]
rel_fpath, fpath = self.env.relfn2path(self.arguments.pop())
self.yaml_file = fpath
self.yaml_from_file(self.yaml_file)
self.max_cols = len(self.headers)
self.options['widths'] = (20, 10, 10, 60)
self.col_widths = self.get_column_widths(self.max_cols)
# Actually convert the yaml
title, messages = self.make_title()
table_node = self.build_table()
self.add_name(table_node)
if title:
table_node.insert(0, title)
return [table_node] + messages
def get_rows(self, table_data):
rows = []
groups = []
trow = nodes.row()
entry = nodes.entry()
para = nodes.paragraph(text=six.text_type(table_data))
entry += para
trow += entry
rows.append(trow)
return rows, groups
# Add a column for a field. In order to have the RST inside
# these fields get rendered, we need to use the
# ViewList. Note, ViewList expects a list of lines, so chunk
# up our content as a list to make it happy.
def add_col(self, value):
entry = nodes.entry()
result = ViewList(value.split('\n'))
self.state.nested_parse(result, 0, entry)
return entry
def show_no_yaml_error(self):
trow = nodes.row(classes=["no_yaml"])
trow += self.add_col("No yaml found %s" % self.yaml_file)
trow += self.add_col("")
trow += self.add_col("")
trow += self.add_col("")
return trow
def collect_rows(self):
rows = []
groups = []
try:
for key, values in self.yaml:
min_version = values.get('min_version', '')
desc = values.get('description', '')
classes = []
if min_version:
desc += ("\n\n**New in version %s**\n" % min_version)
min_ver_css_name = ("rp_min_ver_" +
str(min_version).replace('.', '_'))
classes.append(min_ver_css_name)
trow = nodes.row(classes=classes)
name = key
if values.get('required', False) is False:
name += " (Optional)"
trow += self.add_col(name)
trow += self.add_col(values.get('in'))
trow += self.add_col(values.get('type'))
trow += self.add_col(desc)
rows.append(trow)
except AttributeError as exc:
if 'key' in locals():
self.app.warn("Failure on key: %s, values: %s. %s" %
(key, values, exc))
else:
rows.append(self.show_no_yaml_error())
return rows, groups
def build_table(self):
table = nodes.table()
tgroup = nodes.tgroup(cols=len(self.headers))
table += tgroup
tgroup.extend(
nodes.colspec(colwidth=col_width, colname='c' + str(idx))
for idx, col_width in enumerate(self.col_widths)
)
thead = nodes.thead()
tgroup += thead
row_node = nodes.row()
thead += row_node
row_node.extend(nodes.entry(h, nodes.paragraph(text=h))
for h in self.headers)
tbody = nodes.tbody()
tgroup += tbody
rows, groups = self.collect_rows()
tbody.extend(rows)
table.extend(groups)
return table
def rest_method_html(self, node):
tmpl = """
<div class="row operation-grp">
<div class="col-md-1 operation">
<a name="%(target)s" class="operation-anchor" href="#%(target)s">
<span class="glyphicon glyphicon-link"></span></a>
<span class="label label-success">%(method)s</span>
</div>
<div class="col-md-5">%(url)s</div>
<div class="col-md-5">%(desc)s</div>
<div class="col-md-1">
<button
class="btn btn-info btn-sm btn-detail"
data-target="#%(target)s-detail"
data-toggle="collapse"
id="%(target)s-detail-btn"
>detail</button>
</div>
</div>"""
self.body.append(tmpl % node)
raise nodes.SkipNode
def rest_expand_all_html(self, node):
tmpl = """
<div>
<div class=col-md-11></div>
<div class=col-md-1>
<button id="expand-all"
data-toggle="collapse"
class="btn btn-info btn-sm btn-expand-all"
>Show All</button>
</div>
</div>"""
self.body.append(tmpl % node)
raise nodes.SkipNode
def resolve_rest_references(app, doctree):
for node in doctree.traverse():
if isinstance(node, rest_method):
rest_node = node
rest_method_section = node.parent
rest_section = rest_method_section.parent
gp = rest_section.parent
# Added required classes to the top section
rest_section.attributes['classes'].append('api-detail')
rest_section.attributes['classes'].append('collapse')
# Pop the title off the collapsed section
title = rest_section.children.pop(0)
rest_node['desc'] = title.children[0]
# In order to get the links in the sidebar to be right, we
# have to do some id flipping here late in the game. The
# rest_method_section has basically had a dummy id up
# until this point just to keep it from colliding with
# it's parent.
rest_section.attributes['ids'][0] = (
"%s-detail" % rest_section.attributes['ids'][0])
rest_method_section.attributes['ids'][0] = rest_node['target']
# Pop the overall section into it's grand parent,
# right before where the current parent lives
idx = gp.children.index(rest_section)
rest_section.remove(rest_method_section)
gp.insert(idx, rest_method_section)
def setup(app):
app.add_node(rest_method,
html=(rest_method_html, None))
app.add_node(rest_expand_all,
html=(rest_expand_all_html, None))
app.add_directive('rest_parameters', RestParametersDirective)
app.add_directive('rest_method', RestMethodDirective)
app.add_directive('rest_expand_all', RestExpandAllDirective)
app.add_stylesheet('bootstrap.min.css')
app.add_stylesheet('api-site.css')
app.add_javascript('bootstrap.min.js')
app.add_javascript('api-site.js')
app.connect('doctree-read', resolve_rest_references)
return {'version': '0.1'}

View File

@ -0,0 +1,81 @@
tt.literal {
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
white-space: nowrap;
background-color: #f9f2f4;
border-radius: 4px;
}
/* bootstrap users blockquote for pull quotes, so they are much
larger, we need them smaller */
blockquote { font-size: 1em; }
pre {
display: block;
padding: 9.5px;
margin: 0 0 10px;
font-size: 13px;
line-height: 1.428571429;
color: #333;
word-break: break-all;
word-wrap: break-word;
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
}
tbody>tr:nth-child(odd)>td,
tbody>tr:nth-child(odd)>th {
background-color: #f9f9f9;
}
table>thead>tr>th, table>tbody>tr>th, table>tfoot>tr>th, table>thead>tr>td, table>tbody>tr>td, table>tfoot>tr>td {
padding: 8px;
line-height: 1.428571429;
vertical-align: top;
border-top: 1px solid #ddd;
}
td>p {
margin: 0 0 0.5em;
}
div.document {
width: 80% !important;
}
@media (max-width: 1200px) {
div.document {
width: 960px !important;
}
}
.operation-grp {
padding-top: 0.5em;
padding-bottom: 1em;
}
/* Ensure the method buttons and their links don't split lines when
the page is narrower */
.operation {
/* this moves the link icon into the gutter */
margin-left: -1.25em;
margin-right: 1.25em;
white-space: nowrap;
}
/* These make the links only show up on hover */
a.operation-anchor {
visibility: hidden;
}
.operation-grp:hover a.operation-anchor {
visibility: visible;
}
/* All tables for requests should be full width */
.api-detail table.docutils {
width: 100%;
}

View File

@ -0,0 +1,110 @@
(function() {
var pageCache;
$(document).ready(function() {
pageCache = $('.api-documentation').html();
// Show the proper JSON/XML example when toggled
$('.example-select').on('change', function(e) {
$(e.currentTarget).find(':selected').tab('show')
});
// Change the text on the expando buttons when appropriate
$('.api-detail')
.on('hide.bs.collapse', function(e) {
processButton(this, 'detail');
})
.on('show.bs.collapse', function(e) {
processButton(this, 'close');
});
var expandAllActive = true;
// Expand the world
$('#expand-all').click(function () {
if (expandAllActive) {
expandAllActive = false;
$('.api-detail').collapse('show');
$('#expand-all').attr('data-toggle', '');
$(this).text('Hide All');
} else {
expandAllActive = true;
$('.api-detail').collapse('hide');
$('#expand-all').attr('data-toggle', 'collapse');
$(this).text('Show All');
}});
// Wire up the search button
$('#search-btn').on('click', function(e) {
searchPage();
});
// Wire up the search box enter
$('#search-box').on('keydown', function(e) {
if (e.keyCode === 13) {
searchPage();
return false;
}
});
});
/**
* highlight terms based on the regex in the provided $element
*/
function highlightTextNodes($element, regex) {
var markup = $element.html();
// Do regex replace
// Inject span with class of 'highlighted termX' for google style highlighting
$element.html(markup.replace(regex, '>$1<span class="highlight">$2</span>$3<'));
}
function searchPage() {
$(".api-documentation").html(pageCache);
//make sure that all div's are expanded/hidden accordingly
$('.api-detail.in').each(function (e) {
$(this).collapse('hide');
});
var startTime = new Date().getTime(),
searchTerm = $('#search-box').val();
// The regex is the secret, it prevents text within tag declarations to be affected
var regex = new RegExp(">([^<]*)?(" + searchTerm + ")([^>]*)?<", "ig");
highlightTextNodes($('.api-documentation'), regex);
// Once we've highlighted the node, lets expand any with a search match in them
$('.api-detail').each(function () {
var $elem = $(this);
if ($elem.html().indexOf('<span class="highlight">') !== -1) {
$elem.collapse('show');
processButton($elem, 'close');
}
});
// log the results
if (console.log) {
console.log("search completed in: " + ((new Date().getTime()) - startTime) + "ms");
}
$('.api-detail')
.on('hide.bs.collapse', function (e) {
processButton(this, 'detail');
})
.on('show.bs.collapse', function (e) {
processButton(this, 'close');
});
}
/**
* Helper function for setting the text, styles for expandos
*/
function processButton(button, text) {
$('#' + $(button).attr('id') + '-btn').text(text)
.toggleClass('btn-info')
.toggleClass('btn-default');
}
})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

217
api-ref/v1/source/conf.py Normal file
View File

@ -0,0 +1,217 @@
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# cinder documentation build configuration file, created by
# sphinx-quickstart on Sat May 1 15:17:47 2010.
#
# This file is execfile()d with the current directory set to
# its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import os
import subprocess
import sys
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../../'))
sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('./'))
# -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'ext.rest_parameters',
'oslosphinx',
]
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#
# source_encoding = 'utf-8'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Cinder API Reference'
copyright = u'OpenStack Foundation'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
from cinder.version import version_info
# The full version, including alpha/beta/rc tags.
release = version_info.release_string()
# The short X.Y version.
version = version_info.version_string()
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
# today = ''
# Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%B %d, %Y'
# The reST default role (used for this markup: `text`) to use
# for all documents.
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = False
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for man page output ----------------------------------------------
# Grouping the document tree for man pages.
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
# html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
# html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# html_last_updated_fmt = '%b %d, %Y'
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
"-n1"]
html_last_updated_fmt = subprocess.Popen(
git_cmd, stdout=subprocess.PIPE).communicate()[0]
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
# html_additional_pages = {}
# If false, no module index is generated.
# html_use_modindex = True
# If false, no index is generated.
# html_use_index = True
# If true, the index is split into individual pages for each letter.
# html_split_index = False
# If true, links to the reST sources are added to the pages.
# html_show_sourcelink = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
# html_use_opensearch = ''
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = ''
# Output file base name for HTML help builder.
htmlhelp_basename = 'cinderdoc'
# -- Options for LaTeX output -------------------------------------------------
# The paper size ('letter' or 'a4').
# latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
# latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index', 'Cinder.tex', u'OpenStack Block Storage API Documentation',
u'OpenStack Foundation', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
# latex_use_parts = False
# Additional stuff for the LaTeX preamble.
# latex_preamble = ''
# Documents to append as an appendix to all manuals.
# latex_appendices = []
# If false, no module index is generated.
# latex_use_modindex = True

View File

@ -0,0 +1,13 @@
:tocdepth: 2
===============
Cinder API V1
===============
.. rest_expand_all::
.. include:: os-quota-sets-v1.inc
.. include:: volumes-v1-snapshots.inc
.. include:: volumes-v1-types.inc
.. include:: volumes-v1-versions.inc
.. include:: volumes-v1-volumes.inc

View File

@ -0,0 +1,402 @@
.. -*- rst -*-
====================================
Quota sets extension (os-quota-sets)
====================================
Administrators only, depending on policy settings.
Shows, updates, and deletes quotas for a tenant.
Show quota details for user
===========================
.. rest_method:: GET /v1/{tenant_id}/os-quota-sets/{tenant_id}/detail/{user_id}
Shows details for quotas for a tenant and user.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- user_id: user_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- limit: limit
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/user-quotas-show-detail-response.json
:language: javascript
Show default quotas
===================
.. rest_method:: GET /v1/{tenant_id}/os-quota-sets/defaults
Shows default quotas for a tenant.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-defaults-show-response.json
:language: javascript
Show quotas
===========
.. rest_method:: GET /v1/{tenant_id}/os-quota-sets/{tenant_id}
Shows quotas for a tenant.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- usage: usage
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-show-response.json
:language: javascript
Update quotas
=============
.. rest_method:: PUT /v1/{tenant_id}/os-quota-sets/{tenant_id}
Updates quotas for a tenant.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- id: id
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- injected_file_path_bytes: injected_file_path_bytes
- security_groups: security_groups
- tenant_id: tenant_id
Request Example
---------------
.. literalinclude:: ./samples/quotas-update-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-update-response.json
:language: javascript
Delete quotas
=============
.. rest_method:: DELETE /v1/{tenant_id}/os-quota-sets/{tenant_id}
Deletes quotas for a tenant so the quotas revert to default values.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Example
----------------
.. literalinclude:: ./samples/user-quotas-delete-response.json
:language: javascript
Show quotas for user
====================
.. rest_method:: GET /v1/{tenant_id}/os-quota-sets/{tenant_id}/{user_id}
Enables an admin user to show quotas for a tenant and user.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- user_id: user_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/user-quotas-show-response.json
:language: javascript
Update quotas for user
======================
.. rest_method:: POST /v1/{tenant_id}/os-quota-sets/{tenant_id}/{user_id}
Updates quotas for a tenant and user.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- id: id
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- injected_file_path_bytes: injected_file_path_bytes
- security_groups: security_groups
- tenant_id: tenant_id
- user_id: user_id
Request Example
---------------
.. literalinclude:: ./samples/user-quotas-update-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/user-quotas-update-response.json
:language: javascript
Delete quotas for user
======================
.. rest_method:: DELETE /v1/{tenant_id}/os-quota-sets/{tenant_id}/{user_id}
Deletes quotas for a user so that the quotas revert to default values.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- user_id: user_id
Response Example
----------------
.. literalinclude:: ./samples/user-quotas-delete-response.json
:language: javascript

View File

@ -0,0 +1,642 @@
# variables in header
x-openstack-request-id:
description: >
foo
in: header
required: false
type: string
# variables in path
snapshot_id_1:
description: |
The UUID of the snapshot.
in: path
required: false
type: string
tenant_id:
description: |
The UUID of the tenant in a multi-tenancy cloud.
in: path
required: false
type: string
user_id:
description: |
The user ID. Specify in the URI as
``user_id={user_id}``.
in: path
required: false
type: string
volume_id:
description: |
The UUID of the volume.
in: path
required: false
type: string
volume_type_id:
description: |
The UUID for an existing volume type.
in: path
required: false
type: string
# variables in query
usage:
description: |
Set to ``usage=true`` to show quota usage.
Default is ``false``.
in: query
required: false
type: boolean
# variables in body
attachments:
description: |
Instance attachment information. If this volume
is attached to a server instance, the attachments list includes
the UUID of the attached server, an attachment UUID, the name of
the attached host, if any, the volume UUID, the device, and the
device UUID. Otherwise, this list is empty.
in: body
required: true
type: array
availability_zone:
description: |
The availability zone.
in: body
required: false
type: string
availability_zone_1:
description: |
The availability zone.
in: body
required: true
type: string
bootable:
description: |
Enables or disables the bootable attribute. You
can boot an instance from a bootable volume.
in: body
required: true
type: boolean
consistencygroup_id:
description: |
The UUID of the consistency group.
in: body
required: false
type: string
consistencygroup_id_1:
description: |
The UUID of the consistency group.
in: body
required: true
type: string
cores:
description: |
The number of instance cores that are allowed for
each tenant.
in: body
required: true
type: integer
cores_1:
description: |
A ``cores`` object.
in: body
required: true
type: string
cores_2:
description: |
The number of instance cores that are allowed for
each tenant.
in: body
required: false
type: integer
created_at:
description: |
The date and time when the resource was created.
The date and time stamp format is `ISO 8601
<https://en.wikipedia.org/wiki/ISO_8601>`_:
::
CCYY-MM-DDThh:mm:ss±hh:mm
For example, ``2015-08-27T09:49:58-05:00``.
The ``±hh:mm`` value, if included, is the time zone as an offset
from UTC.
in: body
required: true
type: string
description:
description: |
The volume description.
in: body
required: false
type: string
description_1:
description: |
The volume description.
in: body
required: true
type: string
encrypted:
description: |
If true, this volume is encrypted.
in: body
required: true
type: boolean
extra_specs:
description: |
A set of key and value pairs that contains the
specifications for a volume type.
in: body
required: true
type: object
fixed_ips:
description: |
The number of fixed IP addresses that are allowed
for each tenant. Must be equal to or greater than the number of
allowed instances.
in: body
required: true
type: integer
fixed_ips_1:
description: |
A ``fixed_ips`` object.
in: body
required: true
type: string
fixed_ips_2:
description: |
The number of fixed IP addresses that are allowed
for each tenant. Must be equal to or greater than the number of
allowed instances.
in: body
required: false
type: integer
floating_ips:
description: |
The number of floating IP addresses that are
allowed for each tenant.
in: body
required: true
type: integer
floating_ips_1:
description: |
A ``floating_ips`` object.
in: body
required: true
type: string
floating_ips_2:
description: |
The number of floating IP addresses that are
allowed for each tenant.
in: body
required: false
type: integer
id:
description: |
The UUID of the volume.
in: body
required: true
type: string
id_1:
description: |
The ID for the quota set.
in: body
required: true
type: integer
id_2:
description: |
The ID for the quota set.
in: body
required: true
type: string
id_3:
description: |
The ID for the quota set.
in: body
required: false
type: integer
imageRef:
description: |
The UUID of the image from which you want to
create the volume. Required to create a bootable volume.
in: body
required: false
type: string
in_use:
description: |
The in use data size. Visible only if you set the
``usage=true`` query parameter.
in: body
required: false
type: string
in_use_1:
description: |
The number of items in use.
in: body
required: true
type: integer
injected_file_content_bytes:
description: |
The number of bytes of content that are allowed
for each injected file.
in: body
required: true
type: integer
injected_file_content_bytes_1:
description: |
An ``injected_file_content_bytes`` object.
in: body
required: true
type: string
injected_file_content_bytes_2:
description: |
The number of bytes of content that are allowed
for each injected file.
in: body
required: false
type: integer
injected_file_path_bytes:
description: |
The number of bytes that are allowed for each
injected file path.
in: body
required: true
type: integer
injected_file_path_bytes_1:
description: |
An ``injected_file_path_bytes`` object.
in: body
required: true
type: string
injected_file_path_bytes_2:
description: |
The number of bytes that are allowed for each
injected file path.
in: body
required: false
type: integer
injected_files:
description: |
The number of injected files that are allowed for
each tenant.
in: body
required: true
type: integer
injected_files_1:
description: |
An ``injected_files`` object.
in: body
required: true
type: string
injected_files_2:
description: |
The number of injected files that are allowed for
each tenant.
in: body
required: false
type: integer
instances:
description: |
The number of instances that are allowed for each
tenant.
in: body
required: true
type: integer
instances_1:
description: |
An ``instances`` object.
in: body
required: true
type: string
instances_2:
description: |
The number of instances that are allowed for each
tenant.
in: body
required: false
type: integer
key_pairs:
description: |
The number of key pairs that are allowed for each
user.
in: body
required: true
type: integer
key_pairs_1:
description: |
A ``key_pairs`` object.
in: body
required: true
type: string
key_pairs_2:
description: |
The number of key pairs that are allowed for each
user.
in: body
required: false
type: integer
limit:
description: |
The number of items permitted for this tenant.
in: body
required: true
type: integer
links:
description: |
The volume links.
in: body
required: true
type: array
metadata:
description: |
One or more metadata key and value pairs that are
associated with the volume.
in: body
required: false
type: object
metadata_1:
description: |
One or more metadata key and value pairs that are
associated with the volume.
in: body
required: true
type: object
metadata_2:
description: |
One or more metadata key and value pairs for the
snapshot.
in: body
required: false
type: object
metadata_items:
description: |
The number of metadata items that are allowed for
each instance.
in: body
required: true
type: integer
metadata_items_1:
description: |
A ``metadata_items`` object.
in: body
required: true
type: string
metadata_items_2:
description: |
The number of metadata items that are allowed for
each instance.
in: body
required: false
type: integer
migration_status:
description: |
The volume migration status.
in: body
required: true
type: string
multiattach:
description: |
To enable this volume to attach to more than one
server, set this value to ``true``. Default is ``false``.
in: body
required: false
type: boolean
multiattach_1:
description: |
If true, this volume can attach to more than one
instance.
in: body
required: true
type: boolean
name:
description: |
The name of the volume type.
in: body
required: true
type: string
name_1:
description: |
The volume name.
in: body
required: false
type: string
name_2:
description: |
The volume name.
in: body
required: true
type: string
quota_set:
description: |
A ``quota_set`` object.
in: body
required: true
type: object
quota_set_1:
description: |
A ``quota_set`` object.
in: body
required: true
type: string
ram:
description: |
The amount of instance RAM in megabytes that are
allowed for each tenant.
in: body
required: true
type: integer
ram_1:
description: |
A ``ram`` object.
in: body
required: true
type: string
ram_2:
description: |
The amount of instance RAM in megabytes that are
allowed for each tenant.
in: body
required: false
type: integer
replication_status:
description: |
The volume replication status.
in: body
required: true
type: string
reserved:
description: |
Reserved volume size. Visible only if you set the
``usage=true`` query parameter.
in: body
required: false
type: integer
reserved_1:
description: |
The number of reserved items.
in: body
required: true
type: integer
scheduler_hints:
description: |
The dictionary of data to send to the scheduler.
in: body
required: false
type: object
security_group_rules:
description: |
The number of rules that are allowed for each
security group.
in: body
required: false
type: integer
security_group_rules_1:
description: |
A ``security_group_rules`` object.
in: body
required: true
type: string
security_groups:
description: |
The number of security groups that are allowed
for each tenant.
in: body
required: true
type: integer
security_groups_1:
description: |
A ``security_groups`` object.
in: body
required: true
type: string
security_groups_2:
description: |
The number of security groups that are allowed
for each tenant.
in: body
required: false
type: integer
size:
description: |
The size of the volume, in gibibytes (GiB).
in: body
required: true
type: integer
snapshot:
description: |
A ``snapshot`` object.
in: body
required: true
type: object
snapshot_id:
description: |
To create a volume from an existing snapshot,
specify the UUID of the volume snapshot. The volume is created in
same availability zone and with same size as the snapshot.
in: body
required: false
type: string
snapshot_id_2:
description: |
The UUID of the source volume snapshot. The API
creates a new volume snapshot with the same size as the source
volume snapshot.
in: body
required: true
type: string
source_replica:
description: |
The UUID of the primary volume to clone.
in: body
required: false
type: string
source_volid:
description: |
The UUID of the source volume. The API creates a
new volume with the same size as the source volume.
in: body
required: false
type: string
source_volid_1:
description: |
The UUID of the source volume.
in: body
required: true
type: string
status:
description: |
The volume status.
in: body
required: true
type: string
updated_at:
description: |
The date and time when the resource was updated.
The date and time stamp format is `ISO 8601
<https://en.wikipedia.org/wiki/ISO_8601>`_:
::
CCYY-MM-DDThh:mm:ss±hh:mm
For example, ``2015-08-27T09:49:58-05:00``.
The ``±hh:mm`` value, if included, is the time zone as an offset
from UTC. In the previous example, the offset value is ``-05:00``.
If the ``updated_at`` date and time stamp is not set, its value is
``null``.
in: body
required: true
type: string
user_id_1:
description: |
The UUID of the user.
in: body
required: true
type: string
volume:
description: |
A ``volume`` object.
in: body
required: true
type: object
volume_type:
description: |
The volume type. To create an environment with
multiple-storage back ends, you must specify a volume type. Block
Storage volume back ends are spawned as children to ``cinder-
volume``, and they are keyed from a unique queue. They are named
``cinder- volume.HOST.BACKEND``. For example, ``cinder-
volume.ubuntu.lvmdriver``. When a volume is created, the scheduler
chooses an appropriate back end to handle the request based on the
volume type. Default is ``None``. For information about how to
use volume types to create multiple- storage back ends, see
`Configure multiple-storage back ends
<http://docs.openstack.org/admin-
guide/blockstorage_multi_backend.html>`_.
in: body
required: false
type: string
volume_type_1:
description: |
The volume type. In an environment with multiple-
storage back ends, the scheduler determines where to send the
volume based on the volume type. For information about how to use
volume types to create multiple- storage back ends, see `Configure
multiple-storage back ends <http://docs.openstack.org/admin-
guide/blockstorage_multi_backend.html>`_.
in: body
required: true
type: string
volumes:
description: |
A list of ``volume`` objects.
in: body
required: true
type: array

View File

@ -0,0 +1,17 @@
{
"quota_set": {
"cores": 20,
"fixed_ips": -1,
"floating_ips": 10,
"id": "fake_tenant",
"injected_file_content_bytes": 10240,
"injected_file_path_bytes": 255,
"injected_files": 5,
"instances": 10,
"key_pairs": 100,
"metadata_items": 128,
"ram": 51200,
"security_group_rules": 20,
"security_groups": 10
}
}

View File

@ -0,0 +1,15 @@
<?xml version='1.0' encoding='UTF-8'?>
<quota_set id="fake_tenant">
<cores>20</cores>
<fixed_ips>-1</fixed_ips>
<floating_ips>10</floating_ips>
<injected_file_content_bytes>10240</injected_file_content_bytes>
<injected_file_path_bytes>255</injected_file_path_bytes>
<injected_files>5</injected_files>
<instances>10</instances>
<key_pairs>100</key_pairs>
<metadata_items>128</metadata_items>
<ram>51200</ram>
<security_group_rules>20</security_group_rules>
<security_groups>10</security_groups>
</quota_set>

View File

@ -0,0 +1,17 @@
{
"quota_set": {
"cores": 20,
"fixed_ips": -1,
"floating_ips": 10,
"id": "fake_tenant",
"injected_file_content_bytes": 10240,
"injected_file_path_bytes": 255,
"injected_files": 5,
"instances": 10,
"key_pairs": 100,
"metadata_items": 128,
"ram": 51200,
"security_group_rules": 20,
"security_groups": 10
}
}

View File

@ -0,0 +1,15 @@
<?xml version='1.0' encoding='UTF-8'?>
<quota_set id="fake_tenant">
<cores>20</cores>
<fixed_ips>-1</fixed_ips>
<floating_ips>10</floating_ips>
<injected_file_content_bytes>10240</injected_file_content_bytes>
<injected_file_path_bytes>255</injected_file_path_bytes>
<injected_files>5</injected_files>
<instances>10</instances>
<key_pairs>100</key_pairs>
<metadata_items>128</metadata_items>
<ram>51200</ram>
<security_group_rules>20</security_group_rules>
<security_groups>10</security_groups>
</quota_set>

View File

@ -0,0 +1,5 @@
{
"quota_set": {
"security_groups": 45
}
}

View File

@ -0,0 +1,4 @@
<?xml version='1.0' encoding='UTF-8'?>
<quota_set id="fake_tenant">
<security_groups>45</security_groups>
</quota_set>

View File

@ -0,0 +1,16 @@
{
"quota_set": {
"cores": 20,
"fixed_ips": -1,
"floating_ips": 10,
"injected_file_content_bytes": 10240,
"injected_file_path_bytes": 255,
"injected_files": 5,
"instances": 10,
"key_pairs": 100,
"metadata_items": 128,
"ram": 51200,
"security_group_rules": 20,
"security_groups": 45
}
}

View File

@ -0,0 +1,15 @@
<?xml version='1.0' encoding='UTF-8'?>
<quota_set>
<cores>20</cores>
<fixed_ips>-1</fixed_ips>
<floating_ips>10</floating_ips>
<injected_file_content_bytes>10240</injected_file_content_bytes>
<injected_file_path_bytes>255</injected_file_path_bytes>
<injected_files>5</injected_files>
<instances>10</instances>
<key_pairs>100</key_pairs>
<metadata_items>128</metadata_items>
<ram>51200</ram>
<security_group_rules>20</security_group_rules>
<security_groups>45</security_groups>
</quota_set>

View File

@ -0,0 +1,8 @@
{
"snapshot": {
"display_name": "snap-001",
"display_description": "Daily backup",
"volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
"force": true
}
}

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<snapshot xmlns="http://docs.openstack.org/volume/api/v1"
name="snap-001" display_name="snap-001"
display_description="Daily backup"
volume_id="521752a6-acf6-4b2d-bc7a-119f9148cd8c"
force="true"/>

View File

@ -0,0 +1,16 @@
{
"snapshot": {
"status": "available",
"os-extended-snapshot-attributes:progress": "0%",
"description": null,
"created_at": "2014-05-06T17:59:52.000000",
"metadata": {
"key": "v1"
},
"volume_id": "ebd80b99-bc3d-4154-9d28-5583baa80580",
"os-extended-snapshot-attributes:project_id": "7e0105e19cd2466193729ef78b604f79",
"size": 10,
"id": "dfcd17fe-3b64-44ba-b95f-1c9c7109ef95",
"name": "my-snapshot"
}
}

View File

@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?>
<snapshot
xmlns:os-extended-snapshot-attributes="http://docs.openstack.org/volume/ext/extended_snapshot_attributes/api/v1"
status="available" description="None"
created_at="2014-05-06 17:59:52"
volume_id="ebd80b99-bc3d-4154-9d28-5583baa80580" size="10"
id="dfcd17fe-3b64-44ba-b95f-1c9c7109ef95" name="my-snapshot"
os-extended-snapshot-attributes:project_id="7e0105e19cd2466193729ef78b604f79"
os-extended-snapshot-attributes:progress="0%">
<metadata>
<meta key="key">v1</meta>
</metadata>
</snapshot>

View File

@ -0,0 +1,5 @@
{
"metadata": {
"key": "v1"
}
}

View File

@ -0,0 +1,4 @@
<?xml version='1.0' encoding='UTF-8'?>
<metadata>
<meta key="key">v1</meta>
</metadata>

View File

@ -0,0 +1,5 @@
{
"metadata": {
"key": "v1"
}
}

View File

@ -0,0 +1,4 @@
<?xml version='1.0' encoding='UTF-8'?>
<metadata xmlns="http://docs.openstack.org/compute/api/v1.1">
<meta key="key">v1</meta>
</metadata>

View File

@ -0,0 +1,11 @@
{
"snapshot": {
"id": "3fbbcccf-d058-4502-8844-6feeffdf4cb5",
"display_name": "snap-001",
"display_description": "Daily backup",
"volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
"status": "available",
"size": 30,
"created_at": "2012-02-29T03:50:07Z"
}
}

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<snapshot xmlns="http://docs.openstack.org/volume/api/v1"
id="3fbbcccf-d058-4502-8844-6feeffdf4cb5"
display_name="snap-001"
display_description="Daily backup"
volume_id="521752a6-acf6-4b2d-bc7a-119f9148cd8c"
status="available"
size="30"
created_at="2012-02-29T03:50:07Z" />

View File

@ -0,0 +1,26 @@
{
"snapshots": [
{
"id": "3fbbcccf-d058-4502-8844-6feeffdf4cb5",
"display_name": "snap-001",
"display_description": "Daily backup",
"volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
"status": "available",
"size": 30,
"created_at": "2012-02-29T03:50:07Z",
"metadata": {
"contents": "junk"
}
},
{
"id": "e479997c-650b-40a4-9dfe-77655818b0d2",
"display_name": "snap-002",
"display_description": "Weekly backup",
"volume_id": "76b8950a-8594-4e5b-8dce-0dfa9c696358",
"status": "available",
"size": 25,
"created_at": "2012-03-19T01:52:47Z",
"metadata": {}
}
]
}

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<snapshots xmlns="http://docs.openstack.org/volume/api/v1">
<snapshot id="3fbbcccf-d058-4502-8844-6feeffdf4cb5"
display_name="snap-001"
display_description="Daily backup"
volume_id="521752a6-acf6-4b2d-bc7a-119f9148cd8c"
status="available"
size="30"
created_at="2012-02-29T03:50:07Z">
<metadata>
<meta key="contents">junk</meta>
</metadata>
</snapshot>
<snapshot id="e479997c-650b-40a4-9dfe-77655818b0d2"
display_name="snap-002"
display_description="Weekly backup"
volume_id="76b8950a-8594-4e5b-8dce-0dfa9c696358"
status="available"
size="25"
created_at="2012-03-19T01:52:47Z" />
</snapshots>

View File

@ -0,0 +1,64 @@
{
"quota_set": {
"cores": {
"in_use": 0,
"limit": 20,
"reserved": 0
},
"fixed_ips": {
"in_use": 0,
"limit": -1,
"reserved": 0
},
"floating_ips": {
"in_use": 0,
"limit": 10,
"reserved": 0
},
"injected_files": {
"in_use": 0,
"limit": 5,
"reserved": 0
},
"instances": {
"in_use": 0,
"limit": 10,
"reserved": 0
},
"key_pairs": {
"in_use": 0,
"limit": 100,
"reserved": 0
},
"metadata_items": {
"in_use": 0,
"limit": 128,
"reserved": 0
},
"ram": {
"in_use": 0,
"limit": 51200,
"reserved": 0
},
"security_groups": {
"in_use": 0,
"limit": 10,
"reserved": 0
},
"injected_file_content_bytes": {
"in_use": 0,
"limit": 10240,
"reserved": 0
},
"injected_file_path_bytes": {
"in_use": 0,
"limit": 255,
"reserved": 0
},
"security_group_rules": {
"in_use": 0,
"limit": 20,
"reserved": 0
}
}
}

View File

@ -0,0 +1,17 @@
{
"quota_set": {
"cores": 20,
"fixed_ips": -1,
"floating_ips": 10,
"id": "fake_tenant",
"injected_file_content_bytes": 10240,
"injected_file_path_bytes": 255,
"injected_files": 5,
"instances": 10,
"key_pairs": 100,
"metadata_items": 128,
"ram": 51200,
"security_group_rules": 20,
"security_groups": 10
}
}

View File

@ -0,0 +1,15 @@
<?xml version='1.0' encoding='UTF-8'?>
<quota_set id="fake_tenant">
<cores>20</cores>
<fixed_ips>-1</fixed_ips>
<floating_ips>10</floating_ips>
<injected_file_content_bytes>10240</injected_file_content_bytes>
<injected_file_path_bytes>255</injected_file_path_bytes>
<injected_files>5</injected_files>
<instances>10</instances>
<key_pairs>100</key_pairs>
<metadata_items>128</metadata_items>
<ram>51200</ram>
<security_group_rules>20</security_group_rules>
<security_groups>10</security_groups>
</quota_set>

View File

@ -0,0 +1,6 @@
{
"quota_set": {
"force": true,
"instances": 9
}
}

View File

@ -0,0 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<quota_set id="fake_tenant">
<force>true</force>
<instances>9</instances>
</quota_set>

View File

@ -0,0 +1,16 @@
{
"quota_set": {
"cores": 20,
"floating_ips": 10,
"fixed_ips": -1,
"injected_file_content_bytes": 10240,
"injected_file_path_bytes": 255,
"injected_files": 5,
"instances": 9,
"key_pairs": 100,
"metadata_items": 128,
"ram": 51200,
"security_group_rules": 20,
"security_groups": 10
}
}

View File

@ -0,0 +1,15 @@
<?xml version='1.0' encoding='UTF-8'?>
<quota_set>
<cores>20</cores>
<floating_ips>10</floating_ips>
<fixed_ips>-1</fixed_ips>
<injected_file_content_bytes>10240</injected_file_content_bytes>
<injected_file_path_bytes>255</injected_file_path_bytes>
<injected_files>5</injected_files>
<instances>9</instances>
<key_pairs>100</key_pairs>
<metadata_items>128</metadata_items>
<ram>51200</ram>
<security_group_rules>20</security_group_rules>
<security_groups>10</security_groups>
</quota_set>

View File

@ -0,0 +1,28 @@
{
"version": {
"id": "v1.0",
"links": [
{
"href": "http://23.253.211.234:8776/v1/",
"rel": "self"
},
{
"href": "http://docs.openstack.org/",
"rel": "describedby",
"type": "text/html"
}
],
"media-types": [
{
"base": "application/xml",
"type": "application/vnd.openstack.volume+xml;version=1"
},
{
"base": "application/json",
"type": "application/vnd.openstack.volume+json;version=1"
}
],
"status": "DEPRECATED",
"updated": "2014-06-28T12:20:21Z"
}
}

View File

@ -0,0 +1,26 @@
{
"versions": [
{
"id": "v1.0",
"links": [
{
"href": "http://23.253.211.234:8776/v1/",
"rel": "self"
}
],
"status": "DEPRECATED",
"updated": "2014-06-28T12:20:21Z"
},
{
"id": "v2.0",
"links": [
{
"href": "http://23.253.211.234:8776/v2/",
"rel": "self"
}
],
"status": "CURRENT",
"updated": "2012-11-21T11:33:21Z"
}
]
}

View File

@ -0,0 +1,12 @@
{
"volume": {
"display_name": "vol-001",
"display_description": "Another volume.",
"size": 30,
"volume_type": "289da7f8-6440-407c-9fb4-7db01ec49164",
"metadata": {
"contents": "junk"
},
"availability_zone": "us-east1"
}
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<volume xmlns="http://docs.openstack.org/volume/api/v1"
display_name="vol-001"
display_description="Another volume."
size="30"
volume_type="289da7f8-6440-407c-9fb4-7db01ec49164"
availability_zone="us-east1">
<metadata>
<meta key="contents">junk</meta>
</metadata>
</volume>

View File

@ -0,0 +1,27 @@
{
"volume": {
"id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
"display_name": "vol-001",
"display_description": "Another volume.",
"status": "active",
"size": 30,
"volume_type": "289da7f8-6440-407c-9fb4-7db01ec49164",
"metadata": {
"contents": "junk"
},
"availability_zone": "us-east1",
"bootable": "false",
"snapshot_id": null,
"attachments": [
{
"attachment_id": "03987cd1-0ad5-40d1-9b2a-7cc48295d4fa",
"id": "47e9ecc5-4045-4ee3-9a4b-d859d546a0cf",
"volume_id": "6c80f8ac-e3e2-480c-8e6e-f1db92fe4bfe",
"server_id": "d1c4788b-9435-42e2-9b81-29f3be1cd01f",
"host_name": "mitaka",
"device": "/"
}
],
"created_at": "2012-02-14T20:53:07Z"
}
}

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<volume xmlns="http://docs.openstack.org/volume/api/v1"
id="521752a6-acf6-4b2d-bc7a-119f9148cd8c"
display_name="vol-001"
display_description="Another volume."
status="active"
size="30"
volume_type="289da7f8-6440-407c-9fb4-7db01ec49164"
availability_zone="us-east1"
bootable="false"
created_at="2012-02-14T20:53:07Z">
<metadata>
<meta key="contents">junk</meta>
</metadata>
</volume>

View File

@ -0,0 +1,8 @@
{
"volume_type": {
"name": "vol-type-001",
"extra_specs": {
"capabilities": "gpu"
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<volume_type xmlns="http://docs.openstack.org/volume/api/v1"
name="vol-type-001">
<extra_specs>
<extra_spec key="capabilities">gpu</extra_spec>
</extra_specs>
</volume_type>

View File

@ -0,0 +1,9 @@
{
"volume_type": {
"id": "289da7f8-6440-407c-9fb4-7db01ec49164",
"name": "vol-type-001",
"extra_specs": {
"capabilities": "gpu"
}
}
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<volume_type xmlns="http://docs.openstack.org/volume/api/v1"
id="289da7f8-6440-407c-9fb4-7db01ec49164"
name="vol-type-001">
<extra_specs>
<extra_spec key="capabilities">gpu</extra_spec>
</extra_specs>
</volume_type>

View File

@ -0,0 +1,16 @@
{
"volume_types": [
{
"id": "289da7f8-6440-407c-9fb4-7db01ec49164",
"name": "vol-type-001",
"extra_specs": {
"capabilities": "gpu"
}
},
{
"id": "96c3bda7-c82a-4f50-be73-ca7621794835",
"name": "vol-type-002",
"extra_specs": {}
}
]
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<volume_types xmlns="http://docs.openstack.org/volume/api/v1">
<volume_type id="289da7f8-6440-407c-9fb4-7db01ec49164"
name="vol-type-001">
<extra_specs>
<extra_spec key="capabilities">gpu</extra_spec>
</extra_specs>
</volume_type>
<volume_type id="96c3bda7-c82a-4f50-be73-ca7621794835"
name="vol-type-002" />
</volume_types>

View File

@ -0,0 +1,41 @@
{
"volumes": [
{
"id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
"display_name": "vol-001",
"display_description": "Another volume.",
"status": "active",
"size": 30,
"volume_type": "289da7f8-6440-407c-9fb4-7db01ec49164",
"metadata": {
"contents": "junk"
},
"availability_zone": "us-east1",
"snapshot_id": null,
"attachments": [
{
"attachment_id": "03987cd1-0ad5-40d1-9b2a-7cc48295d4fa",
"id": "47e9ecc5-4045-4ee3-9a4b-d859d546a0cf",
"volume_id": "6c80f8ac-e3e2-480c-8e6e-f1db92fe4bfe",
"server_id": "d1c4788b-9435-42e2-9b81-29f3be1cd01f",
"host_name": "mitaka",
"device": "/"
}
],
"created_at": "2012-02-14T20:53:07Z"
},
{
"id": "76b8950a-8594-4e5b-8dce-0dfa9c696358",
"display_name": "vol-002",
"display_description": "Yet another volume.",
"status": "active",
"size": 25,
"volume_type": "96c3bda7-c82a-4f50-be73-ca7621794835",
"metadata": {},
"availability_zone": "us-east2",
"snapshot_id": null,
"attachments": [],
"created_at": "2012-03-15T19:10:03Z"
}
]
}

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<volumes xmlns="http://docs.openstack.org/volume/api/v1">
<volume xmlns="http://docs.openstack.org/volume/api/v1"
id="521752a6-acf6-4b2d-bc7a-119f9148cd8c"
display_name="vol-001"
display_description="Another volume."
status="active"
size="30"
volume_type="289da7f8-6440-407c-9fb4-7db01ec49164"
availability_zone="us-east1"
created_at="2012-02-14T20:53:07Z">
<metadata>
<meta key="contents">junk</meta>
</metadata>
</volume>
<volume xmlns="http://docs.openstack.org/volume/api/v1"
id="76b8950a-8594-4e5b-8dce-0dfa9c696358"
display_name="vol-002"
display_description="Yet another volume."
status="active"
size="25"
volume_type="96c3bda7-c82a-4f50-be73-ca7621794835"
availability_zone="us-east2"
created_at="2012-03-15T19:10:03Z" />
</volumes>

View File

@ -0,0 +1,188 @@
.. -*- rst -*-
=========
Snapshots
=========
Creates, lists, shows information for, and deletes snapshots. Shows
and updates snapshot metadata.
Show snapshot details
=====================
.. rest_method:: GET /v1/{tenant_id}/snapshots/{snapshot_id}
Shows details for a snapshot.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- snapshot_id: snapshot_id
Response Example
----------------
.. literalinclude:: ./samples/snapshot-show-response.json
:language: javascript
Delete snapshot
===============
.. rest_method:: DELETE /v1/{tenant_id}/snapshots/{snapshot_id}
Deletes a snapshot.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- snapshot_id: snapshot_id
List snapshots with details
===========================
.. rest_method:: GET /v1/{tenant_id}/snapshots/detail
Lists all snapshots, with details.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Example
----------------
.. literalinclude:: ./samples/snapshots-list-response.json
:language: javascript
Create snapshot
===============
.. rest_method:: POST /v1/{tenant_id}/snapshots
Creates a snapshot.
Error response codes:201,
Request
-------
.. rest_parameters:: parameters.yaml
- snapshot: snapshot
- tenant_id: tenant_id
Request Example
---------------
.. literalinclude:: ./samples/snapshot-create-request.json
:language: javascript
List snapshots
==============
.. rest_method:: GET /v1/{tenant_id}/snapshots
Lists all snapshots.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Example
----------------
.. literalinclude:: ./samples/snapshots-list-response.json
:language: javascript
Show snapshot metadata
======================
.. rest_method:: GET /v1/{tenant_id}/snapshots/{snapshot_id}/metadata
Shows metadata for a snapshot.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- snapshot_id: snapshot_id
Response Example
----------------
.. literalinclude:: ./samples/snapshot-metadata-show-response.json
:language: javascript
Update snapshot metadata
========================
.. rest_method:: PUT /v1/{tenant_id}/snapshots/{snapshot_id}/metadata
Updates metadata for a snapshot.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- metadata: metadata
- tenant_id: tenant_id
- snapshot_id: snapshot_id
Request Example
---------------
.. literalinclude:: ./samples/snapshot-metadata-update-request.json
:language: javascript
Response Example
----------------
.. literalinclude:: ./samples/snapshot-metadata-update-response.json
:language: javascript

View File

@ -0,0 +1,218 @@
.. -*- rst -*-
============
Volume types
============
Lists, creates, updates, shows information for, and deletes volume
types.
List volume types
=================
.. rest_method:: GET /v1/{tenant_id}/types
Lists volume types.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Example
----------------
.. literalinclude:: ./samples/volume-types-list-response.json
:language: javascript
Create volume type
==================
.. rest_method:: POST /v1/{tenant_id}/types
Creates a volume type.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- extra_specs: extra_specs
- name: name
- volume_type: volume_type
- tenant_id: tenant_id
Request Example
---------------
.. literalinclude:: ./samples/volume-type-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- extra_specs: extra_specs
- name: name
- volume_type: volume_type
Response Example
----------------
.. literalinclude:: ./samples/volume-type-show-response.json
:language: javascript
Update volume type
==================
.. rest_method:: PUT /v1/{tenant_id}/types/{volume_type_id}
Updates a volume type.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- extra_specs: extra_specs
- name: name
- volume_type: volume_type
- tenant_id: tenant_id
- volume_type_id: volume_type_id
Request Example
---------------
.. literalinclude:: ./samples/volume-type-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- extra_specs: extra_specs
- name: name
- volume_type: volume_type
Response Example
----------------
.. literalinclude:: ./samples/volume-type-show-response.json
:language: javascript
Update extra specs for a volume type
====================================
.. rest_method:: PUT /v1/{tenant_id}/types/{volume_type_id}
Updates the extra specifications for a volume type.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- extra_specs: extra_specs
- name: name
- volume_type: volume_type
- tenant_id: tenant_id
- volume_type_id: volume_type_id
Request Example
---------------
.. literalinclude:: ./samples/volume-type-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- extra_specs: extra_specs
- name: name
- volume_type: volume_type
Response Example
----------------
.. literalinclude:: ./samples/volume-type-show-response.json
:language: javascript
Show volume type details
========================
.. rest_method:: GET /v1/{tenant_id}/types/{volume_type_id}
Shows details for a volume type.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- volume_type_id: volume_type_id
Response Example
----------------
.. literalinclude:: ./samples/volume-type-show-response.json
:language: javascript
Delete volume type
==================
.. rest_method:: DELETE /v1/{tenant_id}/types/{volume_type_id}
Deletes a volume type.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- volume_type_id: volume_type_id

View File

@ -0,0 +1,54 @@
.. -*- rst -*-
============
API versions
============
Lists information about API versions.
Show API v1 details
===================
.. rest_method:: GET /v1
Shows Block Storage API v1 details.
Normal response codes: 200
Error response codes:203,
Request
-------
Response Example
----------------
.. literalinclude:: ./samples/version-show-response.json
:language: javascript
List API versions
=================
.. rest_method:: GET /
Lists information about all Block Storage API versions.
Normal response codes: 200
Error response codes:300,
Request
-------
Response Example
----------------
.. literalinclude:: ./samples/versions-list-response.json
:language: javascript

View File

@ -0,0 +1,234 @@
.. -*- rst -*-
=======
Volumes
=======
The ``snapshot_id`` and ``source_volid`` parameters specify the ID
of the snapshot or volume from which the volume originates. If the
volume was not created from a snapshot or source volume, these
values are null.
List volumes, with details
==========================
.. rest_method:: GET /v1/{tenant_id}/volumes/detail
Lists all volumes, with details.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- migration_status: migration_status
- attachments: attachments
- links: links
- availability_zone: availability_zone
- encrypted: encrypted
- updated_at: updated_at
- replication_status: replication_status
- snapshot_id: snapshot_id
- id: id
- size: size
- user_id: user_id
- metadata: metadata
- status: status
- description: description
- multiattach: multiattach
- source_volid: source_volid
- consistencygroup_id: consistencygroup_id
- name: name
- bootable: bootable
- created_at: created_at
- volume_type: volume_type
- volumes: volumes
Response Example
----------------
.. literalinclude:: ./samples/volumes-list-response.json
:language: javascript
Create volume
=============
.. rest_method:: POST /v1/{tenant_id}/volumes
Creates a volume.
Error response codes:201,
Request
-------
.. rest_parameters:: parameters.yaml
- size: size
- description: description
- imageRef: imageRef
- multiattach: multiattach
- availability_zone: availability_zone
- source_volid: source_volid
- name: name
- volume: volume
- consistencygroup_id: consistencygroup_id
- volume_type: volume_type
- snapshot_id: snapshot_id
- scheduler_hints: scheduler_hints
- source_replica: source_replica
- metadata: metadata
- tenant_id: tenant_id
Request Example
---------------
.. literalinclude:: ./samples/volume-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- description: description
- imageRef: imageRef
- multiattach: multiattach
- created_at: created_at
- availability_zone: availability_zone
- source_volid: source_volid
- name: name
- volume: volume
- volume_type: volume_type
- snapshot_id: snapshot_id
- size: size
- metadata: metadata
List volumes
============
.. rest_method:: GET /v1/{tenant_id}/volumes
Lists all volumes.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- volumes: volumes
- id: id
- links: links
- name: name
Response Example
----------------
.. literalinclude:: ./samples/volumes-list-response.json
:language: javascript
Show volume details
===================
.. rest_method:: GET /v1/{tenant_id}/volumes/{volume_id}
Shows details for a volume.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- volume_id: volume_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- migration_status: migration_status
- attachments: attachments
- links: links
- availability_zone: availability_zone
- encrypted: encrypted
- updated_at: updated_at
- replication_status: replication_status
- snapshot_id: snapshot_id
- id: id
- size: size
- user_id: user_id
- metadata: metadata
- status: status
- description: description
- multiattach: multiattach
- source_volid: source_volid
- volume: volume
- consistencygroup_id: consistencygroup_id
- name: name
- bootable: bootable
- created_at: created_at
- volume_type: volume_type
Response Example
----------------
.. literalinclude:: ./samples/volume-show-response.json
:language: javascript
Delete volume
=============
.. rest_method:: DELETE /v1/{tenant_id}/volumes/{volume_id}
Deletes a volume.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- volume_id: volume_id

View File

@ -0,0 +1,81 @@
tt.literal {
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
white-space: nowrap;
background-color: #f9f2f4;
border-radius: 4px;
}
/* bootstrap users blockquote for pull quotes, so they are much
larger, we need them smaller */
blockquote { font-size: 1em; }
pre {
display: block;
padding: 9.5px;
margin: 0 0 10px;
font-size: 13px;
line-height: 1.428571429;
color: #333;
word-break: break-all;
word-wrap: break-word;
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
}
tbody>tr:nth-child(odd)>td,
tbody>tr:nth-child(odd)>th {
background-color: #f9f9f9;
}
table>thead>tr>th, table>tbody>tr>th, table>tfoot>tr>th, table>thead>tr>td, table>tbody>tr>td, table>tfoot>tr>td {
padding: 8px;
line-height: 1.428571429;
vertical-align: top;
border-top: 1px solid #ddd;
}
td>p {
margin: 0 0 0.5em;
}
div.document {
width: 80% !important;
}
@media (max-width: 1200px) {
div.document {
width: 960px !important;
}
}
.operation-grp {
padding-top: 0.5em;
padding-bottom: 1em;
}
/* Ensure the method buttons and their links don't split lines when
the page is narrower */
.operation {
/* this moves the link icon into the gutter */
margin-left: -1.25em;
margin-right: 1.25em;
white-space: nowrap;
}
/* These make the links only show up on hover */
a.operation-anchor {
visibility: hidden;
}
.operation-grp:hover a.operation-anchor {
visibility: visible;
}
/* All tables for requests should be full width */
.api-detail table.docutils {
width: 100%;
}

View File

@ -0,0 +1,110 @@
(function() {
var pageCache;
$(document).ready(function() {
pageCache = $('.api-documentation').html();
// Show the proper JSON/XML example when toggled
$('.example-select').on('change', function(e) {
$(e.currentTarget).find(':selected').tab('show')
});
// Change the text on the expando buttons when appropriate
$('.api-detail')
.on('hide.bs.collapse', function(e) {
processButton(this, 'detail');
})
.on('show.bs.collapse', function(e) {
processButton(this, 'close');
});
var expandAllActive = true;
// Expand the world
$('#expand-all').click(function () {
if (expandAllActive) {
expandAllActive = false;
$('.api-detail').collapse('show');
$('#expand-all').attr('data-toggle', '');
$(this).text('Hide All');
} else {
expandAllActive = true;
$('.api-detail').collapse('hide');
$('#expand-all').attr('data-toggle', 'collapse');
$(this).text('Show All');
}});
// Wire up the search button
$('#search-btn').on('click', function(e) {
searchPage();
});
// Wire up the search box enter
$('#search-box').on('keydown', function(e) {
if (e.keyCode === 13) {
searchPage();
return false;
}
});
});
/**
* highlight terms based on the regex in the provided $element
*/
function highlightTextNodes($element, regex) {
var markup = $element.html();
// Do regex replace
// Inject span with class of 'highlighted termX' for google style highlighting
$element.html(markup.replace(regex, '>$1<span class="highlight">$2</span>$3<'));
}
function searchPage() {
$(".api-documentation").html(pageCache);
//make sure that all div's are expanded/hidden accordingly
$('.api-detail.in').each(function (e) {
$(this).collapse('hide');
});
var startTime = new Date().getTime(),
searchTerm = $('#search-box').val();
// The regex is the secret, it prevents text within tag declarations to be affected
var regex = new RegExp(">([^<]*)?(" + searchTerm + ")([^>]*)?<", "ig");
highlightTextNodes($('.api-documentation'), regex);
// Once we've highlighted the node, lets expand any with a search match in them
$('.api-detail').each(function () {
var $elem = $(this);
if ($elem.html().indexOf('<span class="highlight">') !== -1) {
$elem.collapse('show');
processButton($elem, 'close');
}
});
// log the results
if (console.log) {
console.log("search completed in: " + ((new Date().getTime()) - startTime) + "ms");
}
$('.api-detail')
.on('hide.bs.collapse', function (e) {
processButton(this, 'detail');
})
.on('show.bs.collapse', function (e) {
processButton(this, 'close');
});
}
/**
* Helper function for setting the text, styles for expandos
*/
function processButton(button, text) {
$('#' + $(button).attr('id') + '-btn').text(text)
.toggleClass('btn-info')
.toggleClass('btn-default');
}
})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,32 @@
.. -*- rst -*-
List Api Versions
=================
.. rest_method:: GET /
Lists information for all Block Storage API versions.
Normal response codes: 200,300
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
Request
-------
Response
--------
**Example List Api Versions: JSON request**
.. literalinclude:: ./samples/versions-resp.json
:language: javascript
**Example List Api Versions: XML request**
.. literalinclude:: ./samples/versions-response.xml
:language: javascript

View File

@ -0,0 +1,48 @@
.. -*- rst -*-
=================================================
Capabilities for storage back ends (capabilities)
=================================================
Shows capabilities for a storage back end.
Show back-end capabilities
==========================
.. rest_method:: GET /v2/{tenant_id}/capabilities/{hostname}
Shows capabilities for a storage back end.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- hostname: hostname
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- pool_name: pool_name
- description: description
- volume_backend_name: volume_backend_name
- namespace: namespace
- visibility: visibility
- driver_version: driver_version
- vendor_name: vendor_name
- properties: properties
- storage_protocol: storage_protocol
Response Example
----------------
.. literalinclude:: ./samples/backend-capabilities-response.json
:language: javascript

217
api-ref/v2/source/conf.py Normal file
View File

@ -0,0 +1,217 @@
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# cinder documentation build configuration file, created by
# sphinx-quickstart on Sat May 1 15:17:47 2010.
#
# This file is execfile()d with the current directory set to
# its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import os
import subprocess
import sys
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../../'))
sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('./'))
# -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'ext.rest_parameters',
'oslosphinx',
]
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#
# source_encoding = 'utf-8'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Cinder API Reference'
copyright = u'OpenStack Foundation'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
from cinder.version import version_info
# The full version, including alpha/beta/rc tags.
release = version_info.release_string()
# The short X.Y version.
version = version_info.version_string()
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
# today = ''
# Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%B %d, %Y'
# The reST default role (used for this markup: `text`) to use
# for all documents.
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = False
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for man page output ----------------------------------------------
# Grouping the document tree for man pages.
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
# html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
# html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# html_last_updated_fmt = '%b %d, %Y'
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
"-n1"]
html_last_updated_fmt = subprocess.Popen(
git_cmd, stdout=subprocess.PIPE).communicate()[0]
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
# html_additional_pages = {}
# If false, no module index is generated.
# html_use_modindex = True
# If false, no index is generated.
# html_use_index = True
# If true, the index is split into individual pages for each letter.
# html_split_index = False
# If true, links to the reST sources are added to the pages.
# html_show_sourcelink = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
# html_use_opensearch = ''
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = ''
# Output file base name for HTML help builder.
htmlhelp_basename = 'cinderdoc'
# -- Options for LaTeX output -------------------------------------------------
# The paper size ('letter' or 'a4').
# latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
# latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index', 'Cinder.tex', u'OpenStack Block Storage API Documentation',
u'OpenStack Foundation', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
# latex_use_parts = False
# Additional stuff for the LaTeX preamble.
# latex_preamble = ''
# Documents to append as an appendix to all manuals.
# latex_appendices = []
# If false, no module index is generated.
# latex_use_modindex = True

View File

@ -0,0 +1,253 @@
.. -*- rst -*-
==================
Consistency groups
==================
Consistency groups enable you to create snapshots at the exact same
point in time from multiple volumes. For example, a database might
place its tables, logs, and configuration on separate volumes. To
restore this database from a previous point in time, it makes sense
to restore the logs, tables, and configuration together from the
exact same point in time.
Use the ``policy.json`` file to grant permissions for these actions
to limit roles.
List consistency groups
=======================
.. rest_method:: GET /v2/{tenant_id}/consistencygroups
Lists consistency groups.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- sort_key: sort_key
- sort_dir: sort_dir
- limit: limit
- marker: marker
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- id: id
- name: name
Response Example
----------------
.. literalinclude:: ./samples/consistency-groups-list-response.json
:language: javascript
Create consistency group
========================
.. rest_method:: POST /v2/{tenant_id}/consistencygroups
Creates a consistency group.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- status: status
- user_id: user_id
- description: description
- availability_zone: availability_zone
- volume_types: volume_types
- project_id: project_id
- name: name
- tenant_id: tenant_id
Request Example
---------------
.. literalinclude:: ./samples/consistency-group-create-request.json
:language: javascript
Show consistency group details
==============================
.. rest_method:: GET /v2/{tenant_id}/consistencygroups/{consistencygroup_id}
Shows details for a consistency group.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- consistencygroup_id: consistencygroup_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- status: status
- description: description
- availability_zone: availability_zone
- created_at: created_at
- volume_types: volume_types
- id: id
- name: name
Response Example
----------------
.. literalinclude:: ./samples/consistency-group-show-response.json
:language: javascript
Create consistency group from source
====================================
.. rest_method:: POST /v2/{tenant_id}/consistencygroups/create_from_src
Creates a consistency group from source.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- status: status
- user_id: user_id
- description: description
- cgsnapshot_id: cgsnapshot_id
- source_cgid: source_cgid
- project_id: project_id
- name: name
- tenant_id: tenant_id
Request Example
---------------
.. literalinclude:: ./samples/consistency-group-create-from-src-request.json
:language: javascript
Delete consistency group
========================
.. rest_method:: POST /v2/{tenant_id}/consistencygroups/{consistencygroup_id}/delete
Deletes a consistency group.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- force: force
- tenant_id: tenant_id
- consistencygroup_id: consistencygroup_id
Request Example
---------------
.. literalinclude:: ./samples/consistency-group-delete-request.json
:language: javascript
List consistency groups with details
====================================
.. rest_method:: GET /v2/{tenant_id}/consistencygroups/detail
Lists consistency groups with details.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- sort_key: sort_key
- sort_dir: sort_dir
- limit: limit
- marker: marker
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- status: status
- description: description
- availability_zone: availability_zone
- created_at: created_at
- volume_types: volume_types
- id: id
- name: name
Response Example
----------------
.. literalinclude:: ./samples/consistency-groups-list-detailed-response.json
:language: javascript
Update consistency group
========================
.. rest_method:: PUT /v2/{tenant_id}/consistencygroups/{consistencygroup_id}/update
Updates a consistency group.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- remove_volumes: remove_volumes
- description: description
- add_volumes: add_volumes
- name: name
- tenant_id: tenant_id
- consistencygroup_id: consistencygroup_id
Request Example
---------------
.. literalinclude:: ./samples/consistency-group-update-request.json
:language: javascript

View File

@ -0,0 +1,38 @@
.. -*- rst -*-
================================
Backup actions (backups, action)
================================
Force-deletes a backup.
Force-delete backup
===================
.. rest_method:: POST /v2/{tenant_id}/backups/{backup_id}/action
Force-deletes a backup. Specify the ``os-force_delete`` action in the request body.
This operations deletes the backup and any backup data.
The backup driver returns the ``405`` status code if it does not
support this operation.
Error response codes:404,405,202,
Request
-------
.. rest_parameters:: parameters.yaml
- os-force_delete: os-force_delete
- tenant_id: tenant_id
- backup_id: backup_id
Request Example
---------------
.. literalinclude:: ./samples/backup-force-delete-request.json
:language: javascript

View File

@ -0,0 +1,276 @@
.. -*- rst -*-
=================
Backups (backups)
=================
A backup is a full copy of a volume stored in an external service.
The service can be configured. The only supported service is Object
Storage. A backup can subsequently be restored from the external
service to either the same volume that the backup was originally
taken from or to a new volume. Backup and restore operations can
only be carried out on volumes that are in an unattached and
available state.
When you create, list, or delete backups, these status values are
possible:
**Backup statuses**
+-----------------+---------------------------------------------+
| Status | Description |
+-----------------+---------------------------------------------+
| creating | The backup is being created. |
+-----------------+---------------------------------------------+
| available | The backup is ready to restore to a volume. |
+-----------------+---------------------------------------------+
| deleting | The backup is being deleted. |
+-----------------+---------------------------------------------+
| error | A backup error occurred. |
+-----------------+---------------------------------------------+
| restoring | The backup is being restored to a volume. |
+-----------------+---------------------------------------------+
| error_restoring | A backup restoration error occurred. |
+-----------------+---------------------------------------------+
If an error occurs, you can find more information about the error
in the ``fail_reason`` field for the backup.
List backups with details
=========================
.. rest_method:: GET /v2/{tenant_id}/backups/detail
Lists Block Storage backups, with details, to which the tenant has access.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- sort_key: sort_key
- sort_dir: sort_dir
- limit: limit
- marker: marker
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- status: status
- object_count: object_count
- fail_reason: fail_reason
- description: description
- links: links
- availability_zone: availability_zone
- created_at: created_at
- updated_at: updated_at
- name: name
- has_dependent_backups: has_dependent_backups
- volume_id: volume_id
- container: container
- backups: backups
- size: size
- id: id
- is_incremental: is_incremental
Response Example
----------------
.. literalinclude:: ./samples/backups-list-detailed-response.json
:language: javascript
Show backup details
===================
.. rest_method:: GET /v2/{tenant_id}/backups/{backup_id}
Shows details for a backup.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- backup_id: backup_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- status: status
- object_count: object_count
- container: container
- description: description
- links: links
- availability_zone: availability_zone
- created_at: created_at
- updated_at: updated_at
- name: name
- has_dependent_backups: has_dependent_backups
- volume_id: volume_id
- fail_reason: fail_reason
- size: size
- backup: backup
- id: id
- is_incremental: is_incremental
Response Example
----------------
.. literalinclude:: ./samples/backup-show-response.json
:language: javascript
Delete backup
=============
.. rest_method:: DELETE /v2/{tenant_id}/backups/{backup_id}
Deletes a backup.
Error response codes:204,
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- backup_id: backup_id
Restore backup
==============
.. rest_method:: POST /v2/{tenant_id}/backups/{backup_id}/restore
Restores a Block Storage backup to an existing or new Block Storage volume.
You must specify either the UUID or name of the volume. If you
specify both the UUID and name, the UUID takes priority.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- restore: restore
- name: name
- volume_id: volume_id
- tenant_id: tenant_id
- backup_id: backup_id
Request Example
---------------
.. literalinclude:: ./samples/backup-restore-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- restore: restore
- backup_id: backup_id
- volume_id: volume_id
Create backup
=============
.. rest_method:: POST /v2/{tenant_id}/backups
Creates a Block Storage backup from a volume.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- container: container
- description: description
- incremental: incremental
- volume_id: volume_id
- force: force
- backup: backup
- name: name
- tenant_id: tenant_id
Request Example
---------------
.. literalinclude:: ./samples/backup-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- backup: backup
- id: id
- links: links
- name: name
List backups
============
.. rest_method:: GET /v2/{tenant_id}/backups
Lists Block Storage backups to which the tenant has access.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- sort_key: sort_key
- sort_dir: sort_dir
- limit: limit
- marker: marker
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- backups: backups
- id: id
- links: links
- name: name
Response Example
----------------
.. literalinclude:: ./samples/backups-list-response.json
:language: javascript

View File

@ -0,0 +1,28 @@
:tocdepth: 2
==============
Volume API V2
==============
.. rest_expand_all::
.. include:: api-versions.inc
.. include:: ext-backups.inc
.. include:: ext-backups-actions-v2.inc
.. include:: capabilities-v2.inc
.. include:: os-cgsnapshots-v2.inc
.. include:: consistencygroups-v2.inc
.. include:: limits.inc
.. include:: os-vol-image-meta-v2.inc
.. include:: os-vol-pool-v2.inc
.. include:: os-vol-transfer-v2.inc
.. include:: qos-specs-v2-qos-specs.inc
.. include:: quota-sets.inc
.. include:: volume-manage.inc
.. include:: volume-type-access.inc
.. include:: volumes-v2-extensions.inc
.. include:: volumes-v2-snapshots.inc
.. include:: volumes-v2-types.inc
.. include:: volumes-v2-versions.inc
.. include:: volumes-v2-volumes-actions.inc
.. include:: volumes-v2-volumes.inc

View File

@ -0,0 +1,57 @@
.. -*- rst -*-
===============
Limits (limits)
===============
Shows absolute limits for a tenant.
An absolute limit value of ``-1`` indicates that the absolute limit
for the item is infinite.
Show absolute limits
====================
.. rest_method:: GET /v2/{tenant_id}/limits
Shows absolute limits for a tenant.
An absolute limit value of ``-1`` indicates that the absolute limit
for the item is infinite.
Normal response codes: 200
Error response codes:203,
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- totalSnapshotsUsed: totalSnapshotsUsed
- maxTotalBackups: maxTotalBackups
- maxTotalVolumeGigabytes: maxTotalVolumeGigabytes
- limits: limits
- maxTotalSnapshots: maxTotalSnapshots
- maxTotalBackupGigabytes: maxTotalBackupGigabytes
- totalBackupGigabytesUsed: totalBackupGigabytesUsed
- maxTotalVolumes: maxTotalVolumes
- totalVolumesUsed: totalVolumesUsed
- rate: rate
- totalBackupsUsed: totalBackupsUsed
- totalGigabytesUsed: totalGigabytesUsed
- absolute: absolute
Response Example
----------------
.. literalinclude:: ./samples/limits-show-response.json
:language: javascript

View File

@ -0,0 +1,179 @@
.. -*- rst -*-
===========================
Consistency group snapshots
===========================
Lists all, lists all with details, shows details for, creates, and
deletes consistency group snapshots.
Delete consistency group snapshot
=================================
.. rest_method:: DELETE /v2/{tenant_id}/cgsnapshots/{cgsnapshot_id}
Deletes a consistency group snapshot.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- cgsnapshot_id: cgsnapshot_id
Show consistency group snapshot details
=======================================
.. rest_method:: GET /v2/{tenant_id}/cgsnapshots/{cgsnapshot_id}
Shows details for a consistency group snapshot.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- cgsnapshot_id: cgsnapshot_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- status: status
- description: description
- created_at: created_at
- consistencygroup_id: consistencygroup_id
- id: id
- name: name
Response Example
----------------
.. literalinclude:: ./samples/cgsnapshots-show-response.json
:language: javascript
List consistency group snapshots with details
=============================================
.. rest_method:: GET /v2/{tenant_id}/cgsnapshots/detail
Lists all consistency group snapshots with details.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- status: status
- description: description
- created_at: created_at
- consistencygroup_id: consistencygroup_id
- id: id
- name: name
Response Example
----------------
.. literalinclude:: ./samples/cgsnapshots-list-detailed-response.json
:language: javascript
List consistency group snapshots
================================
.. rest_method:: GET /v2/{tenant_id}/cgsnapshots
Lists all consistency group snapshots.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- id: id
- name: name
Response Example
----------------
.. literalinclude:: ./samples/cgsnapshots-list-response.json
:language: javascript
Create consistency group snapshot
=================================
.. rest_method:: POST /v2/{tenant_id}/cgsnapshots
Creates a consistency group snapshot.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- name: name
- tenant_id: tenant_id
Request Example
---------------
.. literalinclude:: ./samples/cgsnapshots-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- status: status
- description: description
- created_at: created_at
- consistencygroup_id: consistencygroup_id
- id: id
- name: name

View File

@ -0,0 +1,46 @@
.. -*- rst -*-
===================================================
Volume image metadata extension (os-vol-image-meta)
===================================================
Shows image metadata that is associated with a volume.
Show image metadata for volume
==============================
.. rest_method:: GET /v2/{tenant_id}/os-vol-image-meta
Shows image metadata for a volume.
When the request is made, the caller must specify a reference to an
existing storage volume in the ``ref`` element. Each storage driver
may interpret the existing storage volume reference differently but
should accept a reference structure containing either a ``source-
volume-id`` or ``source-volume-name`` element, if possible.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- description: description
- availability_zone: availability_zone
- bootable: bootable
- volume_type: volume_type
- name: name
- volume: volume
- host: host
- ref: ref
- metadata: metadata
- tenant_id: tenant_id
Request Example
---------------
.. literalinclude:: ./samples/image-metadata-show-request.json
:language: javascript

View File

@ -0,0 +1,50 @@
.. -*- rst -*-
======================
Back-end storage pools
======================
Administrator only. Lists all back-end storage pools that are known
to the scheduler service.
List back-end storage pools
===========================
.. rest_method:: GET /v2/{tenant_id}/scheduler-stats/get_pools
Lists all back-end storage pools.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- detail: detail
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- updated: updated
- QoS_support: QoS_support
- name: name
- total_capacity: total_capacity
- volume_backend_name: volume_backend_name
- capabilities: capabilities
- free_capacity: free_capacity
- driver_version: driver_version
- reserved_percentage: reserved_percentage
- storage_protocol: storage_protocol
Response Example
----------------
.. literalinclude:: ./samples/pools-list-detailed-response.json
:language: javascript

View File

@ -0,0 +1,217 @@
.. -*- rst -*-
===============
Volume transfer
===============
Transfers a volume from one user to another user.
Accept volume transfer
======================
.. rest_method:: POST /v2/{tenant_id}/os-volume-transfer/{transfer_id}/accept
Accepts a volume transfer.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- auth_key: auth_key
- transfer_id: transfer_id
- tenant_id: tenant_id
Request Example
---------------
.. literalinclude:: ./samples/volume-transfer-accept-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- volume_id: volume_id
- id: id
- links: links
- name: name
Create volume transfer
======================
.. rest_method:: POST /v2/{tenant_id}/os-volume-transfer
Creates a volume transfer.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- name: name
- volume_id: volume_id
- tenant_id: tenant_id
Request Example
---------------
.. literalinclude:: ./samples/volume-transfer-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- auth_key: auth_key
- links: links
- created_at: created_at
- volume_id: volume_id
- id: id
- name: name
List volume transfers
=====================
.. rest_method:: GET /v2/{tenant_id}/os-volume-transfer
Lists volume transfers.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- volume_id: volume_id
- id: id
- links: links
- name: name
Response Example
----------------
.. literalinclude:: ./samples/volume-transfers-list-response.json
:language: javascript
Show volume transfer details
============================
.. rest_method:: GET /v2/{tenant_id}/os-volume-transfer/{transfer_id}
Shows details for a volume transfer.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- transfer_id: transfer_id
- tenant_id: tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- created_at: created_at
- volume_id: volume_id
- id: id
- links: links
- name: name
Response Example
----------------
.. literalinclude:: ./samples/volume-transfer-show-response.json
:language: javascript
Delete volume transfer
======================
.. rest_method:: DELETE /v2/{tenant_id}/os-volume-transfer/{transfer_id}
Deletes a volume transfer.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- transfer_id: transfer_id
- tenant_id: tenant_id
List volume transfers, with details
===================================
.. rest_method:: GET /v2/{tenant_id}/os-volume-transfer/detail
Lists volume transfers, with details.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- created_at: created_at
- volume_id: volume_id
- id: id
- links: links
- name: name
Response Example
----------------
.. literalinclude:: ./samples/volume-transfers-list-detailed-response.json
:language: javascript

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,315 @@
.. -*- rst -*-
===================================================
Quality of service (QoS) specifications (qos-specs)
===================================================
Administrators only, depending on policy settings.
Creates, lists, shows details for, associates, disassociates, sets
keys, unsets keys, and deletes quality of service (QoS)
specifications.
Disassociate QoS specification from all associations
====================================================
.. rest_method:: GET /v2/{tenant_id}/qos-specs/{qos_id}/disassociate_all
Disassociates a QoS specification from all associations.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- qos_id: qos_id
Unset keys in QoS specification
===============================
.. rest_method:: PUT /v2/{tenant_id}/qos-specs/{qos_id}/delete_keys
Unsets keys in a QoS specification.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- keys: keys
- tenant_id: tenant_id
- qos_id: qos_id
Request Example
---------------
.. literalinclude:: ./samples/qos-unset-request.json
:language: javascript
Response Example
----------------
.. literalinclude:: ./samples/qos-unset-response.json
:language: javascript
Get all associations for QoS specification
==========================================
.. rest_method:: GET /v2/{tenant_id}/qos-specs/{qos_id}/associations
Lists all associations for a QoS specification.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- qos_id: qos_id
Response Example
----------------
.. literalinclude:: ./samples/qos-show-response.json
:language: javascript
Associate QoS specification with volume type
============================================
.. rest_method:: GET /v2/{tenant_id}/qos-specs/{qos_id}/associate
Associates a QoS specification with a volume type.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- qos_id: qos_id
Disassociate QoS specification from volume type
===============================================
.. rest_method:: GET /v2/{tenant_id}/qos-specs/{qos_id}/disassociate
Disassociates a QoS specification from a volume type.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- qos_id: qos_id
Show QoS specification details
==============================
.. rest_method:: GET /v2/{tenant_id}/qos-specs/{qos_id}
Shows details for a QoS specification.
Normal response codes: 200
Error response codes:413,405,404,403,401,400,503,
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- qos_id: qos_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- name: name
- links: links
- id: id
- qos_specs: qos_specs
- consumer: consumer
- specs: specs
Response Example
----------------
.. literalinclude:: ./samples/qos-show-response.json
:language: javascript
Set keys in QoS specification
=============================
.. rest_method:: PUT /v2/{tenant_id}/qos-specs/{qos_id}
Sets keys in a QoS specification.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- qos_specs: qos_specs
- specs: specs
- tenant_id: tenant_id
- qos_id: qos_id
Request Example
---------------
.. literalinclude:: ./samples/qos-update-request.json
:language: javascript
Response Example
----------------
.. literalinclude:: ./samples/qos-update-response.json
:language: javascript
Delete QoS specification
========================
.. rest_method:: DELETE /v2/{tenant_id}/qos-specs/{qos_id}
Deletes a QoS specification.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- qos_id: qos_id
- force: force
Create QoS specification
========================
.. rest_method:: POST /v2/{tenant_id}/qos-specs
Creates a QoS specification.
Specify one or more key and value pairs in the request body.
Error response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- qos_specs: qos_specs
- consumer: consumer
- name: name
- tenant_id: tenant_id
Request Example
---------------
.. literalinclude:: ./samples/qos-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- name: name
- links: links
- id: id
- qos_specs: qos_specs
- consumer: consumer
- specs: specs
List QoS specs
==============
.. rest_method:: GET /v2/{tenant_id}/qos-specs
Lists quality of service (QoS) specifications.
Normal response codes: 200
Error response codes:300,
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- sort_key: sort_key
- sort_dir: sort_dir
- limit: limit
- marker: marker
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- specs: specs
- qos_specs: qos_specs
- consumer: consumer
- id: id
- name: name
Response Example
----------------
.. literalinclude:: ./samples/qos-list-response.json
:language: javascript

View File

@ -0,0 +1,407 @@
.. -*- rst -*-
====================================
Quota sets extension (os-quota-sets)
====================================
Administrators only, depending on policy settings.
Shows, updates, and deletes quotas for a tenant.
Show quotas for user
====================
.. rest_method:: GET /v2/{admin_tenant_id}/os-quota-sets/{tenant_id}/{user_id}
Enables an admin user to show quotas for a tenant and user.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- user_id: user_id
- admin_tenant_id: admin_tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-update-response.json
:language: javascript
Update quotas for user
======================
.. rest_method:: PUT /v2/{admin_tenant_id}/os-quota-sets/{tenant_id}/{user_id}
Updates quotas for a tenant and user.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
- tenant_id: tenant_id
- user_id: user_id
- admin_tenant_id: admin_tenant_id
Request Example
---------------
.. literalinclude:: ./samples/quotas-update-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-update-response.json
:language: javascript
Delete quotas for user
======================
.. rest_method:: DELETE /v2/{admin_tenant_id}/os-quota-sets/{tenant_id}/{user_id}
Deletes quotas for a user so that the quotas revert to default values.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- user_id: user_id
- admin_tenant_id: admin_tenant_id
Response Example
----------------
.. literalinclude:: ./samples/quotas-delete-response.json
:language: javascript
Show quotas
===========
.. rest_method:: GET /v2/{admin_tenant_id}/os-quota-sets/{tenant_id}
Shows quotas for a tenant.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- admin_tenant_id: admin_tenant_id
- usage: usage
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-show-response.json
:language: javascript
Update quotas
=============
.. rest_method:: PUT /v2/{admin_tenant_id}/os-quota-sets/{tenant_id}
Updates quotas for a tenant.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
- tenant_id: tenant_id
- admin_tenant_id: admin_tenant_id
Request Example
---------------
.. literalinclude:: ./samples/quotas-update-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-update-response.json
:language: javascript
Delete quotas
=============
.. rest_method:: DELETE /v2/{admin_tenant_id}/os-quota-sets/{tenant_id}
Deletes quotas for a tenant so the quotas revert to default values.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- admin_tenant_id: admin_tenant_id
Response Example
----------------
.. literalinclude:: ./samples/quotas-delete-response.json
:language: javascript
Show quota details for user
===========================
.. rest_method:: GET /v2/{admin_tenant_id}/os-quota-sets/{tenant_id}/detail/{user_id}
Shows details for quotas for a tenant and user.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- user_id: user_id
- admin_tenant_id: admin_tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-update-response.json
:language: javascript
Get default quotas
==================
.. rest_method:: GET /v2/{tenant_id}/os-quota-sets/defaults
Gets default quotas for a tenant.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-show-defaults-response.json
:language: javascript

View File

@ -0,0 +1,33 @@
{
"namespace": "OS::Storage::Capabilities::fake",
"vendor_name": "OpenStack",
"volume_backend_name": "lvm",
"pool_name": "pool",
"driver_version": "2.0.0",
"storage_protocol": "iSCSI",
"display_name": "Capabilities of Cinder LVM driver",
"description": "These are volume type options provided by Cinder LVM driver, blah, blah.",
"visibility": "public",
"properties": {
"compression": {
"title": "Compression",
"description": "Enables compression.",
"type": "boolean"
},
"qos": {
"title": "QoS",
"description": "Enables QoS.",
"type": "boolean"
},
"replication": {
"title": "Replication",
"description": "Enables replication.",
"type": "boolean"
},
"thin_provisioning": {
"title": "Thin Provisioning",
"description": "Sets thin provisioning.",
"type": "boolean"
}
}
}

View File

@ -0,0 +1,9 @@
{
"backup": {
"container": null,
"description": null,
"name": "backup001",
"volume_id": "64f5d2fb-d836-4063-b7e2-544d5c1ff607",
"incremental": true
}
}

View File

@ -0,0 +1,16 @@
{
"backup": {
"id": "deac8b8c-35c9-4c71-acaa-889c2d5d5c8e",
"links": [
{
"href": "http://localhost:8776/v2/c95fc3e4afe248a49a28828f286a7b38/backups/deac8b8c-35c9-4c71-acaa-889c2d5d5c8e",
"rel": "self"
},
{
"href": "http://localhost:8776/c95fc3e4afe248a49a28828f286a7b38/backups/deac8b8c-35c9-4c71-acaa-889c2d5d5c8e",
"rel": "bookmark"
}
],
"name": "backup001"
}
}

View File

@ -0,0 +1,3 @@
{
"os-force_delete": {}
}

View File

@ -0,0 +1,6 @@
{
"backup-record": {
"backup_service": "cinder.backup.drivers.swift",
"backup_url": "eyJzdGF0"
}
}

View File

@ -0,0 +1,6 @@
{
"backup-record": {
"backup_service": "cinder.backup.drivers.swift",
"backup_url": "eyJzdGF0"
}
}

View File

@ -0,0 +1,16 @@
{
"backup": {
"id": "deac8b8c-35c9-4c71-acaa-889c2d5d5c8e",
"links": [
{
"href": "http://localhost:8776/v2/c95fc3e4afe248a49a28828f286a7b38/backups/deac8b8c-35c9-4c71-acaa-889c2d5d5c8e",
"rel": "self"
},
{
"href": "http://localhost:8776/c95fc3e4afe248a49a28828f286a7b38/backups/deac8b8c-35c9-4c71-acaa-889c2d5d5c8e",
"rel": "bookmark"
}
],
"name": null
}
}

View File

@ -0,0 +1,6 @@
{
"restore": {
"name": "vol-01",
"volume_id": "64f5d2fb-d836-4063-b7e2-544d5c1ff607"
}
}

View File

@ -0,0 +1,6 @@
{
"restore": {
"backup_id": "2ef47aee-8844-490c-804d-2a8efe561c65",
"volume_id": "795114e8-7489-40be-a978-83797f2c1dd3"
}
}

View File

@ -0,0 +1,27 @@
{
"backup": {
"availability_zone": "az1",
"container": "volumebackups",
"created_at": "2013-04-02T10:35:27.000000",
"description": null,
"fail_reason": null,
"id": "2ef47aee-8844-490c-804d-2a8efe561c65",
"links": [
{
"href": "http://localhost:8776/v1/c95fc3e4afe248a49a28828f286a7b38/backups/2ef47aee-8844-490c-804d-2a8efe561c65",
"rel": "self"
},
{
"href": "http://localhost:8776/c95fc3e4afe248a49a28828f286a7b38/backups/2ef47aee-8844-490c-804d-2a8efe561c65",
"rel": "bookmark"
}
],
"name": "backup001",
"object_count": 22,
"size": 1,
"status": "available",
"volume_id": "e5185058-943a-4cb4-96d9-72c184c337d6",
"is_incremental": true,
"has_dependent_backups": false
}
}

View File

@ -0,0 +1,54 @@
{
"backups": [
{
"availability_zone": "az1",
"container": "volumebackups",
"created_at": "2013-04-02T10:35:27.000000",
"description": null,
"fail_reason": null,
"id": "2ef47aee-8844-490c-804d-2a8efe561c65",
"links": [
{
"href": "http://localhost:8776/v1/c95fc3e4afe248a49a28828f286a7b38/backups/2ef47aee-8844-490c-804d-2a8efe561c65",
"rel": "self"
},
{
"href": "http://localhost:8776/c95fc3e4afe248a49a28828f286a7b38/backups/2ef47aee-8844-490c-804d-2a8efe561c65",
"rel": "bookmark"
}
],
"name": "backup001",
"object_count": 22,
"size": 1,
"status": "available",
"volume_id": "e5185058-943a-4cb4-96d9-72c184c337d6",
"is_incremental": true,
"has_dependent_backups": false
},
{
"availability_zone": "az1",
"container": "volumebackups",
"created_at": "2013-04-02T10:21:48.000000",
"description": null,
"fail_reason": null,
"id": "4dbf0ec2-0b57-4669-9823-9f7c76f2b4f8",
"links": [
{
"href": "http://localhost:8776/v1/c95fc3e4afe248a49a28828f286a7b38/backups/4dbf0ec2-0b57-4669-9823-9f7c76f2b4f8",
"rel": "self"
},
{
"href": "http://localhost:8776/c95fc3e4afe248a49a28828f286a7b38/backups/4dbf0ec2-0b57-4669-9823-9f7c76f2b4f8",
"rel": "bookmark"
}
],
"name": "backup002",
"object_count": 22,
"size": 1,
"status": "available",
"volume_id": "e5185058-943a-4cb4-96d9-72c184c337d6",
"is_incremental": true,
"has_dependent_backups": false
}
]
}

View File

@ -0,0 +1,32 @@
{
"backups": [
{
"id": "2ef47aee-8844-490c-804d-2a8efe561c65",
"links": [
{
"href": "http://localhost:8776/v1/c95fc3e4afe248a49a28828f286a7b38/backups/2ef47aee-8844-490c-804d-2a8efe561c65",
"rel": "self"
},
{
"href": "http://localhost:8776/c95fc3e4afe248a49a28828f286a7b38/backups/2ef47aee-8844-490c-804d-2a8efe561c65",
"rel": "bookmark"
}
],
"name": "backup001"
},
{
"id": "4dbf0ec2-0b57-4669-9823-9f7c76f2b4f8",
"links": [
{
"href": "http://localhost:8776/v1/c95fc3e4afe248a49a28828f286a7b38/backups/4dbf0ec2-0b57-4669-9823-9f7c76f2b4f8",
"rel": "self"
},
{
"href": "http://localhost:8776/c95fc3e4afe248a49a28828f286a7b38/backups/4dbf0ec2-0b57-4669-9823-9f7c76f2b4f8",
"rel": "bookmark"
}
],
"name": "backup002"
}
]
}

View File

@ -0,0 +1,10 @@
{
"cgsnapshot": {
"consistencygroup_id": "6f519a48-3183-46cf-a32f-41815f814546",
"name": "firstcg",
"description": "first consistency group",
"user_id": "6f519a48-3183-46cf-a32f-41815f814444",
"project_id": "6f519a48-3183-46cf-a32f-41815f815555",
"status": "creating"
}
}

View File

@ -0,0 +1,6 @@
{
"cgsnapshot": {
"id": "6f519a48-3183-46cf-a32f-41815f816666",
"name": "firstcg"
}
}

View File

@ -0,0 +1,20 @@
{
"cgsnapshots": [
{
"id": "6f519a48-3183-46cf-a32f-41815f813986",
"consistencygroup_id": "6f519a48-3183-46cf-a32f-41815f814444",
"status": "available",
"created_at": "2015-09-16T09:28:52.000000",
"name": "my-cg1",
"description": "my first consistency group"
},
{
"id": "aed36625-a6d7-4681-ba59-c7ba3d18c148",
"consistencygroup_id": "aed36625-a6d7-4681-ba59-c7ba3d18dddd",
"status": "error",
"created_at": "2015-09-16T09:31:15.000000",
"name": "my-cg2",
"description": "Edited description"
}
]
}

View File

@ -0,0 +1,12 @@
{
"cgsnapshots": [
{
"id": "6f519a48-3183-46cf-a32f-41815f813986",
"name": "my-cg1"
},
{
"id": "aed36625-a6d7-4681-ba59-c7ba3d18c148",
"name": "my-cg2"
}
]
}

View File

@ -0,0 +1,10 @@
{
"cgsnapshot": {
"id": "6f519a48-3183-46cf-a32f-41815f813986",
"consistencygroup_id": "6f519a48-3183-46cf-a32f-41815f814444",
"status": "available",
"created_at": "2015-09-16T09:28:52.000000",
"name": "my-cg1",
"description": "my first consistency group"
}
}

View File

@ -0,0 +1,11 @@
{
"consistencygroup-from-src": {
"name": "firstcg",
"description": "first consistency group",
"cgsnapshot_id": "6f519a48-3183-46cf-a32f-41815f813986",
"source_cgid": "6f519a48-3183-46cf-a32f-41815f814546",
"user_id": "6f519a48-3183-46cf-a32f-41815f815555",
"project_id": "6f519a48-3183-46cf-a32f-41815f814444",
"status": "creating"
}
}

View File

@ -0,0 +1,14 @@
{
"consistencygroup": {
"name": "firstcg",
"description": "first consistency group",
"volume_types": [
"type1",
"type2"
],
"user_id": "6f519a48-3183-46cf-a32f-41815f814546",
"project_id": "6f519a48-3183-46cf-a32f-41815f815555",
"availability_zone": "az0",
"status": "creating"
}
}

View File

@ -0,0 +1,6 @@
{
"consistencygroup": {
"id": "6f519a48-3183-46cf-a32f-41815f816666",
"name": "firstcg"
}
}

Some files were not shown because too many files have changed in this diff Show More