)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"2e4094a865461cf89f3196e75e948e6da89fb65c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Alejandro Emanuel Paredes \u003calejandro.e.paredes@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-03-11 18:31:43 -0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Improve handle method, add missing unit tests."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add update conditions to the handle method (remove"},{"line_number":10,"context_line":"and add hosts)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAWH%2F%2FKkY%3D","line":7,"updated":"2014-03-19 19:40:53.000000000","message":"Would be better to mention Host Aggregates here.","commit_id":"907fdfb11c6eae2baabcb77cd01774bad54712ed"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"cfcd86718dea65ca8868570cd0fea3117f8dba4d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Improve Host Aggregates handle method."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add update conditions to the handle method (remove"},{"line_number":10,"context_line":"and add hosts)."},{"line_number":11,"context_line":"Added missing unit test on the update."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I52acdd1226be504cf2d0cf029353dbf80e4aa01a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAWH%2F9vgw%3D","line":10,"updated":"2014-04-02 12:57:44.000000000","message":"Hopefully it would be nice to describe what is changed more clearly. For example:\n\n  In this patch host aggregate update only add/remove changed hosts.\n  Previously all existing hosts are removed first and then all new hosts are added.","commit_id":"f26c3f4de186b901bb6006b425325444d1859a24"},{"author":{"_account_id":9313,"name":"alejandro emanuel paredes","email":"alejandro.e.paredes@intel.com","username":"aeparede"},"change_message_id":"fb3fac884089ebd0cdac3018cbae6585e336504c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Improve Host Aggregates handle method."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add update conditions to the handle method (remove"},{"line_number":10,"context_line":"and add hosts)."},{"line_number":11,"context_line":"Added missing unit test on the update."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I52acdd1226be504cf2d0cf029353dbf80e4aa01a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAWH%2F9lFE%3D","line":10,"in_reply_to":"AAAAWH%2F9vgw%3D","updated":"2014-04-03 15:27:24.000000000","message":"Yeah, having a detailed explanation here will definitely make easier to understand what have been done on this patch. Txs!","commit_id":"f26c3f4de186b901bb6006b425325444d1859a24"}],"openstack_dashboard/dashboards/admin/aggregates/tests.py":[{"author":{"_account_id":6914,"name":"Tatiana Ovchinnikova","email":"t.v.ovtchinnikova@gmail.com","username":"tmazur"},"change_message_id":"effe51e689505a50ed62e735013322d79ee52014","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    @test.create_stubs({api.nova: (\u0027aggregate_get\u0027, \u0027add_host_to_aggregate\u0027,"},{"line_number":236,"context_line":"                                   \u0027host_list\u0027)})"},{"line_number":237,"context_line":"    def test_manage_hosts_update_add_empty_aggregate(self):"},{"line_number":238,"context_line":"        aggregate \u003d self.aggregates.first()"},{"line_number":239,"context_line":"        aggregate.hosts \u003d []"},{"line_number":240,"context_line":"        host \u003d self.hosts.list()[0]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2BB7c%3D","line":237,"updated":"2014-03-31 12:51:39.000000000","message":"It seems that at least three tests below use almost the same code. IMO it would be more convenient and more readable to add an internal method \"_test_manage_hosts_update...\" for this and then use it in all these tests.","commit_id":"322578018fed2f77aca1265f3cc0ae499fa77038"},{"author":{"_account_id":9313,"name":"alejandro emanuel paredes","email":"alejandro.e.paredes@intel.com","username":"aeparede"},"change_message_id":"9fa1ab2c002ed5de58556c80238e1a6c76d4dcac","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    @test.create_stubs({api.nova: (\u0027aggregate_get\u0027, \u0027add_host_to_aggregate\u0027,"},{"line_number":236,"context_line":"                                   \u0027host_list\u0027)})"},{"line_number":237,"context_line":"    def test_manage_hosts_update_add_empty_aggregate(self):"},{"line_number":238,"context_line":"        aggregate \u003d self.aggregates.first()"},{"line_number":239,"context_line":"        aggregate.hosts \u003d []"},{"line_number":240,"context_line":"        host \u003d self.hosts.list()[0]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F9%2BeU%3D","line":237,"in_reply_to":"AAAAWH%2F%2BB7c%3D","updated":"2014-03-31 20:05:37.000000000","message":"Done. Could you review the next patch to see if they are more readable?\nThanks!","commit_id":"322578018fed2f77aca1265f3cc0ae499fa77038"},{"author":{"_account_id":6914,"name":"Tatiana Ovchinnikova","email":"t.v.ovtchinnikova@gmail.com","username":"tmazur"},"change_message_id":"effe51e689505a50ed62e735013322d79ee52014","unresolved":false,"context_lines":[{"line_number":329,"context_line":"    @test.create_stubs({api.nova: (\u0027aggregate_get\u0027, \u0027add_host_to_aggregate\u0027,"},{"line_number":330,"context_line":"                                   \u0027remove_host_from_aggregate\u0027,"},{"line_number":331,"context_line":"                                   \u0027host_list\u0027)})"},{"line_number":332,"context_line":"    def test_manage_hosts_update_nothing_not_empty_aggregate(self):"},{"line_number":333,"context_line":"        aggregate \u003d self.aggregates.first()"},{"line_number":334,"context_line":"        host \u003d self.hosts.list()[0]"},{"line_number":335,"context_line":"        aggregate.hosts \u003d [host.host_name]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2BB6s%3D","line":332,"updated":"2014-03-31 12:51:39.000000000","message":"Same suggestion here.","commit_id":"322578018fed2f77aca1265f3cc0ae499fa77038"},{"author":{"_account_id":9313,"name":"alejandro emanuel paredes","email":"alejandro.e.paredes@intel.com","username":"aeparede"},"change_message_id":"9fa1ab2c002ed5de58556c80238e1a6c76d4dcac","unresolved":false,"context_lines":[{"line_number":329,"context_line":"    @test.create_stubs({api.nova: (\u0027aggregate_get\u0027, \u0027add_host_to_aggregate\u0027,"},{"line_number":330,"context_line":"                                   \u0027remove_host_from_aggregate\u0027,"},{"line_number":331,"context_line":"                                   \u0027host_list\u0027)})"},{"line_number":332,"context_line":"    def test_manage_hosts_update_nothing_not_empty_aggregate(self):"},{"line_number":333,"context_line":"        aggregate \u003d self.aggregates.first()"},{"line_number":334,"context_line":"        host \u003d self.hosts.list()[0]"},{"line_number":335,"context_line":"        aggregate.hosts \u003d [host.host_name]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F9%2BeM%3D","line":332,"in_reply_to":"AAAAWH%2F%2BB6s%3D","updated":"2014-03-31 20:05:37.000000000","message":"Done. Could you review the next patch to see if they are more readable?\nThanks!","commit_id":"322578018fed2f77aca1265f3cc0ae499fa77038"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7a9f58ae3dd097aefb89ee2dcb37c14c4dd4a87e","unresolved":false,"context_lines":[{"line_number":240,"context_line":"    def test_manage_hosts_update_add_remove_not_empty_aggregate(self):"},{"line_number":241,"context_line":"        aggregate \u003d self.aggregates.first()"},{"line_number":242,"context_line":"        aggregate.hosts \u003d [\u0027host1\u0027, \u0027host2\u0027]"},{"line_number":243,"context_line":"        host \u003d self.hosts.list()[0]"},{"line_number":244,"context_line":"        form_data \u003d {\u0027manageaggregatehostsaction_role_member\u0027:"},{"line_number":245,"context_line":"                     [host.host_name]}"},{"line_number":246,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F9kC0%3D","line":243,"updated":"2014-04-03 16:59:59.000000000","message":"(suggestion only) list()[0] can be first().","commit_id":"8f4331a6bdc12bb7632f2d170cc94176e0897fbf"}],"openstack_dashboard/dashboards/admin/aggregates/workflows.py":[{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"f1177679ffca0d3e759f35671978e9a962666edf","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        aggregate_hosts \u003d aggregate.hosts"},{"line_number":227,"context_line":"        try:"},{"line_number":228,"context_line":"            for host in aggregate_hosts:"},{"line_number":229,"context_line":"                if host not in hosts_aggregate:"},{"line_number":230,"context_line":"                    api.nova.remove_host_from_aggregate(request,"},{"line_number":231,"context_line":"                                                        aggregate_id,"},{"line_number":232,"context_line":"                                                        host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BwAY%3D","line":229,"updated":"2014-03-24 16:24:00.000000000","message":"This is really confusing, hosts_aggregate and aggregate_hosts are too similar. We should name it better. Perhaps something like, hosts_aggregate_context or current_aggregate_hosts will make it clearer.","commit_id":"9a17873823f8767775ff08aa9dc0787847daa79a"},{"author":{"_account_id":9313,"name":"alejandro emanuel paredes","email":"alejandro.e.paredes@intel.com","username":"aeparede"},"change_message_id":"93732999838d5596860859760abaceb6ed55f12d","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        aggregate_hosts \u003d aggregate.hosts"},{"line_number":227,"context_line":"        try:"},{"line_number":228,"context_line":"            for host in aggregate_hosts:"},{"line_number":229,"context_line":"                if host not in hosts_aggregate:"},{"line_number":230,"context_line":"                    api.nova.remove_host_from_aggregate(request,"},{"line_number":231,"context_line":"                                                        aggregate_id,"},{"line_number":232,"context_line":"                                                        host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BeRA%3D","line":229,"in_reply_to":"AAAAWH%2F%2BwAY%3D","updated":"2014-03-26 15:14:53.000000000","message":"Thanks, changed...","commit_id":"9a17873823f8767775ff08aa9dc0787847daa79a"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"b4e5c2ff0566d917c9fa7e883b66c850d47a55d7","unresolved":false,"context_lines":[{"line_number":233,"context_line":"            for host in context_hosts_aggregate:"},{"line_number":234,"context_line":"                if host not in current_aggregate_hosts:"},{"line_number":235,"context_line":"                    api.nova.add_host_to_aggregate(request, aggregate_id, host)"},{"line_number":236,"context_line":"        except Exception:"},{"line_number":237,"context_line":"            return False"},{"line_number":238,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BWiQ%3D","line":236,"updated":"2014-03-27 13:04:47.000000000","message":"We should do something with the exception here, log it if nothing else. I\u0027m not sure why the exception.handle() was removed?","commit_id":"800c0c64d6ec07fbc52fa08d046df5b409679bf3"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"a4a1318376168ba7314868dfc16c11bdf63620dd","unresolved":false,"context_lines":[{"line_number":233,"context_line":"            for host in context_hosts_aggregate:"},{"line_number":234,"context_line":"                if host not in current_aggregate_hosts:"},{"line_number":235,"context_line":"                    api.nova.add_host_to_aggregate(request, aggregate_id, host)"},{"line_number":236,"context_line":"        except Exception:"},{"line_number":237,"context_line":"            return False"},{"line_number":238,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BVz4%3D","line":236,"in_reply_to":"AAAAWH%2F%2BV2c%3D","updated":"2014-03-27 14:44:03.000000000","message":"I\u0027m not sure, if I test with ignore\u003dTrue it doesn\u0027t seem that the error makes it into the logs at all, which isn\u0027t good. Well spotted on the double error message otherwise! I think perhaps in this case simply adding a logger to store the exception is enough. If you grep for LOG you\u0027ll find examples in the codebase. Thanks!","commit_id":"800c0c64d6ec07fbc52fa08d046df5b409679bf3"},{"author":{"_account_id":9313,"name":"alejandro emanuel paredes","email":"alejandro.e.paredes@intel.com","username":"aeparede"},"change_message_id":"d335d2c2f41575a36b45e89187b9bd6dc7ea3d54","unresolved":false,"context_lines":[{"line_number":233,"context_line":"            for host in context_hosts_aggregate:"},{"line_number":234,"context_line":"                if host not in current_aggregate_hosts:"},{"line_number":235,"context_line":"                    api.nova.add_host_to_aggregate(request, aggregate_id, host)"},{"line_number":236,"context_line":"        except Exception:"},{"line_number":237,"context_line":"            return False"},{"line_number":238,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BT2U%3D","line":236,"in_reply_to":"AAAAWH%2F%2BVz4%3D","updated":"2014-03-27 17:41:10.000000000","message":"Done, thanks Julie!","commit_id":"800c0c64d6ec07fbc52fa08d046df5b409679bf3"},{"author":{"_account_id":9313,"name":"alejandro emanuel paredes","email":"alejandro.e.paredes@intel.com","username":"aeparede"},"change_message_id":"95c5478eb47361c93c8976d0d73a5303e5d65cf6","unresolved":false,"context_lines":[{"line_number":233,"context_line":"            for host in context_hosts_aggregate:"},{"line_number":234,"context_line":"                if host not in current_aggregate_hosts:"},{"line_number":235,"context_line":"                    api.nova.add_host_to_aggregate(request, aggregate_id, host)"},{"line_number":236,"context_line":"        except Exception:"},{"line_number":237,"context_line":"            return False"},{"line_number":238,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BV2c%3D","line":236,"in_reply_to":"AAAAWH%2F%2BWiQ%3D","updated":"2014-03-27 14:15:30.000000000","message":"Hi Julie, you are right about doing something here. What I was trying to avoid was show two messages to the user when an update fails, the above failure_message and the exception message itself. Can I use ignore\u003dTrue in the exceptions.handle() to avoid this? \nThanks!!!","commit_id":"800c0c64d6ec07fbc52fa08d046df5b409679bf3"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"cb4be2078efb53c9ca20d6ddc1bf89c9e1bbfe44","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                if host not in current_aggregate_hosts:"},{"line_number":240,"context_line":"                    api.nova.add_host_to_aggregate(request, aggregate_id, host)"},{"line_number":241,"context_line":"        except Exception:"},{"line_number":242,"context_line":"            LOG.error(\"Error updating the aggregate.\")"},{"line_number":243,"context_line":"            return False"},{"line_number":244,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2BT0s%3D","line":242,"updated":"2014-03-27 17:43:44.000000000","message":"Thanks Alejandro! I would prefer \"LOG.exception()\" so that the stack trace and error type is preserved.","commit_id":"bb8730cdd410a75e9aacf72b1676ef32b2cacc65"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"3afaf3cf825c79747c1bc395cf7d3775ff139d3b","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                if host not in current_aggregate_hosts:"},{"line_number":240,"context_line":"                    api.nova.add_host_to_aggregate(request, aggregate_id, host)"},{"line_number":241,"context_line":"        except Exception:"},{"line_number":242,"context_line":"            LOG.exception(\"Exception updating the aggregate.\")"},{"line_number":243,"context_line":"            return False"},{"line_number":244,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F92iI%3D","line":242,"updated":"2014-04-01 16:49:01.000000000","message":"Right, after testing: I think we should keep exceptions.handle() and simply remove the \"return False\" below. Only one message is displayed and the error is handled as usual and can be found in the logs.","commit_id":"c32f311031fa521e1f6dd6e12d96bf753ddc8067"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"e5e9ace2b465dd08da58bea11aa35961812fd43f","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                if host not in current_aggregate_hosts:"},{"line_number":240,"context_line":"                    api.nova.add_host_to_aggregate(request, aggregate_id, host)"},{"line_number":241,"context_line":"        except Exception:"},{"line_number":242,"context_line":"            LOG.exception(\"Exception updating the aggregate.\")"},{"line_number":243,"context_line":"            return False"},{"line_number":244,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F9wQ8%3D","line":242,"in_reply_to":"AAAAWH%2F92Cs%3D","updated":"2014-04-02 11:15:24.000000000","message":"I see. I can reproduce that behaviour with certain exceptions. It actually seems to be a general bug with workflows and \"return False\" (I can reproduce it with e.g. Associating an IP in the Access \u0026 Security panel), so I think it\u0027s ok to handle it separately. I will file a bug about it and add a link here for reference.","commit_id":"c32f311031fa521e1f6dd6e12d96bf753ddc8067"},{"author":{"_account_id":9313,"name":"alejandro emanuel paredes","email":"alejandro.e.paredes@intel.com","username":"aeparede"},"change_message_id":"99a10a39a10bd1b240cb43945c342540a6080466","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                if host not in current_aggregate_hosts:"},{"line_number":240,"context_line":"                    api.nova.add_host_to_aggregate(request, aggregate_id, host)"},{"line_number":241,"context_line":"        except Exception:"},{"line_number":242,"context_line":"            LOG.exception(\"Exception updating the aggregate.\")"},{"line_number":243,"context_line":"            return False"},{"line_number":244,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F92Cs%3D","line":242,"in_reply_to":"AAAAWH%2F92iI%3D","updated":"2014-04-01 18:00:25.000000000","message":"Hi Julie, thanks for your support! \nI have decided to leave the default exception handler as you said, this will maintain consistency with all other modules.\nThe problem of removing the \"return False\" is that when there is a problem, the exception message is shown followed by the success mesage of the workflow.\nConsidering this scenario, I prefer to leave the \"return False\" as it is, and rephrased the exception message to be more explicit when showing both failure messages....","commit_id":"c32f311031fa521e1f6dd6e12d96bf753ddc8067"},{"author":{"_account_id":9313,"name":"alejandro emanuel paredes","email":"alejandro.e.paredes@intel.com","username":"aeparede"},"change_message_id":"ac644c6e72804ccb89e9283cdff064ff6c0239e3","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                if host not in current_aggregate_hosts:"},{"line_number":240,"context_line":"                    api.nova.add_host_to_aggregate(request, aggregate_id, host)"},{"line_number":241,"context_line":"        except Exception:"},{"line_number":242,"context_line":"            LOG.exception(\"Exception updating the aggregate.\")"},{"line_number":243,"context_line":"            return False"},{"line_number":244,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F9mew%3D","line":242,"in_reply_to":"AAAAWH%2F9vZE%3D","updated":"2014-04-03 15:26:56.000000000","message":"Perfect! Thanks!","commit_id":"c32f311031fa521e1f6dd6e12d96bf753ddc8067"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"856beb36f33ffa929c49a3e1fdc0c7d5fac5c81b","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                if host not in current_aggregate_hosts:"},{"line_number":240,"context_line":"                    api.nova.add_host_to_aggregate(request, aggregate_id, host)"},{"line_number":241,"context_line":"        except Exception:"},{"line_number":242,"context_line":"            LOG.exception(\"Exception updating the aggregate.\")"},{"line_number":243,"context_line":"            return False"},{"line_number":244,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F9vZE%3D","line":242,"in_reply_to":"AAAAWH%2F9wQ8%3D","updated":"2014-04-02 13:10:53.000000000","message":"Opened bug 1301374.","commit_id":"c32f311031fa521e1f6dd6e12d96bf753ddc8067"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"c30650dd74a5860fd645ee60ef747905362c842f","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from openstack_dashboard.dashboards.admin.aggregates import constants"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SetAggregateInfoAction(workflows.Action):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAWH%2F9wSM%3D","line":25,"updated":"2014-04-02 11:16:50.000000000","message":"This isn\u0027t used anymore and should be removed","commit_id":"f26c3f4de186b901bb6006b425325444d1859a24"},{"author":{"_account_id":9313,"name":"alejandro emanuel paredes","email":"alejandro.e.paredes@intel.com","username":"aeparede"},"change_message_id":"fb3fac884089ebd0cdac3018cbae6585e336504c","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from openstack_dashboard.dashboards.admin.aggregates import constants"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SetAggregateInfoAction(workflows.Action):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAWH%2F9mbM%3D","line":25,"in_reply_to":"AAAAWH%2F9wSM%3D","updated":"2014-04-03 15:27:24.000000000","message":"You\u0027re right! I forgot to remove it after the last changes :) Txs!","commit_id":"f26c3f4de186b901bb6006b425325444d1859a24"},{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"c30650dd74a5860fd645ee60ef747905362c842f","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    default_steps \u003d (ManageAggregateHostsStep, )"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def format_status_message(self, message):"},{"line_number":225,"context_line":"        return message"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def handle(self, request, context):"},{"line_number":228,"context_line":"        context_hosts_aggregate \u003d context[\u0027hosts_aggregate\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAWH%2F9wSE%3D","line":225,"updated":"2014-04-02 11:16:50.000000000","message":"Nit, in case another patch set is needed: this method does nothing and can be removed.","commit_id":"f26c3f4de186b901bb6006b425325444d1859a24"},{"author":{"_account_id":9313,"name":"alejandro emanuel paredes","email":"alejandro.e.paredes@intel.com","username":"aeparede"},"change_message_id":"fb3fac884089ebd0cdac3018cbae6585e336504c","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    default_steps \u003d (ManageAggregateHostsStep, )"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def format_status_message(self, message):"},{"line_number":225,"context_line":"        return message"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def handle(self, request, context):"},{"line_number":228,"context_line":"        context_hosts_aggregate \u003d context[\u0027hosts_aggregate\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAWH%2F9mMw%3D","line":225,"in_reply_to":"AAAAWH%2F9wSE%3D","updated":"2014-04-03 15:27:24.000000000","message":"Agreed, Thanks! Also removing the above one...","commit_id":"f26c3f4de186b901bb6006b425325444d1859a24"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"cfcd86718dea65ca8868570cd0fea3117f8dba4d","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                                                        host)"},{"line_number":238,"context_line":"            for host in context_hosts_aggregate:"},{"line_number":239,"context_line":"                if host not in current_aggregate_hosts:"},{"line_number":240,"context_line":"                    api.nova.add_host_to_aggregate(request, aggregate_id, host)"},{"line_number":241,"context_line":"        except Exception:"},{"line_number":242,"context_line":"            exceptions.handle("},{"line_number":243,"context_line":"                request, _(\u0027Error when adding or removing hosts.\u0027))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAWH%2F9vlQ%3D","line":240,"updated":"2014-04-02 12:57:44.000000000","message":"Minor suggestion: We can use set() here.\n\n  context_hosts_aggregate \u003d set(context[\u0027hosts_aggregate\u0027])\n  current_aggregate_hosts \u003d set(aggregate.hosts)\n  added_hosts \u003d context_hosts_aggregate - current_aggregate_hosts\n  removed_hosts \u003d current_aggregate_hosts - context_hosts_aggregate\n  try:\n      for hosts in added_hosts:\n          api.nova.add_host_to_aggregate(...)\n      for hosts in removed_hosts:\n          api.nova.remove_host_from_aggregate(...)","commit_id":"f26c3f4de186b901bb6006b425325444d1859a24"},{"author":{"_account_id":9313,"name":"alejandro emanuel paredes","email":"alejandro.e.paredes@intel.com","username":"aeparede"},"change_message_id":"fb3fac884089ebd0cdac3018cbae6585e336504c","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                                                        host)"},{"line_number":238,"context_line":"            for host in context_hosts_aggregate:"},{"line_number":239,"context_line":"                if host not in current_aggregate_hosts:"},{"line_number":240,"context_line":"                    api.nova.add_host_to_aggregate(request, aggregate_id, host)"},{"line_number":241,"context_line":"        except Exception:"},{"line_number":242,"context_line":"            exceptions.handle("},{"line_number":243,"context_line":"                request, _(\u0027Error when adding or removing hosts.\u0027))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAWH%2F9lHc%3D","line":240,"in_reply_to":"AAAAWH%2F9vlQ%3D","updated":"2014-04-03 15:27:24.000000000","message":"Good suggestion Akihiro, Txs!","commit_id":"f26c3f4de186b901bb6006b425325444d1859a24"}]}
