1<?php
2
3// Import from CVS
4require(dirname(__FILE__) . '/data/CsvFileIterator.php');
5
6$base_dir = realpath(dirname(__FILE__) . '/..');
7$config['install_dir'] = $base_dir;
8
9// Base observium includes
10include(dirname(__FILE__) . '/../includes/defaults.inc.php');
11//include(dirname(__FILE__) . '/../config.php'); // Do not include user editable config here
12include(dirname(__FILE__) . '/../includes/functions.inc.php');
13include(dirname(__FILE__) . '/../includes/definitions.inc.php');
14include(dirname(__FILE__) . '/data/test_definitions.inc.php'); // Fake definitions for testing
15
16// for generate provider data, uncomment this and run:
17// php tests/IncludesRewritesTest.php
18
19/*
20// Generate provider data
21foreach (array('iosrx', 'iosxe', 'ios', 'procurve', 'vrp') as $os)
22{
23  foreach (array('entPhysicalDescr', 'entPhysicalName', 'hwEntityBomEnDesc') as $file)
24  {
25    if (!is_file(dirname(__FILE__) . "/data/$os.$file.txt")) { continue; }
26    $s = fopen(dirname(__FILE__) . "/data/$os.$file.txt", 'r');
27    while ($line = fgets($s))
28    {
29      list(,$string) = explode(' = ', $line, 2);
30      $string = trim($string);
31      if (!isset($valid[$string]))
32      {
33        $rewrite = rewrite_entity_name($string);
34        $valid[$string] = $rewrite;
35      }
36    }
37    fclose($s);
38  }
39}
40$csv = fopen(dirname(__FILE__) . "/data/providerRewriteEntityName.csv", 'w');
41foreach ($valid as $string => $rewrite)
42{
43  fputcsv($csv, array($string, $rewrite));
44}
45fclose($csv);
46exit;
47*/
48
49class IncludesRewritesTest extends \PHPUnit\Framework\TestCase
50{
51  /**
52  * @dataProvider providerRewriteEntityNameCsv
53  * @group rename_entity
54  */
55  public function testRewriteEntityNameCsv($string, $result)
56  {
57    $this->assertSame($result, rewrite_entity_name($string));
58  }
59
60  public function providerRewriteEntityNameCsv()
61  {
62    return new CsvFileIterator(dirname(__FILE__) . '/data/providerRewriteEntityName.csv');
63  }
64
65  /**
66  * @dataProvider providerRewriteEntityName
67  * @group rename_entity
68  */
69  public function testRewriteEntityName($string, $result)
70  {
71    $this->assertSame($result, rewrite_entity_name($string));
72  }
73
74  public function providerRewriteEntityName()
75  {
76    return array(
77      array('GenuineIntel Intel Celeron M processor .50GHz, 1496 MHz', 'Intel Celeron M processor .50GHz, 1496 MHz'),
78      array('CPU Intel Celeron M (TM) (R)', 'Intel Celeron M'),
79    );
80  }
81
82  /**
83  * @dataProvider providerRewriteVendor
84  * @group vendor
85  */
86  public function testRewriteVendor($string, $result)
87  {
88    $this->assertSame($result, rewrite_vendor($string));
89  }
90
91  public function providerRewriteVendor()
92  {
93    return array(
94      // Simple rewrites
95      array('Brocade Communications Systems, Inc.',   'Brocade'),
96      array('Cisco Systems Inc',                      'Cisco'),
97      array('Cisco Systems Inc.',                     'Cisco'),
98      array('Cisco Systems, Inc.',                    'Cisco'),
99      array('Juniper Networks, Inc.',                 'Juniper'),
100      array('Juniper Networks',                       'Juniper'),
101      array('Dell Inc.',                              'Dell'),
102      array('Enterasys Networks, Inc.',               'Enterasys'),
103      array('FIBERXON INC.',                          'Fiberxon'),
104      array('Netgear Inc',                            'Netgear'),
105      array('Volex Inc.',                             'Volex'),
106      array('Broadcom Corp.',                         'Broadcom'),
107      array('FINISAR CORP.',                          'Finisar'),
108      array('Oracle Corporation',                     'Oracle'),
109      array('Methode Elec.',                          'Methode'),
110      array('Deell Computer Corporation',             'Deell'),
111      array('Liebert Corporation Liebert',            'Liebert'),
112      // Keep MultiCase as is
113      array('OneAccess',                              'OneAccess'),
114      array('3Y Power',                               '3Y Power'),
115      array('Alcatel-Lucent',                         'Alcatel-Lucent'),
116      array('CAS-systems',                            'CAS-systems'),
117      array('VMware',                                 'VMware'),
118      array('VMware, Inc.',                           'VMware'),
119      array('EfficientIP',                            'EfficientIP'),
120      // Small name also keep as is
121      array('NHR',                                    'NHR'),
122      array('OEM',                                    'OEM'),
123      array('JDSU',                                   'JDSU'),
124      array('TI',                                     'TI'),
125      array('HP',                                     'HP'),
126      // Search in definitions
127      array('Hewlett-Packard',                        'HP'),
128      array('Hewlett Packard',                        'HP'),
129      array('Hewlett-Packard Company',                'HP'),
130      array('HP Enterprise',                          'HPE'),
131      array('H3C Comware',                            'HPE'),
132      array('Hangzhou H3C Comware',                   'HPE'),
133      array('HP Comware',                             'HPE'),
134      array('Comware',                                'HPE'),
135      array('Huawei Technologies Co., Ltd.',          'Huawei'),
136      array('Huawei Technologies',                    'Huawei'),
137      array('Huawei-3Com',                            'H3C'),
138      array('3Com',                                   'H3C'),
139      array('HUAWEI-3COM CORP.',                      'H3C'),
140      array('Hangzhou H3C Tech. Co.',                 'H3C'),
141      array('EC',                                     'Edgecore'),
142      array('Edge-Core',                              'Edgecore'),
143      array('CISCO-OPNEXT,INC',                       'Cisco'),
144      array('Dell Computer Corporation',              'Dell'),
145      array('MRV COMM, INC.',                         'MRV'),
146      array('CASA-systems',                           'Casa Systems'),
147      array('COMET SYSTEM, s.r.o.',                   'Comet System'),
148      array('COMET SYSTEM, sro',                      'Comet System'),
149      // This must keep Systems in name
150      array('Open Systems',                           'Open Systems'),
151      array('Open Systems AG',                        'Open Systems'),
152      // Some intersects
153      array('Geist',                                  'Geist'),
154      array('GE',                                     'GE'),
155    );
156  }
157
158  /**
159   * @dataProvider providerTrimQuotes
160   * @group string
161   */
162  public function testTrimQuotes($string, $result)
163  {
164    $this->assertEquals($result, trim_quotes($string));
165  }
166
167  public function providerTrimQuotes()
168  {
169    return array(
170      array('\"sdfslfkm s\'fdsf" a;lm aamjn ',          '"sdfslfkm s\'fdsf" a;lm aamjn'),
171      array('sdfslfkm s\'fdsf" a;lm aamjn \"',          'sdfslfkm s\'fdsf" a;lm aamjn "'),
172      array('sdfslfkm s\'fdsf" a;lm aamjn ',            'sdfslfkm s\'fdsf" a;lm aamjn'),
173      array('\"sdfslfkm s\'fdsf" a;lm aamjn \"',        'sdfslfkm s\'fdsf" a;lm aamjn '),
174      array('"sdfslfkm s\'fdsf" a;lm aamjn "',          'sdfslfkm s\'fdsf" a;lm aamjn '),
175      array('"\"sdfslfkm s\'fdsf" a;lm aamjn \""',      'sdfslfkm s\'fdsf" a;lm aamjn '),
176      array('\'\"sdfslfkm s\'fdsf" a;lm aamjn \"\'',    'sdfslfkm s\'fdsf" a;lm aamjn '),
177      array('  \'\"sdfslfkm s\'fdsf" a;lm aamjn \"\' ', 'sdfslfkm s\'fdsf" a;lm aamjn '),
178      array('"""sdfslfkm s\'fdsf" a;lm aamjn """',      'sdfslfkm s\'fdsf" a;lm aamjn '),
179      array('"""sdfslfkm s\'fdsf" a;lm aamjn """"""""', 'sdfslfkm s\'fdsf" a;lm aamjn """""'),
180      array('"""""""sdfslfkm s\'fdsf" a;lm aamjn """',  '""""sdfslfkm s\'fdsf" a;lm aamjn '),
181      // escaped quotes
182      array('\"Mike Stupalov\" <mike@observium.org>',      '"Mike Stupalov" <mike@observium.org>'),
183      // utf-8
184      array('Avenue Léon, België ',                     'Avenue Léon, België'),
185      array('\"Avenue Léon, België \"',                 'Avenue Léon, België '),
186      array('"Винни пух и все-все-все "',               'Винни пух и все-все-все '),
187      // multilined
188      array('  \'\"\"sdfslfkm s\'fdsf"
189            a;lm aamjn \"\"\' ', 'sdfslfkm s\'fdsf"
190            a;lm aamjn '),
191    );
192  }
193
194  /**
195   * @dataProvider providerCountryFromCode
196   * @group countries
197   */
198  public function testCountryFromCode($string, $result)
199  {
200    $this->assertEquals($result, country_from_code($string));
201  }
202
203  public function providerCountryFromCode()
204  {
205    return array(
206      array('gb',                 'United Kingdom'),
207      array('gbr',                'United Kingdom'),
208      array('United Kingdom',     'United Kingdom'),
209      array('us',                 'United States'),
210      array('usa',                'United States'),
211      array('United States',      'United States'),
212      array('ru',                 'Russian Federation'),
213      array('rus',                'Russian Federation'),
214      array('Russian Federation', 'Russian Federation'),
215      array('russia',             'Russian Federation'),
216    );
217  }
218
219  /**
220   * @dataProvider providerRewriteDefinitionHardware
221   * @group hardware
222   */
223  public function testRewriteDefinitionHardware($os, $id, $result)
224  {
225    $device = array('os' => $os, 'sysObjectID' => $id);
226    $this->assertEquals($result, rewrite_definition_hardware($device));
227  }
228
229  public function providerRewriteDefinitionHardware()
230  {
231    return array(
232      array('calix', '.1.3.6.1.4.1.6321.1.2.2.5.3', 'E7-2'),
233      array('calix', '.1.3.6.1.4.1.6321.1.2.1',     'C7'),
234      array('calix', '.1.3.6.1.4.1.6321',           'C7'),
235      array('calix', '.1.3.6.1.4.1.6321.1.2.3',     'E5-100'),
236    );
237  }
238
239  /**
240   * @dataProvider providerArrayKeyReplace
241   * @group replace
242   */
243  public function testArrayKeyReplace($string, $array, $result)
244  {
245    $this->assertEquals($result, array_key_replace($array, $string));
246  }
247
248  public function providerArrayKeyReplace()
249  {
250    $rewrite_array = array(
251      'other' => 'Other',
252      'rfc877x25',
253      'ethernetCsmacd' => 'Ethernet',
254    );
255
256    return array(
257      // empty/not exist pattern
258      array('Some other', array(),                           'Some other'),
259      array('Some other', array('bleh' => 'REPLACE_STRING'), 'Some other'),
260
261      // incorrect
262      array('EthernetCsmacd',          $rewrite_array,        'EthernetCsmacd'),
263
264      // real tests
265      array('other',                   $rewrite_array,        'Other'),
266      array('rfc877x25',               $rewrite_array,        'rfc877x25'),
267      array('ethernetCsmacd',          $rewrite_array,        'Ethernet'),
268    );
269  }
270
271  /**
272   * @dataProvider providerArrayStrReplace
273   * @group replace
274   */
275  public function testArrayStrReplace($string, $array, $result)
276  {
277    $this->assertEquals($result, array_str_replace($array, $string));
278  }
279
280  public function providerArrayStrReplace()
281  {
282    $rewrite_array = array(
283      'ether' => 'Ether',
284      'gig'   => 'Gig',
285      'fast'  => 'Fast',
286      'ten'   => 'Ten',
287    );
288
289    return array(
290      // empty/not exist pattern
291      array('Some Text', array(),                           'Some Text'),
292      array('Some Text', array('bleh' => 'REPLACE_STRING'), 'Some Text'),
293
294      // real tests
295      array('Some gigabit ethernet', $rewrite_array,        'Some Gigabit Ethernet'),
296      array('Some gIgabit ETHERNET', $rewrite_array,        'Some Gigabit EtherNET'),
297      array('fastethernet',          $rewrite_array,        'FastEthernet'),
298    );
299  }
300
301  /**
302   * @dataProvider providerArrayStrReplace2
303   * @group replace
304   */
305  public function testArrayStrReplace2($string, $array, $result)
306  {
307    $this->assertEquals($result, array_str_replace($array, $string, TRUE));
308  }
309
310  public function providerArrayStrReplace2()
311  {
312    // Case Sensitive test
313    $rewrite_array = array(
314      'ether' => 'Ether',
315      'gig'   => 'Gig',
316      'fast'  => 'Fast',
317      'ten'   => 'Ten',
318    );
319
320    return array(
321      // real tests
322      array('Some gigabit ethernet', $rewrite_array,        'Some Gigabit Ethernet'),
323      array('Some gIgabit ETHERNET', $rewrite_array,        'Some gIgabit ETHERNET'),
324      array('fastethernet',          $rewrite_array,        'FastEthernet'),
325    );
326  }
327
328  /**
329   * @dataProvider providerArrayPregReplace
330   * @group replace
331   */
332  public function testArrayPregReplace($string, $array, $result)
333  {
334    $this->assertEquals($result, array_preg_replace($array, $string));
335  }
336
337  public function providerArrayPregReplace()
338  {
339    $rewrite_regexp = array(
340      '/Nortel .* Module - /i' => '%TEST1%',
341      '/Baystack .* - /i'     => '%TEST2%',
342      '/DEC [a-z\d]+ PCI /i'  => '%TEST3%',
343      '!^APC !'               => '%TEST4%',
344    );
345
346    return array(
347      // empty/not exist pattern
348      array('Some Text Baystack IUHIINind jawdbjdn - @@', array(),                                  'Some Text Baystack IUHIINind jawdbjdn - @@'),
349      array('Some Text Baystack IUHIINind jawdbjdn - @@', array('/some text/' => 'REPLACE_STRING'), 'Some Text Baystack IUHIINind jawdbjdn - @@'),
350
351      // real tests
352      array('Some Text Nortel IUHIINind ggg Module - @@', $rewrite_regexp,                          'Some Text %TEST1%@@'),
353      array('Some Text Baystack IUHIINind jawdbjdn - @@', $rewrite_regexp,                          'Some Text %TEST2%@@'),
354      array('Some Text DEC ind666618368318318368 PCI @@', $rewrite_regexp,                          'Some Text %TEST3%@@'),
355      array('APC  Some Text @@',                          $rewrite_regexp,                          '%TEST4% Some Text @@'),
356    );
357  }
358
359  /**
360   * @dataProvider providerArrayTagReplace
361   * @group replace
362   */
363  public function testArrayTagReplace($string, $array, $result)
364  {
365    $this->assertEquals($result, array_tag_replace($array, $string));
366  }
367
368  public function providerArrayTagReplace()
369  {
370    // recursive from array
371    $rfrom = array(
372      'somekey' => array(
373        'somekey3' => 'port-%INDEX%-%index%.rrd',
374        'somekey4' => 'port-%descr%-%index%-% %.rrd',
375      ),
376      'somekey2' => 'port-%descr%-%index%-%.rrd',
377      'perf-pollermodule-%index%.rrd'
378    );
379    $rto = array(
380      'somekey' => array(
381        'somekey3' => 'port--0.rrd',
382        'somekey4' => 'port--0-% %.rrd',
383      ),
384      'somekey2' => 'port--0-%.rrd',
385      'perf-pollermodule-0.rrd'
386    );
387
388    return array(
389      // empty/not exist keys
390      array('%some_key%',                            array(),                                     ''),
391      array('http://some_url/%some_url%/some_url',   array('some_url' => 'REPLACE_STRING'),       'http://some_url/REPLACE_STRING/some_url'),
392      // duplicate keys
393      array('http://some_url/%some_url%/%some_url%', array('some_url' => 'REPLACE_STRING'),       'http://some_url/REPLACE_STRING/REPLACE_STRING'),
394      // multiple keys
395      array('http://some_url/%some1%/%some2%',       array('some1' => '1111', 'some2' => '2222'), 'http://some_url/1111/2222'),
396      // real test
397      array('perf-pollermodule-%index%.rrd',         array('index' => 0), 'perf-pollermodule-0.rrd'),
398      array('port-%descr%-%index%.rrd',              array('index' => 0), 'port--0.rrd'),
399
400      array('%url%%routing_key%',                    array('url' => 'https://alert.victorops.com/integrations/generic/20131114/alert/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/', 'routing_key' => 'everyone'),
401                                                     'https://alert.victorops.com/integrations/generic/20131114/alert/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/everyone'),
402
403      // Tags is case-sensitive!
404      array('port-%INDEX%-%index%.rrd',              array('index' => 0), 'port--0.rrd'),
405      array(1000000000,                              array('index' => 0), '1000000000'), // integer to string
406      // Keep not tagged percent signs
407      array('port-%descr%-%index%-%.rrd',            array('index' => 0), 'port--0-%.rrd'),
408      array('port-%descr%-%index%-%%.rrd',           array('index' => 0), 'port--0-%%.rrd'),
409      array('port-%descr%-%index%-% %.rrd',          array('index' => 0), 'port--0-% %.rrd'),
410
411      // recursive arrays with string
412      array($rfrom,                                  array('index' => 0), $rto),
413    );
414  }
415
416  /**
417   * @dataProvider providerProcessPortLabel
418   * @group process
419   */
420  public function testProcessPortLabel($os, $array, $result)
421  {
422    // Port array template
423    $port = array(
424      'ifIndex' => '5',
425      //'ifDescr' => 'GigabitEthernet0/1',
426      'ifType' => 'ethernetCsmacd',
427      'ifMtu' => '1500',
428      'ifSpeed' => '1000000000',
429      'ifPhysAddress' => '4c:4e:35:fb:c7:20',
430      'ifAdminStatus' => 'up',
431      'ifOperStatus' => 'up',
432      'ifLastChange' => '0:0:01:03.68',
433      'ifInOctets' => '2336423782',
434      'ifInUcastPkts' => '56523160',
435      'ifInDiscards' => '0',
436      'ifInErrors' => '195562',
437      'ifInUnknownProtos' => '0',
438      'ifOutOctets' => '2769871040',
439      'ifOutUcastPkts' => '83292747',
440      'ifOutDiscards' => '0',
441      'ifOutErrors' => '0',
442      //'ifName' => 'Gi0/1',
443      'ifInMulticastPkts' => '1',
444      'ifInBroadcastPkts' => '21',
445      'ifOutMulticastPkts' => '16933',
446      'ifOutBroadcastPkts' => '2434835',
447      'ifHCInOctets' => '10926358374',
448      'ifHCInUcastPkts' => '56523160',
449      'ifHCInMulticastPkts' => '1',
450      'ifHCInBroadcastPkts' => '21',
451      'ifHCOutOctets' => '75784315072',
452      'ifHCOutUcastPkts' => '83292747',
453      'ifHCOutMulticastPkts' => '16933',
454      'ifHCOutBroadcastPkts' => '2434835',
455      'ifLinkUpDownTrapEnable' => 'enabled',
456      'ifHighSpeed' => '1000',
457      'ifPromiscuousMode' => 'false',
458      'ifConnectorPresent' => 'true',
459      //'ifAlias' => 'Po1#2',
460      'ifCounterDiscontinuityTime' => '0:0:00:32.81',
461      'dot3StatsDuplexStatus' => 'fullDuplex',
462    );
463    foreach ($array as $oid => $value)
464    {
465      $port[$oid] = $value;
466    }
467
468    // Device array template
469    $device = array(
470      'device_id' => 99999999,
471      'os' => $os,
472    );
473    // Process $port array
474    process_port_label($port, $device);
475    //var_dump($port);
476
477    // Select specific entries for validate
478    $test_array = array();
479    foreach (array('port_label', 'port_label_num', 'port_label_base', 'port_label_short') as $oid)
480    {
481      $test_array[$oid] = $port[$oid];
482    }
483    // Additionally test processing ifAlias on some entries
484    if (isset($result['ifAlias']))
485    {
486      $test_array['ifAlias'] = $port['ifAlias'];
487    }
488
489    $this->assertEquals($result, $test_array);
490  }
491
492  public function providerProcessPortLabel()
493  {
494    return array(
495      array('ios',          array('ifDescr' => 'GigabitEthernet0/1', 'ifName' => 'Gi0/1', 'ifAlias' => 'Po1#2'),
496                            array('port_label' => 'GigabitEthernet0/1', 'port_label_num' => '0/1', 'port_label_base' => 'GigabitEthernet', 'port_label_short' => 'Gi0/1')),
497      array('ios',          array('ifDescr' => 'FastEthernet0/1/1', 'ifName' => 'Fa0/1/1', 'ifAlias' => 'COMSTAR BGP link'),
498                            array('port_label' => 'FastEthernet0/1/1', 'port_label_num' => '0/1/1', 'port_label_base' => 'FastEthernet', 'port_label_short' => 'Fa0/1/1')),
499      array('ios',          array('ifDescr' => 'Null0', 'ifName' => 'Nu0', 'ifAlias' => ''),
500                            array('port_label' => 'Null0', 'port_label_num' => '0', 'port_label_base' => 'Null', 'port_label_short' => 'Null0')),
501      array('ios',          array('ifDescr' => 'Vlan1', 'ifName' => 'Vl1', 'ifAlias' => ''),
502                            array('port_label' => 'Vlan1', 'port_label_num' => '1', 'port_label_base' => 'Vlan', 'port_label_short' => 'Vlan1')),
503
504      array('iosxe',        array('ifDescr' => 'TwentyFiveGigE1/0/14', 'ifName' => 'Twe1/0/14', 'ifAlias' => ''),
505                            array('port_label' => 'TwentyFiveGigE1/0/14', 'port_label_num' => '1/0/14', 'port_label_base' => 'TwentyFiveGigE', 'port_label_short' => 'Twe1/0/14')),
506      array('iosxe',        array('ifDescr' => 'HundredGigE1/0/52', 'ifName' => 'Hu1/0/52', 'ifAlias' => ''),
507                            array('port_label' => 'HundredGigE1/0/52', 'port_label_num' => '1/0/52', 'port_label_base' => 'HundredGigE', 'port_label_short' => 'Hu1/0/52')),
508
509      array('iosxr',        array('ifDescr' => 'Bundle-Ether670.1793', 'ifName' => 'Bundle-Ether670.1793', 'ifAlias' => ''),
510                            array('port_label' => 'Bundle-Ether670.1793', 'port_label_num' => '670.1793', 'port_label_base' => 'Bundle-Ether', 'port_label_short' => 'BE670.1793')),
511      array('iosxr',        array('ifDescr' => 'ControlEthernet0/RSP0/CPU0/S0/10', 'ifName' => 'ControlEthernet0/RSP0/CPU0/S0/10', 'ifAlias' => ''),
512                            array('port_label' => 'ControlEthernet0/RSP0/CPU0/S0/10', 'port_label_num' => '0/RSP0/CPU0/S0/10', 'port_label_base' => 'ControlEthernet', 'port_label_short' => 'CE0/RSP0/CPU0/S0/10')),
513      array('iosxr',        array('ifDescr' => 'MgmtEth0/RP0/CPU0/0', 'ifName' => 'MgmtEth0/RP0/CPU0/0', 'ifAlias' => ''),
514                            array('port_label' => 'MgmtEth0/RP0/CPU0/0', 'port_label_num' => '0/RP0/CPU0/0', 'port_label_base' => 'MgmtEth', 'port_label_short' => 'Mgmt0/RP0/CPU0/0')),
515      array('iosxr',        array('ifDescr' => 'Optics0/0/0/5', 'ifName' => 'Optics0/0/0/5', 'ifAlias' => ''),
516                            array('port_label' => 'Optics0/0/0/5', 'port_label_num' => '0/0/0/5', 'port_label_base' => 'Optics', 'port_label_short' => 'Optics0/0/0/5')),
517      array('iosxr',        array('ifDescr' => 'HundredGigE0/0/0/19', 'ifName' => 'HundredGigE0/0/0/19', 'ifAlias' => ''),
518                            array('port_label' => 'HundredGigE0/0/0/19', 'port_label_num' => '0/0/0/19', 'port_label_base' => 'HundredGigE', 'port_label_short' => 'Hu0/0/0/19')),
519
520      array('cisco-fxos',   array('ifDescr' => 'Adaptive Security Appliance \'Ethernet1/13', 'ifName' => 'Adaptive Security Appliance \'Ethernet1/13\' interface', 'ifAlias' => ''),
521                            array('port_label' => 'Ethernet1/13', 'port_label_num' => '1/13', 'port_label_base' => 'Ethernet', 'port_label_short' => 'Et1/13')),
522      array('cisco-fxos',   array('ifDescr' => 'Adaptive Security Appliance \'Port-Channel13\' interface', 'ifName' => 'Adaptive Security Appliance \'Port-Channel13\' interface', 'ifAlias' => ''),
523                            array('port_label' => 'Port-Channel13', 'port_label_num' => '13', 'port_label_base' => 'Port-Channel', 'port_label_short' => 'Po13')),
524
525      array('nxos',         array('ifDescr' => '', 'ifName' => 'Ethernet1/49.2', 'ifAlias' => ''),
526                            array('port_label' => 'Ethernet1/49.2', 'port_label_num' => '1/49.2', 'port_label_base' => 'Ethernet', 'port_label_short' => 'Et1/49.2')),
527
528      array('junos',        array('ifDescr' => 'ge-4/1/0.29', 'ifName' => 'ge-4/1/0.29', 'ifAlias' => 'Cust: Europool DIA'),
529                            array('port_label' => 'ge-4/1/0.29', 'port_label_num' => '4/1/0.29', 'port_label_base' => 'ge-', 'port_label_short' => 'ge-4/1/0.29')),
530      array('junos',        array('ifDescr' => 'reth3.0', 'ifName' => 'reth3.0', 'ifAlias' => ''),
531                            array('port_label' => 'reth3.0', 'port_label_num' => '3.0', 'port_label_base' => 'reth', 'port_label_short' => 'reth3.0')),
532
533      array('nos',          array('ifDescr' => 'TenGigabitEthernet 122/0/41', 'ifName' => 'TenGigabitEthernet 122/0/41', 'ifAlias' => ''),
534                            array('port_label' => 'TenGigabitEthernet 122/0/41', 'port_label_num' => '122/0/41', 'port_label_base' => 'TenGigabitEthernet ', 'port_label_short' => 'Te 122/0/41')),
535      array('nos',          array('ifDescr' => 'FortyGigabitEthernet 122/0/49', 'ifName' => 'FortyGigabitEthernet 122/0/49', 'ifAlias' => ''),
536                            array('port_label' => 'FortyGigabitEthernet 122/0/49', 'port_label_num' => '122/0/49', 'port_label_base' => 'FortyGigabitEthernet ', 'port_label_short' => 'Fo 122/0/49')),
537
538      array('dnos',         array('ifDescr' => 'fortyGigE 0/37', 'ifName' => 'fortyGigE 0/37', 'ifAlias' => ''),
539                            array('port_label' => 'FortyGigE 0/37', 'port_label_num' => '0/37', 'port_label_base' => 'FortyGigE ', 'port_label_short' => 'Fo 0/37')),
540      array('dnos',         array('ifDescr' => 'ManagementEthernet 0/0', 'ifName' => 'ManagementEthernet 0/0', 'ifAlias' => ''),
541                            array('port_label' => 'ManagementEthernet 0/0', 'port_label_num' => '0/0', 'port_label_base' => 'ManagementEthernet ', 'port_label_short' => 'Mgmt 0/0')),
542
543      array('vrp',          array('ifDescr' => '40GE4/0/6', 'ifName' => '40GE4/0/6', 'ifAlias' => ''),
544                            array('port_label' => '40GE4/0/6', 'port_label_num' => '4/0/6', 'port_label_base' => '40GE', 'port_label_short' => '40GE4/0/6')),
545      array('vrp',          array('ifDescr' => 'XGigabitEthernet5/0/14', 'ifName' => 'XGigabitEthernet5/0/14', 'ifAlias' => ''),
546                            array('port_label' => 'XGigabitEthernet5/0/14', 'port_label_num' => '5/0/14', 'port_label_base' => 'XGigabitEthernet', 'port_label_short' => 'XGi5/0/14')),
547
548      array('routeros',     array('ifDescr' => 'Core: sfp-sfpplus1- Trunk to 6509', 'ifName' => 'Core: sfp-sfpplus1- Trunk to 6509', 'ifAlias' => ''),
549                            array('port_label' => 'Core: sfp-sfpplus1- Trunk to 6509', 'port_label_num' => '', 'port_label_base' => 'Core: sfp-sfpplus1- Trunk to 6509', 'port_label_short' => 'Core: sfp-sfpplus1- Trunk to 6509')),
550
551      array('linux',        array('ifDescr' => 'lo', 'ifName' => 'lo', 'ifAlias' => ''),
552                            array('port_label' => 'lo', 'port_label_num' => '', 'port_label_base' => 'lo', 'port_label_short' => 'lo')),
553      array('linux',        array('ifDescr' => 'Red Hat, Inc Device 0001', 'ifName' => 'eth0', 'ifAlias' => ''),
554                            array('port_label' => 'eth0', 'port_label_num' => '0', 'port_label_base' => 'eth', 'port_label_short' => 'eth0')),
555      array('linux',        array('ifDescr' => 'eth0.101', 'ifName' => 'eth0.101', 'ifAlias' => ''),
556                            array('port_label' => 'eth0.101', 'port_label_num' => '0.101', 'port_label_base' => 'eth', 'port_label_short' => 'eth0.101')),
557
558      // port_label os definitions
559      array('vmware',       array('ifDescr' => 'Device vmnic7 at 08:00.1 bnx2', 'ifName' => '', 'ifAlias' => ''),
560                            array('port_label' => 'vmnic7', 'port_label_num' => '7', 'port_label_base' => 'vmnic', 'port_label_short' => 'vmnic7')),
561      array('vmware',       array('ifDescr' => 'Traditional Virtual VMware switch: vSwitch0', 'ifName' => 'vSwitch0', 'ifAlias' => ''),
562                            array('port_label' => 'vSwitch0', 'port_label_num' => '0', 'port_label_base' => 'vSwitch', 'port_label_short' => 'vSwitch0')),
563      array('vmware',       array('ifDescr' => 'Virtual interface: vmk2 on vswitch vSwitchISCSI portgroup: iSCSI0', 'ifName' => 'vmk2', 'ifAlias' => ''),
564                            array('port_label' => 'vmk2', 'port_label_num' => '2', 'port_label_base' => 'vmk', 'port_label_short' => 'vmk2')),
565      array('vmware',       array('ifDescr' => 'Link Aggregation VM_iSCSI on switch: vSwitchISCSI, load balancing algorithm: source port id hash', 'ifName' => '', 'ifAlias' => ''),
566                            array('port_label' => 'Link Aggregation VM_iSCSI', 'port_label_num' => NULL, 'port_label_base' => 'Link Aggregation VM_iSCSI', 'port_label_short' => 'Lagg VM_iSCSI')),
567      array('aix',          array('ifDescr' => 'en0; Product: 2-Port 10/100/1000 Base-TX PCI-X Adapter Manufacturer: not available! Part Number: not available! FRU Number: not available!', 'ifName' => '', 'ifAlias' => ''),
568                            array('port_label' => 'en0', 'port_label_num' => '0', 'port_label_base' => 'en', 'port_label_short' => 'en0')),
569      array('cisco-altiga', array('ifDescr' => 'DEC 21143A PCI Fast Ethernet', 'ifName' => '', 'ifAlias' => ''), // ++ ifIndex
570                            array('port_label' => 'Fast Ethernet5', 'port_label_num' => '5', 'port_label_base' => 'Fast Ethernet', 'port_label_short' => 'Fa5')),
571      array('deltaups',     array('ifDescr' => 'eth0............', 'ifName' => '', 'ifAlias' => ''),
572                            array('port_label' => 'eth0', 'port_label_num' => '0', 'port_label_base' => 'eth', 'port_label_short' => 'eth0')),
573      array('netapp',       array('ifDescr' => 'e0a'),
574                            array('port_label' => 'e0a', 'port_label_num' => '0a', 'port_label_base' => 'e', 'port_label_short' => 'e0a')),
575      array('netapp',       array('ifDescr' => 'vega-01:MGMT_PORT_ONLY e0M'),
576                            array('port_label' => 'vega-01:MGMT_PORT_ONLY e0M', 'port_label_num' => '0M', 'port_label_base' => 'vega-01:MGMT_PORT_ONLY e', 'port_label_short' => 'vega-01:MGMT_PORT_ONLY e0M')),
577      array('speedtouch',   array('ifDescr' => 'Some2thomson', 'ifName' => '', 'ifAlias' => ''),
578                            array('port_label' => 'Some2', 'port_label_num' => '2', 'port_label_base' => 'Some', 'port_label_short' => 'Some2')),
579      array('mrvos',        array('ifDescr' => 'Port 2 - ETH10/100/1000'),
580                            array('port_label' => 'Port 2', 'port_label_num' => '2', 'port_label_base' => 'Port ', 'port_label_short' => 'Port 2')),
581      array('zxr10',        array('ifDescr' => 'ZXR10 2928-SI 100BaseT port  23', 'ifName' => '', 'ifAlias' => ''),
582                            array('port_label' => '100BaseT port 23', 'port_label_num' => '23', 'port_label_base' => '100BaseT port ', 'port_label_short' => 'port 23')),
583      array('avaya-ers',    array('ifDescr' => 'Nortel Ethernet Routing Switch 5650TD Module - Port 36'),
584                            array('port_label' => 'Port 36', 'port_label_num' => '36', 'port_label_base' => 'Port ', 'port_label_short' => 'Port 36')),
585      array('uniping',      array('ifDescr' => 'UniPing Server Solution v3/SMS Enet Port'),
586                            array('port_label' => 'Enet Port', 'port_label_num' => NULL, 'port_label_base' => 'Enet Port', 'port_label_short' => 'Enet Port')),
587
588      array('timos',        array('ifDescr' => 'to-155KRD-1/1/23:1502, IP interface', 'ifName' => 'to-155KRD-1/1/23:1502', 'ifAlias' => ''),
589                            array('port_label' => 'to-155KRD-1/1/23:1502', 'port_label_num' => '1/1/23:1502', 'port_label_base' => 'to-155KRD-', 'port_label_short' => 'to-155KRD-1/1/23:1502', 'ifAlias' => '')),
590      array('timos',        array('ifDescr' => '1/1/26, 10-Gig Ethernet, Link to MDR-AGG-SW01 xe-0/0/4', 'ifName' => '1/1/26', 'ifAlias' => ''),
591                            array('port_label' => '1/1/26', 'port_label_num' => '1/1/26', 'port_label_base' => '', 'port_label_short' => '1/1/26', 'ifAlias' => 'Link to MDR-AGG-SW01 xe-0/0/4')),
592      array('timos',        array('ifDescr' => 'lag-13, LAG Group, LAG to 7750 port 1/2/3', 'ifName' => 'lag-13', 'ifAlias' => ''),
593                            array('port_label' => 'lag-13', 'port_label_num' => '13', 'port_label_base' => 'lag-', 'port_label_short' => 'lag-13', 'ifAlias' => 'LAG to 7750 port 1/2/3')),
594
595      array('ekinops-360',  array('ifDescr' => 'EKINOPS/C200/6/PM10010MP/Line(ROV-VOR-194,2)', 'ifName' => 'EKINOPS/C200/6/PM10010MP/Line(ROV-VOR-194,2)', 'ifAlias' => ''),
596                            array('port_label' => '6/PM10010MP/Line', 'port_label_num' => '', 'port_label_base' => '6/PM10010MP/Line', 'port_label_short' => '6/PM10010MP/Line', 'ifAlias' => 'ROV-VOR-194,2')),
597      array('ekinops-360',  array('ifDescr' => 'EKINOPS/C200HC/1/PM_10010MP/S1-Client1(PORT_Number 1   )', 'ifName' => 'EKINOPS/C200HC/1/PM_10010MP/S1-Client1(PORT_Number 1   )', 'ifAlias' => ''),
598                            array('port_label' => '1/PM_10010MP/S1-Client1', 'port_label_num' => '1-Client1', 'port_label_base' => '1/PM_10010MP/S', 'port_label_short' => '1/PM_10010MP/S1-Client1', 'ifAlias' => 'PORT_Number 1')),
599      array('ekinops-360',  array('ifDescr' => 'EKINOPS/C200/6/PM10010MP/S4-Client4()', 'ifName' => 'EKINOPS/C200/6/PM10010MP/S4-Client4()', 'ifAlias' => ''),
600                            array('port_label' => '6/PM10010MP/S4-Client4', 'port_label_num' => '4-Client4', 'port_label_base' => '6/PM10010MP/S', 'port_label_short' => '6/PM10010MP/S4-Client4', 'ifAlias' => '')),
601      array('ekinops-360',  array('ifDescr' => 'EKINOPS/C200/1/MGNT/FE_3', 'ifName' => 'EKINOPS/C200/1/MGNT/FE_3', 'ifAlias' => ''),
602                            array('port_label' => '1/MGNT/FE_3', 'port_label_num' => '3', 'port_label_base' => '1/MGNT/FE_', 'port_label_short' => '1/MGNT/FE_3', 'ifAlias' => '')),
603      array('ekinops-360',  array('ifDescr' => 'EKINOPS/C200/1/MGNT/GbE_RJ45#1', 'ifName' => 'EKINOPS/C200/1/MGNT/GbE_RJ45#1', 'ifAlias' => ''),
604                            array('port_label' => '1/MGNT/GbE_RJ45#1', 'port_label_num' => '1', 'port_label_base' => '1/MGNT/GbE_RJ45#', 'port_label_short' => '1/MGNT/GbE_RJ45#1', 'ifAlias' => '')),
605
606      // ifType_ifDescr
607      array('liebert',      array('ifDescr' => '', 'ifType' => 'softwareLoopback'), // ++ ifType, ifIndex
608                            array('port_label' => 'Loopback 5', 'port_label_num' => '5', 'port_label_base' => 'Loopback ', 'port_label_short' => 'Lo 5')),
609      array('liebert',      array('ifDescr' => '', 'ifType' => 'ethernetCsmacd'),   // ++ ifType, ifIndex
610                            array('port_label' => 'Ethernet 5', 'port_label_num' => '5', 'port_label_base' => 'Ethernet ', 'port_label_short' => 'Et 5')),
611
612      array('aos',          array('ifDescr' => 'Alcatel-Lucent 1/10', 'ifName' => '', 'ifAlias' => ''), // -- ifName
613                            array('port_label' => '1/10', 'port_label_num' => '1/10', 'port_label_base' => '', 'port_label_short' => '1/10')),
614
615      // ifname
616      array('aos',          array('ifDescr' => 'Alcatel-Lucent 1/10', 'ifName' => '1/10', 'ifAlias' => ''),
617                            array('port_label' => '1/10', 'port_label_num' => '1/10', 'port_label_base' => '', 'port_label_short' => '1/10')),
618      array('aos',          array('ifDescr' => 'Alcatel-Lucent Stacking Port 1/StackA', 'ifName' => 'Stacking Port 1/StackA', 'ifAlias' => ''),
619                            array('port_label' => 'Stacking Port 1/StackA', 'port_label_num' => '1/StackA', 'port_label_base' => 'Stacking Port ', 'port_label_short' => 'Port 1/StackA')),
620      array('aosw',         array('ifDescr' => '802.1Q VLAN', 'ifName' => 'vlan 4095', 'ifAlias' => ''),
621                            array('port_label' => 'Vlan 4095', 'port_label_num' => '4095', 'port_label_base' => 'Vlan ', 'port_label_short' => 'Vlan 4095')),
622      array('aosw',         array('ifDescr' => 'SWITCH IP INTERFACE', 'ifName' => 'loop', 'ifAlias' => ''),
623                            array('port_label' => 'loop', 'port_label_num' => NULL, 'port_label_base' => 'loop', 'port_label_short' => 'loop')),
624
625      array('xos',          array('ifDescr' => 'X690-48x-2q-4c Port 10', 'ifName' => '1:10', 'ifAlias' => ''),
626                            array('port_label' => '1:10', 'port_label_num' => '1:10', 'port_label_base' => '', 'port_label_short' => '1:10')),
627
628      array('hirschmann-switch', array('ifDescr' => 'Module: 1 Port: 3 - 10/100 Mbit TX', 'ifName' => '1/1/3', 'ifAlias' => ''),
629                            array('port_label' => '1/1/3', 'port_label_num' => '1/1/3', 'port_label_base' => '', 'port_label_short' => '1/1/3')),
630      array('hirschmann-switch', array('ifDescr' => 'Module: 1 Port: 3 - 10/100 Mbit TX', 'ifName' => '', 'ifAlias' => ''),
631                            array('port_label' => 'Module: 1 Port: 3', 'port_label_num' => '1 Port: 3', 'port_label_base' => 'Module: ', 'port_label_short' => 'Module: 1 Port: 3')),
632      array('hirschmann-switch', array('ifDescr' => 'CPU Interface for Module: 4 Port: 1', 'ifName' => 'CPU Interface:  1/4/1', 'ifAlias' => ''),
633                            array('port_label' => 'CPU Interface: 1/4/1', 'port_label_num' => '1/4/1', 'port_label_base' => 'CPU Interface: ', 'port_label_short' => 'CPU Interface: 1/4/1')),
634
635      // hard coded rewrites
636      array('ciscosb',      array('ifDescr' => '1', 'ifName' => '1', 'ifType' => 'propVirtual'), // ++ ifType
637                            array('port_label' => 'Vlan1', 'port_label_num' => '1', 'port_label_base' => 'Vlan', 'port_label_short' => 'Vlan1')),
638
639      // base/num port
640      array('generic',      array('ifDescr' => 'GigaVUE-212 Port  8/48 (Network Port)'),
641                            array('port_label' => 'GigaVUE-212 Port 8/48', 'port_label_num' => '8/48', 'port_label_base' => 'GigaVUE-212 Port ', 'port_label_short' => 'Port 8/48')),
642      array('generic',      array('ifDescr' => 'rtif(172.20.30.46/28)'),
643                            array('port_label' => 'rtif(172.20.30.46/28)', 'port_label_num' => '', 'port_label_base' => 'rtif(172.20.30.46/28)', 'port_label_short' => 'rtif(172.20.30.46/28)')),
644      array('generic',      array('ifDescr' => '10/100 MBit Ethernet Switch Interface 6'),
645                            array('port_label' => 'Ethernet 6', 'port_label_num' => '6', 'port_label_base' => 'Ethernet ', 'port_label_short' => 'Et 6')),
646      array('generic',      array('ifDescr' => '1/1/1'),
647                            array('port_label' => '1/1/1', 'port_label_num' => '1/1/1', 'port_label_base' => '', 'port_label_short' => '1/1/1')),
648      array('generic',      array('ifDescr' => 'e1-0/2/0:13.0'),
649                            array('port_label' => 'e1-0/2/0:13.0', 'port_label_num' => '0/2/0:13.0', 'port_label_base' => 'e1-', 'port_label_short' => 'e1-0/2/0:13.0')),
650      array('generic',      array('ifDescr' => 'dwdm0/1/0/6'),
651                            array('port_label' => 'dwdm0/1/0/6', 'port_label_num' => '0/1/0/6', 'port_label_base' => 'dwdm', 'port_label_short' => 'DWDM0/1/0/6')),
652      array('generic',      array('ifDescr' => 'Cable8/1/4-upstream2'),
653                            array('port_label' => 'Cable8/1/4-upstream2', 'port_label_num' => '8/1/4-upstream2', 'port_label_base' => 'Cable', 'port_label_short' => 'Cable8/1/4-upstream2')),
654      array('generic',      array('ifDescr' => '16GigabitEthernet1/2/1'),
655                            array('port_label' => '16GigabitEthernet1/2/1', 'port_label_num' => '1/2/1', 'port_label_base' => '16GigabitEthernet', 'port_label_short' => '16Gi1/2/1')),
656      array('generic',      array('ifDescr' => 'cau4-0/2/0'),
657                            array('port_label' => 'cau4-0/2/0', 'port_label_num' => '0/2/0', 'port_label_base' => 'cau4-', 'port_label_short' => 'cau4-0/2/0')),
658      array('generic',      array('ifDescr' => 'dot11radio0/0'),
659                            array('port_label' => 'dot11radio0/0', 'port_label_num' => '0/0', 'port_label_base' => 'dot11radio', 'port_label_short' => 'dot11radio0/0')),
660      array('generic',      array('ifDescr' => '1000BaseTX Port 8/48 Name'),
661                            array('port_label' => '1000BaseTX Port 8/48', 'port_label_num' => '8/48', 'port_label_base' => '1000BaseTX Port ', 'port_label_short' => 'Port 8/48')),
662      array('generic',      array('ifDescr' => 'Backplane-GigabitEthernet0/3'),
663                            array('port_label' => 'Backplane-GigabitEthernet0/3', 'port_label_num' => '0/3', 'port_label_base' => 'Backplane-GigabitEthernet', 'port_label_short' => 'Bpl-Gi0/3')),
664      array('generic',      array('ifDescr' => 'FC port 0/19'),
665                            array('port_label' => 'FC port 0/19', 'port_label_num' => '0/19', 'port_label_base' => 'FC port ', 'port_label_short' => 'FC port 0/19')),
666      array('generic',      array('ifDescr' => 'GigabitEthernet0/1.ServiceInstance.206'),
667                            array('port_label' => 'GigabitEthernet0/1.ServiceInstance.206', 'port_label_num' => '0/1.ServiceInstance.206', 'port_label_base' => 'GigabitEthernet', 'port_label_short' => 'Gi0/1.SI.206')),
668      array('generic',      array('ifDescr' => 'Integrated-Cable7/0/0:0'),
669                            array('port_label' => 'Integrated-Cable7/0/0:0', 'port_label_num' => '7/0/0:0', 'port_label_base' => 'Integrated-Cable', 'port_label_short' => 'Integrated-Cable7/0/0:0')),
670      array('generic',      array('ifDescr' => 'Logical Upstream Channel 1/0.0/0'),
671                            array('port_label' => 'Logical Upstream Channel 1/0.0/0', 'port_label_num' => '1/0.0/0', 'port_label_base' => 'Logical Upstream Channel ', 'port_label_short' => 'Upstream 1/0.0/0')),
672      array('generic',      array('ifDescr' => 'Video Downstream 0/0/38'),
673                            array('port_label' => 'Video Downstream 0/0/38', 'port_label_num' => '0/0/38', 'port_label_base' => 'Video Downstream ', 'port_label_short' => 'Downstream 0/0/38')),
674      array('generic',      array('ifDescr' => 'Downstream RF Port 4/7'),
675                            array('port_label' => 'Downstream RF Port 4/7', 'port_label_num' => '4/7', 'port_label_base' => 'Downstream RF Port ', 'port_label_short' => 'Downstream 4/7')),
676      array('generic',      array('ifDescr' => 'Slot0/1'),
677                            array('port_label' => 'Slot0/1', 'port_label_num' => '0/1', 'port_label_base' => 'Slot', 'port_label_short' => 'Slot0/1')),
678      array('generic',      array('ifDescr' => 'sonet_12/1'),
679                            array('port_label' => 'sonet_12/1', 'port_label_num' => '12/1', 'port_label_base' => 'sonet_', 'port_label_short' => 'sonet_12/1')),
680      array('generic',      array('ifDescr' => 'gigabitEthernet 1/0/24 : copper'),
681                            array('port_label' => 'GigabitEthernet 1/0/24', 'port_label_num' => '1/0/24', 'port_label_base' => 'GigabitEthernet ', 'port_label_short' => 'Gi 1/0/24')),
682      array('generic',      array('ifDescr' => '1:38'),
683                            array('port_label' => '1:38', 'port_label_num' => '1:38', 'port_label_base' => '', 'port_label_short' => '1:38')),
684      array('generic',      array('ifDescr' => '1/4/x24, mx480-xe-0-0-0'),
685                            array('port_label' => '1/4/x24', 'port_label_num' => '1/4/x24', 'port_label_base' => '', 'port_label_short' => '1/4/x24')),
686      array('generic',      array('ifDescr' => '1/4/x24'),
687                            array('port_label' => '1/4/x24', 'port_label_num' => '1/4/x24', 'port_label_base' => '', 'port_label_short' => '1/4/x24')),
688      array('generic',      array('ifDescr' => 'MMC-A s3 SW Port'),
689                            array('port_label' => 'MMC-A s3', 'port_label_num' => '3', 'port_label_base' => 'MMC-A s', 'port_label_short' => 'MMC-A s3')),
690      array('generic',      array('ifDescr' => 'Atm0_Physical_Interface'),
691                            array('port_label' => 'Atm0', 'port_label_num' => '0', 'port_label_base' => 'Atm', 'port_label_short' => 'Atm0')),
692      array('generic',      array('ifDescr' => 'wan1_phys'),
693                            array('port_label' => 'wan1_phys', 'port_label_num' => '1_phys', 'port_label_base' => 'wan', 'port_label_short' => 'wan1_phys')),
694      array('generic',      array('ifDescr' => 'fwbr101i0'),
695                            array('port_label' => 'fwbr101i0', 'port_label_num' => '101i0', 'port_label_base' => 'fwbr', 'port_label_short' => 'fwbr101i0')),
696      array('generic',      array('ifDescr' => 'lo0.32768'),
697                            array('port_label' => 'lo0.32768', 'port_label_num' => '0.32768', 'port_label_base' => 'lo', 'port_label_short' => 'lo0.32768')),
698      array('generic',      array('ifDescr' => 'Vlan.818'),
699                            array('port_label' => 'Vlan.818', 'port_label_num' => '818', 'port_label_base' => 'Vlan.', 'port_label_short' => 'Vlan.818')),
700      array('generic',      array('ifDescr' => 'Bundle-Ether1.1701'),
701                            array('port_label' => 'Bundle-Ether1.1701', 'port_label_num' => '1.1701', 'port_label_base' => 'Bundle-Ether', 'port_label_short' => 'BE1.1701')),
702      array('generic',      array('ifDescr' => 'BVI900'),
703                            array('port_label' => 'BVI900', 'port_label_num' => '900', 'port_label_base' => 'BVI', 'port_label_short' => 'BVI900')),
704      array('generic',      array('ifDescr' => 'A/1'),
705                            array('port_label' => 'A/1', 'port_label_num' => '1', 'port_label_base' => 'A/', 'port_label_short' => 'A/1')),
706      array('generic',      array('ifDescr' => 'e1'),
707                            array('port_label' => 'e1', 'port_label_num' => '1', 'port_label_base' => 'e', 'port_label_short' => 'e1')),
708      array('generic',      array('ifDescr' => 'CATV-MAC 1'),
709                            array('port_label' => 'CATV-MAC 1', 'port_label_num' => '1', 'port_label_base' => 'CATV-MAC ', 'port_label_short' => 'CATV-MAC 1')),
710      array('generic',      array('ifDescr' => 'Control Plane'),
711                            array('port_label' => 'Control Plane', 'port_label_num' => NULL, 'port_label_base' => 'Control Plane', 'port_label_short' => 'Control Plane')),
712      array('generic',      array('ifDescr' => 'port 3: Gigabit Fiber'), // TP-LINK
713                            array('port_label' => 'port 3', 'port_label_num' => '3', 'port_label_base' => 'port ', 'port_label_short' => 'port 3')),
714      //array('generic',      array('ifDescr' => 'microsens'),
715      //                      array('port_label' => 'microsens', 'port_label_num' => 'microsens', 'port_label_base' => '', 'port_label_short' => 'microsens')),
716      //array('generic',      array('ifDescr' => 'microsens'),
717      //                      array('port_label' => 'microsens', 'port_label_num' => 'microsens', 'port_label_base' => '', 'port_label_short' => 'microsens')),
718
719    );
720  }
721}
722
723// EOF
724