Commit Graph

168 Commits

Author SHA1 Message Date
Lukas Wagner
02d170a5b5 pve-rs: tfa: clippy: question mark operator is useless here
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
79b2c8e481 pve-rs: tfa: clippy: this function has too many arguments
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Lukas Wagner
2b23512a56 pve-rs: tfa: clippy: unnecessary pub(self)
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-10 19:04:30 +01:00
Wolfgang Bumiller
ae27b307b8 pve: fix use vs mod grouping
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-29 10:31:31 +02:00
Wolfgang Bumiller
cdc792005e pve: bump version to 0.8.10
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-09 13:46:22 +02:00
Lukas Wagner
ea4d87816b cache: add bindings for SharedCache
This is a simple, cache implementation which can be accessed from
multiple processes. It also supports storing a range of historical
values.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
[wb: also update pmg-rs/Cargo.toml and both d/control files]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-08-09 13:21:01 +02:00
Fabian Grünbichler
9a91594ee6 update to proxmox-log 0.2
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-08-06 14:13:31 +02:00
Wolfgang Bumiller
885830935c update to sys 0.6 and proxmox-log crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-17 12:44:46 +02:00
Lukas Wagner
6789b14986 pve-rs: common: send apt update notification via proxmox-notify
For PMG we for now only provide an empty stub and warn to syslog -
we need basic notification system integration there first.
On PMG, we still use a pure Perl implementation at the moment,
so this should not be an issue unless we change that.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-07-08 15:33:58 +02:00
Dietmar Maurer
89d9debadb perl-rs: add further apt api calls
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-07-08 15:33:57 +02:00
Dietmar Maurer
5c994bf942 perl-rs: use api functions from proxmox-apt
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-07-08 15:33:32 +02:00
Dietmar Maurer
9eda29d688 perl-rs: use proxmox-apt-api-types
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2024-07-08 15:33:29 +02:00
Wolfgang Bumiller
83427e9204 bump proxmox-tfa to 5.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-04 10:48:48 +02:00
Wolfgang Bumiller
61b2f69a45 bump proxmox-time to 2.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-20 14:11:34 +02:00
Fabian Grünbichler
c873ac57d5 build: adapt Makefile to moved cargo config
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-20 12:20:42 +02:00
Lukas Wagner
7e3ea35595 pve-rs: pmg-rs: move deprecated .cargo/config to .cargo/config.toml
Fixes the following new warning that appeared after switching
to rust 1.77:

warning: `proxmox-perl-rs/pve-rs/.cargo/config` is deprecated in
favor of `config.toml`

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-06-20 12:19:01 +02:00
Fabian Grünbichler
a34b31054d build: force debug symbols in release build
they then get stripped into their own package anyway, but without this we don't
get debug symbols at all with rustc >= 1.77

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-20 10:09:19 +02:00
Wolfgang Bumiller
cd0e7b8cd2 pve: bump version to 0.8.9
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-04 11:01:22 +02:00
Wolfgang Bumiller
0b6800b0bd pve: the notify chagnes now break libpve-notify-perl <<8.0.7
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-04 10:42:03 +02:00
Wolfgang Bumiller
d0633ac98e pve,pmg: bump proxmox-notify to 0.4
build fixes for pve follow

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-04 10:40:53 +02:00
Wolfgang Bumiller
2860777e61 buildsys improvements for generated files
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-03 14:00:03 +02:00
Wolfgang Bumiller
27a7f2e252 pve: bump version to 0.8.8
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-01-10 14:20:00 +01:00
Wolfgang Bumiller
199be72401 pve,pmg: bump proxmox-notify dependency to 0.3.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-01-10 14:11:09 +01:00
Wolfgang Bumiller
d6df8340c5 pve, pmg: bump perlmod-bin to 0.3.0-3
fixes a syntax error in the generated pm file

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-01-02 14:20:12 +01:00
Wolfgang Bumiller
427fdb13c0 pve: update testcase PVE.pm with fixed library path
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-18 10:39:30 +01:00
Wolfgang Bumiller
c57e1868e7 pve: upgrade perlmod-bin dependency to 0.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-18 10:22:09 +01:00
Wolfgang Bumiller
ec95bb1c53 pve: build fix
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-18 10:20:16 +01:00
Wolfgang Bumiller
16c41f1a91 pve: load SslProbe in Proxmox/Lib/PVE.pm
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-12-07 09:56:05 +01:00
Thomas Lamprecht
4c54abcea8 pve: bump version to 0.8.7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-17 13:42:07 +01:00
Thomas Lamprecht
61ab181b01 cargo: depend on notify 0.3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-17 13:38:28 +01:00
Lukas Wagner
b905cfd03d pve-rs: notify: remove notify_context for PVE
The context has now been moved to `proxmox-notify` due to the fact
that we also need it in `proxmox-mail-forward` now.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 13:30:57 +01:00
Fiona Ebner
bfc7f2c518 pve: test: resource scheduling: add another test where memory is secondary to CPU
but this time, without any start load on the node. This test fails
with librust-proxmox-resource-scheduling-dev=0.2.0-1

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-11-06 18:21:06 +01:00
Fiona Ebner
14a3de9826 pve: test: resource scheduling: add test where memory is secondary to CPU
because memory usage differences are small.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-11-06 18:21:06 +01:00
Wolfgang Bumiller
1c2ff27e75 pve: switch openid to use magic
Instead of blessed raw pointers as these can easily lead to double
free corruptions when they're copied in perl.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-10-04 09:09:45 +02:00
Fabian Grünbichler
4c6cc7e241 update to env_logger 0.10
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-10-03 10:00:27 +02:00
Lukas Wagner
50f372fe7e notify context: fix 'default_sendmail_from' context method
The name of the configuration option in datacenter.cfg is `email_from`
and not `mail_from`.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-10-02 12:31:11 +02:00
Thomas Lamprecht
8d031134e1 bump version to 0.8.6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-05 16:32:45 +02:00
Wolfgang Bumiller
e52b4ea877 bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-28 11:51:53 +02:00
Wolfgang Bumiller
8ff4471ee6 bump notify dependency
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-28 11:51:28 +02:00
Lukas Wagner
76b63ed6a8 notify: use new HttpError type
Use `proxmox-http-error::HttpError` instead of
`proxmox-notify::api::ApiError`.

Also factoring out the digest decoding into a small helper.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-07-28 11:50:08 +02:00
Wolfgang Bumiller
af7ff77ac7 bump pve-rs to 0.8.5
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-24 14:14:06 +02:00
Wolfgang Bumiller
d5ff7165a2 remove leftover PVE::RS::Notify module
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-24 14:01:23 +02:00
Lukas Wagner
703cfbd212 notify: rename PVE::RS::Notify to Proxmox::RS::Notify
Also splitting PVE-specific context into its own file.

Suggested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-07-24 13:58:26 +02:00
Lukas Wagner
69d2eb953d notify: add wrapper for get_referenced_entities
The function returns all other entities referenced by a filter/target.
This is useful for permission checks, where the user must have the
appropriate permissions for all entities.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-07-24 11:17:45 +02:00
Lukas Wagner
de59ffe4ec notify: add context for getting http_proxy from datacenter.cfg
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-07-24 11:17:43 +02:00
Lukas Wagner
178196e1ae notify: implement context for getting default author/mailfrom
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-07-24 11:17:42 +02:00
Lukas Wagner
a5ee03ed0f notify: sendmail: support the mailto-user parameter
This parameter allows to send mails to the email address configured
for users from the product's user database.

`proxmox-notify` now has a `Context` that must be set via
`proxmox_notify::context::set_context` before the crate is used.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-07-24 11:17:41 +02:00
Lukas Wagner
79f339d136 notify: add api for notification filters
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-07-24 11:17:39 +02:00
Lukas Wagner
6b5dbc3238 notify: add api for gotify endpoints
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-07-24 11:17:38 +02:00
Lukas Wagner
a73ba69716 notify: add api for sendmail endpoints
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-07-24 11:17:36 +02:00