From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id D4BCF1FF16B for ; Tue, 26 Aug 2025 11:39:02 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 267DD2DC34; Tue, 26 Aug 2025 11:39:08 +0200 (CEST) Mime-Version: 1.0 Date: Tue, 26 Aug 2025 11:38:35 +0200 Message-Id: From: "Daniel Kral" To: "Proxmox VE development discussion" X-Mailer: aerc 0.20.0 References: <20250825041128.132814-1-thomas@atskinner.net> <20250825041128.132814-3-thomas@atskinner.net> In-Reply-To: <20250825041128.132814-3-thomas@atskinner.net> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1756201111241 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.137 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH manager 1/2] add api path map for node HA endpoints X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Cc: pve-devel , Thomas Skinner Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On Mon Aug 25, 2025 at 6:11 AM CEST, Thomas Skinner wrote: > Signed-off-by: Thomas Skinner > --- > 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; _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel