--- /dev/null
+package PVE::HA::Config;
+
+use strict;
+use warnings;
+
+use PVE::HA::Groups;
+use PVE::HA::Resources;
+
+PVE::HA::Groups->register();
+
+PVE::HA::Groups->init();
+
+PVE::HA::Resources::PVEVM->register();
+PVE::HA::Resources::IPAddr->register();
+
+PVE::HA::Resources->init();
+
+sub parse_groups_config {
+ my ($filename, $raw) = @_;
+
+ return PVE::HA::Groups->parse_config($filename, $raw);
+}
+
+sub parse_resource_config {
+ my ($filename, $raw) = @_;
+
+ return PVE::HA::Resources->parse_config($filename, $raw);
+}
+
+1;
use Fcntl qw(:DEFAULT :flock);
use File::Copy;
use File::Path qw(make_path remove_tree);
-use PVE::HA::Groups;
-
-PVE::HA::Groups->register();
-PVE::HA::Groups->init();
+use PVE::HA::Config;
my $watchdog_timeout = 60;
my $raw = '';
$raw = PVE::Tools::file_get_contents($filename) if -f $filename;
- return PVE::HA::Groups->parse_config($filename, $raw);
+ return PVE::HA::Config::parse_groups_config($filename, $raw);
}
sub read_service_status {