mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
merge?
This commit is contained in:
commit
8860fee293
2 files changed
+3
-17
No files matched your search
@@ -27,9 +27,6 @@ from xen.xend import sxp
|
||||
from xen.xend.server.DevController import DevController
|
||||
|
||||
|
||||
next_devid = 1
|
||||
|
||||
|
||||
class NetifController(DevController):
|
||||
"""Network interface controller. Handles all network devices for a domain.
|
||||
"""
|
||||
@@ -41,8 +38,6 @@ class NetifController(DevController):
|
||||
def getDeviceDetails(self, config):
|
||||
"""@see DevController.getDeviceDetails"""
|
||||
|
||||
global next_devid
|
||||
|
||||
from xen.xend import XendRoot
|
||||
xroot = XendRoot.instance()
|
||||
|
||||
@@ -52,9 +47,6 @@ class NetifController(DevController):
|
||||
val.append(sxp.child0(ipaddr))
|
||||
return val
|
||||
|
||||
devid = next_devid
|
||||
next_devid += 1
|
||||
|
||||
script = os.path.join(xroot.network_script_dir,
|
||||
sxp.child_value(config, 'script',
|
||||
xroot.get_vif_script()))
|
||||
@@ -63,6 +55,8 @@ class NetifController(DevController):
|
||||
mac = sxp.child_value(config, 'mac')
|
||||
ipaddr = _get_config_ipaddr(config)
|
||||
|
||||
devid = self.allocateDeviceID()
|
||||
|
||||
back = { 'script' : script,
|
||||
'mac' : mac,
|
||||
'bridge' : bridge,
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
from xen.xend.server.DevController import DevController
|
||||
|
||||
|
||||
next_devid = 1
|
||||
|
||||
|
||||
class UsbifController(DevController):
|
||||
"""USB device interface controller. Handles all USB devices
|
||||
for a domain.
|
||||
@@ -42,9 +39,4 @@ class UsbifController(DevController):
|
||||
def getDeviceDetails(self, _):
|
||||
"""@see DevController.getDeviceDetails"""
|
||||
|
||||
global next_devid
|
||||
|
||||
devid = next_devid
|
||||
next_devid += 1
|
||||
|
||||
return (devid, {}, {})
|
||||
return (self.allocateDeviceID(), {}, {})
|
||||