fusioninventory / fusioninventory-for-glpi

FusionInventory plugin for GLPI
http://www.FusionInventory.org/
GNU Affero General Public License v3.0
360 stars 148 forks source link

propVirt ifType required for Juniper #1267

Open ddurieux opened 8 years ago

ddurieux commented 8 years ago

Author Name: Gonéri Le Bouder (Gonéri Le Bouder) Original Redmine Issue: 2305, http://forge.fusioninventory.org/issues/2305 Original Date: 2013-10-17


propVirt(53) ifType is used by Juniper to return the port connection. According to David, the propVirt(53) is also used by CISCO to store VLan informations.

Suggestted patch:

diff --git a/inc/networkporttype.class.php b/inc/networkporttype.class.php
index 6649a13..86cd189 100644
--- a/inc/networkporttype.class.php
+++ b/inc/networkporttype.class.php
@@ -308,11 +308,13 @@ class PluginFusioninventoryNetworkporttype extends CommonDBTM {

                   case '6':
                   case '7':
+                  case '53': // Juniper propVirtual
+                  case '56':
+                  case '62':
                   case '71':
                   case '117':
-                  case '62':
+                  case '161':
                   case '169':
-                  case '56':
                      $import = 1;
                      break;
ddurieux commented 8 years ago

Original Redmine Comment Author Name: David Durieux (@ddurieux) Original Date: 2013-10-17T15:08:43Z


Add unit tests to keep compatibility with cisco (porpVirt is used for VLAN for example)

ddurieux commented 8 years ago

Original Redmine Comment Author Name: David Durieux (@ddurieux) Original Date: 2014-06-12T01:06:12Z


We can add specific code for Juniper to add these type ports