diff options
| author | Yejia Xu <yejia@unitedstack.com> | 2014-05-07 01:49:15 +0000 |
|---|---|---|
| committer | Yejia Xu <yejia@unitedstack.com> | 2014-05-07 05:15:22 +0000 |
| commit | 3b57117f8efc0c945f730c5e8a598768ac774114 (patch) | |
| tree | 2d15df83479aee2a78ee944493c2a24c16c8c5a9 /openstackclient/compute | |
| parent | 834867b8bfaab1dcbad5f1e88e10f8a10c48f626 (diff) | |
| download | python-openstackclient-3b57117f8efc0c945f730c5e8a598768ac774114.tar.gz | |
Display all server log when --lines option is None
Without --lines option, `console log show xxx`
cmd will break.
Change-Id: I4027aacac245e6916c1808fd9f878fb708c8a5f0
Closes-Bug: #1316870
Diffstat (limited to 'openstackclient/compute')
| -rw-r--r-- | openstackclient/compute/v2/console.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/openstackclient/compute/v2/console.py b/openstackclient/compute/v2/console.py index 8f49c513..032168b9 100644 --- a/openstackclient/compute/v2/console.py +++ b/openstackclient/compute/v2/console.py @@ -55,9 +55,13 @@ class ShowConsoleLog(command.Command): compute_client.servers, parsed_args.server, ) - # NOTE(dtroyer): get_console_output() appears to shortchange the - # output by one line - data = server.get_console_output(length=parsed_args.lines + 1) + length = parsed_args.lines + if length: + # NOTE(dtroyer): get_console_output() appears to shortchange the + # output by one line + length += 1 + + data = server.get_console_output(length=length) sys.stdout.write(data) return |
