You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Darren Shepherd <da...@gmail.com> on 2013/10/28 00:49:35 UTC

cloudmonkey exit value

It would be really nice if the API failed if cloudmonkey exited with
!=0 exit code.  I've been scripting some stuff with cloud monkey and
this makes it difficult.  It would also be nice to somehow specific
which field you want printed.  So when I do a create command I can say
just echo id value only.  Would make my scripts much easier.

Darren

Re: cloudmonkey exit value

Posted by Darren Shepherd <da...@gmail.com>.
First, I care more about the exit code working. 

I want just the value.  So currently I have

cloudmonkey set color false
cloudmonkey createVM ... | grep ^id | awk -F' = ' '{print $2}'

Darren

> On Oct 27, 2013, at 9:48 PM, Prasanna Santhanam <ts...@apache.org> wrote:
> 
>> On Sun, Oct 27, 2013 at 04:49:35PM -0700, Darren Shepherd wrote:
>> It would be really nice if the API failed if cloudmonkey exited with
>> !=0 exit code.  I've been scripting some stuff with cloud monkey and
>> this makes it difficult.  It would also be nice to somehow specific
>> which field you want printed.  So when I do a create command I can say
>> just echo id value only.  Would make my scripts much easier.
> you can pipe with grep?
> $ cloudmonkey createCommand | grep id
> 
>> Darren
> 
> -- 
> Prasanna.,
> 
> ------------------------
> Powered by BigRock.com
> 

Re: cloudmonkey exit value

Posted by Prasanna Santhanam <ts...@apache.org>.
On Sun, Oct 27, 2013 at 04:49:35PM -0700, Darren Shepherd wrote:
> It would be really nice if the API failed if cloudmonkey exited with
> !=0 exit code.  I've been scripting some stuff with cloud monkey and
> this makes it difficult.  It would also be nice to somehow specific
> which field you want printed.  So when I do a create command I can say
> just echo id value only.  Would make my scripts much easier.
> 
you can pipe with grep?
$ cloudmonkey createCommand | grep id

> Darren

-- 
Prasanna.,

------------------------
Powered by BigRock.com


Re: cloudmonkey exit value

Posted by Sebastien Goasguen <ru...@gmail.com>.
On Oct 27, 2013, at 7:49 PM, Darren Shepherd <da...@gmail.com> wrote:

> It would be really nice if the API failed if cloudmonkey exited with
> !=0 exit code.  I've been scripting some stuff with cloud monkey and
> this makes it difficult.  It would also be nice to somehow specific
> which field you want printed.  So when I do a create command I can say
> just echo id value only.  Would make my scripts much easier.
> 

you can add a filter but it does not seem to work outside of json and table display:

> list zones filter=id
count = 1
zone:
+--------------------------------------+
|                  id                  |
+--------------------------------------+
| 1128bd56-b4d9-4ac6-a7b9-c715b187ce11 |
+--------------------------------------+

> set display json
> list zones filter=id
{
  "count": 1,
  "zone": [
    {
      "id": "1128bd56-b4d9-4ac6-a7b9-c715b187ce11"
    }
  ]
}

> set display raw
> list zones filter=id
count = 1
zone:
name = CH-GV2
id = 1128bd56-b4d9-4ac6-a7b9-c715b187ce11
allocationstate = Enabled
dhcpprovider = VirtualRouter
localstorageenabled = True
networktype = Basic
securitygroupsenabled = True
zonetoken = ccb0a60c-79c8-3230-ab8b-8bdbe8c45bb7

> Darren