cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prasanna Santhanam <prasanna.santha...@citrix.com>
Subject Re: Review Request: Remove 2k limitation for user data on a deployVMCmd issued as an HTTP POST request
Date Wed, 24 Apr 2013 08:30:27 GMT
On Tue, Apr 23, 2013 at 02:08:09PM -0700, Vijayendra Bhamidipati wrote:
> Hi Prasanna,
> 
> Thanks for catching the absence of license in the new file - I'll make the required changes.
> 
> Regarding the POST, the whole query needs to be sent in as a POST
> query and not only the userdata as POST data, because CS APIs are
> supposed to work with either GET or POST. The doGet() and doPost()
> httpservlet routines in the mgmt. server's ApiServlet.java will
> process them in the appropriate way. The integration port code path
> also calls into the same code path that the latter routines call
> into.

Ok - because you said the following to Rohit on this thread, I changed marvin
to allow POST only in the body and the rest of the args as params in the url
GET-style. Is it something you decided against later?  

"""
Yes, the POST will be handled by ApiServlet's doPost() only, and the userdata
will need to be put into the POST body.
"""

I'm ok with your implementation however and have applied it with changes to
your test. I also added an additional test to do the userdata via GET. The
tests will run on both devcloud and simulator. 

These are the rebased commits on master:
4e9e7937ed5e56cbd7f678b2ed9863a56af16635 Fix Vijay's test to use the marvin integratin libararies
b0caae6b33347f36721f28dca1fa12e7b18f1cd1 CLOUDSTACK-1086: DeployVirtualMachine userdata enhancements

~/workspace/cloudstack/incubator-cloudstack(branch:master) ยป nosetests --with-marvin --marvin-config=setup/dev/advanced.cfg
test/integration/component/test_deploy_vm_with_userdata.py --load --pdb
Test userdata as GET, size > 2k ... ok
Test userdata as POST, size > 2k ... ok

----------------------------------------------------------------------
Ran 2 tests in 15.791s

OK

I have another related request on how to handle this for marvin, apidocs and
cloudmonkey. Will raise a separate thread on that.

Thanks,

-- 
Prasanna.,

Mime
View raw message