[Openstack-docs] code to build api methods

Kersten J Richter kersten at us.ibm.com
Mon Oct 21 21:22:30 UTC 2013




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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20131021/e65c9604/attachment-0001.html>


More information about the Openstack-docs mailing list