Files
librenms-librenms/includes/polling/os/iosxr.inc.php
Tony Murray 9284bc60ff Update code in includes to be PSR-2 compliant (#4220)
refactor: Update code in /includes to be psr2 compliant #4220
2016-08-28 18:32:58 +01:00

14 lines
392 B
PHP

<?php
if (preg_match('/^Cisco IOS XR Software \(Cisco ([^\)]+)\),\s+Version ([^\[]+)\[([^\]]+)\]/', $poll_device['sysDescr'], $regexp_result)) {
$hardware = $regexp_result[1];
$features = $regexp_result[3];
$version = $regexp_result[2];
} else {
// It is not an IOS-XR ... What should we do ?
}
$serial = get_main_serial($device);
echo "\n".$poll_device['sysDescr']."\n";