)]}'
{"doc/source/devref/effective_neutron.rst":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"9eab8be23790606833dc626bec128d7c37f76d82","unresolved":false,"context_lines":[{"line_number":104,"context_line":"  transaction blocks, and the innermost block raises an error without proper"},{"line_number":105,"context_line":"  rollback. Consider if `savepoints \u003chttp://docs.sqlalchemy.org/en/rel_1_0/orm/session_transaction.html#using-savepoint\u003e`_"},{"line_number":106,"context_line":"  can fit your use case."},{"line_number":107,"context_line":"* If you add a relationship to a Neutron object that will be referenced in the"},{"line_number":108,"context_line":"  majority of cases where the object is retrieved, be sure to use the"},{"line_number":109,"context_line":"  lazy\u003d\u0027joined\u0027 parameter to the relationship so the related objects are loaded"},{"line_number":110,"context_line":"  as part of the same query. Otherwise, the default method is \u0027select\u0027, which"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3a7e1126_e38d9fd3","line":107,"range":{"start_line":107,"start_character":9,"end_line":107,"end_character":12},"updated":"2015-12-21 17:52:27.000000000","message":"rebase on top of https://review.openstack.org/#/c/259660/ will you be a lamb?","commit_id":"73e45821918451e65b3843cd4a8923d541191072"}],"neutron/tests/unit/db/test_db_base_plugin_v2.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"618acb7f2f9a7a9d341449261e77be54e99b3a9e","unresolved":false,"context_lines":[{"line_number":5877,"context_line":"    def setUp(self, *args, **kwargs):"},{"line_number":5878,"context_line":"        super(DbOperationBoundMixin, self).setUp(*args, **kwargs)"},{"line_number":5879,"context_line":"        engine \u003d db_api.get_engine()"},{"line_number":5880,"context_line":"        self.after_events \u003d []"},{"line_number":5881,"context_line":"        event_incrementer \u003d lambda *a, **k: self.after_events.append(a)"},{"line_number":5882,"context_line":"        event.listen(engine, \u0027after_execute\u0027, event_incrementer)"},{"line_number":5883,"context_line":"        self.addCleanup(event.remove, engine, \u0027after_execute\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_72401ba6","line":5880,"updated":"2015-12-16 02:46:22.000000000","message":"I\u0027m not sure what \u0027after\u0027 is referring to, how about just \u0027events\u0027?","commit_id":"08798d07ab4b164e0d8e196ab0984245b9a66f2c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ef1a4d234271f408f7f4c7b9a329a00f78ce4b62","unresolved":false,"context_lines":[{"line_number":5877,"context_line":"    def setUp(self, *args, **kwargs):"},{"line_number":5878,"context_line":"        super(DbOperationBoundMixin, self).setUp(*args, **kwargs)"},{"line_number":5879,"context_line":"        engine \u003d db_api.get_engine()"},{"line_number":5880,"context_line":"        self.after_events \u003d []"},{"line_number":5881,"context_line":"        event_incrementer \u003d lambda *a, **k: self.after_events.append(a)"},{"line_number":5882,"context_line":"        event.listen(engine, \u0027after_execute\u0027, event_incrementer)"},{"line_number":5883,"context_line":"        self.addCleanup(event.remove, engine, \u0027after_execute\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_ef7899f4","line":5880,"in_reply_to":"5a710552_72401ba6","updated":"2015-12-16 07:35:31.000000000","message":"was referring to \u0027after_execute\u0027, but events should work fine","commit_id":"08798d07ab4b164e0d8e196ab0984245b9a66f2c"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"618acb7f2f9a7a9d341449261e77be54e99b3a9e","unresolved":false,"context_lines":[{"line_number":5878,"context_line":"        super(DbOperationBoundMixin, self).setUp(*args, **kwargs)"},{"line_number":5879,"context_line":"        engine \u003d db_api.get_engine()"},{"line_number":5880,"context_line":"        self.after_events \u003d []"},{"line_number":5881,"context_line":"        event_incrementer \u003d lambda *a, **k: self.after_events.append(a)"},{"line_number":5882,"context_line":"        event.listen(engine, \u0027after_execute\u0027, event_incrementer)"},{"line_number":5883,"context_line":"        self.addCleanup(event.remove, engine, \u0027after_execute\u0027,"},{"line_number":5884,"context_line":"                        event_incrementer)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_d23eafd9","line":5881,"updated":"2015-12-16 02:46:22.000000000","message":"We\u0027re not actually doing anything with the events, only counting them, so for readability\u0027s sake IMO rename self.after_events to self.n_events, and change it from a list to an int, and just count the events.","commit_id":"08798d07ab4b164e0d8e196ab0984245b9a66f2c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ef1a4d234271f408f7f4c7b9a329a00f78ce4b62","unresolved":false,"context_lines":[{"line_number":5878,"context_line":"        super(DbOperationBoundMixin, self).setUp(*args, **kwargs)"},{"line_number":5879,"context_line":"        engine \u003d db_api.get_engine()"},{"line_number":5880,"context_line":"        self.after_events \u003d []"},{"line_number":5881,"context_line":"        event_incrementer \u003d lambda *a, **k: self.after_events.append(a)"},{"line_number":5882,"context_line":"        event.listen(engine, \u0027after_execute\u0027, event_incrementer)"},{"line_number":5883,"context_line":"        self.addCleanup(event.remove, engine, \u0027after_execute\u0027,"},{"line_number":5884,"context_line":"                        event_incrementer)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_efe659b3","line":5881,"in_reply_to":"5a710552_d23eafd9","updated":"2015-12-16 07:35:31.000000000","message":"good point. when i first started this the var was local to a method referenced from a closure so it wasn\u0027t possible to be a bare int.","commit_id":"08798d07ab4b164e0d8e196ab0984245b9a66f2c"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"618acb7f2f9a7a9d341449261e77be54e99b3a9e","unresolved":false,"context_lines":[{"line_number":5883,"context_line":"        self.addCleanup(event.remove, engine, \u0027after_execute\u0027,"},{"line_number":5884,"context_line":"                        event_incrementer)"},{"line_number":5885,"context_line":""},{"line_number":5886,"context_line":"    def _list_and_query_count(self, resource):"},{"line_number":5887,"context_line":"        self.after_events \u003d []"},{"line_number":5888,"context_line":"        self.assertNotEqual([], self._list(resource))"},{"line_number":5889,"context_line":"        query_count \u003d len(self.after_events)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_f22babe9","line":5886,"updated":"2015-12-16 02:46:22.000000000","message":"_list_and_query_count -\u003e _list_and_count_query?","commit_id":"08798d07ab4b164e0d8e196ab0984245b9a66f2c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ef1a4d234271f408f7f4c7b9a329a00f78ce4b62","unresolved":false,"context_lines":[{"line_number":5883,"context_line":"        self.addCleanup(event.remove, engine, \u0027after_execute\u0027,"},{"line_number":5884,"context_line":"                        event_incrementer)"},{"line_number":5885,"context_line":""},{"line_number":5886,"context_line":"    def _list_and_query_count(self, resource):"},{"line_number":5887,"context_line":"        self.after_events \u003d []"},{"line_number":5888,"context_line":"        self.assertNotEqual([], self._list(resource))"},{"line_number":5889,"context_line":"        query_count \u003d len(self.after_events)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_0fe2c59f","line":5886,"in_reply_to":"5a710552_f22babe9","updated":"2015-12-16 07:35:31.000000000","message":"Done","commit_id":"08798d07ab4b164e0d8e196ab0984245b9a66f2c"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"618acb7f2f9a7a9d341449261e77be54e99b3a9e","unresolved":false,"context_lines":[{"line_number":5891,"context_line":"        self.assertNotEqual(0, query_count)"},{"line_number":5892,"context_line":"        return query_count"},{"line_number":5893,"context_line":""},{"line_number":5894,"context_line":"    def _test_object_list_queries_constant(self, obj_creator, plural):"},{"line_number":5895,"context_line":"        obj_creator()"},{"line_number":5896,"context_line":"        before_count \u003d self._list_and_query_count(plural)"},{"line_number":5897,"context_line":"        # one more thing shouldn\u0027t change the db query count"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_d201cf6b","line":5894,"updated":"2015-12-16 02:46:22.000000000","message":"_test_object_list_queries_constant -\u003e _assert_*\n\nMuch clearer name IMO.","commit_id":"08798d07ab4b164e0d8e196ab0984245b9a66f2c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ef1a4d234271f408f7f4c7b9a329a00f78ce4b62","unresolved":false,"context_lines":[{"line_number":5891,"context_line":"        self.assertNotEqual(0, query_count)"},{"line_number":5892,"context_line":"        return query_count"},{"line_number":5893,"context_line":""},{"line_number":5894,"context_line":"    def _test_object_list_queries_constant(self, obj_creator, plural):"},{"line_number":5895,"context_line":"        obj_creator()"},{"line_number":5896,"context_line":"        before_count \u003d self._list_and_query_count(plural)"},{"line_number":5897,"context_line":"        # one more thing shouldn\u0027t change the db query count"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_6fe90980","line":5894,"in_reply_to":"5a710552_d201cf6b","updated":"2015-12-16 07:35:31.000000000","message":"Done","commit_id":"08798d07ab4b164e0d8e196ab0984245b9a66f2c"}],"neutron/tests/unit/extensions/test_l3.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"618acb7f2f9a7a9d341449261e77be54e99b3a9e","unresolved":false,"context_lines":[{"line_number":2914,"context_line":"        self.plugin \u003d TestL3NatServicePlugin()"},{"line_number":2915,"context_line":""},{"line_number":2916,"context_line":""},{"line_number":2917,"context_line":"class TestL3DbOperationBounds(test_db_base_plugin_v2.DbOperationBoundMixin,"},{"line_number":2918,"context_line":"                              L3AgentDbSepTestCase):"},{"line_number":2919,"context_line":""},{"line_number":2920,"context_line":"    def test_router_list_queries_constant(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_f574f59c","line":2917,"updated":"2015-12-16 02:46:22.000000000","message":"I think we should use the actual L3 service plugin for the create_* calls in these tests (See neutron.tests.unit.plugins.ml2.base). These tests essentially use a different L3 plugin that we don\u0027t use anywhere in production, so for example DVR or L3 HA mixins might break this test but we wouldn\u0027t know in its current iteration.","commit_id":"08798d07ab4b164e0d8e196ab0984245b9a66f2c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ef1a4d234271f408f7f4c7b9a329a00f78ce4b62","unresolved":false,"context_lines":[{"line_number":2914,"context_line":"        self.plugin \u003d TestL3NatServicePlugin()"},{"line_number":2915,"context_line":""},{"line_number":2916,"context_line":""},{"line_number":2917,"context_line":"class TestL3DbOperationBounds(test_db_base_plugin_v2.DbOperationBoundMixin,"},{"line_number":2918,"context_line":"                              L3AgentDbSepTestCase):"},{"line_number":2919,"context_line":""},{"line_number":2920,"context_line":"    def test_router_list_queries_constant(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_86d9c585","line":2917,"in_reply_to":"5a710552_f574f59c","updated":"2015-12-16 07:35:31.000000000","message":"Ah, thanks for the pointer. I was looking for where they were tested in the UT tree but didn\u0027t see them.\n\nLooks like it unearthed more perf issues too!","commit_id":"08798d07ab4b164e0d8e196ab0984245b9a66f2c"}],"neutron/tests/unit/plugins/ml2/test_plugin.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"618acb7f2f9a7a9d341449261e77be54e99b3a9e","unresolved":false,"context_lines":[{"line_number":436,"context_line":"                    self.assertEqual(204, res.status_int)"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"class TestMl2DbOperationBounds(test_plugin.DbOperationBoundMixin,"},{"line_number":440,"context_line":"                               Ml2PluginV2TestCase):"},{"line_number":441,"context_line":"    \"\"\"Test cases to assert constant query count for list operations."},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_522b9f94","line":439,"updated":"2015-12-16 02:46:22.000000000","message":"Could also do SGs if you\u0027re feeling up for it :) But this patch has no need to be comprehensive.","commit_id":"08798d07ab4b164e0d8e196ab0984245b9a66f2c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ef1a4d234271f408f7f4c7b9a329a00f78ce4b62","unresolved":false,"context_lines":[{"line_number":436,"context_line":"                    self.assertEqual(204, res.status_int)"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"class TestMl2DbOperationBounds(test_plugin.DbOperationBoundMixin,"},{"line_number":440,"context_line":"                               Ml2PluginV2TestCase):"},{"line_number":441,"context_line":"    \"\"\"Test cases to assert constant query count for list operations."},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_c6710daa","line":439,"in_reply_to":"5a710552_522b9f94","updated":"2015-12-16 07:35:31.000000000","message":"I\u0027ll slap a TODO in here so someone else can pick it up of they\u0027re up for it.","commit_id":"08798d07ab4b164e0d8e196ab0984245b9a66f2c"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"618acb7f2f9a7a9d341449261e77be54e99b3a9e","unresolved":false,"context_lines":[{"line_number":454,"context_line":"    def test_subnet_list_queries_constant(self):"},{"line_number":455,"context_line":"        with self.network() as net:"},{"line_number":456,"context_line":"            subnet_maker \u003d lambda: self._make_subnet(self.fmt, net,"},{"line_number":457,"context_line":"                                                     None, \u00271.1.1.0/24\u0027)"},{"line_number":458,"context_line":"            self._test_object_list_queries_constant(subnet_maker, \u0027subnets\u0027)"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"    def test_port_list_queries_constant(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_129f57b5","line":457,"updated":"2015-12-16 02:46:22.000000000","message":"A few options to avoid the overlapping IPs error we\u0027re getting here, since we\u0027re creating two subnets under the same network with the same CIDR:\n\n1) Change the maker to also create a network, the test will still be correct, it\u0027ll just do more than it needs to\n2) Get a random number between 0 and 2^32 - 4 and convert it to a /30 CIDR: netaddr.IPNetwork(str(netaddr.IPAddress(random.randint(0, 2**32 - 4))) + \u0027/30\u0027).cidr","commit_id":"08798d07ab4b164e0d8e196ab0984245b9a66f2c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ef1a4d234271f408f7f4c7b9a329a00f78ce4b62","unresolved":false,"context_lines":[{"line_number":454,"context_line":"    def test_subnet_list_queries_constant(self):"},{"line_number":455,"context_line":"        with self.network() as net:"},{"line_number":456,"context_line":"            subnet_maker \u003d lambda: self._make_subnet(self.fmt, net,"},{"line_number":457,"context_line":"                                                     None, \u00271.1.1.0/24\u0027)"},{"line_number":458,"context_line":"            self._test_object_list_queries_constant(subnet_maker, \u0027subnets\u0027)"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"    def test_port_list_queries_constant(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_86ab05d6","line":457,"in_reply_to":"5a710552_129f57b5","updated":"2015-12-16 07:35:31.000000000","message":"Whoops. Yeah I\u0027ll get this straightened out.","commit_id":"08798d07ab4b164e0d8e196ab0984245b9a66f2c"}]}
