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
This commit is contained in:
		@@ -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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user