Ejemplo n.º 1
0
def delete_ip_policy(context, id):
    LOG.info("delete_ip_policy %s for tenant %s" % (id, context.tenant_id))
    with context.session.begin():
        ipp = db_api.ip_policy_find(context, id=id, scope=db_api.ONE)
        if not ipp:
            raise q_exc.IPPolicyNotFound(id=id)
        if ipp["networks"] or ipp["subnets"]:
            raise q_exc.IPPolicyInUse(id=id)
        db_api.ip_policy_delete(context, ipp)
Ejemplo n.º 2
0
def delete_ip_policy(context, id):
    LOG.info("delete_ip_policy %s for tenant %s" % (id, context.tenant_id))
    with context.session.begin():
        ipp = db_api.ip_policy_find(context, id=id, scope=db_api.ONE)
        if not ipp:
            raise quark_exceptions.IPPolicyNotFound(id=id)
        if ipp["networks"] or ipp["subnets"]:
            raise quark_exceptions.IPPolicyInUse(id=id)
        db_api.ip_policy_delete(context, ipp)
Ejemplo n.º 3
0
def delete_ip_policy(context, id):
    LOG.info("delete_ip_policy %s for tenant %s" % (id, context.tenant_id))
    ipp = db_api.ip_policy_find(context, id=id, scope=db_api.ONE)
    if not ipp:
        raise quark_exceptions.IPPolicyNotFound(id=id)
    db_api.ip_policy_delete(context, ipp)
Ejemplo n.º 4
0
def delete_ip_policy(context, id):
    LOG.info("delete_ip_policy %s for tenant %s" % (id, context.tenant_id))
    ipp = db_api.ip_policy_find(context, id=id, scope=db_api.ONE)
    if not ipp:
        raise quark_exceptions.IPPolicyNotFound(id=id)
    db_api.ip_policy_delete(context, ipp)