'Revert a volume to snapshot.'

def revert_to_snapshot(self, volume, snapshot_id):

    post_body = {'snapshot_id': snapshot_id}
    post_body = json.dumps({'revert': post_body})
    (resp, body) = self.post(('volumes/%s/action' % volume['id']), post_body)
    return rest_client.ResponseBody(resp, body)
