Project

General

Profile

Actions

Feature #3749

closed

nfdc one-shot mode

Added by Junxiao Shi over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tools
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
9.00 h

Description

Merge nfdc and nfd-status into redesigned nfdc, and implement one-shot mode.

All legacy command lines are still supported, and the output format is kept for now.


Files

20160819033637.tgz (180 KB) 20160819033637.tgz integ NFD 3107,1 Junxiao Shi, 08/18/2016 09:25 PM
20160819084053.tgz (181 KB) 20160819084053.tgz integ NFD 3108,1 Junxiao Shi, 08/19/2016 06:39 AM
20160819140758.tgz (180 KB) 20160819140758.tgz integ NFD 3108,2 Junxiao Shi, 08/19/2016 09:03 AM
20160914035935.tgz (172 KB) 20160914035935.tgz integ 3206,2 Junxiao Shi, 09/14/2016 09:29 PM

Related issues 2 (0 open2 closed)

Related to NFD - Feature #2542: Redesign nfdc combining nfdc and nfd-statusClosedJunxiao Shi

Actions
Blocks NFD - Feature #3780: nfdc status commandsClosedJunxiao Shi

Actions
Actions #1

Updated by Junxiao Shi over 8 years ago

  • Related to Feature #2542: Redesign nfdc combining nfdc and nfd-status added
Actions #2

Updated by Junxiao Shi over 8 years ago

  • Status changed from New to In Progress
  • Assignee set to Junxiao Shi
Actions #3

Updated by Junxiao Shi over 8 years ago

  • % Done changed from 0 to 10

https://gerrit.named-data.net/3107 splits nfdc into multiple files. There are code style corrections, but refactoring is kept to minimum.

Actions #5

Updated by Junxiao Shi over 8 years ago

https://gerrit.named-data.net/3108 merges nfd-status as nfdc legacy-nfd-status subcommand.

Actions #8

Updated by Junxiao Shi over 8 years ago

  • % Done changed from 10 to 20

https://gerrit.named-data.net/3112 implements a command line parser.

patchset1 only contains CommandSemantic class which declares what named and positional arguments a command can accept.

I don't plan to use Boost.Program_option for command line parsing, because our "name value" syntax is very different from Boost "--name value" syntax, and Boost does not support subcommands.

Actions #9

Updated by Junxiao Shi over 8 years ago

  • Start date deleted (08/18/2016)
  • % Done changed from 20 to 40

https://gerrit.named-data.net/3112 patchset3 adds CommandParser class to parse a command line in one-shot and batch modes.
Mode-selection flags such as -h -f -V are handled in the main function, not in this class.
Batch mode will be implemented in a separate issue.

Actions #10

Updated by Junxiao Shi over 8 years ago

https://gerrit.named-data.net/3112 patchset4 completes the command parser.

Only status report and legacy commands are recognized by the parser.
Other "list" commands will be added in subsequent commits; non-"list" commands will be added in separate issues.

Actions #11

Updated by Junxiao Shi over 8 years ago

  • % Done changed from 40 to 50

https://gerrit.named-data.net/3139 rewrites legacy nfdc's command line parsing with Boost.
getopt cannot work correctly with std::vector<std::string> collected by the command parser.

Actions #12

Updated by Junxiao Shi over 8 years ago

https://gerrit.named-data.net/3148 renames OutputFormat to ReportFormat.

Actions #13

Updated by Junxiao Shi over 8 years ago

  • % Done changed from 50 to 60

https://gerrit.named-data.net/3160 moves Face and KeyChain creation to the main function, so that individual commands can be unit-tested.

In patchset2 I have temporarily disabled all but legacy nfdc commands; I'll re-add other commands once the design has been reviewed.

Actions #14

Updated by Junxiao Shi over 8 years ago

https://gerrit.named-data.net/3206 adds status show, face list, channel list, strategy list, fib-entry list, route list commands.
They are currently implemented by calling into legacy nfd-status procedures, and will be changed into StatusReport in future commits.

Actions #15

Updated by Junxiao Shi over 8 years ago

  • Description updated (diff)

A word on help output and manpages:

In this issue, it's intentional to keep the new commands under the hood, and not exposed for public use.
#3780 will add help command and manpages to expose new commands, and also deprecate legacy nfd-status commands.
Other commands and their help will be added in other separate issues.

Actions #16

Updated by Junxiao Shi over 8 years ago

  • % Done changed from 60 to 70

Former nfdc and nfd-status are using different patterns of exit codes.

https://gerrit.named-data.net/3208 makes them consistent, and the design is borrowed from ndnpeek.

Actions #18

Updated by Junxiao Shi over 8 years ago

Actions #19

Updated by Junxiao Shi over 8 years ago

  • Description updated (diff)
  • Status changed from In Progress to Closed
  • % Done changed from 70 to 100

I'm moving status commands re-implementation into #3780. This issue is completed.

Actions

Also available in: Atom PDF