novaclient.shell module¶
Command-line interface to the OpenStack Nova API.
-
class
novaclient.shell.DeprecatedAction(option_strings, dest, help=None, real_action=None, use=None, **kwargs)¶ Bases:
argparse.ActionAn argparse action for deprecated options.
This class is an
argparse.Actionsubclass that allows command line options to be explicitly deprecated. It modifies the help text for the option to indicate that it’s deprecated (unless help has been suppressed usingargparse.SUPPRESS), and provides a means to specify an alternate option to use using theusekeyword argument toargparse.ArgumentParser.add_argument(). The original action may be specified with thereal_actionkeyword argument, which has the same interpretation as theactionargument toargparse.ArgumentParser.add_argument(), with the addition of the special “nothing” action which completely ignores the option (other than emitting the deprecation warning). Note that the deprecation warning is only emitted once per specific option string.Note: If the
real_actionkeyword argument specifies an unknown action, no warning will be emitted unless the action is used, due to limitations with the method used to resolve the action names.Initialize a
DeprecatedActioninstance.- Parameters
option_strings – The recognized option strings.
dest – The attribute that will be set.
help – Help text. This will be updated to indicate the deprecation, and if
useis provided, that text will be included as well.real_action – The actual action to invoke. This is interpreted the same way as the
actionparameter.use – Text explaining which option to use instead.
-
class
novaclient.shell.NovaClientArgumentParser(*args, **kwargs)¶ Bases:
argparse.ArgumentParser-
error(message: string)¶ Prints a usage message incorporating the message to stderr and exits.
-
-
class
novaclient.shell.OpenStackComputeShell¶ Bases:
object-
do_bash_completion(_args)¶ Prints all of the commands and options to stdout so that the nova.bash_completion script doesn’t have to hard code them.
-
do_help(args)¶ Display help about this program or one of its subcommands.
-
get_base_parser(argv)¶
-
get_subcommand_parser(version, do_help=False, argv=None)¶
-
main(argv)¶
-
setup_debugging(debug)¶
-
times= []¶
-
-
class
novaclient.shell.OpenStackHelpFormatter(prog, indent_increment=2, max_help_position=32, width=None)¶ Bases:
argparse.HelpFormatter-
start_section(heading)¶
-
-
novaclient.shell.main()¶