Add node UUID to deprecated log message

That makes easier to operators to find out which node is actually using
the deprecated parameter.

Change-Id: Ie8fcc9339747717a906affb48611482538b09eb7
This commit is contained in:
Lucas Alvares Gomes 2015-03-11 16:07:12 +00:00
parent 0516224b0d
commit 9ea519cf58

View File

@ -131,7 +131,8 @@ def _parse_driver_info(node):
# NOTE(lucasagomes): For backwards compatibility let's keep accepting # NOTE(lucasagomes): For backwards compatibility let's keep accepting
# pxe_deploy_{kernel, ramdisk}, should be removed in Liberty. # pxe_deploy_{kernel, ramdisk}, should be removed in Liberty.
deprecated_msg = _LW('The "%(old_param)s" parameter is deprecated. ' deprecated_msg = _LW('The "%(old_param)s" parameter is deprecated. '
'Please use "%(new_param)s" instead.') 'Please update the node %(node)s to use '
'"%(new_param)s" instead.')
for parameter in ('deploy_kernel', 'deploy_ramdisk'): for parameter in ('deploy_kernel', 'deploy_ramdisk'):
value = info.get(parameter) value = info.get(parameter)
@ -140,7 +141,8 @@ def _parse_driver_info(node):
value = info.get(old_parameter) value = info.get(old_parameter)
if value: if value:
LOG.warning(deprecated_msg, {'old_param': old_parameter, LOG.warning(deprecated_msg, {'old_param': old_parameter,
'new_param': parameter}) 'new_param': parameter,
'node': node.uuid})
d_info[parameter] = value d_info[parameter] = value
error_msg = _("Cannot validate PXE bootloader. Some parameters were" error_msg = _("Cannot validate PXE bootloader. Some parameters were"