)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10442,"name":"Masco Kaliyamoorthy","email":"mkaliyam@redhat.com","username":"masco"},"change_message_id":"04da0742b6d9f863b55801ff70d37a9c9c92bc4f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kanchan Gupta \u003ckanchan.gupta1@tcs.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-12-31 17:14:48 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Error message updated."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previously while soft rebooting an instance,"},{"line_number":10,"context_line":"the error message displayed was:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3a961159_fa572bc8","line":7,"updated":"2015-01-05 06:12:38.000000000","message":"The summary should not end with period","commit_id":"402406cbb5d0a3df25dcf377e9307cd98e94a1a0"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"17247fefdedc56ca464e9f68905555be07190998","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kanchan Gupta \u003ckanchan.gupta1@tcs.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-12-31 17:14:48 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Error message updated."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previously while soft rebooting an instance,"},{"line_number":10,"context_line":"the error message displayed was:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3a961159_032e59fa","line":7,"updated":"2015-01-04 20:36:19.000000000","message":"please make the summary more specific","commit_id":"402406cbb5d0a3df25dcf377e9307cd98e94a1a0"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"695e25d6ad51c1a72f856d5c99fb09f9f5cd9e0c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kanchan Gupta \u003ckanchan.gupta1@tcs.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-12-31 17:14:48 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Error message updated."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previously while soft rebooting an instance,"},{"line_number":10,"context_line":"the error message displayed was:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3a961159_d4cfa5b1","line":7,"in_reply_to":"3a961159_032e59fa","updated":"2015-01-05 04:34:46.000000000","message":"+1","commit_id":"402406cbb5d0a3df25dcf377e9307cd98e94a1a0"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"7d118997e57a98dab46dcf4ef813bee5709a7c47","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Now this message has been updated to:"},{"line_number":14,"context_line":"\"Error: Cannot soft reboot an instance \u003cinstance_id\u003e which is not"},{"line_number":15,"context_line":" in Active state\""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Same changes have been done with hard rebooting an instance."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"3a961159_414c6b42","line":15,"updated":"2015-01-08 09:26:17.000000000","message":"nit; no \u0027an\u0027","commit_id":"fabd622676e17aeaca064412fd90fa0ceebdd25a"}],"horizon/tables/actions.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f96c1badafdbef467d1e797b5f1324c188bed6d0","unresolved":false,"context_lines":[{"line_number":808,"context_line":"                else:"},{"line_number":809,"context_line":"                    ignore \u003d True"},{"line_number":810,"context_line":"                    error_message \u003d datum_display"},{"line_number":811,"context_line":"                    if ex.message:"},{"line_number":812,"context_line":"                        error_message \u003d \"%s : %s\" % (datum_display, ex.message)"},{"line_number":813,"context_line":"                    action_failure.append(error_message)"},{"line_number":814,"context_line":"                exceptions.handle(request, ignore\u003dignore)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_e2afcb7b","line":811,"updated":"2014-10-10 19:13:57.000000000","message":"Using \"message\" attribute in Exception class is deprecated in python 2.6. Is there any case where an exception contains no message? If not, please consider just:\n\n  error_message \u003d _(\"%(datum_display)s: %(error_message)s\") % {\u0027datum_display\u0027: datum_display, \u0027error_message\u0027: ex}\n\nIn addition, please make the string translatable and use keyword substitution instead of concatenating strings like \"%s: %s\". Translators cannot control the word order, and in some languages a colon is not used in this case AFAIK.","commit_id":"d0b7da17f2ddd148475624228255b89ba8165efb"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"0ebee379844ddef08e95d0ea5a589a1b215f33d7","unresolved":false,"context_lines":[{"line_number":808,"context_line":"                else:"},{"line_number":809,"context_line":"                    ignore \u003d True"},{"line_number":810,"context_line":"                    error_message \u003d datum_display"},{"line_number":811,"context_line":"                    if ex.message:"},{"line_number":812,"context_line":"                        error_message \u003d \"%s : %s\" % (datum_display, ex.message)"},{"line_number":813,"context_line":"                    action_failure.append(error_message)"},{"line_number":814,"context_line":"                exceptions.handle(request, ignore\u003dignore)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_1fa6a810","line":811,"in_reply_to":"baa201ad_45c32557","updated":"2014-10-14 10:25:39.000000000","message":"I will submit a new patch with the changes.","commit_id":"d0b7da17f2ddd148475624228255b89ba8165efb"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7c1eb54d34323b06d0a54b0de2f00dcb9a9b412d","unresolved":false,"context_lines":[{"line_number":808,"context_line":"                else:"},{"line_number":809,"context_line":"                    ignore \u003d True"},{"line_number":810,"context_line":"                    error_message \u003d datum_display"},{"line_number":811,"context_line":"                    if ex.message:"},{"line_number":812,"context_line":"                        error_message \u003d \"%s : %s\" % (datum_display, ex.message)"},{"line_number":813,"context_line":"                    action_failure.append(error_message)"},{"line_number":814,"context_line":"                exceptions.handle(request, ignore\u003dignore)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_45c32557","line":811,"in_reply_to":"baa201ad_cfcd76b9","updated":"2014-10-14 07:31:58.000000000","message":"but I think we need to avoid using the deprecated \"message\" attribute in Exception class...","commit_id":"d0b7da17f2ddd148475624228255b89ba8165efb"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"68ef88c6f620da8517cb392939825d4b8885aa62","unresolved":false,"context_lines":[{"line_number":808,"context_line":"                else:"},{"line_number":809,"context_line":"                    ignore \u003d True"},{"line_number":810,"context_line":"                    error_message \u003d datum_display"},{"line_number":811,"context_line":"                    if ex.message:"},{"line_number":812,"context_line":"                        error_message \u003d \"%s : %s\" % (datum_display, ex.message)"},{"line_number":813,"context_line":"                    action_failure.append(error_message)"},{"line_number":814,"context_line":"                exceptions.handle(request, ignore\u003dignore)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_cfcd76b9","line":811,"in_reply_to":"baa201ad_e2afcb7b","updated":"2014-10-13 09:19:03.000000000","message":"Yes there is a case when exception will have no value:\n\nCreate a network and associate it with an instance. Now try to delete the network.","commit_id":"d0b7da17f2ddd148475624228255b89ba8165efb"},{"author":{"_account_id":12826,"name":"Rob Cresswell","display_name":"robcresswell","email":"robert.cresswell@outlook.com","username":"rob-cresswell"},"change_message_id":"787c70eed9419d03f92a0bc15ac9cc87172de93e","unresolved":false,"context_lines":[{"line_number":808,"context_line":"                else:"},{"line_number":809,"context_line":"                    ignore \u003d True"},{"line_number":810,"context_line":"                    error_message \u003d datum_display"},{"line_number":811,"context_line":"                    if ex.message:"},{"line_number":812,"context_line":"                        error_message \u003d \"%s : %s\" % (datum_display, ex)"},{"line_number":813,"context_line":"                    action_failure.append(error_message)"},{"line_number":814,"context_line":"                exceptions.handle(request, ignore\u003dignore)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_9b06e41b","line":811,"updated":"2014-11-15 20:16:55.000000000","message":"I may be mistaken, but isn\u0027t this still ignoring Akihiro\u0027s suggestion from patchset 3? He mentions that exception.message is deprecated as of Python 2.6","commit_id":"65c9f48f73f6e59f6b6023bea644d83d7fc55b1c"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"f9982eeeeffe555a74480f1c1fe07a5aaad4ecae","unresolved":false,"context_lines":[{"line_number":808,"context_line":"                else:"},{"line_number":809,"context_line":"                    ignore \u003d True"},{"line_number":810,"context_line":"                    error_message \u003d datum_display"},{"line_number":811,"context_line":"                    if ex.message:"},{"line_number":812,"context_line":"                        error_message \u003d \"%s : %s\" % (datum_display, ex)"},{"line_number":813,"context_line":"                    action_failure.append(error_message)"},{"line_number":814,"context_line":"                exceptions.handle(request, ignore\u003dignore)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_e915559c","line":811,"in_reply_to":"5a890539_9b06e41b","updated":"2014-11-17 06:54:13.000000000","message":"I have uploaded a new patch for this.","commit_id":"65c9f48f73f6e59f6b6023bea644d83d7fc55b1c"},{"author":{"_account_id":12826,"name":"Rob Cresswell","display_name":"robcresswell","email":"robert.cresswell@outlook.com","username":"rob-cresswell"},"change_message_id":"cfb27eb7c82cac217e25cb39e578d28c798333c8","unresolved":false,"context_lines":[{"line_number":783,"context_line":"        action_success \u003d []"},{"line_number":784,"context_line":"        action_failure \u003d []"},{"line_number":785,"context_line":"        action_not_allowed \u003d []"},{"line_number":786,"context_line":"        error_message \u003d []"},{"line_number":787,"context_line":"        for datum_id in obj_ids:"},{"line_number":788,"context_line":"            datum \u003d table.get_object_by_id(datum_id)"},{"line_number":789,"context_line":"            datum_display \u003d table.get_object_display(datum) or _(\"N/A\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_0178b58e","line":786,"updated":"2014-11-17 10:28:02.000000000","message":"This doesn\u0027t need to be here. It\u0027s only ever used during one small block of code below, no need to define it here.","commit_id":"a07ec227e0602903fccb142462ad309f0cfcd4f1"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"19196ad14f6a0771963ba3e27c0777cbe04c75bd","unresolved":false,"context_lines":[{"line_number":783,"context_line":"        action_success \u003d []"},{"line_number":784,"context_line":"        action_failure \u003d []"},{"line_number":785,"context_line":"        action_not_allowed \u003d []"},{"line_number":786,"context_line":"        error_message \u003d []"},{"line_number":787,"context_line":"        for datum_id in obj_ids:"},{"line_number":788,"context_line":"            datum \u003d table.get_object_by_id(datum_id)"},{"line_number":789,"context_line":"            datum_display \u003d table.get_object_display(datum) or _(\"N/A\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_d038ecd6","line":786,"in_reply_to":"5a890539_0178b58e","updated":"2014-11-19 06:15:32.000000000","message":"Sorry for this mistake. I will correct it and will upload a new patch.","commit_id":"a07ec227e0602903fccb142462ad309f0cfcd4f1"},{"author":{"_account_id":12826,"name":"Rob Cresswell","display_name":"robcresswell","email":"robert.cresswell@outlook.com","username":"rob-cresswell"},"change_message_id":"cfb27eb7c82cac217e25cb39e578d28c798333c8","unresolved":false,"context_lines":[{"line_number":811,"context_line":"                    ignore \u003d True"},{"line_number":812,"context_line":"                    error_message \u003d datum_display"},{"line_number":813,"context_line":"                    if ex:"},{"line_number":814,"context_line":"                        error_message \u003d \"%s : %s\" % (datum_display, ex)"},{"line_number":815,"context_line":"                    action_failure.append(error_message)"},{"line_number":816,"context_line":"                exceptions.handle(request, ignore\u003dignore)"},{"line_number":817,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_4109dd2a","line":814,"updated":"2014-11-17 10:28:02.000000000","message":"Looking at the commit message, would this print the entire exception to the UI?","commit_id":"a07ec227e0602903fccb142462ad309f0cfcd4f1"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"19196ad14f6a0771963ba3e27c0777cbe04c75bd","unresolved":false,"context_lines":[{"line_number":811,"context_line":"                    ignore \u003d True"},{"line_number":812,"context_line":"                    error_message \u003d datum_display"},{"line_number":813,"context_line":"                    if ex:"},{"line_number":814,"context_line":"                        error_message \u003d \"%s : %s\" % (datum_display, ex)"},{"line_number":815,"context_line":"                    action_failure.append(error_message)"},{"line_number":816,"context_line":"                exceptions.handle(request, ignore\u003dignore)"},{"line_number":817,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_9008242a","line":814,"in_reply_to":"5a890539_4109dd2a","updated":"2014-11-19 06:15:32.000000000","message":"Yes, this will show the entire message.","commit_id":"a07ec227e0602903fccb142462ad309f0cfcd4f1"},{"author":{"_account_id":12826,"name":"Rob Cresswell","display_name":"robcresswell","email":"robert.cresswell@outlook.com","username":"rob-cresswell"},"change_message_id":"7c520c188ba9af5abef134be156efc339fd3956d","unresolved":false,"context_lines":[{"line_number":811,"context_line":"                    ignore \u003d True"},{"line_number":812,"context_line":"                    error_message \u003d datum_display"},{"line_number":813,"context_line":"                    if ex:"},{"line_number":814,"context_line":"                        error_message \u003d \"%s : %s\" % (datum_display, ex)"},{"line_number":815,"context_line":"                    action_failure.append(error_message)"},{"line_number":816,"context_line":"                exceptions.handle(request, ignore\u003dignore)"},{"line_number":817,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_bd34144b","line":814,"in_reply_to":"5a890539_5dffb0aa","updated":"2014-11-19 09:54:21.000000000","message":"Ignore this for now, still investigating :)","commit_id":"a07ec227e0602903fccb142462ad309f0cfcd4f1"},{"author":{"_account_id":12826,"name":"Rob Cresswell","display_name":"robcresswell","email":"robert.cresswell@outlook.com","username":"rob-cresswell"},"change_message_id":"06e5482ce410d07d2f6b832d775814a4c32dcd64","unresolved":false,"context_lines":[{"line_number":811,"context_line":"                    ignore \u003d True"},{"line_number":812,"context_line":"                    error_message \u003d datum_display"},{"line_number":813,"context_line":"                    if ex:"},{"line_number":814,"context_line":"                        error_message \u003d \"%s : %s\" % (datum_display, ex)"},{"line_number":815,"context_line":"                    action_failure.append(error_message)"},{"line_number":816,"context_line":"                exceptions.handle(request, ignore\u003dignore)"},{"line_number":817,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_5dffb0aa","line":814,"in_reply_to":"5a890539_9008242a","updated":"2014-11-19 09:44:07.000000000","message":"We shouldn\u0027t be dumping exception messages to the user. In Horizon we usually print short messages, and logs can be checked for more detail. This is to prevent clutter, and also so we can handle translation on our side.","commit_id":"a07ec227e0602903fccb142462ad309f0cfcd4f1"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"d308218e2fd97d8e9c4abbf974f6b04dbeaf6abd","unresolved":false,"context_lines":[{"line_number":814,"context_line":"                    ignore \u003d False"},{"line_number":815,"context_line":"                else:"},{"line_number":816,"context_line":"                    ignore \u003d True"},{"line_number":817,"context_line":"                    if ex:"},{"line_number":818,"context_line":"                        msg \u003d _(\"%(datum_display)s: %(error_message)s\")"},{"line_number":819,"context_line":"                        params \u003d {\u0027datum_display\u0027: datum_display,"},{"line_number":820,"context_line":"                                  \u0027error_message\u0027: ex}"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_59f9824c","line":817,"updated":"2014-12-08 14:21:23.000000000","message":"IMO, `ex` would always evaluate to True. When do expect it to evaluate to False?","commit_id":"e7124a7a22aee76d6277c07829e81f9425bbd9e4"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"77f03bd8f79019cd24d3ac25dc398d4ee8d0f63e","unresolved":false,"context_lines":[{"line_number":814,"context_line":"                    ignore \u003d False"},{"line_number":815,"context_line":"                else:"},{"line_number":816,"context_line":"                    ignore \u003d True"},{"line_number":817,"context_line":"                    if ex:"},{"line_number":818,"context_line":"                        msg \u003d _(\"%(datum_display)s: %(error_message)s\")"},{"line_number":819,"context_line":"                        params \u003d {\u0027datum_display\u0027: datum_display,"},{"line_number":820,"context_line":"                                  \u0027error_message\u0027: ex}"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_ec825251","line":817,"in_reply_to":"3a961159_59f9824c","updated":"2014-12-09 06:09:04.000000000","message":"yes \u0027ex\u0027 will always be true if there is any exception. According to the bug description, complete message for the exception should be displayed. Currently the message from the exception is not catched anywhere. So I preferred catching it n datum_display. I checked it with other cases also it is not creating any issue. But if this is not the proper way then I will do it with another way. Thanks","commit_id":"e7124a7a22aee76d6277c07829e81f9425bbd9e4"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"6729c6952f3fffbc8347f248fafe1e11f6e5d2bb","unresolved":false,"context_lines":[{"line_number":814,"context_line":"                    ignore \u003d False"},{"line_number":815,"context_line":"                else:"},{"line_number":816,"context_line":"                    ignore \u003d True"},{"line_number":817,"context_line":"                    if ex:"},{"line_number":818,"context_line":"                        msg \u003d _(\"%(datum_display)s: %(error_message)s\")"},{"line_number":819,"context_line":"                        params \u003d {\u0027datum_display\u0027: datum_display,"},{"line_number":820,"context_line":"                                  \u0027error_message\u0027: ex}"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_fff3d270","line":817,"in_reply_to":"3a961159_ec825251","updated":"2014-12-09 07:25:59.000000000","message":"Is everything working fine in case of multiple errors? Looking at the code (see my comment below) there might be some problems.","commit_id":"e7124a7a22aee76d6277c07829e81f9425bbd9e4"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"366d55ef8fbf67dca03367dd6fdf1aaa63e8c1a7","unresolved":false,"context_lines":[{"line_number":814,"context_line":"                    ignore \u003d False"},{"line_number":815,"context_line":"                else:"},{"line_number":816,"context_line":"                    ignore \u003d True"},{"line_number":817,"context_line":"                    if ex:"},{"line_number":818,"context_line":"                        msg \u003d _(\"%(datum_display)s: %(error_message)s\")"},{"line_number":819,"context_line":"                        params \u003d {\u0027datum_display\u0027: datum_display,"},{"line_number":820,"context_line":"                                  \u0027error_message\u0027: ex}"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_dd60de37","line":817,"in_reply_to":"3a961159_fff3d270","updated":"2014-12-09 09:15:41.000000000","message":"I have checked it by rebooting multiple instances, everything is going fine.","commit_id":"e7124a7a22aee76d6277c07829e81f9425bbd9e4"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"d308218e2fd97d8e9c4abbf974f6b04dbeaf6abd","unresolved":false,"context_lines":[{"line_number":818,"context_line":"                        msg \u003d _(\"%(datum_display)s: %(error_message)s\")"},{"line_number":819,"context_line":"                        params \u003d {\u0027datum_display\u0027: datum_display,"},{"line_number":820,"context_line":"                                  \u0027error_message\u0027: ex}"},{"line_number":821,"context_line":"                        datum_display \u003d msg % params"},{"line_number":822,"context_line":"                    action_failure.append(datum_display)"},{"line_number":823,"context_line":"                exceptions.handle(request, ignore\u003dignore)"},{"line_number":824,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_9452cf11","line":821,"updated":"2014-12-08 14:21:23.000000000","message":"Looking at the further usage of action_failure list, it\u0027s not the best way to format `datum_display` this way, see lines 836-837.","commit_id":"e7124a7a22aee76d6277c07829e81f9425bbd9e4"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"366d55ef8fbf67dca03367dd6fdf1aaa63e8c1a7","unresolved":false,"context_lines":[{"line_number":818,"context_line":"                        msg \u003d _(\"%(datum_display)s: %(error_message)s\")"},{"line_number":819,"context_line":"                        params \u003d {\u0027datum_display\u0027: datum_display,"},{"line_number":820,"context_line":"                                  \u0027error_message\u0027: ex}"},{"line_number":821,"context_line":"                        datum_display \u003d msg % params"},{"line_number":822,"context_line":"                    action_failure.append(datum_display)"},{"line_number":823,"context_line":"                exceptions.handle(request, ignore\u003dignore)"},{"line_number":824,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_58dddc6f","line":821,"in_reply_to":"3a961159_9452cf11","updated":"2014-12-09 09:15:41.000000000","message":"Ok I will find a new solution to this.","commit_id":"e7124a7a22aee76d6277c07829e81f9425bbd9e4"}],"openstack_dashboard/dashboards/project/instances/tables.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f96c1badafdbef467d1e797b5f1324c188bed6d0","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        if instance is not None:"},{"line_number":134,"context_line":"            return ((instance.status in ACTIVE_STATES"},{"line_number":135,"context_line":"                     or instance.status \u003d\u003d \u0027SHUTOFF\u0027"},{"line_number":136,"context_line":"                     or instance.status \u003d\u003d \u0027ERROR\u0027)"},{"line_number":137,"context_line":"                    and not is_deleting(instance))"},{"line_number":138,"context_line":"        else:"},{"line_number":139,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_c2080794","line":136,"updated":"2014-10-10 19:13:57.000000000","message":"It seems this is an unrelated change. The commit message says this patch fixes the error message, but there is no mention on the allowed condition. I would suggest to fix it in a separate patch if it is a problem.","commit_id":"d0b7da17f2ddd148475624228255b89ba8165efb"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"0ebee379844ddef08e95d0ea5a589a1b215f33d7","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        if instance is not None:"},{"line_number":134,"context_line":"            return ((instance.status in ACTIVE_STATES"},{"line_number":135,"context_line":"                     or instance.status \u003d\u003d \u0027SHUTOFF\u0027"},{"line_number":136,"context_line":"                     or instance.status \u003d\u003d \u0027ERROR\u0027)"},{"line_number":137,"context_line":"                    and not is_deleting(instance))"},{"line_number":138,"context_line":"        else:"},{"line_number":139,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_ff77249d","line":136,"in_reply_to":"baa201ad_259f0161","updated":"2014-10-14 10:25:39.000000000","message":"allowed() function is called from within the \"if not table._filter_action(self, request, datum):\" check (line 788 in actions.py). In case the Instance is in error state it adds the Instance Name to the action_not_allowed list and the function exits with \"Permission Denied to perform the action\" due to the check \"if action_not_allowed: \" at Line 818\n\nTo display the appropriate error to the user, we need the instance name in the action_failure list. So, when we add a check for Error state in the allowed() function, it performs the action on the instance and when the action call returns an error, the instance name is stored in the action_failure list. Then further in the code we can display this error message on the screen.\n\nI will also change the commit message to describe this change.","commit_id":"d0b7da17f2ddd148475624228255b89ba8165efb"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7c1eb54d34323b06d0a54b0de2f00dcb9a9b412d","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        if instance is not None:"},{"line_number":134,"context_line":"            return ((instance.status in ACTIVE_STATES"},{"line_number":135,"context_line":"                     or instance.status \u003d\u003d \u0027SHUTOFF\u0027"},{"line_number":136,"context_line":"                     or instance.status \u003d\u003d \u0027ERROR\u0027)"},{"line_number":137,"context_line":"                    and not is_deleting(instance))"},{"line_number":138,"context_line":"        else:"},{"line_number":139,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_259f0161","line":136,"in_reply_to":"baa201ad_4f8b4668","updated":"2014-10-14 07:31:58.000000000","message":"I don\u0027t object the fix itself, but it is unclear to me why the change in allowed() addresses the error *message* problem.\nI hope more clear description in the commit message why allowed() method is changed.","commit_id":"d0b7da17f2ddd148475624228255b89ba8165efb"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"68ef88c6f620da8517cb392939825d4b8885aa62","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        if instance is not None:"},{"line_number":134,"context_line":"            return ((instance.status in ACTIVE_STATES"},{"line_number":135,"context_line":"                     or instance.status \u003d\u003d \u0027SHUTOFF\u0027"},{"line_number":136,"context_line":"                     or instance.status \u003d\u003d \u0027ERROR\u0027)"},{"line_number":137,"context_line":"                    and not is_deleting(instance))"},{"line_number":138,"context_line":"        else:"},{"line_number":139,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_4f8b4668","line":136,"in_reply_to":"baa201ad_c2080794","updated":"2014-10-13 09:19:03.000000000","message":"Previously the instances in Error State cannot be soft_rebooted because there was no condition defined on it, thus I put a condition that will check for Error state.","commit_id":"d0b7da17f2ddd148475624228255b89ba8165efb"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"4dd434ddef64d74c5724aa7e61d9374541b36cf7","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        if instance is not None:"},{"line_number":134,"context_line":"            return ((instance.status in ACTIVE_STATES"},{"line_number":135,"context_line":"                     or instance.status \u003d\u003d \u0027SHUTOFF\u0027"},{"line_number":136,"context_line":"                     or instance.status \u003d\u003d \u0027ERROR\u0027)"},{"line_number":137,"context_line":"                    and not is_deleting(instance))"},{"line_number":138,"context_line":"        else:"},{"line_number":139,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_b0139bff","line":136,"updated":"2014-12-23 12:23:59.000000000","message":"Could be replaced by\n\n instance.status in (\u0027SHUTOFF\u0027, \u0027ERROR\u0027) \n\nor even better, just create\n\n REBOOT_ALLOWED_STATES \u003d ACTIVE_STATES + (\u0027SHUTOFF\u0027, \u0027ERROR\u0027) \n\nnear line 54 and use it here.","commit_id":"0614b68ae8117b7d34d404fd36930ac9d189637b"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"822a64eadf88e8daa07d149811c2452d680b617d","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        except Exception as ex:"},{"line_number":168,"context_line":"            if ex.code \u003d\u003d 409:"},{"line_number":169,"context_line":"                msg \u003d _(\"Cannot \u0027reboot\u0027 an instance which is not in\""},{"line_number":170,"context_line":"                        \" active state.\")"},{"line_number":171,"context_line":"            else:"},{"line_number":172,"context_line":"                msg \u003d _(\"Failed to reboot instance %s\") % obj_id"},{"line_number":173,"context_line":"            redirect \u003d urlresolvers.reverse(\"horizon:project:instances:index\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_8f4767a2","line":170,"updated":"2014-12-23 07:19:22.000000000","message":"Depend on the allowed function, whether you can reboot an instance is not just in active state. Besides http 409 means conflict, so I don\u0027t think this msg is appropriate.","commit_id":"0614b68ae8117b7d34d404fd36930ac9d189637b"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"8155a980a2f1292ba680729ed5e8325f400364a0","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        except Exception as ex:"},{"line_number":168,"context_line":"            if ex.code \u003d\u003d 409:"},{"line_number":169,"context_line":"                msg \u003d _(\"Cannot \u0027reboot\u0027 an instance which is not in\""},{"line_number":170,"context_line":"                        \" active state.\")"},{"line_number":171,"context_line":"            else:"},{"line_number":172,"context_line":"                msg \u003d _(\"Failed to reboot instance %s\") % obj_id"},{"line_number":173,"context_line":"            redirect \u003d urlresolvers.reverse(\"horizon:project:instances:index\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_d539fcf2","line":170,"in_reply_to":"3a961159_8f4767a2","updated":"2014-12-23 09:40:21.000000000","message":"This error code is coming from nova side when action(reboot) fails. So I am just handling it to print the same message.","commit_id":"0614b68ae8117b7d34d404fd36930ac9d189637b"},{"author":{"_account_id":10442,"name":"Masco Kaliyamoorthy","email":"mkaliyam@redhat.com","username":"masco"},"change_message_id":"f9d581f6c3491b82c0197468545f3b56c288d156","unresolved":false,"context_lines":[{"line_number":51,"context_line":"ACTIVE_STATES \u003d (\"ACTIVE\",)"},{"line_number":52,"context_line":"VOLUME_ATTACH_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\")"},{"line_number":53,"context_line":"SNAPSHOT_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\", \"PAUSED\", \"SUSPENDED\")"},{"line_number":54,"context_line":"REBOOT_ALLOWED_STATES \u003d ACTIVE_STATES + (\u0027SHUTOFF\u0027, \u0027ERROR\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"POWER_STATES \u003d {"},{"line_number":57,"context_line":"    0: \"NO STATE\","}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_cd979b8e","line":54,"updated":"2014-12-24 06:24:04.000000000","message":"nova will not allow to reboot the instance if it is in shutoff and error state. then why we have to allow the reboot option in those states in the UI?","commit_id":"41fb1bb2a5e7d5645344afd399117310c3b419b3"},{"author":{"_account_id":10442,"name":"Masco Kaliyamoorthy","email":"mkaliyam@redhat.com","username":"masco"},"change_message_id":"cc1acfe021b9532291a79ed4f06a7fd95b4af97b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"ACTIVE_STATES \u003d (\"ACTIVE\",)"},{"line_number":52,"context_line":"VOLUME_ATTACH_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\")"},{"line_number":53,"context_line":"SNAPSHOT_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\", \"PAUSED\", \"SUSPENDED\")"},{"line_number":54,"context_line":"REBOOT_ALLOWED_STATES \u003d ACTIVE_STATES + (\u0027SHUTOFF\u0027, \u0027ERROR\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"POWER_STATES \u003d {"},{"line_number":57,"context_line":"    0: \"NO STATE\","}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_fe487b5d","line":54,"in_reply_to":"3a961159_139d4066","updated":"2014-12-24 08:29:52.000000000","message":"thanks for the detailed answer.\nmy point is, if we not at all showing the reboot option to the user in the UI if the instance is not in active state, we will not get any error message right?\nor is there any specific reason to show the reboot option to the user even though the instance is error state.","commit_id":"41fb1bb2a5e7d5645344afd399117310c3b419b3"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"594992b087d5e9ad86cfd6028bd4a6edfb3d93bf","unresolved":false,"context_lines":[{"line_number":51,"context_line":"ACTIVE_STATES \u003d (\"ACTIVE\",)"},{"line_number":52,"context_line":"VOLUME_ATTACH_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\")"},{"line_number":53,"context_line":"SNAPSHOT_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\", \"PAUSED\", \"SUSPENDED\")"},{"line_number":54,"context_line":"REBOOT_ALLOWED_STATES \u003d ACTIVE_STATES + (\u0027SHUTOFF\u0027, \u0027ERROR\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"POWER_STATES \u003d {"},{"line_number":57,"context_line":"    0: \"NO STATE\","}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_fed77f4d","line":54,"in_reply_to":"3a961159_5e634fb0","updated":"2014-12-26 04:57:47.000000000","message":"I have a small question regarding the approach you suggested, if a user wants to reboot multiple instances and one instance is in error state and another is in active state then what should be the behavior of \"Soft Reboot Instance\" option? Please suggest. Thanks.","commit_id":"41fb1bb2a5e7d5645344afd399117310c3b419b3"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"11d6dbe87b4a6a9e2655512b291ee1919b418af0","unresolved":false,"context_lines":[{"line_number":51,"context_line":"ACTIVE_STATES \u003d (\"ACTIVE\",)"},{"line_number":52,"context_line":"VOLUME_ATTACH_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\")"},{"line_number":53,"context_line":"SNAPSHOT_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\", \"PAUSED\", \"SUSPENDED\")"},{"line_number":54,"context_line":"REBOOT_ALLOWED_STATES \u003d ACTIVE_STATES + (\u0027SHUTOFF\u0027, \u0027ERROR\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"POWER_STATES \u003d {"},{"line_number":57,"context_line":"    0: \"NO STATE\","}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_139d4066","line":54,"in_reply_to":"3a961159_cd979b8e","updated":"2014-12-24 08:05:46.000000000","message":"Yes nova will not allow the instance to be rebooted in shutoff and error state and will raise an error when a call is made to nova for rebooting instances not in active state. \nAt horizon side if we will not add these states here, then action (call to nova for rebooting the instance) will be not allowed and it will raise an error  \"Permission denied to ...\" (as handled in actions.py file in handle() at line-789) which is not an appropriate error.\nSo, to provide a clear message to the user, I added these states here, which will allow  the call to nova, which in-turn will throw an exception (Conflict()) back to horizon.  \nHorizon will then display the correct error returned from nova to the user.","commit_id":"41fb1bb2a5e7d5645344afd399117310c3b419b3"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"e668ad9137aaea6497d54deca0712b8770558977","unresolved":false,"context_lines":[{"line_number":51,"context_line":"ACTIVE_STATES \u003d (\"ACTIVE\",)"},{"line_number":52,"context_line":"VOLUME_ATTACH_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\")"},{"line_number":53,"context_line":"SNAPSHOT_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\", \"PAUSED\", \"SUSPENDED\")"},{"line_number":54,"context_line":"REBOOT_ALLOWED_STATES \u003d ACTIVE_STATES + (\u0027SHUTOFF\u0027, \u0027ERROR\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"POWER_STATES \u003d {"},{"line_number":57,"context_line":"    0: \"NO STATE\","}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_5e634fb0","line":54,"in_reply_to":"3a961159_fe487b5d","updated":"2014-12-24 09:50:59.000000000","message":"That will be the better approach. Thanks for the guidance. I will submit a new patch for this change.","commit_id":"41fb1bb2a5e7d5645344afd399117310c3b419b3"},{"author":{"_account_id":6763,"name":"jingliuqing","email":"jing.liuqing@99cloud.net","username":"jing"},"change_message_id":"44d48e212ab91f51771701b8aaaaa807a7d152a9","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        except Exception as ex:"},{"line_number":167,"context_line":"            if ex.code \u003d\u003d 409:"},{"line_number":168,"context_line":"                msg \u003d _(\"Cannot \u0027reboot\u0027 an instance which is not in\""},{"line_number":169,"context_line":"                        \" active state.\")"},{"line_number":170,"context_line":"            else:"},{"line_number":171,"context_line":"                msg \u003d _(\"Failed to reboot instance %s\") % obj_id"},{"line_number":172,"context_line":"            redirect \u003d urlresolvers.reverse(\"horizon:project:instances:index\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_f6696d8d","line":169,"updated":"2014-12-25 12:36:30.000000000","message":"nit: add instance_id here.","commit_id":"41fb1bb2a5e7d5645344afd399117310c3b419b3"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"204f304ed79c87eb239b89d56a7df6d36f65bb81","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        except Exception as ex:"},{"line_number":167,"context_line":"            if ex.code \u003d\u003d 409:"},{"line_number":168,"context_line":"                msg \u003d _(\"Cannot \u0027reboot\u0027 an instance which is not in\""},{"line_number":169,"context_line":"                        \" active state.\")"},{"line_number":170,"context_line":"            else:"},{"line_number":171,"context_line":"                msg \u003d _(\"Failed to reboot instance %s\") % obj_id"},{"line_number":172,"context_line":"            redirect \u003d urlresolvers.reverse(\"horizon:project:instances:index\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_96eae9aa","line":169,"in_reply_to":"3a961159_f6696d8d","updated":"2014-12-25 12:48:16.000000000","message":"maybe obj_id ? (not instance_id)","commit_id":"41fb1bb2a5e7d5645344afd399117310c3b419b3"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"40331be27851219ac68750a7ede9ecaf004b99bf","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            api.nova.server_reboot(request, obj_id, soft_reboot\u003dTrue)"},{"line_number":166,"context_line":"        except Exception as ex:"},{"line_number":167,"context_line":"            if ex.code \u003d\u003d 409:"},{"line_number":168,"context_line":"                msg \u003d _(\"Cannot \u0027reboot\u0027 instance %s which is not in\""},{"line_number":169,"context_line":"                        \" active state.\") % obj_id"},{"line_number":170,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_4216cd56","line":167,"updated":"2014-12-30 12:16:47.000000000","message":"I think we need use:\nfrom novaclient import exception as nova_exc\n\n...........\n\nexcept nova_exc.Conflict\n\n.........\n\nsee comments in https://review.openstack.org/#/c/143026/3/openstack_dashboard/dashboards/project/images/images/forms.py\n\nand please see https://review.openstack.org/#/c/116226/15/openstack_dashboard/dashboards/project/access_and_security/floating_ips/views.py","commit_id":"ddf4027916c3273a7df3669744275d8a93686434"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"a619ec549f9646fde9158e0d041b9e6c822f7c58","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            count"},{"line_number":163,"context_line":"        )"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def action(self, request, obj_id):"},{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            api.nova.server_reboot(request, obj_id, soft_reboot\u003dTrue)"},{"line_number":168,"context_line":"        except nova_exceptions.Conflict:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_902d4900","line":165,"updated":"2014-12-31 09:20:04.000000000","message":"we can use \n\nredirect \u003d urlresolvers.reverse(\"horizon:project:instances:index\")\n\n in this line. Then the variable will not be duplicated (lines -- 171 and 175)","commit_id":"9e8f80ed006386ce535ac004f38ee7701d159817"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"695e25d6ad51c1a72f856d5c99fb09f9f5cd9e0c","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        try:"},{"line_number":169,"context_line":"            api.nova.server_reboot(request, obj_id, soft_reboot\u003dTrue)"},{"line_number":170,"context_line":"        except nova_exceptions.Conflict:"},{"line_number":171,"context_line":"            msg \u003d _(\"Cannot \u0027reboot\u0027 instance %s which is not in\""},{"line_number":172,"context_line":"                    \" active state.\") % obj_id"},{"line_number":173,"context_line":"            exceptions.handle(request, msg, redirect\u003dredirect)"},{"line_number":174,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_34cd49b8","line":171,"updated":"2015-01-05 04:34:46.000000000","message":"Why does \"reboot\" need to be quoted? I don\u0027t think it is required.","commit_id":"402406cbb5d0a3df25dcf377e9307cd98e94a1a0"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"695e25d6ad51c1a72f856d5c99fb09f9f5cd9e0c","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            api.nova.server_reboot(request, obj_id, soft_reboot\u003dTrue)"},{"line_number":170,"context_line":"        except nova_exceptions.Conflict:"},{"line_number":171,"context_line":"            msg \u003d _(\"Cannot \u0027reboot\u0027 instance %s which is not in\""},{"line_number":172,"context_line":"                    \" active state.\") % obj_id"},{"line_number":173,"context_line":"            exceptions.handle(request, msg, redirect\u003dredirect)"},{"line_number":174,"context_line":"        except Exception:"},{"line_number":175,"context_line":"            msg \u003d _(\"Failed to reboot instance %s\") % obj_id"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_b4b85912","line":172,"updated":"2015-01-05 04:34:46.000000000","message":"Is \"active state\" correct?","commit_id":"402406cbb5d0a3df25dcf377e9307cd98e94a1a0"},{"author":{"_account_id":6162,"name":"Dan Nguyen","email":"dan.nguyens.mail@gmail.com","username":"daniel-a-nguyen"},"change_message_id":"54eb7575d8f397f91797e089120fddef9312234e","unresolved":false,"context_lines":[{"line_number":53,"context_line":"ACTIVE_STATES \u003d (\"ACTIVE\",)"},{"line_number":54,"context_line":"VOLUME_ATTACH_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\")"},{"line_number":55,"context_line":"SNAPSHOT_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\", \"PAUSED\", \"SUSPENDED\")"},{"line_number":56,"context_line":"REBOOT_ALLOWED_STATES \u003d ACTIVE_STATES + (\u0027SHUTOFF\u0027, \u0027ERROR\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"POWER_STATES \u003d {"},{"line_number":59,"context_line":"    0: \"NO STATE\","}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_ffb54bed","line":56,"updated":"2015-01-05 18:56:25.000000000","message":"This is a minor comment but I think I\u0027d rather keep with consistency and do this:\n\nREBOOT_ALLOWED_STATES \u003d (\"ACTIVE\", \"SHUTOFF\", \"ERROR\")","commit_id":"533e14c8788c078036aa7044ca6f51afbd999b48"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"78295cf8ac556694799b2483ac0021ef61eb59eb","unresolved":false,"context_lines":[{"line_number":53,"context_line":"ACTIVE_STATES \u003d (\"ACTIVE\",)"},{"line_number":54,"context_line":"VOLUME_ATTACH_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\")"},{"line_number":55,"context_line":"SNAPSHOT_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\", \"PAUSED\", \"SUSPENDED\")"},{"line_number":56,"context_line":"REBOOT_ALLOWED_STATES \u003d ACTIVE_STATES + (\u0027SHUTOFF\u0027, \u0027ERROR\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"POWER_STATES \u003d {"},{"line_number":59,"context_line":"    0: \"NO STATE\","}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_b7a9187e","line":56,"in_reply_to":"3a961159_ffb54bed","updated":"2015-01-06 05:44:58.000000000","message":"I will do this change and will submit a new patch. Thanks","commit_id":"533e14c8788c078036aa7044ca6f51afbd999b48"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"0775e3c1fcf13d02f38300d6e465272dd23a4e07","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            api.nova.server_reboot(request, obj_id, soft_reboot\u003dTrue)"},{"line_number":170,"context_line":"        except nova_exceptions.Conflict:"},{"line_number":171,"context_line":"            msg \u003d _(\"Cannot reboot instance %s which is not in\""},{"line_number":172,"context_line":"                    \" Active state.\") % obj_id"},{"line_number":173,"context_line":"            exceptions.handle(request, msg, redirect\u003dredirect)"},{"line_number":174,"context_line":"        except Exception:"},{"line_number":175,"context_line":"            msg \u003d _(\"Failed to reboot instance %s\") % obj_id"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_3cad2132","line":172,"updated":"2015-01-05 18:35:49.000000000","message":"Seems inaccurate because based from the code the instance can be rebooted if the state is Active, Shutdown or Error.","commit_id":"533e14c8788c078036aa7044ca6f51afbd999b48"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"6ec84c62da0ffc8a926adde0d63d975d43789743","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            api.nova.server_reboot(request, obj_id, soft_reboot\u003dTrue)"},{"line_number":170,"context_line":"        except nova_exceptions.Conflict:"},{"line_number":171,"context_line":"            msg \u003d _(\"Cannot reboot instance %s which is not in\""},{"line_number":172,"context_line":"                    \" Active state.\") % obj_id"},{"line_number":173,"context_line":"            exceptions.handle(request, msg, redirect\u003dredirect)"},{"line_number":174,"context_line":"        except Exception:"},{"line_number":175,"context_line":"            msg \u003d _(\"Failed to reboot instance %s\") % obj_id"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_b1ee88b3","line":172,"in_reply_to":"3a961159_3cad2132","updated":"2015-01-06 05:41:59.000000000","message":"Yes what you said is correct. Actually an instance can only be rebooted when it is in Active state and should raise proper error message when a user tries to reboot a non-active instance. \nInitially soft rebooting an inactive instance gives:\n\"Permission denied to ...\" error, which is not a clear message for the user.\nBecause action(soft reboot) to be performed is allowed for Active state only in BatchAction. So for that I have added \"SHUTOFF\" and \"ERROR\" states.","commit_id":"533e14c8788c078036aa7044ca6f51afbd999b48"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"0775e3c1fcf13d02f38300d6e465272dd23a4e07","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            msg \u003d _(\"Cannot reboot instance %s which is not in\""},{"line_number":172,"context_line":"                    \" Active state.\") % obj_id"},{"line_number":173,"context_line":"            exceptions.handle(request, msg, redirect\u003dredirect)"},{"line_number":174,"context_line":"        except Exception:"},{"line_number":175,"context_line":"            msg \u003d _(\"Failed to reboot instance %s\") % obj_id"},{"line_number":176,"context_line":"            exceptions.handle(request, msg, redirect\u003dredirect)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_fca0f943","line":174,"updated":"2015-01-05 18:35:49.000000000","message":"This is probably not needed, as the BatchAction already handles generic error.","commit_id":"533e14c8788c078036aa7044ca6f51afbd999b48"},{"author":{"_account_id":11793,"name":"Kanchan Gupta","email":"kanchan.gupta1@tcs.com","username":"Kanchan"},"change_message_id":"6ec84c62da0ffc8a926adde0d63d975d43789743","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            msg \u003d _(\"Cannot reboot instance %s which is not in\""},{"line_number":172,"context_line":"                    \" Active state.\") % obj_id"},{"line_number":173,"context_line":"            exceptions.handle(request, msg, redirect\u003dredirect)"},{"line_number":174,"context_line":"        except Exception:"},{"line_number":175,"context_line":"            msg \u003d _(\"Failed to reboot instance %s\") % obj_id"},{"line_number":176,"context_line":"            exceptions.handle(request, msg, redirect\u003dredirect)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_17d66c4f","line":174,"in_reply_to":"3a961159_fca0f943","updated":"2015-01-06 05:41:59.000000000","message":"If I do not handle it here then it will show following message:\n\nError: Unable to soft reboot instance: \u003cinstance_name\u003e\n\nwhich according to the bug requirement is not correct. So I have handled it here only to give more descriptive message to the user.\nThanks.","commit_id":"533e14c8788c078036aa7044ca6f51afbd999b48"},{"author":{"_account_id":10442,"name":"Masco Kaliyamoorthy","email":"mkaliyam@redhat.com","username":"masco"},"change_message_id":"9fd3818266c3d42d0ba697a95c46f84b68e0dac0","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            return True"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def action(self, request, obj_id):"},{"line_number":143,"context_line":"        api.nova.server_reboot(request, obj_id, soft_reboot\u003dFalse)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"class SoftRebootInstance(RebootInstance):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_ab8610b7","line":143,"updated":"2015-01-06 11:14:45.000000000","message":"I guess we need to add the same exception catch code for here also???","commit_id":"7ad919e4163ccc1f706d909b4302f4a1bb95e22c"},{"author":{"_account_id":10442,"name":"Masco Kaliyamoorthy","email":"mkaliyam@redhat.com","username":"masco"},"change_message_id":"9fd3818266c3d42d0ba697a95c46f84b68e0dac0","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        try:"},{"line_number":169,"context_line":"            api.nova.server_reboot(request, obj_id, soft_reboot\u003dTrue)"},{"line_number":170,"context_line":"        except nova_exceptions.Conflict:"},{"line_number":171,"context_line":"            msg \u003d _(\"Cannot reboot instance %s which is not in\""},{"line_number":172,"context_line":"                    \" Active state.\") % obj_id"},{"line_number":173,"context_line":"            exceptions.handle(request, msg, redirect\u003dredirect)"},{"line_number":174,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_2b6940f9","line":171,"updated":"2015-01-06 11:14:45.000000000","message":"mention \"soft reboot\" for better understanding.","commit_id":"7ad919e4163ccc1f706d909b4302f4a1bb95e22c"},{"author":{"_account_id":10442,"name":"Masco Kaliyamoorthy","email":"mkaliyam@redhat.com","username":"masco"},"change_message_id":"9fd3818266c3d42d0ba697a95c46f84b68e0dac0","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                    \" Active state.\") % obj_id"},{"line_number":173,"context_line":"            exceptions.handle(request, msg, redirect\u003dredirect)"},{"line_number":174,"context_line":"        except Exception:"},{"line_number":175,"context_line":"            msg \u003d _(\"Failed to reboot instance %s\") % obj_id"},{"line_number":176,"context_line":"            exceptions.handle(request, msg, redirect\u003dredirect)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_4b6a0cee","line":175,"updated":"2015-01-06 11:14:45.000000000","message":"same as above","commit_id":"7ad919e4163ccc1f706d909b4302f4a1bb95e22c"},{"author":{"_account_id":8411,"name":"Andrew Lazarev","email":"alazarev@mirantis.com","username":"alazarev"},"change_message_id":"619d80e13409773b387a677f72895862389ce573","unresolved":false,"context_lines":[{"line_number":53,"context_line":"ACTIVE_STATES \u003d (\"ACTIVE\",)"},{"line_number":54,"context_line":"VOLUME_ATTACH_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\")"},{"line_number":55,"context_line":"SNAPSHOT_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\", \"PAUSED\", \"SUSPENDED\")"},{"line_number":56,"context_line":"REBOOT_ALLOWED_STATES \u003d (\"ACTIVE\", \"SHUTOFF\", \"ERROR\")"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"POWER_STATES \u003d {"},{"line_number":59,"context_line":"    0: \"NO STATE\","}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_7e28ef85","line":56,"updated":"2015-01-10 00:04:23.000000000","message":"This will add \u0027Reboot\u0027 button to instances in Error state. Don\u0027t think we want this.\nAlso, name of constant is frustrating. Reboot is not allowed in Error.","commit_id":"f31b9c84dea38591b4755d64696aba7f27d5ae56"},{"author":{"_account_id":14151,"name":"ziyu032","email":"chen.qiaomin@99cloud.net","username":"ziyu032"},"change_message_id":"64957674dc8ad087ba1bd77209e261e42779fbe3","unresolved":false,"context_lines":[{"line_number":53,"context_line":"ACTIVE_STATES \u003d (\"ACTIVE\",)"},{"line_number":54,"context_line":"VOLUME_ATTACH_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\")"},{"line_number":55,"context_line":"SNAPSHOT_READY_STATES \u003d (\"ACTIVE\", \"SHUTOFF\", \"PAUSED\", \"SUSPENDED\")"},{"line_number":56,"context_line":"REBOOT_ALLOWED_STATES \u003d (\"ACTIVE\", \"SHUTOFF\", \"ERROR\")"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"POWER_STATES \u003d {"},{"line_number":59,"context_line":"    0: \"NO STATE\","}],"source_content_type":"text/x-python","patch_set":19,"id":"fa1b9901_69019fae","line":56,"in_reply_to":"3a961159_7e28ef85","updated":"2015-08-20 13:35:22.000000000","message":"right.","commit_id":"f31b9c84dea38591b4755d64696aba7f27d5ae56"}]}
