fix(Xapi#uploadPoolPatch): fix patch upload (#582)
Fixes vatesfr/xo-web#2254
This commit is contained in:
commit
b462f57060
@ -110,7 +110,7 @@
|
||||
"tmp": "^0.0.31",
|
||||
"uuid": "^3.0.1",
|
||||
"ws": "^3.0.0",
|
||||
"xen-api": "^0.13.5",
|
||||
"xen-api": "^0.13.6",
|
||||
"xml2js": "~0.4.17",
|
||||
"xo-acl-resolver": "^0.2.3",
|
||||
"xo-collection": "^0.4.1",
|
||||
|
@ -20,6 +20,7 @@ import {
|
||||
|
||||
import {
|
||||
debug,
|
||||
extractOpaqueRef,
|
||||
useUpdateSystem
|
||||
} from '../utils'
|
||||
|
||||
@ -211,18 +212,14 @@ export default {
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
// platform_version < 2.1.1 ----------------------------------------
|
||||
async uploadPoolPatch (stream, patchName = 'unknown') {
|
||||
const taskRef = await this.createTask('Patch upload', patchName)
|
||||
|
||||
const task = this.watchTask(taskRef)
|
||||
const [ patchRef ] = await Promise.all([
|
||||
task,
|
||||
this.putResource(stream, '/pool_patch_upload', {
|
||||
query: {
|
||||
task_id: taskRef
|
||||
}
|
||||
})
|
||||
])
|
||||
async uploadPoolPatch (stream, patchName) {
|
||||
const patchRef = await this.putResource(
|
||||
stream,
|
||||
'/pool_patch_upload',
|
||||
{
|
||||
task: this.createTask('Patch upload', patchName)
|
||||
}
|
||||
).then(extractOpaqueRef)
|
||||
|
||||
return this._getOrWaitObject(patchRef)
|
||||
},
|
||||
|
@ -7071,9 +7071,9 @@ xdg-basedir@^2.0.0:
|
||||
dependencies:
|
||||
os-homedir "^1.0.0"
|
||||
|
||||
xen-api@^0.13.5:
|
||||
version "0.13.5"
|
||||
resolved "https://registry.yarnpkg.com/xen-api/-/xen-api-0.13.5.tgz#4edcf1b9a83c87df2bd94e02e860aaef85796157"
|
||||
xen-api@^0.13.6:
|
||||
version "0.13.6"
|
||||
resolved "https://registry.yarnpkg.com/xen-api/-/xen-api-0.13.6.tgz#57916746026ccf48bad7fe9d426c646ac47008a4"
|
||||
dependencies:
|
||||
babel-polyfill "^6.23.0"
|
||||
blocked "^1.2.1"
|
||||
|
Loading…
Reference in New Issue
Block a user