'Delete target from host.'

def delete_target(self):

    cmd = 'tgtadm    --lld    iscsi    --mode    target    --op    show'
    output = utils.system_output(cmd)
    if re.findall(('%s$' % self.target), output, re.M):
        if self.emulated_id:
            cmd = 'tgtadm    --lld    iscsi    --mode    target    --op    delete    '
            cmd += ('--tid    %s' % self.emulated_id)
            utils.system(cmd)
