implemented per-task sap license

This commit is contained in:
alejandro.campos@artica.es 2023-02-13 13:39:20 +01:00
parent d89e29244b
commit d2856e09bd
2 changed files with 8 additions and 8 deletions

View File

@ -463,10 +463,6 @@ function config_update_config()
if (config_update_value('ipam_ocuppied_warning_treshold', get_parameter('ipam_ocuppied_warning_treshold'), true) === false) { if (config_update_value('ipam_ocuppied_warning_treshold', get_parameter('ipam_ocuppied_warning_treshold'), true) === false) {
$error_update[] = __('Ipam Ocuppied Manager Warning'); $error_update[] = __('Ipam Ocuppied Manager Warning');
} }
if (config_update_value('sap_license', get_parameter('sap_license'), true) === false) {
$error_update[] = __('SAP/R3 Plugin Licence');
}
} }
break; break;

View File

@ -221,10 +221,14 @@ sub data_consumer ($$) {
if ($task->{'type'} == DISCOVERY_APP_SAP) { if ($task->{'type'} == DISCOVERY_APP_SAP) {
# SAP TASK, retrieve license. # SAP TASK, retrieve license.
$task->{'sap_license'} = pandora_get_config_value( if (defined($task->{'field4'}) && $task->{'field4'} ne "") {
$dbh, $task->{'sap_license'} = $task->{'field4'};
'sap_license' } else {
); $task->{'sap_license'} = pandora_get_config_value(
$dbh,
'sap_license'
);
}
# Retrieve credentials for task (optional). # Retrieve credentials for task (optional).
if (defined($task->{'auth_strings'}) if (defined($task->{'auth_strings'})