You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by ilya musayev <il...@gmail.com> on 2014/03/26 17:55:57 UTC
CloudMonkey - Exit Status and Print Parameters Support
Hi Rohit,
What is your thought on tracking exit code of CloudMonkey, as it stands
- even if CloudMonkey prints "Error:" message, no exit code is passed
back to a shell.
I know this may conflict if someone is using interactive shell, but
perhaps we can have a batch mode that can push exit codes to a shell?
One other suggestion, as it stands if i do list zone (or any other
object), i get a list of 10-20 parameters, while i can grep through what
i need, it is rather painful and in some cases - grep just does not work
because of funky unseen chars i assume. It would be nice to have on
option that only prints user chosen parameters.
Example, cloudmonkey list zones :print id,dns,something-else - or any
other way - as long as we get this functionality.
Thanks
ilya
Re: CloudMonkey - Exit Status and Print Parameters Support
Posted by Jeff Hair <je...@greenqloud.com>.
CloudMonkey should obey the standard rules for exit statuses. It would help
especially with error detection from async jobs. If an error result is
returned, non-zero exit status. Better than analyzing the JSON contents
programmatically anyway.
On Wed, Mar 26, 2014 at 4:55 PM, ilya musayev
<il...@gmail.com>wrote:
> Hi Rohit,
>
> What is your thought on tracking exit code of CloudMonkey, as it stands -
> even if CloudMonkey prints "Error:" message, no exit code is passed back to
> a shell.
> I know this may conflict if someone is using interactive shell, but
> perhaps we can have a batch mode that can push exit codes to a shell?
>
> One other suggestion, as it stands if i do list zone (or any other
> object), i get a list of 10-20 parameters, while i can grep through what i
> need, it is rather painful and in some cases - grep just does not work
> because of funky unseen chars i assume. It would be nice to have on option
> that only prints user chosen parameters.
>
> Example, cloudmonkey list zones :print id,dns,something-else - or any
> other way - as long as we get this functionality.
>
> Thanks
> ilya
>
Re: CloudMonkey - Exit Status and Print Parameters Support
Posted by sebgoa <ru...@gmail.com>.
On Mar 28, 2014, at 6:46 PM, ilya musayev <il...@gmail.com> wrote:
> Hi Sebastian,
>
> I tried, does not do anything.
strange, I use it all the time.
>
> Regards
> ilya
>
> On 3/26/14, 10:13 AM, Sebastien Goasguen wrote:
>> On Mar 26, 2014, at 12:55 PM, ilya musayev <il...@gmail.com> wrote:
>>
>>> Hi Rohit,
>>>
>>> What is your thought on tracking exit code of CloudMonkey, as it stands - even if CloudMonkey prints "Error:" message, no exit code is passed back to a shell.
>>> I know this may conflict if someone is using interactive shell, but perhaps we can have a batch mode that can push exit codes to a shell?
>>>
>>> One other suggestion, as it stands if i do list zone (or any other object), i get a list of 10-20 parameters, while i can grep through what i need, it is rather painful and in some cases - grep just does not work because of funky unseen chars i assume. It would be nice to have on option that only prints user chosen parameters.
>>>
>>> Example, cloudmonkey list zones :print id,dns,something-else - or any other way - as long as we get this functionality.
>>>
>> list zones filter=id,name
>>
>> try that :)
>>
>>> Thanks
>>> ilya
>
Re: CloudMonkey - Exit Status and Print Parameters Support
Posted by Rohit Yadav <bh...@apache.org>.
Ilya, can you check/share your cloudmonkey version? Probably you can
uninstall and reinstall latest cloudmonkey (sometimes pip upgrades may not
work due to compiled pyc files in the path). `filter` was added in
cloudmonkey several months (maybe one year?) ago and should work, unless
the problem is somewhere else. Also, I'm not sure if `filter` works on
other output display types (there was a json output added many moons ago,
on which I had not tested `filter`).
Hope this helps.
On Fri, Mar 28, 2014 at 11:16 PM, ilya musayev <ilya.mailing.lists@gmail.com
> wrote:
> Hi Sebastian,
>
> I tried, does not do anything.
>
> Regards
> ilya
>
>
> On 3/26/14, 10:13 AM, Sebastien Goasguen wrote:
>
>> On Mar 26, 2014, at 12:55 PM, ilya musayev <il...@gmail.com>
>> wrote:
>>
>> Hi Rohit,
>>>
>>> What is your thought on tracking exit code of CloudMonkey, as it stands
>>> - even if CloudMonkey prints "Error:" message, no exit code is passed back
>>> to a shell.
>>> I know this may conflict if someone is using interactive shell, but
>>> perhaps we can have a batch mode that can push exit codes to a shell?
>>>
>>> One other suggestion, as it stands if i do list zone (or any other
>>> object), i get a list of 10-20 parameters, while i can grep through what i
>>> need, it is rather painful and in some cases - grep just does not work
>>> because of funky unseen chars i assume. It would be nice to have on option
>>> that only prints user chosen parameters.
>>>
>>> Example, cloudmonkey list zones :print id,dns,something-else - or any
>>> other way - as long as we get this functionality.
>>>
>>> list zones filter=id,name
>>
>> try that :)
>>
>> Thanks
>>> ilya
>>>
>>
>
Re: CloudMonkey - Exit Status and Print Parameters Support
Posted by ilya musayev <il...@gmail.com>.
Hi Sebastian,
I tried, does not do anything.
Regards
ilya
On 3/26/14, 10:13 AM, Sebastien Goasguen wrote:
> On Mar 26, 2014, at 12:55 PM, ilya musayev <il...@gmail.com> wrote:
>
>> Hi Rohit,
>>
>> What is your thought on tracking exit code of CloudMonkey, as it stands - even if CloudMonkey prints "Error:" message, no exit code is passed back to a shell.
>> I know this may conflict if someone is using interactive shell, but perhaps we can have a batch mode that can push exit codes to a shell?
>>
>> One other suggestion, as it stands if i do list zone (or any other object), i get a list of 10-20 parameters, while i can grep through what i need, it is rather painful and in some cases - grep just does not work because of funky unseen chars i assume. It would be nice to have on option that only prints user chosen parameters.
>>
>> Example, cloudmonkey list zones :print id,dns,something-else - or any other way - as long as we get this functionality.
>>
> list zones filter=id,name
>
> try that :)
>
>> Thanks
>> ilya
Re: CloudMonkey - Exit Status and Print Parameters Support
Posted by Sebastien Goasguen <ru...@gmail.com>.
On Mar 26, 2014, at 12:55 PM, ilya musayev <il...@gmail.com> wrote:
> Hi Rohit,
>
> What is your thought on tracking exit code of CloudMonkey, as it stands - even if CloudMonkey prints "Error:" message, no exit code is passed back to a shell.
> I know this may conflict if someone is using interactive shell, but perhaps we can have a batch mode that can push exit codes to a shell?
>
> One other suggestion, as it stands if i do list zone (or any other object), i get a list of 10-20 parameters, while i can grep through what i need, it is rather painful and in some cases - grep just does not work because of funky unseen chars i assume. It would be nice to have on option that only prints user chosen parameters.
>
> Example, cloudmonkey list zones :print id,dns,something-else - or any other way - as long as we get this functionality.
>
list zones filter=id,name
try that :)
> Thanks
> ilya
RE: CloudMonkey - Exit Status and Print Parameters Support
Posted by Alex Huang <Al...@citrix.com>.
I prefer having exit codes. Is always nicer to use that than to grep for error messages.
--Alex
> -----Original Message-----
> From: ilya musayev [mailto:ilya.mailing.lists@gmail.com]
> Sent: Wednesday, March 26, 2014 9:56 AM
> To: Rohit Yadav; dev@cloudstack.apache.org
> Subject: CloudMonkey - Exit Status and Print Parameters Support
>
> Hi Rohit,
>
> What is your thought on tracking exit code of CloudMonkey, as it stands
> - even if CloudMonkey prints "Error:" message, no exit code is passed back to
> a shell.
> I know this may conflict if someone is using interactive shell, but perhaps we
> can have a batch mode that can push exit codes to a shell?
>
> One other suggestion, as it stands if i do list zone (or any other object), i get a
> list of 10-20 parameters, while i can grep through what i need, it is rather
> painful and in some cases - grep just does not work because of funky unseen
> chars i assume. It would be nice to have on option that only prints user
> chosen parameters.
>
> Example, cloudmonkey list zones :print id,dns,something-else - or any other
> way - as long as we get this functionality.
>
> Thanks
> ilya