[Xorp-hackers] show commands

Kristian Larsson kristian@juniks.net
Sun, 23 Oct 2005 15:52:28 +0200


On Mon, Oct 17, 2005 at 02:16:44PM -0700, Pavlin Radoslavov wrote:
> > > > Another thing on my mind; I know this has been
> > > > brought up before, I even think there is a
> > > > BugZilla entry for it, but shouldn't show commands
> > > > be available all the time?
> > > > If you start rtrmgr with a clean configuration
> > > > there are almost no show commands at all. This
> > > > confused me and I know it has others as well. If
> > > > the "%module bgp" line is removed, the bgp
> > > > commands appear and if run when bgp isn't started
> > > > you simply get a "No BGP exists" which IMHO is
> > > > much better than not seing the show command at
> > > > all.
> > > > 
> > > > Other opinions?
> > > 
> > > Why a command should be in the tree if it cannot do anything?
> > > This is a feature that was explicitly added to XORP, and my personal
> > > preference is to keep it.
> > It's probably most old habit. I'm used to having
> > all the configuration commands available.
> > "show bgp *" is not such a good example, a better
> > one would be "show interfaces". It's always nice
> > to have some of these show commands so that you
> > can easily get a grip on the router.
> > 
> > > Simply removing the "%module foo" line is not the right thing
> > > because without that line the external command will be executed
> > > anyway, and the result may be unpredictable.
> > Ah. The external command would need some error
> > handling, yes.
> > 
> > > If many other users also prefer to always have all commands in the
> > > tree and to see the "No foo exists" message, then ideally this
> > > feature should be configurable. Unfortunately, we don't have a
> > > mechanism (yet) to configure things like this.
> > I have given it some thought, and I think you're
> > right with a few exceptions such as the "show
> > interfaces" command. What's your opinion on the
> > "show interfaces" command? 
> 
> The "show interfaces" command obtains the information from the FEA
> (to be more specific, from the module named "interface" that is
> inside the FEA), hence if the FEA is not running the "show interfaces"
> command won't be there. Practically all XORP modules depend
> (directly or indirectly) on the "interface" module inside the FEA so
> the "show interfaces" command should be almost always there. Only if
> you are running XORP with an empty configuration for example, then
> you won't see that command.
This makes sense however:
 XORP> create fea
 XORP> commit
 XORP> exit
 Xorp> show interfaces
 Xorp>

imho, "show interfaces" should list all interfaces
available on the system, not just the ones
configured. On systems such as FreeBSD where the
interfaces are named fxp,em,xl and so forth it
becomes a guess work to configure a interface.
I understand from a development perspective it's
much easier to just list the ones configured but I
really think this should be changed to include all
interfaces.

   Kristian.