-
Per Cederqvist authored
New options --continue and --only-clone. Better remote watching of the status. * backup-one-task: Handle --only-clone. Adjusted to the new CLI of lysrdiff-set-status. * lysrdiff-set-status.py (open_socket): New function. (sendmsg): Use it to simplify code. (completion): New function. (Top level): New mandatory first argument: --status, --ok, --warning or --fail. * backup-all: Added --continue and --only-clone. * lysrdiff-monitord.py (now): New function. (Client.__init__): New API: use sock and peer arguments instead of accept_retval. Renamed the input buffer from __readbuf to _readbuf so that derived classes can use it. (Client.read_event): Fixed misnamed errno name. Track name change of _readbuf. (Client.got_eof): Track name change of _readbuf. (Client.write_event): Handle EAGAIN, ETIMEDOUT and EHOSTUNREACH errors. (Client.parse): Track name change of _readbuf. (Client.handle_cmd): New command: completed. (Client.dispatcher): New method. (Server.read_event): Track API change of Client. Set the new client socket nonblocking. (Vt100Client.__init__): Negotiate telnet to get a raw byte channel using WILL ECHO, WILL SuppressGoahead, DO SuppressGoahead. Use vt100 escape sequences to disable line wrap and query the screen size. Don't register with the dispatcher. (Vt100Client.parse): New method. Register with the dispatcher once the screen size report has arrived from the client. (Dispatcher.toploop): Write the curren time to vt100 clients every second. (Dispatcher.register_vt100): Position the cursor at the command line position. (Dispatcher.write_monitor_status): Format the status separately for each client, as their screen sizes may vary. (Dispatcher.format_monitor_status): New argument: client. Position the cursor properly. (Dispatcher.set_status): Use now() to simplify code. Don't crash if a client connection is found to be broken. Format the status separately for each client, as their screen sizes may vary. (Dispatcher.format_status_vt100): New argument: client. Truncate the status to the line length reported by the client. Position the cursor at the command line position. (Dispatcher.completed): New method.
Per Cederqvist authoredNew options --continue and --only-clone. Better remote watching of the status. * backup-one-task: Handle --only-clone. Adjusted to the new CLI of lysrdiff-set-status. * lysrdiff-set-status.py (open_socket): New function. (sendmsg): Use it to simplify code. (completion): New function. (Top level): New mandatory first argument: --status, --ok, --warning or --fail. * backup-all: Added --continue and --only-clone. * lysrdiff-monitord.py (now): New function. (Client.__init__): New API: use sock and peer arguments instead of accept_retval. Renamed the input buffer from __readbuf to _readbuf so that derived classes can use it. (Client.read_event): Fixed misnamed errno name. Track name change of _readbuf. (Client.got_eof): Track name change of _readbuf. (Client.write_event): Handle EAGAIN, ETIMEDOUT and EHOSTUNREACH errors. (Client.parse): Track name change of _readbuf. (Client.handle_cmd): New command: completed. (Client.dispatcher): New method. (Server.read_event): Track API change of Client. Set the new client socket nonblocking. (Vt100Client.__init__): Negotiate telnet to get a raw byte channel using WILL ECHO, WILL SuppressGoahead, DO SuppressGoahead. Use vt100 escape sequences to disable line wrap and query the screen size. Don't register with the dispatcher. (Vt100Client.parse): New method. Register with the dispatcher once the screen size report has arrived from the client. (Dispatcher.toploop): Write the curren time to vt100 clients every second. (Dispatcher.register_vt100): Position the cursor at the command line position. (Dispatcher.write_monitor_status): Format the status separately for each client, as their screen sizes may vary. (Dispatcher.format_monitor_status): New argument: client. Position the cursor properly. (Dispatcher.set_status): Use now() to simplify code. Don't crash if a client connection is found to be broken. Format the status separately for each client, as their screen sizes may vary. (Dispatcher.format_status_vt100): New argument: client. Truncate the status to the line length reported by the client. Position the cursor at the command line position. (Dispatcher.completed): New method.