Coding style fixes.

This commit is contained in:
Julien Fontanet
2015-07-15 09:41:49 +02:00
parent 5a3ad35bdd
commit bf76e47648
2 changed files with 17 additions and 20 deletions

View File

@@ -334,7 +334,7 @@ const setUpConsoleProxy = (webServer, xo) => {
const registerPasswordAuthenticationProvider = (xo) => {
async function passwordAuthenticationProvider ({
email,
password,
password
}) {
/* eslint no-throw-literal: 0 */
@@ -355,7 +355,7 @@ const registerPasswordAuthenticationProvider = (xo) => {
const registerTokenAuthenticationProvider = (xo) => {
async function tokenAuthenticationProvider ({
token: tokenId,
token: tokenId
}) {
/* eslint no-throw-literal: 0 */

View File

@@ -525,24 +525,21 @@ export default class Xapi extends XapiBase {
// Creates the VDIs.
//
// TODO: set vm.suspend_SR
{
const {$default_SR: defaultSr} = this.pool
await Promise.all(map(vdis, (vdiDescription, i) => {
return this._createVdi(
vdiDescription.size,
{
name_label: vdiDescription.name_label,
name_description: vdiDescription.name_description,
sr: vdiDescription.sr || vdiDescription.SR
}
)
.then(ref => this._getOrWaitObject(ref))
.then(vdi => this._createVbd(vm, vdi, {
// Only the first VBD if installMethod is not cd is bootable.
bootable: installMethod !== 'cd' && !i
}))
}))
}
await Promise.all(map(vdis, (vdiDescription, i) => {
return this._createVdi(
vdiDescription.size,
{
name_label: vdiDescription.name_label,
name_description: vdiDescription.name_description,
sr: vdiDescription.sr || vdiDescription.SR
}
)
.then(ref => this._getOrWaitObject(ref))
.then(vdi => this._createVbd(vm, vdi, {
// Only the first VBD if installMethod is not cd is bootable.
bootable: installMethod !== 'cd' && !i
}))
}))
// Destroys the VIFs cloned from the template.
await Promise.all(map(vm.$vifs, vif => this._deleteVif(vif)))