mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
[XEND] Allow arbitrary values for the vif 'type'.
Signed-off-by: David Edmondson <dme@sun.com>
This commit is contained in:
1 parent
a9aa1a0d29
commit
3a1c98ecfb
2 files changed
+7
-3
No files matched your search
@@ -150,16 +150,20 @@ class NetifController(DevController):
|
||||
|
||||
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 }
|
||||
|
||||
@@ -300,7 +300,7 @@ gopts.var('vif', val="type=TYPE,mac=MAC,bridge=BRIDGE,ip=IPADDR,script=SCRIPT,ba
|
||||
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.
|
||||
|
||||