)]}'
{"nova/network/neutronv2/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3c4436e47298017bf3e284651b80ab69116c77fb","unresolved":false,"context_lines":[{"line_number":1889,"context_line":"                instance_uuid\u003dinstance.uuid, ip\u003daddress)"},{"line_number":1890,"context_line":""},{"line_number":1891,"context_line":"    def _get_physnet_tunneled_info(self, context, neutron, net_id,"},{"line_number":1892,"context_line":"                                   network\u003dNone):"},{"line_number":1893,"context_line":"        \"\"\"Retrieve detailed network info."},{"line_number":1894,"context_line":""},{"line_number":1895,"context_line":"        :param context: The request context."}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_28479c79","line":1892,"updated":"2019-08-02 20:33:17.000000000","message":"Need to add unit tests for when this isn\u0027t None.","commit_id":"3d758371f85a9101c32d8aeedd0fb74727852ffc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a877ef1ec2ba25fc6120ec6211d471757b80e42f","unresolved":false,"context_lines":[{"line_number":3036,"context_line":"        else:"},{"line_number":3037,"context_line":"            # We are refreshing the full cache using the existing cache rather"},{"line_number":3038,"context_line":"            # than what is currently in neutron."},{"line_number":3039,"context_line":"            networks, port_ids \u003d self._gather_port_ids_and_networks("},{"line_number":3040,"context_line":"                    context, instance, networks, port_ids, client)"},{"line_number":3041,"context_line":""},{"line_number":3042,"context_line":"        nw_info \u003d network_model.NetworkInfo()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_bd32da5c","line":3039,"range":{"start_line":3039,"start_character":12,"end_line":3039,"end_character":20},"updated":"2019-08-05 16:20:48.000000000","message":"The problem is that when attaching a port, this networks is a subset of the fields of...","commit_id":"3d758371f85a9101c32d8aeedd0fb74727852ffc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a877ef1ec2ba25fc6120ec6211d471757b80e42f","unresolved":false,"context_lines":[{"line_number":3037,"context_line":"            # We are refreshing the full cache using the existing cache rather"},{"line_number":3038,"context_line":"            # than what is currently in neutron."},{"line_number":3039,"context_line":"            networks, port_ids \u003d self._gather_port_ids_and_networks("},{"line_number":3040,"context_line":"                    context, instance, networks, port_ids, client)"},{"line_number":3041,"context_line":""},{"line_number":3042,"context_line":"        nw_info \u003d network_model.NetworkInfo()"},{"line_number":3043,"context_line":"        for port_id in port_ids:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_bd0bba7a","line":3040,"range":{"start_line":3040,"start_character":39,"end_line":3040,"end_character":47},"updated":"2019-08-05 16:20:48.000000000","message":"...this networks which comes from neutron. So we lose the anything that is later needed in _nw_info_build_network or anything it calls later, like _get_physnet_tunneled_info.\n\nI can at least see these fields missing:\n\n- mtu\n- segments\n- provider:physical_network\n- provider:network_type","commit_id":"3d758371f85a9101c32d8aeedd0fb74727852ffc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"902f3ab23fdd100923f0a7f846df64cbde35b1a9","unresolved":false,"context_lines":[{"line_number":1915,"context_line":"        if network and \u0027revision_number\u0027 not in network:"},{"line_number":1916,"context_line":"            # This network dict was built from the cache in"},{"line_number":1917,"context_line":"            # _gather_port_ids_and_networks and doesn\u0027t have the information"},{"line_number":1918,"context_line":"            # we need so we can\u0027t use it - we have to fetch the network."},{"line_number":1919,"context_line":"            network \u003d None"},{"line_number":1920,"context_line":"        _network \u003d network"},{"line_number":1921,"context_line":"        if self._has_multi_provider_extension(context, neutron\u003dneutron):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_ff891c6e","line":1918,"updated":"2019-08-06 08:40:56.000000000","message":"I\u0027m lost a bit. The extra \u0027network\u0027 parameter is added to use a cached network but here if the \u0027network\u0027 is cached fall back to re-fetch it.","commit_id":"7bd3365a28884e45af2f30bd06dd197366fd903f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ed87642409784dd5a44492d872f5ac780d4c260","unresolved":false,"context_lines":[{"line_number":1915,"context_line":"        if network and \u0027revision_number\u0027 not in network:"},{"line_number":1916,"context_line":"            # This network dict was built from the cache in"},{"line_number":1917,"context_line":"            # _gather_port_ids_and_networks and doesn\u0027t have the information"},{"line_number":1918,"context_line":"            # we need so we can\u0027t use it - we have to fetch the network."},{"line_number":1919,"context_line":"            network \u003d None"},{"line_number":1920,"context_line":"        _network \u003d network"},{"line_number":1921,"context_line":"        if self._has_multi_provider_extension(context, neutron\u003dneutron):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_4e919c51","line":1918,"in_reply_to":"7faddb67_ff891c6e","updated":"2019-08-06 13:08:16.000000000","message":"\u003e The extra \u0027network\u0027 parameter is added to use a cached network\n\nNot really \"cached\" but \"in scope\" meaning we already got the network by id from the port earlier in the call stack and could just pass it down here.\n\nThe issue noted here is if we\u0027ve attached a port, in that case we\u0027re rebuilding the cache from the cache for potentially part of it, e.g. let\u0027s say I create the server on network A and port A is created. Then I attach a port from network B. When rebuilding the cache during attach from network B, we\u0027ll re-use the nw info cache data for network A which comes from _gather_port_ids_and_networks and doesn\u0027t have fields in it like mtu, segments, provider:physical_network, etc. It only has id, name and tenant_id.","commit_id":"7bd3365a28884e45af2f30bd06dd197366fd903f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"902f3ab23fdd100923f0a7f846df64cbde35b1a9","unresolved":false,"context_lines":[{"line_number":1917,"context_line":"            # _gather_port_ids_and_networks and doesn\u0027t have the information"},{"line_number":1918,"context_line":"            # we need so we can\u0027t use it - we have to fetch the network."},{"line_number":1919,"context_line":"            network \u003d None"},{"line_number":1920,"context_line":"        _network \u003d network"},{"line_number":1921,"context_line":"        if self._has_multi_provider_extension(context, neutron\u003dneutron):"},{"line_number":1922,"context_line":"            if not network:"},{"line_number":1923,"context_line":"                _network \u003d neutron.show_network("}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_6c11085d","line":1920,"updated":"2019-08-06 08:40:56.000000000","message":"My brain exploded while I tried to see how \u0027_network\u0027 and \u0027network\u0027 is used below.\n\nDo we need to use \u0027network\u0027 at all below if \u0027_network\u0027 has the same value anyhow?","commit_id":"7bd3365a28884e45af2f30bd06dd197366fd903f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ed87642409784dd5a44492d872f5ac780d4c260","unresolved":false,"context_lines":[{"line_number":1917,"context_line":"            # _gather_port_ids_and_networks and doesn\u0027t have the information"},{"line_number":1918,"context_line":"            # we need so we can\u0027t use it - we have to fetch the network."},{"line_number":1919,"context_line":"            network \u003d None"},{"line_number":1920,"context_line":"        _network \u003d network"},{"line_number":1921,"context_line":"        if self._has_multi_provider_extension(context, neutron\u003dneutron):"},{"line_number":1922,"context_line":"            if not network:"},{"line_number":1923,"context_line":"                _network \u003d neutron.show_network("}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_4e9f5c4f","line":1920,"in_reply_to":"7faddb67_6c11085d","updated":"2019-08-06 13:08:16.000000000","message":"I know it\u0027s confusing, I\u0027m open to suggestions. The issue is this method potentially calls show_network twice and I wanted to avoid calling it at all of the original network passed in is not None. One could say we could just get the _network the first time and use it the second time, but the fields wouldn\u0027t be there on the second usage (the first show_network only gets the segments field, the second show_network gets provider:physical_network and provider:network_type).\n\nMaybe this is all too cute and over-complicated and we should just get the network once at the top with all three fields since we\u0027re going to get the network at least once in this method anyway. That would simplify things and I could decouple that as a separate patch from this more complicated one that passes in the network kwarg.","commit_id":"7bd3365a28884e45af2f30bd06dd197366fd903f"}]}
