Add REPLACE_DEFAULT_REPOS_ONLY_ONCE variable to manage repos list
export REPLACE_DEFAULT_REPOS_ONLY_ONCE=true - Along with REPLACE_DEFAULT_REPOS=true , enables replacing default repositories only when Fuel admin node has been installed export REPLACE_DEFAULT_REPOS_ONLY_ONCE=false - Along with REPLACE_DEFAULT_REPOS=true , enables replacing default repositories only before a new cluster is created by tests. export REPLACE_DEFAULT_REPOS=false - Disables replacing repositories, Nailgun keeps it's defaults. Change-Id: Ief45650580cdd897bb785f286d850d27baf06adc Closes-Bug:#1484137
This commit is contained in:
parent
ad50912d9d
commit
ba29888902
|
@ -58,6 +58,8 @@ from fuelweb_test.settings import OPENSTACK_RELEASE
|
|||
from fuelweb_test.settings import OPENSTACK_RELEASE_UBUNTU
|
||||
from fuelweb_test.settings import OSTF_TEST_NAME
|
||||
from fuelweb_test.settings import OSTF_TEST_RETRIES_COUNT
|
||||
from fuelweb_test.settings import REPLACE_DEFAULT_REPOS
|
||||
from fuelweb_test.settings import REPLACE_DEFAULT_REPOS_ONLY_ONCE
|
||||
from fuelweb_test.settings import TIMEOUT
|
||||
from fuelweb_test.settings import VCENTER_IP
|
||||
from fuelweb_test.settings import VCENTER_USERNAME
|
||||
|
@ -395,6 +397,9 @@ class FuelWebClient(object):
|
|||
if settings is None:
|
||||
settings = {}
|
||||
|
||||
if REPLACE_DEFAULT_REPOS and not REPLACE_DEFAULT_REPOS_ONLY_ONCE:
|
||||
self.replace_default_repos()
|
||||
|
||||
cluster_id = self.client.get_cluster_id(name)
|
||||
if not cluster_id:
|
||||
data = {
|
||||
|
|
|
@ -426,9 +426,14 @@ AUX_DEB_REPO_PRIORITY = os.environ.get('AUX_DEB_REPO_PRIORITY', 1150)
|
|||
AUX_RPM_REPO_PRIORITY = os.environ.get('AUX_RPM_REPO_PRIORITY', 15)
|
||||
|
||||
# True: replace the default list of repositories in Nailgun
|
||||
# False: replace list of reposiroties for a cluster when it is created by tests
|
||||
# False: keep original list of repositories in Nailgun
|
||||
REPLACE_DEFAULT_REPOS = get_var_as_bool('REPLACE_DEFAULT_REPOS', True)
|
||||
|
||||
# True: replace the default list of repositories once admin node is installed
|
||||
# False: replace list of repositories before every cluster creation
|
||||
REPLACE_DEFAULT_REPOS_ONLY_ONCE = get_var_as_bool(
|
||||
'REPLACE_DEFAULT_REPOS_ONLY_ONCE', True)
|
||||
|
||||
# Set gateway of 'admin' network as NTPD server for Fuel master node
|
||||
# , set gateway of 'public' network as NTPD server for new OS clusters
|
||||
FUEL_USE_LOCAL_NTPD = get_var_as_bool('FUEL_USE_LOCAL_NTPD', True)
|
||||
|
|
|
@ -19,6 +19,7 @@ from fuelweb_test.helpers.decorators import log_snapshot_after_test
|
|||
from fuelweb_test.helpers.utils import timestat
|
||||
from fuelweb_test.models.environment import EnvironmentModel
|
||||
from fuelweb_test.settings import REPLACE_DEFAULT_REPOS
|
||||
from fuelweb_test.settings import REPLACE_DEFAULT_REPOS_ONLY_ONCE
|
||||
|
||||
|
||||
class TestBasic(object):
|
||||
|
@ -74,7 +75,7 @@ class SetupEnvironment(TestBasic):
|
|||
"""
|
||||
self.check_run("empty_custom_manifests")
|
||||
self.env.setup_environment(custom=True, build_images=True)
|
||||
if REPLACE_DEFAULT_REPOS:
|
||||
if REPLACE_DEFAULT_REPOS and REPLACE_DEFAULT_REPOS_ONLY_ONCE:
|
||||
self.fuel_web.replace_default_repos()
|
||||
self.env.make_snapshot("empty_custom_manifests", is_make=True)
|
||||
|
||||
|
@ -94,7 +95,7 @@ class SetupEnvironment(TestBasic):
|
|||
self.env.revert_snapshot("empty", skip_timesync=True)
|
||||
|
||||
self.fuel_web.get_nailgun_version()
|
||||
if REPLACE_DEFAULT_REPOS:
|
||||
if REPLACE_DEFAULT_REPOS and REPLACE_DEFAULT_REPOS_ONLY_ONCE:
|
||||
self.fuel_web.replace_default_repos()
|
||||
self.env.make_snapshot("ready", is_make=True)
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ from proboscis.asserts import assert_equal
|
|||
from proboscis.asserts import assert_true
|
||||
from proboscis import test
|
||||
|
||||
from fuelweb_test.helpers import checkers
|
||||
from fuelweb_test.helpers.decorators import log_snapshot_after_test
|
||||
from fuelweb_test.helpers.eb_tables import Ebtables
|
||||
from fuelweb_test.helpers import os_actions
|
||||
|
|
Loading…
Reference in New Issue