Merge "Add detailed information fro session-show and session-list for v1"
This commit is contained in:
commit
4a06ff8893
@ -42,16 +42,32 @@ class SessionShow(show.ShowOne):
|
||||
|
||||
column = (
|
||||
'Session ID',
|
||||
'Session tag',
|
||||
'Description',
|
||||
'Status',
|
||||
'Jobs'
|
||||
'Result',
|
||||
'Jobs',
|
||||
'Hold off',
|
||||
'Schedule',
|
||||
'Last start',
|
||||
'Time start',
|
||||
'Time end',
|
||||
'User id'
|
||||
)
|
||||
|
||||
data = (
|
||||
session.get('session_id'),
|
||||
session.get('session_tag'),
|
||||
session.get('description'),
|
||||
session.get('status'),
|
||||
pprint.pformat(session.get('jobs'))
|
||||
session.get('result'),
|
||||
pprint.pformat(session.get('jobs')),
|
||||
session.get('hold_off'),
|
||||
pprint.pformat(session.get('schedule')),
|
||||
session.get('last_start'),
|
||||
session.get('time_start'),
|
||||
session.get('time_end'),
|
||||
session.get('user_id'),
|
||||
)
|
||||
return column, data
|
||||
|
||||
@ -94,11 +110,13 @@ class SessionList(lister.Lister):
|
||||
if not sessions:
|
||||
sessions = [{}]
|
||||
|
||||
columns = ('Session ID', 'Description', 'Status', '# Jobs')
|
||||
columns = ('Session ID', 'Description', 'Status',
|
||||
'Result', '# Jobs')
|
||||
data = ((
|
||||
session.get('session_id', ''),
|
||||
session.get('description', ''),
|
||||
session.get('status', ''),
|
||||
session.get('result', ''),
|
||||
len(session.get('jobs', [])) if session.get(
|
||||
'session_id') else '',
|
||||
) for session in sessions)
|
||||
|
Loading…
Reference in New Issue
Block a user