mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Fix eos integration test failures (#37020)
Fixes #36919 Fix other eos modules integration test failure in dci
This commit is contained in:
parent
bcdaba57b5
commit
ba3201cd2f
6 changed files with 41 additions and 18 deletions
|
@ -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')
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue