Wolfgang Bumiller
c43ac0a64c
schema: impl FromIterator for ParameterError
...
for where we also have Extend impls
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-14 09:46:20 +01:00
Wolfgang Bumiller
706d966c87
schema: bump edition to 2021
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-14 09:45:38 +01:00
Wolfgang Bumiller
fb27e132e7
rest-server: bump schema to 1.2 and use convenience methods
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 14:09:45 +01:00
Wolfgang Bumiller
ae0ee80f43
bump proxmox-schema to 1.2.0-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 14:08:30 +01:00
Wolfgang Bumiller
8a60e6c8d0
schema: rustfmt
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 14:05:05 +01:00
Wolfgang Bumiller
a5ba444a5b
schema: ParameterError convenience
...
for ease of use implement these traits for ParameterError:
* From<(&str, Error)>
* From<(String, Error)>
* Extend<(String, Error)>
* Extend<(&str, Error)>
* IntoIterator<Item = (String, Error)>
and add the following methods:
* fn into_inner(self) -> Vec<(String, Error)>;
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 14:01:57 +01:00
Wolfgang Bumiller
68d22d4888
proxmox-rest-server: add missing 'derive' feature
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 13:57:48 +01:00
Wolfgang Bumiller
70142e607d
proxmox-http: drop 'mut' on specialized request methods
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 08:56:34 +01:00
Wolfgang Bumiller
86f3c90763
proxmox-tfa: fully deserialize TfaChallenge
...
otherwise clients cannot use this...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 08:56:34 +01:00
Wolfgang Bumiller
e5a43afe10
proxmox-tfa: make TfaChallenge members public
...
rust based *clients* may want/need access to it
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 08:56:34 +01:00
Fabian Grünbichler
d80d195c26
misc clippy fixes
...
the trivial ones ;)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-02-08 14:57:16 +01:00
Fabian Grünbichler
bb7018e183
misc clippy fixes
...
the trivial ones ;)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-02-08 14:57:16 +01:00
Fabian Grünbichler
9ba2092d1b
proxmox-async: rustfmt (again)
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-02-08 14:52:42 +01:00
Fabian Grünbichler
09d1344d61
proxmox-async: another clippy fixup
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-02-08 14:33:50 +01:00
Fabian Grünbichler
ca563a8cfd
misc clippy fixes
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-02-08 14:28:44 +01:00
Wolfgang Bumiller
9539fbde1c
proxmox-async: clippy fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-08 14:26:46 +01:00
Stefan Sterz
0b90f8d802
api-macro: fix "Forgerty" typo
...
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2022-02-07 15:38:39 +01:00
Thomas Lamprecht
5cc4ce3b4d
http: websocket: code cleanup
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-04 17:16:36 +01:00
Thomas Lamprecht
1edb52411e
http: websocket: drop Text frame auto-detection from docs
...
was forgotten in commit 232d87531e
when
dropping the bogus frame auto detection
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-04 17:15:49 +01:00
Thomas Lamprecht
42b6f4331f
http: websocket: avoid modulo for power of 2
...
even for the small cases this can matter
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-04 17:12:07 +01:00
Thomas Lamprecht
c70d98c90c
tfa: fix hyperlink in doc comment
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-04 17:06:02 +01:00
Thomas Lamprecht
425b52586e
http: websocket: rustfmt and small cleanups
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-04 17:05:45 +01:00
Thomas Lamprecht
170564dd77
http: websocket: doc wording cleanups
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-04 17:04:50 +01:00
Dominik Csapak
4826ff99d8
proxmox-http: websocket: fix comment about callback
...
this was once a callback in an early version, but it changed to a
channel, but the comment was not updated
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-02-04 16:10:31 +01:00
Wolfgang Bumiller
138f32e360
metrics: cleanup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-03 13:40:07 +01:00
Thomas Lamprecht
645b2ae89b
rest: add cookie_from_header helper
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-03 13:12:02 +01:00
Thomas Lamprecht
48e047cefc
proxmox-metrics: re-bump version for first upload
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-03 13:11:38 +01:00
Fabian Ebner
037ce3a0aa
check suites: add special check for Debian security repository
...
since the suffix was changed with Debian Bullseye.
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-03 08:57:04 +01:00
Fabian Ebner
4bdd6a5148
clippy fixes
...
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-03 08:55:42 +01:00
Fabian Ebner
9caae7d49e
upgrade to edition 2021
...
std::convert::{TryFrom, TryInto} are now part of the prelude.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-03 08:55:08 +01:00
Wolfgang Bumiller
3745f36ab1
metrics: use builder pattern for adding tags
...
Rather than going from a list of `(&str, &str)` tuples to a
`HashMap<String, String>`, add a `.tag()` builder method
and use `Cow` behind the scenes to efficiently allow the
caller to choose between a static literal and a `String`
value.
Previously the methods forced `&str` slices and then
always-copied those into `String`s even if the caller could
just *move* it.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-02 15:23:22 +01:00
Wolfgang Bumiller
e325f4a0d8
metrics: more doc fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-02 14:30:14 +01:00
Wolfgang Bumiller
c609a58086
doc fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-02 14:14:09 +01:00
Wolfgang Bumiller
65f05daf7e
doc fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-02 14:13:19 +01:00
Wolfgang Bumiller
41862eeb95
bump proxmox-async to 0.3.3
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-02 13:21:55 +01:00
Dominik Csapak
8bf293bfc5
proxmox-metrics: implement metrics server client code
...
influxdb (udp + http(s)) only for now
general architecture looks as follows:
the helper functions influxdb_http/udp start a tokio task and return
a Metrics struct, that can be used to send data and wait for the tokio
task. if the struct is dropped, the task is canceled.
so it would look like this:
let metrics = influxdb_http(..params..)?;
metrics.send_data(...).await?;
metrics.send_data(...).await?;
metrics.join?;
on join, the sending part of the channel will be dropped and thus
flushing the remaining data to the server
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[renamed proxmox_async::io::udp -> proxmox_async::net::udp]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-02 12:56:21 +01:00
Wolfgang Bumiller
de891b1f76
proxmox_async: rustfmt
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-02 12:55:01 +01:00
Wolfgang Bumiller
807a70cecc
proxmox_async: move io::udp to net::udp
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-02 12:54:39 +01:00
Dominik Csapak
9ebf24b4f8
proxmox-async: add udp::connect() helper
...
so that we do not have to always check the target ipaddr family manually
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-02 12:43:48 +01:00
Thomas Lamprecht
8b15ac202e
d/control: update
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-01 13:18:22 +01:00
Thomas Lamprecht
1ab70b8c21
bump version to 0.9.3-1
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-01 13:03:57 +01:00
Dominik Csapak
e428920a15
proxmox-sys: add FileSystemInformation struct and helper
...
code mostly copied from proxmox-backups 'disk_usage'
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-02-01 12:26:14 +01:00
Dominik Csapak
131f3d9471
proxmox-sys: make some structs serializable
...
we already depend on serde anyway, and this makes gathering structs a
bit more comfortable
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-02-01 12:26:14 +01:00
Wolfgang Bumiller
4cab29c57a
make upload: drop buster
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-01 11:10:00 +01:00
Wolfgang Bumiller
3531729921
include error messages in error display
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-01 10:39:23 +01:00
Wolfgang Bumiller
bd2bf045cc
use native-tls for ureq
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-01 10:38:57 +01:00
Wolfgang Bumiller
abc0bdd09d
bump version to 0.4.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-01 10:26:20 +01:00
Wolfgang Bumiller
fe6294cd3a
bump edition to 2021
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-01 10:18:32 +01:00
Wolfgang Bumiller
7622380dd7
switch from curl to ureq
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-01 10:18:23 +01:00
Dietmar Maurer
ce9a84c54f
enable gzip feature for ureq
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2022-02-01 09:13:50 +01:00