Ejemplo n.º 1
0
def start():
    logger.info(BANNER)

    from abci import ABCIServer

    app = ABCIServer(app=App())
    app.run()
Ejemplo n.º 2
0
def main(argv):
    app = App()
    puzzle = "puzzle"
    if len(argv) >= 1:
        for e in argv:
            puzzle += "_" + str(e)
    else:
        puzzle = None
    app.run(puzzle)
Ejemplo n.º 3
0
def main():
    parser = argparse.ArgumentParser(
        description="Exécuter le routeur multimédia")
    parser.add_argument("config",
                        type=argparse.FileType(),
                        help="le fichier de configuration du routeur")
    parser.add_argument(
        "-v",
        "--verbose",
        action="store_true",
        default=False,
        dest="v",
        help="ajoute des messages verboses pendant l'exécution")
    args = parser.parse_args()
    args.config.buffer.close()
    app = App(args.config.name, verbose=args.v)
    app.run()
Ejemplo n.º 4
0
def main():
    app = App("config.json")
    command = "help"
    rest = ""
    while command != "quit":
        if command == "quit":
            pass
        elif command == "help":
            print("""Commands:
quit - Quits this application
help - Shows this message
run - Execute the router
route add <extension> <destination> - Add a route
route del <extension> - Delete a route
bucket add <filepath> - Add a bucket
bucket del <filepath> - Delete a bucket
copy - Sets the router in copy mode (file are copied from buckets to routes)
link - Sets the router in link mode (symbolic links between buckets and routes)
""")
        elif command == "run":
            app.run()
        elif command == "route":
            args = rest.split(" ", 1)
            sub_cmd = args[0]
            if sub_cmd == "add":
                routes = args[-1].split(" ", 1)
                if len(routes) == 2:
                    app.add_route(routes[0], routes[1])
            elif sub_cmd == "del":
                app.remove_route(args[1])
        elif command == "bucket":
            args = rest.split(" ", 1)
            sub_cmd = args[0]
            if sub_cmd == "add":
                app.add_bucket(args[1])
            elif sub_cmd == "del":
                app.remove_bucket(args[1])
        elif command == "copy":
            app.set_copy(True)
        elif command == "link":
            app.set_copy(False)
        raw_command = input("Enter your command: ").split(" ", 1)
        command = raw_command[0]
        rest = raw_command[-1]
Ejemplo n.º 5
0
 def setUp(self):
     self.app = App('sessions.yaml')
Ejemplo n.º 6
0
# -*- coding: UTF-8 -*-
from __future__ import unicode_literals
from core import App, test_step

__authors__ = "Shanming Liu"

app = App('sessions.yaml')


@test_step('commnad')
def test_ssh_session():
    ssh_session = app.ssh_session


if __name__ == '__main__':
    test_ssh_session()
Ejemplo n.º 7
0
def main():
    app = App()
    app.run()
Ejemplo n.º 8
0
from core import App

if __name__ == '__main__':
    app = App()
    app.run()
Ejemplo n.º 9
0
 def test_getAppBase(self):
     app = App()
     base = app.getAppBase()
     baseArray = base.split(PlatformProperty.FilePathSeparator)
     print(base)
     self.assertEqual(baseArray[len(baseArray) - 1], 'xdba-workbench-core')
Ejemplo n.º 10
0
 def test_getAppLogFilename(self):
     logFilename = App().getAppLogFilename()
     fsep = PlatformProperty.FilePathSeparator
     if not str(logFilename).endswith('xdba-workbench-core' + fsep +
                                      'logs' + fsep + 'aperos.log'):
         self.fail('Logfile name [' + logFilename + '] is not correct')
Ejemplo n.º 11
0
 def test_getAppVersion(self):
     app = App()
     appVersion = app.getAppVersion()
     self.assertEqual(appVersion, '0.2.0')
Ejemplo n.º 12
0
 def test_getAppName(self):
     app = App()
     appName = app.getAppName()
     self.assertEqual(appName, 'aperos')
Ejemplo n.º 13
0
 def setUp(self):
     self.app = App()
     self.app.load_config_file('../sessions.yaml')
Ejemplo n.º 14
0
def main():
    app = App("config.json")
    root = Tk()
    window = Window(app, root)
    window.mainloop()