]> git.proxmox.com Git - pve-manager.git/blobdiff - PVE/API2Tools.pm
whitespace cleanup
[pve-manager.git] / PVE / API2Tools.pm
index 4d730901b31d5841ff32115b0ca21a77f585a91e..5ab202b499e413f8b994d01a8a1c0bbb36dddaa1 100644 (file)
@@ -16,7 +16,7 @@ use PVE::SafeSyslog;
 my $hwaddress;
 
 sub get_hwaddress {
-    
+
     return $hwaddress if defined ($hwaddress);
 
     my $fn = '/etc/ssh/ssh_host_rsa_key.pub';
@@ -69,7 +69,7 @@ sub extract_vm_stats {
 
     my $entry = {
        id => "$data->{type}/$vmid",
-       vmid => $vmid + 0, 
+       vmid => $vmid + 0,
        node => $data->{node},
        type => $data->{type},
        status => 'unknown',
@@ -92,7 +92,7 @@ sub extract_vm_stats {
        $entry->{netout} = ($d->[10] || 0) + 0;
        $entry->{diskread} = ($d->[11] || 0) + 0;
        $entry->{diskwrite} = ($d->[12] || 0) + 0;
-    
+
     } elsif ($d = $rrd->{"pve2.3-vm/$vmid"}) {
 
        $entry->{uptime} = ($d->[0] || 0) + 0;
@@ -120,12 +120,12 @@ sub extract_storage_stats {
 
     my $entry = {
        id => "storage/$node/$storeid",
-       storage => $storeid, 
-       node => $node, 
-       type => 'storage', 
+       storage => $storeid,
+       node => $node,
+       type => 'storage',
        status => 'unknown',
        shared => $scfg->{shared} || 0,
-    }; 
+    };
 
     if (my $d = $rrd->{"pve2-storage/$node/$storeid"}) {
        $entry->{maxdisk} = ($d->[1] || 0) + 0;
@@ -164,14 +164,14 @@ sub run_spiceterm {
     my $nodename = PVE::INotify::nodename();
     my $family = PVE::Tools::get_host_address_family($nodename);
     my $port = PVE::Tools::next_spice_port($family);
-    
-    my ($ticket, undef, $remote_viewer_config) = 
+
+    my ($ticket, undef, $remote_viewer_config) =
        PVE::AccessControl::remote_viewer_config($authuser, $vmid, $node, $proxy, $title, $port);
 
-    my $timeout = 40; 
+    my $timeout = 40;
 
     my $cmd = ['/usr/bin/spiceterm', '--port', $port, '--addr', 'localhost',
-              '--timeout', $timeout, '--authpath', $authpath, 
+              '--timeout', $timeout, '--authpath', $authpath,
               '--permissions', $permissions];
 
     my $dcconf = PVE::Cluster::cfs_read_file('datacenter.cfg');