Fix missing console_log in CLI VM

This commit is contained in:
Joshua Boniface 2020-01-09 13:53:11 -05:00
parent 641f13bb95
commit 83de40307c
1 changed files with 1 additions and 0 deletions

View File

@ -277,6 +277,7 @@ def follow_console_log(config, vm, lines=10):
response = call_api(config, 'get', '/vm/{vm}/console'.format(vm=vm), params=params) response = call_api(config, 'get', '/vm/{vm}/console'.format(vm=vm), params=params)
# Shrink the log buffer to length lines # Shrink the log buffer to length lines
console_log = response.json()['data']
shrunk_log = console_log.split('\n')[-lines:] shrunk_log = console_log.split('\n')[-lines:]
loglines = '\n'.join(shrunk_log) loglines = '\n'.join(shrunk_log)