code: def flavor_extra_set(request, flavor_id, metadata):
      
      flavor = _nova.novaclient(request).flavors.get(flavor_id)
      if (not metadata):  # not a way to delete keys
          return None
      return flavor.set_keys(metadata)
docs: Set the flavor extra spec keys.