nxos: Make sure config ends with a linefeed (#48465)

The config parser on NX-OS does not deal with configs that do not end
with a linefeed correctly which leads to various issues when the config
is loaded from startup-config upon reboot. Therefore, ensure that the
config returned is terminated by a linefeed.
pull/49206/head
Paul Neumann 6 years ago committed by Trishna Guha
parent 5ffb863f0b
commit 4c58fbc64d

@ -145,7 +145,7 @@ class Cli:
except ConnectionError as exc: except ConnectionError as exc:
self._module.fail_json(msg=to_text(exc, errors='surrogate_then_replace')) self._module.fail_json(msg=to_text(exc, errors='surrogate_then_replace'))
cfg = to_text(out, errors='surrogate_then_replace').strip() cfg = to_text(out, errors='surrogate_then_replace').strip() + '\n'
self._device_configs[cmd] = cfg self._device_configs[cmd] = cfg
return cfg return cfg

Loading…
Cancel
Save