Fix floating ip examples and add pool parameter

Change-Id: I3ff6b5ea8779e5ab71d21e3c2dbdc663f830e684
This commit is contained in:
Vishvananda Ishaya
2012-04-09 10:25:23 -07:00
parent 5268e7ca2d
commit b5489e077f
6 changed files with 50 additions and 34 deletions

View File

@@ -54,14 +54,28 @@
<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" title="Allocate Floating IP">
<p xmlns="http://www.w3.org/1999/xhtml">Allocate a new floating IP address to a tenant or account.</p>
</wadl:doc>
<request>
<param name="pool" style="plain">
<doc>
<p xmlns="http://www.w3.org/1999/xhtml">
Pool to allocate ip from. Will use default pool if not specified.
</p>
</doc>
</param>
<representation mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code href="samples/allocate_floating_ip_request.json" />
</doc>
</representation>
</request>
<response status="200">
<representation mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code href="samples/allocate_floating_ip.json" />
<xsdxt:code href="samples/allocate_floating_ip_response.json" />
</doc>
</representation>
</response>
<response status="400"><doc xml:lang="EN"><p xmlns="http://www.w3.org/1999/xhtml">If there are no floating IPs available, the
<response status="400"><doc xml:lang="EN"><p xmlns="http://www.w3.org/1999/xhtml">If there are no floating IPs available, the
extension returns an error code 400 with a message indicating that no more floating IPs are available.</p></doc></response>
</method>

View File

@@ -1,10 +0,0 @@
{
"floating_ip" :
{
"fixed_ip" : "10.0.0.3",
"id" : 1,
"instance_id" : 1,
"ip" : "10.6.0.0"
}
}

View File

@@ -0,0 +1,9 @@
{
"floating_ip": {
"fixed_ip": null,
"id": 1,
"instance_id": null,
"ip": "10.6.0.1",
"pool": "nova"
}
}

View File

@@ -1,10 +1,9 @@
{
"floating_ip" :
{
"fixed_ip" : "10.0.0.3",
"id" : 1,
"instance_id" : 1,
"ip" : "10.6.0.0"
}
"floating_ip": {
"fixed_ip": "10.0.0.3,
"id": 1,
"instance_id": "20c8acc0-f747-4d71-a389-46d078ebf047",
"ip": "10.6.0.1",
"pool": "nova"
}
}

View File

@@ -1,17 +1,18 @@
{
"floating_ips" : [
{
"fixed_ip" : "10.0.0.3",
"id" : 1,
"instance_id" : 1,
"ip" : "10.6.0.0"
},
{
"fixed_ip" : null,
"id" : 2,
"instance_id" : null,
"ip" : "10.6.0.1"
}
"floating_ips": [
{
"fixed_ip": null,
"id": 1,
"instance_id": null,
"ip": "10.6.0.1",
"pool": "nova"
},
{
"fixed_ip": null,
"id": 2,
"instance_id": null,
"ip": "10.6.0.2",
"pool": "nova"
}
]
}