use get dedicated call to avoid confusions between UUIDs and Refs

This commit is contained in:
Olivier Lambert
2015-04-01 21:54:34 +02:00
parent 771c530b85
commit 71194d5b4e

View File

@@ -187,8 +187,8 @@ createNetwork = $coroutine ({host, name, description, pif, mtu, vlan}) ->
if pif?
vlan = vlan ? '0'
pifRef = $wait xapi.call 'PIF.get_by_uuid', pif
$wait xapi.call 'pool.create_VLAN_from_PIF', pifRef, network_ref, vlan
pif = @getObject pif, 'PIF'
$wait xapi.call 'pool.create_VLAN_from_PIF', pif.ref, network_ref, vlan
return true