Ejemplo n.º 1
0
  simulator SERVER ntf status (running|stopped|dead)
  simulator SERVER sm status (master|slave|stopped|unknown|indeterminate)
  simulator SERVER ss (install|uninstall) ACTIVEADM
  simulator SERVER ss (start|stop)
  simulator SERVER smp (start|stop)
  simulator SERVER smp config DSADATA
  simulator SERVER adcom (status|stop|timeout) NUMBER
  simulator SERVER upgrade (nds|pgw|ntf) ostype (v80|v90)
  simulator SERVER check COMMAND EXITCODE [OUTPUT]
  simulator (-h | --help)
  simulator --version

Arguments:
  SERVER       hostname of the server
  ACTIVEADM    hostname of active ADM
  DSADATA      coma separated list of DSA id > 1,2,6
  NUMBER       plain integer
  COMMAND      upgradeBackup, upgradeBackupSize, upgradeHealthCheck_80, upgradeHealthCheck_90, upgradeRestore_80, upgradeRestore_90
  EXITCODE     0 - 255 (integer), 0 - success
  OUTPUT       result of the command
  
Options:
  -h --help     Show this screen.
  --version     Show version.

"""
from libs.docopt import docopt

if __name__ == '__main__':
    arguments = docopt(__doc__, version='Simulator Manager 0.2')
    print(arguments)
Ejemplo n.º 2
0
start_time = datetime.now()


def OnStart():
    env.load_properties()


def OnExit():
    stop_time = datetime.now()
    duration = stop_time - start_time
    logging.info("Command duration: " + str(duration))


if __name__ == "__main__":
    cli = Cli(docopt(__doc__, version="Testbed Command Line Interface 0.3"))
    cli.on_start = lambda: OnStart()
    cli.on_exit = lambda: OnExit()


@cli.command({"list": True, "installers": True})
def list_installers(arguments):
    print arguments


@cli.command({"list": True, "profiles": True})
def list_profiles(arguments):
    profile_list = Profiles.load_profile_list(os.path.join(env.path, "resourceCache.pickle"))
    Display.print_table_list("Profile list", profile_list)

Ejemplo n.º 3
0
  tool.py visa rm <cca2> [--force]
  
Options:
  -h --help     Show this screen.
  --version     Show version.
  build
  --geo         Validate and build geo  data
  --info        Validate and build info data
  --visa        Validate and build visa data
  --validate    Validate all data
  visa
  -defp --default-policy=<type>      Sets default visa policy         [default: r] r - required
  -defr --default-requirement=<type> Sets default visa requirement    [default: r] r - required
  -f --force                      Force
  -x --cross                      Cross visa set between this countries
  -r --requirement                Sets requirement for the countrie to the countrie(s)
  -p --policy                     Sets policy of the countrie to the countrie(s)
  --note=<note>                   Sets note        [default: None]
  --time=<time>                   Sets visa length [default: None]
"""

from libs.docopt import docopt
from libs.tools import tools
      
if __name__ == '__main__':
    arguments = docopt(__doc__, version='tool 0.4')
    # print(arguments) #DEBUG
    if(arguments['build']):
      tools.builder(arguments)
    elif(arguments['visa']):
      tools.visa(arguments)