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
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

@ -281,7 +281,6 @@ from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.connection import ConnectionError
from ansible.module_utils.network.common.config import NetworkConfig, dumps
from ansible.module_utils.network.nxos.nxos import get_config, load_config, run_commands, get_connection
from ansible.module_utils.network.nxos.nxos import get_capabilities
from ansible.module_utils.network.nxos.nxos import nxos_argument_spec
from ansible.module_utils.network.nxos.nxos import check_args as nxos_check_args
from ansible.module_utils.network.common.utils import to_list
@ -392,19 +391,6 @@ def main():
config = None
try:
info = get_capabilities(module)
api = info.get('network_api')
device_info = info.get('device_info', {})
os_platform = device_info.get('network_os_platform', '')
except ConnectionError:
api = ''
os_platform = ''
if api == 'cliconf' and module.params['replace'] == 'config':
if '9K' not in os_platform:
module.fail_json(msg='replace: config is supported only on Nexus 9K series switches')
diff_ignore_lines = module.params['diff_ignore_lines']
path = module.params['parents']
connection = get_connection(module)