Code review comment for lp://qastaging/~ed-leafe/nova/scheduler-multifilter

Revision history for this message
Vish Ishaya (vishvananda) wrote :

I think you're looking for the one liner:

filters = request_spec.get('filter') or FLAGS.default_host_filters

unless you need to be able to pass an empty list to override default. In that case:

filters = request_spec.get('filter')
if filters is None:
    filters = FLAGS.default_host_filters

« Back to merge proposal