[pve-devel] [PATCH manager 10/12] api: ceph: remove moved 'flags' calls

Fabian Ebner f.ebner at proxmox.com
Fri Jun 4 15:49:44 CEST 2021


living below /cluster/ceph now. Frontend was adapted as part of the move in
commit 90bb3598b5e257d06d4a49b44a4f5de02eb587a8

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/API2/Ceph.pm | 109 -----------------------------------------------
 1 file changed, 109 deletions(-)

diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
index d6eb5563..3bbcfe4c 100644
--- a/PVE/API2/Ceph.pm
+++ b/PVE/API2/Ceph.pm
@@ -100,7 +100,6 @@ __PACKAGE__->register_method ({
 	    { name => 'crush' },
 	    { name => 'config' },
 	    { name => 'log' },
-	    { name => 'flags' }, # FIXME: remove with 7.0
 	    { name => 'rules' },
 	];
 
@@ -493,114 +492,6 @@ __PACKAGE__->register_method ({
     }});
 
 
-my $possible_flags = PVE::Ceph::Tools::get_possible_osd_flags();
-my $possible_flags_list = [ sort keys %$possible_flags ];
-
-# FIXME: Remove with PVE 7.0
-__PACKAGE__->register_method ({
-    name => 'get_flags',
-    path => 'flags',
-    method => 'GET',
-    description => "get all set ceph flags",
-    proxyto => 'node',
-    protected => 1,
-    permissions => {
-	check => ['perm', '/', [ 'Sys.Audit' ]],
-    },
-    parameters => {
-	additionalProperties => 0,
-	properties => {
-	    node => get_standard_option('pve-node'),
-	},
-    },
-    returns => { type => 'string' },
-    code => sub {
-	my ($param) = @_;
-
-	PVE::Ceph::Tools::check_ceph_configured();
-
-	my $rados = PVE::RADOS->new();
-
-	my $stat = $rados->mon_command({ prefix => 'osd dump' });
-
-	return $stat->{flags} // '';
-    }});
-
-# FIXME: Remove with PVE 7.0
-__PACKAGE__->register_method ({
-    name => 'set_flag',
-    path => 'flags/{flag}',
-    method => 'POST',
-    description => "Set a specific ceph flag",
-    proxyto => 'node',
-    protected => 1,
-    permissions => {
-	check => ['perm', '/', [ 'Sys.Modify' ]],
-    },
-    parameters => {
-	additionalProperties => 0,
-	properties => {
-	    node => get_standard_option('pve-node'),
-	    flag => {
-		description => 'The ceph flag to set',
-		type => 'string',
-		enum => $possible_flags_list,
-	    },
-	},
-    },
-    returns => { type => 'null' },
-    code => sub {
-	my ($param) = @_;
-
-	PVE::Ceph::Tools::check_ceph_configured();
-
-	my $rados = PVE::RADOS->new();
-
-	$rados->mon_command({
-	    prefix => "osd set",
-	    key => $param->{flag},
-	});
-
-	return undef;
-    }});
-
-__PACKAGE__->register_method ({
-    name => 'unset_flag',
-    path => 'flags/{flag}',
-    method => 'DELETE',
-    description => "Unset a ceph flag",
-    proxyto => 'node',
-    protected => 1,
-    permissions => {
-	check => ['perm', '/', [ 'Sys.Modify' ]],
-    },
-    parameters => {
-	additionalProperties => 0,
-	properties => {
-	    node => get_standard_option('pve-node'),
-	    flag => {
-		description => 'The ceph flag to unset',
-		type => 'string',
-		enum => $possible_flags_list,
-	    },
-	},
-    },
-    returns => { type => 'null' },
-    code => sub {
-	my ($param) = @_;
-
-	PVE::Ceph::Tools::check_ceph_configured();
-
-	my $rados = PVE::RADOS->new();
-
-	$rados->mon_command({
-	    prefix => "osd unset",
-	    key => $param->{flag},
-	});
-
-	return undef;
-    }});
-
 __PACKAGE__->register_method ({
     name => 'crush',
     path => 'crush',
-- 
2.30.2






More information about the pve-devel mailing list