starcluster.cli.StarClusterCLI

Package starcluster :: Module cli :: Class StarClusterCLI |
[hide private]
[frames] | no frames]

# Class StarClusterCLI

source code

StarCluster Command Line Interface

Instance Methods | [hide private]
__init__(self) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
print_header(self) | source code
parse_subcommands(self, gparser=None) Parse global arguments, find subcommand from list of subcommand objects, parse local subcommand arguments and return a tuple of global options, selected command object, command options, and command arguments. | source code
create_global_parser(self, subcmds=None, no_usage=False, add_help=True) | source code
__write_module_version(self, modname, fp) Write module version information to a file | source code
bug_found(self) Builds a crash-report when StarCluster encounters an unhandled exception. | source code
get_global_opts(self) Parse and return global options. | source code
is_completion_active(self) | source code
_init_completion(self) Restore original sys.argv from COMP_LINE in the case that starcluster is being called by Bash/ZSH for completion options. | source code
handle_completion(self) | source code
main(self) StarCluster main | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]
| gparser
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)

### parse_subcommands(self, gparser=None) | source code
Parse global arguments, find subcommand from list of subcommand objects, parse local subcommand arguments and return a tuple of global options, selected command object, command options, and command arguments. Call execute() on the command object to run. The command object has members 'gopts' and 'opts' set for global and command options respectively, you don't need to call execute with those but you could if you wanted to.

### bug_found(self) | source code
Builds a crash-report when StarCluster encounters an unhandled exception. Report includes system info, python version, dependency versions, and a full debug log and stack-trace of the crash.

### get_global_opts(self) | source code
Parse and return global options. This method will silently return None if any errors are encountered during parsing.

### _init_completion(self) | source code
Restore original sys.argv from COMP_LINE in the case that starcluster is being called by Bash/ZSH for completion options. Bash/ZSH will simply call 'starcluster' with COMP_LINE environment variable set to the current (partial) argv for completion. StarCluster's Bash/ZSH completion code needs to read the global config option in case an alternate config is specified at the command line when completing options. StarCluster's comletion code uses the config to generate completion options. Setting sys.argv to $COMP_LINE in this case allows the global option parser to be used to extract the global -c option (if specified) and load the proper config in the completion code.

Property Details | [hide private]

### gparser Get Method: unreachable.gparser(self)