[pve-devel] [PATCH manager 1/3] api/CephOSD: cleanup module usage

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Nov 20 09:17:49 CET 2018


most of this was imported by just copying without veryfing if all is
actually required. Some lost it's purpose as we re-used more from our
existing module code base (e.g., pve-common) but wasn't actually
removed.

As this file includes two perl modules you need to take a bit caution
when looking at this, as some things are used in one module but not
the other - simple grep'ing at this may give false positives.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 PVE/API2/Ceph.pm | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
index 8584cb51..23cd9ca8 100644
--- a/PVE/API2/Ceph.pm
+++ b/PVE/API2/Ceph.pm
@@ -2,17 +2,11 @@ package PVE::API2::CephOSD;
 
 use strict;
 use warnings;
+
 use Cwd qw(abs_path);
-use Net::IP;
 
-use PVE::SafeSyslog;
-use PVE::Tools qw(extract_param run_command file_get_contents file_read_firstline dir_glob_regex dir_glob_foreach);
-use PVE::Exception qw(raise raise_param_exc);
-use PVE::INotify;
-use PVE::Cluster qw(cfs_lock_file cfs_read_file cfs_write_file);
-use PVE::AccessControl;
-use PVE::Storage;
-use PVE::API2::Storage::Config;
+use PVE::Tools qw(run_command);
+use PVE::Exception qw(raise_param_exc);
 use PVE::RESTHandler;
 use PVE::RPCEnvironment;
 use PVE::JSONSchema qw(get_standard_option);
@@ -22,8 +16,6 @@ use PVE::Diskmanage;
 
 use base qw(PVE::RESTHandler);
 
-use Data::Dumper; # fixme: remove
-
 my $get_osd_status = sub {
     my ($rados, $osdid) = @_;
 
-- 
2.19.1





More information about the pve-devel mailing list