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-changelog

[Xen-changelog] merge?

# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID c0c96a494c769254ca56bbc7373b0d95e7855168
# Parent  b5bf198f011383e4857978bd138b00ce8f76efe9
# Parent  adbe7d45472b3d5c775b0446c545fe694c1127d5
merge?

diff -r b5bf198f0113 -r c0c96a494c76 tools/python/xen/xend/server/netif.py
--- a/tools/python/xen/xend/server/netif.py     Mon Sep 19 13:23:22 2005
+++ b/tools/python/xen/xend/server/netif.py     Mon Sep 19 13:24:13 2005
@@ -27,9 +27,6 @@
 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 @@
     def getDeviceDetails(self, config):
         """@see DevController.getDeviceDetails"""
 
-        global next_devid
-
         from xen.xend import XendRoot
         xroot = XendRoot.instance()
 
@@ -52,9 +47,6 @@
                 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()))
@@ -62,6 +54,8 @@
                                  xroot.get_vif_bridge())
         mac = sxp.child_value(config, 'mac')
         ipaddr = _get_config_ipaddr(config)
+
+        devid = self.allocateDeviceID()
 
         back = { 'script' : script,
                  'mac' : mac,
diff -r b5bf198f0113 -r c0c96a494c76 tools/python/xen/xend/server/usbif.py
--- a/tools/python/xen/xend/server/usbif.py     Mon Sep 19 13:23:22 2005
+++ b/tools/python/xen/xend/server/usbif.py     Mon Sep 19 13:24:13 2005
@@ -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 @@
     def getDeviceDetails(self, _):
         """@see DevController.getDeviceDetails"""
 
-        global next_devid
-
-        devid = next_devid
-        next_devid += 1
-
-        return (devid, {}, {})
+        return (self.allocateDeviceID(), {}, {})

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

<Prev in Thread] Current Thread [Next in Thread>