Do not XO & XAPI objects.
This commit is contained in:
parent
898244d04d
commit
f9dd00b79b
@ -217,7 +217,7 @@ exports.createNetwork = createNetwork
|
||||
# Throws an error if the host is not running the latest XS version
|
||||
|
||||
listMissingPatches = $coroutine ({host}) ->
|
||||
return @getXAPI(host).listMissingHostPatches(host)
|
||||
return @getXAPI(host).listMissingPoolPatchesOnHost(host.id)
|
||||
|
||||
listMissingPatches.params = {
|
||||
host: { type: 'string' }
|
||||
|
11
src/xapi.js
11
src/xapi.js
@ -267,12 +267,17 @@ export default class Xapi extends XapiBase {
|
||||
|
||||
// =================================================================
|
||||
|
||||
async listMissingHostPatches (host) {
|
||||
async listMissingPoolPatchesOnHost (hostId) {
|
||||
const {
|
||||
software_version: {product_version: version},
|
||||
patches
|
||||
} = this.getObject(hostId)
|
||||
console.log
|
||||
return omit(
|
||||
(await this._getXenUpdates()).versions[host.version].patches,
|
||||
(await this._getXenUpdates()).versions[version].patches,
|
||||
|
||||
// TODO: simplify when we start to use xen-api >= 0.5
|
||||
map(host.patches, ref => {
|
||||
map(patches, ref => {
|
||||
const hostPatch = this.objects.all[this._refsToUuids[ref]]
|
||||
return this._refsToUuids[hostPatch.pool_patch]
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user