)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"4db51155364c230214b84ec6e72d3f1a96de119c","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When a port is created without the IP address, or created from a net without"},{"line_number":10,"context_line":"subnet, set port_security_enabled of the port to be False."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Partially Implements: blueprint ml2-ovs-portsecurity"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I5cd1fdfa13a7e57258be7251768eaa8ba64d486e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a41bdd9_c6ed8b26","line":12,"updated":"2015-07-14 07:31:06.000000000","message":"why link to this BP?","commit_id":"8ad1ed1221b3ddb701768527b062f557229f59a5"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"120917d09c6e0683b39438963777e2a9286fc3dd","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When a port is created without the IP address, or created from a net without"},{"line_number":10,"context_line":"subnet, set port_security_enabled of the port to be False."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Partially Implements: blueprint ml2-ovs-portsecurity"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I5cd1fdfa13a7e57258be7251768eaa8ba64d486e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a41bdd9_4bb17fe0","line":12,"in_reply_to":"9a41bdd9_c6ed8b26","updated":"2015-07-14 09:14:56.000000000","message":"oops, I will update it. Thanks hanzhang!","commit_id":"8ad1ed1221b3ddb701768527b062f557229f59a5"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"94a6f64a1c5012c3eeb0efabbe3c0032288ab633","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When a port is created without the IP address, or created from a net without"},{"line_number":10,"context_line":"subnet, set port_security_enabled of the port to be False."},{"line_number":11,"context_line":"This setting will ensure security-groups be empty and filter like"},{"line_number":12,"context_line":"anti-mac-spoofing be disabled for this port."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partially Implements: blueprint vm-without-l3-address"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1a4dcd0f_a6ebacaf","line":12,"updated":"2015-08-05 04:16:55.000000000","message":"i\u0027m still not convinced that this use of port_security_enabled\u003dFalse is a good idea.\nsome concerns:\n* port_security_enabled is a user-visible setting. flipping it internally is confusing.\n* semantics with L2-based filtering is not obvious.\n\nisn\u0027t it more straightforward to fix it in backend implementations (eg. firewall driver) rather at this layer?","commit_id":"bd5ae569befd977c8aecd0bbb18dbe5a6fce1684"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"9aa43daf99b605fae8b00dac13890519b62460bc","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When a port is created without the IP address, or created from a net without"},{"line_number":10,"context_line":"subnet, set port_security_enabled of the port to be False."},{"line_number":11,"context_line":"This setting will ensure security-groups be empty and filter like"},{"line_number":12,"context_line":"anti-mac-spoofing be disabled for this port."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partially Implements: blueprint vm-without-l3-address"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1a4dcd0f_befddf3b","line":12,"in_reply_to":"1a4dcd0f_a6ebacaf","updated":"2015-08-05 11:01:18.000000000","message":"Thanks Yamamoto! \n\nfor the first point, I just want to set port-sec with a proper value, it now based on the IP, and just like before, base on some other attr like security-group and address pairs.\nfor the second one,  do you concern sec-group will include the L2 filter? or you don\u0027t want me to touch the L2 part including the anti-mac-spoofing?\n\nIf create a new switch for this in firewall driver, I concern that people will be confused. assuming a port without IP but has security-group(include L3 L2), then L3 part in security-group does not make sense, but L2 part works. I think it will be complicated.","commit_id":"bd5ae569befd977c8aecd0bbb18dbe5a6fce1684"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"6e7f8d6103fa92c8072d7e1d479c78af64926587","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When a port is created without the IP address, or created from a net without"},{"line_number":10,"context_line":"subnet, set port_security_enabled of the port to be False."},{"line_number":11,"context_line":"This setting will ensure security-groups be empty and filter like"},{"line_number":12,"context_line":"anti-mac-spoofing be disabled for this port."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partially Implements: blueprint vm-without-l3-address"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1a4dcd0f_f0b565ec","line":12,"in_reply_to":"1a4dcd0f_af7c7cec","updated":"2015-08-07 10:05:31.000000000","message":"thanks all, I understand it,  I will upload a new one.","commit_id":"bd5ae569befd977c8aecd0bbb18dbe5a6fce1684"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"b477d54d592c03c2dfc1176a28032367ca8e12cc","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When a port is created without the IP address, or created from a net without"},{"line_number":10,"context_line":"subnet, set port_security_enabled of the port to be False."},{"line_number":11,"context_line":"This setting will ensure security-groups be empty and filter like"},{"line_number":12,"context_line":"anti-mac-spoofing be disabled for this port."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partially Implements: blueprint vm-without-l3-address"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1a4dcd0f_af7c7cec","line":12,"in_reply_to":"1a4dcd0f_befddf3b","updated":"2015-08-06 17:54:10.000000000","message":"+1 for yamamoto.\n- port_security_enabled is orthogonal to whether IP address is assigned to this port.\n- also, it shouldn\u0027t affect L2 behaviour.\n\nIf there is a sort of L2 filtering enabled, it would surprise the user to disable l2 filtering unconditionally when ip address is unassigned.","commit_id":"bd5ae569befd977c8aecd0bbb18dbe5a6fce1684"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"12906b9def0d6aac4db5b53ac6166c4e0fcb153b","unresolved":false,"context_lines":[{"line_number":10,"context_line":"reserve the L2 filter."},{"line_number":11,"context_line":"This patch will make L2 agent verify the fixed_ips before converting the"},{"line_number":12,"context_line":"security-group-rules into firewall rules, L3 rules in it will be removed."},{"line_number":13,"context_line":"And filter like arp-spoofing will be disabled for this port."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Partially Implements: blueprint vm-without-l3-address"},{"line_number":16,"context_line":"Change-Id: I5cd1fdfa13a7e57258be7251768eaa8ba64d486e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"fa1b9901_81a6a00e","line":13,"updated":"2015-08-19 02:35:30.000000000","message":"Please specify in the commit message the only time a port can be created without a fixed IP is when the network it\u0027s associated with does not have a subnet. So it makes sense that Neutron will have no L3 knowledge in this case and doing L3 filtering will not make any sense.","commit_id":"a844013dd92a82c93e1c9895d42e17ee064b845a"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"104438228721d8dbbdd350a3120b3aef2b14a2f9","unresolved":false,"context_lines":[{"line_number":10,"context_line":"reserve the L2 filter."},{"line_number":11,"context_line":"This patch will make L2 agent verify the fixed_ips before converting the"},{"line_number":12,"context_line":"security-group-rules into firewall rules, L3 rules in it will be removed."},{"line_number":13,"context_line":"And filter like arp-spoofing will be disabled for this port."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Partially Implements: blueprint vm-without-l3-address"},{"line_number":16,"context_line":"Change-Id: I5cd1fdfa13a7e57258be7251768eaa8ba64d486e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"fa1b9901_d3278ab4","line":13,"in_reply_to":"fa1b9901_81a6a00e","updated":"2015-08-19 06:51:43.000000000","message":"Done","commit_id":"a844013dd92a82c93e1c9895d42e17ee064b845a"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"99e0f066750008f7ffde91f8b1f1d35055ee163a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add support for unaddressed port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Neutron could create a port without the IP address when the network don\u0027t have"},{"line_number":10,"context_line":"the subnet. In this case, neutron will have no L3 knowledgee and we need remove"},{"line_number":11,"context_line":"the L3 filter on it but reserve the L2 filter if there is."},{"line_number":12,"context_line":"This patch will make L2 agent verify the fixed_ips before converting the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"fa1b9901_158ff5cc","line":9,"updated":"2015-08-20 01:01:18.000000000","message":"don\u0027t -\u003e doesn\u0027t","commit_id":"bf6281f2aaa806501bfc1dd240016653d72b2d71"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"c2c83dfea7e04ad601ac23e63b4bc1abfb039717","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add support for unaddressed port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Neutron could create a port without the IP address when the network don\u0027t have"},{"line_number":10,"context_line":"the subnet. In this case, neutron will have no L3 knowledgee and we need remove"},{"line_number":11,"context_line":"the L3 filter on it but reserve the L2 filter if there is."},{"line_number":12,"context_line":"This patch will make L2 agent verify the fixed_ips before converting the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"fa1b9901_b3c98128","line":9,"in_reply_to":"fa1b9901_158ff5cc","updated":"2015-08-20 07:53:47.000000000","message":"Done","commit_id":"bf6281f2aaa806501bfc1dd240016653d72b2d71"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"99e0f066750008f7ffde91f8b1f1d35055ee163a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add support for unaddressed port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Neutron could create a port without the IP address when the network don\u0027t have"},{"line_number":10,"context_line":"the subnet. In this case, neutron will have no L3 knowledgee and we need remove"},{"line_number":11,"context_line":"the L3 filter on it but reserve the L2 filter if there is."},{"line_number":12,"context_line":"This patch will make L2 agent verify the fixed_ips before converting the"},{"line_number":13,"context_line":"security-group-rules into firewall rules, L3 rules in it will be removed."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"fa1b9901_b5be4963","line":10,"updated":"2015-08-20 01:01:18.000000000","message":"a subnet.","commit_id":"bf6281f2aaa806501bfc1dd240016653d72b2d71"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"c2c83dfea7e04ad601ac23e63b4bc1abfb039717","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add support for unaddressed port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Neutron could create a port without the IP address when the network don\u0027t have"},{"line_number":10,"context_line":"the subnet. In this case, neutron will have no L3 knowledgee and we need remove"},{"line_number":11,"context_line":"the L3 filter on it but reserve the L2 filter if there is."},{"line_number":12,"context_line":"This patch will make L2 agent verify the fixed_ips before converting the"},{"line_number":13,"context_line":"security-group-rules into firewall rules, L3 rules in it will be removed."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"fa1b9901_d3ce752d","line":10,"in_reply_to":"fa1b9901_b5be4963","updated":"2015-08-20 07:53:47.000000000","message":"Done","commit_id":"bf6281f2aaa806501bfc1dd240016653d72b2d71"}],"neutron/agent/linux/iptables_firewall.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"1ed02eca79cc722cefb985ab140c8ee3d8c12ffb","unresolved":false,"context_lines":[{"line_number":367,"context_line":"            mac_ipv6_pairs.append((mac, ip_address))"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"    def _spoofing_rule(self, port, ipv4_rules, ipv6_rules):"},{"line_number":370,"context_line":"        if port[\u0027fixed_ips\u0027]:"},{"line_number":371,"context_line":"            # Allow dhcp client packets"},{"line_number":372,"context_line":"            ipv4_rules +\u003d [comment_rule(\u0027-p udp -m udp --sport 68 --dport 67 \u0027"},{"line_number":373,"context_line":"                                        \u0027-j RETURN\u0027, comment\u003dic.DHCP_CLIENT)]"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa1b9901_7e868214","line":370,"updated":"2015-08-19 08:38:17.000000000","message":"when reading this code outside the context of this patch, it\u0027s not immediately obvious why we only do this when fixed_ips are present.\n\nCan you define a new function at the module level of this module called \u0027port_needs_l3_security\u0027 that takes the port and returns true if fixed IPs are present?\n\nThen call that here.","commit_id":"bf6281f2aaa806501bfc1dd240016653d72b2d71"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"c2c83dfea7e04ad601ac23e63b4bc1abfb039717","unresolved":false,"context_lines":[{"line_number":367,"context_line":"            mac_ipv6_pairs.append((mac, ip_address))"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"    def _spoofing_rule(self, port, ipv4_rules, ipv6_rules):"},{"line_number":370,"context_line":"        if port[\u0027fixed_ips\u0027]:"},{"line_number":371,"context_line":"            # Allow dhcp client packets"},{"line_number":372,"context_line":"            ipv4_rules +\u003d [comment_rule(\u0027-p udp -m udp --sport 68 --dport 67 \u0027"},{"line_number":373,"context_line":"                                        \u0027-j RETURN\u0027, comment\u003dic.DHCP_CLIENT)]"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa1b9901_db59a336","line":370,"in_reply_to":"fa1b9901_7e868214","updated":"2015-08-20 07:53:47.000000000","message":"Done","commit_id":"bf6281f2aaa806501bfc1dd240016653d72b2d71"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"1ed02eca79cc722cefb985ab140c8ee3d8c12ffb","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        elif direction \u003d\u003d firewall.INGRESS_DIRECTION:"},{"line_number":488,"context_line":"            ipv6_iptables_rules +\u003d self._accept_inbound_icmpv6()"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"        if port[\u0027fixed_ips\u0027]:"},{"line_number":491,"context_line":"            # include IPv4 and IPv6 iptable rules from security group"},{"line_number":492,"context_line":"            ipv4_iptables_rules +\u003d self._convert_sgr_to_iptables_rules("},{"line_number":493,"context_line":"                ipv4_sg_rules)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa1b9901_1e7e6619","line":490,"updated":"2015-08-19 08:38:17.000000000","message":"and here","commit_id":"bf6281f2aaa806501bfc1dd240016653d72b2d71"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"c2c83dfea7e04ad601ac23e63b4bc1abfb039717","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        elif direction \u003d\u003d firewall.INGRESS_DIRECTION:"},{"line_number":488,"context_line":"            ipv6_iptables_rules +\u003d self._accept_inbound_icmpv6()"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"        if port[\u0027fixed_ips\u0027]:"},{"line_number":491,"context_line":"            # include IPv4 and IPv6 iptable rules from security group"},{"line_number":492,"context_line":"            ipv4_iptables_rules +\u003d self._convert_sgr_to_iptables_rules("},{"line_number":493,"context_line":"                ipv4_sg_rules)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa1b9901_9b39ebd9","line":490,"in_reply_to":"fa1b9901_1e7e6619","updated":"2015-08-20 07:53:47.000000000","message":"Done","commit_id":"bf6281f2aaa806501bfc1dd240016653d72b2d71"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"1ed02eca79cc722cefb985ab140c8ee3d8c12ffb","unresolved":false,"context_lines":[{"line_number":504,"context_line":"        self._spoofing_rule(port,"},{"line_number":505,"context_line":"                            ipv4_iptables_rules,"},{"line_number":506,"context_line":"                            ipv6_iptables_rules)"},{"line_number":507,"context_line":"        if port[\u0027fixed_ips\u0027]:"},{"line_number":508,"context_line":"            self._drop_dhcp_rule(ipv4_iptables_rules, ipv6_iptables_rules)"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    def _update_ipset_members(self, security_group_ids):"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa1b9901_3e79ea2f","line":507,"updated":"2015-08-19 08:38:17.000000000","message":"and here","commit_id":"bf6281f2aaa806501bfc1dd240016653d72b2d71"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"c2c83dfea7e04ad601ac23e63b4bc1abfb039717","unresolved":false,"context_lines":[{"line_number":504,"context_line":"        self._spoofing_rule(port,"},{"line_number":505,"context_line":"                            ipv4_iptables_rules,"},{"line_number":506,"context_line":"                            ipv6_iptables_rules)"},{"line_number":507,"context_line":"        if port[\u0027fixed_ips\u0027]:"},{"line_number":508,"context_line":"            self._drop_dhcp_rule(ipv4_iptables_rules, ipv6_iptables_rules)"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    def _update_ipset_members(self, security_group_ids):"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa1b9901_3b321ff3","line":507,"in_reply_to":"fa1b9901_3e79ea2f","updated":"2015-08-20 07:53:47.000000000","message":"Done","commit_id":"bf6281f2aaa806501bfc1dd240016653d72b2d71"}],"neutron/db/portsecurity_db.py":[{"author":{"_account_id":12955,"name":"Aman Kumar","email":"aman.kumar3@hpe.com","username":"amank"},"change_message_id":"61c9abb3bcda283f366423b4038cdd2b166165fc","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        if the port is associated with an ip or not."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        has_ip \u003d self._ip_on_port(port)"},{"line_number":42,"context_line":"        # we don\u0027t apply security groups for dhcp, router"},{"line_number":43,"context_line":"        if ((port.get(\u0027device_owner\u0027) and"},{"line_number":44,"context_line":"                port[\u0027device_owner\u0027].startswith(\u0027network:\u0027)) or"},{"line_number":45,"context_line":"                not result[\u0027fixed_ips\u0027]):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a41bdd9_4bb5ffeb","line":42,"updated":"2015-07-14 09:16:22.000000000","message":"can we update this comment also.?","commit_id":"8ad1ed1221b3ddb701768527b062f557229f59a5"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"b2559498f6734f1ea891e023bd285a5d2a794cbb","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        if the port is associated with an ip or not."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        has_ip \u003d self._ip_on_port(port)"},{"line_number":42,"context_line":"        # we don\u0027t apply security groups for dhcp, router"},{"line_number":43,"context_line":"        if ((port.get(\u0027device_owner\u0027) and"},{"line_number":44,"context_line":"                port[\u0027device_owner\u0027].startswith(\u0027network:\u0027)) or"},{"line_number":45,"context_line":"                not result[\u0027fixed_ips\u0027]):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a41bdd9_ab64cb48","line":42,"in_reply_to":"9a41bdd9_4bb5ffeb","updated":"2015-07-14 09:19:03.000000000","message":"Done","commit_id":"8ad1ed1221b3ddb701768527b062f557229f59a5"}],"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"1417bfb418fa5471483e49875cc60f4bed2101fe","unresolved":false,"context_lines":[{"line_number":806,"context_line":"        if port_details.get(\u0027allowed_address_pairs\u0027):"},{"line_number":807,"context_line":"            addresses |\u003d {p[\u0027ip_address\u0027]"},{"line_number":808,"context_line":"                          for p in port_details[\u0027allowed_address_pairs\u0027]}"},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"        addresses \u003d {ip for ip in addresses"},{"line_number":811,"context_line":"                     if netaddr.IPNetwork(ip).version \u003d\u003d 4}"},{"line_number":812,"context_line":"        if any(netaddr.IPNetwork(ip).prefixlen \u003d\u003d 0 for ip in addresses):"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a4dcd0f_994cca77","side":"PARENT","line":809,"updated":"2015-08-17 07:53:48.000000000","message":"how about if not addresses: return?","commit_id":"6ee7b12d9494ca972d05a73ca000f1167d32c617"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"104438228721d8dbbdd350a3120b3aef2b14a2f9","unresolved":false,"context_lines":[{"line_number":806,"context_line":"        if port_details.get(\u0027allowed_address_pairs\u0027):"},{"line_number":807,"context_line":"            addresses |\u003d {p[\u0027ip_address\u0027]"},{"line_number":808,"context_line":"                          for p in port_details[\u0027allowed_address_pairs\u0027]}"},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"        addresses \u003d {ip for ip in addresses"},{"line_number":811,"context_line":"                     if netaddr.IPNetwork(ip).version \u003d\u003d 4}"},{"line_number":812,"context_line":"        if any(netaddr.IPNetwork(ip).prefixlen \u003d\u003d 0 for ip in addresses):"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa1b9901_f82f0df4","side":"PARENT","line":809,"in_reply_to":"1a4dcd0f_994cca77","updated":"2015-08-19 06:51:43.000000000","message":"Done","commit_id":"6ee7b12d9494ca972d05a73ca000f1167d32c617"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"12906b9def0d6aac4db5b53ac6166c4e0fcb153b","unresolved":false,"context_lines":[{"line_number":804,"context_line":"        # collect all of the addresses and cidrs that belong to the port"},{"line_number":805,"context_line":"        addresses \u003d {f[\u0027ip_address\u0027] for f in port_details[\u0027fixed_ips\u0027]}"},{"line_number":806,"context_line":""},{"line_number":807,"context_line":"        address_pairs \u003d set([])"},{"line_number":808,"context_line":"        if port_details.get(\u0027allowed_address_pairs\u0027):"},{"line_number":809,"context_line":"            address_pairs \u003d {p[\u0027ip_address\u0027]"},{"line_number":810,"context_line":"                          for p in port_details[\u0027allowed_address_pairs\u0027]}"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa1b9901_41b16846","line":807,"updated":"2015-08-19 02:35:30.000000000","message":"using a separate variable for address pairs here doesn\u0027t look necessary.\n\njust check if \u0027addresses\u0027 is empty after the allowed address pairs are added and then return","commit_id":"a844013dd92a82c93e1c9895d42e17ee064b845a"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"104438228721d8dbbdd350a3120b3aef2b14a2f9","unresolved":false,"context_lines":[{"line_number":804,"context_line":"        # collect all of the addresses and cidrs that belong to the port"},{"line_number":805,"context_line":"        addresses \u003d {f[\u0027ip_address\u0027] for f in port_details[\u0027fixed_ips\u0027]}"},{"line_number":806,"context_line":""},{"line_number":807,"context_line":"        address_pairs \u003d set([])"},{"line_number":808,"context_line":"        if port_details.get(\u0027allowed_address_pairs\u0027):"},{"line_number":809,"context_line":"            address_pairs \u003d {p[\u0027ip_address\u0027]"},{"line_number":810,"context_line":"                          for p in port_details[\u0027allowed_address_pairs\u0027]}"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa1b9901_9884d1d4","line":807,"in_reply_to":"fa1b9901_41b16846","updated":"2015-08-19 06:51:43.000000000","message":"Done","commit_id":"a844013dd92a82c93e1c9895d42e17ee064b845a"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"104438228721d8dbbdd350a3120b3aef2b14a2f9","unresolved":false,"context_lines":[{"line_number":804,"context_line":"        # collect all of the addresses and cidrs that belong to the port"},{"line_number":805,"context_line":"        addresses \u003d {f[\u0027ip_address\u0027] for f in port_details[\u0027fixed_ips\u0027]}"},{"line_number":806,"context_line":""},{"line_number":807,"context_line":"        address_pairs \u003d set([])"},{"line_number":808,"context_line":"        if port_details.get(\u0027allowed_address_pairs\u0027):"},{"line_number":809,"context_line":"            address_pairs \u003d {p[\u0027ip_address\u0027]"},{"line_number":810,"context_line":"                          for p in port_details[\u0027allowed_address_pairs\u0027]}"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa1b9901_d82c8904","line":807,"in_reply_to":"fa1b9901_41b16846","updated":"2015-08-19 06:51:43.000000000","message":"Done","commit_id":"a844013dd92a82c93e1c9895d42e17ee064b845a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"1ed02eca79cc722cefb985ab140c8ee3d8c12ffb","unresolved":false,"context_lines":[{"line_number":807,"context_line":"            addresses |\u003d {p[\u0027ip_address\u0027]"},{"line_number":808,"context_line":"                          for p in port_details[\u0027allowed_address_pairs\u0027]}"},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"        if not addresses:"},{"line_number":811,"context_line":"            return"},{"line_number":812,"context_line":""},{"line_number":813,"context_line":"        addresses \u003d {ip for ip in addresses"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa1b9901_de778e38","line":810,"updated":"2015-08-19 08:38:17.000000000","message":"and here","commit_id":"bf6281f2aaa806501bfc1dd240016653d72b2d71"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"c2c83dfea7e04ad601ac23e63b4bc1abfb039717","unresolved":false,"context_lines":[{"line_number":807,"context_line":"            addresses |\u003d {p[\u0027ip_address\u0027]"},{"line_number":808,"context_line":"                          for p in port_details[\u0027allowed_address_pairs\u0027]}"},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"        if not addresses:"},{"line_number":811,"context_line":"            return"},{"line_number":812,"context_line":""},{"line_number":813,"context_line":"        addresses \u003d {ip for ip in addresses"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa1b9901_fb758797","line":810,"in_reply_to":"fa1b9901_de778e38","updated":"2015-08-20 07:53:47.000000000","message":"Done","commit_id":"bf6281f2aaa806501bfc1dd240016653d72b2d71"}],"neutron/plugins/ml2/extensions/port_security.py":[{"author":{"_account_id":12955,"name":"Aman Kumar","email":"aman.kumar3@hpe.com","username":"amank"},"change_message_id":"61c9abb3bcda283f366423b4038cdd2b166165fc","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        if (port.get(\u0027device_owner\u0027) and"},{"line_number":78,"context_line":"                port[\u0027device_owner\u0027].startswith(\u0027network:\u0027)):"},{"line_number":79,"context_line":"            return False"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        if not result[\u0027fixed_ips\u0027]:"},{"line_number":82,"context_line":"            return False"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a41bdd9_8ba227ad","line":80,"updated":"2015-07-14 09:16:22.000000000","message":"ditto, add a comment like line 76","commit_id":"8ad1ed1221b3ddb701768527b062f557229f59a5"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"b2559498f6734f1ea891e023bd285a5d2a794cbb","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        if (port.get(\u0027device_owner\u0027) and"},{"line_number":78,"context_line":"                port[\u0027device_owner\u0027].startswith(\u0027network:\u0027)):"},{"line_number":79,"context_line":"            return False"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        if not result[\u0027fixed_ips\u0027]:"},{"line_number":82,"context_line":"            return False"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a41bdd9_4b5bbf87","line":80,"in_reply_to":"9a41bdd9_8ba227ad","updated":"2015-07-14 09:19:03.000000000","message":"Thanks, I will update it in next patch 3.","commit_id":"8ad1ed1221b3ddb701768527b062f557229f59a5"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"db146fab8587da43c24dfdbacb1c9c3494cfeb01","unresolved":false,"context_lines":[{"line_number":62,"context_line":"           result.get(portb.VIF_TYPE) \u003d\u003d portb.VIF_TYPE_UNBOUND and"},{"line_number":63,"context_line":"           attrs.is_attr_set(data.get(\u0027fixed_ips\u0027))):"},{"line_number":64,"context_line":"            data[psec.PORTSECURITY] \u003d True"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        self._process_port_port_security_update(context, data, result)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def extend_network_dict(self, session, db_data, result):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_bf7698d6","line":65,"updated":"2015-07-17 02:57:38.000000000","message":"didn\u0027t understand the above comment. Can you try to rewrite it please. Regardless, it seems the following statement needs to have the if statement as in the original code:\n\n if psec.PORTSECURITY in data:","commit_id":"2c3ddfba1befd33926fe28177ea3689a702a7956"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"e8c51135742342bbe2d189994a32daab31dfaa1c","unresolved":false,"context_lines":[{"line_number":62,"context_line":"           result.get(portb.VIF_TYPE) \u003d\u003d portb.VIF_TYPE_UNBOUND and"},{"line_number":63,"context_line":"           attrs.is_attr_set(data.get(\u0027fixed_ips\u0027))):"},{"line_number":64,"context_line":"            data[psec.PORTSECURITY] \u003d True"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        self._process_port_port_security_update(context, data, result)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def extend_network_dict(self, session, db_data, result):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_f5e3dc31","line":65,"in_reply_to":"9a41bdd9_bf7698d6","updated":"2015-07-17 07:18:11.000000000","message":"thanks, I will rewrite it.","commit_id":"2c3ddfba1befd33926fe28177ea3689a702a7956"},{"author":{"_account_id":17096,"name":"Aditi Rajagopal","email":"arajagopal@us.ibm.com","username":"aditirajagopal"},"change_message_id":"af5b53656f9a3d46517decd44c93fb34e4e52921","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        # TODO(yalei) to make verification more accurate here is to verify if"},{"line_number":62,"context_line":"        # the port don\u0027t have IP address before updation, but the API don\u0027t"},{"line_number":63,"context_line":"        # provide this kind of arg. It could be done when refine the driver"},{"line_number":64,"context_line":"        # API."},{"line_number":65,"context_line":"        if psec.PORTSECURITY in data:"},{"line_number":66,"context_line":"            self._process_port_port_security_update(context, data, result)"},{"line_number":67,"context_line":"        elif (not result.get(psec.PORTSECURITY) and"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_8f2018f9","line":64,"updated":"2015-07-17 20:15:07.000000000","message":"Sorry...i still think this should be rewritten. Proposed rewrite -\n\n\"If a port is created without an IP address, we set port_security_enable \u003d false by default. However, if an IP is provided when the port is updated, we would need to set port_security_enable \u003d true.\nTODO (yalei): to be more precise, this change should only happen for ports that do not have fix_ips before they are updated. Currently, the API doesn\u0027t have this functionality. Might want to take this into consideration when refining the driver API\"","commit_id":"530aee65da92dcc184b30eb5b3e2bc8be32e3083"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"caf67cb0aae5d096579da1ac41eb4bbf52f00a99","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        # TODO(yalei) to make verification more accurate here is to verify if"},{"line_number":62,"context_line":"        # the port don\u0027t have IP address before updation, but the API don\u0027t"},{"line_number":63,"context_line":"        # provide this kind of arg. It could be done when refine the driver"},{"line_number":64,"context_line":"        # API."},{"line_number":65,"context_line":"        if psec.PORTSECURITY in data:"},{"line_number":66,"context_line":"            self._process_port_port_security_update(context, data, result)"},{"line_number":67,"context_line":"        elif (not result.get(psec.PORTSECURITY) and"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_37bab8e2","line":64,"in_reply_to":"9a41bdd9_8f2018f9","updated":"2015-07-20 06:19:18.000000000","message":"Done","commit_id":"530aee65da92dcc184b30eb5b3e2bc8be32e3083"}],"neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"12906b9def0d6aac4db5b53ac6166c4e0fcb153b","unresolved":false,"context_lines":[{"line_number":1088,"context_line":"        self.assertTrue(int_br.delete_arp_spoofing_protection.called)"},{"line_number":1089,"context_line":"        self.assertFalse(int_br.install_arp_spoofing_protection.called)"},{"line_number":1090,"context_line":""},{"line_number":1091,"context_line":"    def test_arp_spoofing_basic_rule_setup(self):"},{"line_number":1092,"context_line":"        vif \u003d FakeVif()"},{"line_number":1093,"context_line":"        fake_details \u003d {\u0027fixed_ips\u0027: []}"},{"line_number":1094,"context_line":"        self.agent.prevent_arp_spoofing \u003d True"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa1b9901_a1a964e1","line":1091,"updated":"2015-08-19 02:35:30.000000000","message":"duplicate this test so we have one test with fixed IPs and one without fixed IPs.\nThe others have allowed address pairs so they don\u0027t test fixed IPs only.","commit_id":"a844013dd92a82c93e1c9895d42e17ee064b845a"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"104438228721d8dbbdd350a3120b3aef2b14a2f9","unresolved":false,"context_lines":[{"line_number":1088,"context_line":"        self.assertTrue(int_br.delete_arp_spoofing_protection.called)"},{"line_number":1089,"context_line":"        self.assertFalse(int_br.install_arp_spoofing_protection.called)"},{"line_number":1090,"context_line":""},{"line_number":1091,"context_line":"    def test_arp_spoofing_basic_rule_setup(self):"},{"line_number":1092,"context_line":"        vif \u003d FakeVif()"},{"line_number":1093,"context_line":"        fake_details \u003d {\u0027fixed_ips\u0027: []}"},{"line_number":1094,"context_line":"        self.agent.prevent_arp_spoofing \u003d True"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa1b9901_930a7220","line":1091,"in_reply_to":"fa1b9901_a1a964e1","updated":"2015-08-19 06:51:43.000000000","message":"Done","commit_id":"a844013dd92a82c93e1c9895d42e17ee064b845a"}]}
