)]}'
{"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6687723d25aa73666225434b97daeca34635c125","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                LOG.debug(\"Port %s has been deleted concurrently\", port_id)"},{"line_number":422,"context_line":"                return orig_context, False, False"},{"line_number":423,"context_line":"            oport \u003d self._make_port_dict(port_db)"},{"line_number":424,"context_line":"            port \u003d self._make_port_dict(port_db)"},{"line_number":425,"context_line":"            network \u003d bind_context.network.current"},{"line_number":426,"context_line":"            if port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":427,"context_line":"                # REVISIT(rkukura): The PortBinding instance from the"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_898ee62b","line":424,"range":{"start_line":424,"start_character":12,"end_line":424,"end_character":48},"updated":"2016-05-22 23:55:08.000000000","message":"In my comment to your addition in lines 496-498 below, I refer to this line","commit_id":"23696c0c4a0b901537bff68d8800bbd5cbdebc5e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6687723d25aa73666225434b97daeca34635c125","unresolved":false,"context_lines":[{"line_number":446,"context_line":"                # to optimize this code to avoid fetching it."},{"line_number":447,"context_line":"                cur_binding \u003d db.get_dvr_port_binding_by_host("},{"line_number":448,"context_line":"                    session, port_id, orig_binding.host)"},{"line_number":449,"context_line":"            cur_context \u003d driver_context.PortContext("},{"line_number":450,"context_line":"                self, plugin_context, port, network, cur_binding, None,"},{"line_number":451,"context_line":"                original_port\u003doport)"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"            # Commit our binding results only if port has not been"},{"line_number":454,"context_line":"            # successfully bound concurrently by another thread or"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_a98bea1d","line":451,"range":{"start_line":449,"start_character":12,"end_line":451,"end_character":36},"updated":"2016-05-22 23:55:08.000000000","message":"In my comment to your addition in lines 496-498 below, I refer to these lines","commit_id":"23696c0c4a0b901537bff68d8800bbd5cbdebc5e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6687723d25aa73666225434b97daeca34635c125","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        else:"},{"line_number":494,"context_line":"            try_again \u003d True"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        if \u0027dns_assignment\u0027 in orig_context.current:"},{"line_number":497,"context_line":"            cur_context.current[\u0027dns_assignment\u0027] \u003d ("},{"line_number":498,"context_line":"                    orig_context.current[\u0027dns_assignment\u0027])"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        return cur_context, need_notify, try_again"},{"line_number":501,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_499a3e6f","line":498,"range":{"start_line":496,"start_character":8,"end_line":498,"end_character":59},"updated":"2016-05-22 23:55:08.000000000","message":"The core team is not going to let us \u0027get away\u0027 with polluting the plug-in with DNS concepts. I think these lines point to the solution rather than being the solution itself.\n\nPlease keep in mind that \u0027dns_assigment\u0027 is a calculated attribute. Also, the port that is used to create cur_context in lines 449-451 above is created in line 424 (also above) by calling _make_port_dict. That method is here:\n\nhttps://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_common.py#L168\n\nNote that this method, at the end calls all the extensions by default. So it should call the following method in the DNS ML2 extension:\n\nhttps://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/extensions/dns_integration.py#L143\n\nThis method right now does really nothing. I think the solution is to extend this method to add the dns_assigment attribute to the port that is used to create cur_context in lines 449-451 above.","commit_id":"23696c0c4a0b901537bff68d8800bbd5cbdebc5e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"889aa20535927e620b21910c8e1d10269c5251b5","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        else:"},{"line_number":494,"context_line":"            try_again \u003d True"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        if \u0027dns_assignment\u0027 in orig_context.current:"},{"line_number":497,"context_line":"            cur_context.current[\u0027dns_assignment\u0027] \u003d ("},{"line_number":498,"context_line":"                    orig_context.current[\u0027dns_assignment\u0027])"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        return cur_context, need_notify, try_again"},{"line_number":501,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_9019bb24","line":498,"range":{"start_line":496,"start_character":8,"end_line":498,"end_character":59},"in_reply_to":"bab6814e_499a3e6f","updated":"2016-05-23 17:04:54.000000000","message":"You can call this method to compute the port\u0027s dns_assignment attribute:\n\nhttps://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L1335\n\nMake it public, since you will be calling it from the ml2 DNS extension","commit_id":"23696c0c4a0b901537bff68d8800bbd5cbdebc5e"}]}
