Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Import storage devices as network devices #2430

Merged
merged 1 commit into from Jan 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions inc/communicationnetworkdiscovery.class.php
Expand Up @@ -211,6 +211,7 @@ function sendCriteria($arrayinventory) {

case '2':
case 'NETWORKING':
case 'STORAGE':
$input['itemtype'] = "NetworkEquipment";
break;

Expand Down Expand Up @@ -478,6 +479,7 @@ function importDevice($item) {

case '2':
case 'NETWORKING':
case 'STORAGE':
$input['item_type'] = 'NetworkEquipment';
break;

Expand Down
4 changes: 2 additions & 2 deletions inc/communicationnetworkinventory.class.php
Expand Up @@ -177,15 +177,15 @@ function importContent($arrayinventory) {
$_SESSION['plugin_fusioninventory_xmlnum'] = $xml_num;
$a_inventory = array();
if (isset($dchild['INFO'])) {
if ($dchild['INFO']['TYPE'] == "NETWORKING") {
if ($dchild['INFO']['TYPE'] == "NETWORKING" || $dchild['INFO']['TYPE'] == "STORAGE") {
$a_inventory = PluginFusioninventoryFormatconvert::networkequipmentInventoryTransformation($dchild);
} else if ($dchild['INFO']['TYPE'] == "PRINTER") {
$a_inventory = PluginFusioninventoryFormatconvert::printerInventoryTransformation($dchild);
}
}
if (isset($dchild['ERROR'])) {
$itemtype = "";
if ($dchild['ERROR']['TYPE'] == "NETWORKING") {
if ($dchild['ERROR']['TYPE'] == "NETWORKING" || $dchild['ERROR']['TYPE'] == "STORAGE") {
$itemtype = "NetworkEquipment";
} else if ($dchild['ERROR']['TYPE'] == "PRINTER") {
$itemtype = "Printer";
Expand Down