File tree 2 files changed +65
-0
lines changed
tests/unit/modules/network/eos
2 files changed +65
-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,59 @@ def test_eos_acls_deletedafis(self):
397
397
commands = ["no ip access-list test1" ]
398
398
self .execute_module (changed = True , commands = commands )
399
399
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" , port_protocol = dict (eq = "https" )
420
+ ),
421
+ protocol = "tcp" ,
422
+ log = "true" ,
423
+ ),
424
+ ],
425
+ ),
426
+ dict (
427
+ name = "TEST-LIST-2" ,
428
+ aces = [
429
+ dict (
430
+ sequence = "10" ,
431
+ remark = "test" ,
432
+ ),
433
+ dict (
434
+ sequence = "20" ,
435
+ grant = "permit" ,
436
+ log = "true" ,
437
+ destination = dict (
438
+ any = "true" , port_protocol = dict (eq = "https" )
439
+ ),
440
+ protocol = "tcp" ,
441
+ source = dict (subnet_address = "192.0.2.0/24" ),
442
+ ),
443
+ ],
444
+ ),
445
+ ],
446
+ ),
447
+ ],
448
+ state = "replaced" ,
449
+ ),
450
+ )
451
+ self .execute_module (changed = False , commands = [], filename = "eos_acls_idempotent.cfg" )
452
+
400
453
def test_eos_acls_gathered (self ):
401
454
set_module_args (dict (config = [], state = "gathered" ))
402
455
result = self .execute_module (
You can’t perform that action at this time.
0 commit comments