Ejemplo n.º 1
0
def delete_route(context, id):
    #TODO(mdietz): This is probably where we check to see that someone is
    #              admin and only filter on tenant if they aren't. Correct
    #              for all the above later
    LOG.info("delete_route %s for tenant %s" % (id, context.tenant_id))
    route = db_api.route_find(context, id, scope=db_api.ONE)
    if not route:
        raise quark_exceptions.RouteNotFound(route_id=id)
    db_api.route_delete(context, route)
Ejemplo n.º 2
0
def get_route(context, id):
    LOG.info("get_route %s for tenant %s" % (id, context.tenant_id))
    route = db_api.route_find(context, id=id, scope=db_api.ONE)
    if not route:
        raise quark_exceptions.RouteNotFound(route_id=id)
    return v._make_route_dict(route)