admin@glassfish.java.net

Re: --echo

From: Jane Young <Jane.Young_at_Sun.COM>
Date: Tue, 11 Aug 2009 10:20:13 -0700

I think it's beneficial to print out the environment variables but only
for the options that are used in the command.
Kedar, what is reasoning behind leaving out the environment variables?
In v2, the environment variables are printed with the --echo option.

Instead of adding a new commands, "getoptions" and "setoptions" for the
default values in multimode, is it possible to use the "export" command
and make the default values as the environment variables in multimode.
e.g.

$asadmin --host localhost --port 4848 --user admin --echo true multmode
asadmin>export
AS_ADMIN_HOST=localhost
AS_ADMIN_PORT=4848
AS_ADMIN_USER=admin
AS_ADMIN_ECHO=true
asadmin>version --verbose true
....

To change the default value, use export command:
asadmin>export AS_ADMIN_USER=foobar AS_ADMIN_PORT=8484
asadmin>version --verbose true

To change generic option w/o modifying the environment varialbe:
asadmin>version --echo false --verbose

Will this work?

Jane




Bill Shannon wrote:
> Jane Young wrote on 8/11/09 1:54 AM:
>
>> cc'ing Sankar and Lidia.
>> I know Lidia used the --echo option in v2.
>> Please comment in how you'd like to see the output format of --echo option.
>>
>> Bill, more questions. Your proposal of the output format:
>>
>> $ asadmin --echo version
>> asadmin program options: --host localhost --port 4848 --terse false
>> --interactive true --secure false --echo false
>> command: version --verbose false
>>
>> Does this also include the environment variables?
>>
>
> It was Kedar's proposal, but...
>
> Currently --echo doesn't print environment variables, but it does take them
> into account when printing out the effective options.
>
> What would you *want* it to do?
>
>
>> Also, is it possible to not print out "asadmin <generic options>" in
>> multimode while in singlemode print out "asadmin <generico-option>" if
>> --echo=true?
>>
>
> Hmmm... Well, it's only software, so it's always possible, but right
> now there's no globally available notion of "in multimode". It could
> be added, of course.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>
>