mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Update code in includes to be PSR-2 compliant (#4220)
refactor: Update code in /includes to be psr2 compliant #4220
This commit is contained in:
committed by
Neil Lathwood
parent
3c0fcdd46b
commit
9284bc60ff
@@ -15,8 +15,7 @@ if ($config['enable_libvirt'] == '1' && $device['os'] == 'linux') {
|
||||
foreach ($config['libvirt_protocols'] as $method) {
|
||||
if (strstr($method, 'qemu')) {
|
||||
$uri = $method.'://'.$userHostname.'/system';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$uri = $method.'://'.$userHostname;
|
||||
}
|
||||
|
||||
@@ -78,8 +77,7 @@ if ($config['enable_libvirt'] == '1' && $device['os'] == 'linux') {
|
||||
$inserted_id = dbInsert(array('device_id' => $device['device_id'], 'vm_type' => 'libvirt', 'vmwVmVMID' => $dom_id, 'vmwVmDisplayName' => mres($vmwVmDisplayName), 'vmwVmGuestOS' => mres($vmwVmGuestOS), 'vmwVmMemSize' => mres($vmwVmMemSize), 'vmwVmCpus' => mres($vmwVmCpus), 'vmwVmState' => mres($vmwVmState)), 'vminfo');
|
||||
echo '+';
|
||||
log_event("Virtual Machine added: $vmwVmDisplayName ($vmwVmMemSize MB)", $device, 'vm', $inserted_id);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if ($result['vmwVmState'] != $vmwVmState
|
||||
|| $result['vmwVmDisplayName'] != $vmwVmDisplayName
|
||||
|| $result['vmwVmCpus'] != $vmwVmCpus
|
||||
@@ -89,8 +87,7 @@ if ($config['enable_libvirt'] == '1' && $device['os'] == 'linux') {
|
||||
dbUpdate(array('vmwVmState' => mres($vmwVmState), 'vmwVmGuestOS' => mres($vmwVmGuestOS), 'vmwVmDisplayName' => mres($vmwVmDisplayName), 'vmwVmMemSize' => mres($vmwVmMemSize), 'vmwVmCpus' => mres($vmwVmCpus)), 'vminfo', "device_id=? AND vm_type='libvirt' AND vmwVmVMID=?", array($device['device_id'], $dom_id));
|
||||
echo 'U';
|
||||
// FIXME eventlog
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
echo '.';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user