Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias identifier Assign NameStore ListLoad Str Str ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign NameStore BinOpMod Str TupleLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad keyword Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword NameLoad keyword ListLoad NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareIsNot NameLoad NameLoad body Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type NameLoad body Return AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num attr Return Call AttributeLoad NameLoad attr NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore SubscriptLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad NameLoad attr attr Slice Num Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str BoolOpOr Call NameLoad NameLoad Str Str attr If UnaryOpNot NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad Call NameLoad Str keyword Str Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad GeneratorExp TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr UnaryOpNot AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body TryExcept body Expr Call AttributeLoad AttributeLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr attr attr Return Num handlers ExceptHandler type NameLoad body Print BinOpMod Str AttributeLoad NameLoad attr Return Num For NameStore Call NameLoad Call AttributeLoad NameLoad attr body Print Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad BinOpMod Str AttributeLoad NameLoad attr TryFinally body Return Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr attr NameLoad finalbody Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Call NameLoad orelse Assign NameStore NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad Call AttributeLoad AttributeLoad NameLoad attr attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr If BoolOpAnd Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad BinOpMod Str NameLoad NameLoad Expr Call NameLoad NameLoad BinOpMod Str NameLoad AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str For NameStore NameLoad body If BoolOpAnd Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad CompareNotEq NameLoad NameLoad UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A  Classes to make it easier to create commands with large numbers of
subcommands (e.g., bcfg2-admin, bcfg2-info).  N/A re N/A cmd N/A sys N/A copy N/A shlex N/A logging Bcfg2.Compat StringIO Bcfg2.Options PositionalArgument _debug Bcfg2.Options.OptionGroups Subparser Bcfg2.Options.Parser Parser setup master_setup N/A __all__ N/A Subcommand CommandRegistry Subcommand N/A object N/A N/A  Base class for subcommands.  This must be subclassed to create
    commands.

    Specifically, you must override
    :func:`Bcfg2.Options.Subcommand.run`.  You may want to override:

    * The docstring, which will be used as the short help.
    * :attr:`Bcfg2.Options.Subcommand.options`
    * :attr:`Bcfg2.Options.Subcommand.help`
    * :attr:`Bcfg2.Options.Subcommand.interactive`
    *
    * :func:`Bcfg2.Options.Subcommand.shutdown`

    You should not need to override
    :func:`Bcfg2.Options.Subcommand.__call__` or
    :func:`Bcfg2.Options.Subcommand.usage`.

    A ``Subcommand`` subclass constructor must not take any arguments.
     N/A options N/A N/A help None N/A interactive True N/A only_interactive False N/A aliases N/A N/A _ws_re N/A N/A re compile \s+ flags N/A re MULTILINE __init__ N/A N/A self N/A N/A N/A N/A self core None N/A description N/A %s: %s N/A N/A N/A N/A N/A self __class__ __name__ lower N/A N/A self __class__ __doc__ N/A N/A self parser N/A Parser prog N/A N/A N/A N/A self __class__ __name__ lower description description components N/A self add_base_options False epilog N/A self help N/A N/A self _usage None N/A N/A self logger N/A N/A logging getLogger N/A N/A N/A N/A self __class__ __name__ lower N/A __call__ N/A N/A self args N/A None N/A N/A  Perform option parsing and other tasks necessary to
        support running ``Subcommand`` objects as part of a
        :class:`cmd.Cmd` shell.  You should not need to override
        ``__call__``.

        :param args: Arguments given in the interactive shell
        :type args: list of strings
        :returns: The return value of :func:`Bcfg2.Options.Subcommand.run`
         N/A N/A args None N/A N/A N/A N/A self parser namespace N/A N/A copy copy master_setup N/A N/A N/A self parser parsed False N/A alist N/A N/A shlex split args N/A N/A N/A setup N/A N/A N/A self parser parse alist N/A N/A N/A SystemExit N/A N/A N/A N/A N/A N/A sys exc_info N/A 1 code N/A N/A N/A self run setup N/A N/A N/A N/A self run master_setup N/A usage N/A N/A self N/A N/A N/A  Get the short usage message.  N/A N/A N/A self _usage None N/A N/A sio N/A StringIO N/A N/A N/A N/A self parser print_usage file sio N/A usage N/A N/A N/A N/A N/A N/A self _ws_re sub N/A N/A sio getvalue strip N/A 7 N/A doc N/A N/A N/A N/A N/A self _ws_re sub N/A N/A getattr self __doc__ strip N/A N/A doc N/A N/A N/A self _usage usage N/A N/A N/A self _usage N/A %s - %s N/A usage doc N/A N/A self _usage N/A run N/A N/A self setup N/A N/A N/A  Run the command.

        :param setup: A namespace giving the options for this command.
                      This must be used instead of
                      :attr:`Bcfg2.Options.setup` because this command
                      may have been called from an interactive
                      :class:`cmd.Cmd` shell, and thus has its own
                      option parser and its own (private) namespace.
                      ``setup`` is guaranteed to contain all of the
                      options in the global
                      :attr:`Bcfg2.Options.setup` namespace, in
                      addition to any local options given to this
                      command from the interactive shell.
        :type setup: argparse.Namespace
         N/A NotImplementedError N/A shutdown N/A N/A self N/A N/A N/A  Perform any necessary shutdown tasks for this command This
        is called to when the program exits (*not* when this command
        is finished executing).  N/A N/A N/A Help N/A Subcommand N/A N/A List subcommands and usage, or get help on a specific subcommand. N/A options N/A N/A PositionalArgument command nargs ? N/A interactive False __init__ N/A N/A self registry N/A N/A N/A N/A N/A Subcommand __init__ self N/A N/A self _registry registry N/A run N/A N/A self setup N/A N/A N/A commands N/A dict N/A N/A name cmd N/A N/A name cmd N/A N/A N/A N/A self _registry commands items N/A N/A cmd only_interactive N/A N/A setup command N/A N/A N/A N/A N/A N/A N/A N/A commands N/A N/A setup command parser print_help N/A 0 N/A N/A N/A KeyError N/A N/A N/A No such command: %s N/A setup command N/A 1 N/A command N/A sorted N/A N/A commands keys N/A N/A N/A N/A N/A commands N/A command usage N/A N/A CommandRegistry N/A object N/A N/A A ``CommandRegistry`` is used to register subcommands and provides
    a single interface to run them.  It's also used by
    :class:`Bcfg2.Options.Subcommands.Help` to produce help messages
    for all available commands.
     __init__ N/A N/A self N/A N/A N/A N/A self commands N/A dict N/A N/A self subcommand_options N/A N/A N/A self help N/A Help self N/A N/A N/A self register_command N/A self help N/A runcommand N/A N/A self N/A N/A N/A  Run the single command named in
        ``Bcfg2.Options.setup.subcommand``, which is where
        :class:`Bcfg2.Options.Subparser` groups store the
        subcommand.  N/A N/A _debug N/A Running subcommand %s N/A master_setup subcommand N/A N/A N/A N/A N/A N/A N/A self commands N/A N/A master_setup subcommand run master_setup N/A N/A N/A N/A self shutdown N/A shutdown N/A N/A self N/A N/A N/A Perform shutdown tasks.

        This calls the ``shutdown`` method of the subcommand that was
        run.
         N/A N/A _debug N/A Shutting down subcommand %s N/A master_setup subcommand N/A N/A N/A N/A N/A self commands N/A N/A master_setup subcommand shutdown N/A register_command N/A N/A self cls_or_obj N/A N/A N/A  Register a single command.

        :param cls_or_obj: The command class or object to register
        :type cls_or_obj: type or Subcommand
        :returns: An instance of ``cmdcls``
         N/A N/A isinstance cls_or_obj type N/A N/A cmdcls cls_or_obj N/A cmd_obj N/A cmdcls N/A N/A cmd_obj cls_or_obj N/A cmdcls N/A cmd_obj __class__ N/A names N/A N/A N/A N/A cmdcls __name__ lower N/A N/A cmdcls aliases N/A N/A N/A N/A names extend N/A cmdcls aliases N/A name names N/A N/A N/A N/A self commands N/A name cmd_obj N/A N/A N/A cmdcls only_interactive N/A N/A N/A N/A N/A self subcommand_options append N/A Subparser N/A cmdcls options N/A dict name name help N/A cmdcls __doc__ N/A N/A N/A issubclass N/A self __class__ N/A cmd Cmd N/A cmdcls interactive N/A N/A N/A setattr self N/A do_%s name cmd_obj N/A N/A setattr self N/A help_%s name N/A N/A cmd_obj parser print_help N/A cmd_obj N/A register_commands N/A N/A self candidates parent N/A Subcommand N/A N/A  Register all subcommands in ``candidates`` against the
        :class:`Bcfg2.Options.CommandRegistry` subclass given in
        ``registry``.  A command is registered if and only if:

        * It is a subclass of the given ``parent`` (by default,
          :class:`Bcfg2.Options.Subcommand`);
        * It is not the parent class itself; and
        * Its name does not start with an underscore.

        :param registry: The :class:`Bcfg2.Options.CommandRegistry`
                         subclass against which commands will be
                         registered.
        :type registry: Bcfg2.Options.CommandRegistry
        :param candidates: A list of objects that will be considered for
                           registration.  Only objects that meet the
                           criteria listed above will be registered.
        :type candidates: list
        :param parent: Specify a parent class other than
                       :class:`Bcfg2.Options.Subcommand` that all
                       registered commands must subclass.
        :type parent: type
         N/A attr candidates N/A N/A N/A N/A isinstance attr type N/A issubclass attr parent N/A attr parent N/A N/A N/A N/A attr __name__ startswith _ N/A N/A N/A N/A self register_command attr N/A N/A