Add support for the new metaconsole licensing mode.

This commit is contained in:
Ramon Novoa 2017-03-30 09:47:00 +02:00
parent da17532889
commit 7f1030abd6
2 changed files with 9 additions and 1 deletions

View File

@ -170,6 +170,11 @@ sub pandora_get_sharedconfig ($$) {
#Public url
$pa_config->{'public_url'} = pandora_get_tconfig_token ($dbh, 'public_url', 'http://localhost/pandora_console');
# Node with a metaconsole license.
# NOTE: This must be read when checking license limits!
#$pa_config->{"node_metaconsole"} = pandora_get_tconfig_token ($dbh, 'node_metaconsole', 0);
if ($pa_config->{'include_agents'} eq '') {
$pa_config->{'include_agents'} = 0;
}
@ -400,6 +405,7 @@ sub pandora_load_config {
$pa_config->{"stats_interval"} = 300;
$pa_config->{"agentaccess"} = 1;
$pa_config->{"event_storm_protection"} = 0;
$pa_config->{"node_metaconsole"} = 0; # > 7.0NG
# -------------------------------------------------------------------------
#SNMP Forwarding tokens

View File

@ -1459,7 +1459,9 @@ sub valid_regex ($) {
sub is_metaconsole ($) {
my ($pa_config) = @_;
if (defined($pa_config->{"license_type"}) && $pa_config->{"license_type"} == METACONSOLE_LICENSE) {
if (defined($pa_config->{"license_type"}) &&
$pa_config->{"license_type"} == METACONSOLE_LICENSE &&
$pa_config->{"node_metaconsole"} == 0) {
return 1;
}