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:
Trishna Guha 2018-08-02 16:34:48 +05:30 committed by GitHub
parent 6f4b2e8f7f
commit 09ae1ec308
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 24 deletions

View file

@ -158,6 +158,9 @@ class Cliconf(CliconfBase):
requests = []
if replace:
device_info = self.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)
if commit:
@ -244,8 +247,9 @@ class Cliconf(CliconfBase):
def get_capabilities(self):
result = {}
result['rpc'] = self.get_base_rpc()
result['rpc'] = self.get_base_rpc() + ['get_diff', 'run_commands']
result['device_info'] = self.get_device_info()
result['device_operations'] = self.get_device_operations()
result.update(self.get_option_values())
if isinstance(self._connection, NetworkCli):