Commit Graph

21 Commits

Author SHA1 Message Date
Dietmar Maurer
032dc44cfe lxc console: limit output buffer size 2018-06-08 11:01:06 +02:00
Dietmar Maurer
1ec5788ca4 lxc enter: handle writes with select 2018-06-08 11:01:06 +02:00
Dietmar Maurer
e4c016351a lxc enter: use IO::Select->select 2018-06-08 11:01:06 +02:00
René Jochum
9657c731c7 Poll the size of the terminal and resize if needed
Signed-off-by: René Jochum <r.jochum@proxmox.com>
2018-06-08 06:37:41 +02:00
Dietmar Maurer
678b245c54 implemet and use full_write() 2018-06-07 11:30:47 +02:00
Dietmar Maurer
962d470acb websocket: set max_payload_size to 128*1024
Because our server sends larger frames up to 128KB.
2018-06-07 11:29:08 +02:00
Dietmar Maurer
e9d848651d lxc enter: simplify code and cleanups
- print error messages after reseting the terminal
- catch signals

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-06-06 14:59:03 +02:00
Dietmar Maurer
1334102e03 parse_web_socket_frame: use $wsbuf_ref directly, so that we really consume data
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-06-06 14:59:03 +02:00
Dietmar Maurer
9bfdc8faf6 fixup for previous commit: really set blocking mode 2018-06-06 08:24:57 +02:00
Dietmar Maurer
3226300c1b enter: on exit, switch back to blocking mode
Else later shell commands will fail!
2018-06-06 07:46:26 +02:00
René Jochum
95b87dd39f Add "lxc enter" from "pventer" without its deps.
This patch adds the functionality of "pventer" to "pveclient" without
its external dependecies, we solved them with our internal tools.

I tried to use IO::Select->select() but failed hard with it, so i
switched back to $select->can_(read|write).

Signed-off-by: René Jochum <r.jochum@proxmox.com>
2018-06-06 06:09:30 +02:00
René Jochum
6bb4301665 Fix the WebSocket client to work with none PVE servers.
For debugging I tested the WebSocket client with my Protocol::WebSocket
server (i have hexdumps in it), this patch is required to make it work
with it. I'm pretty sure we need it for Proxies too.
2018-06-06 06:09:26 +02:00
Dietmar Maurer
69aa81b396 use SectionConfig for PVE::APIClient::Config 2018-06-05 11:44:45 +02:00
René Jochum
06039c7f9b Add config class.
Signed-off-by: René Jochum <r.jochum@proxmox.com>
2018-06-05 06:26:17 +02:00
Dietmar Maurer
2779eec998 correctly use HTTP::Response 2018-05-30 11:28:18 +02:00
Dietmar Maurer
84d4c3e267 remove generic websocket code - not worth to share 2018-05-30 10:40:06 +02:00
Dietmar Maurer
1824383b71 implement basic websocket protocol 2018-05-30 10:35:27 +02:00
Dietmar Maurer
aa570b3853 move config related code to PVE/APIClient/Config.pm 2018-05-29 09:33:05 +02:00
Dietmar Maurer
3454a319f2 use new PVE::APIClient::Config class, register_standard_option 'pveclient-remote-name'
and implement command line completion for 'remote' names.
2018-05-29 09:20:25 +02:00
Dietmar Maurer
84ba32e5d4 lxc.pm: add test code to read config from ~/.pveclient 2018-05-29 08:36:03 +02:00
Dietmar Maurer
adf285bf0d add stub for lxc commands 2018-05-23 12:19:34 +02:00