Allow to provide custom oslo config

- Add ability to specify custom configs as environment variable
- Add underlay example config for users

Change-Id: I2413a835cbcd618c9c48017348ec85721abb46ba
This commit is contained in:
Dennis Dmitriev 2016-08-19 14:37:05 +03:00
parent b36041e4ce
commit b44097ce30
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,18 @@
.. _devops_underlay.conf.example:
.. code-block:: ini
#this config can be used to provide access to underlay layer of the lab that is managed with fuel-devops
[hardware]
manager='devops'
conf_path='fuel_ccp_tests/tests/fixtures/templates/default.yaml'
[underlay]
ssh='[{'node_name': node1,
'host': hostname,
'login': login,
'password': password,
'address_pool': (optional),
'port': (optional),
'keys': [(optional)],
}]'

View File

@ -11,6 +11,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import os
import pytest
from fuel_ccp_tests import settings_oslo
@ -19,6 +20,12 @@ from fuel_ccp_tests import settings_oslo
def config(request):
config_files = []
tests_configs = os.environ.get('TESTS_CONFIGS', None)
if tests_configs:
for test_config in tests_configs.split(','):
config_files.append(test_config)
config_opts = settings_oslo.load_config(config_files)
return config_opts