)]}'
{"neutron/api/rpc/handlers/dvr_rpc.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"66288fd19208c66d85811d5fcb9e37f4901423cf","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                         version\u003dself.DVR_RPC_VERSION)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @log.log"},{"line_number":43,"context_line":"    def get_compute_and_vip_ports_on_host_by_subnet(self, context,"},{"line_number":44,"context_line":"                                                    host, subnet):"},{"line_number":45,"context_line":"        return self.call(context,"},{"line_number":46,"context_line":"                         self.make_msg("}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_0059c78d","line":43,"updated":"2014-08-20 18:08:54.000000000","message":"I\u0027m -1 to this change.\nThat unnecessarily changes rpc api call signature.\n\nI think this method should imply that it returns all ports on host by subnet (no matter, compute or vip).\nWe can\u0027t guarantee we\u0027ll not see another kind of port, other than vip and VM\u0027s port.","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3b29f4589b9ca36cac5f0b245bbf161e1ecec8dd","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                         version\u003dself.DVR_RPC_VERSION)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @log.log"},{"line_number":43,"context_line":"    def get_compute_and_vip_ports_on_host_by_subnet(self, context,"},{"line_number":44,"context_line":"                                                    host, subnet):"},{"line_number":45,"context_line":"        return self.call(context,"},{"line_number":46,"context_line":"                         self.make_msg("}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_69e6df16","line":43,"in_reply_to":"1abeadc6_0059c78d","updated":"2014-08-21 03:37:23.000000000","message":"I\u0027m not too concerned about the change in RPC call.  This code is not widely deployed yet.  However, I\u0027d like you to work that out with enikanorov.\n\nI would like to add this.  If we want to change them name, let\u0027s get away from enumerating all the kinds of ports that we\u0027re getting here because there will be more (agree with enikanorov here)!  I know of other types of ports that will eventually need to be coupled with distributed routing.  I have a funny feeling than even router ports may need to be considered sometime in the future.\n\nLet\u0027s come up with a name that can survive those changes.  Something that says \"get the ports on the host that need distributed routing.\"","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"90cbaef0c7ba482c01a7f45091129b24442bedd7","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                         version\u003dself.DVR_RPC_VERSION)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @log.log"},{"line_number":43,"context_line":"    def get_compute_and_vip_ports_on_host_by_subnet(self, context,"},{"line_number":44,"context_line":"                                                    host, subnet):"},{"line_number":45,"context_line":"        return self.call(context,"},{"line_number":46,"context_line":"                         self.make_msg("}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_2a912b47","line":43,"in_reply_to":"1abeadc6_69e6df16","updated":"2014-08-21 07:40:47.000000000","message":"Thanks for review Eugene, Carl.\r\n\r\nAgree with both your views here.\r\n\r\nI will update the code and repost.","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"}],"neutron/common/utils.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"833d0fc62732c7a013767c01bbcfa675048467be","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        return 1"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"def is_dvr_serviced(device_owner):"},{"line_number":314,"context_line":"        \"\"\"Check if the port need to be serviced by DVR"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        Helper function to check the device owners of the"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_9d19277c","line":313,"updated":"2014-08-25 18:35:17.000000000","message":"+1  Great to consolidate this check to one place.  Thank you.","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"}],"neutron/db/dvr_mac_db.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"66288fd19208c66d85811d5fcb9e37f4901423cf","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                \u0027mac_address\u0027: dvr_mac_entry[\u0027mac_address\u0027]}"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @log.log"},{"line_number":126,"context_line":"    def get_compute_and_vip_ports_on_host_by_subnet(self, context,"},{"line_number":127,"context_line":"                                                    host, subnet):"},{"line_number":128,"context_line":"        # FIXME(vivek, salv-orlando): improve this query by adding the"},{"line_number":129,"context_line":"        # capability of filtering by binding:host_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_60da7be9","line":126,"updated":"2014-08-20 18:08:54.000000000","message":"same comment as in rpc. I don\u0027t think method name should reflect expected port types.","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3b29f4589b9ca36cac5f0b245bbf161e1ecec8dd","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                \u0027mac_address\u0027: dvr_mac_entry[\u0027mac_address\u0027]}"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @log.log"},{"line_number":126,"context_line":"    def get_compute_and_vip_ports_on_host_by_subnet(self, context,"},{"line_number":127,"context_line":"                                                    host, subnet):"},{"line_number":128,"context_line":"        # FIXME(vivek, salv-orlando): improve this query by adding the"},{"line_number":129,"context_line":"        # capability of filtering by binding:host_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_09fd6b6e","line":126,"in_reply_to":"1abeadc6_60da7be9","updated":"2014-08-21 03:37:23.000000000","message":"+1","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"66288fd19208c66d85811d5fcb9e37f4901423cf","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                  {\u0027subnet\u0027: subnet, \u0027host\u0027: host, \u0027ports\u0027: ports})"},{"line_number":136,"context_line":"        for port in ports:"},{"line_number":137,"context_line":"            device_owner \u003d port[\u0027device_owner\u0027]"},{"line_number":138,"context_line":"            if (device_owner.startswith(\u0027compute:\u0027) or"},{"line_number":139,"context_line":"                device_owner \u003d\u003d constants.DEVICE_OWNER_LOADBALANCER):"},{"line_number":140,"context_line":"                if port[portbindings.HOST_ID] \u003d\u003d host:"},{"line_number":141,"context_line":"                    port_dict \u003d self.plugin._make_port_dict(port,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_20a32350","line":138,"updated":"2014-08-20 18:08:54.000000000","message":"consider extracting this check into a separate method, so we could add additional types of ports there in the future.","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3b29f4589b9ca36cac5f0b245bbf161e1ecec8dd","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                  {\u0027subnet\u0027: subnet, \u0027host\u0027: host, \u0027ports\u0027: ports})"},{"line_number":136,"context_line":"        for port in ports:"},{"line_number":137,"context_line":"            device_owner \u003d port[\u0027device_owner\u0027]"},{"line_number":138,"context_line":"            if (device_owner.startswith(\u0027compute:\u0027) or"},{"line_number":139,"context_line":"                device_owner \u003d\u003d constants.DEVICE_OWNER_LOADBALANCER):"},{"line_number":140,"context_line":"                if port[portbindings.HOST_ID] \u003d\u003d host:"},{"line_number":141,"context_line":"                    port_dict \u003d self.plugin._make_port_dict(port,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_72287fe2","line":138,"in_reply_to":"1abeadc6_20a32350","updated":"2014-08-21 03:37:23.000000000","message":"+1  We need to be able to maintain this.  This list will grow in the future.","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"90cbaef0c7ba482c01a7f45091129b24442bedd7","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                  {\u0027subnet\u0027: subnet, \u0027host\u0027: host, \u0027ports\u0027: ports})"},{"line_number":136,"context_line":"        for port in ports:"},{"line_number":137,"context_line":"            device_owner \u003d port[\u0027device_owner\u0027]"},{"line_number":138,"context_line":"            if (device_owner.startswith(\u0027compute:\u0027) or"},{"line_number":139,"context_line":"                device_owner \u003d\u003d constants.DEVICE_OWNER_LOADBALANCER):"},{"line_number":140,"context_line":"                if port[portbindings.HOST_ID] \u003d\u003d host:"},{"line_number":141,"context_line":"                    port_dict \u003d self.plugin._make_port_dict(port,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_aaa45ba6","line":138,"in_reply_to":"1abeadc6_72287fe2","updated":"2014-08-21 07:40:47.000000000","message":"Agreed.  Will extract out for code re-use (and expansion) in the future.","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0125a4045845e70080afa76bd413590846bc10e1","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @log.log"},{"line_number":126,"context_line":"    def get_ports_on_host_by_subnet(self, context, host, subnet):"},{"line_number":127,"context_line":"        \u0027\u0027\u0027"},{"line_number":128,"context_line":"        For now this method returns only compute and LBaaS vip ports that"},{"line_number":129,"context_line":"        are of interest to DVR.  This will be expanded in future to include"},{"line_number":130,"context_line":"        other ports serviceable by DVR."}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_03a511b5","line":127,"updated":"2014-08-22 08:21:24.000000000","message":"Please use double quotes and follow docstrings guideline: http://docs.openstack.org/developer/hacking/","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6288450d75eddf4332d55c8bc04f1f519d793687","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @log.log"},{"line_number":126,"context_line":"    def get_ports_on_host_by_subnet(self, context, host, subnet):"},{"line_number":127,"context_line":"        \u0027\u0027\u0027"},{"line_number":128,"context_line":"        For now this method returns only compute and LBaaS vip ports that"},{"line_number":129,"context_line":"        are of interest to DVR.  This will be expanded in future to include"},{"line_number":130,"context_line":"        other ports serviceable by DVR."}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_3dc22585","line":127,"in_reply_to":"1abeadc6_03a511b5","updated":"2014-08-22 09:39:46.000000000","message":"Done","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0125a4045845e70080afa76bd413590846bc10e1","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    @log.log"},{"line_number":126,"context_line":"    def get_ports_on_host_by_subnet(self, context, host, subnet):"},{"line_number":127,"context_line":"        \u0027\u0027\u0027"},{"line_number":128,"context_line":"        For now this method returns only compute and LBaaS vip ports that"},{"line_number":129,"context_line":"        are of interest to DVR.  This will be expanded in future to include"},{"line_number":130,"context_line":"        other ports serviceable by DVR."},{"line_number":131,"context_line":"        \u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_c39239f5","line":128,"updated":"2014-08-22 08:21:24.000000000","message":"Not sure we should state here which exact ports are related, thus it should be updated each time is_dvr_serviced is updated.","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6288450d75eddf4332d55c8bc04f1f519d793687","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    @log.log"},{"line_number":126,"context_line":"    def get_ports_on_host_by_subnet(self, context, host, subnet):"},{"line_number":127,"context_line":"        \u0027\u0027\u0027"},{"line_number":128,"context_line":"        For now this method returns only compute and LBaaS vip ports that"},{"line_number":129,"context_line":"        are of interest to DVR.  This will be expanded in future to include"},{"line_number":130,"context_line":"        other ports serviceable by DVR."},{"line_number":131,"context_line":"        \u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_1dc72997","line":128,"in_reply_to":"1abeadc6_c39239f5","updated":"2014-08-22 09:39:46.000000000","message":"Removed this and made statement generic","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0125a4045845e70080afa76bd413590846bc10e1","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    def get_ports_on_host_by_subnet(self, context, host, subnet):"},{"line_number":127,"context_line":"        \u0027\u0027\u0027"},{"line_number":128,"context_line":"        For now this method returns only compute and LBaaS vip ports that"},{"line_number":129,"context_line":"        are of interest to DVR.  This will be expanded in future to include"},{"line_number":130,"context_line":"        other ports serviceable by DVR."},{"line_number":131,"context_line":"        \u0027\u0027\u0027"},{"line_number":132,"context_line":"        # FIXME(vivek, salv-orlando): improve this query by adding the"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_238f6d2b","line":129,"updated":"2014-08-22 08:21:24.000000000","message":"nit: This may be...","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6288450d75eddf4332d55c8bc04f1f519d793687","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    def get_ports_on_host_by_subnet(self, context, host, subnet):"},{"line_number":127,"context_line":"        \u0027\u0027\u0027"},{"line_number":128,"context_line":"        For now this method returns only compute and LBaaS vip ports that"},{"line_number":129,"context_line":"        are of interest to DVR.  This will be expanded in future to include"},{"line_number":130,"context_line":"        other ports serviceable by DVR."},{"line_number":131,"context_line":"        \u0027\u0027\u0027"},{"line_number":132,"context_line":"        # FIXME(vivek, salv-orlando): improve this query by adding the"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_9da419bb","line":129,"in_reply_to":"1abeadc6_238f6d2b","updated":"2014-08-22 09:39:46.000000000","message":"Done","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0125a4045845e70080afa76bd413590846bc10e1","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                  {\u0027subnet\u0027: subnet, \u0027host\u0027: host, \u0027ports\u0027: ports})"},{"line_number":140,"context_line":"        for port in ports:"},{"line_number":141,"context_line":"            device_owner \u003d port[\u0027device_owner\u0027]"},{"line_number":142,"context_line":"            if (device_owner.startswith(\u0027compute:\u0027) or"},{"line_number":143,"context_line":"                device_owner \u003d\u003d constants.DEVICE_OWNER_LOADBALANCER):"},{"line_number":144,"context_line":"                if port[portbindings.HOST_ID] \u003d\u003d host:"},{"line_number":145,"context_line":"                    port_dict \u003d self.plugin._make_port_dict(port,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_43ab8988","line":142,"updated":"2014-08-22 08:21:24.000000000","message":"I guess you want to use new util method here","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6288450d75eddf4332d55c8bc04f1f519d793687","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                  {\u0027subnet\u0027: subnet, \u0027host\u0027: host, \u0027ports\u0027: ports})"},{"line_number":140,"context_line":"        for port in ports:"},{"line_number":141,"context_line":"            device_owner \u003d port[\u0027device_owner\u0027]"},{"line_number":142,"context_line":"            if (device_owner.startswith(\u0027compute:\u0027) or"},{"line_number":143,"context_line":"                device_owner \u003d\u003d constants.DEVICE_OWNER_LOADBALANCER):"},{"line_number":144,"context_line":"                if port[portbindings.HOST_ID] \u003d\u003d host:"},{"line_number":145,"context_line":"                    port_dict \u003d self.plugin._make_port_dict(port,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_7de1fd28","line":142,"in_reply_to":"1abeadc6_43ab8988","updated":"2014-08-22 09:39:46.000000000","message":"Done","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0125a4045845e70080afa76bd413590846bc10e1","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                    port_dict \u003d self.plugin._make_port_dict(port,"},{"line_number":146,"context_line":"                        process_extensions\u003dFalse)"},{"line_number":147,"context_line":"                    ports_by_host.append(port_dict)"},{"line_number":148,"context_line":"        LOG.debug(\"Returning list of VM/VIP Ports on host %(host)s\""},{"line_number":149,"context_line":"                  \" for subnet %(subnet)s ports %(ports)s\","},{"line_number":150,"context_line":"                  {\u0027host\u0027: host, \u0027subnet\u0027: subnet,"},{"line_number":151,"context_line":"                   \u0027ports\u0027: ports_by_host})"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_c375d932","line":148,"updated":"2014-08-22 08:21:24.000000000","message":"Returning list of DVR related/serviced...","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6288450d75eddf4332d55c8bc04f1f519d793687","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                    port_dict \u003d self.plugin._make_port_dict(port,"},{"line_number":146,"context_line":"                        process_extensions\u003dFalse)"},{"line_number":147,"context_line":"                    ports_by_host.append(port_dict)"},{"line_number":148,"context_line":"        LOG.debug(\"Returning list of VM/VIP Ports on host %(host)s\""},{"line_number":149,"context_line":"                  \" for subnet %(subnet)s ports %(ports)s\","},{"line_number":150,"context_line":"                  {\u0027host\u0027: host, \u0027subnet\u0027: subnet,"},{"line_number":151,"context_line":"                   \u0027ports\u0027: ports_by_host})"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_fdcc2dbd","line":148,"in_reply_to":"1abeadc6_c375d932","updated":"2014-08-22 09:39:46.000000000","message":"Done","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5e389c9b59f036a2250e3e340b5bf59473e1d42e","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        \"\"\"Returns ports of interest, on a given subnet in the input host"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        This method returns ports that need to be serviced by DVR."},{"line_number":129,"context_line":"        This may be expanded in future, to include other ports serviceable"},{"line_number":130,"context_line":"        by DVR."},{"line_number":131,"context_line":"        :param context: rpc request context"},{"line_number":132,"context_line":"        :param host: host id to match and extract ports of interest"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_b52373bd","line":129,"updated":"2014-08-25 08:59:50.000000000","message":"This func won\u0027t be expanded, it is utils.is_dvr_serviced() wich may be, so please remove this sentense. Sorry for my misleading comment on the previos patch set.","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"367ff95786f3bfcf407052fec8550b457a55bb69","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        \"\"\"Returns ports of interest, on a given subnet in the input host"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        This method returns ports that need to be serviced by DVR."},{"line_number":129,"context_line":"        This may be expanded in future, to include other ports serviceable"},{"line_number":130,"context_line":"        by DVR."},{"line_number":131,"context_line":"        :param context: rpc request context"},{"line_number":132,"context_line":"        :param host: host id to match and extract ports of interest"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_d21c57c4","line":129,"in_reply_to":"1abeadc6_b52373bd","updated":"2014-08-26 11:17:18.000000000","message":"Done","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"}],"neutron/db/l3_agentschedulers_db.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b966d129f484478acd1bf94f417f5dab77d59e33","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        ports \u003d core_plugin.get_ports(context, filters\u003dfilter)"},{"line_number":274,"context_line":"        for port in ports:"},{"line_number":275,"context_line":"            if (\"compute:\" in port[\u0027device_owner\u0027] or"},{"line_number":276,"context_line":"                \"neutron:LOADBALANCER\" in port[\u0027device_owner\u0027] and"},{"line_number":277,"context_line":"                l3_agent[\u0027host\u0027] \u003d\u003d port[\u0027binding:host_id\u0027]):"},{"line_number":278,"context_line":"                    return True"},{"line_number":279,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_8eb9ef30","line":276,"updated":"2014-08-14 14:26:45.000000000","message":"It might make sense to turn the first two comparisons of this check a utility function, e.g. is_port_dvr_related(device_owner), to avoid duplication?","commit_id":"0e99175a471650449124d0e9afa86bf482cbc486"},{"author":{"_account_id":12737,"name":"Jacek Swiderski","email":"jacek.swiderski@codilime.com","username":"Altran"},"change_message_id":"f7bfaf7c921c83084f29ca52234d75dd2d8badfd","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        ports \u003d core_plugin.get_ports(context, filters\u003dfilter)"},{"line_number":274,"context_line":"        for port in ports:"},{"line_number":275,"context_line":"            if (\"compute:\" in port[\u0027device_owner\u0027] or"},{"line_number":276,"context_line":"                \"neutron:LOADBALANCER\" in port[\u0027device_owner\u0027] and"},{"line_number":277,"context_line":"                l3_agent[\u0027host\u0027] \u003d\u003d port[\u0027binding:host_id\u0027]):"},{"line_number":278,"context_line":"                    return True"},{"line_number":279,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_19f2999a","line":276,"updated":"2014-08-14 10:06:53.000000000","message":"There should be additional parentheses because (True or False and False) is True","commit_id":"0e99175a471650449124d0e9afa86bf482cbc486"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"055c17b27542808fa78acf3958d50a5d1a0253de","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        ports \u003d core_plugin.get_ports(context, filters\u003dfilter)"},{"line_number":274,"context_line":"        for port in ports:"},{"line_number":275,"context_line":"            if (\"compute:\" in port[\u0027device_owner\u0027] or"},{"line_number":276,"context_line":"                \"neutron:LOADBALANCER\" in port[\u0027device_owner\u0027] and"},{"line_number":277,"context_line":"                l3_agent[\u0027host\u0027] \u003d\u003d port[\u0027binding:host_id\u0027]):"},{"line_number":278,"context_line":"                    return True"},{"line_number":279,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_7c6512e0","line":276,"in_reply_to":"7ac7a964_8eb9ef30","updated":"2014-08-19 05:28:57.000000000","message":"Will address this in the next patch.","commit_id":"0e99175a471650449124d0e9afa86bf482cbc486"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"e4dde71f2b73190ee8abbf5cd3865845b28f077b","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        This should return true, if there is a VM port with"},{"line_number":327,"context_line":"        device owner \"compute:nova\" or if there is a VIP port"},{"line_number":328,"context_line":"        with devicec owner \"neutron:LOADBALANCER\"."},{"line_number":329,"context_line":"        \"\"\""},{"line_number":330,"context_line":"        if not subnet_id:"},{"line_number":331,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_3b30ffe7","line":328,"updated":"2014-08-19 06:45:02.000000000","message":"typo: devicec","commit_id":"839c5d5b460f477070491a6063a14fd13cb823c9"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7043f4e8a6c929e802c1b2943d173153fc8cebe5","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                if agentschedulers_db.AgentSchedulerDbMixin.is_eligible_agent("},{"line_number":320,"context_line":"                    active, l3_agent)]"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def check_vmexists_on_l3agent(self, context, l3_agent, router_id,"},{"line_number":323,"context_line":"                                  subnet_id):"},{"line_number":324,"context_line":"        \"\"\" This function checks for a viable port on l3agent."},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_eb03e30a","line":322,"updated":"2014-08-20 09:21:17.000000000","message":"check_viable_port_on_l3_agent? Also router_id seems redundant, however this is not related to the current patch","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6581c375340aabc408ec494751c1f8854f01dc72","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                if agentschedulers_db.AgentSchedulerDbMixin.is_eligible_agent("},{"line_number":320,"context_line":"                    active, l3_agent)]"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def check_vmexists_on_l3agent(self, context, l3_agent, router_id,"},{"line_number":323,"context_line":"                                  subnet_id):"},{"line_number":324,"context_line":"        \"\"\" This function checks for a viable port on l3agent."},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_8306ce84","line":322,"in_reply_to":"1abeadc6_eb03e30a","updated":"2014-08-20 13:17:30.000000000","message":"I fixed this method as\r\ncheck_vm_or_vip_exists_on_l3agent()","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7043f4e8a6c929e802c1b2943d173153fc8cebe5","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                                  subnet_id):"},{"line_number":324,"context_line":"        \"\"\" This function checks for a viable port on l3agent."},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        This should return true, if there is a VM port with"},{"line_number":327,"context_line":"        device owner \"compute:nova\" or if there is a VIP port"},{"line_number":328,"context_line":"        with device owner \"neutron:LOADBALANCER\"."},{"line_number":329,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_262b5231","line":326,"updated":"2014-08-20 09:21:17.000000000","message":"Consider explaining what is consedered a viable port here (a port that may have some l3 services associated with it, like floating ip etc.) I think the description of particular device owners should reside in check_if_port_dvr_related.","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6581c375340aabc408ec494751c1f8854f01dc72","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                                  subnet_id):"},{"line_number":324,"context_line":"        \"\"\" This function checks for a viable port on l3agent."},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        This should return true, if there is a VM port with"},{"line_number":327,"context_line":"        device owner \"compute:nova\" or if there is a VIP port"},{"line_number":328,"context_line":"        with device owner \"neutron:LOADBALANCER\"."},{"line_number":329,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_a30bca8c","line":326,"in_reply_to":"1abeadc6_262b5231","updated":"2014-08-20 13:17:30.000000000","message":"changed the comment explanation.","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7043f4e8a6c929e802c1b2943d173153fc8cebe5","unresolved":false,"context_lines":[{"line_number":334,"context_line":"        filter \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet_id]}}"},{"line_number":335,"context_line":"        ports \u003d core_plugin.get_ports(context, filters\u003dfilter)"},{"line_number":336,"context_line":"        for port in ports:"},{"line_number":337,"context_line":"            if (core_plugin.check_if_port_dvr_related("},{"line_number":338,"context_line":"                context, port[\u0027device_owner\u0027]) and"},{"line_number":339,"context_line":"                l3_agent[\u0027host\u0027] \u003d\u003d port[\u0027binding:host_id\u0027]):"},{"line_number":340,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_06e9f6b7","line":337,"updated":"2014-08-20 09:21:17.000000000","message":"not sure check_if_port_dvr_related is an appropriate name for the func as there is really nothing dvr related in those ports. May consider is_port_essential or smth like this","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6581c375340aabc408ec494751c1f8854f01dc72","unresolved":false,"context_lines":[{"line_number":334,"context_line":"        filter \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet_id]}}"},{"line_number":335,"context_line":"        ports \u003d core_plugin.get_ports(context, filters\u003dfilter)"},{"line_number":336,"context_line":"        for port in ports:"},{"line_number":337,"context_line":"            if (core_plugin.check_if_port_dvr_related("},{"line_number":338,"context_line":"                context, port[\u0027device_owner\u0027]) and"},{"line_number":339,"context_line":"                l3_agent[\u0027host\u0027] \u003d\u003d port[\u0027binding:host_id\u0027]):"},{"line_number":340,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_832dee00","line":337,"in_reply_to":"1abeadc6_06e9f6b7","updated":"2014-08-20 13:17:30.000000000","message":"changed the method name to check_if_port_dvr_serviced().\r\n\r\nDVR serviceable ports are compute VM ports and LBaaS VIP Ports.","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3b29f4589b9ca36cac5f0b245bbf161e1ecec8dd","unresolved":false,"context_lines":[{"line_number":331,"context_line":"            if (\"compute:\" in port[\u0027device_owner\u0027] and"},{"line_number":332,"context_line":"                l3_agent[\u0027host\u0027] \u003d\u003d port[\u0027binding:host_id\u0027]):"},{"line_number":333,"context_line":"                    return True"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        return False"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    def get_snat_candidates(self, sync_router, l3_agents):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_499843c0","side":"PARENT","line":334,"updated":"2014-08-21 03:37:23.000000000","message":"Avoid changing whitespace.  It just creates noise and potential merge conflicts.","commit_id":"50126be5ba4b1acc36d5fe9e5d180be8ce2ceb06"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"90cbaef0c7ba482c01a7f45091129b24442bedd7","unresolved":false,"context_lines":[{"line_number":331,"context_line":"            if (\"compute:\" in port[\u0027device_owner\u0027] and"},{"line_number":332,"context_line":"                l3_agent[\u0027host\u0027] \u003d\u003d port[\u0027binding:host_id\u0027]):"},{"line_number":333,"context_line":"                    return True"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        return False"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    def get_snat_candidates(self, sync_router, l3_agents):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_0aa8ef75","side":"PARENT","line":334,"in_reply_to":"1abeadc6_499843c0","updated":"2014-08-21 07:40:47.000000000","message":"Overlooked this.  Will fix this.","commit_id":"50126be5ba4b1acc36d5fe9e5d180be8ce2ceb06"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"66288fd19208c66d85811d5fcb9e37f4901423cf","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                if agentschedulers_db.AgentSchedulerDbMixin.is_eligible_agent("},{"line_number":320,"context_line":"                    active, l3_agent)]"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def check_vm_or_vip_exists_on_l3agent(self, context, l3_agent, router_id,"},{"line_number":323,"context_line":"                                          subnet_id):"},{"line_number":324,"context_line":"        \"\"\" This function checks for a dvr serviceable port on l3agent."},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_6088bbc5","line":322,"updated":"2014-08-20 18:08:54.000000000","message":"same comment","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"90cbaef0c7ba482c01a7f45091129b24442bedd7","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                if agentschedulers_db.AgentSchedulerDbMixin.is_eligible_agent("},{"line_number":320,"context_line":"                    active, l3_agent)]"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def check_vm_or_vip_exists_on_l3agent(self, context, l3_agent, router_id,"},{"line_number":323,"context_line":"                                          subnet_id):"},{"line_number":324,"context_line":"        \"\"\" This function checks for a dvr serviceable port on l3agent."},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_4abd87b6","line":322,"in_reply_to":"1abeadc6_6088bbc5","updated":"2014-08-21 07:40:47.000000000","message":"yes, will address this.","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0125a4045845e70080afa76bd413590846bc10e1","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        ports on the host, running the input l3agent."},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        This should return true, if there is a VM port with"},{"line_number":330,"context_line":"        device owner \"compute:nova\" or if there is a VIP port"},{"line_number":331,"context_line":"        with device owner \"neutron:LOADBALANCER\"."},{"line_number":332,"context_line":"        \"\"\""},{"line_number":333,"context_line":"        if not subnet_id:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_c3a95925","line":330,"updated":"2014-08-22 08:21:24.000000000","message":"same comment about enumerating current dvr related ports","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6288450d75eddf4332d55c8bc04f1f519d793687","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        ports on the host, running the input l3agent."},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        This should return true, if there is a VM port with"},{"line_number":330,"context_line":"        device owner \"compute:nova\" or if there is a VIP port"},{"line_number":331,"context_line":"        with device owner \"neutron:LOADBALANCER\"."},{"line_number":332,"context_line":"        \"\"\""},{"line_number":333,"context_line":"        if not subnet_id:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_9d0899db","line":330,"in_reply_to":"1abeadc6_c3a95925","updated":"2014-08-22 09:39:46.000000000","message":"Done","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"}],"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"833d0fc62732c7a013767c01bbcfa675048467be","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        allowed_device_owners \u003d (l3_const.DEVICE_OWNER_LOADBALANCER,"},{"line_number":320,"context_line":"                                 DEVICE_OWNER_AGENT_GW)"},{"line_number":321,"context_line":"        device_owner \u003d vm_port_db[\u0027device_owner\u0027] if vm_port_db else \"\""},{"line_number":322,"context_line":"        if (device_owner in allowed_device_owners or"},{"line_number":323,"context_line":"            device_owner.startswith(\"compute:\")):"},{"line_number":324,"context_line":"            return vm_port_db[portbindings.HOST_ID]"},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_5a695524","line":322,"updated":"2014-08-25 18:35:17.000000000","message":"Change to the following to ease future maintenance:\n\n    if(utils._is_dvr_serviced(device_owner) or device_owner \u003d\u003d DEVICE_OWNER_AGENT_GW:","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"367ff95786f3bfcf407052fec8550b457a55bb69","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        allowed_device_owners \u003d (l3_const.DEVICE_OWNER_LOADBALANCER,"},{"line_number":320,"context_line":"                                 DEVICE_OWNER_AGENT_GW)"},{"line_number":321,"context_line":"        device_owner \u003d vm_port_db[\u0027device_owner\u0027] if vm_port_db else \"\""},{"line_number":322,"context_line":"        if (device_owner in allowed_device_owners or"},{"line_number":323,"context_line":"            device_owner.startswith(\"compute:\")):"},{"line_number":324,"context_line":"            return vm_port_db[portbindings.HOST_ID]"},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_727623da","line":322,"in_reply_to":"1abeadc6_5a695524","updated":"2014-08-26 11:17:18.000000000","message":"Done","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"}],"neutron/db/l3_dvrscheduler_db.py":[{"author":{"_account_id":12737,"name":"Jacek Swiderski","email":"jacek.swiderski@codilime.com","username":"Altran"},"change_message_id":"f7bfaf7c921c83084f29ca52234d75dd2d8badfd","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        # delete the namespace when those ports are using it."},{"line_number":108,"context_line":"        for port in ports:"},{"line_number":109,"context_line":"            if (\"compute:\" in port[\u0027device_owner\u0027] or"},{"line_number":110,"context_line":"                \"neutron:LOADBALANCER\" in port[\u0027device_owner\u0027]"},{"line_number":111,"context_line":"                and port[\u0027status\u0027] \u003d\u003d \u0027ACTIVE\u0027"},{"line_number":112,"context_line":"                and port[\u0027binding:host_id\u0027] \u003d\u003d host"},{"line_number":113,"context_line":"                and port[\u0027id\u0027] !\u003d port_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_79946d37","line":110,"updated":"2014-08-14 10:06:53.000000000","message":"There should be additional parentheses because (True or False and False) is True","commit_id":"0e99175a471650449124d0e9afa86bf482cbc486"},{"author":{"_account_id":12737,"name":"Jacek Swiderski","email":"jacek.swiderski@codilime.com","username":"Altran"},"change_message_id":"f7bfaf7c921c83084f29ca52234d75dd2d8badfd","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                \"neutron:LOADBALANCER\" in port[\u0027device_owner\u0027]"},{"line_number":111,"context_line":"                and port[\u0027status\u0027] \u003d\u003d \u0027ACTIVE\u0027"},{"line_number":112,"context_line":"                and port[\u0027binding:host_id\u0027] \u003d\u003d host"},{"line_number":113,"context_line":"                and port[\u0027id\u0027] !\u003d port_id):"},{"line_number":114,"context_line":"                LOG.debug(\u0027DVR: VM exists for subnet %(subnet_id)s on host \u0027"},{"line_number":115,"context_line":"                          \u0027%(host)s\u0027, {\u0027subnet_id\u0027: subnet_id,"},{"line_number":116,"context_line":"                                       \u0027host\u0027: host})"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_99e8697e","line":113,"updated":"2014-08-14 10:06:53.000000000","message":"Just out of curiosity - why ports with passed id are rejected?","commit_id":"0e99175a471650449124d0e9afa86bf482cbc486"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7043f4e8a6c929e802c1b2943d173153fc8cebe5","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            subnet_ids.add(int_subnet)"},{"line_number":98,"context_line":"        return subnet_ids"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def check_vm_exists_on_subnet(self, context, host, port_id, subnet_id):"},{"line_number":101,"context_line":"        \"\"\"Check if there is any viable port on the subnet_id.\"\"\""},{"line_number":102,"context_line":"        filter_sub \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet_id]}}"},{"line_number":103,"context_line":"        ports \u003d self._core_plugin.get_ports(context, filters\u003dfilter_sub)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_400d963d","line":100,"updated":"2014-08-20 09:21:17.000000000","message":"check_viable_ports_on_subnet?","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6581c375340aabc408ec494751c1f8854f01dc72","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            subnet_ids.add(int_subnet)"},{"line_number":98,"context_line":"        return subnet_ids"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def check_vm_exists_on_subnet(self, context, host, port_id, subnet_id):"},{"line_number":101,"context_line":"        \"\"\"Check if there is any viable port on the subnet_id.\"\"\""},{"line_number":102,"context_line":"        filter_sub \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet_id]}}"},{"line_number":103,"context_line":"        ports \u003d self._core_plugin.get_ports(context, filters\u003dfilter_sub)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_0341dea8","line":100,"in_reply_to":"1abeadc6_400d963d","updated":"2014-08-20 13:17:30.000000000","message":"this is an existing method.  We ascertain whether a VM or VIP port exists on the given subnet.\r\n\r\nSo renamed this method to :\r\ncheck_vm_or_vip_exists_on_subnet.","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7043f4e8a6c929e802c1b2943d173153fc8cebe5","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        filter_sub \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet_id]}}"},{"line_number":103,"context_line":"        ports \u003d self._core_plugin.get_ports(context, filters\u003dfilter_sub)"},{"line_number":104,"context_line":"        # It should not only check for the VM ports but also check for the"},{"line_number":105,"context_line":"        # LBaaS VIP port. If we dont check these ports and we will end"},{"line_number":106,"context_line":"        # either not creating a IR namespace for the those routers or"},{"line_number":107,"context_line":"        # delete the namespace when those ports are using it."},{"line_number":108,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_baea120d","line":105,"updated":"2014-08-20 09:21:17.000000000","message":"same comment on this: consider adding what is viable port to the dosctring","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"66288fd19208c66d85811d5fcb9e37f4901423cf","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            subnet_ids.add(int_subnet)"},{"line_number":98,"context_line":"        return subnet_ids"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def check_vm_or_vip_exists_on_subnet(self, context, host,"},{"line_number":101,"context_line":"                                         port_id, subnet_id):"},{"line_number":102,"context_line":"        \"\"\"Check if there is any dvr serviceable port on the subnet_id.\"\"\""},{"line_number":103,"context_line":"        filter_sub \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet_id]}}"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_809157f3","line":100,"updated":"2014-08-20 18:08:54.000000000","message":"same","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"66288fd19208c66d85811d5fcb9e37f4901423cf","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                and port[\u0027status\u0027] \u003d\u003d \u0027ACTIVE\u0027"},{"line_number":113,"context_line":"                and port[\u0027binding:host_id\u0027] \u003d\u003d host"},{"line_number":114,"context_line":"                and port[\u0027id\u0027] !\u003d port_id):"},{"line_number":115,"context_line":"                LOG.debug(\u0027DVR: VM/VIP exists for subnet %(subnet_id)s on \u0027"},{"line_number":116,"context_line":"                          \u0027host %(host)s\u0027, {\u0027subnet_id\u0027: subnet_id,"},{"line_number":117,"context_line":"                                       \u0027host\u0027: host})"},{"line_number":118,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_40b2df94","line":115,"updated":"2014-08-20 18:08:54.000000000","message":"I\u0027d just log \"DVR: port exists for subnet ...\"","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"90cbaef0c7ba482c01a7f45091129b24442bedd7","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                and port[\u0027status\u0027] \u003d\u003d \u0027ACTIVE\u0027"},{"line_number":113,"context_line":"                and port[\u0027binding:host_id\u0027] \u003d\u003d host"},{"line_number":114,"context_line":"                and port[\u0027id\u0027] !\u003d port_id):"},{"line_number":115,"context_line":"                LOG.debug(\u0027DVR: VM/VIP exists for subnet %(subnet_id)s on \u0027"},{"line_number":116,"context_line":"                          \u0027host %(host)s\u0027, {\u0027subnet_id\u0027: subnet_id,"},{"line_number":117,"context_line":"                                       \u0027host\u0027: host})"},{"line_number":118,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_8ab31fe8","line":115,"in_reply_to":"1abeadc6_40b2df94","updated":"2014-08-21 07:40:47.000000000","message":"OK.","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0125a4045845e70080afa76bd413590846bc10e1","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        \"\"\"Check if there is any dvr serviceable port on the subnet_id.\"\"\""},{"line_number":104,"context_line":"        filter_sub \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet_id]}}"},{"line_number":105,"context_line":"        ports \u003d self._core_plugin.get_ports(context, filters\u003dfilter_sub)"},{"line_number":106,"context_line":"        # It should not only check for the VM ports but also check for the"},{"line_number":107,"context_line":"        # LBaaS VIP port. If we dont check these ports and we will end"},{"line_number":108,"context_line":"        # either not creating a IR namespace for the those routers or"},{"line_number":109,"context_line":"        # delete the namespace when those ports are using it."}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_a3753dcc","line":106,"updated":"2014-08-22 08:21:24.000000000","message":"same here","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6288450d75eddf4332d55c8bc04f1f519d793687","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        \"\"\"Check if there is any dvr serviceable port on the subnet_id.\"\"\""},{"line_number":104,"context_line":"        filter_sub \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet_id]}}"},{"line_number":105,"context_line":"        ports \u003d self._core_plugin.get_ports(context, filters\u003dfilter_sub)"},{"line_number":106,"context_line":"        # It should not only check for the VM ports but also check for the"},{"line_number":107,"context_line":"        # LBaaS VIP port. If we dont check these ports and we will end"},{"line_number":108,"context_line":"        # either not creating a IR namespace for the those routers or"},{"line_number":109,"context_line":"        # delete the namespace when those ports are using it."}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_5d0281b4","line":106,"in_reply_to":"1abeadc6_a3753dcc","updated":"2014-08-22 09:39:46.000000000","message":"Done","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"29bc463271f4ddefba87fadcaa931b9aaecc11c4","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            # So we need to check if the port[\u0027device_owner\u0027]"},{"line_number":232,"context_line":"            # belongs to either one of them."},{"line_number":233,"context_line":"            if (\"compute:\" in port[\u0027device_owner\u0027] or"},{"line_number":234,"context_line":"                \"neutron:LOADBALANCER\" in port[\u0027device_owner\u0027]):"},{"line_number":235,"context_line":"                l3plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":236,"context_line":"                    service_constants.L3_ROUTER_NAT)"},{"line_number":237,"context_line":"                if (utils.is_extension_supported("}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_b276fb3c","line":234,"updated":"2014-08-14 23:38:27.000000000","message":"I was wondering if instead of explicitly classifying ports that do need to be coupled with a DVR we should reverse the sense.  Should we check if the port is a kind of port that should be skipped and not coupled with a DVR binding?\n\nI\u0027m thinking there may be other services down the road that create ports which will need a DVR bound to the host.  One example is Manilla.  I was talking with the Manilla PTL the other day and they are considering creating a port in Neutron so that they can use it to patch third-party storage systems on to a tenant network.  They would need to run L2 and L3 agents on their host to plumb in to those ports.\n\nSummary:  Instead of \"what ports need a DVR binding\" maybe we should consider checking \"ports that don\u0027t need it\" because the latter might be less subject to change over time.","commit_id":"0e99175a471650449124d0e9afa86bf482cbc486"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"055c17b27542808fa78acf3958d50a5d1a0253de","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            # So we need to check if the port[\u0027device_owner\u0027]"},{"line_number":232,"context_line":"            # belongs to either one of them."},{"line_number":233,"context_line":"            if (\"compute:\" in port[\u0027device_owner\u0027] or"},{"line_number":234,"context_line":"                \"neutron:LOADBALANCER\" in port[\u0027device_owner\u0027]):"},{"line_number":235,"context_line":"                l3plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":236,"context_line":"                    service_constants.L3_ROUTER_NAT)"},{"line_number":237,"context_line":"                if (utils.is_extension_supported("}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_fc792294","line":234,"in_reply_to":"7ac7a964_b276fb3c","updated":"2014-08-19 05:28:57.000000000","message":"Right now we know a definitive list for the DVR usage. But if the list increases in size then it would make sense to revert the order, until then can we proceed with the known list.","commit_id":"0e99175a471650449124d0e9afa86bf482cbc486"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"8e7fefb0c6814c1aaa1de90f1ae81a29d0fcbe18","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        return nets"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def check_if_port_dvr_related(self, context, device_owner):"},{"line_number":219,"context_line":"        \"\"\"Check if the ports are related to DVR"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        Helper function to check the device owners of the"},{"line_number":222,"context_line":"        ports in the compute and service node to make sure"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_04d92483","line":219,"updated":"2014-08-19 08:13:27.000000000","message":"nit: .. if port owner is related to DVR","commit_id":"839c5d5b460f477070491a6063a14fd13cb823c9"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"8e7fefb0c6814c1aaa1de90f1ae81a29d0fcbe18","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            binding.host !\u003d host):"},{"line_number":238,"context_line":"            binding.host \u003d host"},{"line_number":239,"context_line":"            changes \u003d True"},{"line_number":240,"context_line":"            # Whenever a VM port or an LBaaS port comes up on a"},{"line_number":241,"context_line":"            # node, it has to be communicated to the L3 Plugin"},{"line_number":242,"context_line":"            # and agent for creating the respective namespaces."},{"line_number":243,"context_line":"            # So we need to check if the port[\u0027device_owner\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_24c9c078","line":240,"updated":"2014-08-19 08:13:27.000000000","message":"nit: DVR related port (in case check_if_port_dvr_related() will be extended with other ports at some point)","commit_id":"839c5d5b460f477070491a6063a14fd13cb823c9"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7043f4e8a6c929e802c1b2943d173153fc8cebe5","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # TODO(rkukura): Implement filtering."},{"line_number":216,"context_line":"        return nets"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def check_if_port_dvr_related(self, context, device_owner):"},{"line_number":219,"context_line":"        \"\"\"Check if the port owner is related to DVR"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        Helper function to check the device owners of the"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_9abab608","line":218,"updated":"2014-08-20 09:21:17.000000000","message":"please see my earlier comment on the naming. Also to me L3AgentSchedulerDbMixin seems more appropriate class to add this func. With this at #247 we\u0027ll have:\n l3plugin \u003d manager.NeutronManager.get_service_plugins().get(service_constants.L3_ROUTER_NAT)\n if (utils.is_extension_supported(l3plugin, const.L3_DISTRIBUTED_EXT_ALIAS)\n   and l3plugin.is_port_essential(port[\u0027device_owner\u0027]):\n ...","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6581c375340aabc408ec494751c1f8854f01dc72","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # TODO(rkukura): Implement filtering."},{"line_number":216,"context_line":"        return nets"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def check_if_port_dvr_related(self, context, device_owner):"},{"line_number":219,"context_line":"        \"\"\"Check if the port owner is related to DVR"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        Helper function to check the device owners of the"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_a3ce6a2c","line":218,"in_reply_to":"1abeadc6_9abab608","updated":"2014-08-20 13:17:30.000000000","message":"changed the name of this method to\r\ncheck_if_port_dvr_serviced().\r\n\r\nThis looks to best reside in the plugin itself as it just checks for device_owner and returns if its a DVR Serviceable port.","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"66288fd19208c66d85811d5fcb9e37f4901423cf","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # TODO(rkukura): Implement filtering."},{"line_number":216,"context_line":"        return nets"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def check_if_port_dvr_serviced(self, context, device_owner):"},{"line_number":219,"context_line":"        \"\"\"Check if the port need to be serviced by DVR"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        Helper function to check the device owners of the"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_4079ffc6","line":218,"updated":"2014-08-20 18:08:54.000000000","message":"i think we could more this method to some common place.\nalso, I don\u0027t see why context parameter is needed here","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"90cbaef0c7ba482c01a7f45091129b24442bedd7","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # TODO(rkukura): Implement filtering."},{"line_number":216,"context_line":"        return nets"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def check_if_port_dvr_serviced(self, context, device_owner):"},{"line_number":219,"context_line":"        \"\"\"Check if the port need to be serviced by DVR"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        Helper function to check the device owners of the"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_4ae4a7e0","line":218,"in_reply_to":"1abeadc6_4079ffc6","updated":"2014-08-21 07:40:47.000000000","message":"I will see if this can be moved elsewhere.  Context is not needed, will remove that as well.","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0125a4045845e70080afa76bd413590846bc10e1","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            # and agent for creating the respective namespaces."},{"line_number":231,"context_line":"            # So we need to check if the port[\u0027device_owner\u0027]"},{"line_number":232,"context_line":"            # belongs to either one of them.( At present checks"},{"line_number":233,"context_line":"            # for Compute and LBaaS VIP port, it will be extended"},{"line_number":234,"context_line":"            # with other ports at some point)."},{"line_number":235,"context_line":"            if (utils.is_dvr_serviced(port[\u0027device_owner\u0027])):"},{"line_number":236,"context_line":"                l3plugin \u003d manager.NeutronManager.get_service_plugins().get("}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_e352d533","line":233,"updated":"2014-08-22 08:21:24.000000000","message":"same here. One can easily inspect is_dvr_serviced() to see which ports are currently considered DVR related","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6288450d75eddf4332d55c8bc04f1f519d793687","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            # and agent for creating the respective namespaces."},{"line_number":231,"context_line":"            # So we need to check if the port[\u0027device_owner\u0027]"},{"line_number":232,"context_line":"            # belongs to either one of them.( At present checks"},{"line_number":233,"context_line":"            # for Compute and LBaaS VIP port, it will be extended"},{"line_number":234,"context_line":"            # with other ports at some point)."},{"line_number":235,"context_line":"            if (utils.is_dvr_serviced(port[\u0027device_owner\u0027])):"},{"line_number":236,"context_line":"                l3plugin \u003d manager.NeutronManager.get_service_plugins().get("}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_fd28ad34","line":233,"in_reply_to":"1abeadc6_e352d533","updated":"2014-08-22 09:39:46.000000000","message":"Done","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"}],"neutron/plugins/ml2/rpc.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"66288fd19208c66d85811d5fcb9e37f4901423cf","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        return super(RpcCallbacks, self).get_dvr_mac_address_by_host("},{"line_number":208,"context_line":"            rpc_context, host)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def get_compute_and_vip_ports_on_host_by_subnet(self, rpc_context,"},{"line_number":211,"context_line":"                                                    **kwargs):"},{"line_number":212,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":213,"context_line":"        subnet \u003d kwargs.get(\u0027subnet\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_a07c93b6","line":210,"updated":"2014-08-20 18:08:54.000000000","message":"same comment on naming","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0125a4045845e70080afa76bd413590846bc10e1","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":212,"context_line":"        subnet \u003d kwargs.get(\u0027subnet\u0027)"},{"line_number":213,"context_line":"        LOG.debug(\"DVR Agent requests list of VM ports on host %s\", host)"},{"line_number":214,"context_line":"        return super(RpcCallbacks,"},{"line_number":215,"context_line":"            self).get_ports_on_host_by_subnet(rpc_context, host, subnet)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def get_subnet_for_dvr(self, rpc_context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_3e09402c","line":214,"updated":"2014-08-22 08:21:24.000000000","message":"nit: please break lines as it was before","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6288450d75eddf4332d55c8bc04f1f519d793687","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":212,"context_line":"        subnet \u003d kwargs.get(\u0027subnet\u0027)"},{"line_number":213,"context_line":"        LOG.debug(\"DVR Agent requests list of VM ports on host %s\", host)"},{"line_number":214,"context_line":"        return super(RpcCallbacks,"},{"line_number":215,"context_line":"            self).get_ports_on_host_by_subnet(rpc_context, host, subnet)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def get_subnet_for_dvr(self, rpc_context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_fddfcd37","line":214,"in_reply_to":"1abeadc6_3e09402c","updated":"2014-08-22 09:39:46.000000000","message":"Done","commit_id":"0e2d3d60d023a18c92b959ddb77cb3a81b40dd94"}],"neutron/plugins/openvswitch/agent/ovs_dvr_neutron_agent.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"66288fd19208c66d85811d5fcb9e37f4901423cf","unresolved":false,"context_lines":[{"line_number":518,"context_line":"                                                         local_vlan_id)"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"        if device_owner and ("},{"line_number":521,"context_line":"            device_owner.startswith(\u0027compute:\u0027) or"},{"line_number":522,"context_line":"            device_owner \u003d\u003d n_const.DEVICE_OWNER_LOADBALANCER):"},{"line_number":523,"context_line":"            self._bind_compute_and_vip_port_on_dvr_subnet(port, fixed_ips,"},{"line_number":524,"context_line":"                                                          device_owner,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_0043876c","line":521,"updated":"2014-08-20 18:08:54.000000000","message":"common method could be used here","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"66288fd19208c66d85811d5fcb9e37f4901423cf","unresolved":false,"context_lines":[{"line_number":713,"context_line":"                                                           local_vlan_id)"},{"line_number":714,"context_line":""},{"line_number":715,"context_line":"        if device_owner and ("},{"line_number":716,"context_line":"            device_owner.startswith(\u0027compute:\u0027) or"},{"line_number":717,"context_line":"            device_owner \u003d\u003d n_const.DEVICE_OWNER_LOADBALANCER):"},{"line_number":718,"context_line":"            self._unbind_compute_and_vip_port_on_dvr_subnet(vif_port,"},{"line_number":719,"context_line":"                                                            local_vlan_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_605d1b47","line":716,"updated":"2014-08-20 18:08:54.000000000","message":"ditto","commit_id":"726691fabb60b38a57c2e5fbdfab4b81f063b602"}],"neutron/tests/unit/ml2/test_ml2_plugin.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7043f4e8a6c929e802c1b2943d173153fc8cebe5","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    def test_check_if_port_dvr_related_compute(self):"},{"line_number":167,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":168,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":169,"context_line":"        with self.port(do_delete\u003dFalse, device_owner\u003d\u0027compute:None\u0027) as port:"},{"line_number":170,"context_line":"            port_id \u003d port[\u0027port\u0027][\u0027id\u0027]"},{"line_number":171,"context_line":"            self.assertTrue(plugin.check_if_port_dvr_related("},{"line_number":172,"context_line":"                self.context, port[\u0027port\u0027][\u0027device_owner\u0027]))"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_c59618f0","line":169,"updated":"2014-08-20 09:21:17.000000000","message":"not really needed to create a port in this test, passing device owner to check_if_port_dvr_related should be enough","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6581c375340aabc408ec494751c1f8854f01dc72","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    def test_check_if_port_dvr_related_compute(self):"},{"line_number":167,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":168,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":169,"context_line":"        with self.port(do_delete\u003dFalse, device_owner\u003d\u0027compute:None\u0027) as port:"},{"line_number":170,"context_line":"            port_id \u003d port[\u0027port\u0027][\u0027id\u0027]"},{"line_number":171,"context_line":"            self.assertTrue(plugin.check_if_port_dvr_related("},{"line_number":172,"context_line":"                self.context, port[\u0027port\u0027][\u0027device_owner\u0027]))"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_03dd5ee0","line":169,"in_reply_to":"1abeadc6_c59618f0","updated":"2014-08-20 13:17:30.000000000","message":"Done","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7043f4e8a6c929e802c1b2943d173153fc8cebe5","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    def test_check_if_port_dvr_related_vip(self):"},{"line_number":176,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":177,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":178,"context_line":"        with self.port(do_delete\u003dFalse,"},{"line_number":179,"context_line":"                       device_owner\u003d\u0027neutron:LOADBALANCER\u0027) as port:"},{"line_number":180,"context_line":"            port_id \u003d port[\u0027port\u0027][\u0027id\u0027]"},{"line_number":181,"context_line":"            self.assertTrue(plugin.check_if_port_dvr_related("}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_05a1f046","line":178,"updated":"2014-08-20 09:21:17.000000000","message":"ditto","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6581c375340aabc408ec494751c1f8854f01dc72","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    def test_check_if_port_dvr_related_vip(self):"},{"line_number":176,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":177,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":178,"context_line":"        with self.port(do_delete\u003dFalse,"},{"line_number":179,"context_line":"                       device_owner\u003d\u0027neutron:LOADBALANCER\u0027) as port:"},{"line_number":180,"context_line":"            port_id \u003d port[\u0027port\u0027][\u0027id\u0027]"},{"line_number":181,"context_line":"            self.assertTrue(plugin.check_if_port_dvr_related("}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_43e3d6a3","line":178,"in_reply_to":"1abeadc6_05a1f046","updated":"2014-08-20 13:17:30.000000000","message":"Done","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7043f4e8a6c929e802c1b2943d173153fc8cebe5","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    def test_check_if_port_non_dvr_related(self):"},{"line_number":186,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":187,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":188,"context_line":"        with self.port(do_delete\u003dFalse,"},{"line_number":189,"context_line":"                       device_owner\u003d\u0027neutron:router_interface\u0027) as port:"},{"line_number":190,"context_line":"            port_id \u003d port[\u0027port\u0027][\u0027id\u0027]"},{"line_number":191,"context_line":"            self.assertFalse(plugin.check_if_port_dvr_related("}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_458a08c0","line":188,"updated":"2014-08-20 09:21:17.000000000","message":"ditto","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6581c375340aabc408ec494751c1f8854f01dc72","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    def test_check_if_port_non_dvr_related(self):"},{"line_number":186,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":187,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":188,"context_line":"        with self.port(do_delete\u003dFalse,"},{"line_number":189,"context_line":"                       device_owner\u003d\u0027neutron:router_interface\u0027) as port:"},{"line_number":190,"context_line":"            port_id \u003d port[\u0027port\u0027][\u0027id\u0027]"},{"line_number":191,"context_line":"            self.assertFalse(plugin.check_if_port_dvr_related("}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_63e0d296","line":188,"in_reply_to":"1abeadc6_458a08c0","updated":"2014-08-20 13:17:30.000000000","message":"Done","commit_id":"278d55ce78e66b421e62885464164b97c513890a"}],"neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5e389c9b59f036a2250e3e340b5bf59473e1d42e","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                self.assertTrue(add_flow_int_fn.called)"},{"line_number":288,"context_line":"                self.assertTrue(delete_flows_int_fn.called)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def test_port_bound_for_dvr_with_lbaas_vip_ports(self, ofport\u003d10):"},{"line_number":291,"context_line":"        self._setup_for_dvr_test()"},{"line_number":292,"context_line":"        with mock.patch(\u0027neutron.agent.linux.ovs_lib.OVSBridge.\u0027"},{"line_number":293,"context_line":"                        \u0027set_db_attribute\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_30ff71ac","line":290,"updated":"2014-08-25 08:59:50.000000000","message":"Please refactor this with above test_port_bound_for_dvr_with_compute_ports to have one common _test_port_bound_for_dvr() helper and use it in both test cases (and in future test cases in case DVR serviced port list will be expanded)","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"367ff95786f3bfcf407052fec8550b457a55bb69","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                self.assertTrue(add_flow_int_fn.called)"},{"line_number":288,"context_line":"                self.assertTrue(delete_flows_int_fn.called)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def test_port_bound_for_dvr_with_lbaas_vip_ports(self, ofport\u003d10):"},{"line_number":291,"context_line":"        self._setup_for_dvr_test()"},{"line_number":292,"context_line":"        with mock.patch(\u0027neutron.agent.linux.ovs_lib.OVSBridge.\u0027"},{"line_number":293,"context_line":"                        \u0027set_db_attribute\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_eb731eb2","line":290,"in_reply_to":"1abeadc6_30ff71ac","updated":"2014-08-26 11:17:18.000000000","message":"Done","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5e389c9b59f036a2250e3e340b5bf59473e1d42e","unresolved":false,"context_lines":[{"line_number":311,"context_line":"                mock.patch.object(self.agent.dvr_agent.int_br, \u0027add_flow\u0027),"},{"line_number":312,"context_line":"                mock.patch.object(self.agent.dvr_agent.int_br, \u0027delete_flows\u0027),"},{"line_number":313,"context_line":"                mock.patch.object(self.agent.dvr_agent.tun_br, \u0027add_flow\u0027),"},{"line_number":314,"context_line":"                mock.patch.object(self.agent.dvr_agent.tun_br, \u0027delete_flows\u0027)"},{"line_number":315,"context_line":"            ) as (get_ovs_db_func, get_subnet_fn, get_cphost_fn,"},{"line_number":316,"context_line":"                  get_vif_fn, add_flow_int_fn, delete_flows_int_fn,"},{"line_number":317,"context_line":"                  add_flow_tun_fn, delete_flows_tun_fn):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_d0947d8e","line":314,"updated":"2014-08-25 08:59:50.000000000","message":"consider mocking int_br itself rather than each method separately","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"367ff95786f3bfcf407052fec8550b457a55bb69","unresolved":false,"context_lines":[{"line_number":311,"context_line":"                mock.patch.object(self.agent.dvr_agent.int_br, \u0027add_flow\u0027),"},{"line_number":312,"context_line":"                mock.patch.object(self.agent.dvr_agent.int_br, \u0027delete_flows\u0027),"},{"line_number":313,"context_line":"                mock.patch.object(self.agent.dvr_agent.tun_br, \u0027add_flow\u0027),"},{"line_number":314,"context_line":"                mock.patch.object(self.agent.dvr_agent.tun_br, \u0027delete_flows\u0027)"},{"line_number":315,"context_line":"            ) as (get_ovs_db_func, get_subnet_fn, get_cphost_fn,"},{"line_number":316,"context_line":"                  get_vif_fn, add_flow_int_fn, delete_flows_int_fn,"},{"line_number":317,"context_line":"                  add_flow_tun_fn, delete_flows_tun_fn):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_b75ee510","line":314,"in_reply_to":"1abeadc6_d0947d8e","updated":"2014-08-26 11:17:18.000000000","message":"Only 3 methods from the bridges are used here.  So mocking them alone would be sufficient.","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5e389c9b59f036a2250e3e340b5bf59473e1d42e","unresolved":false,"context_lines":[{"line_number":464,"context_line":"                self.agent.treat_devices_removed([self._compute_port.vif_id])"},{"line_number":465,"context_line":"                self.assertTrue(delete_flows_int_fn.called)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"    def test_treat_devices_removed_for_dvr_with_lbaas_vip_ports(self,"},{"line_number":468,"context_line":"                                                                ofport\u003d10):"},{"line_number":469,"context_line":"        self._setup_for_dvr_test()"},{"line_number":470,"context_line":"        with mock.patch(\u0027neutron.agent.linux.ovs_lib.OVSBridge.\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_70be49d6","line":467,"updated":"2014-08-25 08:59:50.000000000","message":"Please refactor with test_treat_devices_removed_for_dvr_with_compute_ports","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5e389c9b59f036a2250e3e340b5bf59473e1d42e","unresolved":false,"context_lines":[{"line_number":488,"context_line":"                mock.patch.object(self.agent.dvr_agent.int_br, \u0027add_flow\u0027),"},{"line_number":489,"context_line":"                mock.patch.object(self.agent.dvr_agent.int_br, \u0027delete_flows\u0027),"},{"line_number":490,"context_line":"                mock.patch.object(self.agent.dvr_agent.tun_br, \u0027add_flow\u0027),"},{"line_number":491,"context_line":"                mock.patch.object(self.agent.dvr_agent.tun_br, \u0027delete_flows\u0027)"},{"line_number":492,"context_line":"            ) as (get_ovs_db_func, get_subnet_fn, get_cphost_fn,"},{"line_number":493,"context_line":"                  get_vif_fn, add_flow_int_fn, delete_flows_int_fn,"},{"line_number":494,"context_line":"                  add_flow_tun_fn, delete_flows_tun_fn):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_90dcc548","line":491,"updated":"2014-08-25 08:59:50.000000000","message":"ditto","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"41756e5cf11c982234029ac54ff4992361a66c16","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                self.assertTrue(delete_flows_int_fn.called)"},{"line_number":376,"context_line":"                self.assertTrue(delete_flows_tun_fn.called)"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    def _test_treat_devices_removed_for_dvr(self, device_owner\u003d\"compute:None\"):"},{"line_number":379,"context_line":"        self._setup_for_dvr_test()"},{"line_number":380,"context_line":"        with mock.patch(\u0027neutron.agent.linux.ovs_lib.OVSBridge.\u0027"},{"line_number":381,"context_line":"                        \u0027set_db_attribute\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_c45d6c7b","line":378,"updated":"2014-08-26 13:22:24.000000000","message":"nit: prefer to require explicit parameter specifying in callers","commit_id":"f40243d041ea9b2e7f8ffbb16330b739d560e819"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"2fb02162260d58cb1ec0f1f205dc06b7844dc803","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                self.assertTrue(delete_flows_int_fn.called)"},{"line_number":376,"context_line":"                self.assertTrue(delete_flows_tun_fn.called)"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    def _test_treat_devices_removed_for_dvr(self, device_owner\u003d\"compute:None\"):"},{"line_number":379,"context_line":"        self._setup_for_dvr_test()"},{"line_number":380,"context_line":"        with mock.patch(\u0027neutron.agent.linux.ovs_lib.OVSBridge.\u0027"},{"line_number":381,"context_line":"                        \u0027set_db_attribute\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_ef5de149","line":378,"in_reply_to":"1abeadc6_c45d6c7b","updated":"2014-08-26 13:57:20.000000000","message":"Done","commit_id":"f40243d041ea9b2e7f8ffbb16330b739d560e819"}],"neutron/tests/unit/test_l3_schedulers.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7043f4e8a6c929e802c1b2943d173153fc8cebe5","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        agent_list \u003d [self.agent1, self.l3_dvr_agent]"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"        # test legacy agent_mode case: only legacy agent should be candidate"},{"line_number":250,"context_line":"        router[\u0027distributed\u0027] \u003d False "},{"line_number":251,"context_line":"        exp_host \u003d FIRST_L3_AGENT.get(\u0027host\u0027)"},{"line_number":252,"context_line":"        self._check_get_l3_agent_candidates(router, agent_list, exp_host)"},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_45b1288e","line":250,"updated":"2014-08-20 09:21:17.000000000","message":"ops","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6581c375340aabc408ec494751c1f8854f01dc72","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        agent_list \u003d [self.agent1, self.l3_dvr_agent]"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"        # test legacy agent_mode case: only legacy agent should be candidate"},{"line_number":250,"context_line":"        router[\u0027distributed\u0027] \u003d False "},{"line_number":251,"context_line":"        exp_host \u003d FIRST_L3_AGENT.get(\u0027host\u0027)"},{"line_number":252,"context_line":"        self._check_get_l3_agent_candidates(router, agent_list, exp_host)"},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_83f08e68","line":250,"in_reply_to":"1abeadc6_45b1288e","updated":"2014-08-20 13:17:30.000000000","message":"Done","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7043f4e8a6c929e802c1b2943d173153fc8cebe5","unresolved":false,"context_lines":[{"line_number":485,"context_line":"            self.assertFalse(result)"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"    def test_check_dvr_related_port_exists_on_subnet(self):"},{"line_number":488,"context_line":"        dvr_port \u003d {"},{"line_number":489,"context_line":"                \u0027id\u0027: \u0027dvr_port1\u0027,"},{"line_number":490,"context_line":"                \u0027device_id\u0027: \u0027r1\u0027,"},{"line_number":491,"context_line":"                \u0027status\u0027: \u0027ACTIVE\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_25726ce5","line":488,"updated":"2014-08-20 09:21:17.000000000","message":"nit: dvr_port is a bit confusing name, consider vip_port","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6581c375340aabc408ec494751c1f8854f01dc72","unresolved":false,"context_lines":[{"line_number":485,"context_line":"            self.assertFalse(result)"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"    def test_check_dvr_related_port_exists_on_subnet(self):"},{"line_number":488,"context_line":"        dvr_port \u003d {"},{"line_number":489,"context_line":"                \u0027id\u0027: \u0027dvr_port1\u0027,"},{"line_number":490,"context_line":"                \u0027device_id\u0027: \u0027r1\u0027,"},{"line_number":491,"context_line":"                \u0027status\u0027: \u0027ACTIVE\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_c3e606b0","line":488,"in_reply_to":"1abeadc6_25726ce5","updated":"2014-08-20 13:17:30.000000000","message":"Done","commit_id":"278d55ce78e66b421e62885464164b97c513890a"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5e389c9b59f036a2250e3e340b5bf59473e1d42e","unresolved":false,"context_lines":[{"line_number":506,"context_line":"        with contextlib.nested("},{"line_number":507,"context_line":"            mock.patch(\u0027neutron.db.db_base_plugin_v2.NeutronDbPluginV2\u0027"},{"line_number":508,"context_line":"                       \u0027.get_ports\u0027, return_value\u003d[vip_port]),"},{"line_number":509,"context_line":"            mock.patch(\u0027neutron.manager.NeutronManager.get_service_plugins\u0027,"},{"line_number":510,"context_line":"                       return_value\u003dmock.Mock()),"},{"line_number":511,"context_line":"            mock.patch(\u0027neutron.db.l3_db.L3_NAT_db_mixin.get_router\u0027,"},{"line_number":512,"context_line":"                       return_value\u003dr1),"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_90d045cb","line":509,"updated":"2014-08-25 08:59:50.000000000","message":"no need to mock","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5e389c9b59f036a2250e3e340b5bf59473e1d42e","unresolved":false,"context_lines":[{"line_number":508,"context_line":"                       \u0027.get_ports\u0027, return_value\u003d[vip_port]),"},{"line_number":509,"context_line":"            mock.patch(\u0027neutron.manager.NeutronManager.get_service_plugins\u0027,"},{"line_number":510,"context_line":"                       return_value\u003dmock.Mock()),"},{"line_number":511,"context_line":"            mock.patch(\u0027neutron.db.l3_db.L3_NAT_db_mixin.get_router\u0027,"},{"line_number":512,"context_line":"                       return_value\u003dr1),"},{"line_number":513,"context_line":"            mock.patch(\u0027neutron.api.rpc.agentnotifiers.l3_rpc_agent_api\u0027"},{"line_number":514,"context_line":"                       \u0027.L3AgentNotifyAPI\u0027),"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_b0d541bb","line":511,"updated":"2014-08-25 08:59:50.000000000","message":"ditto","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5e389c9b59f036a2250e3e340b5bf59473e1d42e","unresolved":false,"context_lines":[{"line_number":510,"context_line":"                       return_value\u003dmock.Mock()),"},{"line_number":511,"context_line":"            mock.patch(\u0027neutron.db.l3_db.L3_NAT_db_mixin.get_router\u0027,"},{"line_number":512,"context_line":"                       return_value\u003dr1),"},{"line_number":513,"context_line":"            mock.patch(\u0027neutron.api.rpc.agentnotifiers.l3_rpc_agent_api\u0027"},{"line_number":514,"context_line":"                       \u0027.L3AgentNotifyAPI\u0027),"},{"line_number":515,"context_line":"            mock.patch(\u0027neutron.common.utils\u0027"},{"line_number":516,"context_line":"                       \u0027.is_dvr_serviced\u0027)) as (c, p, d, e, f):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_30e1319b","line":513,"updated":"2014-08-25 08:59:50.000000000","message":"ditto","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5e389c9b59f036a2250e3e340b5bf59473e1d42e","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                       \u0027.L3AgentNotifyAPI\u0027),"},{"line_number":515,"context_line":"            mock.patch(\u0027neutron.common.utils\u0027"},{"line_number":516,"context_line":"                       \u0027.is_dvr_serviced\u0027)) as (c, p, d, e, f):"},{"line_number":517,"context_line":"            sub_ids \u003d self.dut.get_subnet_ids_on_router(self.adminContext,"},{"line_number":518,"context_line":"                                                        r1[\u0027id\u0027])"},{"line_number":519,"context_line":"            result \u003d self.dut.check_ports_active_on_host_and_subnet("},{"line_number":520,"context_line":"                                                    self.adminContext,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_b0baa16c","line":517,"updated":"2014-08-25 08:59:50.000000000","message":"not sure why is this needed in this test, consider just passing subnet_id od vip_port to below self.dut.check_ports_active_on_host_and_subnet()","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5e389c9b59f036a2250e3e340b5bf59473e1d42e","unresolved":false,"context_lines":[{"line_number":519,"context_line":"            result \u003d self.dut.check_ports_active_on_host_and_subnet("},{"line_number":520,"context_line":"                                                    self.adminContext,"},{"line_number":521,"context_line":"                                                    \u0027thisHost\u0027,"},{"line_number":522,"context_line":"                                                    \u0027lbaas-vip-port1\u0027,"},{"line_number":523,"context_line":"                                                    sub_ids)"},{"line_number":524,"context_line":"            self.assertFalse(result)"},{"line_number":525,"context_line":"            self.assertTrue(f.call_count)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_302bf195","line":522,"updated":"2014-08-25 08:59:50.000000000","message":"port_id param should be id of the DVR port, not vip or compute ports, that\u0027s the reason the func returns False in this case while it should really return True","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5e389c9b59f036a2250e3e340b5bf59473e1d42e","unresolved":false,"context_lines":[{"line_number":521,"context_line":"                                                    \u0027thisHost\u0027,"},{"line_number":522,"context_line":"                                                    \u0027lbaas-vip-port1\u0027,"},{"line_number":523,"context_line":"                                                    sub_ids)"},{"line_number":524,"context_line":"            self.assertFalse(result)"},{"line_number":525,"context_line":"            self.assertTrue(f.call_count)"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"    def test_schedule_snat_router_with_snat_candidates(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_d05c7d4f","line":524,"updated":"2014-08-25 08:59:50.000000000","message":"Unless I\u0027m missing something, this should be True as we have a DVR serviced port on the subnet","commit_id":"3bec0a3575a7711c6b5caa2f716c06f5a41be132"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"41756e5cf11c982234029ac54ff4992361a66c16","unresolved":false,"context_lines":[{"line_number":638,"context_line":"            mock.patch(\u0027neutron.db.db_base_plugin_v2.NeutronDbPluginV2\u0027"},{"line_number":639,"context_line":"                       \u0027.get_ports\u0027, return_value\u003d[vip_port]),"},{"line_number":640,"context_line":"            mock.patch(\u0027neutron.common.utils.is_dvr_serviced\u0027,"},{"line_number":641,"context_line":"                       return_value\u003dTrue)) as (c, p):"},{"line_number":642,"context_line":"            result \u003d self.dut.check_ports_active_on_host_and_subnet("},{"line_number":643,"context_line":"                                                    self.adminContext,"},{"line_number":644,"context_line":"                                                    \u0027thisHost\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_04d684c3","line":641,"updated":"2014-08-26 13:22:24.000000000","message":"nit: better to use more sensible mock names","commit_id":"f40243d041ea9b2e7f8ffbb16330b739d560e819"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"2fb02162260d58cb1ec0f1f205dc06b7844dc803","unresolved":false,"context_lines":[{"line_number":638,"context_line":"            mock.patch(\u0027neutron.db.db_base_plugin_v2.NeutronDbPluginV2\u0027"},{"line_number":639,"context_line":"                       \u0027.get_ports\u0027, return_value\u003d[vip_port]),"},{"line_number":640,"context_line":"            mock.patch(\u0027neutron.common.utils.is_dvr_serviced\u0027,"},{"line_number":641,"context_line":"                       return_value\u003dTrue)) as (c, p):"},{"line_number":642,"context_line":"            result \u003d self.dut.check_ports_active_on_host_and_subnet("},{"line_number":643,"context_line":"                                                    self.adminContext,"},{"line_number":644,"context_line":"                                                    \u0027thisHost\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_2f58b955","line":641,"in_reply_to":"1abeadc6_04d684c3","updated":"2014-08-26 13:57:20.000000000","message":"Done","commit_id":"f40243d041ea9b2e7f8ffbb16330b739d560e819"}]}
