Fix eos integration test failures (#37020)

Fixes #36919

Fix other eos modules integration test failure in dci
This commit is contained in:
Ganesh Nalawade 2018-03-06 10:04:40 +05:30 committed by GitHub
commit ba3201cd2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 18 deletions

View file

@ -330,7 +330,7 @@ def check_declarative_intent_params(module, want, result):
if result['changed']:
sleep(w['delay'])
command = 'show interfaces %s' % w['name']
command = {'command': 'show interfaces %s' % w['name'], 'output': 'text'}
output = run_commands(module, [command])
if want_state in ('up', 'down'):
@ -363,7 +363,8 @@ def check_declarative_intent_params(module, want, result):
have_host = []
have_port = []
if have_neighbors is None:
have_neighbors = run_commands(module, ['show lldp neighbors {}'.format(w['name'])])
command = {'command': 'show lldp neighbors {}'.format(w['name']), 'output': 'text'}
have_neighbors = run_commands(module, [command])
if have_neighbors[0]:
lines = have_neighbors[0].strip().split('\n')

View file

@ -58,10 +58,10 @@ from ansible.module_utils.network.eos.eos import eos_argument_spec
def has_lldp(module):
output = run_commands(module, ['show lldp'])
config = get_config(module, flags=['| section lldp'])
is_lldp_enable = False
if len(output) > 0 and "LLDP is not enabled" not in output[0]:
if "no lldp run" not in config:
is_lldp_enable = True
return is_lldp_enable