def test_nexus_vxlan_two_networks(self):

        # Configure bound segments to indicate VXLAN+VLAN hierarchical
        # segments.
        self.mock_top_bound_segment.return_value = BOUND_SEGMENT_VXLAN
        self.mock_bottom_bound_segment.return_value = BOUND_SEGMENT1

        with self._create_resources(name='net1', cidr=CIDR_1):
            self.mock_top_bound_segment.return_value = BOUND_SEGMENT_VXLAN2
            self.mock_bottom_bound_segment.return_value = BOUND_SEGMENT2
            with self._create_resources(name='net2', cidr=CIDR_2,
                                        host_id=COMP_HOST_NAME_2):
                binding = nexus_db_v2.get_nve_switch_bindings(NEXUS_IP_ADDR)
                self.assertEqual(2, len(binding))
                self.assertTrue(self._is_in_nexus_cfg(['nve', 'member', 'vni',
                                                       str(VNI)]))
                self.assertTrue(self._is_in_nexus_cfg(['vn-segment',
                                                       str(VNI)]))
                self.assertTrue(self._is_in_nexus_cfg(['nve', 'member', 'vni',
                                                       str(VNI + 1)]))
                self.assertTrue(self._is_in_nexus_cfg(['vn-segment',
                                                       str(VNI + 1)]))

            # Switch back to first segment for delete calls.
            self.mock_top_bound_segment.return_value = BOUND_SEGMENT_VXLAN
            self.mock_bottom_bound_segment.return_value = BOUND_SEGMENT1

        # Verify that VXLAN entries have been removed.
        binding = nexus_db_v2.get_nve_switch_bindings(NEXUS_IP_ADDR)
        self.assertEqual(0, len(binding))
        self.assertTrue(self._is_in_nexus_cfg(['no', 'nve', 'member',
                                               'vni', str(VNI)]))
        self.assertTrue(self._is_in_nexus_cfg(['no', 'nve', 'member',
                                               'vni', str(VNI + 1)]))
Test processing for creating two VXLAN segments.
dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/tests/unit/ml2/drivers/cisco/nexus/test_cisco_mech.py/TestCiscoPortsV2.test_nexus_vxlan_two_networks