inspector.py (ironic-17.0.2) | : | inspector.py (ironic-17.0.3) | ||
---|---|---|---|---|
skipping to change at line 178 | skipping to change at line 178 | |||
return True | return True | |||
def _parse_kernel_params(): | def _parse_kernel_params(): | |||
"""Parse kernel params from the configuration.""" | """Parse kernel params from the configuration.""" | |||
result = {} | result = {} | |||
for s in shlex.split(CONF.inspector.extra_kernel_params): | for s in shlex.split(CONF.inspector.extra_kernel_params): | |||
try: | try: | |||
key, value = s.split('=', 1) | key, value = s.split('=', 1) | |||
except ValueError: | except ValueError: | |||
raise exception.InvalidParameterValue( | result[s] = None | |||
_('Invalid key-value pair in extra_kernel_params: %s') % s) | else: | |||
result[key] = value | result[key] = value | |||
return result | return result | |||
def _start_managed_inspection(task): | def _start_managed_inspection(task): | |||
"""Start inspection managed by ironic.""" | """Start inspection managed by ironic.""" | |||
try: | try: | |||
client = _get_client(task.context) | client = _get_client(task.context) | |||
endpoint = _get_callback_endpoint(client) | endpoint = _get_callback_endpoint(client) | |||
params = dict(_parse_kernel_params(), | params = dict(_parse_kernel_params(), | |||
**{'ipa-inspection-callback-url': endpoint}) | **{'ipa-inspection-callback-url': endpoint}) | |||
if CONF.deploy.fast_track: | if CONF.deploy.fast_track: | |||
End of changes. 1 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |