)]}'
{"neutron/common/constants.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0d71146e6a3d521abac0e99e7ed6b34f50c30616","unresolved":false,"context_lines":[{"line_number":28,"context_line":"METERING_LABEL_KEY \u003d \u0027_metering_labels\u0027"},{"line_number":29,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d \u0027_floatingip_agent_interfaces\u0027"},{"line_number":30,"context_line":"SNAT_ROUTER_INTF_KEY \u003d \u0027_snat_router_interfaces\u0027"},{"line_number":31,"context_line":"UNBOUND_TO_SNAT_EDGE_BOUND \u003d \u0027dvr_snat_bound\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"HA_NETWORK_NAME \u003d \u0027HA network tenant %s\u0027"},{"line_number":34,"context_line":"HA_SUBNET_NAME \u003d \u0027HA subnet tenant %s\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_c5b8c0ca","line":31,"range":{"start_line":31,"start_character":0,"end_line":31,"end_character":26},"updated":"2017-02-27 08:19:40.000000000","message":"sounds a bit weird, why not DVR_SNAT_BOUND?","commit_id":"c536d4b11dd2e87e56ac802ad441344e9e4680c9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c7f262f0f1dbaed90b66ae73463bff9778d724a4","unresolved":false,"context_lines":[{"line_number":28,"context_line":"METERING_LABEL_KEY \u003d \u0027_metering_labels\u0027"},{"line_number":29,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d \u0027_floatingip_agent_interfaces\u0027"},{"line_number":30,"context_line":"SNAT_ROUTER_INTF_KEY \u003d \u0027_snat_router_interfaces\u0027"},{"line_number":31,"context_line":"UNBOUND_TO_SNAT_EDGE_BOUND \u003d \u0027dvr_snat_bound\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"HA_NETWORK_NAME \u003d \u0027HA network tenant %s\u0027"},{"line_number":34,"context_line":"HA_SUBNET_NAME \u003d \u0027HA subnet tenant %s\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_cf499f90","line":31,"range":{"start_line":31,"start_character":0,"end_line":31,"end_character":26},"in_reply_to":"da36d5c6_c5b8c0ca","updated":"2017-02-28 22:52:28.000000000","message":"Sure I will make this change.","commit_id":"c536d4b11dd2e87e56ac802ad441344e9e4680c9"}],"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0d71146e6a3d521abac0e99e7ed6b34f50c30616","unresolved":false,"context_lines":[{"line_number":524,"context_line":"                    # Make sure if the fip port does not have any host defined"},{"line_number":525,"context_line":"                    # and the agent requesting is dvr_snat agent, and the fip"},{"line_number":526,"context_line":"                    # has already been assigned an unbound state for the"},{"line_number":527,"context_line":"                    # purpose of vrrp ports, let us go ahead and forward the"},{"line_number":528,"context_line":"                    # fip details to the agents."},{"line_number":529,"context_line":"                    if (fip_host and host_mismatch and"},{"line_number":530,"context_line":"                        agent_mode in [const.L3_LEGACY,"},{"line_number":531,"context_line":"                                       const.L3_AGENT_MODE_DVR] and"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_a5df4cd4","line":528,"range":{"start_line":527,"start_character":45,"end_line":528,"end_character":48},"updated":"2017-02-27 08:19:40.000000000","message":"a bit contradicts with #534 saying \u0027continue\u0027","commit_id":"c536d4b11dd2e87e56ac802ad441344e9e4680c9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c7f262f0f1dbaed90b66ae73463bff9778d724a4","unresolved":false,"context_lines":[{"line_number":524,"context_line":"                    # Make sure if the fip port does not have any host defined"},{"line_number":525,"context_line":"                    # and the agent requesting is dvr_snat agent, and the fip"},{"line_number":526,"context_line":"                    # has already been assigned an unbound state for the"},{"line_number":527,"context_line":"                    # purpose of vrrp ports, let us go ahead and forward the"},{"line_number":528,"context_line":"                    # fip details to the agents."},{"line_number":529,"context_line":"                    if (fip_host and host_mismatch and"},{"line_number":530,"context_line":"                        agent_mode in [const.L3_LEGACY,"},{"line_number":531,"context_line":"                                       const.L3_AGENT_MODE_DVR] and"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_0f449772","line":528,"range":{"start_line":527,"start_character":45,"end_line":528,"end_character":48},"in_reply_to":"da36d5c6_a5df4cd4","updated":"2017-02-28 22:52:28.000000000","message":"Let me rephrase it.","commit_id":"c536d4b11dd2e87e56ac802ad441344e9e4680c9"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0d71146e6a3d521abac0e99e7ed6b34f50c30616","unresolved":false,"context_lines":[{"line_number":578,"context_line":"                # As of now we consider unbound vrrp ports with"},{"line_number":579,"context_line":"                # no specific device owner and also with LBaaS"},{"line_number":580,"context_line":"                # device owners"},{"line_number":581,"context_line":"                unbound_ports \u003d (port[\u0027device_owner\u0027] in ("},{"line_number":582,"context_line":"                    const.DEVICE_OWNER_LOADBALANCER,"},{"line_number":583,"context_line":"                    const.DEVICE_OWNER_LOADBALANCERV2,"},{"line_number":584,"context_line":"                    \u0027\u0027) and"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_a58d8cd4","line":581,"range":{"start_line":581,"start_character":16,"end_line":581,"end_character":29},"updated":"2017-02-27 08:19:40.000000000","message":"sounds like a list of ports while actually is a bool, consider renaming","commit_id":"c536d4b11dd2e87e56ac802ad441344e9e4680c9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c7f262f0f1dbaed90b66ae73463bff9778d724a4","unresolved":false,"context_lines":[{"line_number":578,"context_line":"                # As of now we consider unbound vrrp ports with"},{"line_number":579,"context_line":"                # no specific device owner and also with LBaaS"},{"line_number":580,"context_line":"                # device owners"},{"line_number":581,"context_line":"                unbound_ports \u003d (port[\u0027device_owner\u0027] in ("},{"line_number":582,"context_line":"                    const.DEVICE_OWNER_LOADBALANCER,"},{"line_number":583,"context_line":"                    const.DEVICE_OWNER_LOADBALANCERV2,"},{"line_number":584,"context_line":"                    \u0027\u0027) and"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_6f5b5355","line":581,"range":{"start_line":581,"start_character":16,"end_line":581,"end_character":29},"in_reply_to":"da36d5c6_a58d8cd4","updated":"2017-02-28 22:52:28.000000000","message":"Sure will rename it.","commit_id":"c536d4b11dd2e87e56ac802ad441344e9e4680c9"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0d71146e6a3d521abac0e99e7ed6b34f50c30616","unresolved":false,"context_lines":[{"line_number":602,"context_line":"                    # then set the fip[\u0027unbound\u0027] to the constant"},{"line_number":603,"context_line":"                    # UNBOUND_TO_SNAT_EDGE_BOUND the specified fip."},{"line_number":604,"context_line":"                    if (not fip[\u0027host\u0027]):"},{"line_number":605,"context_line":"                        fip[\u0027unbound\u0027] \u003d l3_const.UNBOUND_TO_SNAT_EDGE_BOUND"},{"line_number":606,"context_line":"        routers_dict \u003d self._process_routers(context, routers)"},{"line_number":607,"context_line":"        self._process_floating_ips_dvr(context, routers_dict,"},{"line_number":608,"context_line":"                                       floating_ips, host, agent)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_852ec8a2","line":605,"range":{"start_line":605,"start_character":28,"end_line":605,"end_character":37},"updated":"2017-02-27 08:19:40.000000000","message":"consider fip[l3_const.UNBOUND_TO_SNAT_EDGE_BOUND] \u003d True/False","commit_id":"c536d4b11dd2e87e56ac802ad441344e9e4680c9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c7f262f0f1dbaed90b66ae73463bff9778d724a4","unresolved":false,"context_lines":[{"line_number":602,"context_line":"                    # then set the fip[\u0027unbound\u0027] to the constant"},{"line_number":603,"context_line":"                    # UNBOUND_TO_SNAT_EDGE_BOUND the specified fip."},{"line_number":604,"context_line":"                    if (not fip[\u0027host\u0027]):"},{"line_number":605,"context_line":"                        fip[\u0027unbound\u0027] \u003d l3_const.UNBOUND_TO_SNAT_EDGE_BOUND"},{"line_number":606,"context_line":"        routers_dict \u003d self._process_routers(context, routers)"},{"line_number":607,"context_line":"        self._process_floating_ips_dvr(context, routers_dict,"},{"line_number":608,"context_line":"                                       floating_ips, host, agent)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_0f3bb7ec","line":605,"range":{"start_line":605,"start_character":28,"end_line":605,"end_character":37},"in_reply_to":"da36d5c6_852ec8a2","updated":"2017-02-28 22:52:28.000000000","message":"Sure will fix it.","commit_id":"c536d4b11dd2e87e56ac802ad441344e9e4680c9"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"a7d10917b6b0ff8dc88388b0cfeb84862b12e641","unresolved":false,"context_lines":[{"line_number":515,"context_line":"            if router:"},{"line_number":516,"context_line":"                router_floatingips \u003d router.get(const.FLOATINGIP_KEY, [])"},{"line_number":517,"context_line":"                if router[\u0027distributed\u0027]:"},{"line_number":518,"context_line":"                    # Condition to check if host not matching with the"},{"line_number":519,"context_line":"                    # fip host."},{"line_number":520,"context_line":"                    fip_host \u003d floating_ip.get(\u0027host\u0027)"},{"line_number":521,"context_line":"                    host_mismatch \u003d ("},{"line_number":522,"context_line":"                        fip_host !\u003d host and"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_34403934","line":519,"range":{"start_line":518,"start_character":20,"end_line":519,"end_character":31},"updated":"2017-03-03 12:24:10.000000000","message":"the code is pretty self-documented here","commit_id":"f168eddc325a06d25c31e85b696db6cd2adc9f31"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"01741b9c44e2db66a84595a8ca20c7ef3335d7f2","unresolved":false,"context_lines":[{"line_number":515,"context_line":"            if router:"},{"line_number":516,"context_line":"                router_floatingips \u003d router.get(const.FLOATINGIP_KEY, [])"},{"line_number":517,"context_line":"                if router[\u0027distributed\u0027]:"},{"line_number":518,"context_line":"                    # Condition to check if host not matching with the"},{"line_number":519,"context_line":"                    # fip host."},{"line_number":520,"context_line":"                    fip_host \u003d floating_ip.get(\u0027host\u0027)"},{"line_number":521,"context_line":"                    host_mismatch \u003d ("},{"line_number":522,"context_line":"                        fip_host !\u003d host and"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_c76d55cd","line":519,"range":{"start_line":518,"start_character":20,"end_line":519,"end_character":31},"in_reply_to":"ba2be162_34403934","updated":"2017-03-08 17:06:42.000000000","message":"Will remove the comment then.","commit_id":"f168eddc325a06d25c31e85b696db6cd2adc9f31"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"a7d10917b6b0ff8dc88388b0cfeb84862b12e641","unresolved":false,"context_lines":[{"line_number":572,"context_line":"                port_in_migration \u003d ("},{"line_number":573,"context_line":"                    port_profile and"},{"line_number":574,"context_line":"                    port_profile.get(\u0027migrating_to\u0027) \u003d\u003d host)"},{"line_number":575,"context_line":"                # As of now we consider unbound vrrp ports with"},{"line_number":576,"context_line":"                # no specific device owner and also with LBaaS"},{"line_number":577,"context_line":"                # device owners"},{"line_number":578,"context_line":"                unbound_port_exists \u003d (port[\u0027device_owner\u0027] in ("}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_74ec71f3","line":575,"range":{"start_line":575,"start_character":48,"end_line":575,"end_character":52},"updated":"2017-03-03 12:24:10.000000000","message":"can\u0027t see any vrrp related logic in the code","commit_id":"f168eddc325a06d25c31e85b696db6cd2adc9f31"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"01741b9c44e2db66a84595a8ca20c7ef3335d7f2","unresolved":false,"context_lines":[{"line_number":572,"context_line":"                port_in_migration \u003d ("},{"line_number":573,"context_line":"                    port_profile and"},{"line_number":574,"context_line":"                    port_profile.get(\u0027migrating_to\u0027) \u003d\u003d host)"},{"line_number":575,"context_line":"                # As of now we consider unbound vrrp ports with"},{"line_number":576,"context_line":"                # no specific device owner and also with LBaaS"},{"line_number":577,"context_line":"                # device owners"},{"line_number":578,"context_line":"                unbound_port_exists \u003d (port[\u0027device_owner\u0027] in ("}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_c7a47509","line":575,"range":{"start_line":575,"start_character":48,"end_line":575,"end_character":52},"in_reply_to":"ba2be162_74ec71f3","updated":"2017-03-08 17:06:42.000000000","message":"Just mention it as unbound ports then.","commit_id":"f168eddc325a06d25c31e85b696db6cd2adc9f31"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"a7d10917b6b0ff8dc88388b0cfeb84862b12e641","unresolved":false,"context_lines":[{"line_number":593,"context_line":"                        self._get_dvr_migrating_service_port_hostid("},{"line_number":594,"context_line":"                            context, fip[\u0027port_id\u0027], port\u003dvm_port))"},{"line_number":595,"context_line":"                    # Handle the case were there is no host binding"},{"line_number":596,"context_line":"                    # for the fip ports that are associated with vrrp."},{"line_number":597,"context_line":"                    # If no host binding and device_owner either"},{"line_number":598,"context_line":"                    # in loadbalacer, loadbalancerv2 or empty"},{"line_number":599,"context_line":"                    # then set the fip[\u0027dvr_snat_bound\u0027] to True"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_b4c0a951","line":596,"range":{"start_line":596,"start_character":65,"end_line":596,"end_character":69},"updated":"2017-03-03 12:24:10.000000000","message":"ditto","commit_id":"f168eddc325a06d25c31e85b696db6cd2adc9f31"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"01741b9c44e2db66a84595a8ca20c7ef3335d7f2","unresolved":false,"context_lines":[{"line_number":593,"context_line":"                        self._get_dvr_migrating_service_port_hostid("},{"line_number":594,"context_line":"                            context, fip[\u0027port_id\u0027], port\u003dvm_port))"},{"line_number":595,"context_line":"                    # Handle the case were there is no host binding"},{"line_number":596,"context_line":"                    # for the fip ports that are associated with vrrp."},{"line_number":597,"context_line":"                    # If no host binding and device_owner either"},{"line_number":598,"context_line":"                    # in loadbalacer, loadbalancerv2 or empty"},{"line_number":599,"context_line":"                    # then set the fip[\u0027dvr_snat_bound\u0027] to True"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_47b9652d","line":596,"range":{"start_line":596,"start_character":65,"end_line":596,"end_character":69},"in_reply_to":"ba2be162_b4c0a951","updated":"2017-03-08 17:06:42.000000000","message":"Will change it just unbound ports.","commit_id":"f168eddc325a06d25c31e85b696db6cd2adc9f31"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"a7d10917b6b0ff8dc88388b0cfeb84862b12e641","unresolved":false,"context_lines":[{"line_number":947,"context_line":"            if host is not None:"},{"line_number":948,"context_line":"                self.l3_rpc_notifier.routers_updated_on_host("},{"line_number":949,"context_line":"                    context, [router_id], host)"},{"line_number":950,"context_line":"            if not host:"},{"line_number":951,"context_line":"                unbound_port \u003d self._core_plugin.get_port("},{"line_number":952,"context_line":"                    context.elevated(), fixed_port_id)"},{"line_number":953,"context_line":"                if (unbound_port[\u0027device_owner\u0027] in ("}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_541e8dbb","line":950,"range":{"start_line":950,"start_character":12,"end_line":950,"end_character":24},"updated":"2017-03-03 12:24:10.000000000","message":"else?","commit_id":"f168eddc325a06d25c31e85b696db6cd2adc9f31"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"01741b9c44e2db66a84595a8ca20c7ef3335d7f2","unresolved":false,"context_lines":[{"line_number":947,"context_line":"            if host is not None:"},{"line_number":948,"context_line":"                self.l3_rpc_notifier.routers_updated_on_host("},{"line_number":949,"context_line":"                    context, [router_id], host)"},{"line_number":950,"context_line":"            if not host:"},{"line_number":951,"context_line":"                unbound_port \u003d self._core_plugin.get_port("},{"line_number":952,"context_line":"                    context.elevated(), fixed_port_id)"},{"line_number":953,"context_line":"                if (unbound_port[\u0027device_owner\u0027] in ("}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_a7d6a14c","line":950,"range":{"start_line":950,"start_character":12,"end_line":950,"end_character":24},"in_reply_to":"ba2be162_541e8dbb","updated":"2017-03-08 17:06:42.000000000","message":"I have seen that \u0027else\u0027","commit_id":"f168eddc325a06d25c31e85b696db6cd2adc9f31"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d14721c413ac0f1ae672af289242fb775757869e","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                    host_mismatch \u003d ("},{"line_number":506,"context_line":"                        fip_host !\u003d host and"},{"line_number":507,"context_line":"                        floating_ip.get(\u0027dest_host\u0027) is None)"},{"line_number":508,"context_line":"                    # Make sure if the fip port does not have any host defined"},{"line_number":509,"context_line":"                    # and the agent requesting is dvr_snat agent, and the fip"},{"line_number":510,"context_line":"                    # has not already been assigned \u0027dvr_snat_bound\u0027 state."},{"line_number":511,"context_line":"                    if (fip_host and host_mismatch and"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_c6b3fd4c","line":508,"range":{"start_line":508,"start_character":48,"end_line":508,"end_character":61},"updated":"2017-04-03 13:52:16.000000000","message":"the check below contradicts with this","commit_id":"c86e51df6a34a851721b32dd316bb2dd1e713ab0"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"24685b325ac5a8b396d1a332b9e379e3ef47fdfb","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                    host_mismatch \u003d ("},{"line_number":506,"context_line":"                        fip_host !\u003d host and"},{"line_number":507,"context_line":"                        floating_ip.get(\u0027dest_host\u0027) is None)"},{"line_number":508,"context_line":"                    # Make sure if the fip port does not have any host defined"},{"line_number":509,"context_line":"                    # and the agent requesting is dvr_snat agent, and the fip"},{"line_number":510,"context_line":"                    # has not already been assigned \u0027dvr_snat_bound\u0027 state."},{"line_number":511,"context_line":"                    if (fip_host and host_mismatch and"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_2f2391aa","line":508,"range":{"start_line":508,"start_character":48,"end_line":508,"end_character":61},"in_reply_to":"dfeb2761_c6b3fd4c","updated":"2017-04-03 18:02:28.000000000","message":"Ok will this out.","commit_id":"c86e51df6a34a851721b32dd316bb2dd1e713ab0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d14721c413ac0f1ae672af289242fb775757869e","unresolved":false,"context_lines":[{"line_number":506,"context_line":"                        fip_host !\u003d host and"},{"line_number":507,"context_line":"                        floating_ip.get(\u0027dest_host\u0027) is None)"},{"line_number":508,"context_line":"                    # Make sure if the fip port does not have any host defined"},{"line_number":509,"context_line":"                    # and the agent requesting is dvr_snat agent, and the fip"},{"line_number":510,"context_line":"                    # has not already been assigned \u0027dvr_snat_bound\u0027 state."},{"line_number":511,"context_line":"                    if (fip_host and host_mismatch and"},{"line_number":512,"context_line":"                        agent_mode in [const.L3_LEGACY,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_069325a5","line":509,"range":{"start_line":509,"start_character":47,"end_line":509,"end_character":64},"updated":"2017-04-03 13:52:16.000000000","message":"is legacy or dvr (not dvr_snat) agent according to check below. Can you please rephrase the comment, like \"Skip floating IP in case it ...\"","commit_id":"c86e51df6a34a851721b32dd316bb2dd1e713ab0"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"24685b325ac5a8b396d1a332b9e379e3ef47fdfb","unresolved":false,"context_lines":[{"line_number":506,"context_line":"                        fip_host !\u003d host and"},{"line_number":507,"context_line":"                        floating_ip.get(\u0027dest_host\u0027) is None)"},{"line_number":508,"context_line":"                    # Make sure if the fip port does not have any host defined"},{"line_number":509,"context_line":"                    # and the agent requesting is dvr_snat agent, and the fip"},{"line_number":510,"context_line":"                    # has not already been assigned \u0027dvr_snat_bound\u0027 state."},{"line_number":511,"context_line":"                    if (fip_host and host_mismatch and"},{"line_number":512,"context_line":"                        agent_mode in [const.L3_LEGACY,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_842a848d","line":509,"range":{"start_line":509,"start_character":47,"end_line":509,"end_character":64},"in_reply_to":"dfeb2761_069325a5","updated":"2017-04-03 18:02:28.000000000","message":"Will rephrase my comment.","commit_id":"c86e51df6a34a851721b32dd316bb2dd1e713ab0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d14721c413ac0f1ae672af289242fb775757869e","unresolved":false,"context_lines":[{"line_number":556,"context_line":"                port_in_migration \u003d ("},{"line_number":557,"context_line":"                    port_profile and"},{"line_number":558,"context_line":"                    port_profile.get(\u0027migrating_to\u0027) \u003d\u003d host)"},{"line_number":559,"context_line":"                # As of now we consider unbound ports with"},{"line_number":560,"context_line":"                # no specific device owner and also with LBaaS"},{"line_number":561,"context_line":"                # as device owners."},{"line_number":562,"context_line":"                unbound_port_exists \u003d (port[\u0027device_owner\u0027] in ("},{"line_number":563,"context_line":"                    const.DEVICE_OWNER_LOADBALANCER,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_86f3b573","line":560,"range":{"start_line":559,"start_character":54,"end_line":560,"end_character":36},"updated":"2017-04-03 13:52:16.000000000","message":"what happens when an unbound port with associated floating ip gets assigned to a VM? Floating IP is then handled on compute node, but we have it on a dvr_snat node already. I think we need to avoid processing of such floating ips on dvr_snat nodes.","commit_id":"c86e51df6a34a851721b32dd316bb2dd1e713ab0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"338971c798963f056d3c5a49f129317efc4de91a","unresolved":false,"context_lines":[{"line_number":556,"context_line":"                port_in_migration \u003d ("},{"line_number":557,"context_line":"                    port_profile and"},{"line_number":558,"context_line":"                    port_profile.get(\u0027migrating_to\u0027) \u003d\u003d host)"},{"line_number":559,"context_line":"                # As of now we consider unbound ports with"},{"line_number":560,"context_line":"                # no specific device owner and also with LBaaS"},{"line_number":561,"context_line":"                # as device owners."},{"line_number":562,"context_line":"                unbound_port_exists \u003d (port[\u0027device_owner\u0027] in ("},{"line_number":563,"context_line":"                    const.DEVICE_OWNER_LOADBALANCER,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_e8bcbcbc","line":560,"range":{"start_line":559,"start_character":54,"end_line":560,"end_character":36},"in_reply_to":"dfeb2761_243cd8e0","updated":"2017-04-06 11:46:45.000000000","message":"Can port be associated with a VM and not have binding?\n\nThere is a use case where a port is created, associated with a floating IP and then passed to boot VM command. We should be sure we\u0027re nor breaking this case.","commit_id":"c86e51df6a34a851721b32dd316bb2dd1e713ab0"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"24685b325ac5a8b396d1a332b9e379e3ef47fdfb","unresolved":false,"context_lines":[{"line_number":556,"context_line":"                port_in_migration \u003d ("},{"line_number":557,"context_line":"                    port_profile and"},{"line_number":558,"context_line":"                    port_profile.get(\u0027migrating_to\u0027) \u003d\u003d host)"},{"line_number":559,"context_line":"                # As of now we consider unbound ports with"},{"line_number":560,"context_line":"                # no specific device owner and also with LBaaS"},{"line_number":561,"context_line":"                # as device owners."},{"line_number":562,"context_line":"                unbound_port_exists \u003d (port[\u0027device_owner\u0027] in ("},{"line_number":563,"context_line":"                    const.DEVICE_OWNER_LOADBALANCER,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_243cd8e0","line":560,"range":{"start_line":559,"start_character":54,"end_line":560,"end_character":36},"in_reply_to":"dfeb2761_86f3b573","updated":"2017-04-03 18:02:28.000000000","message":"The floatingip will be handled on compute Node, only if there is port binding that is bound to that compute host.\n\nIf the port does not have a port binding and has a floatingip and associated with a VM, still that is considered as unbound and will be configured on the DVR_SNAT node.","commit_id":"c86e51df6a34a851721b32dd316bb2dd1e713ab0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d14721c413ac0f1ae672af289242fb775757869e","unresolved":false,"context_lines":[{"line_number":559,"context_line":"                # As of now we consider unbound ports with"},{"line_number":560,"context_line":"                # no specific device owner and also with LBaaS"},{"line_number":561,"context_line":"                # as device owners."},{"line_number":562,"context_line":"                unbound_port_exists \u003d (port[\u0027device_owner\u0027] in ("},{"line_number":563,"context_line":"                    const.DEVICE_OWNER_LOADBALANCER,"},{"line_number":564,"context_line":"                    const.DEVICE_OWNER_LOADBALANCERV2,"},{"line_number":565,"context_line":"                    \u0027\u0027) and"},{"line_number":566,"context_line":"                    not port[portbindings.HOST_ID])"},{"line_number":567,"context_line":"                if (port[portbindings.HOST_ID] \u003d\u003d host or port_in_migration or"},{"line_number":568,"context_line":"                    unbound_port_exists):"},{"line_number":569,"context_line":"                    port_dict.update({port[\u0027id\u0027]: port})"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_660e718e","line":566,"range":{"start_line":562,"start_character":16,"end_line":566,"end_character":51},"updated":"2017-04-03 13:52:16.000000000","message":"this better be a function","commit_id":"c86e51df6a34a851721b32dd316bb2dd1e713ab0"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"24685b325ac5a8b396d1a332b9e379e3ef47fdfb","unresolved":false,"context_lines":[{"line_number":559,"context_line":"                # As of now we consider unbound ports with"},{"line_number":560,"context_line":"                # no specific device owner and also with LBaaS"},{"line_number":561,"context_line":"                # as device owners."},{"line_number":562,"context_line":"                unbound_port_exists \u003d (port[\u0027device_owner\u0027] in ("},{"line_number":563,"context_line":"                    const.DEVICE_OWNER_LOADBALANCER,"},{"line_number":564,"context_line":"                    const.DEVICE_OWNER_LOADBALANCERV2,"},{"line_number":565,"context_line":"                    \u0027\u0027) and"},{"line_number":566,"context_line":"                    not port[portbindings.HOST_ID])"},{"line_number":567,"context_line":"                if (port[portbindings.HOST_ID] \u003d\u003d host or port_in_migration or"},{"line_number":568,"context_line":"                    unbound_port_exists):"},{"line_number":569,"context_line":"                    port_dict.update({port[\u0027id\u0027]: port})"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_24a05843","line":566,"range":{"start_line":562,"start_character":16,"end_line":566,"end_character":51},"in_reply_to":"dfeb2761_660e718e","updated":"2017-04-03 18:02:28.000000000","message":"will add a function","commit_id":"c86e51df6a34a851721b32dd316bb2dd1e713ab0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d14721c413ac0f1ae672af289242fb775757869e","unresolved":false,"context_lines":[{"line_number":579,"context_line":"                    # Handle the case were there is no host binding"},{"line_number":580,"context_line":"                    # for the private ports that are associated with"},{"line_number":581,"context_line":"                    # floating ip."},{"line_number":582,"context_line":"                    # If no host binding and device_owner either"},{"line_number":583,"context_line":"                    # in loadbalacer, loadbalancerv2 or empty"},{"line_number":584,"context_line":"                    # then set the fip[\u0027dvr_snat_bound\u0027] to True"},{"line_number":585,"context_line":"                    if (not fip[\u0027host\u0027]):"},{"line_number":586,"context_line":"                        fip[l3_const.DVR_SNAT_BOUND] \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_26e74915","line":583,"range":{"start_line":582,"start_character":41,"end_line":583,"end_character":61},"updated":"2017-04-03 13:52:16.000000000","message":"where is this checked?","commit_id":"c86e51df6a34a851721b32dd316bb2dd1e713ab0"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"24685b325ac5a8b396d1a332b9e379e3ef47fdfb","unresolved":false,"context_lines":[{"line_number":579,"context_line":"                    # Handle the case were there is no host binding"},{"line_number":580,"context_line":"                    # for the private ports that are associated with"},{"line_number":581,"context_line":"                    # floating ip."},{"line_number":582,"context_line":"                    # If no host binding and device_owner either"},{"line_number":583,"context_line":"                    # in loadbalacer, loadbalancerv2 or empty"},{"line_number":584,"context_line":"                    # then set the fip[\u0027dvr_snat_bound\u0027] to True"},{"line_number":585,"context_line":"                    if (not fip[\u0027host\u0027]):"},{"line_number":586,"context_line":"                        fip[l3_const.DVR_SNAT_BOUND] \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_649660f3","line":583,"range":{"start_line":582,"start_character":41,"end_line":583,"end_character":61},"in_reply_to":"dfeb2761_26e74915","updated":"2017-04-03 18:02:28.000000000","message":"This is checked below in Line #938","commit_id":"c86e51df6a34a851721b32dd316bb2dd1e713ab0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"338971c798963f056d3c5a49f129317efc4de91a","unresolved":false,"context_lines":[{"line_number":579,"context_line":"                    # Handle the case were there is no host binding"},{"line_number":580,"context_line":"                    # for the private ports that are associated with"},{"line_number":581,"context_line":"                    # floating ip."},{"line_number":582,"context_line":"                    # If no host binding and device_owner either"},{"line_number":583,"context_line":"                    # in loadbalacer, loadbalancerv2 or empty"},{"line_number":584,"context_line":"                    # then set the fip[\u0027dvr_snat_bound\u0027] to True"},{"line_number":585,"context_line":"                    if (not fip[\u0027host\u0027]):"},{"line_number":586,"context_line":"                        fip[l3_const.DVR_SNAT_BOUND] \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_ae4a3d52","line":583,"range":{"start_line":582,"start_character":41,"end_line":583,"end_character":61},"in_reply_to":"dfeb2761_649660f3","updated":"2017-04-06 11:46:45.000000000","message":"then this comment should be there I believe","commit_id":"c86e51df6a34a851721b32dd316bb2dd1e713ab0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d8c4505e1bb4b3f45e8d7b410a79124b8d9985ce","unresolved":false,"context_lines":[{"line_number":507,"context_line":"                        floating_ip.get(\u0027dest_host\u0027) is None)"},{"line_number":508,"context_line":"                    # Skip floatingip if the fip port have a host defined"},{"line_number":509,"context_line":"                    # and if the host does not match and the agent requesting"},{"line_number":510,"context_line":"                    # is dvr_snat agent, and the fip has not already been"},{"line_number":511,"context_line":"                    # assigned \u0027dvr_snat_bound\u0027 state."},{"line_number":512,"context_line":"                    if (fip_host and host_mismatch and"},{"line_number":513,"context_line":"                        agent_mode in [const.L3_LEGACY,"}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_b29d015b","line":510,"range":{"start_line":510,"start_character":22,"end_line":510,"end_character":39},"updated":"2017-04-06 11:51:16.000000000","message":"is not?","commit_id":"7ab1bf755629495db827a21fc87f45d26a2eeed2"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c1c41a25303ba35670a1c1daeb0c1818be1550b0","unresolved":false,"context_lines":[{"line_number":507,"context_line":"                        floating_ip.get(\u0027dest_host\u0027) is None)"},{"line_number":508,"context_line":"                    # Skip floatingip if the fip port have a host defined"},{"line_number":509,"context_line":"                    # and if the host does not match and the agent requesting"},{"line_number":510,"context_line":"                    # is dvr_snat agent, and the fip has not already been"},{"line_number":511,"context_line":"                    # assigned \u0027dvr_snat_bound\u0027 state."},{"line_number":512,"context_line":"                    if (fip_host and host_mismatch and"},{"line_number":513,"context_line":"                        agent_mode in [const.L3_LEGACY,"}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_bee9391b","line":510,"range":{"start_line":510,"start_character":22,"end_line":510,"end_character":39},"in_reply_to":"bff0334d_b29d015b","updated":"2017-04-06 20:22:56.000000000","message":"will fix it.","commit_id":"7ab1bf755629495db827a21fc87f45d26a2eeed2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d8c4505e1bb4b3f45e8d7b410a79124b8d9985ce","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                    # and if the host does not match and the agent requesting"},{"line_number":510,"context_line":"                    # is dvr_snat agent, and the fip has not already been"},{"line_number":511,"context_line":"                    # assigned \u0027dvr_snat_bound\u0027 state."},{"line_number":512,"context_line":"                    if (fip_host and host_mismatch and"},{"line_number":513,"context_line":"                        agent_mode in [const.L3_LEGACY,"},{"line_number":514,"context_line":"                                       const.L3_AGENT_MODE_DVR] and"},{"line_number":515,"context_line":"                        not floating_ip.get(l3_const.DVR_SNAT_BOUND)):"},{"line_number":516,"context_line":"                        continue"},{"line_number":517,"context_line":"                    LOG.debug(\"Floating IP host: %s\", fip_host)"},{"line_number":518,"context_line":"                router_floatingips.append(floating_ip)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_480288b6","line":515,"range":{"start_line":512,"start_character":20,"end_line":515,"end_character":70},"updated":"2017-04-06 11:51:16.000000000","message":"shouldn\u0027t we skip if it\u0027s a dvr_snat agent but still host mismatch?","commit_id":"7ab1bf755629495db827a21fc87f45d26a2eeed2"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c1c41a25303ba35670a1c1daeb0c1818be1550b0","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                    # and if the host does not match and the agent requesting"},{"line_number":510,"context_line":"                    # is dvr_snat agent, and the fip has not already been"},{"line_number":511,"context_line":"                    # assigned \u0027dvr_snat_bound\u0027 state."},{"line_number":512,"context_line":"                    if (fip_host and host_mismatch and"},{"line_number":513,"context_line":"                        agent_mode in [const.L3_LEGACY,"},{"line_number":514,"context_line":"                                       const.L3_AGENT_MODE_DVR] and"},{"line_number":515,"context_line":"                        not floating_ip.get(l3_const.DVR_SNAT_BOUND)):"},{"line_number":516,"context_line":"                        continue"},{"line_number":517,"context_line":"                    LOG.debug(\"Floating IP host: %s\", fip_host)"},{"line_number":518,"context_line":"                router_floatingips.append(floating_ip)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_de8cfd80","line":515,"range":{"start_line":512,"start_character":20,"end_line":515,"end_character":70},"in_reply_to":"bff0334d_480288b6","updated":"2017-04-06 20:22:56.000000000","message":"Sometimes the host-mismatch can occur when we move the floatingip from one host to another, so it is still valid case.","commit_id":"7ab1bf755629495db827a21fc87f45d26a2eeed2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1e94190fab03301c809d612850c9ad4733430e96","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                    # and if the host does not match and the agent requesting"},{"line_number":510,"context_line":"                    # is dvr_snat agent, and the fip has not already been"},{"line_number":511,"context_line":"                    # assigned \u0027dvr_snat_bound\u0027 state."},{"line_number":512,"context_line":"                    if (fip_host and host_mismatch and"},{"line_number":513,"context_line":"                        agent_mode in [const.L3_LEGACY,"},{"line_number":514,"context_line":"                                       const.L3_AGENT_MODE_DVR] and"},{"line_number":515,"context_line":"                        not floating_ip.get(l3_const.DVR_SNAT_BOUND)):"},{"line_number":516,"context_line":"                        continue"},{"line_number":517,"context_line":"                    LOG.debug(\"Floating IP host: %s\", fip_host)"},{"line_number":518,"context_line":"                router_floatingips.append(floating_ip)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_27dbc7ed","line":515,"range":{"start_line":512,"start_character":20,"end_line":515,"end_character":70},"in_reply_to":"bff0334d_de8cfd80","updated":"2017-04-07 08:59:53.000000000","message":"host_mismatch means \"floating_ip.get(\u0027dest_host\u0027) is None\" #507.\n\nMy point is that if fip has host, and host did not match with agent host, and this is not a dvr_snat_bound fip - we should skip it, rather than doing another extra filtering on agent side. Current code doesn\u0027t skip in case of dvr_snat agent.","commit_id":"7ab1bf755629495db827a21fc87f45d26a2eeed2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d8c4505e1bb4b3f45e8d7b410a79124b8d9985ce","unresolved":false,"context_lines":[{"line_number":558,"context_line":"                    port_profile and"},{"line_number":559,"context_line":"                    port_profile.get(\u0027migrating_to\u0027) \u003d\u003d host)"},{"line_number":560,"context_line":"                # All unbound ports with floatingip and"},{"line_number":561,"context_line":"                # no specific device owner or LBaaS"},{"line_number":562,"context_line":"                # as device owners should be included as valid"},{"line_number":563,"context_line":"                # ports and updated."},{"line_number":564,"context_line":"                unbound_port_exists \u003d self._check_if_unbound_ports_exist("}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_0e836955","line":561,"range":{"start_line":561,"start_character":46,"end_line":561,"end_character":51},"updated":"2017-04-06 11:51:16.000000000","message":"this info should be incapsulated inside the method added","commit_id":"7ab1bf755629495db827a21fc87f45d26a2eeed2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d8c4505e1bb4b3f45e8d7b410a79124b8d9985ce","unresolved":false,"context_lines":[{"line_number":578,"context_line":"                    # Handle the case were there is no host binding"},{"line_number":579,"context_line":"                    # for the private ports that are associated with"},{"line_number":580,"context_line":"                    # floating ip."},{"line_number":581,"context_line":"                    # If no host binding and device_owner either"},{"line_number":582,"context_line":"                    # in loadbalacer, loadbalancerv2 or empty"},{"line_number":583,"context_line":"                    # then set the fip[\u0027dvr_snat_bound\u0027] to True"},{"line_number":584,"context_line":"                    if (not fip[\u0027host\u0027]):"},{"line_number":585,"context_line":"                        fip[l3_const.DVR_SNAT_BOUND] \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_ee972590","line":582,"range":{"start_line":581,"start_character":22,"end_line":582,"end_character":52},"updated":"2017-04-06 11:51:16.000000000","message":"ditto","commit_id":"7ab1bf755629495db827a21fc87f45d26a2eeed2"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c1c41a25303ba35670a1c1daeb0c1818be1550b0","unresolved":false,"context_lines":[{"line_number":578,"context_line":"                    # Handle the case were there is no host binding"},{"line_number":579,"context_line":"                    # for the private ports that are associated with"},{"line_number":580,"context_line":"                    # floating ip."},{"line_number":581,"context_line":"                    # If no host binding and device_owner either"},{"line_number":582,"context_line":"                    # in loadbalacer, loadbalancerv2 or empty"},{"line_number":583,"context_line":"                    # then set the fip[\u0027dvr_snat_bound\u0027] to True"},{"line_number":584,"context_line":"                    if (not fip[\u0027host\u0027]):"},{"line_number":585,"context_line":"                        fip[l3_const.DVR_SNAT_BOUND] \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_3eb2c995","line":582,"range":{"start_line":581,"start_character":22,"end_line":582,"end_character":52},"in_reply_to":"bff0334d_ee972590","updated":"2017-04-06 20:22:56.000000000","message":"will fix it.","commit_id":"7ab1bf755629495db827a21fc87f45d26a2eeed2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d8c4505e1bb4b3f45e8d7b410a79124b8d9985ce","unresolved":false,"context_lines":[{"line_number":599,"context_line":"        self._process_interfaces(routers_dict, interfaces)"},{"line_number":600,"context_line":"        return list(routers_dict.values())"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"    def _check_if_unbound_ports_exist(self, port):"},{"line_number":603,"context_line":"        return (port[\u0027device_owner\u0027] in ("},{"line_number":604,"context_line":"            const.DEVICE_OWNER_LOADBALANCER,"},{"line_number":605,"context_line":"            const.DEVICE_OWNER_LOADBALANCERV2,"}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_a804747c","line":602,"range":{"start_line":602,"start_character":8,"end_line":602,"end_character":37},"updated":"2017-04-06 11:51:16.000000000","message":"_is_unbound?","commit_id":"7ab1bf755629495db827a21fc87f45d26a2eeed2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d8c4505e1bb4b3f45e8d7b410a79124b8d9985ce","unresolved":false,"context_lines":[{"line_number":940,"context_line":"            if not host:"},{"line_number":941,"context_line":"                unbound_port \u003d self._core_plugin.get_port("},{"line_number":942,"context_line":"                    context.elevated(), fixed_port_id)"},{"line_number":943,"context_line":"                if (unbound_port[\u0027device_owner\u0027] in ("},{"line_number":944,"context_line":"                    const.DEVICE_OWNER_LOADBALANCER or"},{"line_number":945,"context_line":"                    const.DEVICE_OWNER_LOADBALANCERV2 or \u0027\u0027)):"},{"line_number":946,"context_line":"                    rtr_gateway_port \u003d self._core_plugin.get_port("},{"line_number":947,"context_line":"                        context, router.get(\u0027gw_port_id\u0027))"},{"line_number":948,"context_line":"                    rtr_gateway_host \u003d rtr_gateway_port.get("}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_eedcc575","line":945,"range":{"start_line":943,"start_character":16,"end_line":945,"end_character":62},"updated":"2017-04-06 11:51:16.000000000","message":"please use new method (_check_if_unbound_ports_exist)","commit_id":"7ab1bf755629495db827a21fc87f45d26a2eeed2"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c1c41a25303ba35670a1c1daeb0c1818be1550b0","unresolved":false,"context_lines":[{"line_number":940,"context_line":"            if not host:"},{"line_number":941,"context_line":"                unbound_port \u003d self._core_plugin.get_port("},{"line_number":942,"context_line":"                    context.elevated(), fixed_port_id)"},{"line_number":943,"context_line":"                if (unbound_port[\u0027device_owner\u0027] in ("},{"line_number":944,"context_line":"                    const.DEVICE_OWNER_LOADBALANCER or"},{"line_number":945,"context_line":"                    const.DEVICE_OWNER_LOADBALANCERV2 or \u0027\u0027)):"},{"line_number":946,"context_line":"                    rtr_gateway_port \u003d self._core_plugin.get_port("},{"line_number":947,"context_line":"                        context, router.get(\u0027gw_port_id\u0027))"},{"line_number":948,"context_line":"                    rtr_gateway_host \u003d rtr_gateway_port.get("}],"source_content_type":"text/x-python","patch_set":6,"id":"bff0334d_dea63d54","line":945,"range":{"start_line":943,"start_character":16,"end_line":945,"end_character":62},"in_reply_to":"bff0334d_eedcc575","updated":"2017-04-06 20:22:56.000000000","message":"Yes will fix it.","commit_id":"7ab1bf755629495db827a21fc87f45d26a2eeed2"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9b8645f1721b56bfe736dc974917d7c87aa14454","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                    # and if the host does not match and the agent requesting"},{"line_number":510,"context_line":"                    # is not dvr_snat agent, and the fip has not already been"},{"line_number":511,"context_line":"                    # assigned \u0027dvr_snat_bound\u0027 state."},{"line_number":512,"context_line":"                    if (fip_host and host_mismatch and"},{"line_number":513,"context_line":"                        agent_mode in [const.L3_LEGACY,"},{"line_number":514,"context_line":"                                       const.L3_AGENT_MODE_DVR] and"},{"line_number":515,"context_line":"                        not floating_ip.get(l3_const.DVR_SNAT_BOUND)):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5ff73747_decacf4d","line":512,"range":{"start_line":512,"start_character":24,"end_line":512,"end_character":32},"updated":"2017-05-03 18:58:48.000000000","message":"is this check necessary?  If \u0027host\u0027 is always something, then even if \u0027fip_host\u0027 is None host_mismatch will be set correctly, right?","commit_id":"bc83069c0a4e4fbb0743ca3e139dc6b8cb00f212"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"709aec071d0e4eb2827e61a69e075ca2e9504847","unresolved":false,"context_lines":[{"line_number":501,"context_line":"            if router:"},{"line_number":502,"context_line":"                router_floatingips \u003d router.get(const.FLOATINGIP_KEY, [])"},{"line_number":503,"context_line":"                if router[\u0027distributed\u0027]:"},{"line_number":504,"context_line":"                    fip_host \u003d floating_ip.get(\u0027host\u0027)"},{"line_number":505,"context_line":"                    host_mismatch \u003d ("},{"line_number":506,"context_line":"                        fip_host !\u003d host and"},{"line_number":507,"context_line":"                        floating_ip.get(\u0027dest_host\u0027) is None)"},{"line_number":508,"context_line":"                    # Skip floatingip if the fip port have a host defined"},{"line_number":509,"context_line":"                    # and if the host does not match and the agent requesting"},{"line_number":510,"context_line":"                    # is not dvr_snat agent, and the fip has not already been"},{"line_number":511,"context_line":"                    # assigned \u0027dvr_snat_bound\u0027 state."},{"line_number":512,"context_line":"                    if (fip_host and host_mismatch and"},{"line_number":513,"context_line":"                        agent_mode in [const.L3_LEGACY,"},{"line_number":514,"context_line":"                                       const.L3_AGENT_MODE_DVR] and"},{"line_number":515,"context_line":"                        not floating_ip.get(l3_const.DVR_SNAT_BOUND)):"},{"line_number":516,"context_line":"                        continue"},{"line_number":517,"context_line":"                    LOG.debug(\"Floating IP host: %s\", fip_host)"},{"line_number":518,"context_line":"                router_floatingips.append(floating_ip)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_aa2e7e40","line":515,"range":{"start_line":504,"start_character":20,"end_line":515,"end_character":70},"updated":"2017-04-07 09:26:39.000000000","message":"Still confused with this block. I think handling two cases separately would be more clear and readable:\n-skip if fip has host/dest_host defined and this host/dest_host doesn\u0027t match with agent host (no matter which type of agent).\n-skip if fip doesn\u0027t have host/dest_host defined and DVR_SNAT_BOUND is set to False.\n\nDoes it make sense?","commit_id":"bc83069c0a4e4fbb0743ca3e139dc6b8cb00f212"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"412aa793913528f8adeae3f785f8c1bf74b5eacd","unresolved":false,"context_lines":[{"line_number":501,"context_line":"            if router:"},{"line_number":502,"context_line":"                router_floatingips \u003d router.get(const.FLOATINGIP_KEY, [])"},{"line_number":503,"context_line":"                if router[\u0027distributed\u0027]:"},{"line_number":504,"context_line":"                    fip_host \u003d floating_ip.get(\u0027host\u0027)"},{"line_number":505,"context_line":"                    host_mismatch \u003d ("},{"line_number":506,"context_line":"                        fip_host !\u003d host and"},{"line_number":507,"context_line":"                        floating_ip.get(\u0027dest_host\u0027) is None)"},{"line_number":508,"context_line":"                    # Skip floatingip if the fip port have a host defined"},{"line_number":509,"context_line":"                    # and if the host does not match and the agent requesting"},{"line_number":510,"context_line":"                    # is not dvr_snat agent, and the fip has not already been"},{"line_number":511,"context_line":"                    # assigned \u0027dvr_snat_bound\u0027 state."},{"line_number":512,"context_line":"                    if (fip_host and host_mismatch and"},{"line_number":513,"context_line":"                        agent_mode in [const.L3_LEGACY,"},{"line_number":514,"context_line":"                                       const.L3_AGENT_MODE_DVR] and"},{"line_number":515,"context_line":"                        not floating_ip.get(l3_const.DVR_SNAT_BOUND)):"},{"line_number":516,"context_line":"                        continue"},{"line_number":517,"context_line":"                    LOG.debug(\"Floating IP host: %s\", fip_host)"},{"line_number":518,"context_line":"                router_floatingips.append(floating_ip)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_e5038572","line":515,"range":{"start_line":504,"start_character":20,"end_line":515,"end_character":70},"in_reply_to":"bff0334d_aa2e7e40","updated":"2017-04-07 17:03:06.000000000","message":"Let me re-format it.","commit_id":"bc83069c0a4e4fbb0743ca3e139dc6b8cb00f212"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"709aec071d0e4eb2827e61a69e075ca2e9504847","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                    # Handle the case were there is no host binding"},{"line_number":577,"context_line":"                    # for the private ports that are associated with"},{"line_number":578,"context_line":"                    # floating ip."},{"line_number":579,"context_line":"                    if (not fip[\u0027host\u0027]):"},{"line_number":580,"context_line":"                        fip[l3_const.DVR_SNAT_BOUND] \u003d True"},{"line_number":581,"context_line":"        routers_dict \u003d self._process_routers(context, routers)"},{"line_number":582,"context_line":"        self._process_floating_ips_dvr(context, routers_dict,"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_0a09ea2f","line":579,"range":{"start_line":579,"start_character":24,"end_line":579,"end_character":39},"updated":"2017-04-07 09:26:39.000000000","message":"should we check for dest_host as well?","commit_id":"bc83069c0a4e4fbb0743ca3e139dc6b8cb00f212"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"412aa793913528f8adeae3f785f8c1bf74b5eacd","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                    # Handle the case were there is no host binding"},{"line_number":577,"context_line":"                    # for the private ports that are associated with"},{"line_number":578,"context_line":"                    # floating ip."},{"line_number":579,"context_line":"                    if (not fip[\u0027host\u0027]):"},{"line_number":580,"context_line":"                        fip[l3_const.DVR_SNAT_BOUND] \u003d True"},{"line_number":581,"context_line":"        routers_dict \u003d self._process_routers(context, routers)"},{"line_number":582,"context_line":"        self._process_floating_ips_dvr(context, routers_dict,"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_a5233d05","line":579,"range":{"start_line":579,"start_character":24,"end_line":579,"end_character":39},"in_reply_to":"bff0334d_0a09ea2f","updated":"2017-04-07 17:03:06.000000000","message":"I think checking for fip[\u0027host\u0027] is enough, because even in the case of existence of fip[\u0027dest-host\u0027], fip[\u0027host\u0027] should be available.","commit_id":"bc83069c0a4e4fbb0743ca3e139dc6b8cb00f212"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"709aec071d0e4eb2827e61a69e075ca2e9504847","unresolved":false,"context_lines":[{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def _is_unbound_port(self, port):"},{"line_number":598,"context_line":"        \"\"\"Check if unbound ports for the specific device_owners exist.\"\"\""},{"line_number":599,"context_line":"        # Check if device owner is empty or if loadbalancer"},{"line_number":600,"context_line":"        # or if loadbalancerv2 without any host binding."},{"line_number":601,"context_line":"        return (port[\u0027device_owner\u0027] in ("},{"line_number":602,"context_line":"            const.DEVICE_OWNER_LOADBALANCER,"},{"line_number":603,"context_line":"            const.DEVICE_OWNER_LOADBALANCERV2,"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_2513bf5e","line":600,"range":{"start_line":599,"start_character":8,"end_line":600,"end_character":56},"updated":"2017-04-07 09:26:39.000000000","message":"nit: the code is pretty self documented","commit_id":"bc83069c0a4e4fbb0743ca3e139dc6b8cb00f212"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"412aa793913528f8adeae3f785f8c1bf74b5eacd","unresolved":false,"context_lines":[{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def _is_unbound_port(self, port):"},{"line_number":598,"context_line":"        \"\"\"Check if unbound ports for the specific device_owners exist.\"\"\""},{"line_number":599,"context_line":"        # Check if device owner is empty or if loadbalancer"},{"line_number":600,"context_line":"        # or if loadbalancerv2 without any host binding."},{"line_number":601,"context_line":"        return (port[\u0027device_owner\u0027] in ("},{"line_number":602,"context_line":"            const.DEVICE_OWNER_LOADBALANCER,"},{"line_number":603,"context_line":"            const.DEVICE_OWNER_LOADBALANCERV2,"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_852279ff","line":600,"range":{"start_line":599,"start_character":8,"end_line":600,"end_character":56},"in_reply_to":"bff0334d_2513bf5e","updated":"2017-04-07 17:03:06.000000000","message":"will remove it.","commit_id":"bc83069c0a4e4fbb0743ca3e139dc6b8cb00f212"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7f07ae675a56823c04aaf3edadc2bfb4f35279dd","unresolved":false,"context_lines":[{"line_number":935,"context_line":"            if host is not None:"},{"line_number":936,"context_line":"                self.l3_rpc_notifier.routers_updated_on_host("},{"line_number":937,"context_line":"                    context, [router_id], host)"},{"line_number":938,"context_line":"            if not host:"},{"line_number":939,"context_line":"                unbound_port \u003d self._core_plugin.get_port("},{"line_number":940,"context_line":"                    context.elevated(), fixed_port_id)"},{"line_number":941,"context_line":"                if self._is_unbound_port(unbound_port):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_ed171545","line":938,"updated":"2017-04-06 21:27:58.000000000","message":"Can this just be \u0027else:\u0027 ?  It just looks confusing.","commit_id":"bc83069c0a4e4fbb0743ca3e139dc6b8cb00f212"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"2ea5f2fab67087d184435e3df73159d589a323e7","unresolved":false,"context_lines":[{"line_number":935,"context_line":"            if host is not None:"},{"line_number":936,"context_line":"                self.l3_rpc_notifier.routers_updated_on_host("},{"line_number":937,"context_line":"                    context, [router_id], host)"},{"line_number":938,"context_line":"            if not host:"},{"line_number":939,"context_line":"                unbound_port \u003d self._core_plugin.get_port("},{"line_number":940,"context_line":"                    context.elevated(), fixed_port_id)"},{"line_number":941,"context_line":"                if self._is_unbound_port(unbound_port):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_55f9e3c5","line":938,"in_reply_to":"bff0334d_ed171545","updated":"2017-04-06 23:08:29.000000000","message":"I tried with else but I got some errors. I need to retest it and see what was the issue.","commit_id":"bc83069c0a4e4fbb0743ca3e139dc6b8cb00f212"}],"neutron/db/l3_dvrscheduler_db.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7f07ae675a56823c04aaf3edadc2bfb4f35279dd","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"def _dvr_handle_unbound_allowed_addr_pair_del("},{"line_number":357,"context_line":"        plugin, context, port, allowed_address_pair):"},{"line_number":358,"context_line":"    updated_port \u003d plugin.remove_unbound_allowed_address_pair_port_binding("},{"line_number":359,"context_line":"        context, port, allowed_address_pair)"},{"line_number":360,"context_line":"    if updated_port:"},{"line_number":361,"context_line":"        LOG.debug(\"Allowed address pair port binding removed \""}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_6d5ae52a","side":"PARENT","line":358,"range":{"start_line":358,"start_character":4,"end_line":358,"end_character":16},"updated":"2017-04-06 21:27:58.000000000","message":"nit: removed_port","commit_id":"e67ed785b7425c564e2d3cd49cf83f86f5b01fe9"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9b8645f1721b56bfe736dc974917d7c87aa14454","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"def _dvr_handle_unbound_allowed_addr_pair_del("},{"line_number":357,"context_line":"        plugin, context, port, allowed_address_pair):"},{"line_number":358,"context_line":"    updated_port \u003d plugin.remove_unbound_allowed_address_pair_port_binding("},{"line_number":359,"context_line":"        context, port, allowed_address_pair)"},{"line_number":360,"context_line":"    if updated_port:"},{"line_number":361,"context_line":"        LOG.debug(\"Allowed address pair port binding removed \""}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_5390db4e","side":"PARENT","line":358,"range":{"start_line":358,"start_character":4,"end_line":358,"end_character":16},"in_reply_to":"bff0334d_55e7a313","updated":"2017-05-03 18:58:48.000000000","message":"that\u0027s what i get for not paying attention :)","commit_id":"e67ed785b7425c564e2d3cd49cf83f86f5b01fe9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"2ea5f2fab67087d184435e3df73159d589a323e7","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"def _dvr_handle_unbound_allowed_addr_pair_del("},{"line_number":357,"context_line":"        plugin, context, port, allowed_address_pair):"},{"line_number":358,"context_line":"    updated_port \u003d plugin.remove_unbound_allowed_address_pair_port_binding("},{"line_number":359,"context_line":"        context, port, allowed_address_pair)"},{"line_number":360,"context_line":"    if updated_port:"},{"line_number":361,"context_line":"        LOG.debug(\"Allowed address pair port binding removed \""}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_55e7a313","side":"PARENT","line":358,"range":{"start_line":358,"start_character":4,"end_line":358,"end_character":16},"in_reply_to":"bff0334d_6d5ae52a","updated":"2017-04-06 23:08:29.000000000","message":"Do we need this for this patch. Since it is going to be removed.","commit_id":"e67ed785b7425c564e2d3cd49cf83f86f5b01fe9"}]}
