From b8bfbd6966dd9ec5ac7c5f59ae767822beced360 Mon Sep 17 00:00:00 2001 From: henriquetruta Date: Mon, 15 Jun 2015 13:18:50 -0300 Subject: [PATCH] Including 'start_time' column at 'sahara job-list' command This patch adds the 'start_time' column to python-saharaclient CLI. It makes it easier to the user to look for his newest job executions. Partial-Bug 1470525 Change-Id: Id03d8f8fb42d9d3168804e78e34743c263d5a9a0 --- saharaclient/api/shell.py | 2 +- saharaclient/tests/unit/nova/test_shell.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/saharaclient/api/shell.py b/saharaclient/api/shell.py index 3b46057b..4f492d20 100644 --- a/saharaclient/api/shell.py +++ b/saharaclient/api/shell.py @@ -814,7 +814,7 @@ def do_job_list(cs, args): # why is status in info.status? job.status = job.info['status'] # TODO(mattf): why can cluster_id be None? - columns = ('id', 'cluster_id', 'status') + columns = ('id', 'cluster_id', 'start_time', 'status') utils.print_list(jobs, columns) diff --git a/saharaclient/tests/unit/nova/test_shell.py b/saharaclient/tests/unit/nova/test_shell.py index 04034190..a99a7455 100644 --- a/saharaclient/tests/unit/nova/test_shell.py +++ b/saharaclient/tests/unit/nova/test_shell.py @@ -346,10 +346,10 @@ class ShellTestKeystoneV3(ShellTest): def test_job_list(self): expected = '\n'.join([ - '+----+------------+--------+', - '| id | cluster_id | status |', - '+----+------------+--------+', - '+----+------------+--------+', + '+----+------------+------------+--------+', + '| id | cluster_id | start_time | status |', + '+----+------------+------------+--------+', + '+----+------------+------------+--------+', '' ])