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

[Xen-changelog] Removed unused Blkctl.py. The functionality here has been taken over by the



# HG changeset patch
# User emellor@ewan
# Node ID 9f50bd7a478fc138578ac95b41f3d306d0f0af4a
# Parent  ad0270abc9b96b382360899b63efca92c1026fc9
Removed unused Blkctl.py.  The functionality here has been taken over by the
new hotplug system.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r ad0270abc9b9 -r 9f50bd7a478f tools/python/xen/xend/Blkctl.py
--- a/tools/python/xen/xend/Blkctl.py   Fri Sep 23 15:57:13 2005
+++ /dev/null   Fri Sep 23 16:17:22 2005
@@ -1,43 +0,0 @@
-"""Xend interface to block control scripts.
-"""
-import os
-import os.path
-import sys
-import string
-import xen.util.process
-
-from xen.xend import XendRoot
-
-xroot = XendRoot.instance()
-
-"""Where network control scripts live."""
-SCRIPT_DIR = xroot.block_script_dir
-
-def block(op, type, dets, script=None):
-    """Call a block control script.
-    Xend calls this with op 'bind' when it is about to export a block device
-    (other than a raw partition).  The script is called with unbind when a
-    device is no longer in use and should be removed.
-
-    @param op:        operation (start, stop, status)
-    @param type:      type of block device (determines the script used)
-    @param dets:      arguments to the control script
-    @param script:    block script name
-    """
-    
-    if op not in ['bind', 'unbind']:
-        raise ValueError('Invalid operation:' + op)
-
-    # Special case phy devices - they don't require any (un)binding
-    # Parallax also doesn't need script-based binding.
-    if (type == 'phy') or (type == 'parallax'):
-        return dets
-    
-    if script is None:
-        script = xroot.get_block_script(type)
-    script = os.path.join(SCRIPT_DIR, script)
-    args = [op] + string.split(dets, ':')
-    args = ' '.join(args)
-    ret = xen.util.process.runscript(script + ' ' + args)
-    if len(ret):
-        return ret.splitlines()[0]

_______________________________________________
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®.