<tt><font size=2>Joe Gordon <joe.gordon0@gmail.com> wrote on 28/08/2013
11:04:45 PM:<br>
>> Well, first, at the moment each of these filters today duplicate
the<br>
>> code that handles aggregate-based overrides. So, it would make
sense<br>
>> to have it in one place anyway. Second, why duplicating all the
<br>
>> filters if this can be done with a single flag? </font></tt>
<br><tt><font size=2>> <br>
> We already have too many flags, and i don't want to introduce one
<br>
> that we plan on removing / deprecating in the near future if we can
help it.</font></tt>
<br>
<br><tt><font size=2>Wouldn't it make sense to have a flag that enables/disables
aggregate-based policy overrides anyway?</font></tt>
<br>
<br><tt><font size=2>> </font></tt><a href=https://github.com/openstack/nova/blob/master/nova/scheduler/><tt><font size=2>https://github.com/openstack/nova/blob/master/nova/scheduler/</font></tt></a><tt><font size=2><br>
> filters/ram_filter.py doesn't duplicate all the code, it uses
a base<br>
> class. The check the aggregate for the value logic is duplicated,
<br>
> but that is easy to fix.</font></tt>
<br>
<br><tt><font size=2>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).</font></tt>
<br>
<br><tt><font size=2>Alex</font></tt>
<br>
<br>