def add_opts(self, optparser):
optlist = [
optparse.make_option("--strip",
dest="strip_namespace",
action="store_true",
help="""Strip namespace prefixes from
path components"""),
optparse.make_option("--opstate",
dest="opstate_paths",
action="store_true",
help="""Print list of operational state paths,
i.e., containing config:false leaves"""),
optparse.make_option("--root",
dest="root_only",
action="store_true",
help="""List only root nodes (depth=1)"""),
optparse.make_option("--no-errors",
dest="ignore_errors",
action="store_true",
help="""Try to ignore compilation errors"""),
optparse.make_option("--include-keyword",
dest="include_keyword",
action="store_true",
help="""Display the type of node for each path,
e.g., leaf, container, etc."""),
optparse.make_option("--print-depth",
dest="print_depth",
action="store_true",
help="""Display the tree depth of each path (root
is at depth [1]"""),
optparse.make_option("--plain",
dest="print_plain",
action="store_true",
help="""Print only paths (useful with relocate
plugin"""),
optparse.make_option("--for-relocate",
dest="relocate_output",
action="store_true",
help="""Generate paths output for use with relocate
plugin"""),
]
g = optparser.add_option_group("paths output specific options")
g.add_options(optlist)
评论列表
文章目录