Skip to content

Commit

Permalink
Fix last eos issue in net_* tests (ansible#33726)
Browse files Browse the repository at this point in the history
This should finally fix it.
  • Loading branch information
Qalthos authored Dec 12, 2017
1 parent 9ea1b18 commit a2650cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ansible/modules/network/eos/eos_vrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,10 @@ def check_declarative_intent_params(want, module):
for i in w['interfaces']:
obj_in_have = search_obj_in_list(w['name'], have)

if obj_in_have and i not in obj_in_have.get('interfaces', []):
module.fail_json(msg="Interface %s not configured on vrf %s" % (i, w['name']))
if obj_in_have:
interfaces = obj_in_have.get('interfaces')
if interfaces is not None and i not in interfaces:
module.fail_json(msg="Interface %s not configured on vrf %s" % (i, w['name']))


def main():
Expand Down

0 comments on commit a2650cb

Please sign in to comment.