)]}'
{"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e74a8c775639344bed48ab91b9bb9ec94cc4d024","unresolved":false,"context_lines":[{"line_number":478,"context_line":"        self.mechanism_manager.update_subnet_postcommit(mech_context)"},{"line_number":479,"context_line":"        return updated_subnet"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"    def delete_subnet(self, context, id):"},{"line_number":482,"context_line":"        # REVISIT(rkukura) The super(Ml2Plugin, self).delete_subnet()"},{"line_number":483,"context_line":"        # function is not used because it auto-deletes ports from the"},{"line_number":484,"context_line":"        # DB without invoking the derived class\u0027s delete_port(),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fjak%3D","line":481,"updated":"2013-11-01 13:53:08.000000000","message":"I take it that this commit will address this concern? May want to update this comment.","commit_id":"5a18bde431e914c0e484bc41f15bda0926abfb58"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"aa3885b7692ff9580f5addcbcefd8c38e3521904","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        # function is not used because it auto-deletes ports from the"},{"line_number":494,"context_line":"        # DB without invoking the derived class\u0027s delete_port(),"},{"line_number":495,"context_line":"        # preventing mechanism drivers from being called. This"},{"line_number":496,"context_line":"        # approach should be revisited when the API layer is reworked"},{"line_number":497,"context_line":"        # during icehouse."},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"        LOG.debug(_(\"Deleting subnet %s\"), id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BvRY%3D","line":496,"updated":"2013-11-20 21:25:47.000000000","message":"Please reword this comment to no longer talk about auto-deleting ports. You might use something like:\n\nThe super(Ml2Plugin, self).delete_subnet() function is not used because it deallocates the subnet\u0027s addresses from ports in the DB without invoking the derived class\u0027s update_port(), preventing mechanism drivers from being called. This approach should be revisited when the API layer is reworked reworked during icehouse.","commit_id":"605d6235dbb8493e1d7f841930eadcf7bcc7e3cc"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f33a8d7d8a2addfe2dd16916b31f8db3d2ddfb08","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        # function is not used because it auto-deletes ports from the"},{"line_number":494,"context_line":"        # DB without invoking the derived class\u0027s delete_port(),"},{"line_number":495,"context_line":"        # preventing mechanism drivers from being called. This"},{"line_number":496,"context_line":"        # approach should be revisited when the API layer is reworked"},{"line_number":497,"context_line":"        # during icehouse."},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"        LOG.debug(_(\"Deleting subnet %s\"), id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BtWg%3D","line":496,"in_reply_to":"AAAATn%2F%2BvRY%3D","updated":"2013-11-21 09:08:11.000000000","message":"Done","commit_id":"605d6235dbb8493e1d7f841930eadcf7bcc7e3cc"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"aa3885b7692ff9580f5addcbcefd8c38e3521904","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        session \u003d context.session"},{"line_number":501,"context_line":"        while True:"},{"line_number":502,"context_line":"            with session.begin(subtransactions\u003dTrue):"},{"line_number":503,"context_line":"                subnet \u003d self.get_subnet(context, id)"},{"line_number":504,"context_line":"                # Get ports to auto-delete."},{"line_number":505,"context_line":"                allocated \u003d (session.query(models_v2.IPAllocation)."},{"line_number":506,"context_line":"                             filter_by(subnet_id\u003did)."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BvSc%3D","line":503,"updated":"2013-11-20 21:25:47.000000000","message":"This comment should read \"Get ports to auto-deallocate.\" or something similar.","commit_id":"605d6235dbb8493e1d7f841930eadcf7bcc7e3cc"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f33a8d7d8a2addfe2dd16916b31f8db3d2ddfb08","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        session \u003d context.session"},{"line_number":501,"context_line":"        while True:"},{"line_number":502,"context_line":"            with session.begin(subtransactions\u003dTrue):"},{"line_number":503,"context_line":"                subnet \u003d self.get_subnet(context, id)"},{"line_number":504,"context_line":"                # Get ports to auto-delete."},{"line_number":505,"context_line":"                allocated \u003d (session.query(models_v2.IPAllocation)."},{"line_number":506,"context_line":"                             filter_by(subnet_id\u003did)."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BtWY%3D","line":503,"in_reply_to":"AAAATn%2F%2BvSc%3D","updated":"2013-11-21 09:08:11.000000000","message":"Done","commit_id":"605d6235dbb8493e1d7f841930eadcf7bcc7e3cc"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"aa3885b7692ff9580f5addcbcefd8c38e3521904","unresolved":false,"context_lines":[{"line_number":506,"context_line":"                             filter_by(subnet_id\u003did)."},{"line_number":507,"context_line":"                             join(models_v2.Port)."},{"line_number":508,"context_line":"                             filter_by(network_id\u003dsubnet[\u0027network_id\u0027])."},{"line_number":509,"context_line":"                             with_lockmode(\u0027update\u0027).all())"},{"line_number":510,"context_line":"                LOG.debug(_(\"Ports to auto-delete: %s\"), allocated)"},{"line_number":511,"context_line":"                only_auto_del \u003d all(not a.port_id or"},{"line_number":512,"context_line":"                                    a.ports.device_owner in db_base_plugin_v2."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BvRE%3D","line":509,"updated":"2013-11-20 21:25:47.000000000","message":"\"Ports to auto-deallocate: %s\"","commit_id":"605d6235dbb8493e1d7f841930eadcf7bcc7e3cc"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f33a8d7d8a2addfe2dd16916b31f8db3d2ddfb08","unresolved":false,"context_lines":[{"line_number":506,"context_line":"                             filter_by(subnet_id\u003did)."},{"line_number":507,"context_line":"                             join(models_v2.Port)."},{"line_number":508,"context_line":"                             filter_by(network_id\u003dsubnet[\u0027network_id\u0027])."},{"line_number":509,"context_line":"                             with_lockmode(\u0027update\u0027).all())"},{"line_number":510,"context_line":"                LOG.debug(_(\"Ports to auto-delete: %s\"), allocated)"},{"line_number":511,"context_line":"                only_auto_del \u003d all(not a.port_id or"},{"line_number":512,"context_line":"                                    a.ports.device_owner in db_base_plugin_v2."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BtWU%3D","line":509,"in_reply_to":"AAAATn%2F%2BvRE%3D","updated":"2013-11-21 09:08:11.000000000","message":"Done","commit_id":"605d6235dbb8493e1d7f841930eadcf7bcc7e3cc"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"817296839e23daf5e94bddc181b8fecfe964a8ef","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"            for a in allocated:"},{"line_number":533,"context_line":"                if a.port_id is not None:"},{"line_number":534,"context_line":"                    # calling update_port() for each allocation to remove the"},{"line_number":535,"context_line":"                    # IP from the port and call the MechanismDrivers"},{"line_number":536,"context_line":"                    data \u003d {\u0027port\u0027:"},{"line_number":537,"context_line":"                            {\u0027fixed_ips\u0027: [{\u0027subnet_id\u0027: ip.subnet_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2Bz9Q%3D","line":534,"updated":"2013-11-19 20:22:42.000000000","message":"This change will assume that the install has configured the DHCP agent, which is not necessarily required.  \n\nI wonder if the check should be to make sure that this is the last subnet within a network, and if so, then it should still delete the port.\n\nThat type of change should resolve the scenario where a port is part of multiple subnets as well as environments that do not utilize the dhcp agent.","commit_id":"605d6235dbb8493e1d7f841930eadcf7bcc7e3cc"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"240cb16374a0ddb267552223bde5feee1eb9208e","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"            for a in allocated:"},{"line_number":533,"context_line":"                if a.port_id is not None:"},{"line_number":534,"context_line":"                    # calling update_port() for each allocation to remove the"},{"line_number":535,"context_line":"                    # IP from the port and call the MechanismDrivers"},{"line_number":536,"context_line":"                    data \u003d {\u0027port\u0027:"},{"line_number":537,"context_line":"                            {\u0027fixed_ips\u0027: [{\u0027subnet_id\u0027: ip.subnet_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BtcA%3D","line":534,"in_reply_to":"AAAATn%2F%2BvS0%3D","updated":"2013-11-21 08:39:21.000000000","message":"I agree with the current implementation for consistency and it helps us to improve db_plugin. In general if an agent creates a port it is better the port is deleted by the agent.\n\nIn addition, if DHCP agent is not used, allocated must be empty and this If other agent or external controller creates a port for dhcp, the port should be cleaned up by delete__subnet_portcommit() or update_port called here.","commit_id":"605d6235dbb8493e1d7f841930eadcf7bcc7e3cc"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"aa3885b7692ff9580f5addcbcefd8c38e3521904","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"            for a in allocated:"},{"line_number":533,"context_line":"                if a.port_id is not None:"},{"line_number":534,"context_line":"                    # calling update_port() for each allocation to remove the"},{"line_number":535,"context_line":"                    # IP from the port and call the MechanismDrivers"},{"line_number":536,"context_line":"                    data \u003d {\u0027port\u0027:"},{"line_number":537,"context_line":"                            {\u0027fixed_ips\u0027: [{\u0027subnet_id\u0027: ip.subnet_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BvS0%3D","line":534,"in_reply_to":"AAAATn%2F%2BxK8%3D","updated":"2013-11-20 21:25:47.000000000","message":"I agree it makes sense to keep the behaviour here consistent with that of NeutronDbPluginV2 as long is it isn\u0027t completely broken. \n\nAs I understand it, deleting the IPAllocation removes the subnet\u0027s address from the port. So deleting the last subnet\u0027s allocation leaves the port existing, but with no fixed_ips. I think this is OK. Deleting the port either directly or via deletion of the network owning the port will eventually clean up. I think having no fixed_ips should be considered a valid state for a port.","commit_id":"605d6235dbb8493e1d7f841930eadcf7bcc7e3cc"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"e5b06c59137e02ae2287a988cd6a7bcc7f328a5f","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"            for a in allocated:"},{"line_number":533,"context_line":"                if a.port_id is not None:"},{"line_number":534,"context_line":"                    # calling update_port() for each allocation to remove the"},{"line_number":535,"context_line":"                    # IP from the port and call the MechanismDrivers"},{"line_number":536,"context_line":"                    data \u003d {\u0027port\u0027:"},{"line_number":537,"context_line":"                            {\u0027fixed_ips\u0027: [{\u0027subnet_id\u0027: ip.subnet_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BxK8%3D","line":534,"in_reply_to":"AAAATn%2F%2Bz9Q%3D","updated":"2013-11-20 13:18:32.000000000","message":"Currently this is done here just like it\u0027s done in db_base_plugin which doesn\u0027t delete ports. I think the behavior should be consistent in this case, so probably it deserves a separate bug/patch to fix both base_db_plugin and ml2 plugin. However I\u0027d like to hear other opinions on this first.","commit_id":"605d6235dbb8493e1d7f841930eadcf7bcc7e3cc"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"18d9da6297e81371027855ef6d09b2da77aac5de","unresolved":false,"context_lines":[{"line_number":529,"context_line":"                    LOG.debug(_(\"Committing transaction\"))"},{"line_number":530,"context_line":"                    break"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"            for a in allocated:"},{"line_number":533,"context_line":"                if a.port_id is not None:"},{"line_number":534,"context_line":"                    # calling update_port() for each allocation to remove the"},{"line_number":535,"context_line":"                    # IP from the port and call the MechanismDrivers"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BsgU%3D","line":532,"updated":"2013-11-21 12:44:43.000000000","message":"Why not:\n\nif a.port_id:","commit_id":"27d8b2d9be51731f4a0aa1ba06689b4e7977b9f7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"b95823fea2d52de7adbda031166fafa77eedac53","unresolved":false,"context_lines":[{"line_number":529,"context_line":"                    LOG.debug(_(\"Committing transaction\"))"},{"line_number":530,"context_line":"                    break"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"            for a in allocated:"},{"line_number":533,"context_line":"                if a.port_id is not None:"},{"line_number":534,"context_line":"                    # calling update_port() for each allocation to remove the"},{"line_number":535,"context_line":"                    # IP from the port and call the MechanismDrivers"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Bovw%3D","line":532,"in_reply_to":"AAAATn%2F%2Brrg%3D","updated":"2013-11-22 06:40:19.000000000","message":"Done","commit_id":"27d8b2d9be51731f4a0aa1ba06689b4e7977b9f7"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"4b52b034330242821fb863e71c67e7d236782f88","unresolved":false,"context_lines":[{"line_number":529,"context_line":"                    LOG.debug(_(\"Committing transaction\"))"},{"line_number":530,"context_line":"                    break"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"            for a in allocated:"},{"line_number":533,"context_line":"                if a.port_id is not None:"},{"line_number":534,"context_line":"                    # calling update_port() for each allocation to remove the"},{"line_number":535,"context_line":"                    # IP from the port and call the MechanismDrivers"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Brrg%3D","line":532,"in_reply_to":"AAAATn%2F%2BscE%3D","updated":"2013-11-21 15:54:39.000000000","message":"I\u0027d like to see this fixed - sorry I missed it before.","commit_id":"27d8b2d9be51731f4a0aa1ba06689b4e7977b9f7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"73db048276f0d1fa4bef2f718b9e1515780c575b","unresolved":false,"context_lines":[{"line_number":529,"context_line":"                    LOG.debug(_(\"Committing transaction\"))"},{"line_number":530,"context_line":"                    break"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"            for a in allocated:"},{"line_number":533,"context_line":"                if a.port_id is not None:"},{"line_number":534,"context_line":"                    # calling update_port() for each allocation to remove the"},{"line_number":535,"context_line":"                    # IP from the port and call the MechanismDrivers"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BscE%3D","line":532,"in_reply_to":"AAAATn%2F%2BsgU%3D","updated":"2013-11-21 13:01:15.000000000","message":"In fact no special reason for \u0027is not None\u0027. Will update if have to reupload the patch","commit_id":"27d8b2d9be51731f4a0aa1ba06689b4e7977b9f7"}]}
