)]}'
{"neutron/common/utils.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7c8dfbef55096449adee3117553fda5e28a2266","unresolved":false,"context_lines":[{"line_number":326,"context_line":"    Later if other device owners are used for allowed_address_pairs those"},{"line_number":327,"context_line":"    device_owners should be added to the list below."},{"line_number":328,"context_line":"    \"\"\""},{"line_number":329,"context_line":"    return [n_const.DEVICE_OWNER_LOADBALANCER,"},{"line_number":330,"context_line":"            n_const.DEVICE_OWNER_LOADBALANCERV2]"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_661b13cb","line":329,"range":{"start_line":329,"start_character":11,"end_line":329,"end_character":12},"updated":"2016-05-20 16:19:57.000000000","message":"We really should use tuples here instead of lists.  Lists are mutable.  Also, why aren\u0027t these just constants instead of methods?","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0d5b5209c6e553ffe2297193066d9be662950ff3","unresolved":false,"context_lines":[{"line_number":326,"context_line":"    Later if other device owners are used for allowed_address_pairs those"},{"line_number":327,"context_line":"    device_owners should be added to the list below."},{"line_number":328,"context_line":"    \"\"\""},{"line_number":329,"context_line":"    return [n_const.DEVICE_OWNER_LOADBALANCER,"},{"line_number":330,"context_line":"            n_const.DEVICE_OWNER_LOADBALANCERV2]"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_60d7d6bf","line":329,"range":{"start_line":329,"start_character":11,"end_line":329,"end_character":12},"in_reply_to":"9abb7d3a_246c6ccf","updated":"2016-06-06 18:11:50.000000000","message":"I have added a TODO, and once this patch merges, I will clean up the functions here and add the constants to the neutron-lib.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5f5479d6f8d1a84630395d741a9208a1cac76a93","unresolved":false,"context_lines":[{"line_number":326,"context_line":"    Later if other device owners are used for allowed_address_pairs those"},{"line_number":327,"context_line":"    device_owners should be added to the list below."},{"line_number":328,"context_line":"    \"\"\""},{"line_number":329,"context_line":"    return [n_const.DEVICE_OWNER_LOADBALANCER,"},{"line_number":330,"context_line":"            n_const.DEVICE_OWNER_LOADBALANCERV2]"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_246c6ccf","line":329,"range":{"start_line":329,"start_character":11,"end_line":329,"end_character":12},"in_reply_to":"bab6814e_2215da48","updated":"2016-05-31 17:43:30.000000000","message":"Thanks for the information.\nJust followed the previous function in this file to add a function to return the constants.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"a10dac05e4e50c743d39f82db2d0108848490b94","unresolved":false,"context_lines":[{"line_number":326,"context_line":"    Later if other device owners are used for allowed_address_pairs those"},{"line_number":327,"context_line":"    device_owners should be added to the list below."},{"line_number":328,"context_line":"    \"\"\""},{"line_number":329,"context_line":"    return [n_const.DEVICE_OWNER_LOADBALANCER,"},{"line_number":330,"context_line":"            n_const.DEVICE_OWNER_LOADBALANCERV2]"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_c862373d","line":329,"range":{"start_line":329,"start_character":11,"end_line":329,"end_character":12},"in_reply_to":"bab6814e_661b13cb","updated":"2016-05-24 20:04:03.000000000","message":"What did you mean by \u0027why aren\u0027t these just constants instead of methods?\u0027.\nI don\u0027t get it?\nThey are still constants, but I need to use these two constants in the \u0027l3_dvr_db\u0027. Since I was asked not to use these common constants in the l3_dvr_db I have to move it to the utils to return the right lbaas constants.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"968ab9170615217fe77c7559f27adfd83ed431d6","unresolved":false,"context_lines":[{"line_number":326,"context_line":"    Later if other device owners are used for allowed_address_pairs those"},{"line_number":327,"context_line":"    device_owners should be added to the list below."},{"line_number":328,"context_line":"    \"\"\""},{"line_number":329,"context_line":"    return [n_const.DEVICE_OWNER_LOADBALANCER,"},{"line_number":330,"context_line":"            n_const.DEVICE_OWNER_LOADBALANCERV2]"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_2215da48","line":329,"range":{"start_line":329,"start_character":11,"end_line":329,"end_character":12},"in_reply_to":"bab6814e_c862373d","updated":"2016-05-24 23:36:32.000000000","message":"I meant that the collection of these two constants is itself a constant.  I\u0027m not certain why you need a method to return the collection when the collection is just a constant.  I was saying anything about the individual DEVICE_OWNER_ constants.\n\nAlso, it is preferable to make a constant collection using a tuple because a tuple is a constant immutable container.\n\nThe pattern has already been set in the constants file [1].\n\n [1] https://github.com/openstack/neutron-lib/blob/45aea71d7d8/neutron_lib/constants.py#L69-L75","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"}],"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"12e47c31471914e15da5aaaab7f3282d2c092187","unresolved":false,"context_lines":[{"line_number":249,"context_line":"                    # port if necessary (Even if we don\u0027t create it here it"},{"line_number":250,"context_line":"                    # will be requested and created by the agent)."},{"line_number":251,"context_line":"                    allowed_address_port \u003d self._core_plugin.get_port("},{"line_number":252,"context_line":"                        admin_ctx, fip_port)"},{"line_number":253,"context_line":"                    svc_port_list \u003d self._get_ports_allowed_address_pair_ip("},{"line_number":254,"context_line":"                        admin_ctx, floatingip_db[\u0027fixed_ip_address\u0027])"},{"line_number":255,"context_line":"                    if not svc_port_list:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_92e16801","line":252,"updated":"2016-04-13 18:09:07.000000000","message":"allowed_address_port isn\u0027t used until L277, seems we can delay this get_port() call until we know we\u0027re going to need it.","commit_id":"468e028d219b19b9bdce1c15bbdae81ee4c47d71"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9d0688b66a0a048ca152c1c7588c5e2d75fe91b1","unresolved":false,"context_lines":[{"line_number":249,"context_line":"                    # port if necessary (Even if we don\u0027t create it here it"},{"line_number":250,"context_line":"                    # will be requested and created by the agent)."},{"line_number":251,"context_line":"                    allowed_address_port \u003d self._core_plugin.get_port("},{"line_number":252,"context_line":"                        admin_ctx, fip_port)"},{"line_number":253,"context_line":"                    svc_port_list \u003d self._get_ports_allowed_address_pair_ip("},{"line_number":254,"context_line":"                        admin_ctx, floatingip_db[\u0027fixed_ip_address\u0027])"},{"line_number":255,"context_line":"                    if not svc_port_list:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_a63d0b91","line":252,"in_reply_to":"5a18252c_92e16801","updated":"2016-04-14 15:44:14.000000000","message":"will fix it.","commit_id":"468e028d219b19b9bdce1c15bbdae81ee4c47d71"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"12e47c31471914e15da5aaaab7f3282d2c092187","unresolved":false,"context_lines":[{"line_number":262,"context_line":"                            continue"},{"line_number":263,"context_line":"                        valid_svc_port.append(port)"},{"line_number":264,"context_line":"                    if len(valid_svc_port) \u003e 1:"},{"line_number":265,"context_line":"                        LOG.warning(_LW(\"Multiple Active ports associated \""},{"line_number":266,"context_line":"                                        \"with the allowed_address_pairs.\""},{"line_number":267,"context_line":"                                        \"So we will not be inheriting the \""},{"line_number":268,"context_line":"                                        \"binding and device_owner.\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_52beb0d4","line":265,"updated":"2016-04-13 18:09:07.000000000","message":"nit: s/Active/active","commit_id":"468e028d219b19b9bdce1c15bbdae81ee4c47d71"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9d0688b66a0a048ca152c1c7588c5e2d75fe91b1","unresolved":false,"context_lines":[{"line_number":262,"context_line":"                            continue"},{"line_number":263,"context_line":"                        valid_svc_port.append(port)"},{"line_number":264,"context_line":"                    if len(valid_svc_port) \u003e 1:"},{"line_number":265,"context_line":"                        LOG.warning(_LW(\"Multiple Active ports associated \""},{"line_number":266,"context_line":"                                        \"with the allowed_address_pairs.\""},{"line_number":267,"context_line":"                                        \"So we will not be inheriting the \""},{"line_number":268,"context_line":"                                        \"binding and device_owner.\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_46c6b79a","line":265,"in_reply_to":"5a18252c_52beb0d4","updated":"2016-04-14 15:44:14.000000000","message":"will fix it.","commit_id":"468e028d219b19b9bdce1c15bbdae81ee4c47d71"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"12e47c31471914e15da5aaaab7f3282d2c092187","unresolved":false,"context_lines":[{"line_number":263,"context_line":"                        valid_svc_port.append(port)"},{"line_number":264,"context_line":"                    if len(valid_svc_port) \u003e 1:"},{"line_number":265,"context_line":"                        LOG.warning(_LW(\"Multiple Active ports associated \""},{"line_number":266,"context_line":"                                        \"with the allowed_address_pairs.\""},{"line_number":267,"context_line":"                                        \"So we will not be inheriting the \""},{"line_number":268,"context_line":"                                        \"binding and device_owner.\"))"},{"line_number":269,"context_line":"                    if valid_svc_port[0]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_7b22b301","line":266,"updated":"2016-04-13 18:09:07.000000000","message":"nit: missing trailing space","commit_id":"468e028d219b19b9bdce1c15bbdae81ee4c47d71"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9d0688b66a0a048ca152c1c7588c5e2d75fe91b1","unresolved":false,"context_lines":[{"line_number":263,"context_line":"                        valid_svc_port.append(port)"},{"line_number":264,"context_line":"                    if len(valid_svc_port) \u003e 1:"},{"line_number":265,"context_line":"                        LOG.warning(_LW(\"Multiple Active ports associated \""},{"line_number":266,"context_line":"                                        \"with the allowed_address_pairs.\""},{"line_number":267,"context_line":"                                        \"So we will not be inheriting the \""},{"line_number":268,"context_line":"                                        \"binding and device_owner.\"))"},{"line_number":269,"context_line":"                    if valid_svc_port[0]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_e6cc23bd","line":266,"in_reply_to":"5a18252c_7b22b301","updated":"2016-04-14 15:44:14.000000000","message":"will fix it.","commit_id":"468e028d219b19b9bdce1c15bbdae81ee4c47d71"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"12e47c31471914e15da5aaaab7f3282d2c092187","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                        LOG.warning(_LW(\"Multiple Active ports associated \""},{"line_number":266,"context_line":"                                        \"with the allowed_address_pairs.\""},{"line_number":267,"context_line":"                                        \"So we will not be inheriting the \""},{"line_number":268,"context_line":"                                        \"binding and device_owner.\"))"},{"line_number":269,"context_line":"                    if valid_svc_port[0]:"},{"line_number":270,"context_line":"                        address_pair \u003d valid_svc_port[0].get("},{"line_number":271,"context_line":"                            \u0027allowed_address_pairs\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_524eb096","line":268,"updated":"2016-04-13 18:09:07.000000000","message":"Just on the second (and third...) ports, as below we\u0027re updating.  Why don\u0027t we want to update all the ports?","commit_id":"468e028d219b19b9bdce1c15bbdae81ee4c47d71"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9d0688b66a0a048ca152c1c7588c5e2d75fe91b1","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                        LOG.warning(_LW(\"Multiple Active ports associated \""},{"line_number":266,"context_line":"                                        \"with the allowed_address_pairs.\""},{"line_number":267,"context_line":"                                        \"So we will not be inheriting the \""},{"line_number":268,"context_line":"                                        \"binding and device_owner.\"))"},{"line_number":269,"context_line":"                    if valid_svc_port[0]:"},{"line_number":270,"context_line":"                        address_pair \u003d valid_svc_port[0].get("},{"line_number":271,"context_line":"                            \u0027allowed_address_pairs\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_8660cfd0","line":268,"in_reply_to":"5a18252c_524eb096","updated":"2016-04-14 15:44:14.000000000","message":"We don\u0027t need to update all the ports, right now the only one of the VM port that has the allowed_address_pair port will be active and so we will only update that port.\nWhen other port becomes active, we can update it at that time, and it will be triggered by a port-update event when the state of the port changes.","commit_id":"468e028d219b19b9bdce1c15bbdae81ee4c47d71"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"12e47c31471914e15da5aaaab7f3282d2c092187","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                                        \"with the allowed_address_pairs.\""},{"line_number":267,"context_line":"                                        \"So we will not be inheriting the \""},{"line_number":268,"context_line":"                                        \"binding and device_owner.\"))"},{"line_number":269,"context_line":"                    if valid_svc_port[0]:"},{"line_number":270,"context_line":"                        address_pair \u003d valid_svc_port[0].get("},{"line_number":271,"context_line":"                            \u0027allowed_address_pairs\u0027)"},{"line_number":272,"context_line":"                        updated_port \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_d2c64048","line":269,"updated":"2016-04-13 18:09:07.000000000","message":"We use this value a lot, should probably assign to a local variable, perhaps changing L257 to be \"valid_svc_ports\" then just assign valid_svc_port to be the first.","commit_id":"468e028d219b19b9bdce1c15bbdae81ee4c47d71"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"12e47c31471914e15da5aaaab7f3282d2c092187","unresolved":false,"context_lines":[{"line_number":962,"context_line":"        port_addr_pair_ip \u003d port_address_pairs[\u0027ip_address\u0027]"},{"line_number":963,"context_line":"        if not address_pair_port:"},{"line_number":964,"context_line":"            address_pair_port \u003d self._get_address_pair_active_port_with_fip("},{"line_number":965,"context_line":"                context, service_port_dict, port_addr_pair_ip)"},{"line_number":966,"context_line":"        else:"},{"line_number":967,"context_line":"            host \u003d service_port_dict[portbindings.HOST_ID]"},{"line_number":968,"context_line":"            dev_owner \u003d service_port_dict[\u0027device_owner\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_52f23070","line":965,"updated":"2016-04-13 18:09:07.000000000","message":"This doesn\u0027t look right, you\u0027re assigning address_pair_port but never using it.  Seems the original \u0027if\u0027 was removed by accident?","commit_id":"468e028d219b19b9bdce1c15bbdae81ee4c47d71"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9d0688b66a0a048ca152c1c7588c5e2d75fe91b1","unresolved":false,"context_lines":[{"line_number":962,"context_line":"        port_addr_pair_ip \u003d port_address_pairs[\u0027ip_address\u0027]"},{"line_number":963,"context_line":"        if not address_pair_port:"},{"line_number":964,"context_line":"            address_pair_port \u003d self._get_address_pair_active_port_with_fip("},{"line_number":965,"context_line":"                context, service_port_dict, port_addr_pair_ip)"},{"line_number":966,"context_line":"        else:"},{"line_number":967,"context_line":"            host \u003d service_port_dict[portbindings.HOST_ID]"},{"line_number":968,"context_line":"            dev_owner \u003d service_port_dict[\u0027device_owner\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_e6438311","line":965,"in_reply_to":"5a18252c_52f23070","updated":"2016-04-14 15:44:14.000000000","message":"I think I have fixed in patch 3.","commit_id":"468e028d219b19b9bdce1c15bbdae81ee4c47d71"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"12e47c31471914e15da5aaaab7f3282d2c092187","unresolved":false,"context_lines":[{"line_number":993,"context_line":"        port_addr_pair_ip \u003d port_address_pairs[\u0027ip_address\u0027]"},{"line_number":994,"context_line":"        if not address_pair_port:"},{"line_number":995,"context_line":"            address_pair_port \u003d self._get_address_pair_active_port_with_fip("},{"line_number":996,"context_line":"                context, service_port_dict, port_addr_pair_ip)"},{"line_number":997,"context_line":"        else:"},{"line_number":998,"context_line":"            # Before reverting the changes, fetch the original"},{"line_number":999,"context_line":"            # device owner saved in profile and update the port"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_d2fe4037","line":996,"updated":"2016-04-13 18:09:07.000000000","message":"Same as above.","commit_id":"468e028d219b19b9bdce1c15bbdae81ee4c47d71"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9d0688b66a0a048ca152c1c7588c5e2d75fe91b1","unresolved":false,"context_lines":[{"line_number":993,"context_line":"        port_addr_pair_ip \u003d port_address_pairs[\u0027ip_address\u0027]"},{"line_number":994,"context_line":"        if not address_pair_port:"},{"line_number":995,"context_line":"            address_pair_port \u003d self._get_address_pair_active_port_with_fip("},{"line_number":996,"context_line":"                context, service_port_dict, port_addr_pair_ip)"},{"line_number":997,"context_line":"        else:"},{"line_number":998,"context_line":"            # Before reverting the changes, fetch the original"},{"line_number":999,"context_line":"            # device owner saved in profile and update the port"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_8653afe1","line":996,"in_reply_to":"5a18252c_d2fe4037","updated":"2016-04-14 15:44:14.000000000","message":"Yes I did fix it in patch3.","commit_id":"468e028d219b19b9bdce1c15bbdae81ee4c47d71"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"5addfe6e69933cda1b39092390ad9f469bf120f1","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                        admin_ctx, fip_port)"},{"line_number":252,"context_line":"                    allowed_device_owners \u003d ("},{"line_number":253,"context_line":"                        n_utils.get_dvr_allowed_address_pair_device_owners())"},{"line_number":254,"context_line":"                    # NOTE: We just need to deal with ports that does not"},{"line_number":255,"context_line":"                    # have a device_owner and ports that are owned by the"},{"line_number":256,"context_line":"                    # LBaaS. Ports that are already owned by compute will"},{"line_number":257,"context_line":"                    # have a host binding so no action required."}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_e4d48820","line":254,"updated":"2016-05-03 16:05:16.000000000","message":"s/does/do","commit_id":"20b1774856d36da9b73fc5926faa3113233b9add"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"5addfe6e69933cda1b39092390ad9f469bf120f1","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                        n_utils.get_dvr_allowed_address_pair_device_owners())"},{"line_number":254,"context_line":"                    # NOTE: We just need to deal with ports that does not"},{"line_number":255,"context_line":"                    # have a device_owner and ports that are owned by the"},{"line_number":256,"context_line":"                    # LBaaS. Ports that are already owned by compute will"},{"line_number":257,"context_line":"                    # have a host binding so no action required."},{"line_number":258,"context_line":"                    if (port[\u0027device_owner\u0027] \u003d\u003d \"\" or"},{"line_number":259,"context_line":"                        port[\u0027device_owner\u0027] in allowed_device_owners):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_04b9c4ec","line":256,"updated":"2016-05-03 16:05:16.000000000","message":"LBaaS should be removed and replaced with some generic \"address pair device owners\" comment.","commit_id":"20b1774856d36da9b73fc5926faa3113233b9add"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"5addfe6e69933cda1b39092390ad9f469bf120f1","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            LOG.warning(_LW(\"Multiple active ports associated \""},{"line_number":282,"context_line":"                            \"with the allowed_address_pairs.\"))"},{"line_number":283,"context_line":"        else:"},{"line_number":284,"context_line":"            valid_svc_port \u003d valid_svc_ports[0]"},{"line_number":285,"context_line":"            if valid_svc_port:"},{"line_number":286,"context_line":"                address_pair_list \u003d valid_svc_port.get("},{"line_number":287,"context_line":"                    \u0027allowed_address_pairs\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_2ff5b9ec","line":284,"updated":"2016-05-03 16:05:16.000000000","message":"This could throw an IndexError if somehow valid_svc_ports is still empty.\n\nShould add a check after L279 like:\n\nif not valid_svc_ports:\n    LOG.debug ?\n    return","commit_id":"20b1774856d36da9b73fc5926faa3113233b9add"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7c8dfbef55096449adee3117553fda5e28a2266","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def _get_ports_for_allowed_address_pair_ip(self, context, fixed_ip):"},{"line_number":209,"context_line":"        \"\"\"Returns all the allowed_address_pair ports for the fixed_ip.\"\"\""},{"line_number":210,"context_line":"        query \u003d context.session.query("},{"line_number":211,"context_line":"            addr_pair_db.AllowedAddressPair).filter_by("},{"line_number":212,"context_line":"                ip_address\u003dfixed_ip)"},{"line_number":213,"context_line":"        return query.all()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _update_fip_assoc(self, context, fip, floatingip_db, external_port):"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_19c3888a","line":212,"range":{"start_line":210,"start_character":8,"end_line":212,"end_character":36},"updated":"2016-05-20 16:19:57.000000000","message":"This can\u0027t be right.  Shouldn\u0027t you also be filtering on port id?  There could be a bunch of these with the same ip address for other ports.  Even owned by other tenants!","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"fd4b730e3e78dceaa8f0feb2137cc27fabb88e6d","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def _get_ports_for_allowed_address_pair_ip(self, context, fixed_ip):"},{"line_number":209,"context_line":"        \"\"\"Returns all the allowed_address_pair ports for the fixed_ip.\"\"\""},{"line_number":210,"context_line":"        query \u003d context.session.query("},{"line_number":211,"context_line":"            addr_pair_db.AllowedAddressPair).filter_by("},{"line_number":212,"context_line":"                ip_address\u003dfixed_ip)"},{"line_number":213,"context_line":"        return query.all()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _update_fip_assoc(self, context, fip, floatingip_db, external_port):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_d23cf994","line":212,"range":{"start_line":210,"start_character":8,"end_line":212,"end_character":36},"in_reply_to":"9abb7d3a_bfac9e8c","updated":"2016-06-01 20:19:00.000000000","message":"This might work. Let me give it a try.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ad63f28a1c954f16704d9e5fccef34cb90812133","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def _get_ports_for_allowed_address_pair_ip(self, context, fixed_ip):"},{"line_number":209,"context_line":"        \"\"\"Returns all the allowed_address_pair ports for the fixed_ip.\"\"\""},{"line_number":210,"context_line":"        query \u003d context.session.query("},{"line_number":211,"context_line":"            addr_pair_db.AllowedAddressPair).filter_by("},{"line_number":212,"context_line":"                ip_address\u003dfixed_ip)"},{"line_number":213,"context_line":"        return query.all()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _update_fip_assoc(self, context, fip, floatingip_db, external_port):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_e1bb76e3","line":212,"range":{"start_line":210,"start_character":8,"end_line":212,"end_character":36},"in_reply_to":"9abb7d3a_c985be07","updated":"2016-05-31 17:28:45.000000000","message":"Ignore my previous comment.\nYes I understand your point.\nI think the only way to address this issue is when we get the ports list back, (this might be the port-list of all tenants), we should probably check for the tenant_id, in #L 272 as one of the filter to just filter out the ports that belong to the given tenant.\n\nIs there any other option?","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0d5b5209c6e553ffe2297193066d9be662950ff3","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def _get_ports_for_allowed_address_pair_ip(self, context, fixed_ip):"},{"line_number":209,"context_line":"        \"\"\"Returns all the allowed_address_pair ports for the fixed_ip.\"\"\""},{"line_number":210,"context_line":"        query \u003d context.session.query("},{"line_number":211,"context_line":"            addr_pair_db.AllowedAddressPair).filter_by("},{"line_number":212,"context_line":"                ip_address\u003dfixed_ip)"},{"line_number":213,"context_line":"        return query.all()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _update_fip_assoc(self, context, fip, floatingip_db, external_port):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_40845ad3","line":212,"range":{"start_line":210,"start_character":8,"end_line":212,"end_character":36},"in_reply_to":"9abb7d3a_d23cf994","updated":"2016-06-06 18:11:50.000000000","message":"Done","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3143e017203f6d826826cd8bbc2f790d13c98a70","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def _get_ports_for_allowed_address_pair_ip(self, context, fixed_ip):"},{"line_number":209,"context_line":"        \"\"\"Returns all the allowed_address_pair ports for the fixed_ip.\"\"\""},{"line_number":210,"context_line":"        query \u003d context.session.query("},{"line_number":211,"context_line":"            addr_pair_db.AllowedAddressPair).filter_by("},{"line_number":212,"context_line":"                ip_address\u003dfixed_ip)"},{"line_number":213,"context_line":"        return query.all()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _update_fip_assoc(self, context, fip, floatingip_db, external_port):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_bfac9e8c","line":212,"range":{"start_line":210,"start_character":8,"end_line":212,"end_character":36},"in_reply_to":"9abb7d3a_e1bb76e3","updated":"2016-06-01 20:06:22.000000000","message":"I think I understand something about this that I didn\u0027t understand before, thanks to your explanation in the DVR meeting this morning.  I still don\u0027t think it is acceptable to match on ip_address only without being able to scope that ip_address to something that will guarantee that you are getting the right one.  Using tenant_id limits the possibility for getting the wrong one but does not eliminate it.  So, this could lead to some strange and hard to debug errors.\n\nYou\u0027ve got two ports, right?  1)  You have the DVR service port, which is linked to the allowed address pair.  2)  You have a fixed port that the floating ip is linked to with the same IP address (the allowed address pair port).  The network_id on these two ports should match, right?  IP addresses are unique in the context of a single network.  So, the network_id is the thing we can scope the IP address to to ensure we\u0027re getting the right one.\n\nYou\u0027ll have to do a few joins to follow the trail but I think it is guaranteed to find the right port.  Here is roughly the trail I\u0027d follow to find the service port.  It should be possible to do this in a single DB query.\n\n  1) Use the floatingip_db[\u0027fixed_port_id\u0027] to get the network_id of the allowed address pair port port as AllowedAddressPairPort.\n  2) Filter on AllowedAddressPair like above on fixed_ip\n  3) Join Port as DvrServicePort and filter on network_id to get the DVR service port.\n\nThe query would be a little tricky because you\u0027ll need to alias the port table, once for the allowed address pairs port (AllowedAddressPairPort) to get the network_id and another time for the DVR service port to join with the AllowedAddressPair table on ip address (DvrServicePort).  Sqlalchemy can alias these easily.\n\nDoes this work?","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"a10dac05e4e50c743d39f82db2d0108848490b94","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def _get_ports_for_allowed_address_pair_ip(self, context, fixed_ip):"},{"line_number":209,"context_line":"        \"\"\"Returns all the allowed_address_pair ports for the fixed_ip.\"\"\""},{"line_number":210,"context_line":"        query \u003d context.session.query("},{"line_number":211,"context_line":"            addr_pair_db.AllowedAddressPair).filter_by("},{"line_number":212,"context_line":"                ip_address\u003dfixed_ip)"},{"line_number":213,"context_line":"        return query.all()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _update_fip_assoc(self, context, fip, floatingip_db, external_port):"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_88a5cf48","line":212,"range":{"start_line":210,"start_character":8,"end_line":212,"end_character":36},"in_reply_to":"bab6814e_19c3888a","updated":"2016-05-24 20:04:03.000000000","message":"Yes I will be getting multiple ports. I can\u0027t filter by vm ports here since I don\u0027t get the port that is associated to the allowed_address_pair, I only receive the allowed_address_pair port in here.\nMay be I can add the tenant in here to filter also based on tenant, so that we will not get ports owned by other tenants.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c9fab56b474ca6bc3b855673592c6a2cd4096c16","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def _get_ports_for_allowed_address_pair_ip(self, context, fixed_ip):"},{"line_number":209,"context_line":"        \"\"\"Returns all the allowed_address_pair ports for the fixed_ip.\"\"\""},{"line_number":210,"context_line":"        query \u003d context.session.query("},{"line_number":211,"context_line":"            addr_pair_db.AllowedAddressPair).filter_by("},{"line_number":212,"context_line":"                ip_address\u003dfixed_ip)"},{"line_number":213,"context_line":"        return query.all()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _update_fip_assoc(self, context, fip, floatingip_db, external_port):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_c985be07","line":212,"range":{"start_line":210,"start_character":8,"end_line":212,"end_character":36},"in_reply_to":"bab6814e_5d355fd9","updated":"2016-05-31 16:06:03.000000000","message":"Hi Carl, I am not sure I understand your comment here.\nYes a single tenant could have multiple entires, do you mean multiple \u0027allowed_address_pair\u0027 with the same ip or you meant, the allowed_address_pair port can be associated with multiple ports.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"968ab9170615217fe77c7559f27adfd83ed431d6","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def _get_ports_for_allowed_address_pair_ip(self, context, fixed_ip):"},{"line_number":209,"context_line":"        \"\"\"Returns all the allowed_address_pair ports for the fixed_ip.\"\"\""},{"line_number":210,"context_line":"        query \u003d context.session.query("},{"line_number":211,"context_line":"            addr_pair_db.AllowedAddressPair).filter_by("},{"line_number":212,"context_line":"                ip_address\u003dfixed_ip)"},{"line_number":213,"context_line":"        return query.all()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _update_fip_assoc(self, context, fip, floatingip_db, external_port):"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_5d355fd9","line":212,"range":{"start_line":210,"start_character":8,"end_line":212,"end_character":36},"in_reply_to":"bab6814e_88a5cf48","updated":"2016-05-24 23:36:32.000000000","message":"A single tenant could have multiple entries here too.  Eventually, you\u0027re going to have to find the one record that matches the right port and ignore the rest.  How do you do that?  I don\u0027t think you can ever be sure that you got the right port.  And the answer below seems to be to give up and fail if there is any ambiguity.\n\nI also doubt that this query can benefit from the primary key index on the table because it is the third of three columns in the index.  I suspect that the DB might have to load the entire table to serve this query.\n\nBTW, this is the comment that led to my -1.  The other stuff is pretty trivial.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"968ab9170615217fe77c7559f27adfd83ed431d6","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                        port[\u0027device_owner\u0027] in allowed_device_owners):"},{"line_number":260,"context_line":"                        address_pair_db_port_list \u003d ("},{"line_number":261,"context_line":"                            self._get_ports_for_allowed_address_pair_ip("},{"line_number":262,"context_line":"                                admin_ctx, floatingip_db[\u0027fixed_ip_address\u0027]))"},{"line_number":263,"context_line":"                        if address_pair_db_port_list:"},{"line_number":264,"context_line":"                            self._inherit_service_port_and_arp_update("},{"line_number":265,"context_line":"                                context, address_pair_db_port_list, port)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_bd772b01","line":262,"range":{"start_line":262,"start_character":58,"end_line":262,"end_character":74},"updated":"2016-05-24 23:36:32.000000000","message":"Instead of passing the fixed ip to this method, why not just directly to  floatingip_db[\"fixed_port_id\"].  You won\u0027t need the above query at all.  You have the port id already.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3143e017203f6d826826cd8bbc2f790d13c98a70","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                        port[\u0027device_owner\u0027] in allowed_device_owners):"},{"line_number":260,"context_line":"                        address_pair_db_port_list \u003d ("},{"line_number":261,"context_line":"                            self._get_ports_for_allowed_address_pair_ip("},{"line_number":262,"context_line":"                                admin_ctx, floatingip_db[\u0027fixed_ip_address\u0027]))"},{"line_number":263,"context_line":"                        if address_pair_db_port_list:"},{"line_number":264,"context_line":"                            self._inherit_service_port_and_arp_update("},{"line_number":265,"context_line":"                                context, address_pair_db_port_list, port)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_3fa42e06","line":262,"range":{"start_line":262,"start_character":58,"end_line":262,"end_character":74},"in_reply_to":"bab6814e_bd772b01","updated":"2016-06-01 20:06:22.000000000","message":"Sorry, ignore this comment.  I realize now where my mistake was.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7c8dfbef55096449adee3117553fda5e28a2266","unresolved":false,"context_lines":[{"line_number":260,"context_line":"                        address_pair_db_port_list \u003d ("},{"line_number":261,"context_line":"                            self._get_ports_for_allowed_address_pair_ip("},{"line_number":262,"context_line":"                                admin_ctx, floatingip_db[\u0027fixed_ip_address\u0027]))"},{"line_number":263,"context_line":"                        if address_pair_db_port_list:"},{"line_number":264,"context_line":"                            self._inherit_service_port_and_arp_update("},{"line_number":265,"context_line":"                                context, address_pair_db_port_list, port)"},{"line_number":266,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_46dd2fdf","line":263,"range":{"start_line":263,"start_character":24,"end_line":263,"end_character":26},"updated":"2016-05-20 16:19:57.000000000","message":"IMO, this method has too many levels of if statements.  I think this makes five and you had to arbitrarily create a new method just to go three levels deeper.  In many cases, you can change this:\n\n  if condition:\n      \u003ccode\u003e\n\n  if not condition:\n      return\n\n  \u003ccode\u003e\n\nIMO, this looks better.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0d5b5209c6e553ffe2297193066d9be662950ff3","unresolved":false,"context_lines":[{"line_number":260,"context_line":"                        address_pair_db_port_list \u003d ("},{"line_number":261,"context_line":"                            self._get_ports_for_allowed_address_pair_ip("},{"line_number":262,"context_line":"                                admin_ctx, floatingip_db[\u0027fixed_ip_address\u0027]))"},{"line_number":263,"context_line":"                        if address_pair_db_port_list:"},{"line_number":264,"context_line":"                            self._inherit_service_port_and_arp_update("},{"line_number":265,"context_line":"                                context, address_pair_db_port_list, port)"},{"line_number":266,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_c0784af5","line":263,"range":{"start_line":263,"start_character":24,"end_line":263,"end_character":26},"in_reply_to":"bab6814e_0870bfdb","updated":"2016-06-06 18:11:50.000000000","message":"Done","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"a10dac05e4e50c743d39f82db2d0108848490b94","unresolved":false,"context_lines":[{"line_number":260,"context_line":"                        address_pair_db_port_list \u003d ("},{"line_number":261,"context_line":"                            self._get_ports_for_allowed_address_pair_ip("},{"line_number":262,"context_line":"                                admin_ctx, floatingip_db[\u0027fixed_ip_address\u0027]))"},{"line_number":263,"context_line":"                        if address_pair_db_port_list:"},{"line_number":264,"context_line":"                            self._inherit_service_port_and_arp_update("},{"line_number":265,"context_line":"                                context, address_pair_db_port_list, port)"},{"line_number":266,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_0870bfdb","line":263,"range":{"start_line":263,"start_character":24,"end_line":263,"end_character":26},"in_reply_to":"bab6814e_46dd2fdf","updated":"2016-05-24 20:04:03.000000000","message":"Let me check it out.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"968ab9170615217fe77c7559f27adfd83ed431d6","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        \"\"\"Function inherits port host bindings for allowed_address_pair.\"\"\""},{"line_number":270,"context_line":"        valid_svc_ports \u003d []"},{"line_number":271,"context_line":"        for port_item in address_pair_db_port_list:"},{"line_number":272,"context_line":"            port \u003d self._core_plugin.get_port("},{"line_number":273,"context_line":"                context.elevated(), port_item[\u0027port_id\u0027])"},{"line_number":274,"context_line":"            valid_port_state \u003d ("},{"line_number":275,"context_line":"                port[\u0027status\u0027] \u003d\u003d l3_const.PORT_STATUS_ACTIVE or"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_5dc9df78","line":272,"range":{"start_line":272,"start_character":37,"end_line":272,"end_character":45},"updated":"2016-05-24 23:36:32.000000000","message":"get_ports could get them all and you could pass the port_ids and status as filters.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0d5b5209c6e553ffe2297193066d9be662950ff3","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        \"\"\"Function inherits port host bindings for allowed_address_pair.\"\"\""},{"line_number":270,"context_line":"        valid_svc_ports \u003d []"},{"line_number":271,"context_line":"        for port_item in address_pair_db_port_list:"},{"line_number":272,"context_line":"            port \u003d self._core_plugin.get_port("},{"line_number":273,"context_line":"                context.elevated(), port_item[\u0027port_id\u0027])"},{"line_number":274,"context_line":"            valid_port_state \u003d ("},{"line_number":275,"context_line":"                port[\u0027status\u0027] \u003d\u003d l3_const.PORT_STATUS_ACTIVE or"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_a0737e14","line":272,"range":{"start_line":272,"start_character":37,"end_line":272,"end_character":45},"in_reply_to":"9abb7d3a_3fe6eee7","updated":"2016-06-06 18:11:50.000000000","message":"Done","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3143e017203f6d826826cd8bbc2f790d13c98a70","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        \"\"\"Function inherits port host bindings for allowed_address_pair.\"\"\""},{"line_number":270,"context_line":"        valid_svc_ports \u003d []"},{"line_number":271,"context_line":"        for port_item in address_pair_db_port_list:"},{"line_number":272,"context_line":"            port \u003d self._core_plugin.get_port("},{"line_number":273,"context_line":"                context.elevated(), port_item[\u0027port_id\u0027])"},{"line_number":274,"context_line":"            valid_port_state \u003d ("},{"line_number":275,"context_line":"                port[\u0027status\u0027] \u003d\u003d l3_const.PORT_STATUS_ACTIVE or"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_3fe6eee7","line":272,"range":{"start_line":272,"start_character":37,"end_line":272,"end_character":45},"in_reply_to":"bab6814e_5dc9df78","updated":"2016-06-01 20:06:22.000000000","message":"Still think using get_ports with a filter is the better option to avoid multiple DB queries.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"968ab9170615217fe77c7559f27adfd83ed431d6","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        for port_item in address_pair_db_port_list:"},{"line_number":272,"context_line":"            port \u003d self._core_plugin.get_port("},{"line_number":273,"context_line":"                context.elevated(), port_item[\u0027port_id\u0027])"},{"line_number":274,"context_line":"            valid_port_state \u003d ("},{"line_number":275,"context_line":"                port[\u0027status\u0027] \u003d\u003d l3_const.PORT_STATUS_ACTIVE or"},{"line_number":276,"context_line":"                port[\u0027admin_state_up\u0027])"},{"line_number":277,"context_line":"            if not valid_port_state:"},{"line_number":278,"context_line":"                continue"},{"line_number":279,"context_line":"            valid_svc_ports.append(port)"},{"line_number":280,"context_line":"        if not valid_svc_ports:"},{"line_number":281,"context_line":"            LOG.debug(\"No unbound valid service port found for floatingip\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_9d9a276d","line":278,"range":{"start_line":274,"start_character":12,"end_line":278,"end_character":24},"updated":"2016-05-24 23:36:32.000000000","message":"This is effectively joining data from the ports and the allowed address tables.  It would be so much better if we could figure out a way to get the DB to do the work for us.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0d5b5209c6e553ffe2297193066d9be662950ff3","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        for port_item in address_pair_db_port_list:"},{"line_number":272,"context_line":"            port \u003d self._core_plugin.get_port("},{"line_number":273,"context_line":"                context.elevated(), port_item[\u0027port_id\u0027])"},{"line_number":274,"context_line":"            valid_port_state \u003d ("},{"line_number":275,"context_line":"                port[\u0027status\u0027] \u003d\u003d l3_const.PORT_STATUS_ACTIVE or"},{"line_number":276,"context_line":"                port[\u0027admin_state_up\u0027])"},{"line_number":277,"context_line":"            if not valid_port_state:"},{"line_number":278,"context_line":"                continue"},{"line_number":279,"context_line":"            valid_svc_ports.append(port)"},{"line_number":280,"context_line":"        if not valid_svc_ports:"},{"line_number":281,"context_line":"            LOG.debug(\"No unbound valid service port found for floatingip\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_6050765f","line":278,"range":{"start_line":274,"start_character":12,"end_line":278,"end_character":24},"in_reply_to":"bab6814e_9d9a276d","updated":"2016-06-06 18:11:50.000000000","message":"Done","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7c8dfbef55096449adee3117553fda5e28a2266","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        if len(valid_svc_ports) \u003e 1:"},{"line_number":284,"context_line":"            LOG.warning(_LW(\"Multiple active ports associated \""},{"line_number":285,"context_line":"                            \"with the allowed_address_pairs.\"))"},{"line_number":286,"context_line":"        else:"},{"line_number":287,"context_line":"            valid_svc_port \u003d valid_svc_ports[0]"},{"line_number":288,"context_line":"            if valid_svc_port:"},{"line_number":289,"context_line":"                address_pair_list \u003d valid_svc_port.get("}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_f906841a","line":286,"range":{"start_line":286,"start_character":8,"end_line":286,"end_character":13},"updated":"2016-05-20 16:19:57.000000000","message":"return instead of creating another level of indent.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0d5b5209c6e553ffe2297193066d9be662950ff3","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        if len(valid_svc_ports) \u003e 1:"},{"line_number":284,"context_line":"            LOG.warning(_LW(\"Multiple active ports associated \""},{"line_number":285,"context_line":"                            \"with the allowed_address_pairs.\"))"},{"line_number":286,"context_line":"        else:"},{"line_number":287,"context_line":"            valid_svc_port \u003d valid_svc_ports[0]"},{"line_number":288,"context_line":"            if valid_svc_port:"},{"line_number":289,"context_line":"                address_pair_list \u003d valid_svc_port.get("}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_c04faabb","line":286,"range":{"start_line":286,"start_character":8,"end_line":286,"end_character":13},"in_reply_to":"bab6814e_a881b391","updated":"2016-06-06 18:11:50.000000000","message":"Done","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"a10dac05e4e50c743d39f82db2d0108848490b94","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        if len(valid_svc_ports) \u003e 1:"},{"line_number":284,"context_line":"            LOG.warning(_LW(\"Multiple active ports associated \""},{"line_number":285,"context_line":"                            \"with the allowed_address_pairs.\"))"},{"line_number":286,"context_line":"        else:"},{"line_number":287,"context_line":"            valid_svc_port \u003d valid_svc_ports[0]"},{"line_number":288,"context_line":"            if valid_svc_port:"},{"line_number":289,"context_line":"                address_pair_list \u003d valid_svc_port.get("}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_a881b391","line":286,"range":{"start_line":286,"start_character":8,"end_line":286,"end_character":13},"in_reply_to":"bab6814e_f906841a","updated":"2016-05-24 20:04:03.000000000","message":"will fix it.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7c8dfbef55096449adee3117553fda5e28a2266","unresolved":false,"context_lines":[{"line_number":285,"context_line":"                            \"with the allowed_address_pairs.\"))"},{"line_number":286,"context_line":"        else:"},{"line_number":287,"context_line":"            valid_svc_port \u003d valid_svc_ports[0]"},{"line_number":288,"context_line":"            if valid_svc_port:"},{"line_number":289,"context_line":"                address_pair_list \u003d valid_svc_port.get("},{"line_number":290,"context_line":"                    \u0027allowed_address_pairs\u0027)"},{"line_number":291,"context_line":"                for address_pair in address_pair_list:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_b9899c28","line":288,"range":{"start_line":288,"start_character":12,"end_line":288,"end_character":29},"updated":"2016-05-20 16:19:57.000000000","message":"If not valid_svc_port\n      return","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0d5b5209c6e553ffe2297193066d9be662950ff3","unresolved":false,"context_lines":[{"line_number":285,"context_line":"                            \"with the allowed_address_pairs.\"))"},{"line_number":286,"context_line":"        else:"},{"line_number":287,"context_line":"            valid_svc_port \u003d valid_svc_ports[0]"},{"line_number":288,"context_line":"            if valid_svc_port:"},{"line_number":289,"context_line":"                address_pair_list \u003d valid_svc_port.get("},{"line_number":290,"context_line":"                    \u0027allowed_address_pairs\u0027)"},{"line_number":291,"context_line":"                for address_pair in address_pair_list:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_a04a5eaa","line":288,"range":{"start_line":288,"start_character":12,"end_line":288,"end_character":29},"in_reply_to":"bab6814e_2844a372","updated":"2016-06-06 18:11:50.000000000","message":"Done","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"a10dac05e4e50c743d39f82db2d0108848490b94","unresolved":false,"context_lines":[{"line_number":285,"context_line":"                            \"with the allowed_address_pairs.\"))"},{"line_number":286,"context_line":"        else:"},{"line_number":287,"context_line":"            valid_svc_port \u003d valid_svc_ports[0]"},{"line_number":288,"context_line":"            if valid_svc_port:"},{"line_number":289,"context_line":"                address_pair_list \u003d valid_svc_port.get("},{"line_number":290,"context_line":"                    \u0027allowed_address_pairs\u0027)"},{"line_number":291,"context_line":"                for address_pair in address_pair_list:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_2844a372","line":288,"range":{"start_line":288,"start_character":12,"end_line":288,"end_character":29},"in_reply_to":"bab6814e_b9899c28","updated":"2016-05-24 20:04:03.000000000","message":"will fix it.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7c8dfbef55096449adee3117553fda5e28a2266","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                            address_pair,"},{"line_number":296,"context_line":"                            address_pair_port\u003dallowed_address_port))"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"                    if updated_port:"},{"line_number":299,"context_line":"                        self.update_arp_entry_for_dvr_service_port("},{"line_number":300,"context_line":"                            context, valid_svc_port)"},{"line_number":301,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_b9a23cac","line":298,"range":{"start_line":298,"start_character":0,"end_line":298,"end_character":36},"updated":"2016-05-20 16:19:57.000000000","message":"I\u0027d recommend changing this to this:\n\n  if not update_port:\n      LOG.warning(...)\n      return\n\n  self.update_arp...","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0d5b5209c6e553ffe2297193066d9be662950ff3","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                            address_pair,"},{"line_number":296,"context_line":"                            address_pair_port\u003dallowed_address_port))"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"                    if updated_port:"},{"line_number":299,"context_line":"                        self.update_arp_entry_for_dvr_service_port("},{"line_number":300,"context_line":"                            context, valid_svc_port)"},{"line_number":301,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_e0caa619","line":298,"range":{"start_line":298,"start_character":0,"end_line":298,"end_character":36},"in_reply_to":"bab6814e_685eab46","updated":"2016-06-06 18:11:50.000000000","message":"Done","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"a10dac05e4e50c743d39f82db2d0108848490b94","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                            address_pair,"},{"line_number":296,"context_line":"                            address_pair_port\u003dallowed_address_port))"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"                    if updated_port:"},{"line_number":299,"context_line":"                        self.update_arp_entry_for_dvr_service_port("},{"line_number":300,"context_line":"                            context, valid_svc_port)"},{"line_number":301,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_685eab46","line":298,"range":{"start_line":298,"start_character":0,"end_line":298,"end_character":36},"in_reply_to":"bab6814e_b9a23cac","updated":"2016-05-24 20:04:03.000000000","message":"will fix it.","commit_id":"4a41efee839a58275b03a9e312c8a15422739c0b"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fda3cdaa12971daa9283f07343a48da7c3dec078","unresolved":false,"context_lines":[{"line_number":279,"context_line":"    def _inherit_service_port_and_arp_update("},{"line_number":280,"context_line":"        self, context, service_port, allowed_address_port):"},{"line_number":281,"context_line":"        \"\"\"Function inherits port host bindings for allowed_address_pair.\"\"\""},{"line_number":282,"context_line":"        if service_port:"},{"line_number":283,"context_line":"            service_port_dict \u003d self._core_plugin._make_port_dict("},{"line_number":284,"context_line":"                service_port, None)"},{"line_number":285,"context_line":"            address_pair_list \u003d service_port_dict.get("}],"source_content_type":"text/x-python","patch_set":11,"id":"7aa08908_4e457615","line":282,"updated":"2016-06-07 14:22:19.000000000","message":"nit: the caller has already verified service_port is valid","commit_id":"ec51cd3558d89d3fe1478380f8e3f26c8e3bafda"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"8d886edc4063b3330425b6f2451da530dd788862","unresolved":false,"context_lines":[{"line_number":279,"context_line":"    def _inherit_service_port_and_arp_update("},{"line_number":280,"context_line":"        self, context, service_port, allowed_address_port):"},{"line_number":281,"context_line":"        \"\"\"Function inherits port host bindings for allowed_address_pair.\"\"\""},{"line_number":282,"context_line":"        if service_port:"},{"line_number":283,"context_line":"            service_port_dict \u003d self._core_plugin._make_port_dict("},{"line_number":284,"context_line":"                service_port, None)"},{"line_number":285,"context_line":"            address_pair_list \u003d service_port_dict.get("}],"source_content_type":"text/x-python","patch_set":11,"id":"7aa08908_0ab09adc","line":282,"in_reply_to":"7aa08908_4e457615","updated":"2016-06-10 17:45:45.000000000","message":"I\u0027ll fix this nit.","commit_id":"ec51cd3558d89d3fe1478380f8e3f26c8e3bafda"}]}
