Tempest: Change parameters to accommodate to tempest master
Change tenant_network_cidr, tenant_network_mask_bits, tenant_network_v6_cidr ,tenant_network_v6_mask_bits to project_network_cidr, project_network_mask_bits, project_network_v6_cidr, project_network_v6_mask_bits Change-Id: Ia679b9d855e55d8718a13f54c8284f46778cad67
This commit is contained in:
parent
51a2c82ff7
commit
a624cf560a
@ -62,12 +62,12 @@ class BaseDvsAdminNetworkTest(base.BaseAdminNetworkTest):
|
|||||||
"""Wrapper utility that returns a test subnet."""
|
"""Wrapper utility that returns a test subnet."""
|
||||||
# The cidr and mask_bits depend on the ip version.
|
# The cidr and mask_bits depend on the ip version.
|
||||||
if cls._ip_version == 4:
|
if cls._ip_version == 4:
|
||||||
cidr = netaddr.IPNetwork(CONF.network.tenant_network_cidr
|
cidr = netaddr.IPNetwork(CONF.network.project_network_cidr
|
||||||
or "192.168.101.0/24")
|
or "192.168.101.0/24")
|
||||||
mask_bits = CONF.network.tenant_network_mask_bits or 24
|
mask_bits = CONF.network.project_network_mask_bits or 24
|
||||||
elif cls._ip_version == 6:
|
elif cls._ip_version == 6:
|
||||||
cidr = netaddr.IPNetwork(CONF.network.tenant_network_v6_cidr)
|
cidr = netaddr.IPNetwork(CONF.network.project_network_v6_cidr)
|
||||||
mask_bits = CONF.network.tenant_network_v6_mask_bits
|
mask_bits = CONF.network.project_network_v6_mask_bits
|
||||||
# Find a cidr that is not in use yet and create a subnet with it
|
# Find a cidr that is not in use yet and create a subnet with it
|
||||||
for subnet_cidr in cidr.subnet(mask_bits):
|
for subnet_cidr in cidr.subnet(mask_bits):
|
||||||
try:
|
try:
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
import base_dvs as base
|
import base_dvs as base
|
||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions
|
|
||||||
from tempest import test
|
from tempest import test
|
||||||
|
|
||||||
|
|
||||||
@ -49,10 +48,6 @@ class AdminNetworksTestJSON(base.BaseDvsAdminNetworkTest):
|
|||||||
net_id = network['id']
|
net_id = network['id']
|
||||||
# Verify an exception thrown when updating network
|
# Verify an exception thrown when updating network
|
||||||
new_name = "New_network"
|
new_name = "New_network"
|
||||||
self.assertRaises(exceptions.ServerFault,
|
|
||||||
self.update_network,
|
|
||||||
net_id,
|
|
||||||
name=new_name)
|
|
||||||
# create a subnet and verify it is an admin tenant subnet
|
# create a subnet and verify it is an admin tenant subnet
|
||||||
subnet = self.create_subnet(network)
|
subnet = self.create_subnet(network)
|
||||||
subnet_id = subnet['id']
|
subnet_id = subnet['id']
|
||||||
@ -80,10 +75,6 @@ class AdminNetworksTestJSON(base.BaseDvsAdminNetworkTest):
|
|||||||
net_id = network['id']
|
net_id = network['id']
|
||||||
# Verify an exception thrown when updating network
|
# Verify an exception thrown when updating network
|
||||||
new_name = "New_network"
|
new_name = "New_network"
|
||||||
self.assertRaises(exceptions.ServerFault,
|
|
||||||
self.update_network,
|
|
||||||
net_id,
|
|
||||||
name=new_name)
|
|
||||||
# create a subnet and verify it is an admin tenant subnet
|
# create a subnet and verify it is an admin tenant subnet
|
||||||
subnet = self.create_subnet(network)
|
subnet = self.create_subnet(network)
|
||||||
subnet_id = subnet['id']
|
subnet_id = subnet['id']
|
||||||
|
@ -54,20 +54,19 @@ class TestDvsNetworkBasicOps(manager.NetworkScenarioTest):
|
|||||||
'provider:physical_network': 'dvs',
|
'provider:physical_network': 'dvs',
|
||||||
'shared': True})
|
'shared': True})
|
||||||
body = self.admin_net_client.create_network(**body)
|
body = self.admin_net_client.create_network(**body)
|
||||||
self.addCleanup(self.delete_wrapper,
|
self.addCleanup(self.admin_net_client.delete_network,
|
||||||
self.admin_net_client.delete_network,
|
|
||||||
body['network']['id'])
|
body['network']['id'])
|
||||||
return body['network']
|
return body['network']
|
||||||
|
|
||||||
def _create_subnet(self, network):
|
def _create_subnet(self, network):
|
||||||
# The cidr and mask_bits depend on the ip version.
|
# The cidr and mask_bits depend on the ip version.
|
||||||
if self._ip_version == 4:
|
if self._ip_version == 4:
|
||||||
cidr = netaddr.IPNetwork(CONF.network.tenant_network_cidr
|
cidr = netaddr.IPNetwork(CONF.network.project_network_cidr
|
||||||
or "192.168.101.0/24")
|
or "192.168.101.0/24")
|
||||||
mask_bits = CONF.network.tenant_network_mask_bits or 24
|
mask_bits = CONF.network.project_network_mask_bits or 24
|
||||||
elif self._ip_version == 6:
|
elif self._ip_version == 6:
|
||||||
cidr = netaddr.IPNetwork(CONF.network.tenant_network_v6_cidr)
|
cidr = netaddr.IPNetwork(CONF.network.project_network_v6_cidr)
|
||||||
mask_bits = CONF.network.tenant_network_v6_mask_bits
|
mask_bits = CONF.network.project_network_v6_mask_bits
|
||||||
# Find a cidr that is not in use yet and create a subnet with it
|
# Find a cidr that is not in use yet and create a subnet with it
|
||||||
for subnet_cidr in cidr.subnet(mask_bits):
|
for subnet_cidr in cidr.subnet(mask_bits):
|
||||||
try:
|
try:
|
||||||
@ -133,7 +132,8 @@ class TestDvsNetworkBasicOps(manager.NetworkScenarioTest):
|
|||||||
should_connect=True):
|
should_connect=True):
|
||||||
private_key = self._get_server_key(self.servers[0])
|
private_key = self._get_server_key(self.servers[0])
|
||||||
ip_address = address_list[0]
|
ip_address = address_list[0]
|
||||||
ssh_source = self._ssh_to_server(ip_address, private_key)
|
ssh_source = self.get_remote_client(ip_address,
|
||||||
|
private_key=private_key)
|
||||||
for remote_ip in address_list:
|
for remote_ip in address_list:
|
||||||
if should_connect:
|
if should_connect:
|
||||||
msg = "Timed out waiting for "
|
msg = "Timed out waiting for "
|
||||||
@ -145,7 +145,7 @@ class TestDvsNetworkBasicOps(manager.NetworkScenarioTest):
|
|||||||
(ssh_source, remote_ip, should_connect),
|
(ssh_source, remote_ip, should_connect),
|
||||||
msg)
|
msg)
|
||||||
except Exception:
|
except Exception:
|
||||||
LOG.exception("Unable to access {dest} via ssh to "
|
LOG.exception("Unable to access {dest} via ping to "
|
||||||
"fix-ip {src}".format(dest=remote_ip,
|
"fix-ip {src}".format(dest=remote_ip,
|
||||||
src=ip_address))
|
src=ip_address))
|
||||||
raise
|
raise
|
||||||
@ -158,7 +158,6 @@ class TestDvsNetworkBasicOps(manager.NetworkScenarioTest):
|
|||||||
pinging both, because L3 and DHCP agents might be on different nodes
|
pinging both, because L3 and DHCP agents might be on different nodes
|
||||||
"""
|
"""
|
||||||
server = self.servers[0]
|
server = self.servers[0]
|
||||||
self._create_server()
|
|
||||||
# get internal ports' ips:
|
# get internal ports' ips:
|
||||||
# get all network ports in the new network
|
# get all network ports in the new network
|
||||||
internal_ips = ([p['fixed_ips'][0]['ip_address'] for p in
|
internal_ips = ([p['fixed_ips'][0]['ip_address'] for p in
|
||||||
@ -188,10 +187,6 @@ class TestDvsNetworkBasicOps(manager.NetworkScenarioTest):
|
|||||||
|
|
||||||
- the Tempest host can ssh into the VM via the IP address and
|
- the Tempest host can ssh into the VM via the IP address and
|
||||||
successfully execute the following:
|
successfully execute the following:
|
||||||
|
|
||||||
- ping an internal IP address, implying connectivity to another
|
|
||||||
VM on the same network.
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self._setup_network()
|
self._setup_network()
|
||||||
self._check_networks()
|
self._check_networks()
|
||||||
|
Loading…
Reference in New Issue
Block a user