[pve-devel] [PATCH v2 manager 3/3] pveceph: adapt to new Pool module
Aaron Lauterer
a.lauterer at proxmox.com
Mon Mar 20 11:32:32 CET 2023
The API::Ceph::Pools module is deprecated. Use the new API::Ceph::Pool
(singular) module.
Signed-off-by: Aaron Lauterer <a.lauterer at 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
More information about the pve-devel
mailing list