[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Solaris should used a netback of type 'SUNW_mac' and 'vif-vnic' as the



# HG changeset patch
# User john.levon@xxxxxxx
# Date 1169005449 28800
# Node ID 9447d715956ba7b996cc62bf9cf43606e69df3b5
# Parent  074170d7284c310b9b2b9acd6b9f671e83c400f1
Solaris should used a netback of type 'SUNW_mac' and 'vif-vnic' as the
vif-script by default.

Signed-off-by: David Edmondson <dme@xxxxxxx>
---
 tools/python/xen/xend/XendOptions.py  |    8 +++++++-
 tools/python/xen/xend/osdep.py        |   10 ++++++++++
 tools/python/xen/xend/server/netif.py |    3 +--
 3 files changed, 18 insertions(+), 3 deletions(-)

diff -r 074170d7284c -r 9447d715956b tools/python/xen/xend/XendOptions.py
--- a/tools/python/xen/xend/XendOptions.py      Thu Jan 18 15:07:51 2007 +0000
+++ b/tools/python/xen/xend/XendOptions.py      Tue Jan 16 19:44:09 2007 -0800
@@ -104,6 +104,12 @@ class XendOptions:
     """Default xend management state storage."""
     xend_state_path_default = '/var/lib/xend/state'
 
+    """Default type of backend network interfaces"""
+    netback_type = osdep.netback_type
+
+    """Default script to configure a backend network interface"""
+    vif_script = osdep.vif_script
+
     def __init__(self):
         self.configure()
 
@@ -228,7 +234,7 @@ class XendOptions:
         return self.get_config_bool('enable-dump', 'no')
 
     def get_vif_script(self):
-        return self.get_config_string('vif-script', 'vif-bridge')
+        return self.get_config_string('vif-script', self.vif_script)
 
     def get_dom0_min_mem(self):
         return self.get_config_int('dom0-min-mem', self.dom0_min_mem_default)
diff -r 074170d7284c -r 9447d715956b tools/python/xen/xend/osdep.py
--- a/tools/python/xen/xend/osdep.py    Thu Jan 18 15:07:51 2007 +0000
+++ b/tools/python/xen/xend/osdep.py    Tue Jan 16 19:44:09 2007 -0800
@@ -33,9 +33,19 @@ _pygrub_path = {
     "SunOS": "/usr/lib/xen/bin/pygrub"
 }
 
+_netback_type = {
+    "SunOS": "SUNW_mac"
+}
+
+_vif_script = {
+    "SunOS": "vif-vnic"
+}
+
 def _get(var, default=None):
     return var.get(os.uname()[0], default)
 
 scripts_dir = _get(_scripts_dir, "/etc/xen/scripts")
 xend_autorestart = _get(_xend_autorestart)
 pygrub_path = _get(_pygrub_path, "/usr/bin/pygrub")
+netback_type = _get(_netback_type, "netfront")
+vif_script = _get(_vif_script, "vif-bridge")
diff -r 074170d7284c -r 9447d715956b tools/python/xen/xend/server/netif.py
--- a/tools/python/xen/xend/server/netif.py     Thu Jan 18 15:07:51 2007 +0000
+++ b/tools/python/xen/xend/server/netif.py     Tue Jan 16 19:44:09 2007 -0800
@@ -150,9 +150,8 @@ class NetifController(DevController):
 
         devid = self.allocateDeviceID()
 
-        # The default type is 'netfront'.
         if not typ:
-            typ = 'netfront'
+            typ = xoptions.netback_type
             
         if not mac:
             mac = randomMAC()

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.