Minor fixes.
This commit is contained in:
parent
d32a18d965
commit
8e7830dd7d
@ -76,7 +76,7 @@
|
||||
"source-map-support": "^0.2.10",
|
||||
"then-redis": "~1.3.0",
|
||||
"ws": "~0.7.1",
|
||||
"xen-api": "^0.1.1",
|
||||
"xen-api": "^0.2.1",
|
||||
"xml2js": "~0.4.6",
|
||||
"xmlrpc": "~1.3.0"
|
||||
},
|
||||
|
@ -180,7 +180,13 @@ let apiHelpers = {
|
||||
// Handles both properties and wrapped models.
|
||||
let properties = server.properties || server;
|
||||
|
||||
return pick(properties, 'id', 'host', 'username');
|
||||
server = pick(properties, 'id', 'host', 'username');
|
||||
|
||||
// Injects connection status.
|
||||
const xapi = this._xapis[server.id]
|
||||
server.status = xapi ? xapi.status : 'disconnected'
|
||||
|
||||
return server
|
||||
},
|
||||
|
||||
throw(errorId, data) {
|
||||
|
@ -202,7 +202,7 @@ module.exports = ->
|
||||
@val.UUID = -> @genval.uuid
|
||||
@val.ref = -> @genval.$ref
|
||||
@val.poolRef = -> @genval.$pool.$ref
|
||||
@val.$poolId = -> @genval.$pool.id
|
||||
@val.$poolId = -> @genval.$pool.$id
|
||||
|
||||
# Main objects all can have associated messages and tags.
|
||||
if @name in ['host', 'pool', 'SR', 'VM', 'VM-controller']
|
||||
|
@ -302,7 +302,7 @@ class $XO extends $EventEmitter
|
||||
})
|
||||
)
|
||||
xapi.objects.on('update', (objects) =>
|
||||
@_xapis[xapi.pool.id] = xapi
|
||||
@_xapis[xapi.pool.$id] = xapi
|
||||
|
||||
@_xobjs.set(objects, {
|
||||
add: true,
|
||||
|
Loading…
Reference in New Issue
Block a user