Skip the cinder configuration in non-storage mode

1. Skip the cinder configuration in non-storage mode;
2. Modify the logic for dual-cloud mode check;

Change-Id: I3b6948d1d6c64ff678403e35e3d72edbf29f13a0
This commit is contained in:
Yichen Wang 2016-07-13 17:36:19 -07:00
parent fa13ab39b8
commit 26b38f11d3
4 changed files with 17 additions and 16 deletions

View File

@ -42,10 +42,10 @@ vm_creation_concurrency: 5
# but can be handy if the user wants to ssh manually to any of them (for
# example to debug)
public_key_file:
# Name of Provider network used for multicast tests.
# Name of Provider network used for multicast tests.
multicast_provider_network_name: '' # Leave blank to use first available (default) network.
# ==================================================
# SERVER SIDE CONFIG OPTIONS (HTTP SERVER SIDE ONLY)
@ -217,7 +217,7 @@ client:
report_interval: 0
# Duration of testing tools (seconds)
duration: 30
# Multicast Test Mode Configurations.
multicast_tool_configs:
@ -227,8 +227,8 @@ client:
# Requires a reachable external host with nuttcp installed in server mode at external_sender
# listening at external_sender_port. It should sync with the same ntp_clocks if possible.
external_sender_test_mode: False
external_sender: '0.0.0.0'
external_sender_port: 5200
external_sender: '0.0.0.0'
external_sender_port: 5200
# Configs for both test modes
receivers: [1] # Number of multicast listener VMs to create.
addresses: [1,2] # Number of multicast groups to test.
@ -238,12 +238,12 @@ client:
# The below patterns define the address : port relationship in the tests.
# Each entry is a test case. Test_i: (address_test_pattern[i],port_test_pattern[i])
# Make sure len(address_test_pattern) == len(port_test_pattern)
address_test_pattern: [1,1,2,2]
address_test_pattern: [1,1,2,2]
port_test_pattern: [1,5,1,5]
# NTP clocks close to the cloud are required for precise latency results.
# Any machine running NTP in server mode can be used.
# Any machine running NTP in server mode can be used.
ntp_clocks: ["0.north-america.pool.ntp.org", "1.north-america.pool.ntp.org"] # The closer the better.
# Time in seconds for each test case. Best kept between 4-8 seconds.
# Time in seconds for each test case. Best kept between 4-8 seconds.
duration: 4

View File

@ -173,13 +173,12 @@ class KBConfig(object):
self.cred_tested = credentials.Credentials(openrc_file=CONF.tested_rc,
pwd=CONF.tested_passwd,
no_env=CONF.no_env)
if CONF.testing_rc and CONF.testing_rc != CONF.tested_rc:
if CONF.testing_rc:
self.cred_testing = credentials.Credentials(openrc_file=CONF.testing_rc,
pwd=CONF.testing_passwd,
no_env=CONF.no_env)
else:
# Use the same openrc file for both cases
self.cred_testing = self.cred_tested
self.cred_testing = None
def get_configs(self):
if CONF.config:

View File

@ -264,8 +264,9 @@ class KloudBuster(object):
else:
self.tenants_list = {'server': None, 'client': None}
# TODO(check on same auth_url instead)
self.single_cloud = True \
if server_cred.get_credentials() == client_cred.get_credentials() else False
self.single_cloud = False if client_cred else True
if client_cred:
self.client_cred = server_cred
# Automatically enable the floating IP for server cloud under dual-cloud mode
if not self.single_cloud and not self.server_cfg['use_floatingip']:
self.server_cfg['use_floatingip'] = True

View File

@ -128,8 +128,9 @@ class User(object):
nova_quota = base_compute.NovaQuota(self.nova_client, self.tenant.tenant_id)
nova_quota.update_quota(**tenant_quota['nova'])
cinder_quota = base_compute.CinderQuota(self.cinder_client, self.tenant.tenant_id)
cinder_quota.update_quota(**tenant_quota['cinder'])
if self.tenant.kloud.storage_mode:
cinder_quota = base_compute.CinderQuota(self.cinder_client, self.tenant.tenant_id)
cinder_quota.update_quota(**tenant_quota['cinder'])
neutron_quota = base_network.NeutronQuota(self.neutron_client, self.tenant.tenant_id)
neutron_quota.update_quota(tenant_quota['neutron'])