nxos_interface:DI: delay only when operation state check is requested (#54862)
* nxos_interface:DI: should only use delay when operation state check is requested There is a 10 second delay that is added for every interface that is changed. This delay should only occur when a task sets one of the `want` vars. * /return/continue/
This commit is contained in:
parent
daca7fa584
commit
0fe6bf911a
1 changed files with 4 additions and 3 deletions
|
@ -590,15 +590,16 @@ def check_declarative_intent_params(module, want):
|
||||||
failed_conditions = []
|
failed_conditions = []
|
||||||
have_neighbors = None
|
have_neighbors = None
|
||||||
for w in want:
|
for w in want:
|
||||||
|
if w['interface_type']:
|
||||||
|
continue
|
||||||
want_tx_rate = w.get('tx_rate')
|
want_tx_rate = w.get('tx_rate')
|
||||||
want_rx_rate = w.get('rx_rate')
|
want_rx_rate = w.get('rx_rate')
|
||||||
want_neighbors = w.get('neighbors')
|
want_neighbors = w.get('neighbors')
|
||||||
|
if not (want_tx_rate or want_rx_rate or want_neighbors):
|
||||||
|
continue
|
||||||
|
|
||||||
time.sleep(module.params['delay'])
|
time.sleep(module.params['delay'])
|
||||||
|
|
||||||
if w['interface_type']:
|
|
||||||
return
|
|
||||||
|
|
||||||
cmd = [{'command': 'show interface {0}'.format(w['name']), 'output': 'text'}]
|
cmd = [{'command': 'show interface {0}'.format(w['name']), 'output': 'text'}]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue