From 673a6759771976b379e188325a54889b374109b0 Mon Sep 17 00:00:00 2001
From: gengchc2 <geng.changcai2@zte.com.cn>
Date: Mon, 5 Nov 2018 22:57:51 -0800
Subject: [PATCH] Add detailed information fro session-show and session-list
 for v1

Change-Id: I3258641d54cdfe03e12d7eadaed2e93bb58ca5ba
---
 freezerclient/v1/sessions.py | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/freezerclient/v1/sessions.py b/freezerclient/v1/sessions.py
index 00171bb..0ae2cd9 100644
--- a/freezerclient/v1/sessions.py
+++ b/freezerclient/v1/sessions.py
@@ -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)