]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
qos: Delete bw limit rule when policy is deleted
authorJakub Libosvar <libosvar@redhat.com>
Tue, 18 Aug 2015 13:42:37 +0000 (13:42 +0000)
committerJakub Libosvar <libosvar@redhat.com>
Thu, 20 Aug 2015 14:01:41 +0000 (14:01 +0000)
commit20df8ce45f14d91633d46e08d5b28cd0006124ef
treef0c8cb4f8f76b82421ef99d3379d278bfe8e2748
parent737d853c195afa7d8f359f3e57da1a3bc8a9e76b
qos: Delete bw limit rule when policy is deleted

We need to add ON DELETE CASCADE to qos_policy_id on bw limit rule table
in order to delete policy successfully. There is a migration script that
creates db scheme with correct foreign key constraint but we miss this in
models. Currently, we have a functional test that guarantees parity
between migration scripts and models but we don't have guaranteed foreign
keys parity due to alembic bug [1].

https://bitbucket.org/zzzeek/alembic/issues/317

Change-Id: I06fa32dd11a5a52a80ae5a7952f8b32511c3f39d
Closes-Bug: 1485926
neutron/db/qos/models.py
neutron/tests/api/test_qos.py