)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"90d7bdf9d540b7dbeadf350d39dbeb075e0126af","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"l3-agent-list-hosting-router will now return with a new \u0027ha_state\u0027"},{"line_number":10,"context_line":"attribute, per agent. It signifies the HA state of the router on that"},{"line_number":11,"context_line":"agent."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Partially-Implements: blueprint report-ha-router-master"},{"line_number":14,"context_line":"Change-Id: Ie0f53b7565d53ff791b0cdcca20be2b4415b49cc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"9a80dd14_ba7e4719","line":11,"updated":"2015-03-19 19:58:06.000000000","message":"I noticed that it always returns this new attribute.  Maybe that is good.  I guess it can\u0027t hurt, can it?","commit_id":"3e699b8bed715740249429f4d91ec21997494c95"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ca5d605edf9ac0055c97c6397dc22ad8be23ff07","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"l3-agent-list-hosting-router will now return with a new \u0027ha_state\u0027"},{"line_number":10,"context_line":"attribute, per agent. It signifies the HA state of the router on that"},{"line_number":11,"context_line":"agent."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Partially-Implements: blueprint report-ha-router-master"},{"line_number":14,"context_line":"Change-Id: Ie0f53b7565d53ff791b0cdcca20be2b4415b49cc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"9a80dd14_5a28eb96","line":11,"in_reply_to":"9a80dd14_ba7e4719","updated":"2015-03-21 17:51:13.000000000","message":"Hmm I have to say I haven\u0027t thought of that and I\u0027m not sure what\u0027s the right thing to do. Only return it for HA routers? What would you expect from a client\u0027s point of view? I *think* I\u0027d expect a consistent return value regardless of the router type? Makes it a bit easier for clients I suppose.","commit_id":"3e699b8bed715740249429f4d91ec21997494c95"}],"neutron/db/l3_agentschedulers_db.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e780be5b6fa3ba2f1cac48cdbd07997b50588c0b","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                    self, constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":349,"context_line":"                ha_bindings \u003d self.get_ha_router_port_bindings("},{"line_number":350,"context_line":"                    context, [router_id])"},{"line_number":351,"context_line":"                for ha_binding in ha_bindings:"},{"line_number":352,"context_line":"                    if ha_binding.l3_agent_id:"},{"line_number":353,"context_line":"                        ha_states[ha_binding.l3_agent_id] \u003d ha_binding.state"},{"line_number":354,"context_line":"            for binding in bindings:"}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_c28080f9","line":351,"updated":"2014-10-07 00:57:55.000000000","message":"so bindings and ha_bindings are supposed to contain the same list of agents? Doing two separate queries and an extra loop is not \u0027pretty\u0027. We should be able to join the two tables RouterL3AgentBinding and L3HARouterAgentPortBinding on router id to come up with the binding\u0027s state. We could invoke this _get_l3_bindings_hosting_routers on steroids when the extension is available and we could wrap up this functionality in l3_hamode_db.\n\nThis way, changes to this files becomes less intrusive.\n\nHave you considered this?","commit_id":"3dfd070d040f835d920f7977728ec3d022ee4d68"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a409c8a06b767b28717f75ee1c2e8dc5f1751add","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                    self, constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":349,"context_line":"                ha_bindings \u003d self.get_ha_router_port_bindings("},{"line_number":350,"context_line":"                    context, [router_id])"},{"line_number":351,"context_line":"                for ha_binding in ha_bindings:"},{"line_number":352,"context_line":"                    if ha_binding.l3_agent_id:"},{"line_number":353,"context_line":"                        ha_states[ha_binding.l3_agent_id] \u003d ha_binding.state"},{"line_number":354,"context_line":"            for binding in bindings:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_610bfe7d","line":351,"in_reply_to":"5a890539_41860267","updated":"2014-11-19 15:04:38.000000000","message":"I went through a few iterations, and the best I could come up with makes more changes to this method instead of less. I\u0027m sure you\u0027ll like it :)","commit_id":"3dfd070d040f835d920f7977728ec3d022ee4d68"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ef70a288115218b182fd443523a7e20b09cd393f","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                    self, constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":349,"context_line":"                ha_bindings \u003d self.get_ha_router_port_bindings("},{"line_number":350,"context_line":"                    context, [router_id])"},{"line_number":351,"context_line":"                for ha_binding in ha_bindings:"},{"line_number":352,"context_line":"                    if ha_binding.l3_agent_id:"},{"line_number":353,"context_line":"                        ha_states[ha_binding.l3_agent_id] \u003d ha_binding.state"},{"line_number":354,"context_line":"            for binding in bindings:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_41860267","line":351,"in_reply_to":"9aa7fdbe_8c30ba02","updated":"2014-11-18 18:34:10.000000000","message":"I got to the implementation phase, and I think that maybe what makes more sense is for this function to get the router, ask if it\u0027s HA or not, then call one of two methods. One returns agents, the other returns tuples of agents and HA states. Still kind of ugly. Will keep thinking...","commit_id":"3dfd070d040f835d920f7977728ec3d022ee4d68"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"bb7d36732fcd3d838ef19050547ec0a6f0257964","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                    self, constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":349,"context_line":"                ha_bindings \u003d self.get_ha_router_port_bindings("},{"line_number":350,"context_line":"                    context, [router_id])"},{"line_number":351,"context_line":"                for ha_binding in ha_bindings:"},{"line_number":352,"context_line":"                    if ha_binding.l3_agent_id:"},{"line_number":353,"context_line":"                        ha_states[ha_binding.l3_agent_id] \u003d ha_binding.state"},{"line_number":354,"context_line":"            for binding in bindings:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_8c30ba02","line":351,"in_reply_to":"baa201ad_c28080f9","updated":"2014-10-22 14:32:39.000000000","message":"ha_bindings is a subset of bindings (It can be empty of course). We could perhaps do a left outer join between the bindings table and HA bindings table and encapsulate the additional logic needed in l3_hamode_db as you suggest. I think it would be simpler indeed!","commit_id":"3dfd070d040f835d920f7977728ec3d022ee4d68"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a0594a7f942a8060fd1d50b2f2ca2de620a5df14","unresolved":false,"context_lines":[{"line_number":343,"context_line":"            bindings \u003d self._get_l3_bindings_hosting_routers("},{"line_number":344,"context_line":"                context, [router_id])"},{"line_number":345,"context_line":"            results \u003d []"},{"line_number":346,"context_line":"            ha_states \u003d {}"},{"line_number":347,"context_line":"            if n_utils.is_extension_supported("},{"line_number":348,"context_line":"                    self, constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":349,"context_line":"                ha_bindings \u003d self.get_ha_router_port_bindings("}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa7fdbe_83e2ae01","line":346,"updated":"2014-10-18 07:45:12.000000000","message":"I made a suggestion here on PS2, but I didn\u0027t get a response, and the code looks unchanged. Did it get lost?","commit_id":"01171cdd26672e90af4c75632b85724cb7d32494"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"9648f8de4573bfe9350de5ef124140a3506bbdb3","unresolved":false,"context_lines":[{"line_number":343,"context_line":"            bindings \u003d self._get_l3_bindings_hosting_routers("},{"line_number":344,"context_line":"                context, [router_id])"},{"line_number":345,"context_line":"            results \u003d []"},{"line_number":346,"context_line":"            ha_states \u003d {}"},{"line_number":347,"context_line":"            if n_utils.is_extension_supported("},{"line_number":348,"context_line":"                    self, constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":349,"context_line":"                ha_bindings \u003d self.get_ha_router_port_bindings("}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa7fdbe_c6f7d257","line":346,"in_reply_to":"9aa7fdbe_6c08f62d","updated":"2014-10-23 23:31:22.000000000","message":"no worries. You deserve some rest!","commit_id":"01171cdd26672e90af4c75632b85724cb7d32494"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9666497d2303e145cc136b910bd2d668abadcac9","unresolved":false,"context_lines":[{"line_number":343,"context_line":"            bindings \u003d self._get_l3_bindings_hosting_routers("},{"line_number":344,"context_line":"                context, [router_id])"},{"line_number":345,"context_line":"            results \u003d []"},{"line_number":346,"context_line":"            ha_states \u003d {}"},{"line_number":347,"context_line":"            if n_utils.is_extension_supported("},{"line_number":348,"context_line":"                    self, constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":349,"context_line":"                ha_bindings \u003d self.get_ha_router_port_bindings("}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa7fdbe_6c08f62d","line":346,"in_reply_to":"9aa7fdbe_83e2ae01","updated":"2014-10-22 14:32:30.000000000","message":"Err, it was lost! Sorry about that. I replied on PS2. Generally, I agree. I\u0027ll only be able to take any action after the Paris summit though.","commit_id":"01171cdd26672e90af4c75632b85724cb7d32494"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"87aba3a0fd3080867b77145e3395b29a60e24ab7","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    def list_l3_agents_hosting_router(self, context, router_id):"},{"line_number":342,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":343,"context_line":"            router_db \u003d self._get_router(context, router_id)"},{"line_number":344,"context_line":"            if (n_utils.is_extension_supported("},{"line_number":345,"context_line":"                    self, constants.L3_HA_MODE_EXT_ALIAS) and"},{"line_number":346,"context_line":"                    router_db.extra_attributes.ha):"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_b50cfe3a","line":343,"updated":"2015-03-18 03:25:41.000000000","message":"Consider separating binding retrieval from conversion to an agent dict so they can be targeted separately for testing.","commit_id":"7f485c39d680d4e81d381fefd85027e5b153116b"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"da53a1e47eeaf0c629a57d5c9d9b12a740aa50af","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    def list_l3_agents_hosting_router(self, context, router_id):"},{"line_number":342,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":343,"context_line":"            router_db \u003d self._get_router(context, router_id)"},{"line_number":344,"context_line":"            if (n_utils.is_extension_supported("},{"line_number":345,"context_line":"                    self, constants.L3_HA_MODE_EXT_ALIAS) and"},{"line_number":346,"context_line":"                    router_db.extra_attributes.ha):"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_b9820250","line":343,"in_reply_to":"9a80dd14_b50cfe3a","updated":"2015-03-19 02:52:19.000000000","message":"Separating out lines 354 to 359 to a method is a good idea regardless of testability so I did, but honestly I\u0027m not sure how a test for that method would look like. I added a negative test, but a positive test would kind of require using list_l3_agents_hosting_router, which uses the method under test internally, so that\u0027d not going to happen. The alternative is providing mock data which is not a test I\u0027m comfortable writing. Please share your thoughts on the new patchset.","commit_id":"7f485c39d680d4e81d381fefd85027e5b153116b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"90d7bdf9d540b7dbeadf350d39dbeb075e0126af","unresolved":false,"context_lines":[{"line_number":346,"context_line":"            for binding in bindings:"},{"line_number":347,"context_line":"                l3_agent_dict \u003d self._make_agent_dict(binding.l3_agent)"},{"line_number":348,"context_line":"                results.append(l3_agent_dict)"},{"line_number":349,"context_line":"            if results:"},{"line_number":350,"context_line":"                return {\u0027agents\u0027: results}"},{"line_number":351,"context_line":"            else:"},{"line_number":352,"context_line":"                return {\u0027agents\u0027: []}"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_34543021","side":"PARENT","line":349,"updated":"2015-03-19 19:58:06.000000000","message":"Silly if/else.","commit_id":"dda345e09ca4cfb6ff4539f37bb33cbe748e5abc"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ca5d605edf9ac0055c97c6397dc22ad8be23ff07","unresolved":false,"context_lines":[{"line_number":346,"context_line":"            for binding in bindings:"},{"line_number":347,"context_line":"                l3_agent_dict \u003d self._make_agent_dict(binding.l3_agent)"},{"line_number":348,"context_line":"                results.append(l3_agent_dict)"},{"line_number":349,"context_line":"            if results:"},{"line_number":350,"context_line":"                return {\u0027agents\u0027: results}"},{"line_number":351,"context_line":"            else:"},{"line_number":352,"context_line":"                return {\u0027agents\u0027: []}"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_3a02570c","side":"PARENT","line":349,"in_reply_to":"9a80dd14_34543021","updated":"2015-03-21 17:51:13.000000000","message":"Yep!","commit_id":"dda345e09ca4cfb6ff4539f37bb33cbe748e5abc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"90d7bdf9d540b7dbeadf350d39dbeb075e0126af","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            if (n_utils.is_extension_supported("},{"line_number":353,"context_line":"                    self, constants.L3_HA_MODE_EXT_ALIAS) and"},{"line_number":354,"context_line":"                    router_db.extra_attributes.ha):"},{"line_number":355,"context_line":"                bindings \u003d self.get_l3_bindings_hosting_router_with_ha_states("},{"line_number":356,"context_line":"                    context, router_id)"},{"line_number":357,"context_line":"            else:"},{"line_number":358,"context_line":"                bindings \u003d self._get_l3_bindings_hosting_routers("}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_5a89cb6d","line":355,"updated":"2015-03-19 19:58:06.000000000","message":"nit:  I\u0027m not sure if this is worth a new method.  If it were inlined, this code would be a bit more symmetrical with L358-360.  You might be able to simplify further.","commit_id":"3e699b8bed715740249429f4d91ec21997494c95"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"dc8af40577ef0fce1f5614e44fed3e83f25bf497","unresolved":false,"context_lines":[{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def list_l3_agents_hosting_router(self, context, router_id):"},{"line_number":350,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":351,"context_line":"            router_db \u003d self._get_router(context, router_id)"},{"line_number":352,"context_line":"            if (n_utils.is_extension_supported("},{"line_number":353,"context_line":"                    self, constants.L3_HA_MODE_EXT_ALIAS) and"},{"line_number":354,"context_line":"                    router_db.extra_attributes.ha):"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a6ced46_33512f63","line":351,"updated":"2015-03-23 16:39:05.000000000","message":"I\u0027d rather have this penalty if the plugin supports the HA extension, so I\u0027d nest the two condition below like these:\n\n  if HA:\n    # get router\n    if router HA\n      do stuff\n\n\u003cdigression\u003e\n\nThat said, I so loathe this if/else business...but I can\u0027t fault you from looking at prior bad examples. Any reason why this was not in neutron/db/l3_hascheduler_db.py?","commit_id":"ae3e8641488c3c7bd9fe32572474f72bc30eb304"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"bf174791bb350e891bf2a7f1e82aab8d7194b16c","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":343,"context_line":"            bindings \u003d self._get_l3_bindings_hosting_routers("},{"line_number":344,"context_line":"                context, [router_id])"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        return {\u0027agents\u0027: [self._make_agent_dict(agent) for agent in bindings]}"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    def get_l3_agents(self, context, active\u003dNone, filters\u003dNone):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a6ced46_1cd6fb4f","line":345,"updated":"2015-03-23 18:55:16.000000000","message":"This change is essentially an unrelated simplification.","commit_id":"bae960e3cb24f74215a96e56d93060a6ed6d9869"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"261d71599e425f6f3a2f9034b14f929e3840dfb5","unresolved":false,"context_lines":[{"line_number":343,"context_line":"            bindings \u003d self._get_l3_bindings_hosting_routers("},{"line_number":344,"context_line":"                context, [router_id])"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        return {\u0027agents\u0027: [self._make_agent_dict(agent) for agent in bindings]}"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    def get_l3_agents(self, context, active\u003dNone, filters\u003dNone):"},{"line_number":349,"context_line":"        query \u003d context.session.query(agents_db.Agent)"}],"source_content_type":"text/x-python","patch_set":23,"id":"1a6ced46_0895d532","line":346,"updated":"2015-03-23 20:47:16.000000000","message":"prolly should be:\n\n {\u0027agents\u0027: [self._make_agent_dict(b.l3_agent) for b in bindings]}\n\nor am I barking up at the wrong tree? woof!","commit_id":"deb619a0c1728bf4d04df5f0c26d30de04ddc29a"}],"neutron/tests/unit/test_l3_schedulers.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"87aba3a0fd3080867b77145e3395b29a60e24ab7","unresolved":false,"context_lines":[{"line_number":1245,"context_line":"    def test_list_l3_agents_hosting_legacy_router(self):"},{"line_number":1246,"context_line":"        self._test_list_l3_agents_hosting_legacy_router()"},{"line_number":1247,"context_line":""},{"line_number":1248,"context_line":"    @mock.patch(\u0027neutron.common.utils.is_extension_supported\u0027,"},{"line_number":1249,"context_line":"                new\u003dlambda plugin, ext_alias: False)"},{"line_number":1250,"context_line":"    def test_list_l3_agents_hosting_router_no_l3_ha_extension(self):"},{"line_number":1251,"context_line":"        self._test_list_l3_agents_hosting_legacy_router()"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_551f425b","line":1248,"updated":"2015-03-18 03:25:41.000000000","message":"Yuck and a half.  I need to start a petition to ban this mock decorator nonsense.","commit_id":"7f485c39d680d4e81d381fefd85027e5b153116b"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"da53a1e47eeaf0c629a57d5c9d9b12a740aa50af","unresolved":false,"context_lines":[{"line_number":1245,"context_line":"    def test_list_l3_agents_hosting_legacy_router(self):"},{"line_number":1246,"context_line":"        self._test_list_l3_agents_hosting_legacy_router()"},{"line_number":1247,"context_line":""},{"line_number":1248,"context_line":"    @mock.patch(\u0027neutron.common.utils.is_extension_supported\u0027,"},{"line_number":1249,"context_line":"                new\u003dlambda plugin, ext_alias: False)"},{"line_number":1250,"context_line":"    def test_list_l3_agents_hosting_router_no_l3_ha_extension(self):"},{"line_number":1251,"context_line":"        self._test_list_l3_agents_hosting_legacy_router()"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_6c544f22","line":1248,"in_reply_to":"9a80dd14_551f425b","updated":"2015-03-19 02:52:19.000000000","message":"Done. About removing the decorator, not starting the petition.","commit_id":"7f485c39d680d4e81d381fefd85027e5b153116b"}]}
