]> git.proxmox.com Git - pve-ha-manager.git/commitdiff
use require to include resources from simulation environment
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 26 Jan 2016 11:47:28 +0000 (12:47 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 26 Jan 2016 11:47:28 +0000 (12:47 +0100)
Because the may not be installed on a normal system.

src/PVE/CLI/ha_manager.pm
src/PVE/HA/Config.pm

index 35b8d0e9c7bbebec75e08472401af30e146001e7..4017fa5d339f77b5b457ef4f82d1e7a047323f09 100644 (file)
@@ -12,6 +12,7 @@ use PVE::CLIHandler;
 use PVE::Cluster;
 
 use PVE::HA::Tools;
+use PVE::HA::Config;
 use PVE::API2::HA::Resources;
 use PVE::API2::HA::Groups;
 use PVE::API2::HA::Status;
index 28fcf03a6732f9449903c9bf9cd32d677a9b1823..4f3a1e0ed49d87efb5b239e6897c8b59d7bc1182 100644 (file)
@@ -7,6 +7,7 @@ use JSON;
 use PVE::HA::Tools;
 use PVE::HA::Groups;
 use PVE::Cluster qw(cfs_register_file cfs_read_file cfs_write_file cfs_lock_file);
+use PVE::HA::Resources;
 
 PVE::HA::Groups->register();
 
@@ -28,8 +29,8 @@ sub import {
 
     if ($envtype eq 'testenv') {
 
-       use PVE::HA::Sim::Resources::VirtVM;
-       use PVE::HA::Sim::Resources::VirtCT;
+       require PVE::HA::Sim::Resources::VirtVM;
+       require PVE::HA::Sim::Resources::VirtCT;
 
        PVE::HA::Sim::Resources::VirtVM->register();
        PVE::HA::Sim::Resources::VirtCT->register();