Ejemplo n.º 1
0
 def list(self, task_list=None):
     """Print a list of all tasks."""
     headers = ['uuid', 'created_at', 'status', 'failed', 'tag']
     task_list = task_list or db.task_list()
     if task_list:
         common_cliutils.print_list(task_list, headers)
     else:
         print(_("There are no tasks. To run a new task, use:"
                 "\nrally task start"))
Ejemplo n.º 2
0
 def list(self, task_list=None):
     """Print a list of all tasks."""
     headers = ['uuid', 'created_at', 'status', 'failed', 'tag']
     task_list = task_list or db.task_list()
     if task_list:
         common_cliutils.print_list(task_list, headers)
     else:
         print(
             _("There are no tasks. To run a new task, use:"
               "\nrally task start"))
Ejemplo n.º 3
0
    def list(self):
        """Print a list of all tasks."""

        headers = ['uuid', 'created_at', 'status', 'failed']
        table = prettytable.PrettyTable(headers)

        for t in db.task_list():
            r = [t['uuid'], str(t['created_at']), t['status'], t['failed']]
            table.add_row(r)

        print(table)
Ejemplo n.º 4
0
    def list(self, task_list=None):
        """List all tasks, started and finished."""

        headers = ['uuid', 'created_at', 'status', 'failed', 'tag']
        task_list = task_list or db.task_list()
        if task_list:
            common_cliutils.print_list(task_list, headers,
                                       sortby_index=headers.index(
                                           'created_at'))
        else:
            print(_("There are no tasks. To run a new task, use:"
                    "\nrally task start"))
Ejemplo n.º 5
0
    def list(self, task_list=None):
        """List all tasks, started and finished."""

        headers = ['uuid', 'created_at', 'status', 'failed', 'tag']
        task_list = task_list or db.task_list()
        if task_list:
            common_cliutils.print_list(
                task_list, headers, sortby_index=headers.index('created_at'))
        else:
            print(
                _("There are no tasks. To run a new task, use:"
                  "\nrally task start"))
Ejemplo n.º 6
0
Archivo: task.py Proyecto: ugvddm/rally
    def list(self, task_list=None):
        """Print a list of all tasks."""
        headers = ["uuid", "created_at", "status", "failed", "tag"]
        task_list = task_list or db.task_list()
        if task_list:
            table = prettytable.PrettyTable(headers)

            for t in task_list:
                r = [t["uuid"], str(t["created_at"]), t["status"], t["failed"], t["tag"]]
                table.add_row(r)

            print(table)
        else:
            print(_("There are no tasks. To run a new task, use:" "\nrally task start"))
Ejemplo n.º 7
0
    def list(self, task_list=None):
        """Print a list of all tasks."""
        headers = ['uuid', 'created_at', 'status', 'failed', 'tag']
        task_list = task_list or db.task_list()
        if task_list:
            table = prettytable.PrettyTable(headers)

            for t in task_list:
                r = [t['uuid'],
                     str(t['created_at']),
                     t['status'],
                     t['failed'],
                     t['tag']]
                table.add_row(r)

            print(table)
        else:
            print(_("There are no tasks. To run a new task, use:"
                    "\nrally task start"))
Ejemplo n.º 8
0
    def list(self, task_list=None):
        """Print a list of all tasks."""
        headers = ['uuid', 'created_at', 'status', 'failed', 'tag']
        task_list = task_list or db.task_list()
        if task_list:
            table = prettytable.PrettyTable(headers)

            for t in task_list:
                r = [
                    t['uuid'],
                    str(t['created_at']), t['status'], t['failed'], t['tag']
                ]
                table.add_row(r)

            print(table)
        else:
            print(
                _("There are no tasks. To run a new task, use:"
                  "\nrally task start"))
Ejemplo n.º 9
0
 def get_uuids(status=None, deployment=None):
     tasks = db.task_list(status=status, deployment=deployment)
     return sorted(task["uuid"] for task in tasks)
Ejemplo n.º 10
0
 def get_uuids(status):
     tasks = db.task_list(status=status)
     return sorted(task['uuid'] for task in tasks)
Ejemplo n.º 11
0
 def get_uuids(status):
     tasks = db.task_list(status=status)
     return sorted(task['uuid'] for task in tasks)
Ejemplo n.º 12
0
 def test_task_list_empty(self):
     self.assertEqual([], db.task_list())
Ejemplo n.º 13
0
 def get_uuids(status, active=True):
     tasks = db.task_list(status=status, active=active)
     return sorted(task["uuid"] for task in tasks)
Ejemplo n.º 14
0
 def test_task_list_empty(self):
     self.assertEqual([], db.task_list())
Ejemplo n.º 15
0
 def list(status=None, deployment=None):
     return [Task(db_task) for db_task in db.task_list(status, deployment)]
Ejemplo n.º 16
0
 def get_tasks_uuid_from_db(self, deployment_id):
     tasks = db.task_list(deployment=deployment_id)
     return [task.uuid for task in tasks]
Ejemplo n.º 17
0
 def get_uuids(status=None, deployment=None):
     tasks = db.task_list(status=status, deployment=deployment)
     return sorted(task["uuid"] for task in tasks)
Ejemplo n.º 18
0
 def get_tasks_uuid_from_db(self, deployment_id):
     tasks = db.task_list(deployment=deployment_id)
     return [task.uuid for task in tasks]
Ejemplo n.º 19
0
 def list(status=None, deployment=None):
     return [Task(db_task) for db_task in db.task_list(status, deployment)]