Merge "Enable uploading of custom fuel settings yaml file"
This commit is contained in:
commit
502753cb05
@ -32,6 +32,7 @@ from fuelweb_test.helpers.regenerate_repo import regenerate_centos_repo
|
||||
from fuelweb_test.helpers.regenerate_repo import regenerate_ubuntu_repo
|
||||
from fuelweb_test.helpers import replace_repos
|
||||
from fuelweb_test.helpers.ssh_manager import SSHManager
|
||||
from fuelweb_test.helpers.utils import dict_merge
|
||||
from fuelweb_test.settings import FUEL_PLUGIN_BUILDER_REPO
|
||||
from fuelweb_test.settings import FUEL_USE_LOCAL_NTPD
|
||||
from fuelweb_test.settings import MIRROR_UBUNTU
|
||||
@ -269,6 +270,22 @@ class AdminActions(BaseActions):
|
||||
"bootstrap image in Fuel settings")
|
||||
self.save_fuel_settings(fuel_settings)
|
||||
|
||||
@logwrap
|
||||
def update_fuel_setting_yaml(self, path):
|
||||
"""This method override fuel settings yaml according to custom yaml
|
||||
|
||||
:param path: a string of full path to custom setting yaml
|
||||
"""
|
||||
|
||||
fuel_settings = self.get_fuel_settings()
|
||||
with open(path) as fyaml:
|
||||
custom_fuel_settings = yaml.load(fyaml)
|
||||
|
||||
fuel_settings = dict_merge(fuel_settings, custom_fuel_settings)
|
||||
self.save_fuel_settings(fuel_settings)
|
||||
logger.debug('File /etc/fuel/astute.yaml was updated.'
|
||||
'And now is {}'.format(fuel_settings))
|
||||
|
||||
@logwrap
|
||||
def upload_packages(self, local_packages_dir, centos_repo_path,
|
||||
ubuntu_repo_path, clean_target=False):
|
||||
|
@ -44,6 +44,7 @@ from fuelweb_test.helpers import multiple_networks_hacks
|
||||
from fuelweb_test.models.fuel_web_client import FuelWebClient
|
||||
from fuelweb_test.models.collector_client import CollectorClient
|
||||
from fuelweb_test import settings
|
||||
from fuelweb_test.settings import CUSTOM_FUEL_SETTING_YAML
|
||||
from fuelweb_test.settings import iface_alias
|
||||
from fuelweb_test import logwrap
|
||||
from fuelweb_test import QuietLogger
|
||||
@ -413,6 +414,9 @@ class EnvironmentModel(object):
|
||||
# wait while installation complete
|
||||
|
||||
self.admin_actions.modify_configs(self.d_env.router())
|
||||
if CUSTOM_FUEL_SETTING_YAML:
|
||||
self.admin_actions.update_fuel_setting_yaml(
|
||||
CUSTOM_FUEL_SETTING_YAML)
|
||||
self.kill_wait_for_external_config()
|
||||
self.wait_bootstrap()
|
||||
self.admin_actions.wait_for_fuel_ready()
|
||||
|
@ -423,6 +423,9 @@ FUEL_SETTINGS_YAML = os.environ.get('FUEL_SETTINGS_YAML',
|
||||
UPGRADE_TEST_TEMPLATE = os.environ.get("UPGRADE_TEST_TEMPLATE")
|
||||
TARBALL_PATH = os.environ.get('TARBALL_PATH')
|
||||
|
||||
# Full path to the custom fuel setting yaml
|
||||
CUSTOM_FUEL_SETTING_YAML = os.environ.get('CUSTOM_FUEL_SETTING_YAML', None)
|
||||
|
||||
UPGRADE_FUEL_FROM = os.environ.get('UPGRADE_FUEL_FROM', '8.0')
|
||||
UPGRADE_FUEL_TO = os.environ.get('UPGRADE_FUEL_TO', '9.0')
|
||||
OCTANE_PATCHES = os.environ.get('OCTANE_PATCHES', None)
|
||||
|
@ -26,6 +26,7 @@ from fuelweb_test.helpers.utils import get_test_method_name
|
||||
from fuelweb_test.helpers.utils import TimeStat
|
||||
from fuelweb_test.helpers.ssh_manager import SSHManager
|
||||
from fuelweb_test.models.environment import EnvironmentModel
|
||||
from fuelweb_test.settings import CUSTOM_FUEL_SETTING_YAML
|
||||
from fuelweb_test.settings import EXTERNAL_HAPROXY_TEMPLATE
|
||||
from fuelweb_test.settings import MULTIPLE_NETWORKS
|
||||
from fuelweb_test.settings import MULTIPLE_NETWORKS_TEMPLATE
|
||||
@ -300,6 +301,9 @@ class TestBasic(object):
|
||||
|
||||
self.env.wait_for_external_config()
|
||||
self.env.admin_actions.modify_configs(self.env.d_env.router())
|
||||
if CUSTOM_FUEL_SETTING_YAML:
|
||||
self.env.admin_actions.update_fuel_setting_yaml(
|
||||
CUSTOM_FUEL_SETTING_YAML)
|
||||
self.env.kill_wait_for_external_config()
|
||||
|
||||
self.env.wait_bootstrap()
|
||||
|
Loading…
Reference in New Issue
Block a user