Merge "Add ability to enable rdo testing repo"
This commit is contained in:
commit
41f3e9e86c
@ -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
|
||||
-----------
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user