def add_opts(self, optparser): optlist = [ optparse.make_option("--tree-help", dest="tree_help", action="store_true", help="Print help on tree symbols and exit"), optparse.make_option("--tree-depth", type="int", dest="tree_depth", help="Number of levels to print"), optparse.make_option("--tree-line-length", type="int", dest="tree_line_length", help="Maximum line length"), optparse.make_option("--tree-path", dest="tree_path", help="Subtree to print"), optparse.make_option("--tree-print-groupings", dest="tree_print_groupings", action="store_true", help="Print groupings"), optparse.make_option("--tree-no-expand-uses", dest="tree_no_expand_uses", action="store_true", help="Do not expand uses of groupings"), optparse.make_option("--tree-module-name-prefix", dest="modname_prefix", action="store_true", help="Prefix with module names instead of " + "prefixes"), ] if plugin.is_plugin_registered('restconf'): optlist.append( optparse.make_option("--tree-print-yang-data", dest="tree_print_yang_data", action="store_true", help="Print ietf-restconf:yang-data " + "structures") ) if plugin.is_plugin_registered('structure'): optlist.append( optparse.make_option("--tree-print-structures", dest="tree_print_structures", action="store_true", help="Print ietf-yang-structure-ext" + ":strcuture") ) g = optparser.add_option_group("Tree output specific options") g.add_options(optlist)
def add_opts(self, optparser): optlist = [ optparse.make_option("--tree-help", dest="tree_help", action="store_true", help="Print help on tree symbols and exit"), optparse.make_option("--tree-depth", type="int", dest="tree_depth", help="Number of levels to print"), optparse.make_option("--tree-line-length", type="int", dest="tree_line_length", help="Maximum line length"), optparse.make_option("--tree-path", dest="tree_path", help="Subtree to print"), optparse.make_option("--tree-print-groupings", dest="tree_print_groupings", action="store_true", help="Print groupings"), ] if plugin.is_plugin_registered('restconf'): optlist.append( optparse.make_option("--tree-print-yang-data", dest="tree_print_yang_data", action="store_true", help="Print ietf-restconf:yang-data " + "structures") ) g = optparser.add_option_group("Tree output specific options") g.add_options(optlist)