public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 manager 3/3] pveceph: adapt to new Pool module
Date: Mon, 20 Mar 2023 11:32:32 +0100	[thread overview]
Message-ID: <20230320103232.668916-3-a.lauterer@proxmox.com> (raw)
In-Reply-To: <20230320103232.668916-1-a.lauterer@proxmox.com>

The API::Ceph::Pools module is deprecated. Use the new API::Ceph::Pool
(singular) module.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---

this patch has been added since v1 to also adapt the pveceph CLI tool to
the new module. Since all the methods kept their name and only the API
paths changed, there is not much to change except the module name

 PVE/CLI/pveceph.pm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/PVE/CLI/pveceph.pm b/PVE/CLI/pveceph.pm
index afcc67e0..52c91629 100755
--- a/PVE/CLI/pveceph.pm
+++ b/PVE/CLI/pveceph.pm
@@ -355,7 +355,7 @@ __PACKAGE__->register_method ({
 our $cmddef = {
     init => [ 'PVE::API2::Ceph', 'init', [], { node => $nodename } ],
     pool => {
-	ls => [ 'PVE::API2::Ceph::Pools', 'lspools', [], { node => $nodename }, sub {
+	ls => [ 'PVE::API2::Ceph::Pool', 'lspools', [], { node => $nodename }, sub {
 	    my ($data, $schema, $options) = @_;
 	    PVE::CLIFormatter::print_api_result($data, $schema,
 		[
@@ -374,10 +374,10 @@ our $cmddef = {
 		],
 		$options);
 	}, $PVE::RESTHandler::standard_output_options],
-	create => [ 'PVE::API2::Ceph::Pools', 'createpool', ['name'], { node => $nodename }],
-	destroy => [ 'PVE::API2::Ceph::Pools', 'destroypool', ['name'], { node => $nodename } ],
-	set => [ 'PVE::API2::Ceph::Pools', 'setpool', ['name'], { node => $nodename } ],
-	get => [ 'PVE::API2::Ceph::Pools', 'getpool', ['name'], { node => $nodename }, sub {
+	create => [ 'PVE::API2::Ceph::Pool', 'createpool', ['name'], { node => $nodename }],
+	destroy => [ 'PVE::API2::Ceph::Pool', 'destroypool', ['name'], { node => $nodename } ],
+	set => [ 'PVE::API2::Ceph::Pool', 'setpool', ['name'], { node => $nodename } ],
+	get => [ 'PVE::API2::Ceph::Pool', 'getpool', ['name'], { node => $nodename }, sub {
 	    my ($data, $schema, $options) = @_;
 	    PVE::CLIFormatter::print_api_result($data, $schema, undef, $options);
 	}, $PVE::RESTHandler::standard_output_options],
-- 
2.30.2





  parent reply	other threads:[~2023-03-20 10:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 10:32 [pve-devel] [PATCH v2 manager 1/3] api: ceph: deprecate pools in favor of pool Aaron Lauterer
2023-03-20 10:32 ` [pve-devel] [PATCH v2 manager 2/3] ui: ceph: adapt urls to new ceph/pool endpoint Aaron Lauterer
2023-03-20 10:32 ` Aaron Lauterer [this message]
2023-03-20 13:47 ` [pve-devel] [PATCH v2 manager 1/3] api: ceph: deprecate pools in favor of pool Dominik Csapak
2023-03-20 14:53   ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230320103232.668916-3-a.lauterer@proxmox.com \
    --to=a.lauterer@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal