fix(xapi/VIF_create): fetch power_state and MTU in parallel
This commit is contained in:
parent
39c10a7197
commit
f23fd69e7e
@ -35,9 +35,9 @@ export default class Vif {
|
||||
|
||||
const [powerState, ...rest] = await Promise.all([
|
||||
this.getField('VM', VM, 'power_state'),
|
||||
MTU ?? (await this.getField('network', network, 'MTU')),
|
||||
MTU ?? this.getField('network', network, 'MTU'),
|
||||
])
|
||||
;[device, MTU] = rest
|
||||
;[MTU] = rest
|
||||
|
||||
const vifRef = await this.call('VIF.create', {
|
||||
currently_attached: powerState === 'Suspended' ? currently_attached : undefined,
|
||||
|
Loading…
Reference in New Issue
Block a user