]>
git.proxmox.com Git - proxmox.git/log
Dietmar Maurer [Thu, 2 May 2024 11:04:43 +0000 (13:04 +0200)]
dns-api: new crate which implements the DNS api
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Dietmar Maurer [Thu, 2 May 2024 10:15:59 +0000 (12:15 +0200)]
product-config: add rust API type for configuration digest
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Dietmar Maurer [Fri, 26 Apr 2024 10:05:44 +0000 (12:05 +0200)]
new crate for commonly used functions to read and write configuration files
Factor out functions to read and write configuration files with
product specific permissions.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Thomas Lamprecht [Fri, 26 Apr 2024 15:34:43 +0000 (17:34 +0200)]
metrics: bump version to 0.3.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 26 Apr 2024 15:31:22 +0000 (17:31 +0200)]
metrics: influxdb: inline variables into template format string
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Gabriel Goller [Fri, 26 Apr 2024 14:02:42 +0000 (16:02 +0200)]
metrics: encode influxdb org and bucket parameters
In order to remove the current limitations on the bucket and
organization names, we need to make sure that they are transmitted
correctly. In order to do this, we encode them using the url crate.
This way we support organization/bucket names that include slashes,
whitespaces, etc.
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
Thomas Lamprecht [Fri, 26 Apr 2024 15:24:23 +0000 (17:24 +0200)]
sys: bump version to 0.5.4-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 26 Apr 2024 14:52:41 +0000 (16:52 +0200)]
sys: bump version to 0.5.4-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 24 Apr 2024 19:22:15 +0000 (21:22 +0200)]
auth-api: bump version to 0.3.5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 24 Apr 2024 19:12:19 +0000 (21:12 +0200)]
ldap: bump version to 0.2.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Fabian Grünbichler [Mon, 22 Apr 2024 13:04:44 +0000 (15:04 +0200)]
notify: fix TemplateType::Subject doc comment
wrongly copied
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Thomas Lamprecht [Tue, 23 Apr 2024 21:09:36 +0000 (23:09 +0200)]
notify: bump version to 0.4.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Lukas Wagner [Tue, 23 Apr 2024 11:51:51 +0000 (13:51 +0200)]
notify: add getter for notification timestamp
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Lukas Wagner [Tue, 23 Apr 2024 11:51:50 +0000 (13:51 +0200)]
notify: endpoints: matcher: improve descriptions for API types
proxmox-schema will automatically append text (e.g. 'Can be specified
more than once'), so we should end every comment with a '.'.
Also copy over some text from PVE docs, since these doc comments will
now be visible in the PBS documentation.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Lukas Wagner [Tue, 23 Apr 2024 11:51:49 +0000 (13:51 +0200)]
notify: pbs-context: exclude successful prunes in default matcher
PBS sends notifications for all events but successful prune jobs.
There we only care about errors.
This commit adapts the 'default-matcher' to reflect that behavior
as well.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Lukas Wagner [Tue, 23 Apr 2024 11:51:48 +0000 (13:51 +0200)]
notify: use std::sync::OnceCell instead of lazy_static!
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Lukas Wagner [Tue, 23 Apr 2024 11:51:47 +0000 (13:51 +0200)]
notify: expose `config` module
This is needed because we want to access CONFIG and PRIVATE_CONFIG
from the docgen helper in PBS.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Lukas Wagner [Fri, 19 Apr 2024 14:17:15 +0000 (16:17 +0200)]
notify: renderer: add relative-percentage helper from PBS
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Lukas Wagner [Fri, 19 Apr 2024 14:17:14 +0000 (16:17 +0200)]
notify: pbs context: include nodename in default sendmail author
The old notification stack in proxmox-backup includes the nodename, so
we include it here as well.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Lukas Wagner [Fri, 19 Apr 2024 14:17:13 +0000 (16:17 +0200)]
notify: derive Deserialize/Serialize for Notification struct
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Lukas Wagner [Fri, 19 Apr 2024 14:17:12 +0000 (16:17 +0200)]
notify: derive `api` for Deleteable*Property
The API endpoints in Proxmox Backup Server require ApiType to be
implemented for any deserialized parameter.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Lukas Wagner [Fri, 19 Apr 2024 14:17:11 +0000 (16:17 +0200)]
notify: api: add get_targets
This method allows us to get a list of all notification targets.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Lukas Wagner [Fri, 19 Apr 2024 14:17:10 +0000 (16:17 +0200)]
notify: give each notification a unique ID
We need this for queuing notifications on PBS from the unprivileged
proxy process.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Lukas Wagner [Fri, 19 Apr 2024 14:17:09 +0000 (16:17 +0200)]
notify: cargo.toml: add spaces before curly braces
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Lukas Wagner [Fri, 19 Apr 2024 14:17:08 +0000 (16:17 +0200)]
notify: make the `mail-forwarder` feature depend on proxmox-sys
It uses proxmox_sys::nodename - the dep is needed, otherwise the code
does not compile in some feature flag permutations.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Lukas Wagner [Fri, 19 Apr 2024 14:17:07 +0000 (16:17 +0200)]
notify: don't make tests require pve-context
Tests now have their own context, so requiring pve-context is not
necessary any more.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Lukas Wagner [Fri, 19 Apr 2024 14:17:06 +0000 (16:17 +0200)]
notify: convert Option<Vec<T>> -> Vec<T> in config structs
Suggested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Lukas Wagner [Fri, 19 Apr 2024 14:17:05 +0000 (16:17 +0200)]
notify: make api methods take config struct ownership
This saves us from some of the awkward cloning steps when updating.
Suggested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Lukas Wagner [Fri, 19 Apr 2024 14:17:04 +0000 (16:17 +0200)]
notify: switch to file-based templating system
Instead of passing the template strings for subject and body when
constructing a notification, we pass only the name of a template.
When rendering the template, the name of the template is used to find
corresponding template files. For PVE, they are located at
/usr/share/proxmox-ve/templates/default. The `default` part is
the 'template namespace', which is a preparation for user-customizable
and/or translatable notifications.
Previously, the same template string was used to render HTML and
plaintext notifications. This was achieved by providing some template
helpers that 'abstract away' HTML/plaintext formatting. However,
in hindsight this turned out to be pretty finicky. Since the
current changes lay the foundations for user-customizable notification
templates, I ripped these abstractions out. Now there are simply two
templates, one for plaintext, one for HTML.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Fabian Grünbichler [Thu, 14 Mar 2024 10:26:53 +0000 (11:26 +0100)]
fix #5249: apt: allow parsing Packages without Priority field
it seems there are repositories out there that don't (always) include
it, and while it is required for the .deb packages themselves in Debian,
the repository "spec" doesn't make it mandatory.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Thu, 14 Mar 2024 10:26:53 +0000 (11:26 +0100)]
fix #5249: apt: allow parsing Packages without Priority field
it seems there are repositories out there that don't (always) include
it, and while it is required for the .deb packages themselves in Debian,
the repository "spec" doesn't make it mandatory.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Lukas Wagner [Wed, 3 Apr 2024 08:08:25 +0000 (10:08 +0200)]
notify: fix #5274: also set 'X-Gotify-Key' header for authentication
Versions of Gotify < 2.2.0 only supported the 'X-Gotify-Key' header
for passing the API token. This comment sets this header in addition
to the regular 'Authorization' header in order to be compatible with
older Gotify servers.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Wolfgang Bumiller [Thu, 28 Mar 2024 12:17:56 +0000 (13:17 +0100)]
bump proxmox-http to 0.9.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 28 Mar 2024 10:19:56 +0000 (11:19 +0100)]
http: support ALPN negotiated http2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Thomas Lamprecht [Mon, 25 Mar 2024 16:04:17 +0000 (17:04 +0100)]
tree-wide: run cargo fmt
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Christoph Heiss [Fri, 12 Jan 2024 16:15:58 +0000 (17:15 +0100)]
auth-api: implement `Display` for `Realm{, Ref}`
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Christoph Heiss [Fri, 12 Jan 2024 16:15:57 +0000 (17:15 +0100)]
ldap: add method for retrieving root DSE attributes
The root DSE holds common attributes about the LDAP server itself.
Needed to e.g. support Active Directory-based LDAP servers to retrieve
the base DN from the server itself, based on an valid bind.
See also RFC 4512, Section 5.1 [0] for more information about this
special object.
[0] https://www.rfc-editor.org/rfc/rfc4512#section-5.1
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Christoph Heiss [Fri, 12 Jan 2024 16:15:56 +0000 (17:15 +0100)]
ldap: avoid superfluous allocation when calling .search()
The `attrs` parameter of `Ldap::search()` is an `impl AsRef<[impl
AsRef<str>]>` anyway, so replace `vec![..]` with `&[..]`.
Suggested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Gabriel Goller [Mon, 22 Jan 2024 14:23:32 +0000 (15:23 +0100)]
fix: use fragmented block size for space calculation
We currently calculate the size of a datastore using `statfs64`, which
returns the number of blocks in the fs and the two block sizes:
fragemented block size(f_frsize) and block size (f_bsize). To calculate
eg the total space in a datastore we use total_blocks * f_bsize, which
is not always correct.
`f_frsize` is the minimum unit of allocation on the filesystem (in
bytes) and in 99% of the cases equal to `f_bsize`, but in some cases
it differs. For example some filesystems allow smaller blocks for small
files, in case f_frsize < f_bsize. In that case, f_frsize * total_blocks
returns (mostly) the correct result (ceph also did some weird stuff, which is
now being fixed though [0][1]). `statvfs` also documents this as the
recommended way ('fsblkcnt_t f_blocks; /* Size of fs in f_frsize units */')[2].
This patch aligns the the behavior with the libc utilities (also used by
`df`) [3].
Motivation: [4] (Forum post)
[0]: https://tracker.ceph.com/issues/3793
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
92a49fb0f79f3300e6e50ddf56238e70678e4202
[2]: https://www.man7.org/linux/man-pages/man3/statvfs.3.html
[3]: https://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/fsusage.c#n147
[4]: https://forum.proxmox.com/threads/pbs-3-1-2-wrong-datastore-information-sshfs.139875/#post-626959
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
Thomas Lamprecht [Tue, 19 Mar 2024 10:23:43 +0000 (11:23 +0100)]
sys: d/copyright: update years
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Wolfgang Bumiller [Tue, 19 Mar 2024 10:10:30 +0000 (11:10 +0100)]
bump proxmox-notify to 0.3.3-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 19 Mar 2024 10:09:10 +0000 (11:09 +0100)]
bump proxmox-auth-api to 0.3.4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 19 Mar 2024 10:07:08 +0000 (11:07 +0100)]
bump proxmox-schema to 3.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 19 Mar 2024 09:29:27 +0000 (10:29 +0100)]
notify: adapt to proxmox_schema changes, use const_format
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 19 Mar 2024 09:27:25 +0000 (10:27 +0100)]
notify: sort and group dependencies
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Fri, 15 Mar 2024 11:27:32 +0000 (12:27 +0100)]
proxmox-schema: moved common api types from pbs-api-types
We want to use those types in all of our products.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Dietmar Maurer [Fri, 15 Mar 2024 11:27:31 +0000 (12:27 +0100)]
proxmox-schema: add IP address regex/api-types
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Dietmar Maurer [Fri, 15 Mar 2024 11:27:30 +0000 (12:27 +0100)]
proxmox-auth-api: use const_format to define static strings
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Dietmar Maurer [Fri, 15 Mar 2024 11:27:29 +0000 (12:27 +0100)]
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>
Wolfgang Bumiller [Thu, 7 Mar 2024 12:27:15 +0000 (13:27 +0100)]
bump proxmox-acme to 0.5.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 7 Mar 2024 12:24:42 +0000 (13:24 +0100)]
acme: formatting fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 7 Mar 2024 12:24:37 +0000 (13:24 +0100)]
acme: drop api-types feature from schema dependency
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Thu, 7 Mar 2024 11:54:44 +0000 (12:54 +0100)]
proxmox-acme: derive PartialEq for API types
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Dietmar Maurer [Thu, 7 Mar 2024 09:45:33 +0000 (10:45 +0100)]
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>
Wolfgang Bumiller [Wed, 21 Feb 2024 11:28:09 +0000 (12:28 +0100)]
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: 2f942833672d "rrd: spell out hard to understand abbreviations in public types"
Wolfgang Bumiller [Wed, 21 Feb 2024 11:24:25 +0000 (12:24 +0100)]
bump proxmox-schema to 3.0.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 21 Feb 2024 11:04:39 +0000 (12:04 +0100)]
schema: drop periods after errors
lower case start + period = wrong
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 21 Feb 2024 11:02:00 +0000 (12:02 +0100)]
schema: add regression tests for additional_properties in AllOf
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 21 Feb 2024 10:41:53 +0000 (11:41 +0100)]
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>
Maximiliano Sandoval R [Fri, 16 Feb 2024 14:59:01 +0000 (15:59 +0100)]
router: Use safe wrapper for libc::isatty
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Maximiliano Sandoval R [Fri, 16 Feb 2024 14:59:00 +0000 (15:59 +0100)]
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>
Wolfgang Bumiller [Fri, 2 Feb 2024 13:24:27 +0000 (14:24 +0100)]
bump proxmox-subscription to 0.4.3-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 2 Feb 2024 13:22:22 +0000 (14:22 +0100)]
bump proxmox-rrd to 0.1.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 2 Feb 2024 13:19:52 +0000 (14:19 +0100)]
bump proxmox-notify to 0.3.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 2 Feb 2024 13:05:44 +0000 (14:05 +0100)]
bump proxmox-client to 0.3.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 2 Feb 2024 13:03:10 +0000 (14:03 +0100)]
bump proxmox-section-config to 2.0.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 2 Feb 2024 13:01:28 +0000 (14:01 +0100)]
bump proxmox-auth-api to 0.3.3
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 2 Feb 2024 13:00:27 +0000 (14:00 +0100)]
bump proxmox-tfa to 4.1.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 2 Feb 2024 11:08:15 +0000 (12:08 +0100)]
bump proxmox-rest-server to 0.5.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 2 Feb 2024 12:55:23 +0000 (13:55 +0100)]
bump proxmox-router to 2.1.3-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 2 Feb 2024 12:51:47 +0000 (13:51 +0100)]
bump proxmox-human-byte to 0.1.3-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 2 Feb 2024 12:47:49 +0000 (13:47 +0100)]
bump proxmox-apt to 0.10.8-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 2 Feb 2024 12:45:41 +0000 (13:45 +0100)]
bump proxmox-api-macro to 1.0.8-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 2 Feb 2024 11:11:21 +0000 (12:11 +0100)]
bump proxmox-schema to 3.0.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 4 Apr 2023 14:00:59 +0000 (16:00 +0200)]
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>
Wolfgang Bumiller [Fri, 17 Mar 2023 14:44:45 +0000 (15:44 +0100)]
router: OneOfSchema support
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Wolfgang Bumiller [Thu, 16 Mar 2023 16:11:05 +0000 (17:11 +0100)]
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>
Wolfgang Bumiller [Tue, 14 Mar 2023 08:02:45 +0000 (09:02 +0100)]
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>
Wolfgang Bumiller [Thu, 9 Mar 2023 14:50:55 +0000 (15:50 +0100)]
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>
Wolfgang Bumiller [Wed, 8 Mar 2023 12:26:50 +0000 (13:26 +0100)]
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>
Wolfgang Bumiller [Thu, 1 Feb 2024 12:46:28 +0000 (13:46 +0100)]
bump proxmox-rrd to 0.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Lukas Wagner [Wed, 31 Jan 2024 15:26:01 +0000 (16:26 +0100)]
rrd: spell out hard to understand abbreviations in public types
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Lukas Wagner [Wed, 31 Jan 2024 13:56:51 +0000 (14:56 +0100)]
rrd: fix a few typos
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Lukas Wagner [Wed, 31 Jan 2024 13:51:54 +0000 (14:51 +0100)]
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>
Lukas Wagner [Wed, 31 Jan 2024 12:02:52 +0000 (13:02 +0100)]
add debian packaging for proxmox-rrd
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Lukas Wagner [Wed, 31 Jan 2024 11:57:22 +0000 (12:57 +0100)]
add `proxmox-rrd` to workspace
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Lukas Wagner [Wed, 31 Jan 2024 11:40:20 +0000 (12:40 +0100)]
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>
Wolfgang Bumiller [Wed, 24 Jan 2024 11:48:09 +0000 (12:48 +0100)]
bump proxmox-login to 0.1.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 24 Jan 2024 08:26:02 +0000 (09:26 +0100)]
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>
Wolfgang Bumiller [Wed, 24 Jan 2024 08:01:54 +0000 (09:01 +0100)]
login: parse helpers for floats
Of course PVE also stringifies those in the API, duh...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 22 Jan 2024 13:55:05 +0000 (14:55 +0100)]
schema: cli: simplify can_default check
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 15 Jan 2024 10:17:57 +0000 (11:17 +0100)]
http: concat! user agent instead of format!
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 10 Jan 2024 13:15:48 +0000 (14:15 +0100)]
notify: bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 10 Jan 2024 13:04:36 +0000 (14:04 +0100)]
bump proxmox-notify to 0.3.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Lukas Wagner [Wed, 13 Dec 2023 16:37:42 +0000 (17:37 +0100)]
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>
Lukas Wagner [Wed, 13 Dec 2023 16:37:41 +0000 (17:37 +0100)]
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>
Lukas Wagner [Wed, 13 Dec 2023 16:37:40 +0000 (17:37 +0100)]
notify: include 'hostname' metadata field for forwarded mails
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Lukas Wagner [Wed, 10 Jan 2024 09:31:22 +0000 (10:31 +0100)]
notify: add separate context for unit-tests
... as using PVEContext for tests is brittle and annoying for some
tests.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Lukas Wagner [Wed, 10 Jan 2024 09:31:21 +0000 (10:31 +0100)]
notify: api: allow resetting built-in targets if used by a matcher
In the 'delete'-handler targets, we check if a
target is still referenced by a matcher - if it is, we return an
error. For built-in targets, this is actually not necessary, since
'deleting' a built-in only resets it to its default settings - it will
continue to exist after that.
The user could easily trigger this if 'mail-to-root', which is
referenced by 'default-matcher' is modified and then reset to its
defaults: An error is shown, the built-in target is not reset.
This commit disables this check if it is a built-in target.
Renamed the helper 'ensure_unused' to 'ensure_safe_to_delete' in the
process.
Also fixed the tests in api::test - they were never executed due to a
faulty #[cfg] directive.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Lukas Wagner [Wed, 10 Jan 2024 09:52:52 +0000 (10:52 +0100)]
notify: smtp: add `Auto-Submitted` header to email body
`Auto-Submitted` is defined in the rfc 5436 [1] and describes how
an automatic response (f.e. ooo replies, etc.) should behave on the
emails. When using `Auto-Submitted: auto-generated` (or any value
other than `none`) automatic replies won't be triggered.
[1]: https://www.rfc-editor.org/rfc/rfc3834.html
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>