feat(xen-api): add getRecordByUuid()

This commit is contained in:
Julien Fontanet 2018-08-21 17:49:37 +02:00
parent 41506e785e
commit 3e9425bf79

View File

@ -509,6 +509,13 @@ export class Xapi extends EventEmitter {
return record return record
} }
async getRecordByUuid (type, uuid) {
return this.getRecord(
type,
await this._sessionCall(`${type}.get_by_uuid`, [uuid])
)
}
@cancelable @cancelable
getResource ($cancelToken, pathname, { host, query, task }) { getResource ($cancelToken, pathname, { host, query, task }) {
return this._autoTask(task, `Xapi#getResource ${pathname}`).then( return this._autoTask(task, `Xapi#getResource ${pathname}`).then(