return PVE::HA::Resources->parse_config($filename, $raw);
}
-sub resources_config_exists {
-
- return (-f "/etc/pve/$ha_resources_config") ? 1 : 0;
-}
-
sub read_resources_config {
return cfs_read_file($ha_resources_config);
sub has_services {
my ($haenv, $node) = @_;
- return undef if !PVE::HA::Config::resources_config_exists();
-
my $conf = $haenv->read_service_config();
# if no node defined any service count is fine
- return scalar(%{$conf}) if !$node;
+ return scalar(%{$conf}) if !defined($node);
foreach my $d (values %$conf) {
return 1 if $d->{node} eq $node;