615ea6a182
When tempest.config was switched over to using oslo the stress tests weren't updated with those changes. Also subsequent changes to the tempest options were not updated in the stress test suite. This left the stress tests unusable because it couldn't get the needed information from config. This commit updates the stress test suite to properly use tempest.config. It also adds a new section to the config file for stress test specific options. Fixes bug 1133012 Change-Id: I1b0c726f53dc0e3e0777e27af3e860d35029f958
46 lines
1.5 KiB
Python
Executable File
46 lines
1.5 KiB
Python
Executable File
# Copyright 2011 Quanta Research Cambridge, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
|
|
class StressConfig(object):
|
|
"""Provides configuration information for whitebox stress tests."""
|
|
|
|
def __init__(self, conf):
|
|
self.conf = conf
|
|
|
|
@property
|
|
def host_private_key_path(self):
|
|
"""Path to ssh key for logging into compute nodes."""
|
|
return self.conf.compute.path_to_private_key
|
|
|
|
@property
|
|
def host_admin_user(self):
|
|
"""Username for logging into compute nodes."""
|
|
return self.conf.compute.ssh_user
|
|
|
|
@property
|
|
def nova_logdir(self):
|
|
"""Directory containing log files on the compute nodes."""
|
|
return self.conf.stress.nova_logdir
|
|
|
|
@property
|
|
def controller(self):
|
|
"""Controller host."""
|
|
return self.conf.stress.controller
|
|
|
|
@property
|
|
def max_instances(self):
|
|
"""Maximum number of instances to create during test."""
|
|
return self.conf.stress.max_instances
|