This patch seems fixing this problem. But please ask to an sclalchemy specialist. Thanks. --- a/quantum/db/models_v2.py +++ b/quantum/db/models_v2.py @@ -65,7 +65,7 @@ class IPAllocationPool(model_base.BASEV2, HasId): last_ip = sa.Column(sa.String(64), nullable=False) available_ranges = orm.relationship(IPAvailabilityRange, backref='ipallocationpool', - lazy="dynamic") + lazy="dynamic", cascade='delete')
def __repr__(self): return "%s - %s" % (self.first_ip, self.last_ip) @@ -132,7 +132,7 @@ class Subnet(model_base.BASEV2, HasId, HasTenant): gateway_ip = sa.Column(sa.String(64)) allocation_pools = orm.relationship(IPAllocationPool, backref='subnet', - lazy="dynamic") + lazy="dynamic", cascade='delete') enable_dhcp = sa.Column(sa.Boolean()) dns_nameservers = orm.relationship(DNSNameServer, backref='subnet',
This patch seems fixing this problem. But please ask to an sclalchemy specialist. db/models_ v2.py db/models_ v2.py l(model_ base.BASEV2, HasId): sa.String( 64), nullable=False) ranges = orm.relationshi p(IPAvailabilit yRange,
backref= 'ipallocationpo ol',
Thanks.
--- a/quantum/
+++ b/quantum/
@@ -65,7 +65,7 @@ class IPAllocationPoo
last_ip = sa.Column(
available_
- lazy="dynamic")
+ lazy="dynamic", cascade='delete')
def __repr__(self): model_base. BASEV2, HasId, HasTenant): sa.String( 64)) _pools = orm.relationshi p(IPAllocationP ool,
backref= 'subnet' , sa.Boolean( )) nameservers = orm.relationshi p(DNSNameServer ,
backref= 'subnet' ,
return "%s - %s" % (self.first_ip, self.last_ip)
@@ -132,7 +132,7 @@ class Subnet(
gateway_ip = sa.Column(
allocation
- lazy="dynamic")
+ lazy="dynamic", cascade='delete')
enable_dhcp = sa.Column(
dns_