read static file from resources dir
Change-Id: I716aa51a7161af42d9aedddbf2232f4de85a61aa
This commit is contained in:
parent
f578e5ee4e
commit
a3de888adc
@ -29,11 +29,11 @@ if [ "$DEVSTACK_GATE_USE_PYTHON3" == "True" ]; then
|
||||
export PYTHON=python3
|
||||
fi
|
||||
|
||||
sudo cp -rf $DEVSTACK_PATH/vitrage/vitrage_tempest_tests/tests/resources/static_physical/static_physical_configuration.yaml /etc/vitrage/
|
||||
sudo cp -rf $DEVSTACK_PATH/vitrage/vitrage_tempest_tests/tests/resources/heat/heat_template.yaml /etc/vitrage/
|
||||
sudo cp -rf $DEVSTACK_PATH/vitrage/vitrage_tempest_tests/tests/resources/heat/heat_nested_template.yaml /etc/vitrage/
|
||||
sudo cp -rf $DEVSTACK_PATH/vitrage/vitrage_tempest_tests/tests/resources/heat/server.yaml /etc/vitrage/
|
||||
sudo cp $DEVSTACK_PATH/tempest/etc/logging.conf.sample $DEVSTACK_PATH/tempest/etc/logging.conf
|
||||
|
||||
sudo cp -rf $DEVSTACK_PATH/tempest/etc/logging.conf.sample $DEVSTACK_PATH/tempest/etc/logging.conf
|
||||
|
||||
${PYTHON:-python} $DEVSTACK_PATH/vitrage/vitrage_tempest_tests/add_legacy_dir_templates.py
|
||||
|
||||
|
@ -34,5 +34,6 @@ def main():
|
||||
full_path = resources_path + f
|
||||
TestConfiguration.add_templates(full_path)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
|
@ -18,6 +18,8 @@ import time
|
||||
|
||||
from oslo_log import log as logging
|
||||
from vitrage_tempest_tests.tests.base import BaseVitrageTempest
|
||||
from vitrage_tempest_tests.tests.common.general_utils \
|
||||
import tempest_resources_dir
|
||||
from vitrage_tempest_tests.tests import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -71,7 +73,8 @@ class TestStaticPhysical(BaseVitrageTempest):
|
||||
hostname = socket.gethostname()
|
||||
|
||||
# template file
|
||||
file_path = '/etc/vitrage/static_physical_configuration.yaml'
|
||||
resources_path = tempest_resources_dir() + '/static_physical/'
|
||||
file_path = resources_path + '/static_physical_configuration.yaml'
|
||||
with open(file_path, 'r') as f:
|
||||
template_data = f.read()
|
||||
template_data = template_data.replace('tmp-devstack', hostname)
|
||||
|
Loading…
Reference in New Issue
Block a user