'Delete the domain identified by id.'

@wsgi.Controller.api_version('2.1', MAX_PROXY_API_SUPPORT_VERSION)
@extensions.expected_errors((404, 501))
@wsgi.response(202)
def delete(self, req, id):

    context = req.environ['nova.context']
    context.can((fid_policies.POLICY_ROOT % 'domain:delete'))
    domain = _unquote_domain(id)
    try:
        self.network_api.delete_dns_domain(context, domain)
    except NotImplementedError:
        common.raise_feature_not_supported()
    except exception.NotFound as e:
        raise webob.exc.HTTPNotFound(explanation=e.format_message())
