users@glassfish.java.net

Re: Improving asadmin interactive mode

From: Masoud Kalali <kalali_at_gmail.com>
Date: Fri, 14 Jul 2006 23:49:44 +0430

I vote yes to have interactive mode for asadmin commands.
i think having a parameter like --interactive could be very helpful ,
people can use --interactive when they want the script execution to ask
parameter from keyboard or use none interactive for automated script
execution.



Jerome Dochez wrote:
> I vote for Yes, seems to me that when you request interactive mode,
> you should be prompted for all the required options you did not
> specify on the command line.
>
> For instance in your example below, i wonder why --connectionpoolid is
> "more" required than admin user name/password for entering interactive
> mode...
>
> Jerome
>
> On Jul 10, 2006, at 4:49 PM, Jane Young-Lau wrote:
>
>> Hi All,
>>
>> I'd like to solicit your opinion on how CLI (asadmin) prompts for
>> options.
>>
>> Currently, if --interactive is true, asadmin would prompt for the
>> user and password. It does not prompt for the required options.
>>
>> For example, let's take create-jdbc-resource command:
>> >asadmin create-jdbc-resource --interactive jdbc_resource
>> CLI014 connectionpoolid is a required option.
>>
>> Though --interactive is true, the command fails since it requires
>> that you enter --connectionpoolid option on the command line. If you
>> provide the --connectionpoolid option, the command will prompt the
>> user for the user and password:
>> >asadmin create-jdbc-resource --interactive --connectionpoolid
>> testPool jdbc_resource
>> Please enter the admin user name>admin
>> Please enter the admin password>
>> Command create-jdbc-resource executed successfully.
>>
>> The user and password options are prompted since I have not login'd
>> to the domain using "asadmin login" command.
>>
>> Would you like to see that asadmin commands also prompt for the
>> required options as well as the user/password options? Would this be
>> a feature well received? Keep in mind that asadmin is mainly use
>> for scripting.
>>
>> I'd like to know the following:
>> YES - adding prompting of required options benefits the usability of
>> asadmin
>> NO - stay status quo. prompting of user/password is good enough
>> Other suggestions?
>>
>> Let me know your opinion.
>>
>> Thank you,
>> Jane
>>
>>
>


-- 
Regards , Masoud Kalali 
Software Engineer Nabh Inc.
http://weblogs.java.net/blog/kalali/