[XEND] Allow arbitrary values for the vif 'type'.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 4 Jan 2007 15:58:20 +0000 (15:58 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 4 Jan 2007 15:58:20 +0000 (15:58 +0000)
Signed-off-by: David Edmondson <dme@sun.com>
tools/python/xen/xend/server/netif.py
tools/python/xen/xm/create.py

index 92e5626ade471a580528cabb80b073270c729ff4..c229ed7b203db20661cbcb8a42d681764cef21b1 100644 (file)
@@ -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 }
index b603b922d63746fc41b87d57d8dbec8449fc1cd2..140b6f7749f4e091e27c1652d887c7c48bec350d 100644 (file)
@@ -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.