ia64/xen-unstable

changeset 13259:d03beab5e1ad

[XEND] Allow arbitrary values for the vif 'type'.
Signed-off-by: David Edmondson <dme@sun.com>
author kfraser@localhost.localdomain
date Thu Jan 04 15:58:20 2007 +0000 (2007-01-04)
parents 98dadb3df5ca
children cade632793b1
files tools/python/xen/xend/server/netif.py tools/python/xen/xm/create.py
line diff
     1.1 --- a/tools/python/xen/xend/server/netif.py	Thu Jan 04 15:50:08 2007 +0000
     1.2 +++ b/tools/python/xen/xend/server/netif.py	Thu Jan 04 15:58:20 2007 +0000
     1.3 @@ -150,16 +150,20 @@ class NetifController(DevController):
     1.4  
     1.5          devid = self.allocateDeviceID()
     1.6  
     1.7 +        # The default type is 'netfront'.
     1.8 +        if not typ:
     1.9 +            typ = 'netfront'
    1.10 +            
    1.11          if not mac:
    1.12              mac = randomMAC()
    1.13  
    1.14          back = { 'script' : script,
    1.15                   'mac'    : mac,
    1.16 -                 'handle' : "%i" % devid }
    1.17 +                 'handle' : "%i" % devid,
    1.18 +                 'type'   : typ }
    1.19  
    1.20          if typ == 'ioemu':
    1.21              front = {}
    1.22 -            back['type'] = 'ioemu'
    1.23          else:
    1.24              front = { 'handle' : "%i" % devid,
    1.25                        'mac'    : mac }
     2.1 --- a/tools/python/xen/xm/create.py	Thu Jan 04 15:50:08 2007 +0000
     2.2 +++ b/tools/python/xen/xm/create.py	Thu Jan 04 15:58:20 2007 +0000
     2.3 @@ -300,7 +300,7 @@ gopts.var('vif', val="type=TYPE,mac=MAC,
     2.4            fn=append_value, default=[],
     2.5            use="""Add a network interface with the given MAC address and bridge.
     2.6            The vif is configured by calling the given configuration script.
     2.7 -          If type is not specified, default is netfront not ioemu device.
     2.8 +          If type is not specified, default is netfront.
     2.9            If mac is not specified a random MAC address is used.
    2.10            If not specified then the network backend chooses it's own MAC address.
    2.11            If bridge is not specified the first bridge found is used.