Re: [Openstack] describing APIs for OpenStack consumers

2011-11-14 Thread Rupak Ganguly
Is the WADL for Nova and or its extensions available somewhere to look at? Thanks, Rupak Ganguly Ph: 678-648-7434 On Fri, Oct 28, 2011 at 3:17 AM, Bryan Taylor btay...@rackspace.com wrote: On 10/27/2011 05:52 PM, Mark Nottingham wrote: Generating WADL (or anything else) from code is fine,

Re: [Openstack] describing APIs for OpenStack consumers

2011-11-14 Thread Anne Gentle
Hi Rupak - You can get a copy of the Compute API WADL files at https://github.com/openstack/compute-api/tree/master/openstack-compute-api-1.1/src Anne On Mon, Nov 14, 2011 at 2:21 PM, Rupak Ganguly rup...@gmail.com wrote: Is the WADL for Nova and or its extensions available somewhere to look

Re: [Openstack] describing APIs for OpenStack consumers

2011-11-14 Thread Jorge Williams
The core API WADL is here: https://github.com/openstack/compute-api/blob/master/openstack-compute-api-1.1/src/os-compute-1.1.wadl Keystone also has a number of WADLs here: https://github.com/openstack/keystone/tree/master/keystone/content -jOrGe W. On Nov 14, 2011, at 2:21 PM, Rupak Ganguly

Re: [Openstack] describing APIs for OpenStack consumers

2011-11-14 Thread Rupak Ganguly
Hi Anne/Jorge, Thanks a lot for the links. Thanks, Rupak Ganguly Ph: 678-648-7434 On Mon, Nov 14, 2011 at 3:50 PM, Jorge Williams jorge.willi...@rackspace.com wrote: The core API WADL is here:

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-28 Thread Bryan Taylor
On 10/27/2011 05:52 PM, Mark Nottingham wrote: Generating WADL (or anything else) from code is fine, as long as we have the processes / tools (e.g., CI) in place to assure that a trivial code change doesn't make a backwards-incompatible change in what we expose to clients. You bring up a

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-27 Thread Nati Ueno
Hi folks I tried to generate WADL from nova code. I could get all resource URI and method from Routes object. However, I could not get input parameters from code. (The api method accesses body argument directly. This is also bad for input validation QA effort.) But If we use some annotations, it

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-27 Thread Kevin L. Mitchell
On Thu, 2011-10-27 at 10:50 -0700, Nati Ueno wrote: I tried to generate WADL from nova code. I could get all resource URI and method from Routes object. However, I could not get input parameters from code. (The api method accesses body argument directly. This is also bad for input validation

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-27 Thread Sandy Walsh
@lists.launchpad.net] on behalf of Nati Ueno [nati.u...@gmail.com] Sent: Thursday, October 27, 2011 2:50 PM To: Ziad Sawalha Cc: openstack@lists.launchpad.net Subject: Re: [Openstack] describing APIs for OpenStack consumers Hi folks I tried to generate WADL from nova code. I could get all resource URI

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-27 Thread Mark Nottingham
Generating WADL (or anything else) from code is fine, as long as we have the processes / tools (e.g., CI) in place to assure that a trivial code change doesn't make a backwards-incompatible change in what we expose to clients. Do we? (really, we should have these in place regardless of how

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-26 Thread Anne Gentle
All, Thanks to the generosity of Oxygen in supporting open source projects, you can edit XML within the Oxygen Author or Editor by downloading a copy of the software from http://www.oxygenxml.com/. Send an email to support @ oxygenxml dot com requesting the license extension beyond the 30-day

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-26 Thread Jay Pipes
On Tue, Oct 25, 2011 at 6:34 PM, Caitlin Bestler caitlin.best...@nexenta.com wrote: WADL sounds like a wonderful validation tool. But shouldn’t our primary goal be finding a consistent way to describe the APIs for *application developers*. Syntax tools, whether ancient notations like BNF or

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-26 Thread Jay Pipes
On Wed, Oct 26, 2011 at 11:48 AM, Kevin L. Mitchell kevin.mitch...@rackspace.com wrote: On Tue, 2011-10-25 at 15:30 -0700, Joseph Heck wrote: It sounds like even though most of us hate WADL, it's what we're expending effort after to make a consolidated API set. So unless Nati and Ravi want to

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-26 Thread Kevin L. Mitchell
On Wed, 2011-10-26 at 12:14 -0400, Jay Pipes wrote: That's fine for generating a WADL for existing APIs that are already implemented. Not so good for proposed APIs ;) Oh, certainly, but there the auto-generation could be used to verify that the code implements the proposed API :) -- Kevin L.

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-26 Thread Matt Dietz
To answer this, yes, it's possible. Rails does it already, in some fashion. They have some convention for generating all routes, which I think is one of the most important take aways here, and they provide a DSL for implementing other routes very easily. From there, one could readily generate the

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-26 Thread Monsyne Dragon
On Oct 26, 2011, at 10:48 AM, Kevin L. Mitchell wrote: On Tue, 2011-10-25 at 15:30 -0700, Joseph Heck wrote: It sounds like even though most of us hate WADL, it's what we're expending effort after to make a consolidated API set. So unless Nati and Ravi want to switch to using Swagger (or

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-26 Thread Ziad Sawalha
So you would do a diff if the generated WADL against the expected WADL. That would mean we use both. I think that's a reasonable approach. On Oct 26, 2011, at 12:31 PM, Monsyne Dragon mdra...@rackspace.com wrote: On Oct 26, 2011, at 10:48 AM, Kevin L. Mitchell wrote: On Tue, 2011-10-25

[Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Joseph Heck
I expect this is going to open a nasty can of worms... today we don't have a consistent way of describing the APIs for the various services. I saw Nati's bug (https://launchpad.net/bugs/881621), which implies that all the services should have a WADL somewhere describing the API. I'm not a huge

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Anne Gentle
Hi all - Would also love Swagger. Nati looked into it and he thought it would require a Python client generator, based on reading that Client generators are currently available for Scala, Java, Javascript, Ruby, PHP, and Actionscript 3. So in the meantime the QA list and Nati suggested WADL as a

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Nati Ueno
Hi Joe, Anne I'm working on WADL of Openstack Diablo in order to generate both of Test List and API docs from WADL. I wrote simple script which generate a simple api list from WADL. It is very helpful. Nova and Keystone has WADL, and Ravi@HP is working for glance. Nova's WADL is inconsistent

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Daryl Walleck
Hi everyone, This is just my opinion, but I've only found WADLs very useful when use tool based automation. To me they're a huge headache to read. To me, the current dev guide style of documentation has been far more helpful in developing automation. Daryl On Oct 25, 2011, at 3:24 PM, Anne

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Jorge Williams
Some of that dev guide documentation is generated from a WADL :-) The purpose of a WADL is that it is machine readable so it opens up a lot of possibilities, for creating docs, testing, validation, etc. -jOrGe W. On Oct 25, 2011, at 4:14 PM, Daryl Walleck wrote: Hi everyone, This is just my

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Nati Ueno
Hi Folks Daryl I know to read and write WADL is awful.. because I'm working on that. My main point is for clear specs. Current docs are very helpful, but it is not includes clear specs (parameter structures and types). Jorge Sounds Great My review request is

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Joseph Heck
Which dev docs and how? I haven't spotted those scripts or systems... -joe On Oct 25, 2011, at 2:58 PM, Jorge Williams wrote: Some of that dev guide documentation is generated from a WADL :-) The purpose of a WADL is that it is machine readable so it opens up a lot of possibilities, for

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Joseph Heck
It sounds like even though most of us hate WADL, it's what we're expending effort after to make a consolidated API set. So unless Nati and Ravi want to switch to using Swagger (or something else), WADL is the direction we're heading. I totally agree with Daryl that reading it is a PITA, and am

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Caitlin Bestler
WADL sounds like a wonderful validation tool. But shouldn't our primary goal be finding a consistent way to describe the APIs for *application developers*. Syntax tools, whether ancient notations like BNF or the latest XML concoction only tell you the syntax of the operation. There also has to

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Jorge Williams
Keystone is using it more than Nova, especially to document their extensions. It's working with our existing docs tool chain. You can reference a WADL directly from the DocBook source, you can go in and reference particular resources and methods it will parse stuff out and put it in the

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Jorge Williams
Totally agree. The goal is to create narrative documents that devs can read etc. The WADL is just there to fill in the nitty gritty details in a consistent way. -jOrGe W. On Oct 25, 2011, at 5:34 PM, Caitlin Bestler wrote: WADL sounds like a wonderful validation tool. But shouldn’t our

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Joseph Heck
That's exactly what I'm poking at (and what Nati has started doing as well). I was trying to see if there was a consistent way to describe all the API endpoints that could be used to document the combined set. The raw description is clearly insufficient, so how best to create a final product

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Frans Thamura
we are working to use swagger, but i think the s/w is not working can help? F On Wed, Oct 26, 2011 at 3:24 AM, Anne Gentle a...@openstack.org wrote: Hi all - Would also love Swagger. Nati looked into it and he thought it would require a Python client generator, based on reading that Client

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Jorge Williams
The hard thing about processing a WADL is that WADLs uses links and references. For example: WADL A may refer to a method defined in WADL B, that's useful when you're defining extensions. Or WADL A may define two resources that share GET, PUT, POST operations: You see this with metadata in

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Ziad Sawalha
Hi Nati - I might be opening a can of worms here, but I thought the API spec and WADL were complete and we were working on implementing it. It sounds to me like you are doing the reverse and matching the WADL to the current state of the code. There's value in that, but i know it will cause

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Jorge Williams
The WADL should be complete for Nova. There are a couple of error fixes that I've completed but haven't pushed up yet. I'll try to get to those tomorrow and I'll look over Nachi's contributions as well. What's not done in Nova is documenting all of the extensions. I'm working on that and

Re: [Openstack] describing APIs for OpenStack consumers

2011-10-25 Thread Nati Ueno
Hi Ziad,Joe, jOrGe W. Ziad I'm agree with you. Blueprint must contain clear specs!! Current api document is not covering all accepted blueprints. As Joe mentioned, current WADL is not perfect. It is the reason of i'm reverse checking code for now. Joe Ah, it it is just a patch, I need a paper