ia64/xen-unstable

changeset 7050:9f50bd7a478f

Removed unused Blkctl.py. The functionality here has been taken over by the
new hotplug system.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Fri Sep 23 17:17:22 2005 +0100 (2005-09-23)
parents ad0270abc9b9
children 46f92c4fde1d 8874b5004ef4
files
line diff
     1.1 --- a/tools/python/xen/xend/Blkctl.py	Fri Sep 23 16:57:13 2005 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,43 +0,0 @@
     1.4 -"""Xend interface to block control scripts.
     1.5 -"""
     1.6 -import os
     1.7 -import os.path
     1.8 -import sys
     1.9 -import string
    1.10 -import xen.util.process
    1.11 -
    1.12 -from xen.xend import XendRoot
    1.13 -
    1.14 -xroot = XendRoot.instance()
    1.15 -
    1.16 -"""Where network control scripts live."""
    1.17 -SCRIPT_DIR = xroot.block_script_dir
    1.18 -
    1.19 -def block(op, type, dets, script=None):
    1.20 -    """Call a block control script.
    1.21 -    Xend calls this with op 'bind' when it is about to export a block device
    1.22 -    (other than a raw partition).  The script is called with unbind when a
    1.23 -    device is no longer in use and should be removed.
    1.24 -
    1.25 -    @param op:        operation (start, stop, status)
    1.26 -    @param type:      type of block device (determines the script used)
    1.27 -    @param dets:      arguments to the control script
    1.28 -    @param script:    block script name
    1.29 -    """
    1.30 -    
    1.31 -    if op not in ['bind', 'unbind']:
    1.32 -        raise ValueError('Invalid operation:' + op)
    1.33 -
    1.34 -    # Special case phy devices - they don't require any (un)binding
    1.35 -    # Parallax also doesn't need script-based binding.
    1.36 -    if (type == 'phy') or (type == 'parallax'):
    1.37 -        return dets
    1.38 -    
    1.39 -    if script is None:
    1.40 -        script = xroot.get_block_script(type)
    1.41 -    script = os.path.join(SCRIPT_DIR, script)
    1.42 -    args = [op] + string.split(dets, ':')
    1.43 -    args = ' '.join(args)
    1.44 -    ret = xen.util.process.runscript(script + ' ' + args)
    1.45 -    if len(ret):
    1.46 -        return ret.splitlines()[0]