)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":1812,"name":"p-draigbrady","email":"P@draigBrady.com","username":"p-draigbrady"},"change_message_id":"36a635ca026c8b57fecd240b73527f85256c6fc7","unresolved":false,"context_lines":[{"line_number":408,"context_line":"                      instance_uuid\u003dinstance_uuid)"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def _get_instances_on_driver(self, context, filters\u003dNone,"},{"line_number":411,"context_line":"                                 columns_to_join\u003d[]):"},{"line_number":412,"context_line":"        \"\"\"Return a list of instance records for the instances found"},{"line_number":413,"context_line":"        on the hypervisor which satisfy the specified filters. If filters\u003dNone"},{"line_number":414,"context_line":"        return a list of instance records for all the instances found on the"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPX%2F%2Fm%2FM%3D","line":411,"updated":"2013-06-14 13:34:30.000000000","message":"default_arg\u003d[] in a function definition is problematic as the list is only initialized once, not per call. We probably need to set that to None in the, and then in the function body:\n\n  if columns_to_join is None:\n      columns_to_join\u003d[]","commit_id":"2b0805c8ce6d14c83b057e808a76e89cc78107f9"},{"author":{"_account_id":1882,"name":"dave-mcnally","email":"dave.mcnally@hpe.com","username":"dave-mcnally"},"change_message_id":"eeb4e11777f9f46b33498833869e7dd5150f2a8c","unresolved":false,"context_lines":[{"line_number":408,"context_line":"                      instance_uuid\u003dinstance_uuid)"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def _get_instances_on_driver(self, context, filters\u003dNone,"},{"line_number":411,"context_line":"                                 columns_to_join\u003d[]):"},{"line_number":412,"context_line":"        \"\"\"Return a list of instance records for the instances found"},{"line_number":413,"context_line":"        on the hypervisor which satisfy the specified filters. If filters\u003dNone"},{"line_number":414,"context_line":"        return a list of instance records for all the instances found on the"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPX%2F%2Fm9U%3D","line":411,"in_reply_to":"AAAAPX%2F%2Fm%2FM%3D","updated":"2013-06-14 13:43:54.000000000","message":"You\u0027re probably right it needs to be altered but if a call wants to use an empty list it will have to specify explicitly since the logic in instance_get_all_by_filters will treat None and [] differently.\n\nI don\u0027t think there are many calls to this function, I\u0027ll upload a change in a bit.","commit_id":"2b0805c8ce6d14c83b057e808a76e89cc78107f9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"594dcd8706b9198a5d16a5d6a5de89d303b62cce","unresolved":false,"context_lines":[{"line_number":452,"context_line":"        our_host \u003d self.host"},{"line_number":453,"context_line":"        filters \u003d {\u0027deleted\u0027: False}"},{"line_number":454,"context_line":"        local_instances \u003d self._get_instances_on_driver(context, filters,"},{"line_number":455,"context_line":"                                                        columns_to_join\u003d[])"},{"line_number":456,"context_line":"        for instance in local_instances:"},{"line_number":457,"context_line":"            instance_host \u003d instance[\u0027host\u0027]"},{"line_number":458,"context_line":"            if instance_host !\u003d our_host:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2FoWI%3D","line":455,"updated":"2013-06-26 12:30:37.000000000","message":"Should this not be columns_to_join\u003dNone?","commit_id":"c7bfc957d511dfd9df93df7d556f428bb62a340f"},{"author":{"_account_id":1882,"name":"dave-mcnally","email":"dave.mcnally@hpe.com","username":"dave-mcnally"},"change_message_id":"5000d1f8339cc7623277a2e61941d36dc57e7628","unresolved":false,"context_lines":[{"line_number":452,"context_line":"        our_host \u003d self.host"},{"line_number":453,"context_line":"        filters \u003d {\u0027deleted\u0027: False}"},{"line_number":454,"context_line":"        local_instances \u003d self._get_instances_on_driver(context, filters,"},{"line_number":455,"context_line":"                                                        columns_to_join\u003d[])"},{"line_number":456,"context_line":"        for instance in local_instances:"},{"line_number":457,"context_line":"            instance_host \u003d instance[\u0027host\u0027]"},{"line_number":458,"context_line":"            if instance_host !\u003d our_host:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2FoJ4%3D","line":455,"in_reply_to":"AAAAPn%2F%2FoWI%3D","updated":"2013-06-26 13:29:42.000000000","message":"It\u0027s not necessary here. _get_instance_nw_info (called from this function) does require the system_metadata but it retrieves it itself if it isn\u0027t present unlike the error the bug highlights where a function expects system_metadata to be present without checking. \nHaving looked at it again though I think it might not hurt to change it anyway. The idea behind setting columns_to_join\u003d[] is to make for a lighter DB query but here   it just results in a second query to get the metadata anyway so in the interest of reducing DB calls I think I\u0027ll make the change.","commit_id":"c7bfc957d511dfd9df93df7d556f428bb62a340f"}]}
