mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
cliconf refactor eos, nxos fix (#43596)
* cliconf refactor eos and nxos fix Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * move nxos replace check to plugins Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * address review comment * fix shippable
This commit is contained in:
@@ -392,6 +392,9 @@ class Nxapi:
|
||||
"""Sends the ordered set of commands to the device
|
||||
"""
|
||||
if replace:
|
||||
device_info = self.get_device_info()
|
||||
if '9K' not in device_info.get('network_os_platform', ''):
|
||||
self._module.fail_json(msg='replace is supported only on Nexus 9K devices')
|
||||
commands = 'config replace {0}'.format(replace)
|
||||
|
||||
commands = to_list(commands)
|
||||
|
||||
Reference in New Issue
Block a user