Updated code samples for os-services extension

bug: #1104264

Change-Id: I8c2dde7a912c6833683c0824de041104e0a8b7ca
author: Diane Fleming
This commit is contained in:
Diane Fleming 2013-04-09 13:36:26 -05:00
parent ffc8af7156
commit d716847bae
5 changed files with 56 additions and 38 deletions

View File

@ -1,4 +1,4 @@
{
"host": "host1",
"binary": "nova-compute"
}
}

View File

@ -1,7 +1,7 @@
{
"service": {
"host": "host1",
"binary": "nova-compute",
"status": "disabled"
}
}
"service":{
"host":"host1",
"binary":"nova-compute",
"status":"disabled"
}
}

View File

@ -1,4 +1,4 @@
{
"host": "host1",
"service": "nova-compute"
"host":"host1",
"binary":"nova_compute"
}

View File

@ -1,7 +1,5 @@
{
"service": {
"host": "host1",
"binary": "nova-compute",
"status": "enabled"
}
"host":"host1",
"binary":"nova-compute",
"status":"enabled"
}

View File

@ -1,27 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) 2012 OpenStack LLC., All Rights Reserved -->
<!-- (C) 2012-2013 OpenStack Foundation, 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">
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns:csapi="http://docs.openstack.org/compute/api/v2">
<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 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="os-services" path="os-services">
<method href="#listServices" />
<method href="#listServices"/>
<!-- <resource path="{service_id}">
<param name="service_id" style="template"
required="true" type="csapi:UUID">
<doc><p
xmlns="http://www.w3.org/1999/xhtml"
> The unique ID associated with the
service. </p></doc>
</param> -->
<resource path="enable">
<method href="#enableScheduling" />
<method href="#enableScheduling"/>
</resource>
<resource path="disable">
<method href="#disableScheduling" />
<method href="#disableScheduling"/>
</resource>
<!-- </resource> -->
</resource>
</resource>
</resource>
@ -29,14 +42,15 @@
<method name="GET" id="listServices">
<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN">
<p xmlns="http://www.w3.org/1999/xhtml">
Lists all running services, optionally filtered by host and service name.
</p>
<p xmlns="http://www.w3.org/1999/xhtml">Lists all running
services. </p>
</wadl:doc>
<response status="200">
<representation mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code href="../api_samples/os-services/services-list-get-resp.json" />
<xsdxt:code
href="../api_samples/os-services/services-list-get-resp.json"
/>
</doc>
</representation>
</response>
@ -44,21 +58,24 @@
<method name="PUT" id="enableScheduling">
<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN">
<p xmlns="http://www.w3.org/1999/xhtml">
Enables scheduling for a service.
</p>
<p xmlns="http://www.w3.org/1999/xhtml"> Enables
scheduling for a service. </p>
</wadl:doc>
<request>
<representation mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code href="../api_samples/os-services/service-enable-put-req.json" />
<xsdxt:code
href="../api_samples/os-services/service-enable-put-req.json"
/>
</doc>
</representation>
</request>
<response status="200">
<representation mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code href="../api_samples/os-services/service-enable-put-resp.json" />
<xsdxt:code
href="../api_samples/os-services/service-enable-put-resp.json"
/>
</doc>
</representation>
</response>
@ -66,21 +83,24 @@
<method name="PUT" id="disableScheduling">
<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN">
<p xmlns="http://www.w3.org/1999/xhtml">
Disables scheduling for a service.
</p>
<p xmlns="http://www.w3.org/1999/xhtml">Disables
scheduling for a service. </p>
</wadl:doc>
<request>
<representation mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code href="../api_samples/os-services/service-disable-put-req.json" />
<xsdxt:code
href="../api_samples/os-services/service-disable-put-req.json"
/>
</doc>
</representation>
</request>
<response status="200">
<representation mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code href="../api_samples/os-services/service-disable-put-resp.json" />
<xsdxt:code
href="../api_samples/os-services/service-disable-put-resp.json"
/>
</doc>
</representation>
</response>