This commit is contained in:
cl349@firebug.cl.cam.ac.uk committed 2005-09-19 13:24:13 +00:00
commit 8860fee293
2 files changed
+3 -17

No files matched your search

+2 -8
View File
@@ -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,
+1 -9
View File
@@ -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(), {}, {})
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.