From 26b38f11d38c3fb3b8bff13bdc9a61dcc5eed528 Mon Sep 17 00:00:00 2001 From: Yichen Wang Date: Wed, 13 Jul 2016 17:36:19 -0700 Subject: [PATCH] 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 --- kloudbuster/cfg.scale.yaml | 18 +++++++++--------- kloudbuster/kb_config.py | 5 ++--- kloudbuster/kloudbuster.py | 5 +++-- kloudbuster/users.py | 5 +++-- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/kloudbuster/cfg.scale.yaml b/kloudbuster/cfg.scale.yaml index 69e83a5..9812c34 100644 --- a/kloudbuster/cfg.scale.yaml +++ b/kloudbuster/cfg.scale.yaml @@ -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 diff --git a/kloudbuster/kb_config.py b/kloudbuster/kb_config.py index 5dfe29e..02041ae 100644 --- a/kloudbuster/kb_config.py +++ b/kloudbuster/kb_config.py @@ -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: diff --git a/kloudbuster/kloudbuster.py b/kloudbuster/kloudbuster.py index 981c431..894d73e 100755 --- a/kloudbuster/kloudbuster.py +++ b/kloudbuster/kloudbuster.py @@ -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 diff --git a/kloudbuster/users.py b/kloudbuster/users.py index d8fdbac..c975437 100644 --- a/kloudbuster/users.py +++ b/kloudbuster/users.py @@ -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'])