mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07: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:
parent
6f4b2e8f7f
commit
09ae1ec308
6 changed files with 16 additions and 24 deletions
|
@ -77,7 +77,11 @@ class HttpApi(HttpApiBase):
|
|||
|
||||
operations = self.connection.get_device_operations()
|
||||
self.connection.check_edit_config_capabiltiy(operations, candidate, commit, replace, comment)
|
||||
|
||||
if replace:
|
||||
device_info = self.connection.get_device_info()
|
||||
if '9K' not in device_info.get('network_os_platform', ''):
|
||||
raise ConnectionError(msg=u'replace is supported only on Nexus 9K devices')
|
||||
candidate = 'config replace {0}'.format(replace)
|
||||
|
||||
responses = self.send_request(candidate, output='config')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue