Add ability to enable rdo testing repo

The new rdo-release-kilo now adds the testing repo this patch
allows the user to enable the repo.

Change-Id: I2de49561ca287df42e084e3d6c70183f7a1e21f9
This commit is contained in:
Ivan Chavero
2015-05-14 17:15:12 -06:00
committed by Javier Pena
parent d60bca120f
commit 5359440ac6
2 changed files with 21 additions and 1 deletions

View File

@@ -137,6 +137,9 @@ Server Prepare Configs
**CONFIG_REPO**
Comma-separated list of URLs for any additional yum repositories, to use for installation.
**CONFIG_ENABLE_RDO_TESTING**
Specify 'y' to enable the RDO testing repository. ['y', 'n']
RHEL config
-----------

View File

@@ -552,7 +552,19 @@ def initConfig(controller):
"CONF_NAME": "CONFIG_REPO",
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False}
"CONDITION": False},
{"CMD_OPTION": "enable-rdo-testing",
"PROMPT": "To enable rdo testing enter \"y\"",
"OPTION_LIST": ["y", "n"],
"VALIDATORS": [validators.validate_options],
"DEFAULT_VALUE": "n",
"MASK_INPUT": False,
"LOOSE_VALIDATION": True,
"CONF_NAME": "CONFIG_ENABLE_RDO_TESTING",
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False},
],
"RHEL": [
@@ -1123,6 +1135,11 @@ def manage_rdo(host, config):
reponame = 'openstack-%s' % version
server.clear()
server.append('yum-config-manager --enable %(reponame)s' % locals())
if config['CONFIG_ENABLE_RDO_TESTING'] == 'y':
server.append('yum-config-manager --disable %(reponame)s' % locals())
server.append('yum-config-manager --enable %(reponame)s-testing' % locals())
# yum-config-manager returns 0 always, but returns current setup
# if succeeds
rc, out = server.execute()