)]}'
{"nova/network/neutronv2/api.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5c14433e13817ba4ce22d355d1c99a0775c5545e","unresolved":false,"context_lines":[{"line_number":1522,"context_line":"        raise exception.FixedIpNotFoundForSpecificInstance("},{"line_number":1523,"context_line":"                instance_uuid\u003dinstance.uuid, ip\u003daddress)"},{"line_number":1524,"context_line":""},{"line_number":1525,"context_line":"    def _get_network_info(self, context, neutron, net_id):"},{"line_number":1526,"context_line":"        \"\"\"Retrieve detailed network info."},{"line_number":1527,"context_line":""},{"line_number":1528,"context_line":"        :param context: The request context."}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_49be1ad5","line":1525,"range":{"start_line":1525,"start_character":8,"end_line":1525,"end_character":25},"updated":"2018-06-18 14:20:09.000000000","message":"Even with the addition of the tunneled flag being returned, I don\u0027t think the rename I proposed earlier is worse than this, which seems exceedingly generic, when in fact it\u0027s quite specific. All over the code \"network info\" means something very specific, especially to instances...","commit_id":"9618878ec49c1ee13d520c30009e9d63adc11ee5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5c14433e13817ba4ce22d355d1c99a0775c5545e","unresolved":false,"context_lines":[{"line_number":1645,"context_line":"                    context, neutron, network_id)"},{"line_number":1646,"context_line":"                if physnet:"},{"line_number":1647,"context_line":"                    physnets.append(physnet)"},{"line_number":1648,"context_line":"                tunneled \u003d tunneled or tunneled_"},{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":"            if request_net.port_id:"},{"line_number":1651,"context_line":"                vnic_type, trusted \u003d self._get_port_vnic_info("}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_09ad829a","line":1648,"updated":"2018-06-18 14:20:09.000000000","message":"Looks like this is unused currently. Are you doing this dance to avoid the pep8 warning? I would kinda think you should just leave the throw-away variable in place until the later patch where you need to use it.","commit_id":"9618878ec49c1ee13d520c30009e9d63adc11ee5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d042fd9e3710c19fb14d950ea5033acebef248ca","unresolved":false,"context_lines":[{"line_number":1632,"context_line":"                    context, neutron, network_id)"},{"line_number":1633,"context_line":"                if physnet:"},{"line_number":1634,"context_line":"                    physnets.append(physnet)"},{"line_number":1635,"context_line":"                tunneled \u003d tunneled or tunneled_"},{"line_number":1636,"context_line":""},{"line_number":1637,"context_line":"            if request_net.port_id:"},{"line_number":1638,"context_line":"                vnic_type, trusted \u003d self._get_port_vnic_info("}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_bd1543e8","line":1635,"updated":"2018-06-22 10:43:59.000000000","message":"I don\u0027t get why we need this. Can we simply use a single tunneled variable initailized to False and set by _get_network_info() ?","commit_id":"6370c38ecc9452a39dca2f4221c2fd8b6ea71825"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f43586a726222c7fe6dba08035e8334186889eb1","unresolved":false,"context_lines":[{"line_number":1632,"context_line":"                    context, neutron, network_id)"},{"line_number":1633,"context_line":"                if physnet:"},{"line_number":1634,"context_line":"                    physnets.append(physnet)"},{"line_number":1635,"context_line":"                tunneled \u003d tunneled or tunneled_"},{"line_number":1636,"context_line":""},{"line_number":1637,"context_line":"            if request_net.port_id:"},{"line_number":1638,"context_line":"                vnic_type, trusted \u003d self._get_port_vnic_info("}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_16319a0b","line":1635,"in_reply_to":"5f7c97a3_552643bc","updated":"2018-06-25 12:55:02.000000000","message":"You are right. Sorry, my Friday brain wasn\u0027t enough to notice the that we are in a for loop.","commit_id":"6370c38ecc9452a39dca2f4221c2fd8b6ea71825"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"eaf1f4bd6e303d20ac4b75da81f21bd2ba699776","unresolved":false,"context_lines":[{"line_number":1632,"context_line":"                    context, neutron, network_id)"},{"line_number":1633,"context_line":"                if physnet:"},{"line_number":1634,"context_line":"                    physnets.append(physnet)"},{"line_number":1635,"context_line":"                tunneled \u003d tunneled or tunneled_"},{"line_number":1636,"context_line":""},{"line_number":1637,"context_line":"            if request_net.port_id:"},{"line_number":1638,"context_line":"                vnic_type, trusted \u003d self._get_port_vnic_info("}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_552643bc","line":1635,"in_reply_to":"5f7c97a3_bd1543e8","updated":"2018-06-22 15:04:06.000000000","message":"We need to return True if _any_ of the networks are tunneled networks. As a result, I can\u0027t just set it or I\u0027ll only see the result for the last requested network","commit_id":"6370c38ecc9452a39dca2f4221c2fd8b6ea71825"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"110ef0b7d5eef1de5c4a475ee76887648f36a0fe","unresolved":false,"context_lines":[{"line_number":1536,"context_line":"        raise exception.FixedIpNotFoundForSpecificInstance("},{"line_number":1537,"context_line":"                instance_uuid\u003dinstance.uuid, ip\u003daddress)"},{"line_number":1538,"context_line":""},{"line_number":1539,"context_line":"    def _get_physnet_tunneled_info(self, context, neutron, net_id):"},{"line_number":1540,"context_line":"        \"\"\"Retrieve detailed network info."},{"line_number":1541,"context_line":""},{"line_number":1542,"context_line":"        :param context: The request context."}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_9197d839","line":1539,"range":{"start_line":1539,"start_character":8,"end_line":1539,"end_character":34},"updated":"2018-06-26 12:15:45.000000000","message":"nit: _get_physnet_and_tunneled_info()","commit_id":"df449e3834cc44e9860fce235ed70662a48149c5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5496483085913a3b10ea394c9fe533a2f54241de","unresolved":false,"context_lines":[{"line_number":1536,"context_line":"        raise exception.FixedIpNotFoundForSpecificInstance("},{"line_number":1537,"context_line":"                instance_uuid\u003dinstance.uuid, ip\u003daddress)"},{"line_number":1538,"context_line":""},{"line_number":1539,"context_line":"    def _get_physnet_tunneled_info(self, context, neutron, net_id):"},{"line_number":1540,"context_line":"        \"\"\"Retrieve detailed network info."},{"line_number":1541,"context_line":""},{"line_number":1542,"context_line":"        :param context: The request context."}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_002a8c8f","line":1539,"range":{"start_line":1539,"start_character":8,"end_line":1539,"end_character":34},"in_reply_to":"5f7c97a3_9197d839","updated":"2018-06-26 15:52:28.000000000","message":"I went with \u0027get_network_physnet_tunneled_info\u0027 to keep it in line with \u0027_get_port_vnic_info\u0027 above","commit_id":"df449e3834cc44e9860fce235ed70662a48149c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"594eec8fbda9a567f99b240e047247898b559bda","unresolved":false,"context_lines":[{"line_number":1544,"context_line":"        :param net_id: The ID of the network to retrieve information for."},{"line_number":1545,"context_line":""},{"line_number":1546,"context_line":"        :return: A tuple containing the physnet name, if defined, and the"},{"line_number":1547,"context_line":"            tunneled status of the network. If a the network uses multiple"},{"line_number":1548,"context_line":"            segments, the first segment that defines a physnet value will be"},{"line_number":1549,"context_line":"            used for the physnet name."},{"line_number":1550,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_65f4b287","line":1547,"range":{"start_line":1547,"start_character":47,"end_line":1547,"end_character":52},"updated":"2018-06-26 14:48:29.000000000","message":"just \u0027the\u0027","commit_id":"df449e3834cc44e9860fce235ed70662a48149c5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5496483085913a3b10ea394c9fe533a2f54241de","unresolved":false,"context_lines":[{"line_number":1544,"context_line":"        :param net_id: The ID of the network to retrieve information for."},{"line_number":1545,"context_line":""},{"line_number":1546,"context_line":"        :return: A tuple containing the physnet name, if defined, and the"},{"line_number":1547,"context_line":"            tunneled status of the network. If a the network uses multiple"},{"line_number":1548,"context_line":"            segments, the first segment that defines a physnet value will be"},{"line_number":1549,"context_line":"            used for the physnet name."},{"line_number":1550,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_a012b85f","line":1547,"range":{"start_line":1547,"start_character":47,"end_line":1547,"end_character":52},"in_reply_to":"5f7c97a3_65f4b287","updated":"2018-06-26 15:52:28.000000000","message":"Done","commit_id":"df449e3834cc44e9860fce235ed70662a48149c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"594eec8fbda9a567f99b240e047247898b559bda","unresolved":false,"context_lines":[{"line_number":1549,"context_line":"            used for the physnet name."},{"line_number":1550,"context_line":"        \"\"\""},{"line_number":1551,"context_line":"        def is_tunneled(net):"},{"line_number":1552,"context_line":"            return net.get(\u0027provider:network_type\u0027) in [\u0027vxlan\u0027, \u0027gre\u0027,"},{"line_number":1553,"context_line":"                                                        \u0027geneve\u0027]"},{"line_number":1554,"context_line":""},{"line_number":1555,"context_line":"        if self._has_multi_provider_extension(context, neutron\u003dneutron):"},{"line_number":1556,"context_line":"            network \u003d neutron.show_network(net_id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_655a7250","line":1553,"range":{"start_line":1552,"start_character":65,"end_line":1553,"end_character":64},"updated":"2018-06-26 14:48:29.000000000","message":"I don\u0027t see any tests where tunneled is checked for either gre or geneve.","commit_id":"df449e3834cc44e9860fce235ed70662a48149c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"594eec8fbda9a567f99b240e047247898b559bda","unresolved":false,"context_lines":[{"line_number":1550,"context_line":"        \"\"\""},{"line_number":1551,"context_line":"        def is_tunneled(net):"},{"line_number":1552,"context_line":"            return net.get(\u0027provider:network_type\u0027) in [\u0027vxlan\u0027, \u0027gre\u0027,"},{"line_number":1553,"context_line":"                                                        \u0027geneve\u0027]"},{"line_number":1554,"context_line":""},{"line_number":1555,"context_line":"        if self._has_multi_provider_extension(context, neutron\u003dneutron):"},{"line_number":1556,"context_line":"            network \u003d neutron.show_network(net_id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_a55aca7e","line":1553,"range":{"start_line":1553,"start_character":57,"end_line":1553,"end_character":63},"updated":"2018-06-26 14:48:29.000000000","message":"So, missing docs on this?\n\nhttps://docs.openstack.org/neutron/pike/admin/intro-overlay-protocols.html\n\nI\u0027ve never heard of geneve.\n\nhttps://bugs.launchpad.net/neutron/+bug/1778741","commit_id":"df449e3834cc44e9860fce235ed70662a48149c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"594eec8fbda9a567f99b240e047247898b559bda","unresolved":false,"context_lines":[{"line_number":1647,"context_line":"            vnic_type \u003d network_model.VNIC_TYPE_NORMAL"},{"line_number":1648,"context_line":"            pci_request_id \u003d None"},{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":"            if request_net.port_id:"},{"line_number":1651,"context_line":"                vnic_type, trusted, network_id \u003d self._get_port_vnic_info("},{"line_number":1652,"context_line":"                    context, neutron, request_net.port_id)"},{"line_number":1653,"context_line":"                physnet, tunneled_ \u003d self._get_physnet_tunneled_info("},{"line_number":1654,"context_line":"                    context, neutron, network_id)"},{"line_number":1655,"context_line":"            elif request_net.network_id and not request_net.auto_allocate:"},{"line_number":1656,"context_line":"                network_id \u003d request_net.network_id"},{"line_number":1657,"context_line":"                physnet, tunneled_ \u003d self._get_physnet_tunneled_info("},{"line_number":1658,"context_line":"                    context, neutron, network_id)"},{"line_number":1659,"context_line":""},{"line_number":1660,"context_line":"            tunneled \u003d tunneled or tunneled_"},{"line_number":1661,"context_line":"            if physnet:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_8541ce65","line":1658,"range":{"start_line":1650,"start_character":12,"end_line":1658,"end_character":49},"updated":"2018-06-26 14:48:29.000000000","message":"Not sure that we have a fall through test case for this where neither of these conditions are true.","commit_id":"df449e3834cc44e9860fce235ed70662a48149c5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5496483085913a3b10ea394c9fe533a2f54241de","unresolved":false,"context_lines":[{"line_number":1647,"context_line":"            vnic_type \u003d network_model.VNIC_TYPE_NORMAL"},{"line_number":1648,"context_line":"            pci_request_id \u003d None"},{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":"            if request_net.port_id:"},{"line_number":1651,"context_line":"                vnic_type, trusted, network_id \u003d self._get_port_vnic_info("},{"line_number":1652,"context_line":"                    context, neutron, request_net.port_id)"},{"line_number":1653,"context_line":"                physnet, tunneled_ \u003d self._get_physnet_tunneled_info("},{"line_number":1654,"context_line":"                    context, neutron, network_id)"},{"line_number":1655,"context_line":"            elif request_net.network_id and not request_net.auto_allocate:"},{"line_number":1656,"context_line":"                network_id \u003d request_net.network_id"},{"line_number":1657,"context_line":"                physnet, tunneled_ \u003d self._get_physnet_tunneled_info("},{"line_number":1658,"context_line":"                    context, neutron, network_id)"},{"line_number":1659,"context_line":""},{"line_number":1660,"context_line":"            tunneled \u003d tunneled or tunneled_"},{"line_number":1661,"context_line":"            if physnet:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_0b462d51","line":1658,"range":{"start_line":1650,"start_character":12,"end_line":1658,"end_character":49},"in_reply_to":"5f7c97a3_8541ce65","updated":"2018-06-26 15:52:28.000000000","message":"We do - there\u0027s an auto_allocate test case that would prove this out","commit_id":"df449e3834cc44e9860fce235ed70662a48149c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"594eec8fbda9a567f99b240e047247898b559bda","unresolved":false,"context_lines":[{"line_number":1657,"context_line":"                physnet, tunneled_ \u003d self._get_physnet_tunneled_info("},{"line_number":1658,"context_line":"                    context, neutron, network_id)"},{"line_number":1659,"context_line":""},{"line_number":1660,"context_line":"            tunneled \u003d tunneled or tunneled_"},{"line_number":1661,"context_line":"            if physnet:"},{"line_number":1662,"context_line":"                physnets.add(physnet)"},{"line_number":1663,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_457656da","line":1660,"updated":"2018-06-26 14:48:29.000000000","message":"This seems weird - we\u0027re going to say tunneled\u003dTrue if any of them are? This could probably use a code comment.","commit_id":"df449e3834cc44e9860fce235ed70662a48149c5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5496483085913a3b10ea394c9fe533a2f54241de","unresolved":false,"context_lines":[{"line_number":1657,"context_line":"                physnet, tunneled_ \u003d self._get_physnet_tunneled_info("},{"line_number":1658,"context_line":"                    context, neutron, network_id)"},{"line_number":1659,"context_line":""},{"line_number":1660,"context_line":"            tunneled \u003d tunneled or tunneled_"},{"line_number":1661,"context_line":"            if physnet:"},{"line_number":1662,"context_line":"                physnets.add(physnet)"},{"line_number":1663,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_ab55b9fa","line":1660,"in_reply_to":"5f7c97a3_457656da","updated":"2018-06-26 15:52:28.000000000","message":"Yeah, I\u0027d left a comment on the object but I have commented it here now. All tunneled traffic must use the same logical NIC so we just need to know if there is one or more tunneled networks present.","commit_id":"df449e3834cc44e9860fce235ed70662a48149c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d16e4665c0d94c9d9dcd569b6c1933939bf0ccb9","unresolved":false,"context_lines":[{"line_number":1657,"context_line":"                physnet, tunneled_ \u003d self._get_physnet_tunneled_info("},{"line_number":1658,"context_line":"                    context, neutron, network_id)"},{"line_number":1659,"context_line":""},{"line_number":1660,"context_line":"            tunneled \u003d tunneled or tunneled_"},{"line_number":1661,"context_line":"            if physnet:"},{"line_number":1662,"context_line":"                physnets.add(physnet)"},{"line_number":1663,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_46f97c7d","line":1660,"in_reply_to":"5f7c97a3_ab55b9fa","updated":"2018-06-26 16:24:44.000000000","message":"\u003e All tunneled traffic must use the same logical NIC so we just need to know if there is one or more tunneled networks present.\n\nThat is a more clear answer and should probably be part of the code documentation.","commit_id":"df449e3834cc44e9860fce235ed70662a48149c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"594eec8fbda9a567f99b240e047247898b559bda","unresolved":false,"context_lines":[{"line_number":1689,"context_line":"            request_net.pci_request_id \u003d pci_request_id"},{"line_number":1690,"context_line":""},{"line_number":1691,"context_line":"        return objects.InstanceNUMANetworkInfo(physnets\u003dlist(physnets),"},{"line_number":1692,"context_line":"                                               tunneled\u003dtunneled)"},{"line_number":1693,"context_line":""},{"line_number":1694,"context_line":"    def _can_auto_allocate_network(self, context, neutron):"},{"line_number":1695,"context_line":"        \"\"\"Helper method to determine if we can auto-allocate networks"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_8568eef3","line":1692,"range":{"start_line":1692,"start_character":47,"end_line":1692,"end_character":64},"updated":"2018-06-26 14:48:29.000000000","message":"So this is going to be True if any of the requested networks are tunneled?","commit_id":"df449e3834cc44e9860fce235ed70662a48149c5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5496483085913a3b10ea394c9fe533a2f54241de","unresolved":false,"context_lines":[{"line_number":1689,"context_line":"            request_net.pci_request_id \u003d pci_request_id"},{"line_number":1690,"context_line":""},{"line_number":1691,"context_line":"        return objects.InstanceNUMANetworkInfo(physnets\u003dlist(physnets),"},{"line_number":1692,"context_line":"                                               tunneled\u003dtunneled)"},{"line_number":1693,"context_line":""},{"line_number":1694,"context_line":"    def _can_auto_allocate_network(self, context, neutron):"},{"line_number":1695,"context_line":"        \"\"\"Helper method to determine if we can auto-allocate networks"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_407de419","line":1692,"range":{"start_line":1692,"start_character":47,"end_line":1692,"end_character":64},"in_reply_to":"5f7c97a3_8568eef3","updated":"2018-06-26 15:52:28.000000000","message":"Correct. Comment left above and tests should prove this.","commit_id":"df449e3834cc44e9860fce235ed70662a48149c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"400a695b706fb68eedc77d4a56375c49ac96ae4f","unresolved":false,"context_lines":[{"line_number":1657,"context_line":"                physnet, tunneled_ \u003d self._get_network_physnet_tunneled_info("},{"line_number":1658,"context_line":"                    context, neutron, network_id)"},{"line_number":1659,"context_line":""},{"line_number":1660,"context_line":"            # neutron only supports a single tunnel provider per host"},{"line_number":1661,"context_line":"            tunneled \u003d tunneled or tunneled_"},{"line_number":1662,"context_line":"            if physnet:"},{"line_number":1663,"context_line":"                physnets.add(physnet)"},{"line_number":1664,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_86cc7434","line":1661,"range":{"start_line":1660,"start_character":12,"end_line":1661,"end_character":44},"updated":"2018-06-26 16:28:56.000000000","message":"See previous comments about why this is still confusing. Also, based on this, you\u0027re building business logic into the data object. It seems what you should have is a simple object which contains the physnet name and tunneled value (based on type). Then you have a list of those per request. Then your business logic that cares about the tunneled value can check if at least one of the requested networks is tunneled, then do your special thing. But don\u0027t bake that logic into the object itself.","commit_id":"2b61d39871625f54b376a9596f3d55368caf3afa"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"69c40edce2e5e41c25c466afce6118d933991921","unresolved":false,"context_lines":[{"line_number":1657,"context_line":"                physnet, tunneled_ \u003d self._get_network_physnet_tunneled_info("},{"line_number":1658,"context_line":"                    context, neutron, network_id)"},{"line_number":1659,"context_line":""},{"line_number":1660,"context_line":"            # neutron only supports a single tunnel provider per host"},{"line_number":1661,"context_line":"            tunneled \u003d tunneled or tunneled_"},{"line_number":1662,"context_line":"            if physnet:"},{"line_number":1663,"context_line":"                physnets.add(physnet)"},{"line_number":1664,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_d127f562","line":1661,"range":{"start_line":1660,"start_character":12,"end_line":1661,"end_character":44},"in_reply_to":"5f7c97a3_49a81f1f","updated":"2018-07-03 15:50:30.000000000","message":"Done","commit_id":"2b61d39871625f54b376a9596f3d55368caf3afa"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"fa23eb75782cea9ffc8d634ede2fd4f725dbcf31","unresolved":false,"context_lines":[{"line_number":1657,"context_line":"                physnet, tunneled_ \u003d self._get_network_physnet_tunneled_info("},{"line_number":1658,"context_line":"                    context, neutron, network_id)"},{"line_number":1659,"context_line":""},{"line_number":1660,"context_line":"            # neutron only supports a single tunnel provider per host"},{"line_number":1661,"context_line":"            tunneled \u003d tunneled or tunneled_"},{"line_number":1662,"context_line":"            if physnet:"},{"line_number":1663,"context_line":"                physnets.add(physnet)"},{"line_number":1664,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_e8fee004","line":1661,"range":{"start_line":1660,"start_character":12,"end_line":1661,"end_character":44},"in_reply_to":"5f7c97a3_86cc7434","updated":"2018-07-02 13:53:54.000000000","message":"I can\u0027t really do that though. Hopefully I can explain why.\n\nThis object holds information for two types of network: networks configured for the guest (i.e. extracted from NetworkRequest(List)) and networks available on the host. The reason we need this information is because network traffic travels between VIFs and physical NICs and we need to make sure the VIFs (and therefore, the instance those VIFs are attached to) are running on the same NUMA node(s) as the physical NIC(s). There are potentially tens of thousands of neutron networks accessible from a given host and we don\u0027t want to map every single one of those to a NIC. Instead, we want to find some attribute that is common between networks using the same NIC. For L2 networks, this is the physnet attribute, which is an arbitrary string used to distinguish between multiple physical (in the sense of physical wiring) networks. For L3 (tunneled) networks, this is merely the fact that they are L3 networks because, in neutron, *all* L3 networks must use the same logical NIC. An L3 network (e.g. \u0027provider:network_type\u003dvxlan\u0027) will never have a physnet attribute set (e.g. \u0027provider:physical_network\u003dprovider1\u0027) and vice versa.\n\nI said there are two types of networks we need to hold information for. For the former, guest networks, the user can request N networks, some of which may be tunneled and some of which may have physnet attributes. However, regardless of how many networks there are, all we care about is the combined set of physnet attributes for the L2 networks and whether any of the networks are L3 networks. We explicitly don\u0027t want to do a 1:1 mapping between each individual NetworkRequest (for the networks requested for a guest) to a new simple object because it would be completely unnecessary. It\u0027s possible that many of the L2 networks requested could be mapped to the same physnet, while all tunneled networks _must_ use the same logical NIC for ingress/egress traffic. As a result, we\u0027d have to de-dupe these objects into what we essentially have here - a set of physnets and a \"has one or more tunneled networks\" attribute every single time we need to consume this information.\n\nThe problem would be even worse for the list of networks available to the host. Not only is there are a massive amount of possible networks (who wants to iterate over 10k objects and store them in memory?) but we\u0027ve designed the configuration options to focus on physnets and the tunnel\u0027ness of networks to allow things like tenant networking. As such, we don\u0027t even have a network-like thing to map to so the combined list is ultimately what we want and what we need.\n\nDoes that help?","commit_id":"2b61d39871625f54b376a9596f3d55368caf3afa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"06538118db6d869aabfd379d42f7d0600f3d953a","unresolved":false,"context_lines":[{"line_number":1657,"context_line":"                physnet, tunneled_ \u003d self._get_network_physnet_tunneled_info("},{"line_number":1658,"context_line":"                    context, neutron, network_id)"},{"line_number":1659,"context_line":""},{"line_number":1660,"context_line":"            # neutron only supports a single tunnel provider per host"},{"line_number":1661,"context_line":"            tunneled \u003d tunneled or tunneled_"},{"line_number":1662,"context_line":"            if physnet:"},{"line_number":1663,"context_line":"                physnets.add(physnet)"},{"line_number":1664,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_49a81f1f","line":1661,"range":{"start_line":1660,"start_character":12,"end_line":1661,"end_character":44},"in_reply_to":"5f7c97a3_e8fee004","updated":"2018-07-03 12:56:33.000000000","message":"Yes that helps. I\u0027d suggest putting a solid docstring with a lot of this detail into the new NetworkDetails object itself since all of this new code is light on documentation - plus that would help to distinguish the NetworkDetails object from other things like NetworkInfo for an instance.","commit_id":"2b61d39871625f54b376a9596f3d55368caf3afa"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"595e2ed69d4c8624c55d0b6ad69aeb89cfd896f9","unresolved":false,"context_lines":[{"line_number":1549,"context_line":"            used for the physnet name."},{"line_number":1550,"context_line":"        \"\"\""},{"line_number":1551,"context_line":"        def is_tunneled(net):"},{"line_number":1552,"context_line":"            return net.get(\u0027provider:network_type\u0027) in [\u0027vxlan\u0027, \u0027gre\u0027,"},{"line_number":1553,"context_line":"                                                        \u0027geneve\u0027]"},{"line_number":1554,"context_line":""},{"line_number":1555,"context_line":"        if self._has_multi_provider_extension(context, neutron\u003dneutron):"},{"line_number":1556,"context_line":"            network \u003d neutron.show_network(net_id,"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_2c1d1510","line":1553,"range":{"start_line":1552,"start_character":55,"end_line":1553,"end_character":65},"updated":"2018-06-28 06:06:33.000000000","message":"We probably want this in a constant, we can put that in network/models.py","commit_id":"ae3dec3e3c8c3c3c4804c8a00605bb8e88190749"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8748eb45c6e85af024bfe719fc7a030f748cf276","unresolved":false,"context_lines":[{"line_number":1549,"context_line":"            used for the physnet name."},{"line_number":1550,"context_line":"        \"\"\""},{"line_number":1551,"context_line":"        def is_tunneled(net):"},{"line_number":1552,"context_line":"            return net.get(\u0027provider:network_type\u0027) in [\u0027vxlan\u0027, \u0027gre\u0027,"},{"line_number":1553,"context_line":"                                                        \u0027geneve\u0027]"},{"line_number":1554,"context_line":""},{"line_number":1555,"context_line":"        if self._has_multi_provider_extension(context, neutron\u003dneutron):"},{"line_number":1556,"context_line":"            network \u003d neutron.show_network(net_id,"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_63a43308","line":1553,"range":{"start_line":1552,"start_character":55,"end_line":1553,"end_character":65},"in_reply_to":"5f7c97a3_222759ca","updated":"2018-07-02 14:03:23.000000000","message":"Done","commit_id":"ae3dec3e3c8c3c3c4804c8a00605bb8e88190749"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"674a9dc03e6aa40cdabacab2b076f9b296f59921","unresolved":false,"context_lines":[{"line_number":1549,"context_line":"            used for the physnet name."},{"line_number":1550,"context_line":"        \"\"\""},{"line_number":1551,"context_line":"        def is_tunneled(net):"},{"line_number":1552,"context_line":"            return net.get(\u0027provider:network_type\u0027) in [\u0027vxlan\u0027, \u0027gre\u0027,"},{"line_number":1553,"context_line":"                                                        \u0027geneve\u0027]"},{"line_number":1554,"context_line":""},{"line_number":1555,"context_line":"        if self._has_multi_provider_extension(context, neutron\u003dneutron):"},{"line_number":1556,"context_line":"            network \u003d neutron.show_network(net_id,"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_222759ca","line":1553,"range":{"start_line":1552,"start_character":55,"end_line":1553,"end_character":65},"in_reply_to":"5f7c97a3_2c1d1510","updated":"2018-06-28 12:11:25.000000000","message":"This is just a suggestion.","commit_id":"ae3dec3e3c8c3c3c4804c8a00605bb8e88190749"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"595e2ed69d4c8624c55d0b6ad69aeb89cfd896f9","unresolved":false,"context_lines":[{"line_number":1568,"context_line":"                # physical networks."},{"line_number":1569,"context_line":"                physnet_name \u003d net.get(\u0027provider:physical_network\u0027)"},{"line_number":1570,"context_line":"                if physnet_name:"},{"line_number":1571,"context_line":"                    return physnet_name, is_tunneled(net)"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":"            # Raising here as at least one segment should"},{"line_number":1574,"context_line":"            # have a physical network provided."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_0c7939c4","line":1571,"range":{"start_line":1571,"start_character":53,"end_line":1571,"end_character":56},"updated":"2018-06-28 06:06:33.000000000","message":"You should pass segment here, right?\n\nLine 1556 you are only asking for field \u0027segments\u0027 -  My thinking is that you should not have a \u0027provider:network_type\u0027 inside \u0027net\u0027.\n\nBut in the context of that loop the \u0027segment\u0027 should provide one by its attribute:\n\n  segment.network_type","commit_id":"ae3dec3e3c8c3c3c4804c8a00605bb8e88190749"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8748eb45c6e85af024bfe719fc7a030f748cf276","unresolved":false,"context_lines":[{"line_number":1568,"context_line":"                # physical networks."},{"line_number":1569,"context_line":"                physnet_name \u003d net.get(\u0027provider:physical_network\u0027)"},{"line_number":1570,"context_line":"                if physnet_name:"},{"line_number":1571,"context_line":"                    return physnet_name, is_tunneled(net)"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":"            # Raising here as at least one segment should"},{"line_number":1574,"context_line":"            # have a physical network provided."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_83e5cf40","line":1571,"range":{"start_line":1571,"start_character":53,"end_line":1571,"end_character":56},"in_reply_to":"5f7c97a3_0c7939c4","updated":"2018-07-02 14:03:23.000000000","message":"According to the neutron API ref [1], this is correct as-is.\n\n\t{\n\t    \"network\": {\n\t\t...\n\t\t\"segments\": [\n\t\t    {\n\t\t        \"provider:network_type\": \"vlan\",\n\t\t        \"provider:physical_network\": \"public\",\n\t\t        \"provider:segmentation_id\": 2\n\t\t    },\n\t\t    {\n\t\t        \"provider:network_type\": \"flat\",\n\t\t        \"provider:physical_network\": \"default\",\n\t\t        \"provider:segmentation_id\": 0\n\t\t    }\n\t\t],\n\t\t...\n\t    }\n\t}\n\nRight?\n\n[1] https://developer.openstack.org/api-ref/network/v2/#show-network-details","commit_id":"ae3dec3e3c8c3c3c4804c8a00605bb8e88190749"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d507c57150c1a16dbe8f3b364f922882d2c08a29","unresolved":false,"context_lines":[{"line_number":1568,"context_line":"                # physical networks."},{"line_number":1569,"context_line":"                physnet_name \u003d net.get(\u0027provider:physical_network\u0027)"},{"line_number":1570,"context_line":"                if physnet_name:"},{"line_number":1571,"context_line":"                    return physnet_name, is_tunneled(net)"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":"            # Raising here as at least one segment should"},{"line_number":1574,"context_line":"            # have a physical network provided."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_7bc84055","line":1571,"range":{"start_line":1571,"start_character":53,"end_line":1571,"end_character":56},"in_reply_to":"5f7c97a3_38d3b339","updated":"2018-07-03 14:36:24.000000000","message":"You mean line 1569? If so, I think that\u0027s correct too because we\u0027re retrieving from the \u0027net\u0027 variable which is a segment and not the entire network. Reproduced below without the huge comment.\n\n    segments \u003d network.get(\u0027segments\u0027, {})\n    for net in segments:\n        ...\n        physnet_name \u003d net.get(\u0027provider:physical_network\u0027)\n\nOr am I still missing something?","commit_id":"ae3dec3e3c8c3c3c4804c8a00605bb8e88190749"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6f105acbf9edd0cf876ca25315f1f088d895238c","unresolved":false,"context_lines":[{"line_number":1568,"context_line":"                # physical networks."},{"line_number":1569,"context_line":"                physnet_name \u003d net.get(\u0027provider:physical_network\u0027)"},{"line_number":1570,"context_line":"                if physnet_name:"},{"line_number":1571,"context_line":"                    return physnet_name, is_tunneled(net)"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":"            # Raising here as at least one segment should"},{"line_number":1574,"context_line":"            # have a physical network provided."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_923bc837","line":1571,"range":{"start_line":1571,"start_character":53,"end_line":1571,"end_character":56},"in_reply_to":"5f7c97a3_61be6a65","updated":"2018-07-03 08:44:07.000000000","message":"What do you mean?","commit_id":"ae3dec3e3c8c3c3c4804c8a00605bb8e88190749"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"a04f8ce7634c51c89db7a83ff4193632420d88ae","unresolved":false,"context_lines":[{"line_number":1568,"context_line":"                # physical networks."},{"line_number":1569,"context_line":"                physnet_name \u003d net.get(\u0027provider:physical_network\u0027)"},{"line_number":1570,"context_line":"                if physnet_name:"},{"line_number":1571,"context_line":"                    return physnet_name, is_tunneled(net)"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":"            # Raising here as at least one segment should"},{"line_number":1574,"context_line":"            # have a physical network provided."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_6e74eed0","line":1571,"range":{"start_line":1571,"start_character":53,"end_line":1571,"end_character":56},"in_reply_to":"5f7c97a3_7bc84055","updated":"2018-07-04 07:11:31.000000000","message":"Oh... I\u0027m sorry Stephen, you are right I don\u0027t know why I had in my head that \u0027net\u0027 is actually \u0027network\u0027 variable :/","commit_id":"ae3dec3e3c8c3c3c4804c8a00605bb8e88190749"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"5b05839d6fe3e40919178c6aa91f220e41a7c35f","unresolved":false,"context_lines":[{"line_number":1568,"context_line":"                # physical networks."},{"line_number":1569,"context_line":"                physnet_name \u003d net.get(\u0027provider:physical_network\u0027)"},{"line_number":1570,"context_line":"                if physnet_name:"},{"line_number":1571,"context_line":"                    return physnet_name, is_tunneled(net)"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":"            # Raising here as at least one segment should"},{"line_number":1574,"context_line":"            # have a physical network provided."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_61be6a65","line":1571,"range":{"start_line":1571,"start_character":53,"end_line":1571,"end_character":56},"in_reply_to":"5f7c97a3_83e5cf40","updated":"2018-07-02 16:12:04.000000000","message":"I guess yes... but that does not seem to fit with what is done.","commit_id":"ae3dec3e3c8c3c3c4804c8a00605bb8e88190749"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"f98a94a15ce29e1d7c21596f6263f2275dbe0613","unresolved":false,"context_lines":[{"line_number":1568,"context_line":"                # physical networks."},{"line_number":1569,"context_line":"                physnet_name \u003d net.get(\u0027provider:physical_network\u0027)"},{"line_number":1570,"context_line":"                if physnet_name:"},{"line_number":1571,"context_line":"                    return physnet_name, is_tunneled(net)"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":"            # Raising here as at least one segment should"},{"line_number":1574,"context_line":"            # have a physical network provided."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_38d3b339","line":1571,"range":{"start_line":1571,"start_character":53,"end_line":1571,"end_character":56},"in_reply_to":"5f7c97a3_923bc837","updated":"2018-07-03 09:58:25.000000000","message":"It\u0027s not really your code, but line 1571 we retrieve \u0027provider:physical_network\u0027 from network where based on the neutron API ref that should be retrieved from segments.\n\nno?","commit_id":"ae3dec3e3c8c3c3c4804c8a00605bb8e88190749"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1bcf70e259d4eb605692e0bc4882ff764123a0f4","unresolved":false,"context_lines":[{"line_number":56,"context_line":"BINDING_PROFILE \u003d \u0027binding:profile\u0027"},{"line_number":57,"context_line":"BINDING_HOST_ID \u003d \u0027binding:host_id\u0027"},{"line_number":58,"context_line":"MIGRATING_ATTR \u003d \u0027migrating_to\u0027"},{"line_number":59,"context_line":"L3_NETWORK_TYPES \u003d [\u0027vxlan\u0027, \u0027gre\u0027, \u0027geneve\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"def reset_state():"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_1c50f008","line":59,"updated":"2018-07-05 21:04:51.000000000","message":"ack: https://docs.openstack.org/neutron/latest/admin/intro-overlay-protocols.html","commit_id":"70538a5fbc8a09dbbd627bd6f9b5a3db7794a70d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1bcf70e259d4eb605692e0bc4882ff764123a0f4","unresolved":false,"context_lines":[{"line_number":1547,"context_line":"        :param net_id: The ID of the network to retrieve information for."},{"line_number":1548,"context_line":""},{"line_number":1549,"context_line":"        :return: A tuple containing the physnet name, if defined, and the"},{"line_number":1550,"context_line":"            tunneled status of the network. If the network uses multiple"},{"line_number":1551,"context_line":"            segments, the first segment that defines a physnet value will be"},{"line_number":1552,"context_line":"            used for the physnet name."},{"line_number":1553,"context_line":"        \"\"\""},{"line_number":1554,"context_line":"        def is_tunneled(net):"},{"line_number":1555,"context_line":"            return net.get(\u0027provider:network_type\u0027) in L3_NETWORK_TYPES"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_5ccf48b2","line":1552,"range":{"start_line":1550,"start_character":44,"end_line":1552,"end_character":38},"updated":"2018-07-05 21:04:51.000000000","message":"Hmm, interesting. Looking at the affected unit test, if there are multiple segments and one is a tunneled network type, we aren\u0027t going to say the network is tunneled if it doesn\u0027t have a physnet name.","commit_id":"70538a5fbc8a09dbbd627bd6f9b5a3db7794a70d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"943e8397e52209007ea858ec6d90d33cc675c03f","unresolved":false,"context_lines":[{"line_number":1547,"context_line":"        :param net_id: The ID of the network to retrieve information for."},{"line_number":1548,"context_line":""},{"line_number":1549,"context_line":"        :return: A tuple containing the physnet name, if defined, and the"},{"line_number":1550,"context_line":"            tunneled status of the network. If the network uses multiple"},{"line_number":1551,"context_line":"            segments, the first segment that defines a physnet value will be"},{"line_number":1552,"context_line":"            used for the physnet name."},{"line_number":1553,"context_line":"        \"\"\""},{"line_number":1554,"context_line":"        def is_tunneled(net):"},{"line_number":1555,"context_line":"            return net.get(\u0027provider:network_type\u0027) in L3_NETWORK_TYPES"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_8b4ad37f","line":1552,"range":{"start_line":1550,"start_character":44,"end_line":1552,"end_character":38},"in_reply_to":"5f7c97a3_5ccf48b2","updated":"2018-07-13 16:40:37.000000000","message":"to the best of my knowledge, \u0027local\u0027 networks (which are local to the host) wouldn\u0027t have a \"physnet\" attribute set even nor would they be using VXLAN, GRE etc. Those are basically no-ops here","commit_id":"70538a5fbc8a09dbbd627bd6f9b5a3db7794a70d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1bcf70e259d4eb605692e0bc4882ff764123a0f4","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"                # physical networks."},{"line_number":1571,"context_line":"                physnet_name \u003d net.get(\u0027provider:physical_network\u0027)"},{"line_number":1572,"context_line":"                if physnet_name:"},{"line_number":1573,"context_line":"                    return physnet_name, is_tunneled(net)"},{"line_number":1574,"context_line":""},{"line_number":1575,"context_line":"            # Raising here as at least one segment should"},{"line_number":1576,"context_line":"            # have a physical network provided."}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_9c5c001b","line":1573,"range":{"start_line":1573,"start_character":41,"end_line":1573,"end_character":57},"updated":"2018-07-05 21:04:51.000000000","message":"Yup and this is OK:\n\nhttps://developer.openstack.org/api-ref/network/v2/index.html#multiple-provider-extension\n\n--\n\nAs far as I can tell, we don\u0027t have any unit tests for a multi-segment network where it is tunneled\u003dTrue - is that because we\u0027d just never have that combination where there is a physnet name for a vxlan/gre/geneve network? If so, couldn\u0027t we always hardcode this to False?","commit_id":"70538a5fbc8a09dbbd627bd6f9b5a3db7794a70d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"226dad7a4421ab4369b13368b5b3eed659e9b8c2","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"                # physical networks."},{"line_number":1571,"context_line":"                physnet_name \u003d net.get(\u0027provider:physical_network\u0027)"},{"line_number":1572,"context_line":"                if physnet_name:"},{"line_number":1573,"context_line":"                    return physnet_name, is_tunneled(net)"},{"line_number":1574,"context_line":""},{"line_number":1575,"context_line":"            # Raising here as at least one segment should"},{"line_number":1576,"context_line":"            # have a physical network provided."}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_cdb2b196","line":1573,"range":{"start_line":1573,"start_character":41,"end_line":1573,"end_character":57},"in_reply_to":"5f7c97a3_79f1e8ff","updated":"2018-07-06 17:23:17.000000000","message":"OK, follow up is OK with me.","commit_id":"70538a5fbc8a09dbbd627bd6f9b5a3db7794a70d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2913a63c643087dcf3858935d1e8d0034e2e8429","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"                # physical networks."},{"line_number":1571,"context_line":"                physnet_name \u003d net.get(\u0027provider:physical_network\u0027)"},{"line_number":1572,"context_line":"                if physnet_name:"},{"line_number":1573,"context_line":"                    return physnet_name, is_tunneled(net)"},{"line_number":1574,"context_line":""},{"line_number":1575,"context_line":"            # Raising here as at least one segment should"},{"line_number":1576,"context_line":"            # have a physical network provided."}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_79f1e8ff","line":1573,"range":{"start_line":1573,"start_character":41,"end_line":1573,"end_character":57},"in_reply_to":"5f7c97a3_9c5c001b","updated":"2018-07-06 13:31:08.000000000","message":"Oh, yeah, of course. We could/should hardcode this. I\u0027ll fix in a follow-up, if that\u0027s OK","commit_id":"70538a5fbc8a09dbbd627bd6f9b5a3db7794a70d"}],"nova/tests/unit/network/test_neutronv2.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"594eec8fbda9a567f99b240e047247898b559bda","unresolved":false,"context_lines":[{"line_number":3219,"context_line":"    def test_get_phynet_tunneled_info_non_tunneled("},{"line_number":3220,"context_line":"            self, mock_get_client):"},{"line_number":3221,"context_line":"        api \u003d neutronapi.API()"},{"line_number":3222,"context_line":"        self.mox.ResetAll()"},{"line_number":3223,"context_line":"        test_net \u003d {\u0027network\u0027: {\u0027provider:network_type\u0027: \u0027vlan\u0027}}"},{"line_number":3224,"context_line":"        test_ext_list \u003d {\u0027extensions\u0027: []}"},{"line_number":3225,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_65acb234","line":3222,"range":{"start_line":3222,"start_character":8,"end_line":3222,"end_character":27},"updated":"2018-06-26 14:48:29.000000000","message":"Please don\u0027t use mox for new tests - use TestNeutronV2WithMock.","commit_id":"df449e3834cc44e9860fce235ed70662a48149c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c30d387cc5003dbb519209687a419caf6f3277ac","unresolved":false,"context_lines":[{"line_number":3200,"context_line":"    def test_get_network_physnet_tunneled_info_tunneled("},{"line_number":3201,"context_line":"            self, mock_get_client):"},{"line_number":3202,"context_line":"        api \u003d neutronapi.API()"},{"line_number":3203,"context_line":"        self.mox.ResetAll()"},{"line_number":3204,"context_line":"        test_net \u003d {\u0027network\u0027: {\u0027provider:network_type\u0027: \u0027vxlan\u0027}}"},{"line_number":3205,"context_line":"        test_ext_list \u003d {\u0027extensions\u0027: []}"},{"line_number":3206,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_abb059dd","line":3203,"range":{"start_line":3203,"start_character":8,"end_line":3203,"end_character":27},"updated":"2018-06-26 15:46:16.000000000","message":"Write these in TestNeutronV2WithMock or something so they aren\u0027t using the mox stuff in here.","commit_id":"2b61d39871625f54b376a9596f3d55368caf3afa"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5496483085913a3b10ea394c9fe533a2f54241de","unresolved":false,"context_lines":[{"line_number":3200,"context_line":"    def test_get_network_physnet_tunneled_info_tunneled("},{"line_number":3201,"context_line":"            self, mock_get_client):"},{"line_number":3202,"context_line":"        api \u003d neutronapi.API()"},{"line_number":3203,"context_line":"        self.mox.ResetAll()"},{"line_number":3204,"context_line":"        test_net \u003d {\u0027network\u0027: {\u0027provider:network_type\u0027: \u0027vxlan\u0027}}"},{"line_number":3205,"context_line":"        test_ext_list \u003d {\u0027extensions\u0027: []}"},{"line_number":3206,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_0b1dcdbc","line":3203,"range":{"start_line":3203,"start_character":8,"end_line":3203,"end_character":27},"in_reply_to":"5f7c97a3_abb059dd","updated":"2018-06-26 15:52:28.000000000","message":"Done. I want to move that above tests but that can be done at the end of the series","commit_id":"2b61d39871625f54b376a9596f3d55368caf3afa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c30d387cc5003dbb519209687a419caf6f3277ac","unresolved":false,"context_lines":[{"line_number":3220,"context_line":"    def test_get_phynet_tunneled_info_non_tunneled("},{"line_number":3221,"context_line":"            self, mock_get_client):"},{"line_number":3222,"context_line":"        api \u003d neutronapi.API()"},{"line_number":3223,"context_line":"        self.mox.ResetAll()"},{"line_number":3224,"context_line":"        test_net \u003d {\u0027network\u0027: {\u0027provider:network_type\u0027: \u0027vlan\u0027}}"},{"line_number":3225,"context_line":"        test_ext_list \u003d {\u0027extensions\u0027: []}"},{"line_number":3226,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_6bc6c14b","line":3223,"updated":"2018-06-26 15:46:16.000000000","message":"same","commit_id":"2b61d39871625f54b376a9596f3d55368caf3afa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1bcf70e259d4eb605692e0bc4882ff764123a0f4","unresolved":false,"context_lines":[{"line_number":3054,"context_line":"                                      \u0027provider:network_type\u0027: \u0027vlan\u0027},"},{"line_number":3055,"context_line":"                                     {\u0027provider:physical_network\u0027: None,"},{"line_number":3056,"context_line":"                                      \u0027provider:segmentation_id\u0027: 153,"},{"line_number":3057,"context_line":"                                      \u0027provider:network_type\u0027: \u0027vxlan\u0027}]}}"},{"line_number":3058,"context_line":"        test_ext_list \u003d {\u0027extensions\u0027:"},{"line_number":3059,"context_line":"                            [{\u0027name\u0027: \u0027Multi Provider Network\u0027,"},{"line_number":3060,"context_line":"                             \u0027alias\u0027: \u0027multi-segments\u0027}]}"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_1cc55090","line":3057,"range":{"start_line":3057,"start_character":38,"end_line":3057,"end_character":70},"updated":"2018-07-05 21:04:51.000000000","message":"Note that this would normally set our tunneled flag to True, but because this is a segmented network and this segment doesn\u0027t have a phsynet name, it\u0027s ignored. Is there any cause for concern with handling multiple segments like that in the future where one is L2 and one is L3?","commit_id":"70538a5fbc8a09dbbd627bd6f9b5a3db7794a70d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2913a63c643087dcf3858935d1e8d0034e2e8429","unresolved":false,"context_lines":[{"line_number":3054,"context_line":"                                      \u0027provider:network_type\u0027: \u0027vlan\u0027},"},{"line_number":3055,"context_line":"                                     {\u0027provider:physical_network\u0027: None,"},{"line_number":3056,"context_line":"                                      \u0027provider:segmentation_id\u0027: 153,"},{"line_number":3057,"context_line":"                                      \u0027provider:network_type\u0027: \u0027vxlan\u0027}]}}"},{"line_number":3058,"context_line":"        test_ext_list \u003d {\u0027extensions\u0027:"},{"line_number":3059,"context_line":"                            [{\u0027name\u0027: \u0027Multi Provider Network\u0027,"},{"line_number":3060,"context_line":"                             \u0027alias\u0027: \u0027multi-segments\u0027}]}"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_b916a0a6","line":3057,"range":{"start_line":3057,"start_character":38,"end_line":3057,"end_character":70},"in_reply_to":"5f7c97a3_1cc55090","updated":"2018-07-06 13:31:08.000000000","message":"It\u0027s possible, yes, and would probably depend on what segment we end up using. However, our whole \"support\" for multi-segment networks is a fudge at the moment (see the TODO at [1]) and will probably have to stay that way until someone complains about it.\n\n[1] https://review.openstack.org/#/c/564445/14/nova/network/neutronv2/api.py@1568","commit_id":"70538a5fbc8a09dbbd627bd6f9b5a3db7794a70d"}]}
