Merge pull request #1479 from laf/issue-1361

ifAlias is now derived from ifDescr if NULL
This commit is contained in:
Daniel Preussker
2015-07-19 20:04:04 +02:00
2 changed files with 6 additions and 0 deletions

View File

@@ -399,6 +399,7 @@ $os = 'nos';
$config['os'][$os]['text'] = 'Brocade NOS';
$config['os'][$os]['type'] = 'network';
$config['os'][$os]['ifname'] = 1;
$config['os'][$os]['ifalias_null'] = 1;
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
$config['os'][$os]['over'][0]['text'] = 'Device Traffic';
$config['os'][$os]['over'][1]['graph'] = 'device_processor';

View File

@@ -352,6 +352,11 @@ foreach ($ports as $port) {
}
}//end foreach
if (($port['update']['ifAlias'] == '' || $port['update']['ifAlias'] == NULL) && $config['os'][$os]['ifalias_null'] == 1) {
$port['update']['ifAlias'] = $port['ifDescr'];
d_echo('Using ifDescr due to ifAlias being NULL');
}
// Parse description (usually ifAlias) if config option set
if (isset($config['port_descr_parser']) && is_file($config['install_dir'].'/'.$config['port_descr_parser'])) {
$port_attribs = array(