def _detach_volume(self, server, volume):
    'Helper method to detach a volume.\n\n        Ignores 404 responses if the volume or server do not exist, or the\n        volume is already detached from the server.\n        '
    try:
        volume = self.volumes_client.show_volume(volume['id'])['volume']
        if (volume['status'] == 'in-use'):
            self.servers_client.detach_volume(server['id'], volume['id'])
    except lib_exc.NotFound:
        pass
Helper method to detach a volume.

Ignores 404 responses if the volume or server do not exist, or the
volume is already detached from the server.
def _detach_volume(self, server, volume):
    'Helper method to detach a volume.\n\n        Ignores 404 responses if the volume or server do not exist, or the\n        volume is already detached from the server.\n        '
    try:
        volume = self.volumes_client.show_volume(volume['id'])['volume']
        if (volume['status'] == 'in-use'):
            self.servers_client.detach_volume(server['id'], volume['id'])
    except lib_exc.NotFound:
        pass