Ejemplo n.º 1
0
 def __init__(self, name, **kwargs):
     self.name = name
     self.classpath = utility.kwargs_get_string(kwargs, 'classpath', default = None)
     self.cli_spec = cli.CLISpec(**kwargs)
     self.dirty_opts = False
     self.dirty_args = False
     self.command_arguments = utility.flatten_to_list(kwargs.get('command_arguments', None))
     utility.debug(str(self))
Ejemplo n.º 2
0
from verbs import *
from voltcli import cli
from voltcli import environment
from voltcli import utility

#===============================================================================
# Global data
#===============================================================================

# Standard CLI options.
base_cli_spec = cli.CLISpec(
    description='''\
Specific actions are provided by verbs.  Run "%prog help VERB" to display full
usage for a verb, including its options and arguments.
''',
    usage='%prog VERB [ OPTIONS ... ] [ ARGUMENTS ... ]',
    options=(
        cli.BooleanOption(None, '--debug', 'debug', None),
        cli.BooleanOption(None, '--pause', 'pause', None),
        cli.BooleanOption('-v', '--verbose', 'verbose',
                          'display verbose messages and external commands'),
    ))

# Internal command names that get added to the VOLT namespace of user scripts.
internal_commands = ['voltdb', 'voltadmin']

# Written to the README file when the packaged executable is created.
compatibility_warning = '''\
The program package in the bin directory requires Python version 2.6 or greater.
It will crash with older Python versions that fail to detect and run compressed
Python executable packages.