Allow arbitrary values for the vif 'type'.
PATCH 1/1 Allow arbitrary values for the vif 'type'.
# HG changeset patch
# User [email protected]
# Date 1167320483 28800
# Node ID 40b0d73d9789e99d71ad5b46ee85faf85e09c21f # Parent 48c66819eb6aa4512d984eee37d0e5afda928035 Allow arbitrary values for the vif 'type'.
tools/python/xen/xend/server/netif.py +6 -2
@@ -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 }
tools/python/xen/xm/create.py +1 -1
@@ -300,7 +300,7 @@ gopts.var('vif', val="type=TYPE,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.
Quoted 6 lines · John Levon
# HG changeset patch
# User [email protected]
# Date 1167320483 28800
# Node ID40b0d73d9789e99d71ad5b46ee85faf85e09c21f# Parent48c66819eb6aa4512d984eee37d0e5afda928035Allow arbitrary values for the vif 'type'.
We need this change to support the way we're doing certain types of netif backends. Could somebody have a look?
thanks
john
Quoted 10 lines
Quoted 7 lines
# HG changeset patch
# User [email protected]
# Date 1167320483 28800
# Node ID40b0d73d9789e99d71ad5b46ee85faf85e09c21f# Parent48c66819eb6aa4512d984eee37d0e5afda928035Allow arbitrary values for the vif 'type'.We need this change to support the way we're doing certain types of netif backends. Could somebody have a look?
Applied now.
K.