Feature #2542
closedRedesign nfdc combining nfdc and nfd-status
Added by Alex Afanasyev almost 10 years ago. Updated over 7 years ago.
100%
Description
nfd-status
can be merged into nfdc
, because StatusDataset is the result of executing ControlCommands.
This could reduce confusion for new users and reduce the need to learn multiple commands to control and getting status.
This issue designs the new nfdc
program. Implementation will be separate issues.
https://gist.github.com/yoursunny/89de673e0811fecdf54985bf519803d2
Updated by Junxiao Shi almost 10 years ago
This could reduce confusion for new users and reduce the need to learn multiple commands
This claim needs to be proved by a user study or survey.
ip
did a good job as a combined tool.
Its syntax mostly uses positional parameters, with an extensive online help
command.
netsh
for Windows and asterisk
are also good combined tools.
They are like command interpreters to control all aspects of Windows network drivers / the telephony server.
ssh-keygen
is a not-so-good combined tool.
The feature is entirely selected by named flags, and I had to look at manpage every time I need to use any parameter.
We could make nfdc
like the good combined tools, but it requires changing command syntax (but old syntax can be accepted) and major refactoring, and would become a much larger Task than just combining. Merely combining the tools doesn't have much value.
Updated by Junxiao Shi over 8 years ago
- Tracker changed from Task to Feature
- Subject changed from (Proposal) Combine nfdc with nfd-status to Combine nfdc with nfd-status
- Description updated (diff)
- Category set to Tools
- Estimated time set to 9.00 h
Updated by Junxiao Shi over 8 years ago
https://gist.github.com/yoursunny/89de673e0811fecdf54985bf519803d2/057412b85da47b27032e121db97404a87b0fb136 has a design for the interactions and input/output formats.
I think that's the way it should be.
Full implementation of this design is estimated to be 24 hours, but it can be done in stages.
Updated by Junxiao Shi over 8 years ago
20160809 call Alex approves note-4 design.
Updated by Davide Pesavento over 8 years ago
I like the command line syntax, it is uniform and easily extensible. It seems to be modeled after tools like ip
and iw
, which I consider well-designed.
I'm questioning the need for an interactive mode though... do we really need it? how much typing would it save? My guess is very little. Command completion doesn't require an interactive mode, bash and zsh support programmable completions and we could implement completion scripts for them.
In any case, if the interactive mode is implemented, I suggest not to reinvent the wheel, and use a library such as GNU readline to support proper command line editing, history, and completion.
Wrt the output format: how does the above design relate to feature #3444? Should we have an explicit flag for outputting in a stable and parseable format, e.g. --machine-readable
, or --porcelain
à la git? Given that we already have optional XML output for status
, the formatter component should already be modular, no? Someone may even want to add JSON output at some point...
Updated by Davide Pesavento over 8 years ago
- Estimated time changed from 9.00 h to 26.00 h
Adjusting based on note-4 (24 hours for the implementation + 2 hours already spent for the design)
Updated by Junxiao Shi over 8 years ago
- Subject changed from Combine nfdc with nfd-status to Redesign nfdc combining nfdc and nfd-status
- Description updated (diff)
- Status changed from New to In Progress
- Assignee set to Junxiao Shi
- Target version set to v0.5
- % Done changed from 0 to 50
- Estimated time changed from 26.00 h to 3.00 h
A "24 hours" estimation indicates that the implementation should not be in a single issue.
It's generally recommended to have smaller tasks on the order of 3~6 hours.
I'm reducing this issue to be design only, and will create separate implementation issues once we have a plan.
Updated by Junxiao Shi over 8 years ago
The command line syntax is modeled after ip
and nmcli
and netsh
.
I'm questioning the need for an interactive mode though. Command completion doesn't require an interactive mode, bash and zsh support programmable completions and we could implement completion scripts for them.
The design has interactive mode, but its implementation would be lower priority.
And yes, bash completion is an alternate to interactive mode.
Wrt the output format: how does the above design relate to feature #3444? Should we have an explicit flag for outputting in a stable and parseable format, e.g.
--machine-readable
, or--porcelain
à la git?
It's premature to define a stable output format, because fields returned from commands and datasets change from time to time.
A syntax that is both human-friendly and machine-readable should be good enough; it's not guaranteed to be stable between versions, but it's easier to parse than the old format which has whitespaces everywhere.
Updated by Junxiao Shi over 8 years ago
- Description updated (diff)
- % Done changed from 50 to 70
https://gist.github.com/yoursunny/89de673e0811fecdf54985bf519803d2/387f65ef84bc359b5f7dcea1504f69dbf03b5c2e adds a partial implementation plan for:
- combine tool and new syntax (9 hours)
- new output format (4.5 hours each for
face
strategy
route
, plus additional time to fix NFD-integ accordingly) help
command (3 hours)- batch mode (3 hours)
I didn't include:
- interactive mode
- deletion of
add-nexthop
andremove-nexthop
commands
Updated by Junxiao Shi over 8 years ago
- Related to Feature #3749: nfdc one-shot mode added
Updated by Junxiao Shi about 8 years ago
https://gist.github.com/yoursunny/89de673e0811fecdf54985bf519803d2/34806a5e9876ed03f00c03e605893ebe728c1dca renames fib-entry list
to fib list
, and also corrects a typo.
Updated by Junxiao Shi about 8 years ago
- Related to Feature #3780: nfdc status commands added
Updated by Junxiao Shi almost 8 years ago
- Related to Feature #3864: nfdc face commands added
Updated by Junxiao Shi almost 8 years ago
- Related to Feature #3865: nfdc strategy commands added
Updated by Junxiao Shi almost 8 years ago
- Related to Feature #3866: nfdc route commands added
Updated by Junxiao Shi over 7 years ago
- Status changed from In Progress to Closed
- % Done changed from 70 to 100
Closing because design is done.
Updated by Junxiao Shi about 7 years ago
- Has duplicate Feature #3444: Human friendly output of nfdc command added
Updated by Davide Pesavento over 3 years ago
- Related to Feature #5169: nfdc: execute a batch of commands defined in a separate file added