def process(self):
        (opts, args) = getopts()
        chkopts(opts)
        self.up_progress(10)

        conn = KaresansuiVirtConnection(readonly=False)
        try:
            conn.set_domain_name(opts.name)

            self.up_progress(10)
            conn.guest.delete_disk(opts.target)
            self.up_progress(40)
            self.logger.info('Deleted disk device. - dom=%s target=%s' % (opts.name,opts.target))
            print >>sys.stdout, _('Deleted disk device. - dom=%s target=%s') % (opts.name, opts.target)

            return True
        finally:
            conn.close()
dataset/ETHPy150Open karesansui/karesansui/bin/delete_disk.py/DeleteDisk.process/original