Joe Gordon <joe.gord...@gmail.com> wrote on 28/08/2013 11:04:45 PM: >> Well, first, at the moment each of these filters today duplicate the >> code that handles aggregate-based overrides. So, it would make sense >> to have it in one place anyway. Second, why duplicating all the >> filters if this can be done with a single flag? > > We already have too many flags, and i don't want to introduce one > that we plan on removing / deprecating in the near future if we can help it.
Wouldn't it make sense to have a flag that enables/disables aggregate-based policy overrides anyway? > https://github.com/openstack/nova/blob/master/nova/scheduler/ > filters/ram_filter.py doesn't duplicate all the code, it uses a base > class. The check the aggregate for the value logic is duplicated, > but that is easy to fix. Yep, that's exactly what I'm saying -- the first step would be to put that logic in one place (e.g., scheduler/utils.py, like the get_config method we have been thinking to introduce originally), and then we can easily reuse it in all the other filters (regardless of the decision whether to do it within the existing filters, or to add an "AggregateXYZ" filter for each existing filter XYZ. Same potentially for weight functions, etc). Alex
_______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev