mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Solaris should used a netback of type 'SUNW_mac' and 'vif-vnic' as the
vif-script by default. Signed-off-by: David Edmondson <dme@sun.com>
This commit is contained in:
1 parent
674fb7f63e
commit
d5ff71aae1
3 files changed
+18
-3
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
@@ -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()
|
||||
|
||||