)]}'
{"nova/compute/api.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"8a88f89d24769ee247e0ea7a4447dfbe377fbf34","unresolved":false,"context_lines":[{"line_number":3522,"context_line":"            reservations \u003d QUOTAS.reserve(context, project_id\u003dproject_id,"},{"line_number":3523,"context_line":"                                          user_id\u003duser_id,"},{"line_number":3524,"context_line":"                                          security_groups\u003d-1)"},{"line_number":3525,"context_line":"        except Exception:"},{"line_number":3526,"context_line":"            reservations \u003d None"},{"line_number":3527,"context_line":"            LOG.exception(_(\"Failed to update usages deallocating \""},{"line_number":3528,"context_line":"                            \"security group\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9I1E%3D","line":3525,"updated":"2013-12-16 12:54:04.000000000","message":"QUOTA.reserve can raises exception like InvalidReservationExpiration and so needs to be handled correctly in an oher level...\n\nI think we can replace Exception by the appropriate list of Quota exceptions. What do you think?","commit_id":"a8a2743f59d00de7dcd09b00e454e5be69f11e61"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"d9dcb7c10dff4ad4f5d91d1c2b2c4c2c608f08e0","unresolved":false,"context_lines":[{"line_number":3522,"context_line":"            reservations \u003d QUOTAS.reserve(context, project_id\u003dproject_id,"},{"line_number":3523,"context_line":"                                          user_id\u003duser_id,"},{"line_number":3524,"context_line":"                                          security_groups\u003d-1)"},{"line_number":3525,"context_line":"        except Exception:"},{"line_number":3526,"context_line":"            reservations \u003d None"},{"line_number":3527,"context_line":"            LOG.exception(_(\"Failed to update usages deallocating \""},{"line_number":3528,"context_line":"                            \"security group\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9IR4%3D","line":3525,"in_reply_to":"AAAATn%2F9I1E%3D","updated":"2013-12-16 14:50:11.000000000","message":"Don\u0027t think we should handle each exception here, LOG out the message would be adequate.","commit_id":"a8a2743f59d00de7dcd09b00e454e5be69f11e61"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"54cbf7eba3f67ae069a7a7fa6161fafc429bf38a","unresolved":false,"context_lines":[{"line_number":3522,"context_line":"            reservations \u003d QUOTAS.reserve(context, project_id\u003dproject_id,"},{"line_number":3523,"context_line":"                                          user_id\u003duser_id,"},{"line_number":3524,"context_line":"                                          security_groups\u003d-1)"},{"line_number":3525,"context_line":"        except Exception:"},{"line_number":3526,"context_line":"            reservations \u003d None"},{"line_number":3527,"context_line":"            LOG.exception(_(\"Failed to update usages deallocating \""},{"line_number":3528,"context_line":"                            \"security group\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9IIA%3D","line":3525,"in_reply_to":"AAAATn%2F9IR4%3D","updated":"2013-12-16 15:19:58.000000000","message":"Are you sure? Because keep \"Exception\" means we cannot handle the exception in an other part of the code.","commit_id":"a8a2743f59d00de7dcd09b00e454e5be69f11e61"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"8a88f89d24769ee247e0ea7a4447dfbe377fbf34","unresolved":false,"context_lines":[{"line_number":3524,"context_line":"                                          security_groups\u003d-1)"},{"line_number":3525,"context_line":"        except Exception:"},{"line_number":3526,"context_line":"            reservations \u003d None"},{"line_number":3527,"context_line":"            LOG.exception(_(\"Failed to update usages deallocating \""},{"line_number":3528,"context_line":"                            \"security group\"))"},{"line_number":3529,"context_line":""},{"line_number":3530,"context_line":"        LOG.audit(_(\"Delete security group %s\"), security_group[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9I08%3D","line":3527,"updated":"2013-12-16 12:54:04.000000000","message":"The level \u0027exception\u0027 is may be to high? what about \u0027warn\u0027 and to pass the exception in the message.","commit_id":"a8a2743f59d00de7dcd09b00e454e5be69f11e61"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"d9dcb7c10dff4ad4f5d91d1c2b2c4c2c608f08e0","unresolved":false,"context_lines":[{"line_number":3524,"context_line":"                                          security_groups\u003d-1)"},{"line_number":3525,"context_line":"        except Exception:"},{"line_number":3526,"context_line":"            reservations \u003d None"},{"line_number":3527,"context_line":"            LOG.exception(_(\"Failed to update usages deallocating \""},{"line_number":3528,"context_line":"                            \"security group\"))"},{"line_number":3529,"context_line":""},{"line_number":3530,"context_line":"        LOG.audit(_(\"Delete security group %s\"), security_group[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9IR0%3D","line":3527,"in_reply_to":"AAAATn%2F9I08%3D","updated":"2013-12-16 14:50:11.000000000","message":"Agree!","commit_id":"a8a2743f59d00de7dcd09b00e454e5be69f11e61"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"c2375e330d583d9808276f13333086f18323f851","unresolved":false,"context_lines":[{"line_number":3558,"context_line":"            reservations \u003d QUOTAS.reserve(context, project_id\u003dproject_id,"},{"line_number":3559,"context_line":"                                          user_id\u003duser_id,"},{"line_number":3560,"context_line":"                                          security_groups\u003d-1)"},{"line_number":3561,"context_line":"        except Exception as exc:"},{"line_number":3562,"context_line":"            reservations \u003d None"},{"line_number":3563,"context_line":"            LOG.warn(_(\"Failed to update usages deallocating \""},{"line_number":3564,"context_line":"                       \"security group: %s\"), exc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9H%2BY%3D","line":3561,"updated":"2013-12-16 15:30:30.000000000","message":"Only when expire !\u003d None, exception.InvalidReservationExpiration may be raised, and here expire is always None, so InvalidReservationExpiration will never be raised.","commit_id":"e65da5efca1c3bbd6a7574ae611bb1ee01c022af"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"d5804e35ae36fb55c0cff53907ac00b28e845383","unresolved":false,"context_lines":[{"line_number":3558,"context_line":"            reservations \u003d QUOTAS.reserve(context, project_id\u003dproject_id,"},{"line_number":3559,"context_line":"                                          user_id\u003duser_id,"},{"line_number":3560,"context_line":"                                          security_groups\u003d-1)"},{"line_number":3561,"context_line":"        except Exception as exc:"},{"line_number":3562,"context_line":"            reservations \u003d None"},{"line_number":3563,"context_line":"            LOG.warn(_(\"Failed to update usages deallocating \""},{"line_number":3564,"context_line":"                       \"security group: %s\"), exc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9H9M%3D","line":3561,"in_reply_to":"AAAATn%2F9H%2BY%3D","updated":"2013-12-16 15:32:19.000000000","message":"You are right, sorry for that.","commit_id":"e65da5efca1c3bbd6a7574ae611bb1ee01c022af"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff65806166575ac2e0c813afc350ca8a01b08a6a","unresolved":false,"context_lines":[{"line_number":3560,"context_line":"                                          security_groups\u003d-1)"},{"line_number":3561,"context_line":"        except Exception as exc:"},{"line_number":3562,"context_line":"            reservations \u003d None"},{"line_number":3563,"context_line":"            LOG.warn(_(\"Failed to update usages deallocating \""},{"line_number":3564,"context_line":"                       \"security group: %s\"), exc)"},{"line_number":3565,"context_line":""},{"line_number":3566,"context_line":"        LOG.audit(_(\"Delete security group %s\"), security_group[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2F%2FG0%3D","line":3563,"updated":"2014-01-04 22:13:21.000000000","message":"You should call this change out in the commit message and explain why the level is being changed from exception logging to warning.","commit_id":"e65da5efca1c3bbd6a7574ae611bb1ee01c022af"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"c387f4dc48251c2363e78f0c9460c9ec7b56a452","unresolved":false,"context_lines":[{"line_number":3560,"context_line":"                                          security_groups\u003d-1)"},{"line_number":3561,"context_line":"        except Exception as exc:"},{"line_number":3562,"context_line":"            reservations \u003d None"},{"line_number":3563,"context_line":"            LOG.warn(_(\"Failed to update usages deallocating \""},{"line_number":3564,"context_line":"                       \"security group: %s\"), exc)"},{"line_number":3565,"context_line":""},{"line_number":3566,"context_line":"        LOG.audit(_(\"Delete security group %s\"), security_group[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2F9%2Bo%3D","line":3563,"in_reply_to":"AAAAUH%2F%2F%2FG0%3D","updated":"2014-01-06 03:41:47.000000000","message":"Done","commit_id":"e65da5efca1c3bbd6a7574ae611bb1ee01c022af"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0eff2f5cc2d06e4de52c5d0d82484a8492357d1b","unresolved":false,"context_lines":[{"line_number":3530,"context_line":"        return groups"},{"line_number":3531,"context_line":""},{"line_number":3532,"context_line":"    def destroy(self, context, security_group):"},{"line_number":3533,"context_line":"        project_id \u003d security_group[\u0027project_id\u0027]"},{"line_number":3534,"context_line":"        user_id \u003d security_group[\u0027user_id\u0027]"},{"line_number":3535,"context_line":"        if security_group[\u0027name\u0027] in RO_SECURITY_GROUPS:"},{"line_number":3536,"context_line":"            msg \u003d _(\"Unable to delete system group \u0027%s\u0027\") % \\"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2F9Zo%3D","line":3533,"updated":"2014-01-06 07:35:37.000000000","message":"can you please move lines 3532-3533 to 3543. the reason for this is that there may be exceptions raised prior (3538 and 3542). in the event of this we saved a variable assignment","commit_id":"dff800ab30d15c4995aa3f171af7a70da637594b"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"fdbcfe3ed07d224a0b2aa2023d4dcd7421114eb8","unresolved":false,"context_lines":[{"line_number":3530,"context_line":"        return groups"},{"line_number":3531,"context_line":""},{"line_number":3532,"context_line":"    def destroy(self, context, security_group):"},{"line_number":3533,"context_line":"        project_id \u003d security_group[\u0027project_id\u0027]"},{"line_number":3534,"context_line":"        user_id \u003d security_group[\u0027user_id\u0027]"},{"line_number":3535,"context_line":"        if security_group[\u0027name\u0027] in RO_SECURITY_GROUPS:"},{"line_number":3536,"context_line":"            msg \u003d _(\"Unable to delete system group \u0027%s\u0027\") % \\"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2F9Wc%3D","line":3533,"in_reply_to":"AAAAUH%2F%2F9Zo%3D","updated":"2014-01-06 07:50:18.000000000","message":"Done","commit_id":"dff800ab30d15c4995aa3f171af7a70da637594b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0eff2f5cc2d06e4de52c5d0d82484a8492357d1b","unresolved":false,"context_lines":[{"line_number":3548,"context_line":"                                          security_groups\u003d-1)"},{"line_number":3549,"context_line":"        except Exception as exc:"},{"line_number":3550,"context_line":"            reservations \u003d None"},{"line_number":3551,"context_line":"            LOG.warn(_(\"Failed to update usages deallocating \""},{"line_number":3552,"context_line":"                       \"security group: %s\"), exc)"},{"line_number":3553,"context_line":""},{"line_number":3554,"context_line":"        LOG.audit(_(\"Delete security group %s\"), security_group[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2F9aE%3D","line":3551,"updated":"2014-01-06 07:35:37.000000000","message":"can you please use warning instead of warn?","commit_id":"dff800ab30d15c4995aa3f171af7a70da637594b"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"fdbcfe3ed07d224a0b2aa2023d4dcd7421114eb8","unresolved":false,"context_lines":[{"line_number":3548,"context_line":"                                          security_groups\u003d-1)"},{"line_number":3549,"context_line":"        except Exception as exc:"},{"line_number":3550,"context_line":"            reservations \u003d None"},{"line_number":3551,"context_line":"            LOG.warn(_(\"Failed to update usages deallocating \""},{"line_number":3552,"context_line":"                       \"security group: %s\"), exc)"},{"line_number":3553,"context_line":""},{"line_number":3554,"context_line":"        LOG.audit(_(\"Delete security group %s\"), security_group[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2F9WY%3D","line":3551,"in_reply_to":"AAAAUH%2F%2F9aE%3D","updated":"2014-01-06 07:50:18.000000000","message":"Done","commit_id":"dff800ab30d15c4995aa3f171af7a70da637594b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0eff2f5cc2d06e4de52c5d0d82484a8492357d1b","unresolved":false,"context_lines":[{"line_number":3549,"context_line":"        except Exception as exc:"},{"line_number":3550,"context_line":"            reservations \u003d None"},{"line_number":3551,"context_line":"            LOG.warn(_(\"Failed to update usages deallocating \""},{"line_number":3552,"context_line":"                       \"security group: %s\"), exc)"},{"line_number":3553,"context_line":""},{"line_number":3554,"context_line":"        LOG.audit(_(\"Delete security group %s\"), security_group[\u0027name\u0027],"},{"line_number":3555,"context_line":"                  context\u003dcontext)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2F9ZY%3D","line":3552,"updated":"2014-01-06 07:35:37.000000000","message":"can you pass exc_info\u003dTrue here. I think that this will print the exception","commit_id":"dff800ab30d15c4995aa3f171af7a70da637594b"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"fdbcfe3ed07d224a0b2aa2023d4dcd7421114eb8","unresolved":false,"context_lines":[{"line_number":3549,"context_line":"        except Exception as exc:"},{"line_number":3550,"context_line":"            reservations \u003d None"},{"line_number":3551,"context_line":"            LOG.warn(_(\"Failed to update usages deallocating \""},{"line_number":3552,"context_line":"                       \"security group: %s\"), exc)"},{"line_number":3553,"context_line":""},{"line_number":3554,"context_line":"        LOG.audit(_(\"Delete security group %s\"), security_group[\u0027name\u0027],"},{"line_number":3555,"context_line":"                  context\u003dcontext)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2F9WU%3D","line":3552,"in_reply_to":"AAAAUH%2F%2F9ZY%3D","updated":"2014-01-06 07:50:18.000000000","message":"Done","commit_id":"dff800ab30d15c4995aa3f171af7a70da637594b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ef57c6ae9ac347d77f7723cf0fbbde9bf6d18ce2","unresolved":false,"context_lines":[{"line_number":3550,"context_line":"            reservations \u003d None"},{"line_number":3551,"context_line":"            LOG.warning(_(\"Failed to update usages deallocating \""},{"line_number":3552,"context_line":"                          \"security group %s\") % security_group[\u0027id\u0027],"},{"line_number":3553,"context_line":"                          exc_info\u003dTrue)"},{"line_number":3554,"context_line":""},{"line_number":3555,"context_line":"        LOG.audit(_(\"Delete security group %s\"), security_group[\u0027name\u0027],"},{"line_number":3556,"context_line":"                  context\u003dcontext)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2F06I%3D","line":3553,"updated":"2014-01-08 00:40:10.000000000","message":"Hmm, won\u0027t this dump a stack trace?  If so, then why did we change from LOG.exception to LOG.warning?","commit_id":"a7f3665544ec5334a653178a8a718d8455d7ecbb"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"d287759219a03ec0db362119e2210647be5bdce9","unresolved":false,"context_lines":[{"line_number":3550,"context_line":"            reservations \u003d None"},{"line_number":3551,"context_line":"            LOG.warning(_(\"Failed to update usages deallocating \""},{"line_number":3552,"context_line":"                          \"security group %s\") % security_group[\u0027id\u0027],"},{"line_number":3553,"context_line":"                          exc_info\u003dTrue)"},{"line_number":3554,"context_line":""},{"line_number":3555,"context_line":"        LOG.audit(_(\"Delete security group %s\"), security_group[\u0027name\u0027],"},{"line_number":3556,"context_line":"                  context\u003dcontext)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2F02s%3D","line":3553,"in_reply_to":"AAAAUH%2F%2F06I%3D","updated":"2014-01-08 00:59:59.000000000","message":"You are right, no need to change here.","commit_id":"a7f3665544ec5334a653178a8a718d8455d7ecbb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1bd16d233b17eb228b4df6b0e7690033fb4416c1","unresolved":false,"context_lines":[{"line_number":3549,"context_line":"        except Exception:"},{"line_number":3550,"context_line":"            reservations \u003d None"},{"line_number":3551,"context_line":"            LOG.exception(_(\"Failed to update usages deallocating \""},{"line_number":3552,"context_line":"                          \"security group %s\"))"},{"line_number":3553,"context_line":""},{"line_number":3554,"context_line":"        LOG.audit(_(\"Delete security group %s\"), security_group[\u0027name\u0027],"},{"line_number":3555,"context_line":"                  context\u003dcontext)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2F0Xk%3D","line":3552,"updated":"2014-01-08 04:43:05.000000000","message":"You don\u0027t have a replacement variable for the %s in the log message.","commit_id":"74a7e08cd710ce6832a172cda80396c55fa56589"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"7b7a73223acaa790940569dc57037b7e454b7ebb","unresolved":false,"context_lines":[{"line_number":3549,"context_line":"        except Exception:"},{"line_number":3550,"context_line":"            reservations \u003d None"},{"line_number":3551,"context_line":"            LOG.exception(_(\"Failed to update usages deallocating \""},{"line_number":3552,"context_line":"                          \"security group %s\"))"},{"line_number":3553,"context_line":""},{"line_number":3554,"context_line":"        LOG.audit(_(\"Delete security group %s\"), security_group[\u0027name\u0027],"},{"line_number":3555,"context_line":"                  context\u003dcontext)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2F0Hc%3D","line":3552,"in_reply_to":"AAAAUH%2F%2F0Xk%3D","updated":"2014-01-08 06:19:24.000000000","message":"Done","commit_id":"74a7e08cd710ce6832a172cda80396c55fa56589"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3f775fcce008883a151e7d4e6b2d529f7028ab46","unresolved":false,"context_lines":[{"line_number":3556,"context_line":"            msg \u003d _(\"Security group is still in use\")"},{"line_number":3557,"context_line":"            self.raise_invalid_group(msg)"},{"line_number":3558,"context_line":""},{"line_number":3559,"context_line":"        project_id \u003d security_group[\u0027project_id\u0027]"},{"line_number":3560,"context_line":"        user_id \u003d security_group[\u0027user_id\u0027]"},{"line_number":3561,"context_line":"        # Get reservations"},{"line_number":3562,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2BC5A%3D","line":3559,"updated":"2014-01-30 17:44:57.000000000","message":"Given the way the tests are written, you only want to do this when the context is admin, right?  So why not check if the context is admin here before using the project_id/user_id from the security_group?","commit_id":"2759e070455df668cd6bbb013a64aa414e436058"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"3609f525d848a9d717b8e6f056bfc2201a0f4d23","unresolved":false,"context_lines":[{"line_number":3556,"context_line":"            msg \u003d _(\"Security group is still in use\")"},{"line_number":3557,"context_line":"            self.raise_invalid_group(msg)"},{"line_number":3558,"context_line":""},{"line_number":3559,"context_line":"        project_id \u003d security_group[\u0027project_id\u0027]"},{"line_number":3560,"context_line":"        user_id \u003d security_group[\u0027user_id\u0027]"},{"line_number":3561,"context_line":"        # Get reservations"},{"line_number":3562,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2BAFI%3D","line":3559,"in_reply_to":"AAAAUH%2F%2BC5A%3D","updated":"2014-01-31 05:14:18.000000000","message":"Done","commit_id":"2759e070455df668cd6bbb013a64aa414e436058"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8514ea084f6423c16bc4794f1797f4851d81ea41","unresolved":false,"context_lines":[{"line_number":3584,"context_line":"            msg \u003d _(\"Security group is still in use\")"},{"line_number":3585,"context_line":"            self.raise_invalid_group(msg)"},{"line_number":3586,"context_line":""},{"line_number":3587,"context_line":"        if (context.is_admin and"},{"line_number":3588,"context_line":"            context.project_id !\u003d security_group[\u0027project_id\u0027]):"},{"line_number":3589,"context_line":"            project_id \u003d security_group[\u0027project_id\u0027]"},{"line_number":3590,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F95%2FY%3D","line":3587,"updated":"2014-02-01 20:30:32.000000000","message":"The logic here is overly complicated.  What\u0027s the goal?\n\nIf you don\u0027t pass in project_id/user_id to the quota driver, it gets it from the context anyway.\n\nSo if the context is admin, do you just want to use the project_id/user_id from the security_group regardless of whether or not the context\u0027s project/user match the security groups?  That seems to be the case in the commit message and the tests.\n\nSo I\u0027d just do like this:\n\nproject_id \u003d user_id \u003d None\nif context.is_admin:\n    project_id \u003d security_group[\u0027project_id\u0027]\n    user_id \u003d security_group[\u0027user_id\u0027]\n\nRight?","commit_id":"4964f1779a17f79516b1ebd28f09f162424b3ea5"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"540d799b5738f040d517eba8bf435d12ac0ed0bc","unresolved":false,"context_lines":[{"line_number":3584,"context_line":"            msg \u003d _(\"Security group is still in use\")"},{"line_number":3585,"context_line":"            self.raise_invalid_group(msg)"},{"line_number":3586,"context_line":""},{"line_number":3587,"context_line":"        if (context.is_admin and"},{"line_number":3588,"context_line":"            context.project_id !\u003d security_group[\u0027project_id\u0027]):"},{"line_number":3589,"context_line":"            project_id \u003d security_group[\u0027project_id\u0027]"},{"line_number":3590,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F95xA%3D","line":3587,"in_reply_to":"AAAAUH%2F95%2FY%3D","updated":"2014-02-02 01:25:48.000000000","message":"Done","commit_id":"4964f1779a17f79516b1ebd28f09f162424b3ea5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"857f545a775a82eabf808914dcaf6e15d24febab","unresolved":false,"context_lines":[{"line_number":3658,"context_line":"            self.raise_invalid_group(msg)"},{"line_number":3659,"context_line":""},{"line_number":3660,"context_line":"        quotas \u003d quotas_obj.Quotas()"},{"line_number":3661,"context_line":"        quota_project, quota_user \u003d quotas_obj.ids_from_security_group(context,"},{"line_number":3662,"context_line":"                                                                security_group)"},{"line_number":3663,"context_line":"        try:"},{"line_number":3664,"context_line":"            quotas.reserve(context, project_id\u003dquota_project,"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAWH%2F%2BsLI%3D","line":3661,"updated":"2014-03-25 02:26:40.000000000","message":"This is a slight nit but can you drop context to the next line so the args are on the same line, then we don\u0027t have the odd alignment.","commit_id":"34e10cd21fbfd6cb22de102ffa4cd9ef3febd72a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"857f545a775a82eabf808914dcaf6e15d24febab","unresolved":false,"context_lines":[{"line_number":3672,"context_line":"        self.db.security_group_destroy(context, security_group[\u0027id\u0027])"},{"line_number":3673,"context_line":""},{"line_number":3674,"context_line":"        # Commit the reservations"},{"line_number":3675,"context_line":"        quotas.commit()"},{"line_number":3676,"context_line":""},{"line_number":3677,"context_line":"    def is_associated_with_server(self, security_group, instance_uuid):"},{"line_number":3678,"context_line":"        \"\"\"Check if the security group is already associated"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAWH%2F%2BsKw%3D","line":3675,"updated":"2014-03-25 02:26:40.000000000","message":"If quotas.reserve failed, there is no point in doing the commit, but I guess that\u0027s fine since the commit() method will no-op if there are no reservations.","commit_id":"34e10cd21fbfd6cb22de102ffa4cd9ef3febd72a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"52dc4465c8260d942faf5e748941927d2c2cc853","unresolved":false,"context_lines":[{"line_number":3672,"context_line":"        self.db.security_group_destroy(context, security_group[\u0027id\u0027])"},{"line_number":3673,"context_line":""},{"line_number":3674,"context_line":"        # Commit the reservations"},{"line_number":3675,"context_line":"        quotas.commit()"},{"line_number":3676,"context_line":""},{"line_number":3677,"context_line":"    def is_associated_with_server(self, security_group, instance_uuid):"},{"line_number":3678,"context_line":"        \"\"\"Check if the security group is already associated"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAWH%2F%2Bmhg%3D","line":3675,"in_reply_to":"AAAAWH%2F%2BreM%3D","updated":"2014-03-25 16:21:47.000000000","message":"Right, like I said. :)\n\nI like talking to myself sometimes while doing reviews.","commit_id":"34e10cd21fbfd6cb22de102ffa4cd9ef3febd72a"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"5458f902a431f9dde04c6fdb7a698c7036f769ea","unresolved":false,"context_lines":[{"line_number":3672,"context_line":"        self.db.security_group_destroy(context, security_group[\u0027id\u0027])"},{"line_number":3673,"context_line":""},{"line_number":3674,"context_line":"        # Commit the reservations"},{"line_number":3675,"context_line":"        quotas.commit()"},{"line_number":3676,"context_line":""},{"line_number":3677,"context_line":"    def is_associated_with_server(self, security_group, instance_uuid):"},{"line_number":3678,"context_line":"        \"\"\"Check if the security group is already associated"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAWH%2F%2BreM%3D","line":3675,"in_reply_to":"AAAAWH%2F%2BsKw%3D","updated":"2014-03-25 04:57:12.000000000","message":"It\u0027s actually fine..  the quotas object code would not have any reservations and this will become a noop.","commit_id":"34e10cd21fbfd6cb22de102ffa4cd9ef3febd72a"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"9691fc3a839a292ba93d3e6600c7e192739c58ba","unresolved":false,"context_lines":[{"line_number":3659,"context_line":""},{"line_number":3660,"context_line":"        quotas \u003d quotas_obj.Quotas()"},{"line_number":3661,"context_line":"        quota_project, quota_user \u003d quotas_obj.ids_from_security_group("},{"line_number":3662,"context_line":"                                                                context,"},{"line_number":3663,"context_line":"                                                                security_group)"},{"line_number":3664,"context_line":"        try:"},{"line_number":3665,"context_line":"            quotas.reserve(context, project_id\u003dquota_project,"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2Brd0%3D","line":3662,"updated":"2014-03-25 05:04:29.000000000","message":"This should actually just be a double indent, instead of pushing it to the right so far.  Matt wasn\u0027t clear enough ;)","commit_id":"fd8aedf883a1a41c558bc2fe2a52edd3d869b196"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c8bdb93554c9bba08eb8f50b7a29e43003feb4c","unresolved":false,"context_lines":[{"line_number":3659,"context_line":""},{"line_number":3660,"context_line":"        quotas \u003d quotas_obj.Quotas()"},{"line_number":3661,"context_line":"        quota_project, quota_user \u003d quotas_obj.ids_from_security_group("},{"line_number":3662,"context_line":"                                                                context,"},{"line_number":3663,"context_line":"                                                                security_group)"},{"line_number":3664,"context_line":"        try:"},{"line_number":3665,"context_line":"            quotas.reserve(context, project_id\u003dquota_project,"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2Bmgk%3D","line":3662,"in_reply_to":"AAAAWH%2F%2Bqqg%3D","updated":"2014-03-25 16:23:36.000000000","message":"Yeah, sorry, it was implied I guess.","commit_id":"fd8aedf883a1a41c558bc2fe2a52edd3d869b196"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"6493ce0e5a67e7b5977936c40606f6dd0a2189f2","unresolved":false,"context_lines":[{"line_number":3659,"context_line":""},{"line_number":3660,"context_line":"        quotas \u003d quotas_obj.Quotas()"},{"line_number":3661,"context_line":"        quota_project, quota_user \u003d quotas_obj.ids_from_security_group("},{"line_number":3662,"context_line":"                                                                context,"},{"line_number":3663,"context_line":"                                                                security_group)"},{"line_number":3664,"context_line":"        try:"},{"line_number":3665,"context_line":"            quotas.reserve(context, project_id\u003dquota_project,"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2Bqqg%3D","line":3662,"in_reply_to":"AAAAWH%2F%2Brd0%3D","updated":"2014-03-25 07:16:42.000000000","message":"Done","commit_id":"fd8aedf883a1a41c558bc2fe2a52edd3d869b196"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"9691fc3a839a292ba93d3e6600c7e192739c58ba","unresolved":false,"context_lines":[{"line_number":3673,"context_line":"        self.db.security_group_destroy(context, security_group[\u0027id\u0027])"},{"line_number":3674,"context_line":""},{"line_number":3675,"context_line":"        # Commit the reservations"},{"line_number":3676,"context_line":"        quotas.commit()"},{"line_number":3677,"context_line":""},{"line_number":3678,"context_line":"    def is_associated_with_server(self, security_group, instance_uuid):"},{"line_number":3679,"context_line":"        \"\"\"Check if the security group is already associated"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2BrdI%3D","line":3676,"updated":"2014-03-25 05:04:29.000000000","message":"For when Matt circles back around to it, this is the way I would expect it.  If quotas.reserve() failed, there will be no reservations, so this will end up being a no-op.","commit_id":"fd8aedf883a1a41c558bc2fe2a52edd3d869b196"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c8bdb93554c9bba08eb8f50b7a29e43003feb4c","unresolved":false,"context_lines":[{"line_number":3673,"context_line":"        self.db.security_group_destroy(context, security_group[\u0027id\u0027])"},{"line_number":3674,"context_line":""},{"line_number":3675,"context_line":"        # Commit the reservations"},{"line_number":3676,"context_line":"        quotas.commit()"},{"line_number":3677,"context_line":""},{"line_number":3678,"context_line":"    def is_associated_with_server(self, security_group, instance_uuid):"},{"line_number":3679,"context_line":"        \"\"\"Check if the security group is already associated"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2Bmgs%3D","line":3676,"in_reply_to":"AAAAWH%2F%2BrdI%3D","updated":"2014-03-25 16:23:36.000000000","message":"Cripes.","commit_id":"fd8aedf883a1a41c558bc2fe2a52edd3d869b196"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9455343a374d273f39c7cf6356872cf50b80b15f","unresolved":false,"context_lines":[{"line_number":3672,"context_line":"        self.db.security_group_destroy(context, security_group[\u0027id\u0027])"},{"line_number":3673,"context_line":""},{"line_number":3674,"context_line":"        # Commit the reservations"},{"line_number":3675,"context_line":"        quotas.commit()"},{"line_number":3676,"context_line":""},{"line_number":3677,"context_line":"    def is_associated_with_server(self, security_group, instance_uuid):"},{"line_number":3678,"context_line":"        \"\"\"Check if the security group is already associated"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAWH%2F%2Bmfo%3D","line":3675,"updated":"2014-03-25 16:27:50.000000000","message":"Chris, just so we\u0027re clear, this is a no-op if reserve fails. :P","commit_id":"b25ae9a152591904ff9cb700fafb473e346f0045"}],"nova/objects/quotas.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"857f545a775a82eabf808914dcaf6e15d24febab","unresolved":false,"context_lines":[{"line_number":34,"context_line":"# TODO(lyj): This method needs to be cleaned up once the"},{"line_number":35,"context_line":"# ids_from_instance helper method is renamed or some common"},{"line_number":36,"context_line":"# method is added for objects.quotas."},{"line_number":37,"context_line":"def ids_from_security_group(context, security_group):"},{"line_number":38,"context_line":"    if (context.is_admin and"},{"line_number":39,"context_line":"            context.project_id !\u003d security_group[\u0027project_id\u0027]):"},{"line_number":40,"context_line":"        project_id \u003d security_group[\u0027project_id\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAWH%2F%2BsJI%3D","line":37,"updated":"2014-03-25 02:26:40.000000000","message":"comstud: what do you think about just having this method call self.ids_from_instance(context, security_group)?  Sure security_group isn\u0027t an instance, but it has the fields we care about and we have the separate helper method for external callers.","commit_id":"34e10cd21fbfd6cb22de102ffa4cd9ef3febd72a"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"5458f902a431f9dde04c6fdb7a698c7036f769ea","unresolved":false,"context_lines":[{"line_number":34,"context_line":"# TODO(lyj): This method needs to be cleaned up once the"},{"line_number":35,"context_line":"# ids_from_instance helper method is renamed or some common"},{"line_number":36,"context_line":"# method is added for objects.quotas."},{"line_number":37,"context_line":"def ids_from_security_group(context, security_group):"},{"line_number":38,"context_line":"    if (context.is_admin and"},{"line_number":39,"context_line":"            context.project_id !\u003d security_group[\u0027project_id\u0027]):"},{"line_number":40,"context_line":"        project_id \u003d security_group[\u0027project_id\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAWH%2F%2BreI%3D","line":37,"in_reply_to":"AAAAWH%2F%2BsJI%3D","updated":"2014-03-25 04:57:12.000000000","message":"I\u0027m not going to be picky about it. :)  Either way.","commit_id":"34e10cd21fbfd6cb22de102ffa4cd9ef3febd72a"}],"nova/tests/api/openstack/compute/contrib/test_neutron_security_groups.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"857f545a775a82eabf808914dcaf6e15d24febab","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                                      sg[\u0027id\u0027])"},{"line_number":166,"context_line":"        self.controller.delete(req, sg[\u0027id\u0027])"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def test_delete_security_group_by_admin(self):"},{"line_number":169,"context_line":"        sg \u003d self._create_sg_template().get(\u0027security_group\u0027)"},{"line_number":170,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/os-security-groups/%s\u0027 %"},{"line_number":171,"context_line":"                                      sg[\u0027id\u0027], use_admin_context\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAWH%2F%2BsIo%3D","line":168,"updated":"2014-03-25 02:26:40.000000000","message":"So how are we validating that the proper user_id/project_id are being passed for the quotas reserve/commit here?","commit_id":"34e10cd21fbfd6cb22de102ffa4cd9ef3febd72a"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"602de22162dbb907ba55ed0021411b59fd5ec140","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                                      sg[\u0027id\u0027])"},{"line_number":166,"context_line":"        self.controller.delete(req, sg[\u0027id\u0027])"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def test_delete_security_group_by_admin(self):"},{"line_number":169,"context_line":"        pass"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def test_delete_security_group_in_use(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAWH%2F%2Bqpk%3D","line":168,"updated":"2014-03-25 07:16:57.000000000","message":"This method must be specified, otherwise it will be an test error for nova.tests.api.openstack.compute.contrib.test_neutron_security_groups.TestNeutronSecurityGroups.test_delete_security_group_by_admin","commit_id":"b25ae9a152591904ff9cb700fafb473e346f0045"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"18db493f3de7a90f5d19ac3c50d7df62e2e1aa21","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                                      sg[\u0027id\u0027])"},{"line_number":166,"context_line":"        self.controller.delete(req, sg[\u0027id\u0027])"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def test_delete_security_group_by_admin(self):"},{"line_number":169,"context_line":"        pass"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def test_delete_security_group_in_use(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAWH%2F%2BZvQ%3D","line":168,"in_reply_to":"AAAAWH%2F%2Bi1Q%3D","updated":"2014-03-27 02:34:55.000000000","message":"When we using the neutron security_group api, the neutronclient will be used to do the related operations, and the quota related methods in nova will never be called here. The fix is tested actually in test_neutron_security_groups.py. I think this test here is just for avoiding the error in patch set 19, and the test is reverted to patch set 18 in patch set 21 as you said.","commit_id":"b25ae9a152591904ff9cb700fafb473e346f0045"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"20ac254ee31b1da49f977db1d8662dd44c97d28e","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                                      sg[\u0027id\u0027])"},{"line_number":166,"context_line":"        self.controller.delete(req, sg[\u0027id\u0027])"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def test_delete_security_group_by_admin(self):"},{"line_number":169,"context_line":"        pass"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def test_delete_security_group_in_use(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAWH%2F%2Bi1Q%3D","line":168,"in_reply_to":"AAAAWH%2F%2Bi4g%3D","updated":"2014-03-26 02:03:47.000000000","message":"test_create_security_group_quota_limit is a pass and says \u0027Enforced by Neutron server\u0027 which to me is not acceptable.  We can certainly mock out the neutron backend or at least the quotas object\u0027s commit/reserve methods and assert they are called with the appropriate arguments.  The whole point of this fix is to make sure those methods are called with the correct arguments.","commit_id":"b25ae9a152591904ff9cb700fafb473e346f0045"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"8689a06142ed16ac4467f6d071a5c31d7faace0c","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                                      sg[\u0027id\u0027])"},{"line_number":166,"context_line":"        self.controller.delete(req, sg[\u0027id\u0027])"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def test_delete_security_group_by_admin(self):"},{"line_number":169,"context_line":"        pass"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def test_delete_security_group_in_use(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAWH%2F%2Bi4g%3D","line":168,"in_reply_to":"AAAAWH%2F%2BmYQ%3D","updated":"2014-03-26 01:54:20.000000000","message":"Because the quotas here is enforced by neutron server, so there is no way to _assert_security_groups_in_use here. See also test_create_security_group_quota_limit.","commit_id":"b25ae9a152591904ff9cb700fafb473e346f0045"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7dc657896957d275fee084aa6cc6c7d779ebb567","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                                      sg[\u0027id\u0027])"},{"line_number":166,"context_line":"        self.controller.delete(req, sg[\u0027id\u0027])"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def test_delete_security_group_by_admin(self):"},{"line_number":169,"context_line":"        pass"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def test_delete_security_group_in_use(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAWH%2F%2BmYQ%3D","line":168,"in_reply_to":"AAAAWH%2F%2Bmds%3D","updated":"2014-03-25 16:35:17.000000000","message":"Oh I see so you updated the parent class for the new test, but why doesn\u0027t this test also call _assert_security_groups_in_use?\n\nIt should at least be like what you had in patch set 18.","commit_id":"b25ae9a152591904ff9cb700fafb473e346f0045"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9455343a374d273f39c7cf6356872cf50b80b15f","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                                      sg[\u0027id\u0027])"},{"line_number":166,"context_line":"        self.controller.delete(req, sg[\u0027id\u0027])"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def test_delete_security_group_by_admin(self):"},{"line_number":169,"context_line":"        pass"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def test_delete_security_group_in_use(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAWH%2F%2Bmds%3D","line":168,"in_reply_to":"AAAAWH%2F%2Bqpk%3D","updated":"2014-03-25 16:27:50.000000000","message":"So that must be because of the mixin, I didn\u0027t see that before:\n\ntest_security_groups.TestSecurityGroups\n\nSo rather than pass you should have what you had here before, which was actually calling the API.\n\nMy concern was that it\u0027s not really validating that quotas are reserved/committed with the proper project_id/user_id - can that be handled?  I\u0027m not really sure where the quota stuff handled in these tests, it must be stubbed out in the parent class?\n\nI\u0027d think we should override any stub and make sure quotas.reserve/commit are called with the proper args for a comprehensive test.","commit_id":"b25ae9a152591904ff9cb700fafb473e346f0045"}],"nova/tests/api/openstack/compute/contrib/test_security_groups.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e79cb893e22ec4bae138260eb4e10f8ca4e0699a","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            self.fake_id \u003d \u002711111111-1111-1111-1111-111111111111\u0027"},{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            self.fake_id \u003d \u002711111111\u0027"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def _assert_no_security_groups_reserved(self, context):"},{"line_number":141,"context_line":"        \"\"\"Check that no reservations are leaked during tests.\"\"\""},{"line_number":142,"context_line":"        result \u003d quota.QUOTAS.get_project_quotas(context, context.project_id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BG%2FE%3D","line":139,"updated":"2014-01-30 02:27:26.000000000","message":"Seems like you should be doing an assertion like this but with the security_group.project_id and user_id, right?","commit_id":"86fa79134c24bd6ae8ccea70b4d45449c9ef3291"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"749bb86d65263e2c64362cf372a4e81f339ad101","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            self.fake_id \u003d \u002711111111-1111-1111-1111-111111111111\u0027"},{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            self.fake_id \u003d \u002711111111\u0027"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def _assert_no_security_groups_reserved(self, context):"},{"line_number":141,"context_line":"        \"\"\"Check that no reservations are leaked during tests.\"\"\""},{"line_number":142,"context_line":"        result \u003d quota.QUOTAS.get_project_quotas(context, context.project_id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BGgs%3D","line":139,"in_reply_to":"AAAAUH%2F%2BG%2FE%3D","updated":"2014-01-30 04:35:18.000000000","message":"Done","commit_id":"86fa79134c24bd6ae8ccea70b4d45449c9ef3291"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e79cb893e22ec4bae138260eb4e10f8ca4e0699a","unresolved":false,"context_lines":[{"line_number":467,"context_line":"                          req, \u00271\u0027, {\u0027security_group\u0027: sg})"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def test_delete_security_group_by_id(self):"},{"line_number":470,"context_line":"        sg \u003d security_group_template(id\u003d1, rules\u003d[])"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        self.called \u003d False"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BG%2Fk%3D","line":470,"updated":"2014-01-30 02:27:26.000000000","message":"Pass user_id in here.","commit_id":"86fa79134c24bd6ae8ccea70b4d45449c9ef3291"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"749bb86d65263e2c64362cf372a4e81f339ad101","unresolved":false,"context_lines":[{"line_number":467,"context_line":"                          req, \u00271\u0027, {\u0027security_group\u0027: sg})"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def test_delete_security_group_by_id(self):"},{"line_number":470,"context_line":"        sg \u003d security_group_template(id\u003d1, rules\u003d[])"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        self.called \u003d False"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BGgo%3D","line":470,"in_reply_to":"AAAAUH%2F%2BG%2Fk%3D","updated":"2014-01-30 04:35:18.000000000","message":"Done","commit_id":"86fa79134c24bd6ae8ccea70b4d45449c9ef3291"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e79cb893e22ec4bae138260eb4e10f8ca4e0699a","unresolved":false,"context_lines":[{"line_number":501,"context_line":"                          req, self.fake_id)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    def test_delete_security_group_in_use(self):"},{"line_number":504,"context_line":"        sg \u003d security_group_template(id\u003d1, rules\u003d[])"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"        def security_group_in_use(context, id):"},{"line_number":507,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BG%2Fc%3D","line":504,"updated":"2014-01-30 02:27:26.000000000","message":"And here.","commit_id":"86fa79134c24bd6ae8ccea70b4d45449c9ef3291"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"749bb86d65263e2c64362cf372a4e81f339ad101","unresolved":false,"context_lines":[{"line_number":501,"context_line":"                          req, self.fake_id)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    def test_delete_security_group_in_use(self):"},{"line_number":504,"context_line":"        sg \u003d security_group_template(id\u003d1, rules\u003d[])"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"        def security_group_in_use(context, id):"},{"line_number":507,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BGgc%3D","line":504,"in_reply_to":"AAAAUH%2F%2BG%2Fc%3D","updated":"2014-01-30 04:35:18.000000000","message":"Done","commit_id":"86fa79134c24bd6ae8ccea70b4d45449c9ef3291"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"857f545a775a82eabf808914dcaf6e15d24febab","unresolved":false,"context_lines":[{"line_number":471,"context_line":"                          req, \u00271\u0027, {\u0027security_group\u0027: sg})"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"    def test_delete_security_group_by_id(self):"},{"line_number":474,"context_line":"        sg \u003d security_group_template(id\u003d1, user_id\u003d\u0027fake_user\u0027, rules\u003d[])"},{"line_number":475,"context_line":""},{"line_number":476,"context_line":"        self.called \u003d False"},{"line_number":477,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAWH%2F%2BsIc%3D","line":474,"updated":"2014-03-25 02:26:40.000000000","message":"Also need project_id here?","commit_id":"34e10cd21fbfd6cb22de102ffa4cd9ef3febd72a"}]}
