lldp-timeout kernel parameter missing ipa- prefix

Every other Ironic python agent kernel parameter is prefixed with "ipa-".
This patch allows users to use the old "lldp-timeout" parameter or the new
"ipa-lldp-timeout" parameter. Warning message is logged if "lldp-timeout"
parameter is used.

(Also fixed typo while I'm at it.)

Change-Id: Icc05ead31506628e4926be6549916a19cad48db3
Closes-Bug: #1588325
This commit is contained in:
Yosef Hoffman
2016-06-02 10:57:31 -04:00
parent 90ba6452ef
commit 90c15e10cb
3 changed files with 15 additions and 2 deletions

@ -217,6 +217,13 @@ def get_agent_params():
# Cache the parameters so that it can be used later on.
_set_cached_params(params)
# Check to see if any deprecated parameters have been used
deprecated_params = {'lldp-timeout': 'ipa-lldp-timeout'}
for old_param, new_param in deprecated_params.items():
if params.get(old_param) is not None:
LOG.warning("The parameter '%s' has been deprecated. Please "
"use %s instead.", old_param, new_param)
return copy.deepcopy(params)