devid = self.allocateDeviceID()
+ # The default type is 'netfront'.
+ if not typ:
+ typ = 'netfront'
+
if not mac:
mac = randomMAC()
back = { 'script' : script,
'mac' : mac,
- 'handle' : "%i" % devid }
+ 'handle' : "%i" % devid,
+ 'type' : typ }
if typ == 'ioemu':
front = {}
- back['type'] = 'ioemu'
else:
front = { 'handle' : "%i" % devid,
'mac' : mac }
fn=append_value, default=[],
use="""Add a network interface with the given MAC address and bridge.
The vif is configured by calling the given configuration script.
- If type is not specified, default is netfront not ioemu device.
+ If type is not specified, default is netfront.
If mac is not specified a random MAC address is used.
If not specified then the network backend chooses it's own MAC address.
If bridge is not specified the first bridge found is used.