)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"73875f16344b41d4969f78d3f32f1fcbae579ef0","unresolved":false,"context_lines":[{"line_number":10,"context_line":"to allocate a floating IP address from the network"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Also should not be able associate a floating IP address with an"},{"line_number":13,"context_line":"IPv6 subnet"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I595f027441a064e2c5e27aaa951ded0f65005196"},{"line_number":16,"context_line":"Closes-bug: 1323766"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"9aa7fdbe_22eca529","line":13,"updated":"2014-10-28 20:01:00.000000000","message":"Since this affects the API, should it have a DocImpact?","commit_id":"1ede5662ce77898d147a51dc48e5b91bdf9f4232"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"6c4e5e8416592f7cf8ba85dbc4ce1fcaa0422320","unresolved":false,"context_lines":[{"line_number":10,"context_line":"to allocate a floating IP address from the network"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Also should not be able associate a floating IP address with an"},{"line_number":13,"context_line":"IPv6 subnet"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I595f027441a064e2c5e27aaa951ded0f65005196"},{"line_number":16,"context_line":"Closes-bug: 1323766"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5a890539_e81b131a","line":13,"in_reply_to":"7a8c0949_bbc04c2b","updated":"2014-11-12 05:21:39.000000000","message":"APIImpact should be the word here.","commit_id":"1ede5662ce77898d147a51dc48e5b91bdf9f4232"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"3d4fe03421717f3ca49be9a9af1278756eb9f692","unresolved":false,"context_lines":[{"line_number":10,"context_line":"to allocate a floating IP address from the network"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Also should not be able associate a floating IP address with an"},{"line_number":13,"context_line":"IPv6 subnet"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I595f027441a064e2c5e27aaa951ded0f65005196"},{"line_number":16,"context_line":"Closes-bug: 1323766"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7a8c0949_bbc04c2b","line":13,"in_reply_to":"9aa7fdbe_22eca529","updated":"2014-11-06 14:57:43.000000000","message":"Agree, a DocImpact at the very least. Isn\u0027t there also a flag in commit messages for API impact?","commit_id":"1ede5662ce77898d147a51dc48e5b91bdf9f4232"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"dd869a698907200929e65bc823d76062d4d7f0d4","unresolved":false,"context_lines":[{"line_number":13,"context_line":"IPv6 subnet"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"DocImpact"},{"line_number":16,"context_line":"APIImpact"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I595f027441a064e2c5e27aaa951ded0f65005196"},{"line_number":19,"context_line":"Closes-bug: 1323766"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_0b5d9e15","line":16,"updated":"2014-11-20 19:31:03.000000000","message":"I may be mis-understanding things here, but the actual API isn\u0027t changing is it? It will now return an error under some circumstances, but that should be covered by DocImpact, no?","commit_id":"d2bfa4429b6ee949a94e186c08a24c631fd84b4f"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"9e1f38a563fbc38b4b315b552ebde5ef2d782bca","unresolved":false,"context_lines":[{"line_number":13,"context_line":"IPv6 subnet"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"DocImpact"},{"line_number":16,"context_line":"APIImpact"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I595f027441a064e2c5e27aaa951ded0f65005196"},{"line_number":19,"context_line":"Closes-bug: 1323766"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_983c7dc1","line":16,"in_reply_to":"5a890539_0b5d9e15","updated":"2014-11-20 23:32:57.000000000","message":"It was mentioned in the previous patchset that it needed an APIImpact. Although the API isn\u0027t changing, the behaviour is as it is no longer possible to assign a floatingip to an ipv6 subnet. I think that is the justification for the APIImpact comment although I am happy to remove it if it is unnecessary","commit_id":"d2bfa4429b6ee949a94e186c08a24c631fd84b4f"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"2b1b2b037dafe2769bc5759cb309d0caf8715716","unresolved":false,"context_lines":[{"line_number":13,"context_line":"IPv6 subnet"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"DocImpact"},{"line_number":16,"context_line":"APIImpact"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I595f027441a064e2c5e27aaa951ded0f65005196"},{"line_number":19,"context_line":"Closes-bug: 1323766"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_c649bfb8","line":16,"in_reply_to":"5a890539_983c7dc1","updated":"2014-11-21 06:38:47.000000000","message":"Thanks. The way you explain it it\u0027s probably best to leave it in.","commit_id":"d2bfa4429b6ee949a94e186c08a24c631fd84b4f"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"dd869a698907200929e65bc823d76062d4d7f0d4","unresolved":false,"context_lines":[{"line_number":558,"context_line":"                if subnet[\u0027ip_version\u0027] \u003d\u003d 4:"},{"line_number":559,"context_line":"                    v4.append(subnet)"},{"line_number":560,"context_line":"                else:"},{"line_number":561,"context_line":"                    if not p[\u0027device_owner\u0027] \u003d\u003d \u0027network:floatingip\u0027:"},{"line_number":562,"context_line":"                        v6.append(subnet)"},{"line_number":563,"context_line":"            for subnet in v6:"},{"line_number":564,"context_line":"                if ipv6_utils.is_slaac_subnet(subnet):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_8be0aefb","line":561,"updated":"2014-11-20 19:31:03.000000000","message":"I wasn\u0027t expecting this. If it\u0027s not too much trouble, can you explain the flow that needs it?","commit_id":"d2bfa4429b6ee949a94e186c08a24c631fd84b4f"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"139a080922dd810a6b5808f3e3f55e157efa74f3","unresolved":false,"context_lines":[{"line_number":558,"context_line":"                if subnet[\u0027ip_version\u0027] \u003d\u003d 4:"},{"line_number":559,"context_line":"                    v4.append(subnet)"},{"line_number":560,"context_line":"                else:"},{"line_number":561,"context_line":"                    if not p[\u0027device_owner\u0027] \u003d\u003d \u0027network:floatingip\u0027:"},{"line_number":562,"context_line":"                        v6.append(subnet)"},{"line_number":563,"context_line":"            for subnet in v6:"},{"line_number":564,"context_line":"                if ipv6_utils.is_slaac_subnet(subnet):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_39484a8a","line":561,"updated":"2014-11-26 20:05:51.000000000","message":"from code design standpoint, base core plugin class can\u0027t depend on constants specific to service plugins.","commit_id":"d2bfa4429b6ee949a94e186c08a24c631fd84b4f"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"2b1b2b037dafe2769bc5759cb309d0caf8715716","unresolved":false,"context_lines":[{"line_number":558,"context_line":"                if subnet[\u0027ip_version\u0027] \u003d\u003d 4:"},{"line_number":559,"context_line":"                    v4.append(subnet)"},{"line_number":560,"context_line":"                else:"},{"line_number":561,"context_line":"                    if not p[\u0027device_owner\u0027] \u003d\u003d \u0027network:floatingip\u0027:"},{"line_number":562,"context_line":"                        v6.append(subnet)"},{"line_number":563,"context_line":"            for subnet in v6:"},{"line_number":564,"context_line":"                if ipv6_utils.is_slaac_subnet(subnet):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_46d5cfb7","line":561,"in_reply_to":"5a890539_38b1c9e1","updated":"2014-11-21 06:38:47.000000000","message":"That explains it, thanks! Consider adding this explanation as a comment here.\n\nUnfortunately if this change is reverted then no unit test fails. I think it would be good to have a test for this flow to prevent regressions.","commit_id":"d2bfa4429b6ee949a94e186c08a24c631fd84b4f"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"7666bb632e722cca251b494c78bf01aca0fdf4e1","unresolved":false,"context_lines":[{"line_number":558,"context_line":"                if subnet[\u0027ip_version\u0027] \u003d\u003d 4:"},{"line_number":559,"context_line":"                    v4.append(subnet)"},{"line_number":560,"context_line":"                else:"},{"line_number":561,"context_line":"                    if not p[\u0027device_owner\u0027] \u003d\u003d \u0027network:floatingip\u0027:"},{"line_number":562,"context_line":"                        v6.append(subnet)"},{"line_number":563,"context_line":"            for subnet in v6:"},{"line_number":564,"context_line":"                if ipv6_utils.is_slaac_subnet(subnet):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_c0635e18","line":561,"in_reply_to":"5a890539_46d5cfb7","updated":"2014-11-21 10:25:53.000000000","message":"Sure that sounds like a good idea, I will add the comment and a UT","commit_id":"d2bfa4429b6ee949a94e186c08a24c631fd84b4f"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"9e1f38a563fbc38b4b315b552ebde5ef2d782bca","unresolved":false,"context_lines":[{"line_number":558,"context_line":"                if subnet[\u0027ip_version\u0027] \u003d\u003d 4:"},{"line_number":559,"context_line":"                    v4.append(subnet)"},{"line_number":560,"context_line":"                else:"},{"line_number":561,"context_line":"                    if not p[\u0027device_owner\u0027] \u003d\u003d \u0027network:floatingip\u0027:"},{"line_number":562,"context_line":"                        v6.append(subnet)"},{"line_number":563,"context_line":"            for subnet in v6:"},{"line_number":564,"context_line":"                if ipv6_utils.is_slaac_subnet(subnet):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_38b1c9e1","line":561,"in_reply_to":"5a890539_8be0aefb","updated":"2014-11-20 23:32:57.000000000","message":"If you have an external network with both ipv6+4 subnets in it will still try and create a floating ip in the v6 subnet. \n\nThis is because in the create_port call in the create_floatingip function you pass in the network id rather than a subnet so the filter for which subnet to create an ip for to has to happen here. \n\nThis statement will simply disregard all v6 subnets when creating floating ips. Hope that answers your question?","commit_id":"d2bfa4429b6ee949a94e186c08a24c631fd84b4f"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"67461a0203e84fa89f7742a9c8032f7bb9ac4916","unresolved":false,"context_lines":[{"line_number":560,"context_line":"                    # Disregard all IPv6 subnets when creating floating ips"},{"line_number":561,"context_line":"                    # this will apply when an external network has both IPv4"},{"line_number":562,"context_line":"                    # and IPv6 subnets"},{"line_number":563,"context_line":"                    if not p[\u0027device_owner\u0027] \u003d\u003d \u0027network:floatingip\u0027:"},{"line_number":564,"context_line":"                        v6.append(subnet)"},{"line_number":565,"context_line":"            for subnet in v6:"},{"line_number":566,"context_line":"                if ipv6_utils.is_auto_address_subnet(subnet):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_f1557a52","line":563,"updated":"2015-01-15 15:16:47.000000000","message":"nit: using \u0027!\u003d\u0027 seem to produce more readable line","commit_id":"b603056b75f3c2e756bdbdf7391e5bb91a687a15"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"bc980146d298cf409d0847dac6e60f7209612a14","unresolved":false,"context_lines":[{"line_number":560,"context_line":"                    # Disregard all IPv6 subnets when creating floating ips"},{"line_number":561,"context_line":"                    # this will apply when an external network has both IPv4"},{"line_number":562,"context_line":"                    # and IPv6 subnets"},{"line_number":563,"context_line":"                    if not p[\u0027device_owner\u0027] \u003d\u003d \u0027network:floatingip\u0027:"},{"line_number":564,"context_line":"                        v6.append(subnet)"},{"line_number":565,"context_line":"            for subnet in v6:"},{"line_number":566,"context_line":"                if ipv6_utils.is_auto_address_subnet(subnet):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_ec449574","line":563,"in_reply_to":"3a961159_f1557a52","updated":"2015-01-15 17:02:35.000000000","message":"Done","commit_id":"b603056b75f3c2e756bdbdf7391e5bb91a687a15"},{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"7424ea69ed9ac82b34b5a78a0b67bd5edb85315b","unresolved":false,"context_lines":[{"line_number":560,"context_line":"                    # Disregard all IPv6 subnets when creating floating ips"},{"line_number":561,"context_line":"                    # this will apply when an external network has both IPv4"},{"line_number":562,"context_line":"                    # and IPv6 subnets"},{"line_number":563,"context_line":"                    if p[\u0027device_owner\u0027] !\u003d \u0027network:floatingip\u0027:"},{"line_number":564,"context_line":"                        v6.append(subnet)"},{"line_number":565,"context_line":"            for subnet in v6:"},{"line_number":566,"context_line":"                if ipv6_utils.is_auto_address_subnet(subnet):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_c016a3f1","line":563,"range":{"start_line":563,"start_character":45,"end_line":563,"end_character":63},"updated":"2015-01-16 09:02:54.000000000","message":"I suggest to use constants.DEVICE_OWNER_FLOATINGIP instead of \u0027network:floatingip\u0027","commit_id":"9ef69612e723ace4b7fa31d44ef4d282f482cfa1"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"810aed5982b67eb4bfbc9061d4c63d9fa8e71d20","unresolved":false,"context_lines":[{"line_number":560,"context_line":"                    # Disregard all IPv6 subnets when creating floating ips"},{"line_number":561,"context_line":"                    # this will apply when an external network has both IPv4"},{"line_number":562,"context_line":"                    # and IPv6 subnets"},{"line_number":563,"context_line":"                    if p[\u0027device_owner\u0027] !\u003d \u0027network:floatingip\u0027:"},{"line_number":564,"context_line":"                        v6.append(subnet)"},{"line_number":565,"context_line":"            for subnet in v6:"},{"line_number":566,"context_line":"                if ipv6_utils.is_auto_address_subnet(subnet):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_9bca3b18","line":563,"in_reply_to":"3a961159_c016a3f1","updated":"2015-01-16 18:23:14.000000000","message":"Done","commit_id":"9ef69612e723ace4b7fa31d44ef4d282f482cfa1"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"5ea83e5681811469771891e4ee0105ca184733ca","unresolved":false,"context_lines":[{"line_number":556,"context_line":"            for subnet in subnets:"},{"line_number":557,"context_line":"                if subnet[\u0027ip_version\u0027] \u003d\u003d 4:"},{"line_number":558,"context_line":"                    v4.append(subnet)"},{"line_number":559,"context_line":"                else:"},{"line_number":560,"context_line":"                    # Disregard all IPv6 subnets when creating floating ips"},{"line_number":561,"context_line":"                    # this will apply when an external network has both IPv4"},{"line_number":562,"context_line":"                    # and IPv6 subnets"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_ae695727","line":559,"updated":"2015-01-20 20:30:46.000000000","message":"Why the full else/if?  \n\nShould use\n\nelif p[\u0027device_owner\u0027] !\u003d constants.DEVICE_OWNER_FLOATINGIP:\n    v6.append(subnet)","commit_id":"5cd323a8975158abfdf42ca02a509753601955af"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"0d43db6031c81f7b0f1cd40d1f4905ac715957b3","unresolved":false,"context_lines":[{"line_number":556,"context_line":"            for subnet in subnets:"},{"line_number":557,"context_line":"                if subnet[\u0027ip_version\u0027] \u003d\u003d 4:"},{"line_number":558,"context_line":"                    v4.append(subnet)"},{"line_number":559,"context_line":"                else:"},{"line_number":560,"context_line":"                    # Disregard all IPv6 subnets when creating floating ips"},{"line_number":561,"context_line":"                    # this will apply when an external network has both IPv4"},{"line_number":562,"context_line":"                    # and IPv6 subnets"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_e299876f","line":559,"in_reply_to":"1a930d6b_7e5ab084","updated":"2015-01-21 22:40:29.000000000","message":"Done","commit_id":"5cd323a8975158abfdf42ca02a509753601955af"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e9bdf39c9f37945bb071002f253e452c2175e3a3","unresolved":false,"context_lines":[{"line_number":556,"context_line":"            for subnet in subnets:"},{"line_number":557,"context_line":"                if subnet[\u0027ip_version\u0027] \u003d\u003d 4:"},{"line_number":558,"context_line":"                    v4.append(subnet)"},{"line_number":559,"context_line":"                else:"},{"line_number":560,"context_line":"                    # Disregard all IPv6 subnets when creating floating ips"},{"line_number":561,"context_line":"                    # this will apply when an external network has both IPv4"},{"line_number":562,"context_line":"                    # and IPv6 subnets"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_7e5ab084","line":559,"in_reply_to":"1a930d6b_ae695727","updated":"2015-01-21 07:51:22.000000000","message":"+1","commit_id":"5cd323a8975158abfdf42ca02a509753601955af"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"22a6ced4549c69153931cbbf9cc51228ff7e7bb5","unresolved":false,"context_lines":[{"line_number":556,"context_line":"            for subnet in subnets:"},{"line_number":557,"context_line":"                if subnet[\u0027ip_version\u0027] \u003d\u003d 4:"},{"line_number":558,"context_line":"                    v4.append(subnet)"},{"line_number":559,"context_line":"                else:"},{"line_number":560,"context_line":"                    # Disregard all IPv6 subnets when creating floating ips"},{"line_number":561,"context_line":"                    # this will apply when an external network has both IPv4"},{"line_number":562,"context_line":"                    # and IPv6 subnets"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_67e39733","line":559,"in_reply_to":"1a930d6b_e299876f","updated":"2015-01-23 18:27:08.000000000","message":"I don\u0027t see this as -1 worthy criticism.  This seems petty to me.","commit_id":"5cd323a8975158abfdf42ca02a509753601955af"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"1605bfdc1026a5c9d4617e538cdc49766eda9efc","unresolved":false,"context_lines":[{"line_number":551,"context_line":"            for subnet in subnets:"},{"line_number":552,"context_line":"                if subnet[\u0027ip_version\u0027] \u003d\u003d 4:"},{"line_number":553,"context_line":"                    v4.append(subnet)"},{"line_number":554,"context_line":"                elif p[\u0027device_owner\u0027] !\u003d constants.DEVICE_OWNER_FLOATINGIP:"},{"line_number":555,"context_line":"                    # Disregard all IPv6 subnets when creating floating ips"},{"line_number":556,"context_line":"                    # this will apply when an external network has both IPv4"},{"line_number":557,"context_line":"                    # and IPv6 subnets"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_f707701b","line":554,"updated":"2015-01-22 13:18:53.000000000","message":"This is failing a unit test. Please investigate.","commit_id":"11a5681cd79091164a0f974a5947a9ef0cdcc9d6"},{"author":{"_account_id":13409,"name":"Andrew Boik","email":"drew.boik@gmail.com","username":"dboik"},"change_message_id":"487ab85ea7e3d0134bf8822a2e8c81edf7d369fc","unresolved":false,"context_lines":[{"line_number":551,"context_line":"            for subnet in subnets:"},{"line_number":552,"context_line":"                if subnet[\u0027ip_version\u0027] \u003d\u003d 4:"},{"line_number":553,"context_line":"                    v4.append(subnet)"},{"line_number":554,"context_line":"                elif p[\u0027device_owner\u0027] !\u003d constants.DEVICE_OWNER_FLOATINGIP:"},{"line_number":555,"context_line":"                    # Disregard all IPv6 subnets when creating floating ips"},{"line_number":556,"context_line":"                    # this will apply when an external network has both IPv4"},{"line_number":557,"context_line":"                    # and IPv6 subnets"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_00cf4f80","line":554,"in_reply_to":"1a930d6b_f707701b","updated":"2015-01-22 16:07:33.000000000","message":"Probably just need to add a device_owner to the port created in the failing unit test in test_db_plugin.py","commit_id":"11a5681cd79091164a0f974a5947a9ef0cdcc9d6"}],"neutron/db/l3_db.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"84a4b7e541bcab2d6798166b805b8de7754e9be1","unresolved":false,"context_lines":[{"line_number":700,"context_line":"            internal_subnet_id \u003d internal_port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"        # Check not trying to associate a floating ip with an ipv6 subnet"},{"line_number":703,"context_line":"        snet \u003d self._core_plugin._get_subnet(context, internal_subnet_id)"},{"line_number":704,"context_line":"        if snet.ip_version \u003d\u003d 6L:"},{"line_number":705,"context_line":"            msg \u003d (_(\u0027Cannot add floating IP to IPv6 subnet (%s)\u0027) %"},{"line_number":706,"context_line":"                   internal_subnet_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_af526c64","line":703,"updated":"2014-10-27 13:57:40.000000000","message":"is there a point to do this check at the end of this method, not in the beginning?","commit_id":"5d7e75a07c94037d82d8fae8e5ed3a00d0f859ef"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"89e5af2e225f988a2f865e665fa336366df8f23a","unresolved":false,"context_lines":[{"line_number":700,"context_line":"            internal_subnet_id \u003d internal_port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"        # Check not trying to associate a floating ip with an ipv6 subnet"},{"line_number":703,"context_line":"        snet \u003d self._core_plugin._get_subnet(context, internal_subnet_id)"},{"line_number":704,"context_line":"        if snet.ip_version \u003d\u003d 6L:"},{"line_number":705,"context_line":"            msg \u003d (_(\u0027Cannot add floating IP to IPv6 subnet (%s)\u0027) %"},{"line_number":706,"context_line":"                   internal_subnet_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_2a890a75","line":703,"in_reply_to":"9aa7fdbe_af526c64","updated":"2014-10-27 14:07:30.000000000","message":"It at the end because it needs the internal_subnet_id var which is declared in the block before","commit_id":"5d7e75a07c94037d82d8fae8e5ed3a00d0f859ef"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"84a4b7e541bcab2d6798166b805b8de7754e9be1","unresolved":false,"context_lines":[{"line_number":773,"context_line":"            msg \u003d _(\"Network %s is not a valid external network\") % f_net_id"},{"line_number":774,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":775,"context_line":""},{"line_number":776,"context_line":"        # Check not creating a floating ip in an ipv6 only network"},{"line_number":777,"context_line":"        f_net \u003d self._core_plugin._get_network(context, f_net_id)"},{"line_number":778,"context_line":"        only_v6 \u003d True"},{"line_number":779,"context_line":"        for subnet in f_net.subnets:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_8f05a847","line":776,"updated":"2014-10-27 13:57:40.000000000","message":"A suggestion: could you extract this block into a separate method and use it here then?","commit_id":"5d7e75a07c94037d82d8fae8e5ed3a00d0f859ef"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"89e5af2e225f988a2f865e665fa336366df8f23a","unresolved":false,"context_lines":[{"line_number":773,"context_line":"            msg \u003d _(\"Network %s is not a valid external network\") % f_net_id"},{"line_number":774,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":775,"context_line":""},{"line_number":776,"context_line":"        # Check not creating a floating ip in an ipv6 only network"},{"line_number":777,"context_line":"        f_net \u003d self._core_plugin._get_network(context, f_net_id)"},{"line_number":778,"context_line":"        only_v6 \u003d True"},{"line_number":779,"context_line":"        for subnet in f_net.subnets:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_cae6be43","line":776,"in_reply_to":"9aa7fdbe_8f05a847","updated":"2014-10-27 14:07:30.000000000","message":"sure will do","commit_id":"5d7e75a07c94037d82d8fae8e5ed3a00d0f859ef"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"84a4b7e541bcab2d6798166b805b8de7754e9be1","unresolved":false,"context_lines":[{"line_number":780,"context_line":"            if subnet.ip_version \u003d\u003d 4L:"},{"line_number":781,"context_line":"                only_v6 \u003d False"},{"line_number":782,"context_line":"        if only_v6:"},{"line_number":783,"context_line":"            msg \u003d _(\"Network %s is only contains IPv6 subnets\") % f_net_id"},{"line_number":784,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":785,"context_line":""},{"line_number":786,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_afd98cf4","line":783,"updated":"2014-10-27 13:57:40.000000000","message":"nit: should be \"Network %s only contains ...\"","commit_id":"5d7e75a07c94037d82d8fae8e5ed3a00d0f859ef"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"89e5af2e225f988a2f865e665fa336366df8f23a","unresolved":false,"context_lines":[{"line_number":780,"context_line":"            if subnet.ip_version \u003d\u003d 4L:"},{"line_number":781,"context_line":"                only_v6 \u003d False"},{"line_number":782,"context_line":"        if only_v6:"},{"line_number":783,"context_line":"            msg \u003d _(\"Network %s is only contains IPv6 subnets\") % f_net_id"},{"line_number":784,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":785,"context_line":""},{"line_number":786,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_6a2312a7","line":783,"in_reply_to":"9aa7fdbe_afd98cf4","updated":"2014-10-27 14:07:30.000000000","message":"Done","commit_id":"5d7e75a07c94037d82d8fae8e5ed3a00d0f859ef"},{"author":{"_account_id":6635,"name":"John Davidge","email":"john.davidge@rackspace.com","username":"john-davidge"},"change_message_id":"6767210826502890efb0f0a7de5a69c0aa60f42e","unresolved":false,"context_lines":[{"line_number":780,"context_line":"            if subnet.ip_version \u003d\u003d 4:"},{"line_number":781,"context_line":"                only_v6 \u003d False"},{"line_number":782,"context_line":"        if only_v6:"},{"line_number":783,"context_line":"            msg \u003d _(\"Network %s is only contains IPv6 subnets\") % f_net_id"},{"line_number":784,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":785,"context_line":""},{"line_number":786,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_eab3824a","line":783,"updated":"2014-10-27 14:06:25.000000000","message":"The \"is\" is not needed.","commit_id":"2a07be1f989ce356a1e4f04402a9bf581066b068"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"4406f8c847173bb86e5e6ac03f16cb21622b7881","unresolved":false,"context_lines":[{"line_number":780,"context_line":"            if subnet.ip_version \u003d\u003d 4:"},{"line_number":781,"context_line":"                only_v6 \u003d False"},{"line_number":782,"context_line":"        if only_v6:"},{"line_number":783,"context_line":"            msg \u003d _(\"Network %s is only contains IPv6 subnets\") % f_net_id"},{"line_number":784,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":785,"context_line":""},{"line_number":786,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_8ac75695","line":783,"in_reply_to":"9aa7fdbe_eab3824a","updated":"2014-10-27 14:07:21.000000000","message":"Done","commit_id":"2a07be1f989ce356a1e4f04402a9bf581066b068"},{"author":{"_account_id":6635,"name":"John Davidge","email":"john.davidge@rackspace.com","username":"john-davidge"},"change_message_id":"03fbb6171c1af4caa42126258962f1d4f3aef2c1","unresolved":false,"context_lines":[{"line_number":767,"context_line":"        only_v6 \u003d True"},{"line_number":768,"context_line":"        for subnet in net.subnets:"},{"line_number":769,"context_line":"            if subnet.ip_version \u003d\u003d 4:"},{"line_number":770,"context_line":"                only_v6 \u003d False"},{"line_number":771,"context_line":"        return only_v6"},{"line_number":772,"context_line":""},{"line_number":773,"context_line":"    def create_floatingip(self, context, floatingip,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa7fdbe_ea52a233","line":770,"updated":"2014-10-27 14:26:06.000000000","message":"Performance suggestion - You could break the loop here to avoid further iterations once only_v6 has been changed to false.","commit_id":"4e75779b84f634fe9c8ee3b712749ee09cc58797"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"dce999c22df89f5efa9c2729a1f5d64b923d8c08","unresolved":false,"context_lines":[{"line_number":767,"context_line":"        only_v6 \u003d True"},{"line_number":768,"context_line":"        for subnet in net.subnets:"},{"line_number":769,"context_line":"            if subnet.ip_version \u003d\u003d 4:"},{"line_number":770,"context_line":"                only_v6 \u003d False"},{"line_number":771,"context_line":"        return only_v6"},{"line_number":772,"context_line":""},{"line_number":773,"context_line":"    def create_floatingip(self, context, floatingip,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa7fdbe_c51cf16c","line":770,"in_reply_to":"9aa7fdbe_ea52a233","updated":"2014-10-27 14:29:11.000000000","message":"good suggestion, done.","commit_id":"4e75779b84f634fe9c8ee3b712749ee09cc58797"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"39ada6cf42493c825575d3f0eecec742d76981c9","unresolved":false,"context_lines":[{"line_number":699,"context_line":"            internal_ip_address \u003d internal_port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"},{"line_number":700,"context_line":"            internal_subnet_id \u003d internal_port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"        # Check not trying to associate a floating IP with an IPv6 subnet"},{"line_number":703,"context_line":"        snet \u003d self._core_plugin._get_subnet(context, internal_subnet_id)"},{"line_number":704,"context_line":"        if snet.ip_version \u003d\u003d 6:"},{"line_number":705,"context_line":"            msg \u003d (_(\u0027Cannot add floating IP to IPv6 subnet (%s)\u0027) %"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa7fdbe_ed9b8563","line":702,"updated":"2014-10-28 09:03:41.000000000","message":"nit: Perhaps it may be better to paraphrase the comment, so it would be something like:\n\n\"Do not try to associate a floating IP with an IPv6 subnet\"","commit_id":"462af0c0fcf12cbc7f7c3ab18ae2c0a2ed61470c"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"ec03a4bd0518577464164ec82ca2020ffc4f0b11","unresolved":false,"context_lines":[{"line_number":699,"context_line":"            internal_ip_address \u003d internal_port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"},{"line_number":700,"context_line":"            internal_subnet_id \u003d internal_port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"        # Check not trying to associate a floating IP with an IPv6 subnet"},{"line_number":703,"context_line":"        snet \u003d self._core_plugin._get_subnet(context, internal_subnet_id)"},{"line_number":704,"context_line":"        if snet.ip_version \u003d\u003d 6:"},{"line_number":705,"context_line":"            msg \u003d (_(\u0027Cannot add floating IP to IPv6 subnet (%s)\u0027) %"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa7fdbe_8b34974a","line":702,"in_reply_to":"9aa7fdbe_ed9b8563","updated":"2014-10-28 18:08:20.000000000","message":"Done","commit_id":"462af0c0fcf12cbc7f7c3ab18ae2c0a2ed61470c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0c85814c36bb150daccca7c57a25fdcc922a566d","unresolved":false,"context_lines":[{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    def _ipv6_only_network(self, context, net_id):"},{"line_number":766,"context_line":"        net \u003d self._core_plugin._get_network(context, net_id)"},{"line_number":767,"context_line":"        for subnet in net.subnets:"},{"line_number":768,"context_line":"            if subnet.ip_version \u003d\u003d 4:"},{"line_number":769,"context_line":"                return False"},{"line_number":770,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa7fdbe_b60b927b","line":767,"updated":"2014-10-28 03:23:25.000000000","message":"This will return True if there are no subnets. Adjust to only return true if there are only IPv6 subnets.","commit_id":"462af0c0fcf12cbc7f7c3ab18ae2c0a2ed61470c"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"ec03a4bd0518577464164ec82ca2020ffc4f0b11","unresolved":false,"context_lines":[{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    def _ipv6_only_network(self, context, net_id):"},{"line_number":766,"context_line":"        net \u003d self._core_plugin._get_network(context, net_id)"},{"line_number":767,"context_line":"        for subnet in net.subnets:"},{"line_number":768,"context_line":"            if subnet.ip_version \u003d\u003d 4:"},{"line_number":769,"context_line":"                return False"},{"line_number":770,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa7fdbe_0be427aa","line":767,"in_reply_to":"9aa7fdbe_b60b927b","updated":"2014-10-28 18:08:20.000000000","message":"Done","commit_id":"462af0c0fcf12cbc7f7c3ab18ae2c0a2ed61470c"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"39ada6cf42493c825575d3f0eecec742d76981c9","unresolved":false,"context_lines":[{"line_number":780,"context_line":"            msg \u003d _(\"Network %s is not a valid external network\") % f_net_id"},{"line_number":781,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":782,"context_line":""},{"line_number":783,"context_line":"        # Check not creating a floating IP in an IPv6 only network"},{"line_number":784,"context_line":"        if self._ipv6_only_network(context, f_net_id):"},{"line_number":785,"context_line":"            msg \u003d _(\"Network %s only contains IPv6 subnets\") % f_net_id"},{"line_number":786,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa7fdbe_8de039ce","line":783,"updated":"2014-10-28 09:03:41.000000000","message":"Same nit as for L702\n\n\"Do not create a floating IP in an IPv6 only network\"","commit_id":"462af0c0fcf12cbc7f7c3ab18ae2c0a2ed61470c"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"ec03a4bd0518577464164ec82ca2020ffc4f0b11","unresolved":false,"context_lines":[{"line_number":780,"context_line":"            msg \u003d _(\"Network %s is not a valid external network\") % f_net_id"},{"line_number":781,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":782,"context_line":""},{"line_number":783,"context_line":"        # Check not creating a floating IP in an IPv6 only network"},{"line_number":784,"context_line":"        if self._ipv6_only_network(context, f_net_id):"},{"line_number":785,"context_line":"            msg \u003d _(\"Network %s only contains IPv6 subnets\") % f_net_id"},{"line_number":786,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa7fdbe_8b59f78f","line":783,"in_reply_to":"9aa7fdbe_8de039ce","updated":"2014-10-28 18:08:20.000000000","message":"Done","commit_id":"462af0c0fcf12cbc7f7c3ab18ae2c0a2ed61470c"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"0a912c06998fb1c504a519f45c237afd408c575f","unresolved":false,"context_lines":[{"line_number":765,"context_line":"    def _ipv6_only_network(self, context, net_id):"},{"line_number":766,"context_line":"        net \u003d self._core_plugin._get_network(context, net_id)"},{"line_number":767,"context_line":"        only_v6 \u003d False"},{"line_number":768,"context_line":"        for subnet in net.subnets:"},{"line_number":769,"context_line":"            if subnet.ip_version \u003d\u003d 4:"},{"line_number":770,"context_line":"                return False"},{"line_number":771,"context_line":"            elif subnet.ip_version \u003d\u003d 6:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_3185d559","line":768,"updated":"2014-10-28 18:15:43.000000000","message":"collapse 767-773 to:\n return all(s.ip_version \u003d\u003d 6 for s in net.subnets)","commit_id":"03201764d2c4cdffc78c1b1fd5d4d3c203269a3e"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"0bee7bff198998540f3b1478f40d97c85c57e490","unresolved":false,"context_lines":[{"line_number":765,"context_line":"    def _ipv6_only_network(self, context, net_id):"},{"line_number":766,"context_line":"        net \u003d self._core_plugin._get_network(context, net_id)"},{"line_number":767,"context_line":"        only_v6 \u003d False"},{"line_number":768,"context_line":"        for subnet in net.subnets:"},{"line_number":769,"context_line":"            if subnet.ip_version \u003d\u003d 4:"},{"line_number":770,"context_line":"                return False"},{"line_number":771,"context_line":"            elif subnet.ip_version \u003d\u003d 6:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_91d3e1d3","line":768,"in_reply_to":"9aa7fdbe_3185d559","updated":"2014-10-28 18:31:44.000000000","message":"+1\n\nFor the reference:\nhttps://docs.python.org/2/library/functions.html","commit_id":"03201764d2c4cdffc78c1b1fd5d4d3c203269a3e"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"aa34a06ecd712917bb6b4e124fca44e04e065c51","unresolved":false,"context_lines":[{"line_number":765,"context_line":"    def _ipv6_only_network(self, context, net_id):"},{"line_number":766,"context_line":"        net \u003d self._core_plugin._get_network(context, net_id)"},{"line_number":767,"context_line":"        only_v6 \u003d False"},{"line_number":768,"context_line":"        for subnet in net.subnets:"},{"line_number":769,"context_line":"            if subnet.ip_version \u003d\u003d 4:"},{"line_number":770,"context_line":"                return False"},{"line_number":771,"context_line":"            elif subnet.ip_version \u003d\u003d 6:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_44eff91d","line":768,"in_reply_to":"9aa7fdbe_3185d559","updated":"2014-10-28 18:40:36.000000000","message":"Done","commit_id":"03201764d2c4cdffc78c1b1fd5d4d3c203269a3e"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"aa34a06ecd712917bb6b4e124fca44e04e065c51","unresolved":false,"context_lines":[{"line_number":765,"context_line":"    def _ipv6_only_network(self, context, net_id):"},{"line_number":766,"context_line":"        net \u003d self._core_plugin._get_network(context, net_id)"},{"line_number":767,"context_line":"        only_v6 \u003d False"},{"line_number":768,"context_line":"        for subnet in net.subnets:"},{"line_number":769,"context_line":"            if subnet.ip_version \u003d\u003d 4:"},{"line_number":770,"context_line":"                return False"},{"line_number":771,"context_line":"            elif subnet.ip_version \u003d\u003d 6:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_24ecb529","line":768,"in_reply_to":"9aa7fdbe_91d3e1d3","updated":"2014-10-28 18:40:36.000000000","message":"Done","commit_id":"03201764d2c4cdffc78c1b1fd5d4d3c203269a3e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"73875f16344b41d4969f78d3f32f1fcbae579ef0","unresolved":false,"context_lines":[{"line_number":699,"context_line":"            internal_ip_address \u003d internal_port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"},{"line_number":700,"context_line":"            internal_subnet_id \u003d internal_port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"        # Do not try to associate a floating IP with an IPv6 subnet"},{"line_number":703,"context_line":"        snet \u003d self._core_plugin._get_subnet(context, internal_subnet_id)"},{"line_number":704,"context_line":"        if snet.ip_version \u003d\u003d 6:"},{"line_number":705,"context_line":"            msg \u003d (_(\u0027Cannot add floating IP to IPv6 subnet (%s)\u0027) %"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa7fdbe_8270f1a4","line":702,"updated":"2014-10-28 20:01:00.000000000","message":"(no action required)  Just thinking out loud here...\n\nWould it be a little more future proof to check that the floating IP version is the same as the internal_ip_address version?  I don\u0027t know if we\u0027ll have NAT66 or not.  I also don\u0027t know what sort of other crazy NATing we may or may not support in the future.  So, I\u0027m not going to require any kind of change here.\n\nIt is just that this code seems a little too close-minded.  I sort of want something like this:\n\n  if not compatible(fip, internal_ip_address)\n      raise ...","commit_id":"1ede5662ce77898d147a51dc48e5b91bdf9f4232"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"e034e4540d233bc4a364d1654d9186d66cf52adf","unresolved":false,"context_lines":[{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    def _ipv6_only_network(self, context, net_id):"},{"line_number":766,"context_line":"        net \u003d self._core_plugin._get_network(context, net_id)"},{"line_number":767,"context_line":"        return all(s.ip_version \u003d\u003d 6 for s in net.subnets)"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"    def create_floatingip(self, context, floatingip,"},{"line_number":770,"context_line":"            initial_status\u003dl3_constants.FLOATINGIP_STATUS_ACTIVE):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa7fdbe_e4c62d67","line":767,"updated":"2014-10-28 18:48:45.000000000","message":"Just realised this will now return True if the list is empty which as mentioned by Kevin in patch set 5 shouldn\u0027t happen","commit_id":"1ede5662ce77898d147a51dc48e5b91bdf9f4232"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"4fe8f036d05cb794a194fa536c413fc261c7ab3b","unresolved":false,"context_lines":[{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    def _ipv6_only_network(self, context, net_id):"},{"line_number":766,"context_line":"        net \u003d self._core_plugin._get_network(context, net_id)"},{"line_number":767,"context_line":"        return all(s.ip_version \u003d\u003d 6 for s in net.subnets)"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"    def create_floatingip(self, context, floatingip,"},{"line_number":770,"context_line":"            initial_status\u003dl3_constants.FLOATINGIP_STATUS_ACTIVE):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_936c7638","line":767,"in_reply_to":"9aa7fdbe_c7ce8b59","updated":"2014-11-20 15:48:50.000000000","message":"Done","commit_id":"1ede5662ce77898d147a51dc48e5b91bdf9f4232"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"73875f16344b41d4969f78d3f32f1fcbae579ef0","unresolved":false,"context_lines":[{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    def _ipv6_only_network(self, context, net_id):"},{"line_number":766,"context_line":"        net \u003d self._core_plugin._get_network(context, net_id)"},{"line_number":767,"context_line":"        return all(s.ip_version \u003d\u003d 6 for s in net.subnets)"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"    def create_floatingip(self, context, floatingip,"},{"line_number":770,"context_line":"            initial_status\u003dl3_constants.FLOATINGIP_STATUS_ACTIVE):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa7fdbe_c7ce8b59","line":767,"in_reply_to":"9aa7fdbe_e4c62d67","updated":"2014-10-28 20:01:00.000000000","message":"Any easy fix is just to add this before this line:\n\nif not net.subnets:\n    return False","commit_id":"1ede5662ce77898d147a51dc48e5b91bdf9f4232"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"e6b365111bd8774806284fcb1b1c0716f25ad666","unresolved":false,"context_lines":[{"line_number":799,"context_line":"            # Ensure IP addresses are allocated on external port"},{"line_number":800,"context_line":"            if not external_port[\u0027fixed_ips\u0027]:"},{"line_number":801,"context_line":"                raise n_exc.ExternalIpAddressExhausted(net_id\u003df_net_id)"},{"line_number":802,"context_line":""},{"line_number":803,"context_line":"            floating_fixed_ip \u003d external_port[\u0027fixed_ips\u0027][0]"},{"line_number":804,"context_line":"            floating_ip_address \u003d floating_fixed_ip[\u0027ip_address\u0027]"},{"line_number":805,"context_line":"            floatingip_db \u003d FloatingIP("}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa7fdbe_f267c6b5","line":802,"updated":"2014-10-28 22:55:33.000000000","message":"A couple of issues with the above port-create:\n       . it creates an IP from the ipv4 subnet, and it also creates an IP from the ipv6 subnet if one exists\n       . it\u0027s possible that external_port[\u0027fixed_ips\u0027][0] contains an ipv6 address. You may be able to recreate this by creating a floatingip in a public net with subnets 1000::/64 and 20.0.0.0/24. \n\nA possible fix is to check the port owner in the port-create, And if the owner is FLOATING_IP, allocates a IPv4 fixed IP only.","commit_id":"1ede5662ce77898d147a51dc48e5b91bdf9f4232"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"4fe8f036d05cb794a194fa536c413fc261c7ab3b","unresolved":false,"context_lines":[{"line_number":799,"context_line":"            # Ensure IP addresses are allocated on external port"},{"line_number":800,"context_line":"            if not external_port[\u0027fixed_ips\u0027]:"},{"line_number":801,"context_line":"                raise n_exc.ExternalIpAddressExhausted(net_id\u003df_net_id)"},{"line_number":802,"context_line":""},{"line_number":803,"context_line":"            floating_fixed_ip \u003d external_port[\u0027fixed_ips\u0027][0]"},{"line_number":804,"context_line":"            floating_ip_address \u003d floating_fixed_ip[\u0027ip_address\u0027]"},{"line_number":805,"context_line":"            floatingip_db \u003d FloatingIP("}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_9671c479","line":802,"in_reply_to":"5a890539_eb214dfd","updated":"2014-11-20 15:48:50.000000000","message":"Done","commit_id":"1ede5662ce77898d147a51dc48e5b91bdf9f4232"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"6c4e5e8416592f7cf8ba85dbc4ce1fcaa0422320","unresolved":false,"context_lines":[{"line_number":799,"context_line":"            # Ensure IP addresses are allocated on external port"},{"line_number":800,"context_line":"            if not external_port[\u0027fixed_ips\u0027]:"},{"line_number":801,"context_line":"                raise n_exc.ExternalIpAddressExhausted(net_id\u003df_net_id)"},{"line_number":802,"context_line":""},{"line_number":803,"context_line":"            floating_fixed_ip \u003d external_port[\u0027fixed_ips\u0027][0]"},{"line_number":804,"context_line":"            floating_ip_address \u003d floating_fixed_ip[\u0027ip_address\u0027]"},{"line_number":805,"context_line":"            floatingip_db \u003d FloatingIP("}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_eb214dfd","line":802,"in_reply_to":"9aa7fdbe_f267c6b5","updated":"2014-11-12 05:21:39.000000000","message":"+1. This should be taken care by _allocate_ips_for_port in db_base_plugin_v2.py","commit_id":"1ede5662ce77898d147a51dc48e5b91bdf9f4232"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"67461a0203e84fa89f7742a9c8032f7bb9ac4916","unresolved":false,"context_lines":[{"line_number":757,"context_line":"        # Do not try to associate a floating IP with an IPv6 subnet"},{"line_number":758,"context_line":"        snet \u003d self._core_plugin._get_subnet(context, internal_subnet_id)"},{"line_number":759,"context_line":"        if snet.ip_version \u003d\u003d 6:"},{"line_number":760,"context_line":"            msg \u003d (_(\u0027Cannot add floating IP to IPv6 subnet (%s)\u0027) %"},{"line_number":761,"context_line":"                   internal_subnet_id)"},{"line_number":762,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":763,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_d8ab176f","line":760,"updated":"2015-01-15 15:16:47.000000000","message":"i think wording doesn\u0027t properly reflect what the issue is.\n\nmay be \"Cannot associate floating IP to port on ipv6 subnet\"?","commit_id":"b603056b75f3c2e756bdbdf7391e5bb91a687a15"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"bc980146d298cf409d0847dac6e60f7209612a14","unresolved":false,"context_lines":[{"line_number":757,"context_line":"        # Do not try to associate a floating IP with an IPv6 subnet"},{"line_number":758,"context_line":"        snet \u003d self._core_plugin._get_subnet(context, internal_subnet_id)"},{"line_number":759,"context_line":"        if snet.ip_version \u003d\u003d 6:"},{"line_number":760,"context_line":"            msg \u003d (_(\u0027Cannot add floating IP to IPv6 subnet (%s)\u0027) %"},{"line_number":761,"context_line":"                   internal_subnet_id)"},{"line_number":762,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":763,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_273dd6bb","line":760,"in_reply_to":"3a961159_d8ab176f","updated":"2015-01-15 17:02:35.000000000","message":"Done","commit_id":"b603056b75f3c2e756bdbdf7391e5bb91a687a15"},{"author":{"_account_id":6635,"name":"John Davidge","email":"john.davidge@rackspace.com","username":"john-davidge"},"change_message_id":"c27db4f4831ead59dffde4be700c06a93b3fbd3e","unresolved":false,"context_lines":[{"line_number":757,"context_line":"        # Do not try to associate a floating IP with an IPv6 subnet"},{"line_number":758,"context_line":"        snet \u003d self._core_plugin._get_subnet(context, internal_subnet_id)"},{"line_number":759,"context_line":"        if snet.ip_version \u003d\u003d 6:"},{"line_number":760,"context_line":"            msg \u003d (_(\u0027Cannot associate floating IP to port on IPv6 subnet\u0027"},{"line_number":761,"context_line":"                     \u0027(%s)\u0027) %"},{"line_number":762,"context_line":"                   internal_subnet_id)"},{"line_number":763,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_7936a2b5","line":760,"updated":"2015-01-15 17:33:12.000000000","message":"nit: \"Cannot associate floating IP with port on IPv6 subnet\" sounds better I think.","commit_id":"dd10eb58fcaff3f13a64539f1c38f54ffdf3c51a"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"9ab52648a22dac9e79218a829e2354e06f017e93","unresolved":false,"context_lines":[{"line_number":757,"context_line":"        # Do not try to associate a floating IP with an IPv6 subnet"},{"line_number":758,"context_line":"        snet \u003d self._core_plugin._get_subnet(context, internal_subnet_id)"},{"line_number":759,"context_line":"        if snet.ip_version \u003d\u003d 6:"},{"line_number":760,"context_line":"            msg \u003d (_(\u0027Cannot associate floating IP to port on IPv6 subnet\u0027"},{"line_number":761,"context_line":"                     \u0027(%s)\u0027) %"},{"line_number":762,"context_line":"                   internal_subnet_id)"},{"line_number":763,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_99098edf","line":760,"in_reply_to":"3a961159_7936a2b5","updated":"2015-01-15 17:35:28.000000000","message":"Done","commit_id":"dd10eb58fcaff3f13a64539f1c38f54ffdf3c51a"},{"author":{"_account_id":6635,"name":"John Davidge","email":"john.davidge@rackspace.com","username":"john-davidge"},"change_message_id":"c27db4f4831ead59dffde4be700c06a93b3fbd3e","unresolved":false,"context_lines":[{"line_number":758,"context_line":"        snet \u003d self._core_plugin._get_subnet(context, internal_subnet_id)"},{"line_number":759,"context_line":"        if snet.ip_version \u003d\u003d 6:"},{"line_number":760,"context_line":"            msg \u003d (_(\u0027Cannot associate floating IP to port on IPv6 subnet\u0027"},{"line_number":761,"context_line":"                     \u0027(%s)\u0027) %"},{"line_number":762,"context_line":"                   internal_subnet_id)"},{"line_number":763,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":764,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_f9c29284","line":761,"updated":"2015-01-15 17:33:12.000000000","message":"need a space here between \u0027 and (","commit_id":"dd10eb58fcaff3f13a64539f1c38f54ffdf3c51a"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"9ab52648a22dac9e79218a829e2354e06f017e93","unresolved":false,"context_lines":[{"line_number":758,"context_line":"        snet \u003d self._core_plugin._get_subnet(context, internal_subnet_id)"},{"line_number":759,"context_line":"        if snet.ip_version \u003d\u003d 6:"},{"line_number":760,"context_line":"            msg \u003d (_(\u0027Cannot associate floating IP to port on IPv6 subnet\u0027"},{"line_number":761,"context_line":"                     \u0027(%s)\u0027) %"},{"line_number":762,"context_line":"                   internal_subnet_id)"},{"line_number":763,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":764,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_b90acace","line":761,"in_reply_to":"3a961159_f9c29284","updated":"2015-01-15 17:35:28.000000000","message":"Done","commit_id":"dd10eb58fcaff3f13a64539f1c38f54ffdf3c51a"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c960a1794465953882d5be5405e3b6150fcd3986","unresolved":false,"context_lines":[{"line_number":751,"context_line":"            internal_subnet_id \u003d internal_port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":752,"context_line":""},{"line_number":753,"context_line":"        # Do not try to associate a floating IP with an IPv6 subnet"},{"line_number":754,"context_line":"        snet \u003d self._core_plugin._get_subnet(context, internal_subnet_id)"},{"line_number":755,"context_line":"        if snet.ip_version \u003d\u003d 6:"},{"line_number":756,"context_line":"            msg \u003d (_(\u0027Cannot associate floating IP with port on IPv6 subnet\u0027"},{"line_number":757,"context_line":"                     \u0027 (%s)\u0027) % internal_subnet_id)"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba7be1f8_a19d3b0c","line":754,"updated":"2015-02-25 15:04:53.000000000","message":"Can we avoid call to core plugin by using netaddr.IPAddress(internal_ip_address).version here?","commit_id":"11a5681cd79091164a0f974a5947a9ef0cdcc9d6"},{"author":{"_account_id":13702,"name":"yushiro","username":"yushiro","inactive":true},"change_message_id":"d46ee9177f078f920d07b87a56c6bf237801c35f","unresolved":false,"context_lines":[{"line_number":852,"context_line":"            internal_subnet_id \u003d internal_port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"        # Do not try to associate a floating IP with an IPv6 subnet"},{"line_number":855,"context_line":"        snet \u003d self._core_plugin._get_subnet(context, internal_subnet_id)"},{"line_number":856,"context_line":"        if snet.ip_version \u003d\u003d 6:"},{"line_number":857,"context_line":"            msg \u003d (_(\u0027Cannot associate floating IP with port on IPv6 subnet\u0027"},{"line_number":858,"context_line":"                     \u0027 (%s)\u0027) % internal_subnet_id)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a41bdd9_8bcd1987","line":855,"updated":"2015-07-15 00:50:08.000000000","message":"1 very nit comment.  It\u0027s more easy to understand \"subnet\".","commit_id":"0ce46d9b891e6c22b701019b21ab6fd60c70c963"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bcef193a902189627a3bd07dc3f2d23062f65471","unresolved":false,"context_lines":[{"line_number":961,"context_line":"            if not external_port[\u0027fixed_ips\u0027]:"},{"line_number":962,"context_line":"                raise n_exc.ExternalIpAddressExhausted(net_id\u003df_net_id)"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"            floating_fixed_ip \u003d external_port[\u0027fixed_ips\u0027][0]"},{"line_number":965,"context_line":"            floating_ip_address \u003d floating_fixed_ip[\u0027ip_address\u0027]"},{"line_number":966,"context_line":"            floatingip_db \u003d FloatingIP("},{"line_number":967,"context_line":"                id\u003dfip_id,"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_2c709c3f","line":964,"updated":"2015-07-08 16:56:00.000000000","message":"Are we guaranteed that this will be an ipv4 address at this point?  Even if we are, I\u0027m not really comfortable with just selecting [0] from here.","commit_id":"0ce46d9b891e6c22b701019b21ab6fd60c70c963"}],"neutron/tests/unit/test_l3_plugin.py":[{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"22c3fa93b9f28a05bc2ad3f2b81e5d9e1c1f7930","unresolved":false,"context_lines":[{"line_number":1352,"context_line":"            self.assertIsNotNone(body[\u0027floatingip\u0027][\u0027fixed_ip_address\u0027])"},{"line_number":1353,"context_line":"            self.assertIsNotNone(body[\u0027floatingip\u0027][\u0027router_id\u0027])"},{"line_number":1354,"context_line":""},{"line_number":1355,"context_line":"    def test_create_floatingip_with_assoc_to_ipv6_subnet(self):"},{"line_number":1356,"context_line":"        with self.subnet() as public_sub:"},{"line_number":1357,"context_line":"            self._set_net_external(public_sub[\u0027subnet\u0027][\u0027network_id\u0027])"},{"line_number":1358,"context_line":"            with self.subnet(cidr\u003d\"2001:DB8::/48\","}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_04e09124","line":1355,"updated":"2014-11-26 14:05:21.000000000","message":"This is a similar negative test as test_create_floatingip_ipv6_only_network_returns_400.\n\nConsider grouping them together","commit_id":"d2bfa4429b6ee949a94e186c08a24c631fd84b4f"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"fcbb0989461126a7d38581576a483f3a1f1ba8e4","unresolved":false,"context_lines":[{"line_number":1886,"context_line":"                self.assertEqual(fip[\u0027floatingip\u0027][\u0027floating_ip_address\u0027],"},{"line_number":1887,"context_line":"                                 \u0027192.168.1.2\u0027)"},{"line_number":1888,"context_line":""},{"line_number":1889,"context_line":"    def test_create_floatingip_with_assoc_to_ipv6_subnet(self):"},{"line_number":1890,"context_line":"        with self.subnet() as public_sub:"},{"line_number":1891,"context_line":"            self._set_net_external(public_sub[\u0027subnet\u0027][\u0027network_id\u0027])"},{"line_number":1892,"context_line":"            with self.subnet(cidr\u003d\"2001:DB8::/48\","}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_2c544f20","line":1889,"updated":"2015-01-22 13:16:23.000000000","message":"nit: ..._returns_400","commit_id":"11a5681cd79091164a0f974a5947a9ef0cdcc9d6"}]}
