commit
8dbf334208
17
.babelrc
17
.babelrc
@ -1,15 +1,12 @@
|
||||
{
|
||||
"comments": false,
|
||||
"compact": true,
|
||||
"optional": [
|
||||
// Experimental features.
|
||||
// "minification.constantFolding",
|
||||
// "minification.deadCodeElimination",
|
||||
|
||||
"es7.asyncFunctions",
|
||||
"es7.decorators",
|
||||
"es7.exportExtensions",
|
||||
"es7.functionBind",
|
||||
"runtime"
|
||||
"plugins": [
|
||||
"transform-decorators-legacy",
|
||||
"transform-runtime"
|
||||
],
|
||||
"presets": [
|
||||
"stage-0",
|
||||
"es2015"
|
||||
]
|
||||
}
|
||||
|
2
index.js
2
index.js
@ -8,4 +8,4 @@ if (process.env.DEBUG === undefined) {
|
||||
}
|
||||
|
||||
// Import the real main module.
|
||||
module.exports = require('./dist')
|
||||
module.exports = require('./dist').default
|
||||
|
10
package.json
10
package.json
@ -36,7 +36,7 @@
|
||||
"dependencies": {
|
||||
"@marsaud/smb2-promise": "^0.2.0",
|
||||
"app-conf": "^0.4.0",
|
||||
"babel-runtime": "^5",
|
||||
"babel-runtime": "^6.5.0",
|
||||
"base64url": "^1.0.5",
|
||||
"blocked": "^1.1.0",
|
||||
"bluebird": "^3.1.1",
|
||||
@ -131,12 +131,16 @@
|
||||
"xo-remote-parser": "^0.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-eslint": "^4.0.10",
|
||||
"babel-eslint": "^5.0.0",
|
||||
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
||||
"babel-plugin-transform-runtime": "^6.5.2",
|
||||
"babel-preset-es2015": "^6.5.0",
|
||||
"babel-preset-stage-0": "^6.5.0",
|
||||
"chai": "^3.0.0",
|
||||
"dependency-check": "^2.4.0",
|
||||
"ghooks": "^1.0.3",
|
||||
"gulp": "git://github.com/gulpjs/gulp#4.0",
|
||||
"gulp-babel": "^5",
|
||||
"gulp-babel": "^6",
|
||||
"gulp-coffee": "^2.3.1",
|
||||
"gulp-plumber": "^1.0.0",
|
||||
"gulp-sourcemaps": "^1.5.1",
|
||||
|
10
src/xapi.js
10
src/xapi.js
@ -1122,25 +1122,24 @@ export default class Xapi extends XapiBase {
|
||||
}
|
||||
|
||||
// Modify existing (previous template) disks if necessary
|
||||
const this_ = this // Work around http://phabricator.babeljs.io/T7172
|
||||
existingVdis && await Promise.all(mapToArray(existingVdis, async ({ size, $SR: srId, ...properties }, userdevice) => {
|
||||
const vbd = find(vm.$VBDs, { userdevice })
|
||||
if (!vbd) {
|
||||
return
|
||||
}
|
||||
const vdi = vbd.$VDI
|
||||
await this_._setObjectProperties(vdi, properties)
|
||||
await this._setObjectProperties(vdi, properties)
|
||||
|
||||
// if the disk is bigger
|
||||
if (
|
||||
size != null &&
|
||||
size > vdi.virtual_size
|
||||
) {
|
||||
await this_.resizeVdi(vdi.$id, size)
|
||||
await this.resizeVdi(vdi.$id, size)
|
||||
}
|
||||
// if another SR is set, move it there
|
||||
if (srId) {
|
||||
await this_.moveVdi(vdi.$id, srId)
|
||||
await this.moveVdi(vdi.$id, srId)
|
||||
}
|
||||
}))
|
||||
|
||||
@ -1569,8 +1568,7 @@ export default class Xapi extends XapiBase {
|
||||
{}
|
||||
)
|
||||
|
||||
const this_ = this
|
||||
const loop = () => this_.call(
|
||||
const loop = () => this.call(
|
||||
'VM.migrate_send',
|
||||
vm.$ref,
|
||||
token,
|
||||
|
Loading…
Reference in New Issue
Block a user