DB2 discovery
This commit is contained in:
parent
cbca70da73
commit
057fcea724
|
@ -629,6 +629,16 @@ class DiscoveryTaskList extends HTML
|
||||||
$data[6] .= __('Discovery.App.Oracle');
|
$data[6] .= __('Discovery.App.Oracle');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DISCOVERY_APP_DB2:
|
||||||
|
// Discovery Applications DB2.
|
||||||
|
$data[6] = html_print_image(
|
||||||
|
'images/network.png',
|
||||||
|
true,
|
||||||
|
['title' => __('Discovery Applications DB2')]
|
||||||
|
).' ';
|
||||||
|
$data[6] .= __('Discovery.App.DB2');
|
||||||
|
break;
|
||||||
|
|
||||||
case DISCOVERY_DEPLOY_AGENTS:
|
case DISCOVERY_DEPLOY_AGENTS:
|
||||||
// Internal deployment task.
|
// Internal deployment task.
|
||||||
$no_operations = true;
|
$no_operations = true;
|
||||||
|
@ -722,6 +732,8 @@ class DiscoveryTaskList extends HTML
|
||||||
if ($task['disabled'] != 2 && $task['utimestamp'] > 0
|
if ($task['disabled'] != 2 && $task['utimestamp'] > 0
|
||||||
&& $task['type'] != DISCOVERY_APP_MYSQL
|
&& $task['type'] != DISCOVERY_APP_MYSQL
|
||||||
&& $task['type'] != DISCOVERY_APP_ORACLE
|
&& $task['type'] != DISCOVERY_APP_ORACLE
|
||||||
|
&& $task['type'] != DISCOVERY_APP_DB2
|
||||||
|
&& $task['type'] != DISCOVERY_APP_SAP
|
||||||
&& $task['type'] != DISCOVERY_CLOUD_AWS_RDS
|
&& $task['type'] != DISCOVERY_CLOUD_AWS_RDS
|
||||||
) {
|
) {
|
||||||
if (check_acl($config['id_user'], 0, 'MR')) {
|
if (check_acl($config['id_user'], 0, 'MR')) {
|
||||||
|
@ -879,6 +891,9 @@ class DiscoveryTaskList extends HTML
|
||||||
case DISCOVERY_APP_ORACLE:
|
case DISCOVERY_APP_ORACLE:
|
||||||
return 'wiz=app&mode=oracle&page=0';
|
return 'wiz=app&mode=oracle&page=0';
|
||||||
|
|
||||||
|
case DISCOVERY_APP_DB2:
|
||||||
|
return 'wiz=app&mode=DB2&page=0';
|
||||||
|
|
||||||
case DISCOVERY_CLOUD_AWS:
|
case DISCOVERY_CLOUD_AWS:
|
||||||
case DISCOVERY_CLOUD_AWS_EC2:
|
case DISCOVERY_CLOUD_AWS_EC2:
|
||||||
return 'wiz=cloud&mode=amazonws&ki='.$task['auth_strings'].'&page=1';
|
return 'wiz=cloud&mode=amazonws&ki='.$task['auth_strings'].'&page=1';
|
||||||
|
|
|
@ -601,6 +601,7 @@ define('DISCOVERY_CLOUD_AWS_RDS', 7);
|
||||||
define('DISCOVERY_CLOUD_AZURE_COMPUTE', 8);
|
define('DISCOVERY_CLOUD_AZURE_COMPUTE', 8);
|
||||||
define('DISCOVERY_DEPLOY_AGENTS', 9);
|
define('DISCOVERY_DEPLOY_AGENTS', 9);
|
||||||
define('DISCOVERY_APP_SAP', 10);
|
define('DISCOVERY_APP_SAP', 10);
|
||||||
|
define('DISCOVERY_APP_DB2', 11);
|
||||||
|
|
||||||
|
|
||||||
// Force task build tmp results.
|
// Force task build tmp results.
|
||||||
|
|
|
@ -40,6 +40,7 @@ use constant {
|
||||||
DISCOVERY_CLOUD_AZURE_COMPUTE => 8,
|
DISCOVERY_CLOUD_AZURE_COMPUTE => 8,
|
||||||
DISCOVERY_DEPLOY_AGENTS => 9,
|
DISCOVERY_DEPLOY_AGENTS => 9,
|
||||||
DISCOVERY_APP_SAP => 10,
|
DISCOVERY_APP_SAP => 10,
|
||||||
|
DISCOVERY_APP_DB2 => 11,
|
||||||
DISCOVERY_REVIEW => 0,
|
DISCOVERY_REVIEW => 0,
|
||||||
DISCOVERY_STANDARD => 1,
|
DISCOVERY_STANDARD => 1,
|
||||||
DISCOVERY_RESULTS => 2,
|
DISCOVERY_RESULTS => 2,
|
||||||
|
@ -1661,6 +1662,9 @@ sub database_scan($$$) {
|
||||||
# Skip database scan in Oracle tasks
|
# Skip database scan in Oracle tasks
|
||||||
next if defined($self->{'type'}) && $self->{'type'} == DISCOVERY_APP_ORACLE;
|
next if defined($self->{'type'}) && $self->{'type'} == DISCOVERY_APP_ORACLE;
|
||||||
|
|
||||||
|
# Skip database scan in DB2 tasks
|
||||||
|
next if defined($self->{'type'}) && $self->{'type'} == DISCOVERY_APP_DB2;
|
||||||
|
|
||||||
my $__data = $obj->scan_databases();
|
my $__data = $obj->scan_databases();
|
||||||
|
|
||||||
if (ref($__data) eq "ARRAY") {
|
if (ref($__data) eq "ARRAY") {
|
||||||
|
@ -1705,6 +1709,8 @@ sub app_scan($) {
|
||||||
$type = 'MySQL';
|
$type = 'MySQL';
|
||||||
} elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE) {
|
} elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE) {
|
||||||
$type = 'Oracle';
|
$type = 'Oracle';
|
||||||
|
} elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_DB2) {
|
||||||
|
$type = 'DB2';
|
||||||
} elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) {
|
} elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) {
|
||||||
$type = 'SAP';
|
$type = 'SAP';
|
||||||
} else {
|
} else {
|
||||||
|
@ -1787,7 +1793,9 @@ sub app_scan($) {
|
||||||
|
|
||||||
# Scan connected obj.
|
# Scan connected obj.
|
||||||
if ( $self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL
|
if ( $self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL
|
||||||
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE) {
|
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE
|
||||||
|
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_DB2
|
||||||
|
) {
|
||||||
|
|
||||||
# Database.
|
# Database.
|
||||||
$results = $self->database_scan($type, $obj, $global_percent, \@targets);
|
$results = $self->database_scan($type, $obj, $global_percent, \@targets);
|
||||||
|
@ -1894,6 +1902,7 @@ sub scan($) {
|
||||||
if (defined($self->{'task_data'})) {
|
if (defined($self->{'task_data'})) {
|
||||||
if ( $self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL
|
if ( $self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL
|
||||||
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE
|
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE
|
||||||
|
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_DB2
|
||||||
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) {
|
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) {
|
||||||
# Application scan.
|
# Application scan.
|
||||||
$self->call('message', "Scanning application ...", 6);
|
$self->call('message', "Scanning application ...", 6);
|
||||||
|
|
Loading…
Reference in New Issue