@utils.arg('server', metavar='<server>', help=_('Name or ID of server.'))
@utils.arg('--console-type', default='serial', help=_('Type of serial console, default="serial".'))
def do_get_serial_console(cs, args):
 if (args.console_type not in ('serial',)):
  raise exceptions.CommandError(_("Invalid parameter value for 'console_type', currently supported 'serial'."))
 server = _find_server(cs, args.server)
 data = server.get_serial_console(args.console_type)
 print_console(cs, data)

@ utils . arg ( 'server' , metavar = '<server>' , help = _ ( 'Name or ID of server.' ) ) @ utils . arg ( '--console-type' , default = 'serial' , help = _ ( 'Type of serial console, default="serial".' ) ) def do_get_serial_console ( cs , args ) : if ( args . console_type not in ( 'serial' , ) ) : raise exceptions . CommandError ( _ ( "Invalid parameter value for 'console_type', currently supported 'serial'." ) ) server = _find_server ( cs , args . server ) data = server . get_serial_console ( args . console_type ) print_console ( cs , data )
get a serial console to a server .