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 = (
|
column = (
|
||||||
'Session ID',
|
'Session ID',
|
||||||
|
'Session tag',
|
||||||
'Description',
|
'Description',
|
||||||
'Status',
|
'Status',
|
||||||
'Jobs'
|
'Result',
|
||||||
|
'Jobs',
|
||||||
|
'Hold off',
|
||||||
|
'Schedule',
|
||||||
|
'Last start',
|
||||||
|
'Time start',
|
||||||
|
'Time end',
|
||||||
|
'User id'
|
||||||
)
|
)
|
||||||
|
|
||||||
data = (
|
data = (
|
||||||
session.get('session_id'),
|
session.get('session_id'),
|
||||||
|
session.get('session_tag'),
|
||||||
session.get('description'),
|
session.get('description'),
|
||||||
session.get('status'),
|
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
|
return column, data
|
||||||
|
|
||||||
@ -94,11 +110,13 @@ class SessionList(lister.Lister):
|
|||||||
if not sessions:
|
if not sessions:
|
||||||
sessions = [{}]
|
sessions = [{}]
|
||||||
|
|
||||||
columns = ('Session ID', 'Description', 'Status', '# Jobs')
|
columns = ('Session ID', 'Description', 'Status',
|
||||||
|
'Result', '# Jobs')
|
||||||
data = ((
|
data = ((
|
||||||
session.get('session_id', ''),
|
session.get('session_id', ''),
|
||||||
session.get('description', ''),
|
session.get('description', ''),
|
||||||
session.get('status', ''),
|
session.get('status', ''),
|
||||||
|
session.get('result', ''),
|
||||||
len(session.get('jobs', [])) if session.get(
|
len(session.get('jobs', [])) if session.get(
|
||||||
'session_id') else '',
|
'session_id') else '',
|
||||||
) for session in sessions)
|
) for session in sessions)
|
||||||
|
Loading…
Reference in New Issue
Block a user