Add a description for the handle, which can be useful to display
alongside the name. The descriptions are essentially the first
sentence from PVE's "Package Repositories" docs, but without the
product name.
Also drop the " Repository" suffix from the names, as it's not useful,
but can be ugly: e.g. for the UI when the label already is
'Repository:'.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
which is obtained from the cached InRelease file and also works for
mirrors, host aliases, direct IPs.
The has_official_uri function was replaced by origin_from_uris.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Allows obtaining the 'Origin' property from the cached InRelease file.
Used the once_cell crate for the config module, because it is already
used in proxmox-backup and seemed to be the right fit here.
For now, the config module is just used to be able to override the
path for the test environment, but those are actual APT config
variables, and in the future, it can be extended and used to actually
parse the apt.conf(.d/*) on the system.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Get handles for the available repositories along with their current
configuration status and make it possible to add them.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
this major release still needs to have an incompatible, the next one can
drop setting a protocol client-side, and the one after that can remove
the protocol handling on the server side.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
we do not support websocket subprotocols, but for compatibility with
current clients (novnc, pve-xtermjs) we have to reply with the one requested,
else this is a protocol error and browsers will error out
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
we never actually sent text frames, nor did any client request them.
Also, no validity check ever ocurred, so technically it was against
the spec.
Simply remove the code handling sending out text frames. If we need
to actually handle that, we can always create a 'WebSocketStringWriter'
or similar.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
it's a 'http' utility crate
* the extra 'http' module is redundant
* the module name 'helpers' as a public path doesn't say
much about what it does
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
this is just a (rather HTTP specific) wrapper, so put it into a
'wrapper' module for now.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>