'Add or delete extra_specs.
:param:to_add: A dict of new keys to add/update
:param:to_delete: A list of keys to remove'

@base.remotable
def save_extra_specs(self, to_add=None, to_delete=None):

    if self.in_api:
        add_fn = self._flavor_extra_specs_add
        del_fn = self._flavor_extra_specs_del
        ident = self.id
    else:
        add_fn = db.flavor_extra_specs_update_or_create
        del_fn = db.flavor_extra_specs_delete
        ident = self.flavorid
    to_add = (to_add if (to_add is not None) else {})
    to_delete = (to_delete if (to_delete is not None) else [])
    if to_add:
        add_fn(self._context, ident, to_add)
    for key in to_delete:
        del_fn(self._context, ident, key)
    self.obj_reset_changes(['extra_specs'])
