)]}'
{"bin/nova-manage":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9150b71c705b62bfcd5b1f0f0d12addeaa217720","unresolved":false,"context_lines":[{"line_number":1069,"context_line":"            return"},{"line_number":1070,"context_line":"        db.service_update(ctxt, svc[\u0027id\u0027], {\u0027disabled\u0027: True})"},{"line_number":1071,"context_line":""},{"line_number":1072,"context_line":"    @args(\u0027--host\u0027, dest\u003d\u0027host\u0027, metavar\u003d\u0027\u003chost\u003e\u0027, help\u003d\u0027Host\u0027)"},{"line_number":1073,"context_line":"    def update_resource(self, host):"},{"line_number":1074,"context_line":"        \"\"\"Updates available vcpu/memory/disk info for host.\"\"\""},{"line_number":1075,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAC3%2F%2F7r8%3D","line":1072,"updated":"2011-12-20 18:13:18.000000000","message":"Is there a reason you\u0027ve removed describe_resource(), or do you simply need to rebase?","commit_id":"a72b5be9ce958824304b1c393462ceb76c321e00"}],"nova/api/openstack/compute/contrib/admin_actions.py":[{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"83cc835a5689b0c0bf5179d8956456e72c49e13c","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        resp.headers[\u0027Location\u0027] \u003d image_ref"},{"line_number":262,"context_line":"        return resp"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    @wsgi.action(\u0027migrateLive\u0027)"},{"line_number":265,"context_line":"    @exception.novaclient_converter"},{"line_number":266,"context_line":"    @scheduler_api.redirect_handler"},{"line_number":267,"context_line":"    def _migrate_live(self, req, id, body):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAEH%2F%2F%2BwM%3D","line":264,"updated":"2012-01-24 20:38:43.000000000","message":"This action name needs to be prefixed with \u0027os-\u0027 since it is an extension to the API. I should have noticed this before, sorry!","commit_id":"600b1d215ae11e2898893463223ebb560cd3f126"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"84f47d735224e15958358a590b8a6e95b7fe1c27","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                                                  topic\u003dFLAGS.compute_topic)"},{"line_number":303,"context_line":"        except Exception, e:"},{"line_number":304,"context_line":"            readable \u003d traceback.format_exc()"},{"line_number":305,"context_line":"            LOG.exception(_(\"migrate (live) %s\"), readable)"},{"line_number":306,"context_line":"            # Return messages from scheduler"},{"line_number":307,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.value)"},{"line_number":308,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAEH%2F%2F%2BN0%3D","line":305,"updated":"2012-01-25 16:26:18.000000000","message":"Doesn\u0027t LOG.exception() already output the correct information about the exception?  You could probably do:\n\n    msg \u003d _(\"Live migration of instance %(id)s to host %(host)s failed\") % locals()\n    LOG.exception(msg)","commit_id":"27755414613839644644036ee1ba60dbab89ee22"},{"author":{"_account_id":1075,"name":"Kei Masumoto","username":"masumotok"},"change_message_id":"dd79a368b853f97eb2d43d5349fc785a8db279ef","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                                                  topic\u003dFLAGS.compute_topic)"},{"line_number":303,"context_line":"        except Exception, e:"},{"line_number":304,"context_line":"            readable \u003d traceback.format_exc()"},{"line_number":305,"context_line":"            LOG.exception(_(\"migrate (live) %s\"), readable)"},{"line_number":306,"context_line":"            # Return messages from scheduler"},{"line_number":307,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.value)"},{"line_number":308,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAEH%2F%2F%2BM0%3D","line":305,"in_reply_to":"AAAAEH%2F%2F%2BN0%3D","updated":"2012-01-25 17:15:46.000000000","message":"Thanks for your comment! let me explain above.\nActually, some pre-condition checks have been done at scheduler(ex. dest host doesnt have enough memory, etc) . I thought it is better to return detail error message than replying just \"error\". That is the reason to log exception messages and to return an error message to an admin. If it is inappropriate, I fixed based on your comment. could you give me an advice?","commit_id":"27755414613839644644036ee1ba60dbab89ee22"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"84f47d735224e15958358a590b8a6e95b7fe1c27","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            readable \u003d traceback.format_exc()"},{"line_number":305,"context_line":"            LOG.exception(_(\"migrate (live) %s\"), readable)"},{"line_number":306,"context_line":"            # Return messages from scheduler"},{"line_number":307,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.value)"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":310,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAEH%2F%2F%2BNs%3D","line":307,"updated":"2012-01-25 16:26:18.000000000","message":"It might be better to also use the msg I suggested above here for the HTTPBadRequest explanation, rather than the exception value; the latter could give too much information away.","commit_id":"27755414613839644644036ee1ba60dbab89ee22"},{"author":{"_account_id":1075,"name":"Kei Masumoto","username":"masumotok"},"change_message_id":"dd79a368b853f97eb2d43d5349fc785a8db279ef","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            readable \u003d traceback.format_exc()"},{"line_number":305,"context_line":"            LOG.exception(_(\"migrate (live) %s\"), readable)"},{"line_number":306,"context_line":"            # Return messages from scheduler"},{"line_number":307,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.value)"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":310,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAEH%2F%2F%2BMw%3D","line":307,"in_reply_to":"AAAAEH%2F%2F%2BNs%3D","updated":"2012-01-25 17:15:46.000000000","message":"This is same reason as above reply. Please tell me your opinion.","commit_id":"27755414613839644644036ee1ba60dbab89ee22"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"5a9f870c096788fb3f2aafa5da92fc653e053015","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                                                  topic\u003dFLAGS.compute_topic)"},{"line_number":303,"context_line":"        except Exception, e:"},{"line_number":304,"context_line":"            readable \u003d traceback.format_exc()"},{"line_number":305,"context_line":"            LOG.exception(_(\"migrate (live) %s\"), readable)"},{"line_number":306,"context_line":"            # Return messages from scheduler"},{"line_number":307,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.value)"},{"line_number":308,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAEH%2F%2F%2BKA%3D","line":305,"updated":"2012-01-25 17:52:50.000000000","message":"I still don\u0027t see the reason you need to pass a formatted exception to LOG.exception()—LOG.exception() does this for you.","commit_id":"b8f4e23cf227621ec9ce8a19f5c18981ac4bc49d"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"74f2bd4900de0d312e01d3537fafbccf99146502","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                                                  topic\u003dFLAGS.compute_topic)"},{"line_number":303,"context_line":"        except Exception, e:"},{"line_number":304,"context_line":"            readable \u003d traceback.format_exc()"},{"line_number":305,"context_line":"            LOG.exception(_(\"migrate (live) %s\"), readable)"},{"line_number":306,"context_line":"            # Return messages from scheduler"},{"line_number":307,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.value)"},{"line_number":308,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAEH%2F%2F%2BJ0%3D","line":305,"in_reply_to":"AAAAEH%2F%2F%2BKA%3D","updated":"2012-01-25 17:55:55.000000000","message":"Yeah, I\u0027m with Kevin here. You should use the code he suggested in his comments on patchset 12.","commit_id":"b8f4e23cf227621ec9ce8a19f5c18981ac4bc49d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f61327e5a73932d392a528fdc0bd3171cf7c79ec","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                                                  topic\u003dFLAGS.compute_topic)"},{"line_number":303,"context_line":"        except Exception, e:"},{"line_number":304,"context_line":"            readable \u003d traceback.format_exc()"},{"line_number":305,"context_line":"            LOG.exception(_(\"migrate (live) %s\"), readable)"},{"line_number":306,"context_line":"            # Return messages from scheduler"},{"line_number":307,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.message)"},{"line_number":308,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAEH%2F%2F%2BHQ%3D","line":305,"updated":"2012-01-25 19:08:30.000000000","message":"Again, I don\u0027t see a reason you need to pass a formatted exception to LOG.exception()—LOG.exception() does the exception formatting for you, for the purposes of logging.  See my suggested replacement code on the comment on patchset 12…","commit_id":"c50cb09d69b0dff8db7e12bc5fcfb58b8bdc6909"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f61327e5a73932d392a528fdc0bd3171cf7c79ec","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            readable \u003d traceback.format_exc()"},{"line_number":305,"context_line":"            LOG.exception(_(\"migrate (live) %s\"), readable)"},{"line_number":306,"context_line":"            # Return messages from scheduler"},{"line_number":307,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.message)"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":310,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAEH%2F%2F%2BHI%3D","line":307,"updated":"2012-01-25 19:08:30.000000000","message":"I *believe* that \"e.message\" is deprecated, and it\u0027s probably not what we want to be using here anyway, given how we overload it with a static message.  What I typically use is \"unicode(e)\", which should do what you\u0027re looking to do here.","commit_id":"c50cb09d69b0dff8db7e12bc5fcfb58b8bdc6909"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"36257d321b0fff29028a0f96681c6a8cbf7faf87","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        resp.headers[\u0027Location\u0027] \u003d image_ref"},{"line_number":273,"context_line":"        return resp"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    @wsgi.action(\u0027os-migrateLive\u0027)"},{"line_number":276,"context_line":"    @exception.novaclient_converter"},{"line_number":277,"context_line":"    @scheduler_api.redirect_handler"},{"line_number":278,"context_line":"    def _migrate_live(self, req, id, body):"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAEH%2F%2F98U%3D","line":275,"updated":"2012-01-25 22:37:59.000000000","message":"Should this action be prefixed with \"os-\"? No other actions in this file include the prefix.","commit_id":"9789592fb91b27e5455981586c67864d41b179f3"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"86a2a81270fc88d1b74fa3cedeba306af5dad3bb","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        resp.headers[\u0027Location\u0027] \u003d image_ref"},{"line_number":273,"context_line":"        return resp"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    @wsgi.action(\u0027os-migrateLive\u0027)"},{"line_number":276,"context_line":"    @exception.novaclient_converter"},{"line_number":277,"context_line":"    @scheduler_api.redirect_handler"},{"line_number":278,"context_line":"    def _migrate_live(self, req, id, body):"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAEH%2F%2F958%3D","line":275,"in_reply_to":"AAAAEH%2F%2F96c%3D","updated":"2012-01-25 23:17:58.000000000","message":"I didn\u0027t want to change any of the other actions in this file since there were already tools that depended them. In all extensions we add from now on, we absolutely need to prefix them with \u0027os-\u0027","commit_id":"9789592fb91b27e5455981586c67864d41b179f3"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"3d0781048c98e71e4603c5201a027dc0289345f6","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        resp.headers[\u0027Location\u0027] \u003d image_ref"},{"line_number":273,"context_line":"        return resp"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    @wsgi.action(\u0027os-migrateLive\u0027)"},{"line_number":276,"context_line":"    @exception.novaclient_converter"},{"line_number":277,"context_line":"    @scheduler_api.redirect_handler"},{"line_number":278,"context_line":"    def _migrate_live(self, req, id, body):"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAEH%2F%2F96c%3D","line":275,"in_reply_to":"AAAAEH%2F%2F978%3D","updated":"2012-01-25 23:09:35.000000000","message":"Aha, yes - I missed the comment[1] higher up in this file. Should this \"os-\" be added en-masse in a single review though? Eg, If the rest are not going to be amended in essex, should this be left consistent until F? or is the plan to slowly start using the prefix from now on?\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/admin_actions.py#L41","commit_id":"9789592fb91b27e5455981586c67864d41b179f3"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"a3f15e879a27571c98259aed4c8e4766de701d12","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        resp.headers[\u0027Location\u0027] \u003d image_ref"},{"line_number":273,"context_line":"        return resp"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    @wsgi.action(\u0027os-migrateLive\u0027)"},{"line_number":276,"context_line":"    @exception.novaclient_converter"},{"line_number":277,"context_line":"    @scheduler_api.redirect_handler"},{"line_number":278,"context_line":"    def _migrate_live(self, req, id, body):"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAEH%2F%2F978%3D","line":275,"in_reply_to":"AAAAEH%2F%2F98U%3D","updated":"2012-01-25 22:49:02.000000000","message":"That was requested by bcwaldon.  I believe the preference is to have all OpenStack extensions have their parameters prefixed by \"os-\".","commit_id":"9789592fb91b27e5455981586c67864d41b179f3"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"36257d321b0fff29028a0f96681c6a8cbf7faf87","unresolved":false,"context_lines":[{"line_number":289,"context_line":"            disk_over_commit \u003d body[\"os-migrateLive\"][\"disk_over_commit\"]"},{"line_number":290,"context_line":"            host \u003d body[\"os-migrateLive\"][\"host\"]"},{"line_number":291,"context_line":"        except (TypeError, KeyError):"},{"line_number":292,"context_line":"            msg \u003d _(\"host and block_migration must be specified.\")"},{"line_number":293,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAEH%2F%2F98Q%3D","line":292,"updated":"2012-01-25 22:37:59.000000000","message":"Should this error also include \"disk_over_commit\"?","commit_id":"9789592fb91b27e5455981586c67864d41b179f3"},{"author":{"_account_id":1075,"name":"Kei Masumoto","username":"masumotok"},"change_message_id":"ccdb266ceb5b1abbce785bbe9c73f4b2abf1a87d","unresolved":false,"context_lines":[{"line_number":289,"context_line":"            disk_over_commit \u003d body[\"os-migrateLive\"][\"disk_over_commit\"]"},{"line_number":290,"context_line":"            host \u003d body[\"os-migrateLive\"][\"host\"]"},{"line_number":291,"context_line":"        except (TypeError, KeyError):"},{"line_number":292,"context_line":"            msg \u003d _(\"host and block_migration must be specified.\")"},{"line_number":293,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAEH%2F%2F91o%3D","line":292,"in_reply_to":"AAAAEH%2F%2F98Q%3D","updated":"2012-01-26 00:55:51.000000000","message":"disk_over_commit dont always have to be added.","commit_id":"9789592fb91b27e5455981586c67864d41b179f3"}],"nova/api/openstack/compute/contrib/hosts.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"52af8893671cd8a1400df1a3cd47e7f49be97462","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    def reboot(self, req, id):"},{"line_number":170,"context_line":"        return self._host_power_action(req, host\u003did, action\u003d\"reboot\")"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def show(self, req, id):"},{"line_number":173,"context_line":"        \"\"\"Shows the physical/usage resource given by hosts."},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        :param context: security context"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAD3%2F%2F8%2Fs%3D","line":172,"updated":"2012-01-18 16:18:07.000000000","message":"You need to specify a serializer for this method.","commit_id":"a6279d0c300f73477dfdda5056a5ec165d3657ed"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"d0f504d047a6632c590741021df77145837941e5","unresolved":false,"context_lines":[{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        try:"},{"line_number":202,"context_line":"            # Update latest compute_node table"},{"line_number":203,"context_line":"            self.compute_api.update_available_resource(context, host)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"            # Getting compute node info and related instances info"},{"line_number":206,"context_line":"            compute_ref \u003d db.service_get_all_compute_by_host(context, host)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAD3%2F%2F8ho%3D","line":203,"updated":"2012-01-19 17:34:12.000000000","message":"This doesn\u0027t feel like the right place to be writing to the DB. Should this be done in the polling function on the compute manager?","commit_id":"100b612562a684ddf9403f8a592b27e8fefd5a3b"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"d0f504d047a6632c590741021df77145837941e5","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            # Getting compute node info and related instances info"},{"line_number":206,"context_line":"            compute_ref \u003d db.service_get_all_compute_by_host(context, host)"},{"line_number":207,"context_line":"            compute_ref \u003d compute_ref[0]"},{"line_number":208,"context_line":"            instance_refs \u003d db.instance_get_all_by_host(context,"},{"line_number":209,"context_line":"                                                        compute_ref[\u0027host\u0027])"},{"line_number":210,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":211,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003d_(\"Host not found\"))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAD3%2F%2F8hk%3D","line":208,"updated":"2012-01-19 17:34:12.000000000","message":"Please move this line out of the try/except if you aren\u0027t explicitly handling exceptions it might raise.","commit_id":"100b612562a684ddf9403f8a592b27e8fefd5a3b"},{"author":{"_account_id":1155,"name":"sleepsonthefloor","username":"sleepsonthefloor"},"change_message_id":"ac82d1b5bb69cdab9743d153720228441e46167e","unresolved":false,"context_lines":[{"line_number":243,"context_line":"            mem \u003d [i[\u0027memory_mb\u0027]  for i in instance_refs"},{"line_number":244,"context_line":"                   if i[\u0027project_id\u0027] \u003d\u003d project_id]"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"            disk \u003d [i[\u0027root_gb\u0027]  for i in instance_refs"},{"line_number":247,"context_line":"                    if i[\u0027project_id\u0027] \u003d\u003d project_id]"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"            usage[project_id] \u003d {\u0027vcpus\u0027: reduce(lambda x, y: x + y, vcpus),"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAEH%2F%2F%2BGU%3D","line":246,"updated":"2012-01-25 19:34:59.000000000","message":"you need to also include ephemeral_gb now","commit_id":"39c8b27e30bd5e0a10d30447abbffe6bfd1091af"},{"author":{"_account_id":1075,"name":"Kei Masumoto","username":"masumotok"},"change_message_id":"4e35e31feb6b955fa5ec1eac572ace3faa34e0fb","unresolved":false,"context_lines":[{"line_number":243,"context_line":"            mem \u003d [i[\u0027memory_mb\u0027]  for i in instance_refs"},{"line_number":244,"context_line":"                   if i[\u0027project_id\u0027] \u003d\u003d project_id]"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"            disk \u003d [i[\u0027root_gb\u0027]  for i in instance_refs"},{"line_number":247,"context_line":"                    if i[\u0027project_id\u0027] \u003d\u003d project_id]"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"            usage[project_id] \u003d {\u0027vcpus\u0027: reduce(lambda x, y: x + y, vcpus),"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAEH%2F%2F%2BFU%3D","line":246,"in_reply_to":"AAAAEH%2F%2F%2BGU%3D","updated":"2012-01-25 20:00:08.000000000","message":"OK. Fix it soon..","commit_id":"39c8b27e30bd5e0a10d30447abbffe6bfd1091af"}],"nova/api/openstack/v2/contrib/admin_actions.py":[{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"89f7d284aaeec0d8fb9b1bc509cff9583c3d4a10","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        \"\"\"Permit admins to (live) migrate a server to a new host\"\"\""},{"line_number":192,"context_line":"        context \u003d req.environ[\"nova.context\"]"},{"line_number":193,"context_line":"        \"\"\"Checking admin\"\"\""},{"line_number":194,"context_line":"        try:"},{"line_number":195,"context_line":"            user_info \u003d db.user_get(context, context.user_id)"},{"line_number":196,"context_line":"        except exception.UserNotFound:"},{"line_number":197,"context_line":"            raise exc.HTTPNotFound(explanation\u003d\"User not found\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAC3%2F%2F8x8%3D","line":194,"updated":"2011-12-14 22:26:35.000000000","message":"you can use context.is_admin:","commit_id":"8c7a9045b3f26395f3ddbb21bda202c0a8a69f12"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"e8ddfbe9fa3162dc7ec217f5cb3beddfaa549663","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        \"\"\"Permit admins to (live) migrate a server to a new host\"\"\""},{"line_number":192,"context_line":"        context \u003d req.environ[\"nova.context\"]"},{"line_number":193,"context_line":"        \"\"\"Checking admin\"\"\""},{"line_number":194,"context_line":"        try:"},{"line_number":195,"context_line":"            user_info \u003d db.user_get(context, context.user_id)"},{"line_number":196,"context_line":"        except exception.UserNotFound:"},{"line_number":197,"context_line":"            raise exc.HTTPNotFound(explanation\u003d\"User not found\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAC3%2F%2F8xw%3D","line":194,"in_reply_to":"AAAAC3%2F%2F8x8%3D","updated":"2011-12-14 22:31:08.000000000","message":"Actually, you dont need to do any admin checking here. I think the \u0027admin_only\u0027 decorator should handle it for you.","commit_id":"8c7a9045b3f26395f3ddbb21bda202c0a8a69f12"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"4e4f765aa313359a0f4bf191c48cd8f59212965e","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        \"\"\"Permit admins to (live) migrate a server to a new host\"\"\""},{"line_number":192,"context_line":"        context \u003d req.environ[\"nova.context\"]"},{"line_number":193,"context_line":"        \"\"\"Checking admin\"\"\""},{"line_number":194,"context_line":"        try:"},{"line_number":195,"context_line":"            user_info \u003d db.user_get(context, context.user_id)"},{"line_number":196,"context_line":"        except exception.UserNotFound:"},{"line_number":197,"context_line":"            raise exc.HTTPNotFound(explanation\u003d\"User not found\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAC3%2F%2F8xc%3D","line":194,"in_reply_to":"AAAAC3%2F%2F8xw%3D","updated":"2011-12-14 22:39:10.000000000","message":"Ignore me. Misunderstood the decorator.","commit_id":"8c7a9045b3f26395f3ddbb21bda202c0a8a69f12"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"bda103a5238aed5ad76238698c09d0992fa1d874","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        \"\"\"Permit admins to (live) migrate a server to a new host\"\"\""},{"line_number":192,"context_line":"        context \u003d req.environ[\"nova.context\"]"},{"line_number":193,"context_line":"        \"\"\"Checking admin\"\"\""},{"line_number":194,"context_line":"        try:"},{"line_number":195,"context_line":"            user_info \u003d db.user_get(context, context.user_id)"},{"line_number":196,"context_line":"        except exception.UserNotFound:"},{"line_number":197,"context_line":"            raise exc.HTTPNotFound(explanation\u003d\"User not found\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAC3%2F%2F8xY%3D","line":194,"in_reply_to":"AAAAC3%2F%2F8xw%3D","updated":"2011-12-14 22:39:15.000000000","message":"admin_only means \"check if the admin_only flag is set\" not check the context for admin-ness.\n\nYou will still need to check context.is_admin","commit_id":"8c7a9045b3f26395f3ddbb21bda202c0a8a69f12"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"32ae3d14cad64ab8829f268126b899f93451a815","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            result \u003d scheduler_api.live_migration(context,"},{"line_number":190,"context_line":"                         input_dict[\"migrateLive\"][\"block_migration\"],"},{"line_number":191,"context_line":"                         instance[\"id\"],"},{"line_number":192,"context_line":"                         input_dict[\"migrateLive\"][\"host\"],"},{"line_number":193,"context_line":"                         topic\u003dFLAGS.compute_topic)"},{"line_number":194,"context_line":"        except Exception, e:"},{"line_number":195,"context_line":"            readable \u003d traceback.format_exc()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAC3%2F%2F7Dg%3D","line":192,"updated":"2011-12-22 16:31:47.000000000","message":"Should have better input checking here - if the required parts of the input are missing, we should throw a BadRequest","commit_id":"ef99f39faf72c7093ac139cf76ac07a6cbb4ca10"},{"author":{"_account_id":1075,"name":"Kei Masumoto","username":"masumotok"},"change_message_id":"1316db81c7a6a25406856f7c6b2b1993074f551c","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            result \u003d scheduler_api.live_migration(context,"},{"line_number":190,"context_line":"                         input_dict[\"migrateLive\"][\"block_migration\"],"},{"line_number":191,"context_line":"                         instance[\"id\"],"},{"line_number":192,"context_line":"                         input_dict[\"migrateLive\"][\"host\"],"},{"line_number":193,"context_line":"                         topic\u003dFLAGS.compute_topic)"},{"line_number":194,"context_line":"        except Exception, e:"},{"line_number":195,"context_line":"            readable \u003d traceback.format_exc()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAC3%2F%2F6mw%3D","line":192,"in_reply_to":"AAAAC3%2F%2F7Dg%3D","updated":"2012-01-05 17:34:49.000000000","message":"Done","commit_id":"ef99f39faf72c7093ac139cf76ac07a6cbb4ca10"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"32ae3d14cad64ab8829f268126b899f93451a815","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        except Exception, e:"},{"line_number":195,"context_line":"            readable \u003d traceback.format_exc()"},{"line_number":196,"context_line":"            LOG.exception(_(\"migrate (live) %s\"), readable)"},{"line_number":197,"context_line":"            msg \u003d _(\"%s\") % e.value"},{"line_number":198,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        return webob.Response(status_int\u003d202)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAC3%2F%2F7Dc%3D","line":197,"updated":"2011-12-22 16:31:47.000000000","message":"This is pointless. A translator cannot meaningfully translate the string \"%s\"","commit_id":"ef99f39faf72c7093ac139cf76ac07a6cbb4ca10"},{"author":{"_account_id":1075,"name":"Kei Masumoto","username":"masumotok"},"change_message_id":"1316db81c7a6a25406856f7c6b2b1993074f551c","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        except Exception, e:"},{"line_number":195,"context_line":"            readable \u003d traceback.format_exc()"},{"line_number":196,"context_line":"            LOG.exception(_(\"migrate (live) %s\"), readable)"},{"line_number":197,"context_line":"            msg \u003d _(\"%s\") % e.value"},{"line_number":198,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        return webob.Response(status_int\u003d202)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAC3%2F%2F6ms%3D","line":197,"in_reply_to":"AAAAC3%2F%2F7Dc%3D","updated":"2012-01-05 17:34:49.000000000","message":"Done","commit_id":"ef99f39faf72c7093ac139cf76ac07a6cbb4ca10"}],"nova/api/openstack/v2/contrib/hosts.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9150b71c705b62bfcd5b1f0f0d12addeaa217720","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from nova import flags"},{"line_number":29,"context_line":"from nova import log as logging"},{"line_number":30,"context_line":"from nova.scheduler import api as scheduler_api"},{"line_number":31,"context_line":"from nova import db"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"LOG \u003d logging.getLogger(\"nova.api.openstack.v2.contrib.hosts\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAC3%2F%2F7r4%3D","line":31,"updated":"2011-12-20 18:13:18.000000000","message":"This import is in the wrong place; it should be between the imports for nova.compute and nova.exception, to maintain human-alphabetical ordering.","commit_id":"a72b5be9ce958824304b1c393462ceb76c321e00"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"be36fbdce55002af404a981551047ea0b9dce71d","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        return self._host_power_action(req, host\u003did, action\u003d\"reboot\")"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    @extensions.admin_only"},{"line_number":124,"context_line":"    def describe_resource(self, req, id):"},{"line_number":125,"context_line":"        \"\"\"Shows the physical/usage resource given by hosts."},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        :param context: security context"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAC3%2F%2F74g%3D","line":124,"updated":"2011-12-19 20:51:55.000000000","message":"Does it make more sense to use the \u0027show\u0027 method here rather than a collection action? I think it would be more natural if you GET a specific host that this data is returned.","commit_id":"a72b5be9ce958824304b1c393462ceb76c321e00"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"b73e537830dfcf93871cab8339e1666861fd432b","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        :returns:"},{"line_number":130,"context_line":"            example format is below."},{"line_number":131,"context_line":"            {\u0027describe_resource\u0027: [{"},{"line_number":132,"context_line":"             \u0027resource\u0027:D, \u0027usage\u0027:{proj_id1:D, proj_id2:D}}]}"},{"line_number":133,"context_line":"            D: {\u0027vcpus\u0027: 3, \u0027memory_mb\u0027: 2048, \u0027local_gb\u0027: 2048,"},{"line_number":134,"context_line":"                \u0027vcpus_used\u0027: 12, \u0027memory_mb_used\u0027: 10240,"},{"line_number":135,"context_line":"                \u0027local_gb_used\u0027: 64}"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAC3%2F%2F74o%3D","line":132,"updated":"2011-12-19 20:50:56.000000000","message":"This data structure is a bit confusing to me. Is \u0027resource\u0027 supposed to be a dict as describe below (\u0027D\u0027), and each usage entry is just a dict with vcpus, memory_mb, local_gb?","commit_id":"a72b5be9ce958824304b1c393462ceb76c321e00"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9150b71c705b62bfcd5b1f0f0d12addeaa217720","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        project_ids \u003d [i[\u0027project_id\u0027] for i in instance_refs]"},{"line_number":165,"context_line":"        project_ids \u003d list(set(project_ids))"},{"line_number":166,"context_line":"        for project_id in project_ids:"},{"line_number":167,"context_line":"            vcpus \u003d [i[\u0027vcpus\u0027] for i in instance_refs \\"},{"line_number":168,"context_line":"                if i[\u0027project_id\u0027] \u003d\u003d project_id]"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"            mem \u003d [i[\u0027memory_mb\u0027]  for i in instance_refs \\"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAC3%2F%2F7r0%3D","line":167,"updated":"2011-12-20 18:13:18.000000000","message":"There\u0027s no need for backslash continuation here; the brackets will automatically imply continuation.","commit_id":"a72b5be9ce958824304b1c393462ceb76c321e00"},{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"e0ad4007d959756c47c23741c3c01fc926d6b52e","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            instance_refs \u003d db.instance_get_all_by_host(context,"},{"line_number":143,"context_line":"                                                        compute_ref[\u0027host\u0027])"},{"line_number":144,"context_line":"        except Exception, e:"},{"line_number":145,"context_line":"            msg \u003d _(\"%s\") % e"},{"line_number":146,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        # Getting total available/used resource"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAC3%2F%2F7Os%3D","line":145,"updated":"2011-12-21 22:19:20.000000000","message":"Is this necessary? The exception message is pretty much arbitrary so I don\u0027t know how it can be translated.","commit_id":"3d2ec9bad4ff9b34e9b751d8ab9f2b32af9069d9"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":1155,"name":"sleepsonthefloor","username":"sleepsonthefloor"},"change_message_id":"817f7ae7a24f1a71cc9d4e6766622ebbb90dc88c","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    work \u003d 0"},{"line_number":473,"context_line":"    for instance in instances:"},{"line_number":474,"context_line":"        free_ram_mb -\u003d instance.memory_mb"},{"line_number":475,"context_line":"        free_disk_gb -\u003d instance.root_gb"},{"line_number":476,"context_line":"        if instance.vm_state in [vm_states.BUILDING, vm_states.REBUILDING,"},{"line_number":477,"context_line":"                                 vm_states.MIGRATING, vm_states.RESIZING]:"},{"line_number":478,"context_line":"            work +\u003d 1"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAEH%2F%2F984%3D","line":475,"updated":"2012-01-25 22:22:53.000000000","message":"you may have to adjust this calculation for ephemeral as well","commit_id":"9789592fb91b27e5455981586c67864d41b179f3"}],"nova/scheduler/api.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"32ae3d14cad64ab8829f268126b899f93451a815","unresolved":false,"context_lines":[{"line_number":409,"context_line":""},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"def live_migration(context, block_migration, instance_id, dest, topic):"},{"line_number":412,"context_line":"    \"\"\"Migrate a server to a new host\"\"\""},{"line_number":413,"context_line":"    params \u003d {\"instance_id\": instance_id,"},{"line_number":414,"context_line":"              \"dest\": dest,"},{"line_number":415,"context_line":"              \"topic\": topic,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAC3%2F%2F7DY%3D","line":412,"updated":"2011-12-22 16:31:47.000000000","message":"This feels like it should be in compute/api.py where we make e.g. the calls to scheduler\u0027s prep_resize and run_instance","commit_id":"ef99f39faf72c7093ac139cf76ac07a6cbb4ca10"},{"author":{"_account_id":1075,"name":"Kei Masumoto","username":"masumotok"},"change_message_id":"1316db81c7a6a25406856f7c6b2b1993074f551c","unresolved":false,"context_lines":[{"line_number":409,"context_line":""},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"def live_migration(context, block_migration, instance_id, dest, topic):"},{"line_number":412,"context_line":"    \"\"\"Migrate a server to a new host\"\"\""},{"line_number":413,"context_line":"    params \u003d {\"instance_id\": instance_id,"},{"line_number":414,"context_line":"              \"dest\": dest,"},{"line_number":415,"context_line":"              \"topic\": topic,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAC3%2F%2F6m0%3D","line":412,"in_reply_to":"AAAAC3%2F%2F7DY%3D","updated":"2012-01-05 17:34:49.000000000","message":"The reason why this calls scheduler API is existing live migration implementation go through scheduler. Could you give me some little more advice on this?","commit_id":"ef99f39faf72c7093ac139cf76ac07a6cbb4ca10"}],"nova/tests/api/openstack/compute/contrib/test_hosts.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"fa993de9eb7653b807abeef4822044db3bf8c2a8","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        keys \u003d [\u0027vcpus\u0027, \u0027memory_mb\u0027]"},{"line_number":248,"context_line":"        c4 \u003d self._dic_is_equal("},{"line_number":249,"context_line":"                 result[\u0027host\u0027][\u0027usage\u0027][\u0027p-01\u0027], i_ref1, keys)"},{"line_number":250,"context_line":"        disk \u003d i_ref2[\u0027root_gb\u0027]+i_ref2[\u0027ephemeral_gb\u0027]"},{"line_number":251,"context_line":"        if result[\u0027host\u0027][\u0027usage\u0027][\u0027p-01\u0027][\u0027local_gb\u0027] \u003d\u003d disk:"},{"line_number":252,"context_line":"            c6 \u003d True"},{"line_number":253,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAEH%2F%2F99E%3D","line":250,"updated":"2012-01-25 22:21:52.000000000","message":"This needs spaces around the operator; it will not pass PEP8 without it.","commit_id":"9789592fb91b27e5455981586c67864d41b179f3"}],"nova/tests/api/openstack/v2/contrib/test_admin_actions.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9150b71c705b62bfcd5b1f0f0d12addeaa217720","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from nova import test"},{"line_number":23,"context_line":"from nova.tests.api.openstack import fakes"},{"line_number":24,"context_line":"from nova.scheduler import api as scheduler_api"},{"line_number":25,"context_line":"from nova import context"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"FLAGS \u003d flags.FLAGS"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAC3%2F%2F7rw%3D","line":25,"updated":"2011-12-20 18:13:18.000000000","message":"Please re-order the imports to match with the human-alphabetical ordering specified by HACKING...","commit_id":"a72b5be9ce958824304b1c393462ceb76c321e00"}],"nova/tests/test_hosts.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9150b71c705b62bfcd5b1f0f0d12addeaa217720","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from nova.scheduler import api as scheduler_api"},{"line_number":26,"context_line":"from nova import db"},{"line_number":27,"context_line":"from nova.compute import vm_states"},{"line_number":28,"context_line":"from nova.compute import power_state"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"FLAGS \u003d flags.FLAGS"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAC3%2F%2F7ro%3D","line":28,"updated":"2011-12-20 18:13:18.000000000","message":"Please re-order imports to be compliant with HACKING.","commit_id":"a72b5be9ce958824304b1c393462ceb76c321e00"}]}
