)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"7c732bd221670752f466177dc23d389f1dd8c1ae","unresolved":false,"context_lines":[{"line_number":11,"context_line":"okay that it doesn\u0027t have any IP addresses."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In Neutron, an unaddressed port is one that was created by explicitly"},{"line_number":14,"context_line":"passing [] to create the port.  A new DB field is added to the port to"},{"line_number":15,"context_line":"distinguish the unaddressed port case from the deferred IP allocation"},{"line_number":16,"context_line":"case where routed networks is involved."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_a678e32c","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":20},"updated":"2016-08-26 23:21:27.000000000","message":"I think you meant \u0027passing [] in fixed_ips to create the port\u0027","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1f3e3d70766aa2cdfdecb30766926863c724245d","unresolved":false,"context_lines":[{"line_number":11,"context_line":"okay that it doesn\u0027t have any IP addresses."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In Neutron, an unaddressed port is one that was created by explicitly"},{"line_number":14,"context_line":"passing [] to create the port.  A new DB field is added to the port to"},{"line_number":15,"context_line":"distinguish the unaddressed port case from the deferred IP allocation"},{"line_number":16,"context_line":"case where routed networks is involved."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_0e978c48","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":20},"in_reply_to":"fa7ab95a_a678e32c","updated":"2016-08-29 20:40:16.000000000","message":"Yes, that is clearer. Done.","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"56c24bdb26d74fb2498a5f0ed3642e3b7bbf84f0","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Mark unaddressed ports with none in ip_allocation field"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is the Neutron side of the unaddressed ports blueprint. In order"},{"line_number":10,"context_line":"to allow unaddressed ports, Nova wants the port to explicit say it is"},{"line_number":11,"context_line":"okay that it doesn\u0027t have any IP addresses."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In Neutron, an unaddressed port is one that was created by explicitly"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9a89bdaa_f8b97516","line":10,"range":{"start_line":10,"start_character":51,"end_line":10,"end_character":59},"updated":"2016-09-06 22:50:08.000000000","message":"Nit: s/explicit/explicitly","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"52d3b765b22c0a1ea7481e2f6303aaf0f120ec5d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Mark unaddressed ports with none in ip_allocation field"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is the Neutron side of the unaddressed ports blueprint. In order"},{"line_number":10,"context_line":"to allow unaddressed ports, Nova wants the port to explicit say it is"},{"line_number":11,"context_line":"okay that it doesn\u0027t have any IP addresses."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In Neutron, an unaddressed port is one that was created by explicitly"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9a89bdaa_43332862","line":10,"range":{"start_line":10,"start_character":51,"end_line":10,"end_character":59},"in_reply_to":"9a89bdaa_f8b97516","updated":"2016-09-07 15:44:45.000000000","message":"Good eye. Will fix it if I need another patch set.","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"7c732bd221670752f466177dc23d389f1dd8c1ae","unresolved":false,"context_lines":[{"line_number":1158,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_IMMEDIATE"},{"line_number":1159,"context_line":"            except ipam_exc.DeferIpam:"},{"line_number":1160,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_DEFERRED"},{"line_number":1161,"context_line":"            fixed_ips \u003d port[\u0027port\u0027][\u0027fixed_ips\u0027]"},{"line_number":1162,"context_line":"            if validators.is_attr_set(fixed_ips) and not fixed_ips:"},{"line_number":1163,"context_line":"                # [] was passed explicitly as fixed_ips. An unaddressed port."},{"line_number":1164,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_NONE"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_483ba538","line":1161,"range":{"start_line":1161,"start_character":24,"end_line":1161,"end_character":49},"updated":"2016-08-26 23:21:27.000000000","message":"Consider: p[\u0027fixed_ips\u0027]","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1f3e3d70766aa2cdfdecb30766926863c724245d","unresolved":false,"context_lines":[{"line_number":1158,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_IMMEDIATE"},{"line_number":1159,"context_line":"            except ipam_exc.DeferIpam:"},{"line_number":1160,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_DEFERRED"},{"line_number":1161,"context_line":"            fixed_ips \u003d port[\u0027port\u0027][\u0027fixed_ips\u0027]"},{"line_number":1162,"context_line":"            if validators.is_attr_set(fixed_ips) and not fixed_ips:"},{"line_number":1163,"context_line":"                # [] was passed explicitly as fixed_ips. An unaddressed port."},{"line_number":1164,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_NONE"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_b58604d9","line":1161,"range":{"start_line":1161,"start_character":24,"end_line":1161,"end_character":49},"in_reply_to":"fa7ab95a_483ba538","updated":"2016-08-29 20:40:16.000000000","message":"Ah! Good eye. I\u0027ll do that since the shortcut to port[\u0027port\u0027] has already been established.","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"ba1d5e0334301b9cab64be4d61b3743504b9f023","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"            except ipam_exc.DeferIpam:"},{"line_number":1160,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_DEFERRED"},{"line_number":1161,"context_line":"            fixed_ips \u003d port[\u0027port\u0027][\u0027fixed_ips\u0027]"},{"line_number":1162,"context_line":"            if validators.is_attr_set(fixed_ips) and not fixed_ips:"},{"line_number":1163,"context_line":"                # [] was passed explicitly as fixed_ips. An unaddressed port."},{"line_number":1164,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_NONE"},{"line_number":1165,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_643fbbd6","line":1162,"range":{"start_line":1162,"start_character":49,"end_line":1162,"end_character":66},"updated":"2016-08-26 20:38:11.000000000","message":"Do you need to verify `fixed_ips` again? According to this [1] `is_attr_set` already validates `fixed_ips`.\n\n[1] https://github.com/openstack/neutron-lib/blob/0.4.0/neutron_lib/api/validators.py#L69","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"006df17d5fa58c7e25d32f5b7e504f3d2d9eed30","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"            except ipam_exc.DeferIpam:"},{"line_number":1160,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_DEFERRED"},{"line_number":1161,"context_line":"            fixed_ips \u003d port[\u0027port\u0027][\u0027fixed_ips\u0027]"},{"line_number":1162,"context_line":"            if validators.is_attr_set(fixed_ips) and not fixed_ips:"},{"line_number":1163,"context_line":"                # [] was passed explicitly as fixed_ips. An unaddressed port."},{"line_number":1164,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_NONE"},{"line_number":1165,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_994ed394","line":1162,"range":{"start_line":1162,"start_character":49,"end_line":1162,"end_character":66},"in_reply_to":"fa7ab95a_085b5d2f","updated":"2016-08-27 21:24:43.000000000","message":"Thanks for explanation.","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"7c732bd221670752f466177dc23d389f1dd8c1ae","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"            except ipam_exc.DeferIpam:"},{"line_number":1160,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_DEFERRED"},{"line_number":1161,"context_line":"            fixed_ips \u003d port[\u0027port\u0027][\u0027fixed_ips\u0027]"},{"line_number":1162,"context_line":"            if validators.is_attr_set(fixed_ips) and not fixed_ips:"},{"line_number":1163,"context_line":"                # [] was passed explicitly as fixed_ips. An unaddressed port."},{"line_number":1164,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_NONE"},{"line_number":1165,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_085b5d2f","line":1162,"range":{"start_line":1162,"start_character":49,"end_line":1162,"end_character":66},"in_reply_to":"fa7ab95a_643fbbd6","updated":"2016-08-26 23:21:27.000000000","message":"The right hand side in the and operation is actually needed. The left hand size checks that something was passed to the api in fixed_ips. The right hand side checks that what was passed to the api is an empty list","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"11d2a979709eadf9e22e04f9b15ea6ce907a157c","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"            except ipam_exc.DeferIpam:"},{"line_number":1160,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_DEFERRED"},{"line_number":1161,"context_line":"            fixed_ips \u003d port[\u0027port\u0027][\u0027fixed_ips\u0027]"},{"line_number":1162,"context_line":"            if validators.is_attr_set(fixed_ips) and not fixed_ips:"},{"line_number":1163,"context_line":"                # [] was passed explicitly as fixed_ips. An unaddressed port."},{"line_number":1164,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_NONE"},{"line_number":1165,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_c877b59d","line":1162,"range":{"start_line":1162,"start_character":49,"end_line":1162,"end_character":66},"in_reply_to":"fa7ab95a_643fbbd6","updated":"2016-08-26 22:43:55.000000000","message":"Yes, is_attr_set doesn\u0027t check for []. I guess maybe I should check explicitly for an empty list instead of using this boolean context to catch it. But, this is the way that pep8 suggests [1] checking for an empty list.\n\n [1] https://www.python.org/dev/peps/pep-0008/#id49 (search for sequences)","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"cc30f548d63366d042462b9e49dc40c2328cc820","unresolved":false,"context_lines":[{"line_number":1153,"context_line":"            fixed_ips \u003d p[\u0027fixed_ips\u0027]"},{"line_number":1154,"context_line":"            if validators.is_attr_set(fixed_ips) and not fixed_ips:"},{"line_number":1155,"context_line":"                # [] was passed explicitly as fixed_ips. An unaddressed port."},{"line_number":1156,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_NONE"},{"line_number":1157,"context_line":""},{"line_number":1158,"context_line":"        return db_port"},{"line_number":1159,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_b60300be","line":1156,"updated":"2016-08-31 01:18:03.000000000","message":"super-nit: since you made me look at ip_allocation.py now :) if you re-spin should probably use dp_port[ipa.IP_ALLOCATION] here and throughout since the string is defined there.","commit_id":"2c1efad7b26fcdec93e51856d062557aa5359641"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"ee184715950348e6c85541ec4f6fb9d0a2d5b5c3","unresolved":false,"context_lines":[{"line_number":1153,"context_line":"            fixed_ips \u003d p[\u0027fixed_ips\u0027]"},{"line_number":1154,"context_line":"            if validators.is_attr_set(fixed_ips) and not fixed_ips:"},{"line_number":1155,"context_line":"                # [] was passed explicitly as fixed_ips. An unaddressed port."},{"line_number":1156,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_NONE"},{"line_number":1157,"context_line":""},{"line_number":1158,"context_line":"        return db_port"},{"line_number":1159,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_890e9d30","line":1156,"in_reply_to":"fa7ab95a_0620c848","updated":"2016-08-31 20:22:38.000000000","message":"I think you are right. API and DB constants are conceptually different. I\u0027ll use this as a guideline in my future work / reviews. Thanks","commit_id":"2c1efad7b26fcdec93e51856d062557aa5359641"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8a531ad1124c35438d3ea65dd6e7bbd322c5c5be","unresolved":false,"context_lines":[{"line_number":1153,"context_line":"            fixed_ips \u003d p[\u0027fixed_ips\u0027]"},{"line_number":1154,"context_line":"            if validators.is_attr_set(fixed_ips) and not fixed_ips:"},{"line_number":1155,"context_line":"                # [] was passed explicitly as fixed_ips. An unaddressed port."},{"line_number":1156,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_NONE"},{"line_number":1157,"context_line":""},{"line_number":1158,"context_line":"        return db_port"},{"line_number":1159,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_0620c848","line":1156,"in_reply_to":"fa7ab95a_b60300be","updated":"2016-08-31 16:18:38.000000000","message":"I did that one purpose. I don\u0027t like using constants defined for the API extensions to access the DB fields, even if they happen to have the same names.\n\nIt might be good to have a constants for the DB fields for this. But, there isn\u0027t a lot of precedent for using constants for DB fields in Neutron, to be perfectly honest.","commit_id":"2c1efad7b26fcdec93e51856d062557aa5359641"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3a49c97ea35f494682cbc2851bf8d0da09bcfee2","unresolved":false,"context_lines":[{"line_number":1140,"context_line":"            db_port \u003d self._create_db_port_obj(context, port_data)"},{"line_number":1141,"context_line":"            p[\u0027mac_address\u0027] \u003d db_port[\u0027mac_address\u0027]"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"            try:"},{"line_number":1144,"context_line":"                self.ipam.allocate_ips_for_port_and_store("},{"line_number":1145,"context_line":"                    context, port, port_id)"},{"line_number":1146,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_IMMEDIATE"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_9001e7b1","line":1143,"updated":"2016-09-07 19:41:31.000000000","message":"On port update with fixed-ips\u003d[], the ip_allocation will still be IMMEDIATE or DEFERRED, I wonder if this is a source of potential confusion. I am not quite sure how to solve it yet. Have you given this any thought?","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1058b3b8640581cb751c18385f11522b1804b561","unresolved":false,"context_lines":[{"line_number":1140,"context_line":"            db_port \u003d self._create_db_port_obj(context, port_data)"},{"line_number":1141,"context_line":"            p[\u0027mac_address\u0027] \u003d db_port[\u0027mac_address\u0027]"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"            try:"},{"line_number":1144,"context_line":"                self.ipam.allocate_ips_for_port_and_store("},{"line_number":1145,"context_line":"                    context, port, port_id)"},{"line_number":1146,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_IMMEDIATE"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_10c94d59","line":1143,"in_reply_to":"9a89bdaa_9001e7b1","updated":"2016-09-08 16:23:48.000000000","message":"This did cross my mind. Let me give this some thought. I was trying to simplify things by just defining the allocation policy on port create. But, you\u0027re right, there are things that the end user can do on port update that contradict what was set on create. It is just that all the possibilities make it a lot more complex to think about. Do you have any more thoughts?","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3a49c97ea35f494682cbc2851bf8d0da09bcfee2","unresolved":false,"context_lines":[{"line_number":1143,"context_line":"            try:"},{"line_number":1144,"context_line":"                self.ipam.allocate_ips_for_port_and_store("},{"line_number":1145,"context_line":"                    context, port, port_id)"},{"line_number":1146,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_IMMEDIATE"},{"line_number":1147,"context_line":"            except ipam_exc.DeferIpam:"},{"line_number":1148,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_DEFERRED"},{"line_number":1149,"context_line":"            fixed_ips \u003d p[\u0027fixed_ips\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_d5d1a158","line":1146,"updated":"2016-09-07 19:41:31.000000000","message":"use the string literal?","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1058b3b8640581cb751c18385f11522b1804b561","unresolved":false,"context_lines":[{"line_number":1143,"context_line":"            try:"},{"line_number":1144,"context_line":"                self.ipam.allocate_ips_for_port_and_store("},{"line_number":1145,"context_line":"                    context, port, port_id)"},{"line_number":1146,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_IMMEDIATE"},{"line_number":1147,"context_line":"            except ipam_exc.DeferIpam:"},{"line_number":1148,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_DEFERRED"},{"line_number":1149,"context_line":"            fixed_ips \u003d p[\u0027fixed_ips\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_b0aa6183","line":1146,"in_reply_to":"9a89bdaa_d5d1a158","updated":"2016-09-08 16:23:48.000000000","message":"See my comment in the other file.","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3a49c97ea35f494682cbc2851bf8d0da09bcfee2","unresolved":false,"context_lines":[{"line_number":1148,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_DEFERRED"},{"line_number":1149,"context_line":"            fixed_ips \u003d p[\u0027fixed_ips\u0027]"},{"line_number":1150,"context_line":"            if validators.is_attr_set(fixed_ips) and not fixed_ips:"},{"line_number":1151,"context_line":"                # [] was passed explicitly as fixed_ips. An unaddressed port."},{"line_number":1152,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_NONE"},{"line_number":1153,"context_line":""},{"line_number":1154,"context_line":"        return db_port"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_d59c41c2","line":1151,"updated":"2016-09-07 19:41:31.000000000","message":"random question: is this even possible with the CLI? I can\u0027t remember on the top of my head. Perhaps we need a --no-fixed-ips on the CLI like we did for security-groups and allowed-address-pairs?","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1058b3b8640581cb751c18385f11522b1804b561","unresolved":false,"context_lines":[{"line_number":1148,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_DEFERRED"},{"line_number":1149,"context_line":"            fixed_ips \u003d p[\u0027fixed_ips\u0027]"},{"line_number":1150,"context_line":"            if validators.is_attr_set(fixed_ips) and not fixed_ips:"},{"line_number":1151,"context_line":"                # [] was passed explicitly as fixed_ips. An unaddressed port."},{"line_number":1152,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_NONE"},{"line_number":1153,"context_line":""},{"line_number":1154,"context_line":"        return db_port"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_1094ed40","line":1151,"in_reply_to":"9a89bdaa_d59c41c2","updated":"2016-09-08 16:23:48.000000000","message":"No, it isn\u0027t possible as far as I know. I\u0027ve done my testing through the API directly using Postman.","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3a49c97ea35f494682cbc2851bf8d0da09bcfee2","unresolved":false,"context_lines":[{"line_number":1140,"context_line":"            db_port \u003d self._create_db_port_obj(context, port_data)"},{"line_number":1141,"context_line":"            p[\u0027mac_address\u0027] \u003d db_port[\u0027mac_address\u0027]"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"            try:"},{"line_number":1144,"context_line":"                self.ipam.allocate_ips_for_port_and_store("},{"line_number":1145,"context_line":"                    context, port, port_id)"},{"line_number":1146,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_IMMEDIATE"},{"line_number":1147,"context_line":"            except ipam_exc.DeferIpam:"},{"line_number":1148,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_DEFERRED"},{"line_number":1149,"context_line":"            fixed_ips \u003d p[\u0027fixed_ips\u0027]"},{"line_number":1150,"context_line":"            if validators.is_attr_set(fixed_ips) and not fixed_ips:"},{"line_number":1151,"context_line":"                # [] was passed explicitly as fixed_ips. An unaddressed port."},{"line_number":1152,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_NONE"},{"line_number":1153,"context_line":""},{"line_number":1154,"context_line":"        return db_port"},{"line_number":1155,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_35a80ddb","line":1152,"range":{"start_line":1143,"start_character":12,"end_line":1152,"end_character":65},"updated":"2016-09-07 19:41:31.000000000","message":"I\u0027d personally wrap this up into a new method to avoid this bloat even further or even test more easily.","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1ce4992edc65e9fe4faac904b3dea9471c4568c8","unresolved":false,"context_lines":[{"line_number":1140,"context_line":"            db_port \u003d self._create_db_port_obj(context, port_data)"},{"line_number":1141,"context_line":"            p[\u0027mac_address\u0027] \u003d db_port[\u0027mac_address\u0027]"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"            try:"},{"line_number":1144,"context_line":"                self.ipam.allocate_ips_for_port_and_store("},{"line_number":1145,"context_line":"                    context, port, port_id)"},{"line_number":1146,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_IMMEDIATE"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a89bdaa_59153e47","line":1143,"updated":"2016-09-10 07:37:06.000000000","message":"can we have this code block in a method? 1143 - 1153","commit_id":"b6a90df2ace78bd586f4949e37351fd38351b8dc"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"4dc8722b81c90861726360f3691bd48a38ab7e46","unresolved":false,"context_lines":[{"line_number":1140,"context_line":"            db_port \u003d self._create_db_port_obj(context, port_data)"},{"line_number":1141,"context_line":"            p[\u0027mac_address\u0027] \u003d db_port[\u0027mac_address\u0027]"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"            try:"},{"line_number":1144,"context_line":"                self.ipam.allocate_ips_for_port_and_store("},{"line_number":1145,"context_line":"                    context, port, port_id)"},{"line_number":1146,"context_line":"                db_port[\u0027ip_allocation\u0027] \u003d ipa.IP_ALLOCATION_IMMEDIATE"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a89bdaa_afcc3c62","line":1143,"in_reply_to":"9a89bdaa_59153e47","updated":"2016-09-10 11:27:35.000000000","message":"You would need to pass a lot of arguments (self, context, port, port_id, db_port, p) for such a little method. For this reason I think it\u0027s better to have it inline.","commit_id":"b6a90df2ace78bd586f4949e37351fd38351b8dc"}],"neutron/ipam/exceptions.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"129dcadfde0c908334e2ad32bc72ddf527624f52","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class DeferIpam(exceptions.NeutronException):"},{"line_number":90,"context_line":"    message \u003d _(\"Exception used to signal that IP allocation is deferred\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa7ab95a_0e128509","line":90,"range":{"start_line":90,"start_character":17,"end_line":90,"end_character":72},"updated":"2016-09-01 02:45:32.000000000","message":"It looks more like a comment than message to me. But I am ok with its current state.","commit_id":"640aa4306732bff663241e981ec55c972cf7749f"}],"neutron/services/segments/plugin.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"f642c168309fc976513f072cecaee5db4a00bd7d","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    subnet_res[\u0027segment_id\u0027] \u003d subnet_db.get(\u0027segment_id\u0027)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def _extend_port_dict_binding(plugin, port_res, port_db):"},{"line_number":41,"context_line":"    if not manager.NeutronManager.get_service_plugins().get(\u0027segments\u0027):"},{"line_number":42,"context_line":"        return"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_9c9b2fc9","line":40,"range":{"start_line":40,"start_character":16,"end_line":40,"end_character":17},"updated":"2016-08-27 01:07:24.000000000","message":"the way you\u0027ve added the model, are you sure you need this hook anymore? This would be needed if you had an association table port-ipallocation, but with ipallocation being a column of ports I am not 100% this is strictly necessary anymore. Did you look into it?","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1f3e3d70766aa2cdfdecb30766926863c724245d","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    subnet_res[\u0027segment_id\u0027] \u003d subnet_db.get(\u0027segment_id\u0027)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def _extend_port_dict_binding(plugin, port_res, port_db):"},{"line_number":41,"context_line":"    if not manager.NeutronManager.get_service_plugins().get(\u0027segments\u0027):"},{"line_number":42,"context_line":"        return"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_b59c445e","line":40,"range":{"start_line":40,"start_character":16,"end_line":40,"end_character":17},"in_reply_to":"fa7ab95a_9c9b2fc9","updated":"2016-08-29 20:40:16.000000000","message":"That\u0027s a good thought. I didn\u0027t even think about it. When I remove it, I get unit test errors with a KeyError on this let me look at why.","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6986d3eefb1669df2effd7b006bebcecd526dd64","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    subnet_res[\u0027segment_id\u0027] \u003d subnet_db.get(\u0027segment_id\u0027)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def _extend_port_dict_binding(plugin, port_res, port_db):"},{"line_number":41,"context_line":"    if not manager.NeutronManager.get_service_plugins().get(\u0027segments\u0027):"},{"line_number":42,"context_line":"        return"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_a983fa54","line":40,"range":{"start_line":40,"start_character":16,"end_line":40,"end_character":17},"in_reply_to":"fa7ab95a_b59c445e","updated":"2016-08-29 20:45:52.000000000","message":"Right, so this is still needed given this [1].\n\n [1] https://github.com/openstack/neutron/blob/79927038bc7b024c8645d53383883c304a80dae6/neutron/db/db_base_plugin_common.py#L181-L192","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"7c732bd221670752f466177dc23d389f1dd8c1ae","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    value \u003d ip_allocation.IP_ALLOCATION_IMMEDIATE"},{"line_number":45,"context_line":"    if port_db.get(\u0027ip_allocation\u0027):"},{"line_number":46,"context_line":"        value \u003d port_db.get(\u0027ip_allocation\u0027)"},{"line_number":47,"context_line":"    port_res[ip_allocation.IP_ALLOCATION] \u003d value"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_0b5b572f","line":46,"updated":"2016-08-26 23:21:27.000000000","message":"So we get to fix the query conundrum here. Great! :-)","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1f3e3d70766aa2cdfdecb30766926863c724245d","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    value \u003d ip_allocation.IP_ALLOCATION_IMMEDIATE"},{"line_number":45,"context_line":"    if port_db.get(\u0027ip_allocation\u0027):"},{"line_number":46,"context_line":"        value \u003d port_db.get(\u0027ip_allocation\u0027)"},{"line_number":47,"context_line":"    port_res[ip_allocation.IP_ALLOCATION] \u003d value"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_35c0342a","line":46,"in_reply_to":"fa7ab95a_0b5b572f","updated":"2016-08-29 20:40:16.000000000","message":":)","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d9fd40660cc7a4c7e4e0c30cb6ef601a2106359b","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    value \u003d ip_allocation.IP_ALLOCATION_IMMEDIATE"},{"line_number":51,"context_line":"    if port_db.get(\u0027ip_allocation\u0027):"},{"line_number":52,"context_line":"        value \u003d port_db.get(\u0027ip_allocation\u0027)"},{"line_number":53,"context_line":"    port_res[ip_allocation.IP_ALLOCATION] \u003d value"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_080bb924","line":52,"updated":"2016-08-30 18:55:58.000000000","message":"Just curious, can this be:\n\nvalue \u003d port_db_get(\u0027ip_allocation\u0027, ip_allocation.IP_ALLOCATION_IMMEDIATE)\n\nto avoid the check/get","commit_id":"8ac57065e4f26150bca240d4b47efff0a859a74a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d31fbcaa9501c197e8e45dd72eb5c00a35145225","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    value \u003d ip_allocation.IP_ALLOCATION_IMMEDIATE"},{"line_number":51,"context_line":"    if port_db.get(\u0027ip_allocation\u0027):"},{"line_number":52,"context_line":"        value \u003d port_db.get(\u0027ip_allocation\u0027)"},{"line_number":53,"context_line":"    port_res[ip_allocation.IP_ALLOCATION] \u003d value"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_e0b141e1","line":52,"in_reply_to":"fa7ab95a_080bb924","updated":"2016-08-30 22:33:12.000000000","message":"No, it is subtly different. Consider when \u0027ip_allocation\u0027 is None in port_db. In this code here, value will end up being ip_allocation.IP_ALLOCATION_IMMEDIATE but in the suggested alternative, it will end up being None.","commit_id":"8ac57065e4f26150bca240d4b47efff0a859a74a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3a49c97ea35f494682cbc2851bf8d0da09bcfee2","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        return"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    value \u003d ip_allocation.IP_ALLOCATION_IMMEDIATE"},{"line_number":51,"context_line":"    if port_db.get(\u0027ip_allocation\u0027):"},{"line_number":52,"context_line":"        value \u003d port_db.get(\u0027ip_allocation\u0027)"},{"line_number":53,"context_line":"    port_res[ip_allocation.IP_ALLOCATION] \u003d value"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_35f64df9","line":51,"updated":"2016-09-07 19:41:31.000000000","message":"nit: might be worth using the string literal all over?","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"0db7edad26e8693533c98562348542e5690152b3","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        return"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    value \u003d ip_allocation.IP_ALLOCATION_IMMEDIATE"},{"line_number":51,"context_line":"    if port_db.get(\u0027ip_allocation\u0027):"},{"line_number":52,"context_line":"        value \u003d port_db.get(\u0027ip_allocation\u0027)"},{"line_number":53,"context_line":"    port_res[ip_allocation.IP_ALLOCATION] \u003d value"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_6aac398c","line":51,"in_reply_to":"9a89bdaa_30f1f1cd","updated":"2016-09-08 16:55:01.000000000","message":"That can be a potential source of mistake, see [1]. That said, this is something that can be sanitized later.\n\n[1] https://review.openstack.org/#/c/365183/","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1058b3b8640581cb751c18385f11522b1804b561","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        return"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    value \u003d ip_allocation.IP_ALLOCATION_IMMEDIATE"},{"line_number":51,"context_line":"    if port_db.get(\u0027ip_allocation\u0027):"},{"line_number":52,"context_line":"        value \u003d port_db.get(\u0027ip_allocation\u0027)"},{"line_number":53,"context_line":"    port_res[ip_allocation.IP_ALLOCATION] \u003d value"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_30f1f1cd","line":51,"in_reply_to":"9a89bdaa_35f64df9","updated":"2016-09-08 16:23:48.000000000","message":"I think there is a distinction between the extension field name and the database column name. In many cases, they are the same string but it felt funny to me to use the API field name string literal to refer to the database column name. It seemed to tie this code that accesses the database model to the extension definition which didn\u0027t seem right to me.\n\nThe other thing that I noticed is that not a lot of database fields have constants for their names. But, I have no objection to adding one.\n\nLet me see what I can do.","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"}],"neutron/tests/unit/extensions/test_segment.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"7c732bd221670752f466177dc23d389f1dd8c1ae","unresolved":false,"context_lines":[{"line_number":842,"context_line":"        self.assertEqual(webob.exc.HTTPBadRequest.code, response.status_int)"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def test_port_create_with_no_fixed_ips_no_ipam_on_routed_network(self):"},{"line_number":845,"context_line":"        \"\"\"Ports without addresses on non-routed networks are not deferred\"\"\""},{"line_number":846,"context_line":"        with self.network() as network:"},{"line_number":847,"context_line":"            segment \u003d self._test_create_segment("},{"line_number":848,"context_line":"                network_id\u003dnetwork[\u0027network\u0027][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_cbd32f5e","line":845,"range":{"start_line":845,"start_character":38,"end_line":845,"end_character":48},"updated":"2016-08-26 23:21:27.000000000","message":"\u0027routed\u0027","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1f3e3d70766aa2cdfdecb30766926863c724245d","unresolved":false,"context_lines":[{"line_number":842,"context_line":"        self.assertEqual(webob.exc.HTTPBadRequest.code, response.status_int)"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def test_port_create_with_no_fixed_ips_no_ipam_on_routed_network(self):"},{"line_number":845,"context_line":"        \"\"\"Ports without addresses on non-routed networks are not deferred\"\"\""},{"line_number":846,"context_line":"        with self.network() as network:"},{"line_number":847,"context_line":"            segment \u003d self._test_create_segment("},{"line_number":848,"context_line":"                network_id\u003dnetwork[\u0027network\u0027][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_ee7ee868","line":845,"range":{"start_line":845,"start_character":38,"end_line":845,"end_character":48},"in_reply_to":"fa7ab95a_cbd32f5e","updated":"2016-08-29 20:40:16.000000000","message":"Yup. Done.","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"7c732bd221670752f466177dc23d389f1dd8c1ae","unresolved":false,"context_lines":[{"line_number":851,"context_line":"                             segment_id\u003dsegment[\u0027segment\u0027][\u0027id\u0027]):"},{"line_number":852,"context_line":"                pass"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"        # Create a unbound port requesting no IP addresses"},{"line_number":855,"context_line":"        response \u003d self._create_port(self.fmt,"},{"line_number":856,"context_line":"                                     net_id\u003dnetwork[\u0027network\u0027][\u0027id\u0027],"},{"line_number":857,"context_line":"                                     tenant_id\u003dnetwork[\u0027network\u0027][\u0027tenant_id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_6bba2325","line":854,"range":{"start_line":854,"start_character":17,"end_line":854,"end_character":18},"updated":"2016-08-26 23:21:27.000000000","message":"\u0027an\u0027","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1f3e3d70766aa2cdfdecb30766926863c724245d","unresolved":false,"context_lines":[{"line_number":851,"context_line":"                             segment_id\u003dsegment[\u0027segment\u0027][\u0027id\u0027]):"},{"line_number":852,"context_line":"                pass"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"        # Create a unbound port requesting no IP addresses"},{"line_number":855,"context_line":"        response \u003d self._create_port(self.fmt,"},{"line_number":856,"context_line":"                                     net_id\u003dnetwork[\u0027network\u0027][\u0027id\u0027],"},{"line_number":857,"context_line":"                                     tenant_id\u003dnetwork[\u0027network\u0027][\u0027tenant_id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_0e986cbf","line":854,"range":{"start_line":854,"start_character":17,"end_line":854,"end_character":18},"in_reply_to":"fa7ab95a_6bba2325","updated":"2016-08-29 20:40:16.000000000","message":"Done","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"7c732bd221670752f466177dc23d389f1dd8c1ae","unresolved":false,"context_lines":[{"line_number":870,"context_line":"            with self.subnet(network\u003dnetwork):"},{"line_number":871,"context_line":"                pass"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"        # Create a unbound port requesting no IP addresses"},{"line_number":874,"context_line":"        response \u003d self._create_port(self.fmt,"},{"line_number":875,"context_line":"                                     net_id\u003dnetwork[\u0027network\u0027][\u0027id\u0027],"},{"line_number":876,"context_line":"                                     tenant_id\u003dnetwork[\u0027network\u0027][\u0027tenant_id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_cb3a4f98","line":873,"range":{"start_line":873,"start_character":17,"end_line":873,"end_character":18},"updated":"2016-08-26 23:21:27.000000000","message":"\u0027an\u0027","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1f3e3d70766aa2cdfdecb30766926863c724245d","unresolved":false,"context_lines":[{"line_number":870,"context_line":"            with self.subnet(network\u003dnetwork):"},{"line_number":871,"context_line":"                pass"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"        # Create a unbound port requesting no IP addresses"},{"line_number":874,"context_line":"        response \u003d self._create_port(self.fmt,"},{"line_number":875,"context_line":"                                     net_id\u003dnetwork[\u0027network\u0027][\u0027id\u0027],"},{"line_number":876,"context_line":"                                     tenant_id\u003dnetwork[\u0027network\u0027][\u0027tenant_id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_2e953086","line":873,"range":{"start_line":873,"start_character":17,"end_line":873,"end_character":18},"in_reply_to":"fa7ab95a_cb3a4f98","updated":"2016-08-29 20:40:16.000000000","message":"Done","commit_id":"ad12edcd642dfbf6a272cd1509450798e3427ef3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3a49c97ea35f494682cbc2851bf8d0da09bcfee2","unresolved":false,"context_lines":[{"line_number":995,"context_line":"                network_type\u003dp_constants.TYPE_VLAN)"},{"line_number":996,"context_line":"            with self.subnet(network\u003dnetwork,"},{"line_number":997,"context_line":"                             segment_id\u003dsegment[\u0027segment\u0027][\u0027id\u0027]):"},{"line_number":998,"context_line":"                pass"},{"line_number":999,"context_line":""},{"line_number":1000,"context_line":"        # Create an unbound port requesting no IP addresses"},{"line_number":1001,"context_line":"        response \u003d self._create_port(self.fmt,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_95bc7907","line":998,"updated":"2016-09-07 19:41:31.000000000","message":"I must admit I am not super fond of this way of setting up the resources and \u0027proceed\u0027 the context, but I won\u0027t hold it against you, as it\u0027s elsewhere in the code. I might even approved it without being fully lucid  :)","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1058b3b8640581cb751c18385f11522b1804b561","unresolved":false,"context_lines":[{"line_number":995,"context_line":"                network_type\u003dp_constants.TYPE_VLAN)"},{"line_number":996,"context_line":"            with self.subnet(network\u003dnetwork,"},{"line_number":997,"context_line":"                             segment_id\u003dsegment[\u0027segment\u0027][\u0027id\u0027]):"},{"line_number":998,"context_line":"                pass"},{"line_number":999,"context_line":""},{"line_number":1000,"context_line":"        # Create an unbound port requesting no IP addresses"},{"line_number":1001,"context_line":"        response \u003d self._create_port(self.fmt,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_506755b6","line":998,"in_reply_to":"9a89bdaa_95bc7907","updated":"2016-09-08 16:23:48.000000000","message":"I\u0027m not really fond of it either. The problem is that these methods, \"subnet\" and \"network\" are written as context managers but they don\u0027t really behave that way. The reason I do this this way is because if/when someone gets ambitious and transforms these into regular methods that just create a thing and return it, they\u0027ll be able to change this code without having to re-indent everything.","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3a49c97ea35f494682cbc2851bf8d0da09bcfee2","unresolved":false,"context_lines":[{"line_number":1014,"context_line":"        \"\"\"Ports without addresses on non-routed networks are not deferred\"\"\""},{"line_number":1015,"context_line":"        with self.network() as network:"},{"line_number":1016,"context_line":"            with self.subnet(network\u003dnetwork):"},{"line_number":1017,"context_line":"                pass"},{"line_number":1018,"context_line":""},{"line_number":1019,"context_line":"        # Create an unbound port requesting no IP addresses"},{"line_number":1020,"context_line":"        response \u003d self._create_port(self.fmt,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_f53dc58f","line":1017,"updated":"2016-09-07 19:41:31.000000000","message":"ditto","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1058b3b8640581cb751c18385f11522b1804b561","unresolved":false,"context_lines":[{"line_number":1014,"context_line":"        \"\"\"Ports without addresses on non-routed networks are not deferred\"\"\""},{"line_number":1015,"context_line":"        with self.network() as network:"},{"line_number":1016,"context_line":"            with self.subnet(network\u003dnetwork):"},{"line_number":1017,"context_line":"                pass"},{"line_number":1018,"context_line":""},{"line_number":1019,"context_line":"        # Create an unbound port requesting no IP addresses"},{"line_number":1020,"context_line":"        response \u003d self._create_port(self.fmt,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_7008d9da","line":1017,"in_reply_to":"9a89bdaa_f53dc58f","updated":"2016-09-08 16:23:48.000000000","message":"ditto","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3a49c97ea35f494682cbc2851bf8d0da09bcfee2","unresolved":false,"context_lines":[{"line_number":1017,"context_line":"                pass"},{"line_number":1018,"context_line":""},{"line_number":1019,"context_line":"        # Create an unbound port requesting no IP addresses"},{"line_number":1020,"context_line":"        response \u003d self._create_port(self.fmt,"},{"line_number":1021,"context_line":"                                     net_id\u003dnetwork[\u0027network\u0027][\u0027id\u0027],"},{"line_number":1022,"context_line":"                                     tenant_id\u003dnetwork[\u0027network\u0027][\u0027tenant_id\u0027],"},{"line_number":1023,"context_line":"                                     fixed_ips\u003d[])"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_d5efe184","line":1020,"updated":"2016-09-07 19:41:31.000000000","message":"it seems you\u0027re repeating yourself a bit.","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1058b3b8640581cb751c18385f11522b1804b561","unresolved":false,"context_lines":[{"line_number":1017,"context_line":"                pass"},{"line_number":1018,"context_line":""},{"line_number":1019,"context_line":"        # Create an unbound port requesting no IP addresses"},{"line_number":1020,"context_line":"        response \u003d self._create_port(self.fmt,"},{"line_number":1021,"context_line":"                                     net_id\u003dnetwork[\u0027network\u0027][\u0027id\u0027],"},{"line_number":1022,"context_line":"                                     tenant_id\u003dnetwork[\u0027network\u0027][\u0027tenant_id\u0027],"},{"line_number":1023,"context_line":"                                     fixed_ips\u003d[])"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_b034214a","line":1020,"in_reply_to":"9a89bdaa_d5efe184","updated":"2016-09-08 16:23:48.000000000","message":"I\u0027ll fix this up in the next patch set.","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"}],"releasenotes/notes/add-port-ip-allocation-attr-294a580641998240.yaml":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d9fd40660cc7a4c7e4e0c30cb6ef601a2106359b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    Add ip_availability attribute to port resources"},{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - The port resource now has an ip_allocation attribute"},{"line_number":6,"context_line":"    on it. The value of this attribute will be"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"fa7ab95a_e8a3f5fd","line":3,"updated":"2016-08-30 18:55:58.000000000","message":"s/ip_availability/ip_allocation","commit_id":"8ac57065e4f26150bca240d4b47efff0a859a74a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d31fbcaa9501c197e8e45dd72eb5c00a35145225","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    Add ip_availability attribute to port resources"},{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - The port resource now has an ip_allocation attribute"},{"line_number":6,"context_line":"    on it. The value of this attribute will be"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"fa7ab95a_604371af","line":3,"in_reply_to":"fa7ab95a_e8a3f5fd","updated":"2016-08-30 22:33:12.000000000","message":"Yikes! That\u0027s worth a -1 alright. Thanks! That must have been a bad tab complete or something that slipped by me.","commit_id":"8ac57065e4f26150bca240d4b47efff0a859a74a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d9fd40660cc7a4c7e4e0c30cb6ef601a2106359b","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    on it. The value of this attribute will be"},{"line_number":7,"context_line":"    \u0027immediate\u0027, \u0027deferred\u0027, or \u0027none\u0027. \u0027immediate\u0027 means"},{"line_number":8,"context_line":"    that the port is expected to have an IP address and"},{"line_number":9,"context_line":"    Neutron attempted IP allocation on port creation."},{"line_number":10,"context_line":"    \u0027deferred\u0027 means that the port is expected to have an"},{"line_number":11,"context_line":"    IP address but Neutron deferred IP allocation until a"},{"line_number":12,"context_line":"    port update provides the host to which the port will"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"fa7ab95a_e8f13502","line":9,"updated":"2016-08-30 18:55:58.000000000","message":"s/attempted/will attempt","commit_id":"8ac57065e4f26150bca240d4b47efff0a859a74a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d31fbcaa9501c197e8e45dd72eb5c00a35145225","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    on it. The value of this attribute will be"},{"line_number":7,"context_line":"    \u0027immediate\u0027, \u0027deferred\u0027, or \u0027none\u0027. \u0027immediate\u0027 means"},{"line_number":8,"context_line":"    that the port is expected to have an IP address and"},{"line_number":9,"context_line":"    Neutron attempted IP allocation on port creation."},{"line_number":10,"context_line":"    \u0027deferred\u0027 means that the port is expected to have an"},{"line_number":11,"context_line":"    IP address but Neutron deferred IP allocation until a"},{"line_number":12,"context_line":"    port update provides the host to which the port will"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"fa7ab95a_c00a7d78","line":9,"in_reply_to":"fa7ab95a_e8f13502","updated":"2016-08-30 22:33:12.000000000","message":"Well, at the time that you are reading this attribute, past tense is correct because Neutron already attempted IP allocation. Let me see if I can word this better.","commit_id":"8ac57065e4f26150bca240d4b47efff0a859a74a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d9fd40660cc7a4c7e4e0c30cb6ef601a2106359b","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    that the port is expected to have an IP address and"},{"line_number":9,"context_line":"    Neutron attempted IP allocation on port creation."},{"line_number":10,"context_line":"    \u0027deferred\u0027 means that the port is expected to have an"},{"line_number":11,"context_line":"    IP address but Neutron deferred IP allocation until a"},{"line_number":12,"context_line":"    port update provides the host to which the port will"},{"line_number":13,"context_line":"    be bound. \u0027none\u0027 means that the port was created"},{"line_number":14,"context_line":"    explicitly with no addresses by passing [] in"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"fa7ab95a_68e60545","line":11,"updated":"2016-08-30 18:55:58.000000000","message":"s/deferred/will defer","commit_id":"8ac57065e4f26150bca240d4b47efff0a859a74a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d31fbcaa9501c197e8e45dd72eb5c00a35145225","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    that the port is expected to have an IP address and"},{"line_number":9,"context_line":"    Neutron attempted IP allocation on port creation."},{"line_number":10,"context_line":"    \u0027deferred\u0027 means that the port is expected to have an"},{"line_number":11,"context_line":"    IP address but Neutron deferred IP allocation until a"},{"line_number":12,"context_line":"    port update provides the host to which the port will"},{"line_number":13,"context_line":"    be bound. \u0027none\u0027 means that the port was created"},{"line_number":14,"context_line":"    explicitly with no addresses by passing [] in"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"fa7ab95a_401f4db6","line":11,"in_reply_to":"fa7ab95a_68e60545","updated":"2016-08-30 22:33:12.000000000","message":"ditto","commit_id":"8ac57065e4f26150bca240d4b47efff0a859a74a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3a49c97ea35f494682cbc2851bf8d0da09bcfee2","unresolved":false,"context_lines":[{"line_number":14,"context_line":"    explicitly with no addresses by passing [] in"},{"line_number":15,"context_line":"    fixed_ips when creating it."},{"line_number":16,"context_line":"upgrade:"},{"line_number":17,"context_line":"  - All existing ports are considered to have \u0027immediate\u0027"},{"line_number":18,"context_line":"    IP allocation. Any ports that do not have this"},{"line_number":19,"context_line":"    attribute should also be considered to have immediate"},{"line_number":20,"context_line":"    IP allocation."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"9a89bdaa_95047918","line":17,"updated":"2016-09-07 19:41:31.000000000","message":"what about existing ports that have no fixed IPs? This means that post upgrade we can\u0027t detect whether a port was created with no ports or it was modified afterwards, so we may have a situation where ports with no fixed IPs will have IMMEDIATE rather than None. This could be potentially confusing. To fix this though it would required a hell of a migration, mumble mumble.","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1058b3b8640581cb751c18385f11522b1804b561","unresolved":false,"context_lines":[{"line_number":14,"context_line":"    explicitly with no addresses by passing [] in"},{"line_number":15,"context_line":"    fixed_ips when creating it."},{"line_number":16,"context_line":"upgrade:"},{"line_number":17,"context_line":"  - All existing ports are considered to have \u0027immediate\u0027"},{"line_number":18,"context_line":"    IP allocation. Any ports that do not have this"},{"line_number":19,"context_line":"    attribute should also be considered to have immediate"},{"line_number":20,"context_line":"    IP allocation."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"9a89bdaa_d028c535","line":17,"in_reply_to":"9a89bdaa_95047918","updated":"2016-09-08 16:23:48.000000000","message":"I went through this same thought process. We\u0027ll never be able to tell if a port has no IPs because [] was passed explicitly or if the port was created on a network with no subnets.\n\nIt is worth considering if the latter type should be marked NONE also. Then we could just do the migration and set all the ports with no IP addresses to immediate.","commit_id":"a05921955a8b43a78b92face143061bbf2b69928"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c74ac4df9be023d1463f6ca3a33d9b0d96e5192a","unresolved":false,"context_lines":[{"line_number":5,"context_line":"  - The port resource now has an ip_allocation attribute."},{"line_number":6,"context_line":"    The value of this attribute will be set to"},{"line_number":7,"context_line":"    \u0027immediate\u0027, \u0027deferred\u0027, or \u0027none\u0027 at the time the"},{"line_number":8,"context_line":"    port is created. It will not be changed when the port"},{"line_number":9,"context_line":"    is updated."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    \u0027immediate\u0027 means that the port is expected to have"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"9a89bdaa_f15d50ed","line":8,"updated":"2016-09-09 23:15:52.000000000","message":"Let\u0027s make sure this is emphasized in the docs.","commit_id":"b6a90df2ace78bd586f4949e37351fd38351b8dc"}]}
