[pve-devel] [PATCH v2 qemu-server 2/6] use PVE::SSHInfo

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon Nov 11 11:28:28 CET 2019


Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---

Notes:
    needs dependency on libpve-cluster-perl
    
    requires versioned dependency on libpve-cluster-perl

 PVE/API2/Qemu.pm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 02af933..d42ffb9 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -29,6 +29,7 @@ use PVE::API2::Firewall::VM;
 use PVE::API2::Qemu::Agent;
 use PVE::VZDump::Plugin;
 use PVE::DataCenterConfig;
+use PVE::SSHInfo;
 
 BEGIN {
     if (!$ENV{PVE_GENERATING_DOCS}) {
@@ -1562,9 +1563,9 @@ __PACKAGE__->register_method({
 
 	if ($node ne 'localhost' && $node ne PVE::INotify::nodename()) {
 	    (undef, $family) = PVE::Cluster::remote_node_ip($node);
-	    my $sshinfo = PVE::Cluster::get_ssh_info($node);
+	    my $sshinfo = PVE::SSHInfo::get_ssh_info($node);
 	    # NOTE: kvm VNC traffic is already TLS encrypted or is known unsecure
-	    $remcmd = PVE::Cluster::ssh_info_to_command($sshinfo, $use_serial ? '-t' : '-T');
+	    $remcmd = PVE::SSHInfo::ssh_info_to_command($sshinfo, $use_serial ? '-t' : '-T');
 	} else {
 	    $family = PVE::Tools::get_host_address_family($node);
 	}
@@ -1702,8 +1703,8 @@ __PACKAGE__->register_method({
 
 	if ($node ne 'localhost' && $node ne PVE::INotify::nodename()) {
 	    (undef, $family) = PVE::Cluster::remote_node_ip($node);
-	    my $sshinfo = PVE::Cluster::get_ssh_info($node);
-	    $remcmd = PVE::Cluster::ssh_info_to_command($sshinfo, '-t');
+	    my $sshinfo = PVE::SSHInfo::get_ssh_info($node);
+	    $remcmd = PVE::SSHInfo::ssh_info_to_command($sshinfo, '-t');
 	    push @$remcmd, '--';
 	} else {
 	    $family = PVE::Tools::get_host_address_family($node);
-- 
2.20.1





More information about the pve-devel mailing list