On Mon, Aug 5, 2013 at 6:19 PM, Donal Lafferty <donal.laffe...@citrix.com>wrote:

>
>
> > -----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?
>

In Python, you may use cookiejar. Another way is to bootstrap keys, i.e.
you use username:password to login and create api and secret keys. And then
use the keys to store them. In case keys exist, we load the api and secret
keys in memory in the config{} dictionary.


>
> 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?
>

+1


>
> >
> > >
> > > 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"' `
>

Cool.

Sorry for my late reply, I think moving forward I may not be even able to
work on CloudStack during all weekends, so I would love if someone could
lead this component though I'll be here.

Regards.


>
>
> > Regards.
>

Reply via email to