'Check that nova server lost attachment.
This check is needed for immediate reattachment when updating:
there might be some time between cinder marking volume as \'available\'
and nova removing attachment from its own objects, so we
check that nova already knows that the volume is detached.'

def check_detach_volume_complete(self, server_id, attach_id):

    try:
        self.client().volumes.get_server_volume(server_id, attach_id)
    except Exception as ex:
        self.ignore_not_found(ex)
        LOG.info('Volume    %(vol)s    is    detached    from    server    %(srv)s', {'vol': attach_id, 'srv': server_id})
        return True
    else:
        LOG.debug('Server    %(srv)s    still    has    attachment    %(att)s.', {'att': attach_id, 'srv': server_id})
        return False
