Esempio n. 1
0
    def _deploy(self):
        testcase = TestCase(first(self.app.pargs.testcase), self.app)
        run = Run.new_run(self.app, testcase)
        print('Created tank run: {}'.format(run.run_id))

        run.init()
        run.create()
        run.dependency()
        run.provision()

        self._show_hosts(run.inspect())
        print('\nTank run id: {}'.format(run.run_id))
Esempio n. 2
0
    def list(self):
        runs = Run.list_runs(self.app)

        def make_row(run):
            return [
                run.run_id,
                run.created_at.strftime('%c'),
                run.testcase_copy.total_instances + 1,
                run.meta['testcase_filename']
            ]

        print(tabulate(list(map(make_row, runs)), headers=['RUN ID', 'CREATED', 'INSTANCES', 'TESTCASE']))
Esempio n. 3
0
    def init(self):
        testcase = TestCase(first(self.app.pargs.testcase), self.app)
        run = Run.new_run(self.app, testcase)
        print('Created tank run: {}'.format(run.run_id))

        run.init()
Esempio n. 4
0
    def info(self):
        info_type = first(self.app.pargs.info_type)
        data = Run(self.app, first(self.app.pargs.run_id)).inspect()

        if info_type == 'hosts':
            self._show_hosts(data)
Esempio n. 5
0
 def inspect(self):
     data = Run(self.app, first(self.app.pargs.run_id)).inspect()
     json.dump(data, sys.stdout, indent=4, sort_keys=True)
Esempio n. 6
0
 def destroy(self):
     Run(self.app, first(self.app.pargs.run_id)).destroy()
Esempio n. 7
0
 def bench(self):
     Run(self.app, first(self.app.pargs.run_id)).bench(
         first(self.app.pargs.load_profile), self.app.pargs.tps,
         self.app.pargs.total_tx)
Esempio n. 8
0
 def provision(self):
     Run(self.app, first(self.app.pargs.run_id)).provision()
Esempio n. 9
0
 def dependency(self):
     Run(self.app, first(self.app.pargs.run_id)).dependency()
Esempio n. 10
0
 def create(self):
     Run(self.app, first(self.app.pargs.run_id)).create()
Esempio n. 11
0
 def plan(self):
     Run(self.app, first(self.app.pargs.run_id)).plan()