Exemple #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"))
Exemple #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"))
Exemple #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)
    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"))
Exemple #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"))
Exemple #6
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"))
Exemple #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"))
Exemple #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"))
Exemple #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)
Exemple #10
0
 def get_uuids(status):
     tasks = db.task_list(status=status)
     return sorted(task['uuid'] for task in tasks)
Exemple #11
0
 def get_uuids(status):
     tasks = db.task_list(status=status)
     return sorted(task['uuid'] for task in tasks)
Exemple #12
0
 def test_task_list_empty(self):
     self.assertEqual([], db.task_list())
Exemple #13
0
 def get_uuids(status, active=True):
     tasks = db.task_list(status=status, active=active)
     return sorted(task["uuid"] for task in tasks)
Exemple #14
0
 def test_task_list_empty(self):
     self.assertEqual([], db.task_list())
Exemple #15
0
 def list(status=None, deployment=None):
     return [Task(db_task) for db_task in db.task_list(status, deployment)]
 def get_tasks_uuid_from_db(self, deployment_id):
     tasks = db.task_list(deployment=deployment_id)
     return [task.uuid for task in tasks]
Exemple #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)
 def get_tasks_uuid_from_db(self, deployment_id):
     tasks = db.task_list(deployment=deployment_id)
     return [task.uuid for task in tasks]
Exemple #19
0
 def list(status=None, deployment=None):
     return [Task(db_task) for db_task in db.task_list(status, deployment)]