]> git.proxmox.com Git - pve-client.git/blobdiff - PVE/APIClient/Commands/lxc.pm
use SectionConfig for PVE::APIClient::Config
[pve-client.git] / PVE / APIClient / Commands / lxc.pm
index 8a5cfb4813be0e966cba27c99e8a7e75ec70d33e..250d5f3b1a675589a308a42383aeefa02a4cf20a 100644 (file)
@@ -8,6 +8,7 @@ use IO::Select;
 use IO::Socket::SSL;
 use MIME::Base64;
 use Digest::SHA;
+use HTTP::Response;
 
 use PVE::Tools;
 use PVE::JSONSchema qw(get_standard_option);
@@ -146,7 +147,8 @@ __PACKAGE__->register_method ({
     code => sub {
        my ($param) = @_;
 
-       my $conn = PVE::APIClient::Config::get_remote_connection($param->{remote});
+       my $config = PVE::APIClient::Config->load();
+       my $conn = PVE::APIClient::Config->remote_conn($config, $param->{remote});
 
        # Get the real node from the resources endpoint
        my $resource_list = $conn->get("api2/json/cluster/resources", { type => 'vm'});