Thanks very much for the valuable feedback! cc-ing some folks
who may have some memory of the history made behind choices made
in dladm.
> Well, ipamd is probably a good idea, however, IMHO the syntax is to noisy
> aka redundant and should be oriented to zfs commands - the comamnds,
> which are usually much more used, than any other multi-command aka
> 'command line tools with sub-commands to be able to better document valid
> switch/option combinations'.
>
> In detail: It looks like, that ipadm cmd is always related to a specific
> interface. So why the cluttering '-interface' at the end of create, modify?
well, the reason was two-fold: the first is that we were following
the verb-object model set up for dladm, which itself was done because
we could have commands down the road that create other objects. In the
case of dladm, there are commands like create-vlan, create-aggr, etc.
In the case of ipadm, even now we have modify-interface versus
modify-address. Thus in the interest of uniformity we adopted that model.
I'd like to hear other opinions on this- if we consider the IP interface
as the object targetted for ipadm, is there some benefit in
optimizing out the "-interface" suffix for ipadm create/delete?
> Similar thing with address related stuff. If the command is related to a
> specific address of an interface, this is already indicated by the '-a'
> switch. So why the '-address' noise at the end of of add, delete? OK,
> there is one exception wrt. to delete all addr from an interface. But
> allowing an '-a all' analog to 'zfs list -t all' shouln't be too
> challenging ...
but 'delete-address -a all' is just an alias for 'delete-interface',
right? And while I randomly chose "-a" for the flag (it may have been
better to choose -o, just like the create-interface command), it's
very possible that some other command that is added to ipadm in the
future also has a -a flag.
> Next thing is the set,show,init subcmd. It seems to be always related to a
> "property". So why the noisy '-prop' at the end of the command and why
> than the '-p' switch again ? What is the problem with
> ipadm {set|get|init} key[=value] ...
I think Meem may have some input on this- I believe he's mentioned
in the past that the analogous set-linkprop command for dladm was
arrived upon after some debate..
> Of course, the 'show' subcmd mimics some CLIs seen on certain
> Switches/Routers, however, I would prefer an alias named 'list' ...
Interesting viewpoint. That makes it like the zfs/zone commands,
but unlike the trend in dladm.
> Last but not least I don't like the mandatory -P ... Isn't the utility
> able to find out, what should be used if omitted aka able to use
> reasonable defaults? E.g. if an IPv6 addr or -if6_intf_id is specified,
> it implies -P v6. If an IPv4 addr is specified, type should default to v4
> if not specified otherwise, etc. ...
But then what happens if I do
# ipadm create-interface -o ipmp,group=tester ipmp0
or even
# ipadm create-interface link0
Do I mean v4? or v6? One option is to assume V4, unless v6 is explicitly
specified (ifconfig follows this model) but I hesitated to do this
because it makes V6 an exception case.
--Sowmini
_______________________________________________
networking-discuss mailing list
[email protected]