[
https://issues.apache.org/jira/browse/KARAF-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13041103#comment-13041103
]
Christian Schneider commented on KARAF-638:
-------------------------------------------
I wonder if we should use a more resouce based syntax. Currently we use the
part before the colon as a kind of domain qualifier like:
"osgi:" or "admin:". How about changing that to a resource based syntax:
For example:
"servers" instead of admin:list
"servers create" instead of admin:create
"servers.myserver" would show the details of myserver
"servers.myserver delete" instead of admin:destroy myserver
"servers.myserver stop" instead of admin:stop myserver
"servers.myserver.rmiport" would show the rmi port of myserver
"servers.myserver.rmiport 10000" would set the rmi port of myserver
So this would be a bit like rest on the command line. Tab completion could be
used to help typing the server name.
One advantage of this is that you could create nicely looking scripts to
configure stuff:
For example:
servers.myserver.rmiport 1001
servers.myserver.sshport 1022
This could even be combined with the scope ideas :
configure server.myserver
rmiport 1001
sshport 1022
exit
For sure this syntax is not applicable for all commands but I think every crud
operations around resources could benefit.
> Use the same naming convention in commands
> ------------------------------------------
>
> Key: KARAF-638
> URL: https://issues.apache.org/jira/browse/KARAF-638
> Project: Karaf
> Issue Type: Improvement
> Components: console
> Reporter: Jean-Baptiste Onofré
> Fix For: 3.0.0
>
>
> In Karaf commands, we should use the same naming convention.
> For instance, we have commands looking like:
> admin:change-rmi-server-port
> admin:change-rmi-registry-port
> dev:create-dump
> and others looking like:
> roleadd
> roledel
> features:listversions
> To be clear for the users, I propose to adopt the same naming convention for
> all commands, like:
> role-add
> role-del
> features:list-versions
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira