Change the logic for deleting a record dns_domains.
Since keys are just the domain name, we need to be able to reuse them. That means we have to do a real record deletion to free up namespace rather than just mark the records as deleted. For blueprint public-and-private-dns. Change-Id: If47e961cf2cb977d297b506bd397f1a438499f18
This commit is contained in:
parent
12068866f7
commit
e763ffe6ea
@ -748,9 +748,9 @@ def dnsdomain_register_for_project(context, fqdomain, project):
|
||||
def dnsdomain_unregister(context, fqdomain):
|
||||
session = get_session()
|
||||
with session.begin():
|
||||
domain_ref = _dnsdomain_get(context, session, fqdomain)
|
||||
if domain_ref:
|
||||
domain_ref.delete(session=session)
|
||||
session.query(models.DNSDomain).\
|
||||
filter_by(domain=fqdomain).\
|
||||
delete()
|
||||
|
||||
|
||||
@require_context
|
||||
|
Loading…
x
Reference in New Issue
Block a user