Add doc support for Extended Availabiliy Zone
This extension adds info about the instance availability zone to the Compute API output. Fixes: bug 1128563 Change-Id: I78a6566f0f95620ff3eb4cc638198778db2af7c6
This commit is contained in:
parent
f6f6f213dd
commit
d79694e3ee
@ -126,6 +126,13 @@
|
||||
href="../wadls/compute-api/src/ext/os-admin-actions.wadl"
|
||||
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
|
||||
</section>
|
||||
<section xml:id="ext-availability-zone">
|
||||
<title>Extended Availability Zones</title>
|
||||
<para>Shows the instance availability zone. </para>
|
||||
<wadl:resources
|
||||
href="../wadls/compute-api/src/ext/os-ext-az.wadl"
|
||||
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
|
||||
</section>
|
||||
<section xml:id="ext-os-disk-config">
|
||||
<title>Disk Config</title>
|
||||
<para>Extends servers and images with a diskConfig
|
||||
|
@ -0,0 +1,55 @@
|
||||
{
|
||||
"server": {
|
||||
"OS-EXT-AZ:availability_zone": "nova",
|
||||
"accessIPv4": "",
|
||||
"accessIPv6": "",
|
||||
"addresses": {
|
||||
"private": [
|
||||
{
|
||||
"addr": "192.168.0.3",
|
||||
"version": 4
|
||||
}
|
||||
]
|
||||
},
|
||||
"created": "2013-01-30T13:38:47Z",
|
||||
"flavor": {
|
||||
"id": "1",
|
||||
"links": [
|
||||
{
|
||||
"href": "http://openstack.example.com/openstack/flavors/1",
|
||||
"rel": "bookmark"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hostId": "d38ea49a033b0efaf80c165de63f4805c886dfb94dc0fe731227eccb",
|
||||
"id": "fb7babfd-e1a1-4add-90e6-3558180983c7",
|
||||
"image": {
|
||||
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
|
||||
"links": [
|
||||
{
|
||||
"href": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
|
||||
"rel": "bookmark"
|
||||
}
|
||||
]
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"href": "http://openstack.example.com/v2/openstack/servers/fb7babfd-e1a1-4add-90e6-3558180983c7",
|
||||
"rel": "self"
|
||||
},
|
||||
{
|
||||
"href": "http://openstack.example.com/openstack/servers/fb7babfd-e1a1-4add-90e6-3558180983c7",
|
||||
"rel": "bookmark"
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"My Server Name": "Apache1"
|
||||
},
|
||||
"name": "new-server-test",
|
||||
"progress": 0,
|
||||
"status": "ACTIVE",
|
||||
"tenant_id": "openstack",
|
||||
"updated": "2013-01-30T13:38:49Z",
|
||||
"user_id": "admin"
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<server xmlns:OS-EXT-AZ="http://docs.openstack.org/compute/ext/extended_availability_zone/api/v2" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="2013-01-30T14:29:20Z" hostId="471e52951e3182954c5a93489dafc3fc38a9ef3e0b62d26dc740460c" name="new-server-test" created="2013-01-30T14:29:19Z" userId="admin" tenantId="openstack" accessIPv4="" accessIPv6="" progress="0" id="26ea8424-758d-483a-addc-9a5905afc9e6" OS-EXT-AZ:availability_zone="nova">
|
||||
<image id="70a599e0-31e7-49b7-b260-868f441e862b">
|
||||
<atom:link href="http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b" rel="bookmark"/>
|
||||
</image>
|
||||
<flavor id="1">
|
||||
<atom:link href="http://openstack.example.com/openstack/flavors/1" rel="bookmark"/>
|
||||
</flavor>
|
||||
<metadata>
|
||||
<meta key="My Server Name">Apache1</meta>
|
||||
</metadata>
|
||||
<addresses>
|
||||
<network id="private">
|
||||
<ip version="4" addr="192.168.0.3"/>
|
||||
</network>
|
||||
</addresses>
|
||||
<atom:link href="http://openstack.example.com/v2/openstack/servers/26ea8424-758d-483a-addc-9a5905afc9e6" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/openstack/servers/26ea8424-758d-483a-addc-9a5905afc9e6" rel="bookmark"/>
|
||||
</server>
|
@ -0,0 +1,57 @@
|
||||
{
|
||||
"servers": [
|
||||
{
|
||||
"OS-EXT-AZ:availability_zone": "nova",
|
||||
"accessIPv4": "",
|
||||
"accessIPv6": "",
|
||||
"addresses": {
|
||||
"private": [
|
||||
{
|
||||
"addr": "192.168.0.3",
|
||||
"version": 4
|
||||
}
|
||||
]
|
||||
},
|
||||
"created": "2013-01-30T13:26:51Z",
|
||||
"flavor": {
|
||||
"id": "1",
|
||||
"links": [
|
||||
{
|
||||
"href": "http://openstack.example.com/openstack/flavors/1",
|
||||
"rel": "bookmark"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hostId": "60c988a84401fa15888a32833e5848e9caa99a45778310ba7b363165",
|
||||
"id": "3dbf5b00-dabc-41ff-b6ab-4409568fae9d",
|
||||
"image": {
|
||||
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
|
||||
"links": [
|
||||
{
|
||||
"href": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
|
||||
"rel": "bookmark"
|
||||
}
|
||||
]
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"href": "http://openstack.example.com/v2/openstack/servers/3dbf5b00-dabc-41ff-b6ab-4409568fae9d",
|
||||
"rel": "self"
|
||||
},
|
||||
{
|
||||
"href": "http://openstack.example.com/openstack/servers/3dbf5b00-dabc-41ff-b6ab-4409568fae9d",
|
||||
"rel": "bookmark"
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"My Server Name": "Apache1"
|
||||
},
|
||||
"name": "new-server-test",
|
||||
"progress": 0,
|
||||
"status": "ACTIVE",
|
||||
"tenant_id": "openstack",
|
||||
"updated": "2013-01-30T13:26:52Z",
|
||||
"user_id": "admin"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<servers xmlns:OS-EXT-AZ="http://docs.openstack.org/compute/ext/extended_availability_zone/api/v2" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||
<server status="ACTIVE" updated="2013-01-30T14:29:20Z" hostId="85adf7d0492dedf0a7e3dc44ef7d16186b768ca3df33c4d608e630d9" name="new-server-test" created="2013-01-30T14:29:19Z" userId="admin" tenantId="openstack" accessIPv4="" accessIPv6="" progress="0" id="a668c72d-2bac-4806-a297-c7c11d97e3b3" OS-EXT-AZ:availability_zone="nova">
|
||||
<image id="70a599e0-31e7-49b7-b260-868f441e862b">
|
||||
<atom:link href="http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b" rel="bookmark"/>
|
||||
</image>
|
||||
<flavor id="1">
|
||||
<atom:link href="http://openstack.example.com/openstack/flavors/1" rel="bookmark"/>
|
||||
</flavor>
|
||||
<metadata>
|
||||
<meta key="My Server Name">Apache1</meta>
|
||||
</metadata>
|
||||
<addresses>
|
||||
<network id="private">
|
||||
<ip version="4" addr="192.168.0.3"/>
|
||||
</network>
|
||||
</addresses>
|
||||
<atom:link href="http://openstack.example.com/v2/openstack/servers/a668c72d-2bac-4806-a297-c7c11d97e3b3" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/openstack/servers/a668c72d-2bac-4806-a297-c7c11d97e3b3" rel="bookmark"/>
|
||||
</server>
|
||||
</servers>
|
74
api-ref/src/wadls/compute-api/src/ext/os-ext-az.wadl
Normal file
74
api-ref/src/wadls/compute-api/src/ext/os-ext-az.wadl
Normal file
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- (C) 2012 OpenStack LLC., All Rights Reserved -->
|
||||
|
||||
<application xmlns="http://wadl.dev.java.net/2009/02"
|
||||
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
|
||||
xmlns:wadl="http://wadl.dev.java.net/2009/02">
|
||||
|
||||
<resources base="https://servers.api.openstack.com">
|
||||
<resource id="version" type="#VersionDetails" path="v2/">
|
||||
<resource id="tenantID" path="{tenant_id}">
|
||||
<param name="tenant_id" style="template" type="xsd:string">
|
||||
<doc><p xmlns="http://www.w3.org/1999/xhtml">
|
||||
The ID for the tenant or account in a multi-tenancy cloud.
|
||||
</p></doc>
|
||||
</param>
|
||||
<resource id="Servers" path="servers">
|
||||
<resource path="{server_id}">
|
||||
<param name="server_id" style="template" type="csapi:UUID">
|
||||
<doc>
|
||||
<p xmlns="http://www.w3.org/1999/xhtml">
|
||||
The UUID for the server of interest to you.</p>
|
||||
</doc>
|
||||
</param>
|
||||
<method href="#showServerAZ"/>
|
||||
</resource>
|
||||
<resource path="detail">
|
||||
<method href="#detailServersAZ"/>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<method name="GET" id="showServerAZ">
|
||||
<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN">
|
||||
<p xmlns="http://www.w3.org/1999/xhtml">
|
||||
Gets the availability zone for the specified instance.
|
||||
</p>
|
||||
</wadl:doc>
|
||||
<response status="200">
|
||||
<representation mediaType="application/json">
|
||||
<doc xml:lang="EN">
|
||||
<xsdxt:code href="../api_samples/OS-EXT-AZ/server-get-resp.json" />
|
||||
</doc>
|
||||
</representation>
|
||||
<representation mediaType="application/xml">
|
||||
<doc xml:lang="EN">
|
||||
<xsdxt:code href="../api_samples/OS-EXT-AZ/server-get-resp.xml" />
|
||||
</doc>
|
||||
</representation>
|
||||
</response>
|
||||
</method>
|
||||
|
||||
<method name="GET" id="detailServersAZ">
|
||||
<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN">
|
||||
<p xmlns="http://www.w3.org/1999/xhtml">
|
||||
Lists details for all servers. Includes their current availability zone.
|
||||
</p>
|
||||
</wadl:doc>
|
||||
<response status="200">
|
||||
<representation mediaType="application/json">
|
||||
<doc xml:lang="EN">
|
||||
<xsdxt:code href="../api_samples/OS-EXT-AZ/servers-detail-resp.json" />
|
||||
</doc>
|
||||
</representation>
|
||||
<representation mediaType="application/xml">
|
||||
<doc xml:lang="EN">
|
||||
<xsdxt:code href="../api_samples/OS-EXT-AZ/servers-detail-resp.xml" />
|
||||
</doc>
|
||||
</representation>
|
||||
</response>
|
||||
</method>
|
||||
</application>
|
Loading…
x
Reference in New Issue
Block a user