[pve-devel] [PATCH manager 1/2] add api path map for node HA endpoints

Daniel Kral d.kral at proxmox.com
Tue Aug 26 11:38:35 CEST 2025


On Mon Aug 25, 2025 at 6:11 AM CEST, Thomas Skinner wrote:
> Signed-off-by: Thomas Skinner <thomas at atskinner.net>
> ---
>  PVE/API2/HAConfig.pm | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/PVE/API2/HAConfig.pm b/PVE/API2/HAConfig.pm
> index d29211fb..489cbf72 100644
> --- a/PVE/API2/HAConfig.pm
> +++ b/PVE/API2/HAConfig.pm
> @@ -12,6 +12,7 @@ use PVE::JSONSchema qw(get_standard_option);
>  use PVE::Exception qw(raise_param_exc);
>  use PVE::API2::HA::Resources;
>  use PVE::API2::HA::Groups;
> +use PVE::API2::HA::Nodes;
>  use PVE::API2::HA::Rules;
>  use PVE::API2::HA::Status;
>  
> @@ -37,6 +38,11 @@ __PACKAGE__->register_method({
>      path => 'status',
>  });
>  
> +__PACKAGE__->register_method({
> +    subclass => "PVE::API2::HA::Nodes",
> +    path => 'nodes',
> +});
> +

As stated in the ha-manager #2 patch, I'm inclined to register this at
/nodes/{node}/ha/... instead of /cluster/ha/nodes/{nodes}/..., because
then we wouldn't need to duplicate the nodelist in the HA endpoints in
the latter, because it is already provided at GET /nodes. We could still
provide information on GET /nodes/{node}/ha for each node, e.g. the LRM
state, mode, etc.

>  __PACKAGE__->register_method({
>      name => 'index',
>      path => '',
> @@ -63,7 +69,11 @@ __PACKAGE__->register_method({
>          my ($param) = @_;
>  
>          my $res = [
> -            { id => 'status' }, { id => 'resources' }, { id => 'groups' }, { id => 'rules' },
> +            { id => 'status' },
> +            { id => 'resources' },
> +            { id => 'groups' },
> +            { id => 'rules' },
> +            { id => 'nodes' },
>          ];
>  
>          return $res;




More information about the pve-devel mailing list