admin@glassfish.java.net

Re: Determining GlassFish version

From: Chris Kasso <chris.kasso_at_oracle.com>
Date: Mon, 28 Jun 2010 10:01:19 -0700

I agree. The success message seems gratuitous to me. I also agree
that we should make --terse available to all remote commands.

The v3 Ref Manual defines --terse as such:

If true, output data is very concise and in a format that is optimized
for use in scripts instead of for reading by humans. Typically,
descriptive text and detailed status messages are also omitted from the
output data. Default is false.

I'm OK with this definition and it implies to me that the output is
stable (i.e. a committed interface). It would be great if we could also
indicate that normal command output (e.g. --terse=False) is not a stable
interface and that the output could change between releases. (i.e.
don't try to parse it buddy).

This doesn't mean we should gratuitously change output from release to
release but it opens the door for those cases where the need arises.

Chris


Bill Shannon wrote:
> Jane Young wrote on 06/25/2010 06:19 PM:
>> Bill Shannon wrote:
>>> Jane Young wrote on 06/25/10 05:15 PM:
>>>> In v2, if the command fails and if terse=true, then it just displays:
>>>> "Command failed" and exits with a non-zero exit code
>>>> If terse=false, then it displays the exception message
>>>> (e.getLocalizedMessage())) from the server side.
>>>> All the commands in v2 has the --terse option, similar to --echo
>>>> option.
>>>> The purpose of terse option is for CLI scripting where users wants a
>>>> terse output.
>>>
>>> Right, but do you think that was intended to apply only to the
>>> success/failure message? Or was that intended to apply to all
>>> other forms of output from the command?
>> It was intended to all other forms of output from the command, not
>> just success/failure message.
>> Unfortunately it turned out to be that way... :-(
>>>
>>> Was "terse" intended to mean "no gratuitous success/failure messages"
>>> or was it intended to mean "easy to parse in a script"?
>>>
>> Intended for easy parsing in the script.
>
> Maybe I'm alone, but I *hate* the success/failure messages, which
> seem completely gratuitous, so I always set AS_ADMIN_TERSE=true in
> my environment. I'm not sure I want it to effect all the other
> output, turning it from human readable to script parsable.
>
> Anyone else?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>