diff --git a/config/local.php.dist b/config/local.php.dist index 2f1ab5f..b7eefb6 100644 --- a/config/local.php.dist +++ b/config/local.php.dist @@ -50,20 +50,31 @@ return array( ), - // For now, XCP servers/pool masters must be defined in this file. - 'xcp' => array( + // For now, Xen servers/pool masters must be defined in this file. + 'xen' => array( - /* - * You MUST configure the following entries to connect XO-Server to your - * XCP pool. + /* You MUST configure the following entries to connect XO-Server to your + * Xen pool. + */ + array( + // URL of the Xen API interface. + 'url' => 'https://xen1.example.net', + + // Name of the user which will be used to connect. + 'username' => 'username', + + // Uer password used for authentication. + 'password' => 'password' + ), + + /* You may configure as many pools/servers as you want. + * + * Uncomment this entry to add a second one. */ // array( - // 'url' => 'https://xcp1.example.net', + // 'url' => 'https://xen2.example.net', // 'username' => 'username', // 'password' => 'password' // ), - ), ); - - diff --git a/lib/Application.php b/lib/Application.php index 67f21b7..d174694 100644 --- a/lib/Application.php +++ b/lib/Application.php @@ -1325,7 +1325,9 @@ final class Application extends Base 'VM_metrics' => 'vms_metrics', ); - foreach ($config['xcp'] as $_) + $xen = $config->get('xen', false) + or $xen = $config['xcp']; + foreach ($xen as $_) { $xcp = new XCP($loop, $_['url'], $_['username'], $_['password']);