<HTML>
<HEAD>
<TITLE>Re: [Openstack] [Nova] EC2 api testing</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>So the tempest approach I think starts to pull this EC2 validation suite into openstack to much. A goal that I think is useful is to have this not that tightly integrated with openstack, so that say cloudstack, and others can use this type of suite as well. That way everyone benefits and everyone can contribute (not just the openstack pep’s). <BR>
<BR>
I’d personally like to see the following kinds of validations/compliance checks:<BR>
<BR>
<B>Request compliance:<BR>
</B></SPAN></FONT><OL><LI><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Send in X request, expect Y response (or at least Z sub-fields of Y response) to match known “valid” response Y2<BR>
</SPAN></FONT><OL><LI><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>This means we have a need for a whole bunch of requests, a whole bunch of “valid” responses and a way to determine differences (xmlunit in java provides some of this, I don’t know of anything in python). I have created something like this (a framework) that was used for the yahoo->bing ad provider xml transtiion project stuff here, that we might be able to use.<BR>
</SPAN></FONT></OL></OL><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><B>Schema compliance:<BR>
</B></SPAN></FONT><OL><LI><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Something along the lines of validating XSDs? Amazon has about 10 versions of there api’s, which ones are u complaint with (or that kind of question is to be answered here).<BR>
</SPAN></FONT><OL><LI><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Questions as to how strict and such need to be tackled here (all the python XSD validators seem to blow up on the first error, not so useful when trying to see multiple errors)
</SPAN></FONT><LI><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><a href="https://github.com/yahoo/Openstack-EC2/tree/master/data/xsds">https://github.com/yahoo/Openstack-EC2/tree/master/data/xsds</a><BR>
</SPAN></FONT></OL></OL><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><B>Functional compliance:<BR>
</B></SPAN></FONT><OL><LI><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>This is where we start to say use boto (which itself uses a very tolerant SAX parser to create python objects) and test anything the above 2 types of tests could not accomplish (say u need a if statement to check some conditions, the above 2 ways probably won’t get that). Euca2ools runs on boto, so I would consider that the same case, but using a library might not be the best approach because then u start to run into the issue of the library is not compliant either (ie testing the library instead of the apis).<BR>
</SPAN></FONT></OL><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><B>Documentation compliance:<BR>
</B></SPAN></FONT><OL><LI><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>This is I guess where we or others document how compliant a suite “target” is and what the known issues with it are.<BR>
</SPAN></FONT></OL><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
That was my thoughts anyway :-)<BR>
<BR>
- Josh<BR>
<BR>
On 5/8/12 8:32 AM, "John Garbutt" <<a href="John.Garbutt@citrix.com">John.Garbutt@citrix.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>I am certainly up for helping with this effort.<BR>
 <BR>
I wondered about this approach:<BR>
</SPAN></FONT><SPAN STYLE='font-size:11pt'><FONT COLOR="#1F497D"><FONT FACE="Symbol">·         </FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial">Starting with Tempest (mostly for its reporting, and configuration)<BR>
<BR>
</FONT><FONT COLOR="#1F497D"><FONT FACE="Symbol">·         </FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial">Creating a new category “EC2_Compat” or something like that<BR>
<BR>
</FONT><FONT COLOR="#1F497D"><FONT FACE="Symbol">·         </FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial">Trying to add in all the tests from those two repos into the new thing<BR>
<BR>
</FONT><FONT COLOR="#1F497D"><FONT FACE="Symbol">·         </FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial">Looking at what the gaps are<BR>
<BR>
 <BR>
I am not sure it makes sense for these tests to leave in tempest, but it does seem silly to create our own set of configuration and test runner code, if we don’t have to. Seems too early to push this shared code into something like openstack-common-tests, but maybe that is what we need long term?<BR>
 <BR>
A totally different approach, that sounds attractive, is testing with some of the tools people actually want to use: boto, eucatools. However, this does then mean you end up writing N times as many tests, and it means you have to somehow pick which tools you want to test. Maybe the tests are easier to write, so the fact there is more doesn’t matter. While those tests don’t really test if we comply with ec2, maybe they do test what people care about.<BR>
 <BR>
Cheers,<BR>
John<BR>
 <BR>
<BR>
</FONT></SPAN><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'><B>From:</B> <a href="openstack-bounces+john.garbutt=eu.citrix.com@lists.launchpad.net">openstack-bounces+john.garbutt=eu.citrix.com@lists.launchpad.net</a> [<a href="mailto:openstack-bounces+john.garbutt=eu.citrix.com@lists.launchpad.net">mailto:openstack-bounces+john.garbutt=eu.citrix.com@lists.launchpad.net</a>] <B>On Behalf Of </B>Joshua Harlow<BR>
<B>Sent:</B> 07 May 2012 18:17<BR>
<B>To:</B> Doug Hellmann; Martin Packman<BR>
<B>Cc:</B> openstack<BR>
<B>Subject:</B> Re: [Openstack] [Nova] EC2 api testing<BR>
</SPAN></FONT></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>TBD afaik.<BR>
<BR>
I think it would be nice if we could have one tool  to rule them all, but I need to get my hands on this enstrsatus thingy to see what is there :-)<BR>
<BR>
I’ve started documenting some EC2 stuff that I see @ <a href="https://github.com/yahoo/Openstack-EC2/issues">https://github.com/yahoo/Openstack-EC2/issues</a> <BR>
<BR>
If others want to put stuff on there (or a better location, that’s cool with me).<BR>
<BR>
On 5/4/12 3:04 PM, "Doug Hellmann" <<a href="doug.hellmann@dreamhost.com">doug.hellmann@dreamhost.com</a>> wrote:<BR>
<BR>
<BR>
On Fri, May 4, 2012 at 1:09 PM, Martin Packman <<a href="martin.packman@canonical.com">martin.packman@canonical.com</a>> wrote:<BR>
At the Folsom Design Summit we discussed[1] trying to collaborate on a<BR>
test suite for EC2 api support. Currently nova supports the common<BR>
stuff pretty well has differing behaviour in a lot of edge cases.<BR>
Having a separate suite, along the lines of tempest, that could be run<BR>
against other existing clouds as well as OpenStack would let us test<BR>
the tests as well, and would be useful for other projects.<BR>
<BR>
Various parties have done work in this direction in the past, the<BR>
trick is going to be combining it into something we can all use. The<BR>
existing code I know about includes aws-compat[2], Openstack-EC2[3],<BR>
the tests in nova itself, some experimental code in awsome, and an<BR>
Enstratus test suite. I'm hoping to find out more about the Enstratus<BR>
code, James Urquhart suggested opening the remaining parts would be a<BR>
reasonable step. Is there anything else out there we should look at as<BR>
well?<BR>
<BR>
Are there any strong opinions over the right way of getting started on this?<BR>
<BR>
Are you going to try to get all of the code for those projects into one package, or build a meta-tool that downloads the others and uses them? I don't have an opinion one way or the other, I'm just curious.<BR>
 <BR>
Doug<BR>
<BR>
Martin<BR>
<BR>
<BR>
[1] Nova EC2 compatibility sesson etherpad<BR>
<<a href="http://etherpad.openstack.org/FolsomEC2Compatibility">http://etherpad.openstack.org/FolsomEC2Compatibility</a>><BR>
[2] <<a href="https://github.com/cloudscaling/aws-compat">https://github.com/cloudscaling/aws-compat</a>><BR>
[3] <<a href="https://github.com/yahoo/Openstack-EC2">https://github.com/yahoo/Openstack-EC2</a>><BR>
<BR>
_______________________________________________<BR>
Mailing list: <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><BR>
Post to     : <a href="openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><BR>
Unsubscribe : <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><BR>
More help   : <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>