[jboss-as7-dev] cli commands for your subsystem

Alexey Loubyansky alexey.loubyansky at redhat.com
Fri May 4 01:54:21 EDT 2012


On 05/03/2012 09:01 PM, ssilvert at redhat.com wrote:
> The nice thing about an operation is how it is fully defined with
> metadata.  For any new operation, CLI GUI can automatically build a
> dialog and help text for it on the fly.  There is no new UI code to
> write.  Just add your operation and CLI GUI already knows how to deal
> with it.
>
> It would be really great if commands had this same metadata model.
> Maybe they do and I'm just not aware of it?

Commands are represented with org.jboss.as.cli.CommandHandler. The 
arguments are with CommandArgument. This api allows you to get the 
structure and some relationships between the arguments (some require 
others, some are optional, etc). But there are no descriptions nor type 
info. It's all in the command help. Doing it per argument seems like too 
much to me, although it could be done and the main command help could be 
generated from these pieces...

> Something else comes to mind that would be even more powerful.  A
> command is essentially a built-in script.  What if we allowed the user
> to create their own installable scripts?  The script is created with all
> of its metadata defined.  It could then be uploaded to the server and
> exposed as a command for anyone to use in CLI.

I had this idea too. That's doable.

Alexey

>
> Stan
>
> On 5/3/2012 9:40 AM, Alexey Loubyansky wrote:
>> This is meant for the subsystem owners and developers.
>>
>> For now (I think) most of the subsystem management stuff is done using
>> operations. Which sometimes might work well enough. But in some cases it
>> might be complicated, verbose, not so user-friendly, etc.
>>
>> So, if you have some management tasks (that consist of one or more
>> operations) that you'd like to make look easier and simpler for your
>> users, let's consider adding commands for those.
>> But those have to be, to a certain degree, basic things. There are
>> always batches and scripts for more complex tasks.
>> The commands will be based on the operations exposed by your subsystem.
>> So, there won't magic beyond that.
>>
>> I might not write every command for your subsystem, but I'll certainly
>> help and guide. So, if you have ideas, let me know.
>>
>> Thanks,
>> Alexey
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


More information about the jboss-as7-dev mailing list