'Detaches a volume from an instance.'

def detach_volume(self, volume_id):

    post_body = json.dumps({'os-detach': {}})
    url = ('volumes/%s/action' % volume_id)
    (resp, body) = self.post(url, post_body)
    self.expected_success(202, resp.status)
    return rest_client.ResponseBody(resp, body)
