[Openstack-docs] code to build api methods
David Cramer
david.cramer at rackspace.com
Tue Oct 22 03:14:52 UTC 2013
Hi Kersten,
You seem to be missing an opening <request> tag. Also, this is a
fragment, but presumably in the whole doc you will have declared the
namespaces wadl and xsdxt.
One thing this example lacks is parameters (header, query, template, and
"plain" or body params).
Regards,
David
On 10/21/2013 04:22 PM, Kersten J Richter wrote:
> Hi all,
> Working on a code that will transform this:
>
> {
> "description": "Updates an agent build",
> "extension": "os-agents",
> "extension_description": "Creates, updates, and deletes guest
> agents. Use guest agents to access files on the disk, configure
> networking, or run other applications or scripts in the guest while it
> runs. This hypervisor-specific extension is not currently enabled for
> KVM. Use of guest agents is possible only if the underlying service
> provider uses the Xen driver. ",
> "method": "PUT",
> "request": "agent-update-put-req.json",
> "response": "agent-update-put-resp.json",
> "section_name": "Guest Agents",
> "status": 200,
> "url": "os-agents/{id}"
> }
>
> To this:
>
>
> <method name="PUT" id="os-agents">
> <wadl:doc xml:lang="EN" title="Guest Agents"
> xmlns="http://docbook.org/ns/docbook">
> <para role="shortdesc">Updates an agent build</para>
> <para>Creates, updates, and deletes guest
> agents. Use guest agents to access files on the disk, configure
> networking, or run other applications or scripts in the guest while it
> runs. This hypervisor-specific extension is not currently enabled for
> KVM. Use of guest agents is possible only if the underlying service
> provider uses the Xen driver.</para>
> </wadl:doc>
> <representation mediaType="application/json">
> <doc xml:lang="EN">
> <xsdxt:code
> href="../api_samples/agent-update-put-req.json"/>
> </doc>
> </representation>
> </request>
> <response status="200">
> <representation mediaType="application/json">
> <doc xml:lang="EN">
> <xsdxt:code
> href="../api_samples/agent-update-put-resp.json"/>
> </doc>
> </representation>
> </response>
> </method>
>
> Can someone confirm or deny that I'm on the right track? Does the
> method look correct? Wanted to see if I was on the right track before I
> spend too much time working on the code.
>
>
> Kersten J. Richter
> Software Engineer
> IBM, Rochester
> Home office: 952-652-5304
>
> If you lend someone $20 and never see that person again, it was probably
> worth it.
>
>
> _______________________________________________
> Openstack-docs mailing list
> Openstack-docs at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>
More information about the Openstack-docs
mailing list