Currently useful only for single file restore, but kept generic enough
to use any compatible API endpoint over a virtio-vsock[0,1] interface.
VsockClient is adapted and slimmed down from HttpClient.
A tower-compatible VsockConnector is implemented, using a wrapped
UnixStream as transfer. The UnixStream has to be wrapped in a custom
struct to implement 'Connection', Async{Read,Write} are simply forwarded
directly to the underlying stream.
[0] https://www.man7.org/linux/man-pages/man7/vsock.7.html
[1] https://wiki.qemu.org/Features/VirtioVsock
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This allows anything that can be represented as a UnixStream to be used
as transport for an API server (e.g. virtio sockets).
A tower service expects an IP address as it's peer, which we can't
reliably provide for unix socket based transports, so just fake one.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
but auto-expand them, so no additional click is necessary
this shows the user which tapes are involved for the media sets
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
if a catalog is missing (or the loading otherwise throws an error), show
the error message in a msg box instead of a mask. this way a user can
still navigate the tree
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
if given, erases the tape only iff the inserted tape contains that label
used to safeguard tape erasing from ui for standalone drives
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
by adapting and reusing the 'LabelMedia' window
shows a short notice about inserting the correct tape in the drive
and now allows to select a drive
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
listing the media can potentially hang (changer status), so do not
reload in the background, only on activate
also increase the timeout to 5 minutes and add a reload button
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
since tape commands can take a while and we do not want to change
all of those to worker tasks, increase the timeout to 5 minutes
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
in most uses, we want to remove the drive from the param afterwards
where we don't, we already overwrite it with the result of this function
this fixes some commands (like 'proxmox-tape read-label --drive foo')
that failed with:
parameter 'drive': duplicate parameter.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>