Use Xapi#createVirtualInterface in vm.create().
This commit is contained in:
parent
aae65f8235
commit
6f163f2d01
@ -51,19 +51,9 @@ create = $coroutine ({
|
|||||||
# free device number.
|
# free device number.
|
||||||
deviceId = 0
|
deviceId = 0
|
||||||
yield Bluebird.all(map(VIFs, (VIF) =>
|
yield Bluebird.all(map(VIFs, (VIF) =>
|
||||||
network = @getObject VIF.network, 'network'
|
return xapi.createVirtualInterface(ref, VIF.network, {
|
||||||
|
position: deviceId++
|
||||||
return xapi.call 'VIF.create', {
|
})
|
||||||
|
|
||||||
device: String(deviceId++)
|
|
||||||
MAC: VIF.MAC ? ''
|
|
||||||
MTU: '1500'
|
|
||||||
network: network.ref
|
|
||||||
other_config: {}
|
|
||||||
qos_algorithm_params: {}
|
|
||||||
qos_algorithm_type: ''
|
|
||||||
VM: ref
|
|
||||||
}
|
|
||||||
))
|
))
|
||||||
|
|
||||||
# TODO: ? yield xapi.call 'VM.set_PV_args', ref, 'noninteractive'
|
# TODO: ? yield xapi.call 'VM.set_PV_args', ref, 'noninteractive'
|
||||||
|
Loading…
Reference in New Issue
Block a user