)]}'
{"nova/scheduler/host_filter.py":[{"author":{"_account_id":236,"name":"Monsyne Dragon","email":"mdragon@rackspace.com","username":"mdragon"},"change_message_id":"d3b0c78b5b7258e50cf113c0134f7f3cef61f580","unresolved":false,"context_lines":[{"line_number":35,"context_line":"# NOTE(Vek): Even though we don\u0027t use filters in here anywhere, we"},{"line_number":36,"context_line":"#            depend on default_host_filter being available in FLAGS,"},{"line_number":37,"context_line":"#            and that happens only when filters/abstract_filter.py is"},{"line_number":38,"context_line":"#            imported."},{"line_number":39,"context_line":"from nova.scheduler import filters"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F9js%3D","line":38,"updated":"2011-10-04 00:06:27.000000000","message":"We should probably change this comment, since it\u0027s no longer relevant.","commit_id":"a8e9646e88432973168864d6bdc6302fb5288d66"},{"author":{"_account_id":236,"name":"Monsyne Dragon","email":"mdragon@rackspace.com","username":"mdragon"},"change_message_id":"d3b0c78b5b7258e50cf113c0134f7f3cef61f580","unresolved":false,"context_lines":[{"line_number":43,"context_line":"flags.DEFINE_string(\u0027default_host_filters\u0027, [\u0027AllHostsFilter\u0027],"},{"line_number":44,"context_line":"        \u0027Which filters to use for filtering hosts when not specified \u0027"},{"line_number":45,"context_line":"        \u0027in the request.\u0027)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def _get_filter_classes():"},{"line_number":49,"context_line":"    # Imported here to avoid circular imports"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F9jo%3D","line":46,"updated":"2011-10-04 00:06:27.000000000","message":"I think this flag should be DEFINE_list, or DEFINE_multistring, depending on which style you are looking for.  This is returning your default as a list only because gflags doesn\u0027t type-coerce it\u0027s defaults (which is arguably a bug in gflags) As it stands, you can\u0027t specify multiple filters in the flags file.","commit_id":"a8e9646e88432973168864d6bdc6302fb5288d66"},{"author":{"_account_id":236,"name":"Monsyne Dragon","email":"mdragon@rackspace.com","username":"mdragon"},"change_message_id":"d3b0c78b5b7258e50cf113c0134f7f3cef61f580","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    return [get_itm(itm) for itm in dir(filters)"},{"line_number":56,"context_line":"            if (type(get_itm(itm)) is types.TypeType)"},{"line_number":57,"context_line":"            and issubclass(get_itm(itm), filters.AbstractHostFilter)"},{"line_number":58,"context_line":"            and get_itm(itm) is not filters.AbstractHostFilter]"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def choose_host_filters(filters\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F9jk%3D","line":58,"updated":"2011-10-04 00:06:27.000000000","message":"I know this is pre-existing code, but this is fugly. Just a suggestion: \nHave a register(filter_class) function in nova.scheduler/filters/__init__.py\nthat adds the class to a module-level dict.  Filter classes could call .register(cls) after their class definition. (or you could use it as a decorator)  Then, an all_filters() function could return the .values() from the dictionary, and avoid this namespace walking.  Thus _get_filter_classes() goes away and is replaced by filters.all_filters()","commit_id":"a8e9646e88432973168864d6bdc6302fb5288d66"}]}
