> -----Original Message-----
> From: rohityada...@gmail.com [mailto:rohityada...@gmail.com] On Behalf
> Of Rohit Yadav
> Sent: 02 August 2013 22:43
> To: dev@cloudstack.apache.org
> Subject: Re: [Discuss] Making CloudMonkey simpler to use for admin tasks
> 
> On Thu, Aug 1, 2013 at 10:43 PM, Donal Lafferty
> <donal.laffe...@citrix.com>wrote:
> 
> > I needed a different configuration than DevCloud provided, so I turned
> > to CloudMonkey to automate setup of my test environment.
> >
> > This led to a blog on automating with CloudMonkey at
> > http://dlafferty.blogspot.co.uk/2013/07/using-cloudmonkey-to-automate.
> > html
> >
> >
> Nice.
> 
> 
> > What I forgot to mention is that automation would be a lot simpler if
> > we were to do the following:
> >
> > 1.       Update Apache CloudStack logging to provide API calls in a tidy
> > format that can be fed directly.  E.g. POST parameters are not logged,
> > GET parameters are URL encoded.
> >
> > 2.       Update CloudMonkey to allow username / password authentication
> >
> 
> +1, send patch :)
> 
How would you store the sessionkey?

E.g. see written in C#:  
https://github.com/lafferty/cloudstack_dotnetsdk/blob/master/CloudStack.SDK/client.cs

Specifically, see public void Login(string userName, string password, string 
domainName, bool hashPassword)

> 
> >
> > 3.       Update CloudMonkey to not be picky about the case of command
> > parameters when 'api' command used.
> >
> 
> +1, send patch :)
> 

This is a one liner change, no?

> 
> >
> > 4.       Update CloudMonkey to allow filter option to be used with 'api'
> > command.
> >
> 
> How do you propose using that, example?
> 

Example:

apiresult=`cloudmonkey api createPhysicalNetwork zoneid=$zone name='"Physical 
Network 1"' isolationmethods='"VLAN"' `
physnetid=`echo $apiresult | sed -e 's/^.*"id": //; s/,.*//'`

becomes

physnetid =`cloudmonkey filter=id api createPhysicalNetwork zoneid=$zone 
name='"Physical Network 1"' isolationmethods='"VLAN"' `


> Regards.

Reply via email to