)]}'
{"nova/network/manager.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"49f75bbc66374fdb17214eca20051c173a466d7e","unresolved":false,"context_lines":[{"line_number":977,"context_line":""},{"line_number":978,"context_line":"        # Commit the reservations"},{"line_number":979,"context_line":"        if reserved:"},{"line_number":980,"context_line":"            quotas.commit(context)"},{"line_number":981,"context_line":""},{"line_number":982,"context_line":"    def lease_fixed_ip(self, context, address):"},{"line_number":983,"context_line":"        \"\"\"Called by dhcp-bridge when ip is leased.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2F9Tc%3D","line":980,"updated":"2014-03-12 17:39:12.000000000","message":"you can actually just commit() without the if.  quota object code will not do anything if there\u0027s no reservations.  That should allow you to ditch this \u0027reserved\u0027 arg.","commit_id":"ab9eb82d74c1add072103e53a036b5dcdfa9318f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b94d7296638d56cbdbb8101eca1349c9b5ac1bae","unresolved":false,"context_lines":[{"line_number":914,"context_line":""},{"line_number":915,"context_line":"        quotas \u003d self.quotas_cls()"},{"line_number":916,"context_line":"        try:"},{"line_number":917,"context_line":"            quotas.reserve(context, fixed_ips\u003d-1)"},{"line_number":918,"context_line":"        except Exception:"},{"line_number":919,"context_line":"            LOG.exception(_(\"Failed to update usages deallocating \""},{"line_number":920,"context_line":"                            \"fixed IP\"))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F9BM%3D","line":917,"updated":"2014-03-12 18:04:40.000000000","message":"Why are you not passing in project_id here?","commit_id":"6d3a61df0b86ce82893ec02b079bb94dbc9a4e46"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cacae38d52a34a1167b97bbb2985514ce9143000","unresolved":false,"context_lines":[{"line_number":914,"context_line":""},{"line_number":915,"context_line":"        quotas \u003d self.quotas_cls()"},{"line_number":916,"context_line":"        try:"},{"line_number":917,"context_line":"            quotas.reserve(context, fixed_ips\u003d-1)"},{"line_number":918,"context_line":"        except Exception:"},{"line_number":919,"context_line":"            LOG.exception(_(\"Failed to update usages deallocating \""},{"line_number":920,"context_line":"                            \"fixed IP\"))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8vY%3D","line":917,"in_reply_to":"AAAAWH%2F%2F89s%3D","updated":"2014-03-12 18:29:33.000000000","message":"Because the object does it for us:\n\nhttps://github.com/openstack/nova/blob/master/nova/objects/quotas.py#L83","commit_id":"6d3a61df0b86ce82893ec02b079bb94dbc9a4e46"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d7a164c23e8f84fb6d5156b1a1eba77266797e45","unresolved":false,"context_lines":[{"line_number":914,"context_line":""},{"line_number":915,"context_line":"        quotas \u003d self.quotas_cls()"},{"line_number":916,"context_line":"        try:"},{"line_number":917,"context_line":"            quotas.reserve(context, fixed_ips\u003d-1)"},{"line_number":918,"context_line":"        except Exception:"},{"line_number":919,"context_line":"            LOG.exception(_(\"Failed to update usages deallocating \""},{"line_number":920,"context_line":"                            \"fixed IP\"))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8nY%3D","line":917,"in_reply_to":"AAAAWH%2F%2F8og%3D","updated":"2014-03-12 18:48:29.000000000","message":"I was expecting to actually see a unit test failure on regressing this, bu the original patch that added it didn\u0027t add unit tests to guard against regression :(","commit_id":"6d3a61df0b86ce82893ec02b079bb94dbc9a4e46"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c1c6841dafab9c61bfdf7e2f006c876e590464f9","unresolved":false,"context_lines":[{"line_number":914,"context_line":""},{"line_number":915,"context_line":"        quotas \u003d self.quotas_cls()"},{"line_number":916,"context_line":"        try:"},{"line_number":917,"context_line":"            quotas.reserve(context, fixed_ips\u003d-1)"},{"line_number":918,"context_line":"        except Exception:"},{"line_number":919,"context_line":"            LOG.exception(_(\"Failed to update usages deallocating \""},{"line_number":920,"context_line":"                            \"fixed IP\"))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8og%3D","line":917,"in_reply_to":"AAAAWH%2F%2F8vY%3D","updated":"2014-03-12 18:45:43.000000000","message":"When it\u0027s committed, the project_id on the quota object could be None so it pulls it from the context passed in, but that might not be the same tenant as what\u0027s on the instance, which is what that previous bug was fixing, I think in the case that the admin deallocated the fixed IP.","commit_id":"6d3a61df0b86ce82893ec02b079bb94dbc9a4e46"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"76e28cd735ee0451b72d0cddddb601c019e45a37","unresolved":false,"context_lines":[{"line_number":914,"context_line":""},{"line_number":915,"context_line":"        quotas \u003d self.quotas_cls()"},{"line_number":916,"context_line":"        try:"},{"line_number":917,"context_line":"            quotas.reserve(context, fixed_ips\u003d-1)"},{"line_number":918,"context_line":"        except Exception:"},{"line_number":919,"context_line":"            LOG.exception(_(\"Failed to update usages deallocating \""},{"line_number":920,"context_line":"                            \"fixed IP\"))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F89s%3D","line":917,"in_reply_to":"AAAAWH%2F%2F9BM%3D","updated":"2014-03-12 18:07:16.000000000","message":"Looks like it was added here as a bug fix:\n\nhttps://review.openstack.org/#/c/43583/","commit_id":"6d3a61df0b86ce82893ec02b079bb94dbc9a4e46"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b94d7296638d56cbdbb8101eca1349c9b5ac1bae","unresolved":false,"context_lines":[{"line_number":974,"context_line":"                self._teardown_network_on_host(context, network)"},{"line_number":975,"context_line":""},{"line_number":976,"context_line":"        # Commit the reservations"},{"line_number":977,"context_line":"        quotas.commit(context)"},{"line_number":978,"context_line":""},{"line_number":979,"context_line":"    def lease_fixed_ip(self, context, address):"},{"line_number":980,"context_line":"        \"\"\"Called by dhcp-bridge when ip is leased.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8%2F8%3D","line":977,"updated":"2014-03-12 18:04:40.000000000","message":"And here.","commit_id":"6d3a61df0b86ce82893ec02b079bb94dbc9a4e46"}],"nova/tests/network/test_manager.py":[{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"c8734421b5cd1067d51460aa5d139844b924dd3e","unresolved":false,"context_lines":[{"line_number":40,"context_line":"from nova.openstack.common import importutils"},{"line_number":41,"context_line":"from nova.openstack.common import log as logging"},{"line_number":42,"context_line":"from nova.openstack.common import processutils"},{"line_number":43,"context_line":"from nova import quota"},{"line_number":44,"context_line":"from nova import test"},{"line_number":45,"context_line":"from nova.tests import fake_instance"},{"line_number":46,"context_line":"from nova.tests import fake_ldap"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVn%2F%2By3M%3D","line":43,"updated":"2014-03-12 04:55:45.000000000","message":"This should be deleted.","commit_id":"85a957dab8b05bdcb15b08972b288bb01f7d1bff"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1c18b1431007e49464609e6c1a04ac6fca7019eb","unresolved":false,"context_lines":[{"line_number":608,"context_line":""},{"line_number":609,"context_line":"    def test_quota_driver_type(self):"},{"line_number":610,"context_line":"        self.assertEqual(quotas_obj.QuotasNoOp,"},{"line_number":611,"context_line":"                         self.network.quotas_cls)"},{"line_number":612,"context_line":""},{"line_number":613,"context_line":"    def test_vpn_allocate_fixed_ip(self):"},{"line_number":614,"context_line":"        self.mox.StubOutWithMock(db, \u0027fixed_ip_associate\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVn%2F%2BzMo%3D","line":611,"updated":"2014-03-12 03:28:54.000000000","message":"Not entirely sure I agree with this change. The driver (which is what the NoopQuotaDriver was) should not be leaked out of the object interface (which is what the QuotaNoOp object does).\n\nPut another way... I don\u0027t see a corresponding removal of self.nova.quotas._driver anywhere in this patch, so there\u0027s clearly still a duplication of quota.NoopQuotaDriver and objects.quota.QuotasNoOp, no?","commit_id":"85a957dab8b05bdcb15b08972b288bb01f7d1bff"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"338b772b8793161b684d6542b1fa61a4cbd00800","unresolved":false,"context_lines":[{"line_number":608,"context_line":""},{"line_number":609,"context_line":"    def test_quota_driver_type(self):"},{"line_number":610,"context_line":"        self.assertEqual(quotas_obj.QuotasNoOp,"},{"line_number":611,"context_line":"                         self.network.quotas_cls)"},{"line_number":612,"context_line":""},{"line_number":613,"context_line":"    def test_vpn_allocate_fixed_ip(self):"},{"line_number":614,"context_line":"        self.mox.StubOutWithMock(db, \u0027fixed_ip_associate\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2F%2Fww%3D","line":611,"in_reply_to":"AAAAVn%2F%2BzMo%3D","updated":"2014-03-12 13:23:11.000000000","message":"Hmm, what? I removed self.quota from the manager on L310 in this patch (manager.py). With that, we\u0027re totally isolated from nova.quota.* and only use the object at all. This test just validates that the VlanManager sets its quota_class to the one that does nothing, which is exactly what the test was doing before.","commit_id":"85a957dab8b05bdcb15b08972b288bb01f7d1bff"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6ea7fc63f48340fa78aa5fa986fe01c2dd5f8fc1","unresolved":false,"context_lines":[{"line_number":607,"context_line":""},{"line_number":608,"context_line":"    def test_quota_driver_type(self):"},{"line_number":609,"context_line":"        self.assertEqual(quotas_obj.QuotasNoOp,"},{"line_number":610,"context_line":"                         self.network.quotas_cls)"},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"    def test_vpn_allocate_fixed_ip(self):"},{"line_number":613,"context_line":"        self.mox.StubOutWithMock(db, \u0027fixed_ip_associate\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2F9f4%3D","line":610,"updated":"2014-03-12 17:21:43.000000000","message":"(sorry for asking a bad question; I\u0027m just trying to understand the code better)\n\nI guess what I\u0027m asking is why there is a need for a nova.quotasNoopQuotaDriver if there is a nova.objects.quota.QuotasNoOp object?","commit_id":"ab9eb82d74c1add072103e53a036b5dcdfa9318f"}]}
