def delete(self, req, flavor_id, id):
        context = req.environ['nova.context']
        authorize(context, action='delete')
        flavor = common.get_flavor(context, flavor_id)

        try:
            del flavor.extra_specs[id]
            flavor.save()
        except (exception.FlavorNotFound,
                exception.FlavorExtraSpecsNotFound) as e:
            raise 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 exc.HTTPNotFound(explanation=msg)
Deletes an existing extra spec.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/openstack/compute/legacy_v2/contrib/flavorextraspecs.py/FlavorExtraSpecsController.delete