[Openstack-docs] code to build api methods

Kersten J Richter kersten at us.ibm.com
Tue Oct 22 14:35:31 UTC 2013


Thank you for your response.

Forgot the opening request! - added that into the logic.  This specific
example didn't have any parameters so they are not included.  I will be
looking at that piece later.

As to this being a fragment, yes I know that.  Obviously the methods need
to be put together into a single wadl file.  That is part of my question -
if I created a program that transformed the first bit of code into the
second, then is that even helpful?  I don't want to spend time on something
that isn't going to be useful.


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.



From:	David Cramer <david.cramer at rackspace.com>
To:	Kersten J Richter/Rochester/IBM at IBMUS,
            <openstack-docs at lists.openstack.org>,
Date:	10/21/2013 10:14 PM
Subject:	Re: [Openstack-docs] code to build api methods



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
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20131022/1388c570/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20131022/1388c570/attachment.gif>


More information about the Openstack-docs mailing list