'Detaches all volumes returned by self.attached_vols'

def detach_external_volumes(self):

    block_devs = self.attached_vols
    for dev in block_devs:
        vol_id = block_devs[dev].volume_id
        vol = self.ec2.get_volume(vol_id)
        log.info(('Detaching    volume    %s    from    %s' % (vol.id, self.alias)))
        if (vol.status not in ['available', 'detaching']):
            vol.detach()
