'Deletes an existing extra spec.'

@extensions.expected_errors(404)
def delete(self, req, flavor_id, id):

    context = req.environ['nova.context']
    context.can((fes_policies.POLICY_ROOT % 'delete'))
    flavor = common.get_flavor(context, flavor_id)
    try:
        del flavor.extra_specs[id]
        flavor.save()
    except (exception.FlavorExtraSpecsNotFound, exception.FlavorNotFound) as e:
        raise webob.exc.HTTPNotFound(explanation=e.format_message())
    except KeyError:
        msg = (_('Flavor    %(flavor_id)s    has    no    extra    specs    with    key    %(key)s.') % dict(flavor_id=flavor_id, key=id))
        raise webob.exc.HTTPNotFound(explanation=msg)
