[pve-devel] [PATCH manager 2/2] api: ceph: remove deprecrated config and configdb endpoints

Aaron Lauterer a.lauterer at proxmox.com
Thu Jun 15 09:39:58 CEST 2023


Both are superseeded by ceph/cfg/raw and ceph/cfg/db

Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
 PVE/API2/Ceph.pm | 73 ------------------------------------------------
 1 file changed, 73 deletions(-)

diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
index 4893c957..1b765b75 100644
--- a/PVE/API2/Ceph.pm
+++ b/PVE/API2/Ceph.pm
@@ -116,79 +116,6 @@ __PACKAGE__->register_method ({
 	return $result;
     }});
 
-
-# TODO: deprecrated, remove with PVE 8
-__PACKAGE__->register_method ({
-    name => 'config',
-    path => 'config',
-    method => 'GET',
-    proxyto => 'node',
-    permissions => {
-	check => ['perm', '/', [ 'Sys.Audit', 'Datastore.Audit' ], any => 1],
-    },
-    description => "Get the Ceph configuration file. Deprecated, please use `/nodes/{node}/ceph/cfg/raw.",
-    parameters => {
-	additionalProperties => 0,
-	properties => {
-	    node => get_standard_option('pve-node'),
-	},
-    },
-    returns => { type => 'string' },
-    code => sub {
-	my ($param) = @_;
-
-	PVE::Ceph::Tools::check_ceph_inited();
-
-	my $path = PVE::Ceph::Tools::get_config('pve_ceph_cfgpath');
-	return file_get_contents($path);
-
-    }});
-
-# TODO: deprecrated, remove with PVE 8
-__PACKAGE__->register_method ({
-    name => 'configdb',
-    path => 'configdb',
-    method => 'GET',
-    proxyto => 'node',
-    protected => 1,
-    permissions => {
-	check => ['perm', '/', [ 'Sys.Audit', 'Datastore.Audit' ], any => 1],
-    },
-    description => "Get the Ceph configuration database. Deprecated, please use `/nodes/{node}/ceph/cfg/db.",
-    parameters => {
-	additionalProperties => 0,
-	properties => {
-	    node => get_standard_option('pve-node'),
-	},
-    },
-    returns => {
-	type => 'array',
-	items => {
-	    type => 'object',
-	    properties => {
-		section => { type => "string", },
-		name => { type => "string", },
-		value => { type => "string", },
-		level => { type => "string", },
-		'can_update_at_runtime' => { type => "boolean", },
-		mask => { type => "string" },
-	    },
-	},
-    },
-    code => sub {
-	my ($param) = @_;
-
-	PVE::Ceph::Tools::check_ceph_inited();
-
-	my $rados = PVE::RADOS->new();
-	my $res = $rados->mon_command( { prefix => 'config dump', format => 'json' });
-	foreach my $entry (@$res) {
-	    $entry->{can_update_at_runtime} = $entry->{can_update_at_runtime}? 1 : 0; # JSON::true/false -> 1/0
-	}
-
-	return $res;
-    }});
-
 __PACKAGE__->register_method ({
     name => 'init',
     path => 'init',
-- 
2.39.2






More information about the pve-devel mailing list