diff --git a/test/apitest.py b/test/apitest.py index e3c83d2..00269cf 100644 --- a/test/apitest.py +++ b/test/apitest.py @@ -367,7 +367,7 @@ def test_post_config_tunnel_decap_tunnel_type(self): }) self.assertEqual(r.status_code, 409) - tunnel_table = self.configdb.hgetall(VXLAN_TUNNEL_TB + '|default_vxlan_tunnel') + tunnel_table = self.configdb.hgetall(VXLAN_TUNNEL_TB + '|default_vxlan_tunnel_v4') self.assertEqual(tunnel_table, {b'src_ip': b'34.53.1.0'}) l.info("Tunnel table is %s", tunnel_table) @@ -376,7 +376,7 @@ def test_delete_config_tunnel_decap_tunnel_type(self): r = self.delete_config_tunnel_decap_tunnel_type('vxlan') self.assertEqual(r.status_code, 204) # The delete is a no-op and should return 204, moreover the tunnel should not be deleted - tunnel_table = self.configdb.hgetall(VXLAN_TUNNEL_TB + '|default_vxlan_tunnel') + tunnel_table = self.configdb.hgetall(VXLAN_TUNNEL_TB + '|default_vxlan_tunnel_v4') self.assertEqual(tunnel_table, {b'src_ip': b'34.53.1.0'}) @@ -406,7 +406,7 @@ def test_post_vrouter(self): vrouter_table = self.configdb.hgetall(VNET_TB + '|' + VNET_NAME_PREF + '1') self.assertEqual(vrouter_table, { - b'vxlan_tunnel': b'default_vxlan_tunnel', + b'vxlan_tunnel': b'default_vxlan_tunnel_v4', b'vni': b'1001', b'guid': b'vnet-guid-1' }) @@ -447,7 +447,7 @@ def test_vnet_name_mapping_logic(self): self.check_vrouter_exists("vnet-guid-"+str(i), 1000+i) vrouter_table = self.configdb.hgetall(VNET_TB + '|' + VNET_NAME_PREF +str(i)) self.assertEqual(vrouter_table, { - b'vxlan_tunnel': b'default_vxlan_tunnel', + b'vxlan_tunnel': b'default_vxlan_tunnel_v4', b'vni': b'100'+str(i), b'guid': b'vnet-guid-'+str(i) }) @@ -460,7 +460,7 @@ def test_vnet_name_mapping_logic(self): self.check_vrouter_exists("vnet-guid-"+str(i+3), 1003+i) vrouter_table = self.configdb.hgetall(VNET_TB + '|' + VNET_NAME_PREF +str(i)) self.assertEqual(vrouter_table, { - b'vxlan_tunnel': b'default_vxlan_tunnel', + b'vxlan_tunnel': b'default_vxlan_tunnel_v4', b'vni': b'100'+str(i+3), b'guid': b'vnet-guid-'+str(i+3) }) @@ -470,7 +470,7 @@ def test_vnet_name_mapping_logic(self): self.check_vrouter_exists("vnet-guid-"+str(i+6), 1006+i) vrouter_table = self.configdb.hgetall(VNET_TB + '|' + VNET_NAME_PREF +str(i+3)) self.assertEqual(vrouter_table, { - b'vxlan_tunnel': b'default_vxlan_tunnel', + b'vxlan_tunnel': b'default_vxlan_tunnel_v4', b'vni': b'100'+str(i+6), b'guid': b'vnet-guid-'+str(i+6) }) diff --git a/test/test_restapi.py b/test/test_restapi.py index e11a5bc..d8e4f20 100644 --- a/test/test_restapi.py +++ b/test/test_restapi.py @@ -119,7 +119,7 @@ def test_post_config_tunnel_decap_tunnel_type(self, setup_restapi_client): }) assert r.status_code == 409 - tunnel_table = configdb.hgetall(VXLAN_TUNNEL_TB + '|default_vxlan_tunnel') + tunnel_table = configdb.hgetall(VXLAN_TUNNEL_TB + '|default_vxlan_tunnel_v4') assert tunnel_table == {b'src_ip': b'34.53.1.0'} logging.info("Tunnel table is %s", tunnel_table) @@ -129,7 +129,7 @@ def test_delete_config_tunnel_decap_tunnel_type(self, setup_restapi_client): r = restapi_client.delete_config_tunnel_decap_tunnel_type('vxlan') assert r.status_code == 204 # The delete is a no-op and should return 204, moreover the tunnel should not be deleted - tunnel_table = configdb.hgetall(VXLAN_TUNNEL_TB + '|default_vxlan_tunnel') + tunnel_table = configdb.hgetall(VXLAN_TUNNEL_TB + '|default_vxlan_tunnel_v4') assert tunnel_table == {b'src_ip': b'34.53.1.0'} @@ -163,7 +163,7 @@ def test_post_vrouter(self, setup_restapi_client): vrouter_table = configdb.hgetall(VNET_TB + '|' + VNET_NAME_PREF + '1') assert vrouter_table == { - b'vxlan_tunnel': b'default_vxlan_tunnel', + b'vxlan_tunnel': b'default_vxlan_tunnel_v4', b'vni': b'1001', b'guid': b'vnet-guid-1' } @@ -178,7 +178,7 @@ def test_post_vrouter_duplicate(self, setup_restapi_client): vrouter_table = configdb.hgetall(VNET_TB + '|' + VNET_NAME_PREF + '1') assert vrouter_table == { - b'vxlan_tunnel': b'default_vxlan_tunnel', + b'vxlan_tunnel': b'default_vxlan_tunnel_v4', b'vni': b'1001', b'guid': b'vnet-guid-1' } @@ -200,7 +200,7 @@ def test_post_vrouter_with_advertise_prefix(self, setup_restapi_client): vrouter_table = configdb.hgetall(VNET_TB + '|' + VNET_NAME_PREF + '1') assert vrouter_table == { - b'vxlan_tunnel': b'default_vxlan_tunnel', + b'vxlan_tunnel': b'default_vxlan_tunnel_v4', b'vni': b'1001', b'guid': b'vnet-guid-1', b'advertise_prefix': b'false' @@ -213,7 +213,7 @@ def test_post_vrouter_with_advertise_prefix(self, setup_restapi_client): vrouter_table = configdb.hgetall(VNET_TB + '|' + VNET_NAME_PREF + '2') assert vrouter_table == { - b'vxlan_tunnel': b'default_vxlan_tunnel', + b'vxlan_tunnel': b'default_vxlan_tunnel_v4', b'vni': b'1002', b'guid': b'vnet-guid-2', b'advertise_prefix': b'true' @@ -231,7 +231,7 @@ def test_post_vrouter_with_overlay_dmac(self, setup_restapi_client): vrouter_table = configdb.hgetall(VNET_TB + '|' + VNET_NAME_PREF + '1') assert vrouter_table == { - b'vxlan_tunnel': b'default_vxlan_tunnel', + b'vxlan_tunnel': b'default_vxlan_tunnel_v4', b'vni': b'1001', b'guid': b'vnet-guid-1', b'advertise_prefix': b'true', @@ -248,7 +248,7 @@ def test_post_vrouter_default(self, setup_restapi_client): vrouter_table = configdb.hgetall(VNET_TB + '|' + VNET_NAME_PREF + '1') assert vrouter_table == { - b'vxlan_tunnel': b'default_vxlan_tunnel', + b'vxlan_tunnel': b'default_vxlan_tunnel_v4', b'vni': b'2001', b'guid': b'Vnet-default', b'scope': b'default' @@ -295,7 +295,7 @@ def test_vnet_name_mapping_logic(self, setup_restapi_client): self.check_vrouter_exists(restapi_client, "vnet-guid-"+str(i), 1000+i) vrouter_table = configdb.hgetall(VNET_TB + '|' + VNET_NAME_PREF +str(i)) assert vrouter_table == { - b'vxlan_tunnel': b'default_vxlan_tunnel', + b'vxlan_tunnel': b'default_vxlan_tunnel_v4', b'vni': b'100'+str(i).encode(), b'guid': b'vnet-guid-'+str(i).encode() } @@ -308,7 +308,7 @@ def test_vnet_name_mapping_logic(self, setup_restapi_client): self.check_vrouter_exists(restapi_client, "vnet-guid-"+str(i+3), 1003+i) vrouter_table = configdb.hgetall(VNET_TB + '|' + VNET_NAME_PREF +str(i)) assert vrouter_table == { - b'vxlan_tunnel': b'default_vxlan_tunnel', + b'vxlan_tunnel': b'default_vxlan_tunnel_v4', b'vni': b'100'+str(i+3).encode(), b'guid': b'vnet-guid-'+str(i+3).encode() } @@ -318,7 +318,7 @@ def test_vnet_name_mapping_logic(self, setup_restapi_client): self.check_vrouter_exists(restapi_client, "vnet-guid-"+str(i+6), 1006+i) vrouter_table = configdb.hgetall(VNET_TB + '|' + VNET_NAME_PREF +str(i+3)) assert vrouter_table == { - b'vxlan_tunnel': b'default_vxlan_tunnel', + b'vxlan_tunnel': b'default_vxlan_tunnel_v4', b'vni': b'100'+str(i+6).encode(), b'guid': b'vnet-guid-'+str(i+6).encode() }