[pve-devel] [PATCH manager 3/7] pveceph: add pool namespace subcommands

Aaron Lauterer a.lauterer at proxmox.com
Fri Dec 6 14:55:10 CET 2024


Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
 PVE/CLI/pveceph.pm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/PVE/CLI/pveceph.pm b/PVE/CLI/pveceph.pm
index 488aea04..3a2bb890 100755
--- a/PVE/CLI/pveceph.pm
+++ b/PVE/CLI/pveceph.pm
@@ -482,6 +482,15 @@ our $cmddef = {
 	    my ($data, $schema, $options) = @_;
 	    PVE::CLIFormatter::print_api_result($data, $schema, undef, $options);
 	}, $PVE::RESTHandler::standard_output_options],
+	namespace => {
+	    ls => [ 'PVE::API2::Ceph::Pool', 'listnamespaces', ['name'], { node => $nodename}, sub {
+		my ($data, $schema, $options) = @_;
+		PVE::CLIFormatter::print_api_result($data, $schema, undef, $options);
+	    }, $PVE::RESTHandler::standard_output_options],
+	    list => { alias => 'namespace ls' },
+	    create => [ 'PVE::API2::Ceph::Pool', 'createnamespace', ['name', 'namespace', 'add-storage'], { node => $nodename}],
+	    destroy => [ 'PVE::API2::Ceph::Pool', 'destroynamespace', ['name', 'namespace'], { node => $nodename }],
+	},
     },
     lspools => { alias => 'pool ls' },
     createpool => { alias => 'pool create' },
-- 
2.39.5





More information about the pve-devel mailing list