XCP name is now deprecated.

The “xcp” entry in the configuration as been renamed “xen” (but compatibility is maintained).

Comments in the “local.php.dist” file as been clarified.
This commit is contained in:
Julien Fontanet 2013-05-23 10:30:08 +02:00
parent 1a7e9730e7
commit 6cc3241eed
2 changed files with 23 additions and 10 deletions

View File

@ -50,20 +50,31 @@ return array(
), ),
// For now, XCP servers/pool masters must be defined in this file. // For now, Xen servers/pool masters must be defined in this file.
'xcp' => array( 'xen' => array(
/* /* You MUST configure the following entries to connect XO-Server to your
* You MUST configure the following entries to connect XO-Server to your * Xen pool.
* XCP 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( // array(
// 'url' => 'https://xcp1.example.net', // 'url' => 'https://xen2.example.net',
// 'username' => 'username', // 'username' => 'username',
// 'password' => 'password' // 'password' => 'password'
// ), // ),
), ),
); );

View File

@ -1325,7 +1325,9 @@ final class Application extends Base
'VM_metrics' => 'vms_metrics', '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']); $xcp = new XCP($loop, $_['url'], $_['username'], $_['password']);