TENANTS_AMOUNT = 3
ITERATIONS_AMOUNT = 10
CONCURRENCY = 4
+ VOLUME_VERSION = 3
+ VOLUME_SERVICE_TYPE = "volumev3"
BLACKLIST_FILE = os.path.join(RALLY_DIR, "blacklist.yaml")
TASK_DIR = os.path.join(getattr(config.CONF, 'dir_rally_data'), 'task')
TEMP_DIR = os.path.join(TASK_DIR, 'var')
task_args['iterations'] = self.ITERATIONS_AMOUNT
task_args['concurrency'] = self.CONCURRENCY
task_args['smoke'] = self.smoke
+ task_args['volume_version'] = self.VOLUME_VERSION
+ task_args['volume_service_type'] = self.VOLUME_SERVICE_TYPE
+ task_args['block_migration'] = env.get("BLOCK_MIGRATION").lower()
if self.ext_net:
task_args['floating_network'] = str(self.ext_net.name)
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
deployment_uuid = proc.stdout.readline().rstrip()
- return deployment_uuid
+ return deployment_uuid.decode()
@staticmethod
def create_rally_deployment(environ=None):
rconfig.add_section('openstack')
rconfig.set(
'openstack', 'keystone_default_role', env.get("NEW_USER_ROLE"))
- with open(rally_conf, 'wb') as config_file:
+ with open(rally_conf, 'w') as config_file:
rconfig.write(config_file)
@staticmethod
rconfig.read(rally_conf)
if rconfig.has_option('openstack', 'keystone_default_role'):
rconfig.remove_option('openstack', 'keystone_default_role')
- with open(rally_conf, 'wb') as config_file:
+ with open(rally_conf, 'w') as config_file:
rconfig.write(config_file)
@staticmethod
taskid_re = re.compile('^Task +(.*): started$')
for line in cmd_raw.splitlines(True):
line = line.strip()
- match = taskid_re.match(line)
+ match = taskid_re.match(line.decode())
if match:
return match.group(1)
return None
with open(RallyBase.BLACKLIST_FILE, 'r') as black_list_file:
black_list_yaml = yaml.safe_load(black_list_file)
+ if env.get('BLOCK_MIGRATION').lower() == 'true':
+ func_list.append("block_migration")
if not self._migration_supported():
func_list.append("no_migration")
if not self._network_trunk_supported():
try:
assert super(RallyBase, self).run(
**kwargs) == testcase.TestCase.EX_OK
- environ = dict(
- os.environ,
- OS_USERNAME=self.project.user.name,
- OS_PROJECT_NAME=self.project.project.name,
- OS_PROJECT_ID=self.project.project.id,
- OS_PASSWORD=self.project.password)
- try:
- del environ['OS_TENANT_NAME']
- del environ['OS_TENANT_ID']
- except Exception: # pylint: disable=broad-except
- pass
- self.create_rally_deployment(environ=environ)
+ self.create_rally_deployment(environ=self.project.get_environ())
self.prepare_run(**kwargs)
self.run_tests(**kwargs)
self._generate_report()
"{}/{}.xml".format(self.results_dir, self.case_name),
export_type="junit-xml")
res = testcase.TestCase.EX_OK
- except Exception as exc: # pylint: disable=broad-except
- LOGGER.error('Error with run: %s', exc)
+ except Exception: # pylint: disable=broad-except
+ LOGGER.exception('Error with run:')
self.result = 0
res = testcase.TestCase.EX_RUN_ERROR
self.stop_time = time.time()