Restore $config['oxidized']['features']['versioning'].

This commit is contained in:
Tony Murray
2016-02-12 14:27:55 -06:00
parent cc344bf3c3
commit 31897758e5
3 changed files with 10 additions and 2 deletions

View File

@@ -13,6 +13,9 @@ $config['oxidized']['url'] = 'http://127.0.0.1:8888';
```
LibreNMS supports config versioning if Oxidized does. This is known to work with the git output module.
```php
$config['oxidized']['features']['versioning'] = true;
```
Oxidized supports various ways to utilise credentials to login to devices, you can specify global username/password within Oxidized, Group level username/password or per device.
LibreNMS currently supports sending groups back to Oxidized so that you can then define group credentials within Oxidized. To enable this support please switch on 'Enable the return of groups to Oxidized':

View File

@@ -105,8 +105,9 @@ if (is_admin()) {
else if ($config['oxidized']['enabled'] === true && isset($config['oxidized']['url'])) {
// fetch info about the node and then a list of versions for that node
$node_info = json_decode(file_get_contents($config['oxidized']['url'].'/node/show/'.$device['hostname'].'?format=json'), true);
$config_versions = json_decode(file_get_contents($config['oxidized']['url'].'/node/version?node_full='.(isset($node_info['full_name']) ? $node_info['full_name'] : $device['hostname']).'&format=json'), true);
if ($config['oxidized']['features']['versioning'] === true) { // fetch a list of versions
$config_versions = json_decode(file_get_contents($config['oxidized']['url'].'/node/version?node_full='.(isset($node_info['full_name']) ? $node_info['full_name'] : $device['hostname']).'&format=json'), true);
}
if (is_array($config_versions)) {
$config_total = count($config_versions);
}

View File

@@ -13,6 +13,10 @@ $oxidized_conf = array(
'descr' => 'URL to your Oxidized API',
'type' => 'text',
),
array('name' => 'oxidized.features.versioning',
'descr' => 'Enable config versioning access',
'type' => 'checkbox',
),
array('name' => 'oxidized.group_support',
'descr' => 'Enable the return of groups to Oxidized',
'type' => 'checkbox',