[pve-devel] [PATCH ha-manager v5 13/23] api: introduce ha rules api endpoints
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Jul 31 07:36:50 CEST 2025
Am 30.07.25 um 20:03 schrieb Daniel Kral:
> +
> +__PACKAGE__->register_method({
> + name => 'read_rule',
> + method => 'GET',
> + path => '{rule}',
> + description => "Read HA rule.",
> + permissions => {
> + check => ['perm', '/', ['Sys.Audit']],
> + },
> + parameters => {
> + additionalProperties => 0,
> + properties => {
> + rule => get_standard_option(
> + 'pve-ha-rule-id',
> + { completion => \&PVE::HA::Tools::complete_rule },
> + ),
> + },
> + },
> + returns => {
> + type => 'object',
> + properties => {
> + rule => get_standard_option('pve-ha-rule-id'),
> + type => {
> + type => 'string',
could be nice to have a enum or the like here to have more info in the API viewer
and for our rust type code generation infra.
> + },
> + },
> + },
> + code => sub {
> +__PACKAGE__->register_method({
> + name => 'delete_rule',
> + method => 'DELETE',
> + path => '{rule}',
> + description => "Delete HA rule.",
> + permissions => {
> + check => ['perm', '/', ['Sys.Console']],
Pre-exiting, but yeah, we really need dedicated HA.{Audit,Modify,Use} permissions...
More information about the pve-devel
mailing list