File tree Expand file tree Collapse file tree 2 files changed +67
-0
lines changed
tests/unit/modules/network/eos Expand file tree Collapse file tree 2 files changed +67
-0
lines changed Original file line number Diff line number Diff line change 1+ ip access-list TEST-LIST-1
2+ 10 remark test
3+ 20 permit tcp 192.0.2.0 /24 any eq https log
4+ !
5+ ip access-list TEST-LIST-2
6+ 10 remark test
7+ 20 permit tcp 192.0.2.0 /24 any eq https log
8+ !
9+ ip access-list TEST-LIST-3
10+ 10 remark test
11+ 20 permit tcp 192.0.2.0 /24 any eq https log
12+ !
Original file line number Diff line number Diff line change @@ -397,6 +397,61 @@ def test_eos_acls_deletedafis(self):
397397 commands = ["no ip access-list test1" ]
398398 self .execute_module (changed = True , commands = commands )
399399
400+ def test_eos_two_acls_idempotent (self ):
401+ set_module_args (
402+ dict (
403+ config = [
404+ dict (
405+ afi = "ipv4" ,
406+ acls = [
407+ dict (
408+ name = "TEST-LIST-1" ,
409+ aces = [
410+ dict (
411+ sequence = "10" ,
412+ remark = "test" ,
413+ ),
414+ dict (
415+ sequence = "20" ,
416+ grant = "permit" ,
417+ source = dict (subnet_address = "192.0.2.0/24" ),
418+ destination = dict (
419+ any = "true" ,
420+ port_protocol = dict (eq = "https" ),
421+ ),
422+ protocol = "tcp" ,
423+ log = "true" ,
424+ ),
425+ ],
426+ ),
427+ dict (
428+ name = "TEST-LIST-2" ,
429+ aces = [
430+ dict (
431+ sequence = "10" ,
432+ remark = "test" ,
433+ ),
434+ dict (
435+ sequence = "20" ,
436+ grant = "permit" ,
437+ log = "true" ,
438+ destination = dict (
439+ any = "true" ,
440+ port_protocol = dict (eq = "https" ),
441+ ),
442+ protocol = "tcp" ,
443+ source = dict (subnet_address = "192.0.2.0/24" ),
444+ ),
445+ ],
446+ ),
447+ ],
448+ ),
449+ ],
450+ state = "replaced" ,
451+ ),
452+ )
453+ self .execute_module (changed = False , commands = [], filename = "eos_acls_idempotent.cfg" )
454+
400455 def test_eos_acls_gathered (self ):
401456 set_module_args (dict (config = [], state = "gathered" ))
402457 result = self .execute_module (
You can’t perform that action at this time.
0 commit comments