WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Allow arbitrary values for the vif 'type'.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Allow arbitrary values for the vif 'type'.
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Thu, 28 Dec 2006 17:40:52 +0000
Delivery-date: Thu, 28 Dec 2006 09:39:32 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
# HG changeset patch
# User john.levon@xxxxxxx
# Date 1167320483 28800
# Node ID 40b0d73d9789e99d71ad5b46ee85faf85e09c21f
# Parent  48c66819eb6aa4512d984eee37d0e5afda928035
Allow arbitrary values for the vif 'type'.

Signed-off-by: David Edmondson <dme@xxxxxxx>

diff --git a/tools/python/xen/xend/server/netif.py 
b/tools/python/xen/xend/server/netif.py
--- a/tools/python/xen/xend/server/netif.py
+++ b/tools/python/xen/xend/server/netif.py
@@ -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 }
diff --git a/tools/python/xen/xm/create.py b/tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py
+++ b/tools/python/xen/xm/create.py
@@ -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.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Allow arbitrary values for the vif 'type'., John Levon <=