Use Config helper (#10339)

remove usage of global variable
This commit is contained in:
Tony Murray
2019-06-23 00:29:12 -05:00
committed by GitHub
parent 342acf50f1
commit f3ba8947f7
367 changed files with 1589 additions and 1857 deletions

View File

@@ -46,9 +46,9 @@ if (!function_exists('proxmox_vm_exists')) {
$name = 'proxmox';
$app_id = $app['app_id'];
if (isset($config['enable_proxmox']) && $config['enable_proxmox'] && !empty($agent_data['app'][$name])) {
if (\LibreNMS\Config::get('enable_proxmox') && !empty($agent_data['app'][$name])) {
$proxmox = $agent_data['app'][$name];
} elseif (isset($config['enable_proxmox']) && $config['enable_proxmox']) {
} elseif (\LibreNMS\Config::get('enable_proxmox')) {
$options = '-Oqv';
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.7.112.114.111.120.109.111.120';
$proxmox = snmp_get($device, $oid, $options);