Commit Graph

2627 Commits

Author SHA1 Message Date
Dietmar Maurer
a6f1b36fa6 proxmox-auth-api: use const_format to define static strings
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-03-18 10:19:48 +01:00
Dietmar Maurer
0c5e2640d0 proxmox-schema: use const_format to define static strings.
Macro rules are not hygienic, and current rust macro visibility rules
are a nightmare. Using const_format::concatcp!() is a much cleaner
solution.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-03-18 10:19:46 +01:00
Wolfgang Bumiller
c67a13f1d7 bump proxmox-acme to 0.5.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-07 13:27:47 +01:00
Wolfgang Bumiller
fbb3049768 acme: formatting fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-07 13:24:42 +01:00
Wolfgang Bumiller
b5255f1868 acme: drop api-types feature from schema dependency
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-07 13:24:37 +01:00
Dietmar Maurer
0370723261 proxmox-acme: derive PartialEq for API types
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-03-07 13:21:54 +01:00
Dietmar Maurer
619414d4f1 proxmox-acme: add api-types feature
Because AccountData is exposed via our API (currently as type Object).

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-03-07 13:21:52 +01:00
Wolfgang Bumiller
724c3dda6f rrd: fixup examples with the renamed types
Some types were recently renamed but the examples not updated
accordingly.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fixes: 2f94283367 "rrd: spell out hard to understand abbreviations in public types"
2024-02-21 12:28:10 +01:00
Wolfgang Bumiller
05ff6b545a bump proxmox-schema to 3.0.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-21 12:28:02 +01:00
Wolfgang Bumiller
49b2bdf9c6 schema: drop periods after errors
lower case start + period = wrong

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-21 12:05:44 +01:00
Wolfgang Bumiller
9c40144214 schema: add regression tests for additional_properties in AllOf
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-21 12:02:00 +01:00
Wolfgang Bumiller
bae2cf75de schema: AllOf/OneOf: actually perform additional_properties() check
rather than just always allowing additional properties, only return
true if any of the available schemas allows it

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-21 11:43:20 +01:00
Maximiliano Sandoval R
3f92e6286b router: Use safe wrapper for libc::isatty
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-02-16 16:56:02 +01:00
Maximiliano Sandoval R
430df21720 sys: Use safe wrapper for libc::isatty
Use the `std::io::IsTerminal` trait introduced in Rust 1.70.

Internally it calls `libc::isatty`, see [1, 2]. Note that it switches
the comparison from `== 1` to `!= 0` which shouldn't make a difference
assuming that libc::isatty upholds the promises made in its man page.

The MSRV was set on the workspace to reflect this change.

[1] https://doc.rust-lang.org/src/std/io/stdio.rs.html#1079
[2] https://doc.rust-lang.org/src/std/sys/unix/io.rs.html#79

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-02-16 16:55:58 +01:00
Wolfgang Bumiller
7126249102 bump proxmox-subscription to 0.4.3-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 14:24:54 +01:00
Wolfgang Bumiller
304e1c544f bump proxmox-rrd to 0.1.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 14:22:45 +01:00
Wolfgang Bumiller
364b21f3d2 bump proxmox-notify to 0.3.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 14:21:14 +01:00
Wolfgang Bumiller
77672b1253 bump proxmox-client to 0.3.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 14:06:08 +01:00
Wolfgang Bumiller
b5b563e215 bump proxmox-section-config to 2.0.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 14:03:51 +01:00
Wolfgang Bumiller
d9b783f1a8 bump proxmox-auth-api to 0.3.3
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 14:01:57 +01:00
Wolfgang Bumiller
9da7b3ad49 bump proxmox-tfa to 4.1.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 14:00:49 +01:00
Wolfgang Bumiller
890d9e58f7 bump proxmox-rest-server to 0.5.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 13:58:05 +01:00
Wolfgang Bumiller
f67ea142bc bump proxmox-router to 2.1.3-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 13:56:34 +01:00
Wolfgang Bumiller
d143efd01a bump proxmox-human-byte to 0.1.3-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 13:56:01 +01:00
Wolfgang Bumiller
d7876b1837 bump proxmox-apt to 0.10.8-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 13:56:01 +01:00
Wolfgang Bumiller
ca6ca904ad bump proxmox-api-macro to 1.0.8-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 13:56:01 +01:00
Wolfgang Bumiller
245524d0d8 bump proxmox-schema to 3.0.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-02 13:53:12 +01:00
Wolfgang Bumiller
5df9da2af4 schema: implement split_list iterator
and reuse splitting code in no_schema's SeqAccess as well

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
2024-02-02 12:06:46 +01:00
Wolfgang Bumiller
ae7454b05e router: OneOfSchema support
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
2024-02-02 12:06:28 +01:00
Wolfgang Bumiller
d48a150835 schema: implement oneOf schema support
A 'oneOf' schema is basically exactly what a rust `enum` is.
Exactly one of the possible values must match the data.

This should ultimately be the base to allow using the
`#[api]` macro on a newtype style enum as well as using this
schema as a configuration for our section config parser.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
2024-02-02 12:06:28 +01:00
Wolfgang Bumiller
1c0edfb518 router: cli: option to specify args explicitly
so CLI tools can pre-parse out non-api parameters before
passing the remaining stuff to the router

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
2024-02-02 12:05:34 +01:00
Wolfgang Bumiller
2bba40f604 rest-server: support configuring the privileged connection
Adds a privileged_addr to ApiConfig, and some helpers for
hyper (both server and client)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
2024-02-01 14:00:22 +01:00
Wolfgang Bumiller
aad01f7a90 rest-server: support unix sockets in create_daemon
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
2024-02-01 13:59:48 +01:00
Wolfgang Bumiller
440c7e3361 bump proxmox-rrd to 0.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-02-01 13:46:28 +01:00
Lukas Wagner
2f94283367 rrd: spell out hard to understand abbreviations in public types
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-02-01 10:32:19 +01:00
Lukas Wagner
f9e8ebfdc8 rrd: fix a few typos
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-02-01 10:32:19 +01:00
Lukas Wagner
6eed8ed992 rrd: feature-gate support for the v1 format
new users of this crate might not really need support for the v1
format.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-02-01 10:32:19 +01:00
Lukas Wagner
4d150d35c7 add debian packaging for proxmox-rrd
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-02-01 10:32:19 +01:00
Lukas Wagner
5cbc8a4b66 add proxmox-rrd to workspace
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-02-01 10:30:57 +01:00
Lukas Wagner
b8c56e7b6c Merge branch proxmox-rrd
The proxmox-backup repo was filtered using `git filter-repo` using the
following paths:

proxmox-rrd
proxmox-rrd-api-types
src/rrd

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-02-01 10:30:23 +01:00
Wolfgang Bumiller
2b56eba35c bump proxmox-login to 0.1.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-01-24 12:49:06 +01:00
Wolfgang Bumiller
de8fd435fb Makefile: enforce the use packaged cargo
Nightly currently produces a different output format so this command
doesn't work right now when +system is not the default cargo.
Let's hope this is just a temporary hiccup in nightly, given that
there is an explicit `--format-version=1` parameter...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-01-24 09:26:03 +01:00
Wolfgang Bumiller
6ee541d5f2 login: parse helpers for floats
Of course PVE also stringifies those in the API, duh...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-01-24 09:20:49 +01:00
Wolfgang Bumiller
2fa645af2e schema: cli: simplify can_default check
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-01-24 09:20:42 +01:00
Wolfgang Bumiller
fe8b11eeec http: concat! user agent instead of format!
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-01-15 11:17:57 +01:00
Wolfgang Bumiller
3c453f7468 notify: bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-01-10 14:15:48 +01:00
Wolfgang Bumiller
1484676ac4 bump proxmox-notify to 0.3.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-01-10 14:04:36 +01:00
Lukas Wagner
ead4190e7b notify: matcher: support lists of values for 'exact' match-field mode
For example, one can now use:
  match-field exact:type=vzdump,replication
to match on vzdump AND replication events.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-01-10 12:38:32 +01:00
Lukas Wagner
39c4d7d85e notify: include 'type' metadata field for forwarded mails
Seems like this was forgotten in the initial version. Without it,
it's not really possible to create matchers for forwarded mails.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-01-10 12:38:32 +01:00
Lukas Wagner
870d9c2739 notify: include 'hostname' metadata field for forwarded mails
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-01-10 12:38:32 +01:00