]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/CLIHandler.pm
cli: whitespace cleanup
[pve-common.git] / src / PVE / CLIHandler.pm
index e61fa6a1cdf02c601d1850021cc3e94e246ca099..73e8ee632fc9cd204d5db0a2532e1acfa3226d28 100644 (file)
@@ -2,7 +2,6 @@ package PVE::CLIHandler;
 
 use strict;
 use warnings;
-use Data::Dumper;
 
 use PVE::SafeSyslog;
 use PVE::Exception qw(raise raise_param_exc);
@@ -49,12 +48,12 @@ my $complete_command_names = sub {
 };
 
 __PACKAGE__->register_method ({
-    name => 'help', 
+    name => 'help',
     path => 'help',
     method => 'GET',
     description => "Get help about specified command.",
     parameters => {
-       additionalProperties => 0,
+       additionalProperties => 0,
        properties => {
            cmd => {
                description => "Command name",
@@ -70,7 +69,7 @@ __PACKAGE__->register_method ({
        },
     },
     returns => { type => 'null' },
-    
+
     code => sub {
        my ($param) = @_;
 
@@ -84,7 +83,7 @@ __PACKAGE__->register_method ({
        if (!$cmd) {
            if ($verbose) {
                print_usage_verbose();
-           } else {            
+           } else {
                print_usage_short(\*STDOUT);
            }
            return undef;
@@ -311,7 +310,7 @@ sub verify_api {
 
 my $get_exe_name = sub {
     my ($class) = @_;
-    
+
     my $name = $class;
     $name =~ s/^.*:://;
     $name =~ s/_/-/g;
@@ -338,29 +337,6 @@ complete -o default -C '$exename bashcomplete' $exename
 __EOD__
 }
 
-sub find_cli_class_source {
-    my ($name) = @_;
-
-    my $filename;
-
-    $name =~ s/-/_/g;
-
-    my $cpath = "PVE/CLI/${name}.pm";
-    my $spath = "PVE/Service/${name}.pm";
-    foreach my $p (@INC) {
-       foreach my $s (($cpath, $spath)) {
-           my $testfn = "$p/$s";
-           if (-f $testfn) {
-               $filename = $testfn;
-               last;
-           }
-       }
-       last if defined($filename);
-    }
-
-    return $filename;
-}
-
 sub generate_asciidoc_synopsys {
     my ($class) = @_;
     $class->generate_asciidoc_synopsis();