summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnsible Core Team <info@ansible.com>2020-03-09 09:40:34 +0000
committerAnsible Core Team <info@ansible.com>2020-03-09 09:40:34 +0000
commit44ce3f381254b913bff1c735a2829003f5c240f9 (patch)
tree4ffffd9e84c1ba29943e8a65943af8a4db45c423 /test
parent83c7ad1886999030ed55abb0f2201e8a08124b12 (diff)
downloadansible-44ce3f381254b913bff1c735a2829003f5c240f9.tar.gz
Migrated to cisco.ios
Diffstat (limited to 'test')
-rw-r--r--test/integration/targets/ios_acl_interfaces/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_acl_interfaces/tasks/cli.yaml21
-rw-r--r--test/integration/targets/ios_acl_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_acl_interfaces/tests/cli/_parsed.cfg8
-rw-r--r--test/integration/targets/ios_acl_interfaces/tests/cli/_populate_config.yaml14
-rw-r--r--test/integration/targets/ios_acl_interfaces/tests/cli/_remove_config.yaml15
-rw-r--r--test/integration/targets/ios_acl_interfaces/tests/cli/deleted.yaml65
-rw-r--r--test/integration/targets/ios_acl_interfaces/tests/cli/empty_config.yaml58
-rw-r--r--test/integration/targets/ios_acl_interfaces/tests/cli/gathered.yaml21
-rw-r--r--test/integration/targets/ios_acl_interfaces/tests/cli/merged.yaml53
-rw-r--r--test/integration/targets/ios_acl_interfaces/tests/cli/overridden.yaml41
-rw-r--r--test/integration/targets/ios_acl_interfaces/tests/cli/parsed.yaml16
-rw-r--r--test/integration/targets/ios_acl_interfaces/tests/cli/rendered.yaml39
-rw-r--r--test/integration/targets/ios_acl_interfaces/tests/cli/replaced.yaml41
-rw-r--r--test/integration/targets/ios_acl_interfaces/tests/cli/rtt.yaml78
-rw-r--r--test/integration/targets/ios_acl_interfaces/vars/main.yaml99
-rw-r--r--test/integration/targets/ios_acls/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_acls/meta/main.yaml1
-rw-r--r--test/integration/targets/ios_acls/tasks/cli.yaml21
-rw-r--r--test/integration/targets/ios_acls/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_acls/tests/cli/_parsed.cfg7
-rw-r--r--test/integration/targets/ios_acls/tests/cli/_populate_config.yaml15
-rw-r--r--test/integration/targets/ios_acls/tests/cli/_remove_config.yaml12
-rw-r--r--test/integration/targets/ios_acls/tests/cli/deleted.yaml70
-rw-r--r--test/integration/targets/ios_acls/tests/cli/empty_config.yaml58
-rw-r--r--test/integration/targets/ios_acls/tests/cli/gathered.yaml21
-rw-r--r--test/integration/targets/ios_acls/tests/cli/merged.yaml123
-rw-r--r--test/integration/targets/ios_acls/tests/cli/overridden.yaml73
-rw-r--r--test/integration/targets/ios_acls/tests/cli/parsed.yaml16
-rw-r--r--test/integration/targets/ios_acls/tests/cli/rendered.yaml54
-rw-r--r--test/integration/targets/ios_acls/tests/cli/replaced.yaml72
-rw-r--r--test/integration/targets/ios_acls/tests/cli/rtt.yaml173
-rw-r--r--test/integration/targets/ios_acls/vars/main.yaml242
-rw-r--r--test/integration/targets/ios_banner/defaults/main.yaml2
-rw-r--r--test/integration/targets/ios_banner/meta/main.yml2
-rw-r--r--test/integration/targets/ios_banner/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_banner/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_banner/tests/cli/basic-login.yaml50
-rw-r--r--test/integration/targets/ios_banner/tests/cli/basic-motd.yaml50
-rw-r--r--test/integration/targets/ios_banner/tests/cli/basic-no-login.yaml41
-rw-r--r--test/integration/targets/ios_banner/tests/cli/multiple-login-exec.yaml55
-rw-r--r--test/integration/targets/ios_banner/tests/cli/net_banner.yml32
-rw-r--r--test/integration/targets/ios_bgp/defaults/main.yaml2
-rw-r--r--test/integration/targets/ios_bgp/meta/main.yaml2
-rw-r--r--test/integration/targets/ios_bgp/tasks/cli.yaml17
-rw-r--r--test/integration/targets/ios_bgp/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_bgp/tests/cli/basic.yaml504
-rw-r--r--test/integration/targets/ios_command/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_command/meta/main.yml2
-rw-r--r--test/integration/targets/ios_command/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_command/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_command/tests/cli/bad_operator.yaml20
-rw-r--r--test/integration/targets/ios_command/tests/cli/cli_command.yaml28
-rw-r--r--test/integration/targets/ios_command/tests/cli/contains.yaml20
-rw-r--r--test/integration/targets/ios_command/tests/cli/error_regex.yaml59
-rw-r--r--test/integration/targets/ios_command/tests/cli/invalid.yaml28
-rw-r--r--test/integration/targets/ios_command/tests/cli/output.yaml30
-rw-r--r--test/integration/targets/ios_command/tests/cli/timeout.yaml19
-rw-r--r--test/integration/targets/ios_config/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_config/meta/main.yml2
-rw-r--r--test/integration/targets/ios_config/tasks/cli.yaml17
-rw-r--r--test/integration/targets/ios_config/tasks/cli_config.yaml17
-rw-r--r--test/integration/targets/ios_config/tasks/main.yaml3
-rw-r--r--test/integration/targets/ios_config/templates/basic/base_running_config9
-rw-r--r--test/integration/targets/ios_config/templates/basic/config.j24
-rw-r--r--test/integration/targets/ios_config/templates/basic/configblock.j25
-rw-r--r--test/integration/targets/ios_config/templates/basic/configexact1.j26
-rw-r--r--test/integration/targets/ios_config/templates/basic/configexact2.j25
-rw-r--r--test/integration/targets/ios_config/templates/basic/configstrict1.j25
-rw-r--r--test/integration/targets/ios_config/templates/basic/intended_running_config9
-rw-r--r--test/integration/targets/ios_config/templates/basic/macro.j28
-rw-r--r--test/integration/targets/ios_config/templates/basic/setupblock.j25
-rw-r--r--test/integration/targets/ios_config/templates/basic/setupexact.j27
-rw-r--r--test/integration/targets/ios_config/templates/basic/setupstrict.j27
-rw-r--r--test/integration/targets/ios_config/templates/defaults/config.j24
-rw-r--r--test/integration/targets/ios_config/tests/cli/backup.yaml125
-rw-r--r--test/integration/targets/ios_config/tests/cli/defaults.yaml57
-rw-r--r--test/integration/targets/ios_config/tests/cli/diff.yaml33
-rw-r--r--test/integration/targets/ios_config/tests/cli/macro.yaml66
-rw-r--r--test/integration/targets/ios_config/tests/cli/save.yaml49
-rw-r--r--test/integration/targets/ios_config/tests/cli/src_basic.yaml70
-rw-r--r--test/integration/targets/ios_config/tests/cli/src_invalid.yaml18
-rw-r--r--test/integration/targets/ios_config/tests/cli/src_match_none.yaml38
-rw-r--r--test/integration/targets/ios_config/tests/cli/sublevel.yaml39
-rw-r--r--test/integration/targets/ios_config/tests/cli/sublevel_block.yaml58
-rw-r--r--test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml61
-rw-r--r--test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml57
-rw-r--r--test/integration/targets/ios_config/tests/cli/sublevel_strict_mul_parents.yaml66
-rw-r--r--test/integration/targets/ios_config/tests/cli/toplevel.yaml33
-rw-r--r--test/integration/targets/ios_config/tests/cli/toplevel_after.yaml40
-rw-r--r--test/integration/targets/ios_config/tests/cli/toplevel_before.yaml40
-rw-r--r--test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml35
-rw-r--r--test/integration/targets/ios_config/tests/cli_config/cli_backup.yaml113
-rw-r--r--test/integration/targets/ios_config/tests/cli_config/cli_basic.yaml45
-rw-r--r--test/integration/targets/ios_config/tests/cli_config/cli_block_replace.yaml32
-rw-r--r--test/integration/targets/ios_config/tests/cli_config/cli_exact_match.yaml33
-rw-r--r--test/integration/targets/ios_config/tests/cli_config/cli_strict_match.yaml24
-rw-r--r--test/integration/targets/ios_facts/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_facts/meta/main.yml2
-rw-r--r--test/integration/targets/ios_facts/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_facts/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_facts/tests/cli/all_facts.yaml35
-rw-r--r--test/integration/targets/ios_facts/tests/cli/default_facts.yaml35
-rw-r--r--test/integration/targets/ios_facts/tests/cli/invalid_subset.yaml48
-rw-r--r--test/integration/targets/ios_facts/tests/cli/not_hardware.yaml31
-rw-r--r--test/integration/targets/ios_file/aliases1
-rw-r--r--test/integration/targets/ios_file/defaults/main.yaml2
-rw-r--r--test/integration/targets/ios_file/ios1.cfg3
-rw-r--r--test/integration/targets/ios_file/nonascii.binbin32768 -> 0 bytes
-rw-r--r--test/integration/targets/ios_file/tasks/cli.yaml17
-rw-r--r--test/integration/targets/ios_file/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_file/tests/cli/net_get.yaml52
-rw-r--r--test/integration/targets/ios_file/tests/cli/net_put.yaml73
-rw-r--r--test/integration/targets/ios_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/ios_interface/meta/main.yaml2
-rw-r--r--test/integration/targets/ios_interface/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_interface/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_interface/tests/cli/basic.yaml228
-rw-r--r--test/integration/targets/ios_interface/tests/cli/intent.yaml140
-rw-r--r--test/integration/targets/ios_interface/tests/cli/net_interface.yaml47
-rw-r--r--test/integration/targets/ios_interfaces/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_interfaces/meta/main.yaml1
-rw-r--r--test/integration/targets/ios_interfaces/tasks/cli.yaml21
-rw-r--r--test/integration/targets/ios_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_interfaces/tests/cli/_populate_config.yaml17
-rw-r--r--test/integration/targets/ios_interfaces/tests/cli/_remove_config.yaml24
-rw-r--r--test/integration/targets/ios_interfaces/tests/cli/deleted.yaml47
-rw-r--r--test/integration/targets/ios_interfaces/tests/cli/empty_config.yaml36
-rw-r--r--test/integration/targets/ios_interfaces/tests/cli/merged.yaml50
-rw-r--r--test/integration/targets/ios_interfaces/tests/cli/overridden.yaml46
-rw-r--r--test/integration/targets/ios_interfaces/tests/cli/replaced.yaml47
-rw-r--r--test/integration/targets/ios_interfaces/vars/main.yaml214
-rw-r--r--test/integration/targets/ios_l2_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/ios_l2_interface/meta/main.yml2
-rw-r--r--test/integration/targets/ios_l2_interface/tasks/cli.yaml26
-rw-r--r--test/integration/targets/ios_l2_interface/tasks/main.yaml4
-rw-r--r--test/integration/targets/ios_l2_interface/tests/cli/agg.yaml81
-rw-r--r--test/integration/targets/ios_l2_interface/tests/cli/sanity.yaml168
-rw-r--r--test/integration/targets/ios_l2_interfaces/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_l2_interfaces/meta/main.yaml1
-rw-r--r--test/integration/targets/ios_l2_interfaces/tasks/cli.yaml25
-rw-r--r--test/integration/targets/ios_l2_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_l2_interfaces/tests/cli/_populate_config.yaml15
-rw-r--r--test/integration/targets/ios_l2_interfaces/tests/cli/_remove_config.yaml21
-rw-r--r--test/integration/targets/ios_l2_interfaces/tests/cli/deleted.yaml41
-rw-r--r--test/integration/targets/ios_l2_interfaces/tests/cli/empty_config.yaml36
-rw-r--r--test/integration/targets/ios_l2_interfaces/tests/cli/merged.yaml50
-rw-r--r--test/integration/targets/ios_l2_interfaces/tests/cli/overridden.yaml47
-rw-r--r--test/integration/targets/ios_l2_interfaces/tests/cli/replaced.yaml50
-rw-r--r--test/integration/targets/ios_l2_interfaces/vars/main.yaml159
-rw-r--r--test/integration/targets/ios_l3_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/ios_l3_interface/meta/main.yaml2
-rw-r--r--test/integration/targets/ios_l3_interface/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_l3_interface/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_l3_interface/tests/cli/basic.yaml257
-rw-r--r--test/integration/targets/ios_l3_interfaces/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_l3_interfaces/meta/main.yaml1
-rw-r--r--test/integration/targets/ios_l3_interfaces/tasks/cli.yaml21
-rw-r--r--test/integration/targets/ios_l3_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_l3_interfaces/tests/cli/_populate_config.yaml12
-rw-r--r--test/integration/targets/ios_l3_interfaces/tests/cli/_remove_config.yaml12
-rw-r--r--test/integration/targets/ios_l3_interfaces/tests/cli/deleted.yaml43
-rw-r--r--test/integration/targets/ios_l3_interfaces/tests/cli/empty_config.yaml36
-rw-r--r--test/integration/targets/ios_l3_interfaces/tests/cli/merged.yaml51
-rw-r--r--test/integration/targets/ios_l3_interfaces/tests/cli/overridden.yaml49
-rw-r--r--test/integration/targets/ios_l3_interfaces/tests/cli/replaced.yaml51
-rw-r--r--test/integration/targets/ios_l3_interfaces/vars/main.yaml157
-rw-r--r--test/integration/targets/ios_lacp/aliases1
-rw-r--r--test/integration/targets/ios_lacp/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_lacp/meta/main.yaml1
-rw-r--r--test/integration/targets/ios_lacp/tasks/cli.yaml25
-rw-r--r--test/integration/targets/ios_lacp/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_lacp/tests/cli/_populate_config.yaml8
-rw-r--r--test/integration/targets/ios_lacp/tests/cli/_remove_config.yaml8
-rw-r--r--test/integration/targets/ios_lacp/tests/cli/deleted.yaml41
-rw-r--r--test/integration/targets/ios_lacp/tests/cli/empty_config.yaml27
-rw-r--r--test/integration/targets/ios_lacp/tests/cli/merged.yaml42
-rw-r--r--test/integration/targets/ios_lacp/tests/cli/replaced.yaml44
-rw-r--r--test/integration/targets/ios_lacp/vars/main.yaml36
-rw-r--r--test/integration/targets/ios_lacp_interfaces/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_lacp_interfaces/tasks/cli.yaml25
-rw-r--r--test/integration/targets/ios_lacp_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_lacp_interfaces/tests/cli/_populate_config.yaml16
-rw-r--r--test/integration/targets/ios_lacp_interfaces/tests/cli/_remove_config.yaml17
-rw-r--r--test/integration/targets/ios_lacp_interfaces/tests/cli/deleted.yaml41
-rw-r--r--test/integration/targets/ios_lacp_interfaces/tests/cli/empty_config.yaml38
-rw-r--r--test/integration/targets/ios_lacp_interfaces/tests/cli/merged.yaml47
-rw-r--r--test/integration/targets/ios_lacp_interfaces/tests/cli/overridden.yaml47
-rw-r--r--test/integration/targets/ios_lacp_interfaces/tests/cli/replaced.yaml46
-rw-r--r--test/integration/targets/ios_lacp_interfaces/vars/main.yaml126
-rw-r--r--test/integration/targets/ios_lag_interfaces/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_lag_interfaces/meta/main.yaml1
-rw-r--r--test/integration/targets/ios_lag_interfaces/tasks/cli.yaml25
-rw-r--r--test/integration/targets/ios_lag_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_lag_interfaces/tests/cli/_populate_config.yaml11
-rw-r--r--test/integration/targets/ios_lag_interfaces/tests/cli/_remove_config.yaml11
-rw-r--r--test/integration/targets/ios_lag_interfaces/tests/cli/deleted.yaml41
-rw-r--r--test/integration/targets/ios_lag_interfaces/tests/cli/empty_config.yaml38
-rw-r--r--test/integration/targets/ios_lag_interfaces/tests/cli/merged.yaml46
-rw-r--r--test/integration/targets/ios_lag_interfaces/tests/cli/overridden.yaml46
-rw-r--r--test/integration/targets/ios_lag_interfaces/tests/cli/replaced.yaml50
-rw-r--r--test/integration/targets/ios_lag_interfaces/vars/main.yaml93
-rw-r--r--test/integration/targets/ios_linkagg/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_linkagg/meta/main.yaml2
-rw-r--r--test/integration/targets/ios_linkagg/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_linkagg/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_linkagg/tests/cli/basic.yaml171
-rw-r--r--test/integration/targets/ios_lldp/defaults/main.yaml2
-rw-r--r--test/integration/targets/ios_lldp/meta/main.yaml2
-rw-r--r--test/integration/targets/ios_lldp/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_lldp/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_lldp/tests/cli/basic.yaml51
-rw-r--r--test/integration/targets/ios_lldp_global/aliases1
-rw-r--r--test/integration/targets/ios_lldp_global/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_lldp_global/meta/main.yaml1
-rw-r--r--test/integration/targets/ios_lldp_global/tasks/cli.yaml21
-rw-r--r--test/integration/targets/ios_lldp_global/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_lldp_global/tests/cli/_populate_config.yaml10
-rw-r--r--test/integration/targets/ios_lldp_global/tests/cli/_remove_config.yaml10
-rw-r--r--test/integration/targets/ios_lldp_global/tests/cli/deleted.yaml40
-rw-r--r--test/integration/targets/ios_lldp_global/tests/cli/empty_config.yaml25
-rw-r--r--test/integration/targets/ios_lldp_global/tests/cli/merged.yaml43
-rw-r--r--test/integration/targets/ios_lldp_global/tests/cli/replaced.yaml43
-rw-r--r--test/integration/targets/ios_lldp_global/vars/main.yaml47
-rw-r--r--test/integration/targets/ios_lldp_interfaces/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_lldp_interfaces/tasks/cli.yaml21
-rw-r--r--test/integration/targets/ios_lldp_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_lldp_interfaces/tests/cli/_enable_lldp.yaml7
-rw-r--r--test/integration/targets/ios_lldp_interfaces/tests/cli/_populate_config.yaml15
-rw-r--r--test/integration/targets/ios_lldp_interfaces/tests/cli/_remove_config.yaml15
-rw-r--r--test/integration/targets/ios_lldp_interfaces/tests/cli/deleted.yaml42
-rw-r--r--test/integration/targets/ios_lldp_interfaces/tests/cli/empty_config.yaml36
-rw-r--r--test/integration/targets/ios_lldp_interfaces/tests/cli/merged.yaml50
-rw-r--r--test/integration/targets/ios_lldp_interfaces/tests/cli/overridden.yaml48
-rw-r--r--test/integration/targets/ios_lldp_interfaces/tests/cli/replaced.yaml48
-rw-r--r--test/integration/targets/ios_lldp_interfaces/vars/main.yaml126
-rw-r--r--test/integration/targets/ios_logging/defaults/main.yaml2
-rw-r--r--test/integration/targets/ios_logging/meta/main.yaml2
-rw-r--r--test/integration/targets/ios_logging/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_logging/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_logging/tests/cli/basic.yaml144
-rw-r--r--test/integration/targets/ios_logging/tests/cli/net_logging.yaml36
-rw-r--r--test/integration/targets/ios_ntp/defaults/main.yaml2
-rw-r--r--test/integration/targets/ios_ntp/meta/main.yml2
-rw-r--r--test/integration/targets/ios_ntp/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_ntp/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_ntp/tests/cli/ntp_configuration.yaml106
-rw-r--r--test/integration/targets/ios_ping/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_ping/meta/main.yaml2
-rw-r--r--test/integration/targets/ios_ping/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_ping/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_ping/tests/cli/ping.yaml55
-rw-r--r--test/integration/targets/ios_smoke/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_smoke/meta/main.yaml2
-rw-r--r--test/integration/targets/ios_smoke/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_smoke/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_smoke/templates/defaults/config.j24
-rw-r--r--test/integration/targets/ios_smoke/tests/cli/common_config.yaml212
-rw-r--r--test/integration/targets/ios_smoke/tests/cli/common_utils.yaml152
-rw-r--r--test/integration/targets/ios_smoke/tests/cli/misc_tests.yaml41
-rw-r--r--test/integration/targets/ios_smoke/tests/cli/reboot.yaml19
-rw-r--r--test/integration/targets/ios_static_route/defaults/main.yaml2
-rw-r--r--test/integration/targets/ios_static_route/meta/main.yaml2
-rw-r--r--test/integration/targets/ios_static_route/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_static_route/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_static_route/tests/cli/basic.yaml144
-rw-r--r--test/integration/targets/ios_static_route/tests/cli/net_static_route.yaml33
-rw-r--r--test/integration/targets/ios_static_routes/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_static_routes/meta/main.yaml1
-rw-r--r--test/integration/targets/ios_static_routes/tasks/cli.yaml20
-rw-r--r--test/integration/targets/ios_static_routes/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_static_routes/tests/cli/_intial_setup_config.yaml13
-rw-r--r--test/integration/targets/ios_static_routes/tests/cli/_populate_config.yaml11
-rw-r--r--test/integration/targets/ios_static_routes/tests/cli/_remove_config.yaml12
-rw-r--r--test/integration/targets/ios_static_routes/tests/cli/deleted.yaml66
-rw-r--r--test/integration/targets/ios_static_routes/tests/cli/empty_config.yaml58
-rw-r--r--test/integration/targets/ios_static_routes/tests/cli/gathered.yaml22
-rw-r--r--test/integration/targets/ios_static_routes/tests/cli/merged.yaml66
-rw-r--r--test/integration/targets/ios_static_routes/tests/cli/overridden.yaml58
-rw-r--r--test/integration/targets/ios_static_routes/tests/cli/rendered.yaml54
-rw-r--r--test/integration/targets/ios_static_routes/tests/cli/replaced.yaml61
-rw-r--r--test/integration/targets/ios_static_routes/tests/cli/rtt.yaml78
-rw-r--r--test/integration/targets/ios_static_routes/vars/main.yaml88
-rw-r--r--test/integration/targets/ios_system/defaults/main.yaml2
-rw-r--r--test/integration/targets/ios_system/meta/main.yml2
-rw-r--r--test/integration/targets/ios_system/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_system/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_system/tests/cli/net_system.yaml37
-rw-r--r--test/integration/targets/ios_system/tests/cli/set_domain_list.yaml122
-rw-r--r--test/integration/targets/ios_system/tests/cli/set_domain_name.yaml36
-rw-r--r--test/integration/targets/ios_system/tests/cli/set_hostname.yaml36
-rw-r--r--test/integration/targets/ios_system/tests/cli/set_lookup_source.yaml94
-rw-r--r--test/integration/targets/ios_system/tests/cli/set_name_servers.yaml91
-rw-r--r--test/integration/targets/ios_user/defaults/main.yaml2
-rw-r--r--test/integration/targets/ios_user/files/test_rsa27
-rw-r--r--test/integration/targets/ios_user/files/test_rsa.pub1
-rw-r--r--test/integration/targets/ios_user/meta/main.yaml2
-rw-r--r--test/integration/targets/ios_user/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_user/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_user/tests/cli/auth.yaml83
-rw-r--r--test/integration/targets/ios_user/tests/cli/basic.yaml142
-rw-r--r--test/integration/targets/ios_vlan/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_vlan/meta/main.yaml2
-rw-r--r--test/integration/targets/ios_vlan/tasks/cli.yaml24
-rw-r--r--test/integration/targets/ios_vlan/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_vlan/tests/cli/basic.yaml239
-rw-r--r--test/integration/targets/ios_vlans/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_vlans/meta/main.yaml1
-rw-r--r--test/integration/targets/ios_vlans/tasks/cli.yaml25
-rw-r--r--test/integration/targets/ios_vlans/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_vlans/tests/cli/_populate_config.yaml10
-rw-r--r--test/integration/targets/ios_vlans/tests/cli/_remove_config.yaml11
-rw-r--r--test/integration/targets/ios_vlans/tests/cli/deleted.yaml42
-rw-r--r--test/integration/targets/ios_vlans/tests/cli/empty_config.yaml38
-rw-r--r--test/integration/targets/ios_vlans/tests/cli/merged.yaml54
-rw-r--r--test/integration/targets/ios_vlans/tests/cli/overridden.yaml48
-rw-r--r--test/integration/targets/ios_vlans/tests/cli/replaced.yaml49
-rw-r--r--test/integration/targets/ios_vlans/vars/main.yaml345
-rw-r--r--test/sanity/ignore.txt153
-rw-r--r--test/units/modules/network/ios/fixtures/configure_terminal2
-rw-r--r--test/units/modules/network/ios/fixtures/ios_acl_interfaces.cfg8
-rw-r--r--test/units/modules/network/ios/fixtures/ios_acls_config.cfg4
-rw-r--r--test/units/modules/network/ios/fixtures/ios_banner_show_banner.txt3
-rw-r--r--test/units/modules/network/ios/fixtures/ios_banner_show_running_config_ios12.txt15
-rw-r--r--test/units/modules/network/ios/fixtures/ios_bgp_config.cfg24
-rw-r--r--test/units/modules/network/ios/fixtures/ios_config_config.cfg12
-rw-r--r--test/units/modules/network/ios/fixtures/ios_config_defaults.cfg13
-rw-r--r--test/units/modules/network/ios/fixtures/ios_config_src.cfg11
-rw-r--r--test/units/modules/network/ios/fixtures/ios_facts_dir23
-rw-r--r--test/units/modules/network/ios/fixtures/ios_facts_show_cdp4
-rw-r--r--test/units/modules/network/ios/fixtures/ios_facts_show_cdp_neighbors_detail40
-rw-r--r--test/units/modules/network/ios/fixtures/ios_facts_show_interfaces61
-rw-r--r--test/units/modules/network/ios/fixtures/ios_facts_show_ip_interface0
-rw-r--r--test/units/modules/network/ios/fixtures/ios_facts_show_ipv6_interface0
-rw-r--r--test/units/modules/network/ios/fixtures/ios_facts_show_lldp6
-rw-r--r--test/units/modules/network/ios/fixtures/ios_facts_show_lldp_neighbors_detail50
-rw-r--r--test/units/modules/network/ios/fixtures/ios_facts_show_memory_statistics0
-rw-r--r--test/units/modules/network/ios/fixtures/ios_facts_show_version68
-rw-r--r--test/units/modules/network/ios/fixtures/ios_logging_config.cfg11
-rw-r--r--test/units/modules/network/ios/fixtures/ios_logging_config_ios12.cfg6
-rw-r--r--test/units/modules/network/ios/fixtures/ios_ntp_config.cfg7
-rw-r--r--test/units/modules/network/ios/fixtures/ios_ping_ping_10.255.255.250_repeat_24
-rw-r--r--test/units/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_repeat_24
-rw-r--r--test/units/modules/network/ios/fixtures/ios_static_routes_config.cfg2
-rw-r--r--test/units/modules/network/ios/fixtures/ios_system_config.cfg14
-rw-r--r--test/units/modules/network/ios/fixtures/ios_user_config.cfg2
-rw-r--r--test/units/modules/network/ios/fixtures/ios_vlan_config.cfg9
-rw-r--r--test/units/modules/network/ios/fixtures/ios_vrf_config.cfg81
-rw-r--r--test/units/modules/network/ios/fixtures/show_version45
-rw-r--r--test/units/modules/network/ios/ios_module.py87
-rw-r--r--test/units/modules/network/ios/test_ios_acl_interfaces.py335
-rw-r--r--test/units/modules/network/ios/test_ios_acls.py451
-rw-r--r--test/units/modules/network/ios/test_ios_banner.py76
-rw-r--r--test/units/modules/network/ios/test_ios_bgp.py207
-rw-r--r--test/units/modules/network/ios/test_ios_command.py126
-rw-r--r--test/units/modules/network/ios/test_ios_config.py250
-rw-r--r--test/units/modules/network/ios/test_ios_facts.py123
-rw-r--r--test/units/modules/network/ios/test_ios_logging.py140
-rw-r--r--test/units/modules/network/ios/test_ios_ntp.py99
-rw-r--r--test/units/modules/network/ios/test_ios_ping.py72
-rw-r--r--test/units/modules/network/ios/test_ios_static_routes.py357
-rw-r--r--test/units/modules/network/ios/test_ios_system.py123
-rw-r--r--test/units/modules/network/ios/test_ios_user.py141
-rw-r--r--test/units/modules/network/ios/test_ios_vlan.py149
-rw-r--r--test/units/modules/network/ios/test_ios_vrf.py210
-rw-r--r--test/units/plugins/cliconf/fixtures/ios/show_version54
-rw-r--r--test/units/plugins/cliconf/fixtures/nos/show_chassis30
-rw-r--r--test/units/plugins/cliconf/fixtures/nos/show_running-config549
-rw-r--r--test/units/plugins/cliconf/fixtures/nos/show_version17
-rw-r--r--test/units/plugins/cliconf/fixtures/slxos/show_chassis40
-rw-r--r--test/units/plugins/cliconf/fixtures/slxos/show_running-config624
-rw-r--r--test/units/plugins/cliconf/fixtures/slxos/show_startup-config624
-rw-r--r--test/units/plugins/cliconf/fixtures/slxos/show_version18
-rw-r--r--test/units/plugins/cliconf/test_ios.py133
374 files changed, 0 insertions, 17556 deletions
diff --git a/test/integration/targets/ios_acl_interfaces/defaults/main.yaml b/test/integration/targets/ios_acl_interfaces/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/ios_acl_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/ios_acl_interfaces/tasks/cli.yaml b/test/integration/targets/ios_acl_interfaces/tasks/cli.yaml
deleted file mode 100644
index 242420aa7f..0000000000
--- a/test/integration/targets/ios_acl_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- name: Collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- register: test_cases
- delegate_to: localhost
-
-- name: Set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- delegate_to: localhost
-
-- name: Run test case (connection=network_cli)
- include: "{{ test_case_to_run }}"
- vars:
- ansible_connection: network_cli
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_acl_interfaces/tasks/main.yaml b/test/integration/targets/ios_acl_interfaces/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_acl_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_acl_interfaces/tests/cli/_parsed.cfg b/test/integration/targets/ios_acl_interfaces/tests/cli/_parsed.cfg
deleted file mode 100644
index 1462c13530..0000000000
--- a/test/integration/targets/ios_acl_interfaces/tests/cli/_parsed.cfg
+++ /dev/null
@@ -1,8 +0,0 @@
-interface GigabitEthernet0/1
-ip access-group 110 in
-ip access-group 123 out
-ipv6 traffic-filter temp_v6 in
-ipv6 traffic-filter test_v6 out
-interface GigabitEthernet0/2
-ip access-group 110 in
-ip access-group 123 out
diff --git a/test/integration/targets/ios_acl_interfaces/tests/cli/_populate_config.yaml b/test/integration/targets/ios_acl_interfaces/tests/cli/_populate_config.yaml
deleted file mode 100644
index 68ee0265f2..0000000000
--- a/test/integration/targets/ios_acl_interfaces/tests/cli/_populate_config.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- name: Populate Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- interface GigabitEthernet 0/1
- ip access-group 110 in
- ip access-group 123 out
- ipv6 traffic-filter temp_v6 in
- ipv6 traffic-filter test_v6 out
- interface GigabitEthernet 0/2
- ip access-group 110 in
- ip access-group 123 out
diff --git a/test/integration/targets/ios_acl_interfaces/tests/cli/_remove_config.yaml b/test/integration/targets/ios_acl_interfaces/tests/cli/_remove_config.yaml
deleted file mode 100644
index 9560e2bbf7..0000000000
--- a/test/integration/targets/ios_acl_interfaces/tests/cli/_remove_config.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-- name: Remove Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- interface GigabitEthernet 0/1
- no ip access-group 110 in
- no ip access-group 100 out
- no ip access-group 123 out
- no ipv6 traffic-filter temp_v6 in
- no ipv6 traffic-filter test_v6 out
- interface GigabitEthernet 0/2
- no ip access-group 110 in
- no ip access-group 123 out
diff --git a/test/integration/targets/ios_acl_interfaces/tests/cli/deleted.yaml b/test/integration/targets/ios_acl_interfaces/tests/cli/deleted.yaml
deleted file mode 100644
index c101b6b8fa..0000000000
--- a/test/integration/targets/ios_acl_interfaces/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,65 +0,0 @@
----
-- debug:
- msg: "Start ios_acl_interfaces deleted integration tests ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _populate_config.yaml
-
-- block:
-
- - name: Delete module attributes of given Interface based on AFI
- ios_acl_interfaces:
- config:
- - name: GigabitEthernet0/1
- access_groups:
- - afi: ipv6
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.commands|length == 3"
- - "result.changed == true"
- - "'no ipv6 traffic-filter temp_v6 in' in result.commands"
- - "'no ipv6 traffic-filter test_v6 out' in result.commands"
-
- - name: Delete module attributes of given Interface based on AFI (IDEMPOTENT)
- ios_acl_interfaces:
- config:
- - name: GigabitEthernet0/1
- access_groups:
- - afi: ipv6
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: Delete module attributes of given Interface.
- ios_acl_interfaces:
- config:
- - name: GigabitEthernet0/1
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.commands|length == 3"
- - "result.changed == true"
- - "'no ip access-group 110 in' in result.commands"
- - "'no ip access-group 123 out' in result.commands"
-
- - name: Delete module attributes of given Interface (IDEMPOTENT)
- ios_acl_interfaces:
- config:
- - name: GigabitEthernet0/1
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_acl_interfaces/tests/cli/empty_config.yaml b/test/integration/targets/ios_acl_interfaces/tests/cli/empty_config.yaml
deleted file mode 100644
index 85e3bdf7aa..0000000000
--- a/test/integration/targets/ios_acl_interfaces/tests/cli/empty_config.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-- debug:
- msg: "START ios_acl_interfaces empty_config.yaml integration tests on connection={{ ansible_connection }}"
-
-- name: Merged with empty config should give appropriate error message
- ios_acl_interfaces:
- config:
- state: merged
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state merged'
-
-- name: Replaced with empty config should give appropriate error message
- ios_acl_interfaces:
- config:
- state: replaced
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state replaced'
-
-- name: Overridden with empty config should give appropriate error message
- ios_acl_interfaces:
- config:
- state: overridden
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state overridden'
-
-- name: Rendered with empty config should give appropriate error message
- ios_acl_interfaces:
- config:
- state: rendered
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state rendered'
-
-- name: Parsed with empty config should give appropriate error message
- ios_acl_interfaces:
- running_config:
- state: parsed
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of running_config parameter must not be empty for state parsed'
diff --git a/test/integration/targets/ios_acl_interfaces/tests/cli/gathered.yaml b/test/integration/targets/ios_acl_interfaces/tests/cli/gathered.yaml
deleted file mode 100644
index e11c78adf1..0000000000
--- a/test/integration/targets/ios_acl_interfaces/tests/cli/gathered.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- debug:
- msg: "START ios_acl_interfaces gathered integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Gather the provided configuration with the exisiting running configuration
- ios_acl_interfaces: &gathered
- config:
- state: gathered
- register: result
-
- - name: Assert
- assert:
- that:
- - "gathered['config'] | symmetric_difference(result.gathered) == []"
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_acl_interfaces/tests/cli/merged.yaml b/test/integration/targets/ios_acl_interfaces/tests/cli/merged.yaml
deleted file mode 100644
index 46be05105f..0000000000
--- a/test/integration/targets/ios_acl_interfaces/tests/cli/merged.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
----
-- debug:
- msg: "Start ios_acl_interfaces merged integration tests ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- block:
-
- - name: Merge the provided configuration with the exisiting running configuration
- ios_acl_interfaces: &merged
- config:
- - name: GigabitEthernet0/1
- access_groups:
- - afi: ipv4
- acls:
- - name: 110
- direction: in
- - name: 123
- direction: out
- - afi: ipv6
- acls:
- - name: temp_v6
- direction: in
- - name: test_v6
- direction: out
- - name: GigabitEthernet0/2
- access_groups:
- - afi: ipv4
- acls:
- - name: 110
- direction: in
- - name: 123
- direction: out
- state: merged
- register: result
-
- - assert:
- that:
- - "result.commands|length == 8"
- - "result.changed == true"
- - "result.commands|symmetric_difference(merged.commands) == []"
-
- - name: Merge the provided configuration with the exisiting running configuration (IDEMPOTENT)
- ios_acl_interfaces: *merged
- register: result
-
- - assert:
- that:
- - "result.commands|length == 0"
- - "result.changed == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_acl_interfaces/tests/cli/overridden.yaml b/test/integration/targets/ios_acl_interfaces/tests/cli/overridden.yaml
deleted file mode 100644
index 89b303846f..0000000000
--- a/test/integration/targets/ios_acl_interfaces/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- debug:
- msg: "Start ios_acl_interfaces overridden integration tests ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _populate_config.yaml
-
-- block:
-
- - name: Override device configuration of all acl_interfaces with provided configuration
- ios_acl_interfaces: &overridden
- config:
- - name: GigabitEthernet0/1
- access_groups:
- - afi: ipv4
- acls:
- - name: 100
- direction: out
- - name: 110
- direction: in
- state: overridden
- become: yes
- register: result
-
- - assert:
- that:
- - "result.commands|length == 8"
- - "result.changed == true"
- - "result.commands|symmetric_difference(overridden.commands) == []"
-
- - name: Override device configuration of all acl_interfaces with provided configuration (IDEMPOTENT)
- ios_acl_interfaces: *overridden
- become: yes
- register: result
-
- - assert:
- that:
- - "result.commands|length == 0"
- - "result.changed == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_acl_interfaces/tests/cli/parsed.yaml b/test/integration/targets/ios_acl_interfaces/tests/cli/parsed.yaml
deleted file mode 100644
index 96efd87898..0000000000
--- a/test/integration/targets/ios_acl_interfaces/tests/cli/parsed.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- debug:
- msg: "START ios_acl_interfaces parsed integration tests on connection={{ ansible_connection }}"
-
-- name: Parse the commands for provided configuration
- ios_acl_interfaces: &parsed
- running_config:
- "{{ lookup('file', '_parsed.cfg') }}"
- state: parsed
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "parsed['config']|symmetric_difference(result.parsed) == []"
diff --git a/test/integration/targets/ios_acl_interfaces/tests/cli/rendered.yaml b/test/integration/targets/ios_acl_interfaces/tests/cli/rendered.yaml
deleted file mode 100644
index 0d83ef0d22..0000000000
--- a/test/integration/targets/ios_acl_interfaces/tests/cli/rendered.yaml
+++ /dev/null
@@ -1,39 +0,0 @@
----
-- debug:
- msg: "Start ios_acl_interfaces rendered integration tests ansible_connection={{ ansible_connection }}"
-
-- block:
-
- - name: Render the commands for provided configuration
- ios_acl_interfaces:
- config:
- - name: GigabitEthernet0/1
- access_groups:
- - afi: ipv4
- acls:
- - name: 110
- direction: in
- - name: 123
- direction: out
- - afi: ipv6
- acls:
- - name: test_v6
- direction: out
- - name: temp_v6
- direction: in
- - name: GigabitEthernet0/2
- access_groups:
- - afi: ipv4
- acls:
- - name: 110
- direction: in
- - name: 123
- direction: out
- state: rendered
- become: yes
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.rendered|symmetric_difference(merged.commands) == []"
diff --git a/test/integration/targets/ios_acl_interfaces/tests/cli/replaced.yaml b/test/integration/targets/ios_acl_interfaces/tests/cli/replaced.yaml
deleted file mode 100644
index ef569ebac7..0000000000
--- a/test/integration/targets/ios_acl_interfaces/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- debug:
- msg: "Start ios_acl_interfaces replced integration tests ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _populate_config.yaml
-
-- block:
-
- - name: Replaces device configuration of listed acl_interfaces with provided configuration
- ios_acl_interfaces: &replaced
- config:
- - name: GigabitEthernet0/1
- access_groups:
- - afi: ipv4
- acls:
- - name: 100
- direction: out
- - name: 110
- direction: in
- state: replaced
- become: yes
- register: result
-
- - assert:
- that:
- - "result.commands|length == 5"
- - "result.changed == true"
- - "result.commands|symmetric_difference(replaced.commands) == []"
-
- - name: Replaces device configuration of listed acl_interfaces with provided configuration (IDEMPOTENT)
- ios_acl_interfaces: *replaced
- become: yes
- register: result
-
- - assert:
- that:
- - "result.commands|length == 0"
- - "result.changed == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_acl_interfaces/tests/cli/rtt.yaml b/test/integration/targets/ios_acl_interfaces/tests/cli/rtt.yaml
deleted file mode 100644
index 999901092f..0000000000
--- a/test/integration/targets/ios_acl_interfaces/tests/cli/rtt.yaml
+++ /dev/null
@@ -1,78 +0,0 @@
----
-- debug:
- msg: "START ios_acl_interfaces round trip integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- block:
-
- - name: Apply the provided configuration (Base config)
- ios_acl_interfaces:
- config:
- - name: GigabitEthernet0/1
- access_groups:
- - afi: ipv4
- acls:
- - name: 110
- direction: in
- - name: 123
- direction: out
- - afi: ipv6
- acls:
- - name: temp_v6
- direction: in
- - name: test_v6
- direction: out
- - name: GigabitEthernet0/2
- access_groups:
- - afi: ipv4
- acls:
- - name: 110
- direction: in
- - name: 123
- direction: out
- state: merged
- register: base_config
-
- - name: Gather acl interfaces facts
- ios_facts:
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources:
- - acl_interfaces
-
- - name: Apply the provided configuration (config to be reverted)
- ios_acl_interfaces:
- config:
- - name: GigabitEthernet0/1
- access_groups:
- - afi: ipv4
- acls:
- - name: 100
- direction: out
- - name: 110
- direction: in
- state: overridden
- register: result
-
- - assert:
- that:
- - "result.commands|length == 8"
- - "result.changed == true"
- - "result.commands|symmetric_difference(overridden.commands) == []"
-
- - name: Revert back to base config using facts round trip
- ios_acl_interfaces:
- config: "{{ ansible_facts['network_resources']['acl_interfaces'] }}"
- state: overridden
- register: revert
-
- - assert:
- that:
- - "revert.commands|length == 8"
- - "revert.changed == true"
- - "revert.commands|symmetric_difference(rtt.commands) == []"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_acl_interfaces/vars/main.yaml b/test/integration/targets/ios_acl_interfaces/vars/main.yaml
deleted file mode 100644
index 424499b53a..0000000000
--- a/test/integration/targets/ios_acl_interfaces/vars/main.yaml
+++ /dev/null
@@ -1,99 +0,0 @@
----
-interfaces:
- int1:
- GigabitEthernet0/1
- int2:
- GigabitEthernet0/2
-
-
-merged:
- commands:
- - interface GigabitEthernet0/1
- - ip access-group 110 in
- - ip access-group 123 out
- - ipv6 traffic-filter temp_v6 in
- - ipv6 traffic-filter test_v6 out
- - interface GigabitEthernet0/2
- - ip access-group 110 in
- - ip access-group 123 out
-
-replaced:
- commands:
- - interface GigabitEthernet0/1
- - no ip access-group 123 out
- - no ipv6 traffic-filter temp_v6 in
- - no ipv6 traffic-filter test_v6 out
- - ip access-group 100 out
-
-overridden:
- commands:
- - interface GigabitEthernet0/1
- - no ip access-group 123 out
- - no ipv6 traffic-filter test_v6 out
- - no ipv6 traffic-filter temp_v6 in
- - ip access-group 100 out
- - interface GigabitEthernet0/2
- - no ip access-group 110 in
- - no ip access-group 123 out
-
-gathered:
- config:
- - name: GigabitEthernet0/0
- - access_groups:
- - acls:
- - direction: 'in'
- name: '110'
- - direction: 'out'
- name: '123'
- afi: 'ipv4'
- - acls:
- - direction: 'in'
- name: 'temp_v6'
- - direction: 'out'
- name: 'test_v6'
- afi: 'ipv6'
- name: GigabitEthernet0/1
- - access_groups:
- - acls:
- - direction: 'in'
- name: '110'
- - direction: 'out'
- name: '123'
- afi: ipv4
- name: GigabitEthernet0/2
-
-parsed:
- config:
- - access_groups:
- - acls:
- - direction: in
- name: '110'
- - direction: out
- name: '123'
- afi: ipv4
- - acls:
- - direction: in
- name: temp_v6
- - direction: out
- name: test_v6
- afi: ipv6
- name: GigabitEthernet0/1
- - access_groups:
- - acls:
- - direction: in
- name: '110'
- - direction: out
- name: '123'
- afi: ipv4
- name: GigabitEthernet0/2
-
-rtt:
- commands:
- - interface GigabitEthernet0/1
- - no ip access-group 100 out
- - ip access-group 123 out
- - ipv6 traffic-filter temp_v6 in
- - ipv6 traffic-filter test_v6 out
- - interface GigabitEthernet0/2
- - ip access-group 110 in
- - ip access-group 123 out
diff --git a/test/integration/targets/ios_acls/defaults/main.yaml b/test/integration/targets/ios_acls/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/ios_acls/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/ios_acls/meta/main.yaml b/test/integration/targets/ios_acls/meta/main.yaml
deleted file mode 100644
index 32cf5dda7e..0000000000
--- a/test/integration/targets/ios_acls/meta/main.yaml
+++ /dev/null
@@ -1 +0,0 @@
-dependencies: []
diff --git a/test/integration/targets/ios_acls/tasks/cli.yaml b/test/integration/targets/ios_acls/tasks/cli.yaml
deleted file mode 100644
index 242420aa7f..0000000000
--- a/test/integration/targets/ios_acls/tasks/cli.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- name: Collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- register: test_cases
- delegate_to: localhost
-
-- name: Set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- delegate_to: localhost
-
-- name: Run test case (connection=network_cli)
- include: "{{ test_case_to_run }}"
- vars:
- ansible_connection: network_cli
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_acls/tasks/main.yaml b/test/integration/targets/ios_acls/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_acls/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_acls/tests/cli/_parsed.cfg b/test/integration/targets/ios_acls/tests/cli/_parsed.cfg
deleted file mode 100644
index c873eac4cd..0000000000
--- a/test/integration/targets/ios_acls/tests/cli/_parsed.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-ip access-list extended test_acl
-deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
-ip access-list extended 123
-deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
-deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
-ipv6 access-list R1_TRAFFIC
-deny tcp any eq www any eq telnet ack dscp af11 \ No newline at end of file
diff --git a/test/integration/targets/ios_acls/tests/cli/_populate_config.yaml b/test/integration/targets/ios_acls/tests/cli/_populate_config.yaml
deleted file mode 100644
index 02f69c026d..0000000000
--- a/test/integration/targets/ios_acls/tests/cli/_populate_config.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-- name: Populate Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- ip access-list extended test_acl
- deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
- ip access-list extended 110
- deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10
- ip access-list extended 123
- deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
- deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
- ipv6 access-list R1_TRAFFIC
- deny tcp any eq www any eq telnet ack dscp af11
diff --git a/test/integration/targets/ios_acls/tests/cli/_remove_config.yaml b/test/integration/targets/ios_acls/tests/cli/_remove_config.yaml
deleted file mode 100644
index 29e24cd55e..0000000000
--- a/test/integration/targets/ios_acls/tests/cli/_remove_config.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-- name: Remove Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- no ip access-list standard std_acl
- no ip access-list extended test_acl
- no ip access-list extended 110
- no ip access-list extended 123
- no ip access-list extended 150
- no ipv6 access-list R1_TRAFFIC
diff --git a/test/integration/targets/ios_acls/tests/cli/deleted.yaml b/test/integration/targets/ios_acls/tests/cli/deleted.yaml
deleted file mode 100644
index bbf51119b6..0000000000
--- a/test/integration/targets/ios_acls/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,70 +0,0 @@
----
-- debug:
- msg: "Start Deleted integration state for ios_acls ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Delete attributes of provided configured ACLs
- ios_acls: &deleted
- config:
- - afi: ipv4
- acls:
- - name: test_acl
- acl_type: extended
- - name: 110
- aces:
- - sequence: 10
- - name: 123
- - afi: ipv6
- acls:
- - name: R1_TRAFFIC
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.commands|length == 5"
- - "result.changed == true"
- - "result.commands|symmetric_difference(deleted.commands) == []"
-
- - name: Delete attributes of all configured interfaces (IDEMPOTENT)
- ios_acls: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.commands|length == 0"
- - "result.changed == false"
-
- - include_tasks: _remove_config.yaml
- - include_tasks: _populate_config.yaml
-
- - name: Delete ACL attributes of provided configured interfaces based on AFI
- ios_acls: &deleted_afi
- config:
- - afi: ipv4
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.commands|length == 3"
- - "result.changed == true"
- - "result.commands|symmetric_difference(deleted_afi.commands) == []"
-
- - name: Delete ACL attributes of provided configured interfaces based on AFI (IDEMPOTENT)
- ios_acls: *deleted_afi
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.commands|length == 0"
- - "result.changed == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_acls/tests/cli/empty_config.yaml b/test/integration/targets/ios_acls/tests/cli/empty_config.yaml
deleted file mode 100644
index 8a911eff28..0000000000
--- a/test/integration/targets/ios_acls/tests/cli/empty_config.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-- debug:
- msg: "START ios_acls empty_config.yaml integration tests on connection={{ ansible_connection }}"
-
-- name: Merged with empty config should give appropriate error message
- ios_acls:
- config:
- state: merged
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state merged'
-
-- name: Replaced with empty config should give appropriate error message
- ios_acls:
- config:
- state: replaced
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state replaced'
-
-- name: Overridden with empty config should give appropriate error message
- ios_acls:
- config:
- state: overridden
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state overridden'
-
-- name: Rendered with empty config should give appropriate error message
- ios_acls:
- config:
- state: rendered
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state rendered'
-
-- name: Parsed with empty config should give appropriate error message
- ios_acls:
- running_config:
- state: parsed
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of running_config parameter must not be empty for state parsed'
diff --git a/test/integration/targets/ios_acls/tests/cli/gathered.yaml b/test/integration/targets/ios_acls/tests/cli/gathered.yaml
deleted file mode 100644
index 9b95aec1f3..0000000000
--- a/test/integration/targets/ios_acls/tests/cli/gathered.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- debug:
- msg: "START ios_acls gathered integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Gather the provided configuration with the exisiting running configuration
- ios_acls: &gathered
- config:
- state: gathered
- register: result
-
- - assert:
- that:
- - "gathered['config'] | symmetric_difference(result.gathered) == []"
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/test/integration/targets/ios_acls/tests/cli/merged.yaml b/test/integration/targets/ios_acls/tests/cli/merged.yaml
deleted file mode 100644
index 4bdc9ed0e0..0000000000
--- a/test/integration/targets/ios_acls/tests/cli/merged.yaml
+++ /dev/null
@@ -1,123 +0,0 @@
----
-- debug:
- msg: "START Merged ios_acls state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- block:
- - name: Merge provided configuration with device configuration
- ios_acls: &merged
- config:
- - afi: ipv4
- acls:
- - name: std_acl
- acl_type: standard
- aces:
- - grant: deny
- source:
- address: 192.0.2.0
- wildcard_bits: 0.0.0.255
- - name: test_acl
- acl_type: extended
- aces:
- - grant: deny
- protocol_options:
- tcp:
- fin: true
- source:
- address: 192.0.2.0
- wildcard_bits: 0.0.0.255
- destination:
- address: 192.0.3.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: www
- option:
- traceroute: true
- ttl:
- eq: 10
- - name: 110
- aces:
- - grant: deny
- sequence: 10
- protocol_options:
- icmp:
- echo: true
- source:
- address: 192.0.2.0
- wildcard_bits: 0.0.0.255
- destination:
- address: 192.0.3.0
- wildcard_bits: 0.0.0.255
- dscp: ef
- ttl:
- eq: 10
- - name: 123
- aces:
- - grant: deny
- protocol_options:
- tcp:
- ack: true
- source:
- address: 198.51.100.0
- wildcard_bits: 0.0.0.255
- destination:
- address: 198.51.101.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: telnet
- tos:
- service_value: 12
- - grant: deny
- protocol_options:
- tcp:
- ack: true
- source:
- address: 192.0.3.0
- wildcard_bits: 0.0.0.255
- destination:
- address: 192.0.4.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: www
- dscp: ef
- ttl:
- lt: 20
- - afi: ipv6
- acls:
- - name: R1_TRAFFIC
- aces:
- - grant: deny
- protocol_options:
- tcp:
- ack: true
- source:
- any: true
- port_protocol:
- eq: www
- destination:
- any: true
- port_protocol:
- eq: telnet
- dscp: af11
- state: merged
- register: result
-
- - assert:
- that:
- - "result.commands|length == 11"
- - "result.changed == true"
- - "result.commands|symmetric_difference(merged.commands) == []"
-
- - name: Merge provided configuration with device configuration (IDEMPOTENT)
- ios_acls: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.commands|length == 0"
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_acls/tests/cli/overridden.yaml b/test/integration/targets/ios_acls/tests/cli/overridden.yaml
deleted file mode 100644
index ea8a581cfc..0000000000
--- a/test/integration/targets/ios_acls/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,73 +0,0 @@
----
-- debug:
- msg: "START Overridden ios_acls state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Override device configuration of all interfaces with provided configuration
- ios_acls: &overridden
- config:
- - afi: ipv4
- acls:
- - name: 110
- aces:
- - grant: deny
- protocol_options:
- tcp:
- ack: true
- source:
- address: 198.51.100.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: telnet
- destination:
- address: 198.51.110.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: www
- dscp: ef
- ttl:
- eq: 10
- - name: 150
- aces:
- - grant: deny
- protocol_options:
- tcp:
- syn: true
- source:
- address: 198.51.100.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: telnet
- destination:
- address: 198.51.110.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: telnet
- dscp: ef
- ttl:
- eq: 10
- state: overridden
- register: result
-
- - assert:
- that:
- - "result.commands|length == 8"
- - "result.changed == true"
- - "result.commands|symmetric_difference(overridden.commands) == []"
-
- - name: Override device configuration of all interfaces with provided configuration (IDEMPOTENT)
- ios_acls: *overridden
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result.commands|length == 0"
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_acls/tests/cli/parsed.yaml b/test/integration/targets/ios_acls/tests/cli/parsed.yaml
deleted file mode 100644
index 4219bc4a9e..0000000000
--- a/test/integration/targets/ios_acls/tests/cli/parsed.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- debug:
- msg: "START ios_acls parsed integration tests on connection={{ ansible_connection }}"
-
-- name: Parse the commands for provided configuration
- ios_acls: &parsed
- running_config:
- "{{ lookup('file', '_parsed.cfg') }}"
- state: parsed
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "parsed['config']|symmetric_difference(result.parsed) == []" \ No newline at end of file
diff --git a/test/integration/targets/ios_acls/tests/cli/rendered.yaml b/test/integration/targets/ios_acls/tests/cli/rendered.yaml
deleted file mode 100644
index c5888e7fae..0000000000
--- a/test/integration/targets/ios_acls/tests/cli/rendered.yaml
+++ /dev/null
@@ -1,54 +0,0 @@
----
-- debug:
- msg: "Start ios_acls rendered integration tests ansible_connection={{ ansible_connection }}"
-
-- block:
- - name: Rendered the provided configuration with the exisiting running configuration
- ios_acls:
- config:
- - afi: ipv4
- acls:
- - name: 110
- aces:
- - grant: deny
- sequence: 10
- protocol_options:
- tcp:
- syn: true
- source:
- address: 192.0.2.0
- wildcard_bits: 0.0.0.255
- destination:
- address: 192.0.3.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: www
- dscp: ef
- ttl:
- eq: 10
- - name: 150
- aces:
- - grant: deny
- protocol_options:
- tcp:
- syn: true
- source:
- address: 198.51.100.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: telnet
- destination:
- address: 198.51.110.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: telnet
- dscp: ef
- ttl:
- eq: 10
- state: rendered
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.rendered|symmetric_difference(rendered.commands) == []" \ No newline at end of file
diff --git a/test/integration/targets/ios_acls/tests/cli/replaced.yaml b/test/integration/targets/ios_acls/tests/cli/replaced.yaml
deleted file mode 100644
index 1562adae8d..0000000000
--- a/test/integration/targets/ios_acls/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,72 +0,0 @@
----
-- debug:
- msg: "START Replaced ios_acls state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Replaces device configuration of listed interfaces with provided configuration
- ios_acls: &replaced
- config:
- - afi: ipv4
- acls:
- - name: 110
- aces:
- - grant: deny
- protocol_options:
- tcp:
- syn: true
- source:
- address: 192.0.2.0
- wildcard_bits: 0.0.0.255
- destination:
- address: 192.0.3.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: www
- dscp: ef
- ttl:
- eq: 10
- - name: 150
- aces:
- - grant: deny
- sequence: 20
- protocol_options:
- tcp:
- syn: true
- source:
- address: 198.51.100.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: telnet
- destination:
- address: 198.51.110.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: telnet
- dscp: ef
- ttl:
- eq: 10
- state: replaced
- register: result
-
- - assert:
- that:
- - "result.commands|length == 5"
- - "result.changed == true"
- - "result.commands|symmetric_difference(replaced.commands) == []"
-
- - name: Replaces device configuration of listed interfaces with provided configuration (IDEMPOTENT)
- ios_acls: *replaced
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result.commands|length == 0"
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_acls/tests/cli/rtt.yaml b/test/integration/targets/ios_acls/tests/cli/rtt.yaml
deleted file mode 100644
index f2f3857317..0000000000
--- a/test/integration/targets/ios_acls/tests/cli/rtt.yaml
+++ /dev/null
@@ -1,173 +0,0 @@
----
-- debug:
- msg: "START ios_acls round trip integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Apply the provided configuration (base config)
- ios_acls:
- config:
- - afi: ipv4
- acls:
- - name: test_acl
- acl_type: extended
- aces:
- - grant: deny
- protocol_options:
- tcp:
- fin: true
- source:
- address: 192.0.2.0
- wildcard_bits: 0.0.0.255
- destination:
- address: 192.0.3.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: www
- option:
- traceroute: true
- ttl:
- eq: 10
- - name: 110
- aces:
- - grant: deny
- protocol_options:
- icmp:
- echo: true
- source:
- address: 192.0.2.0
- wildcard_bits: 0.0.0.255
- destination:
- address: 192.0.3.0
- wildcard_bits: 0.0.0.255
- dscp: ef
- ttl:
- eq: 10
- - name: 123
- aces:
- - grant: deny
- protocol_options:
- tcp:
- ack: true
- source:
- address: 198.51.100.0
- wildcard_bits: 0.0.0.255
- destination:
- address: 198.51.101.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: telnet
- tos:
- service_value: 12
- - grant: deny
- protocol_options:
- tcp:
- ack: true
- source:
- address: 192.0.3.0
- wildcard_bits: 0.0.0.255
- destination:
- address: 192.0.4.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: www
- dscp: ef
- ttl:
- lt: 20
- - afi: ipv6
- acls:
- - name: R1_TRAFFIC
- aces:
- - grant: deny
- protocol_options:
- tcp:
- ack: true
- source:
- any: true
- port_protocol:
- eq: www
- destination:
- any: true
- port_protocol:
- eq: telnet
- dscp: af11
- state: merged
- register: base_config
-
- - name: Gather ACLs facts
- ios_facts:
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources:
- - acls
-
- - name: Apply the configuration which need to be reverted
- ios_acls:
- config:
- - afi: ipv4
- acls:
- - name: 110
- aces:
- - grant: deny
- protocol_options:
- tcp:
- ack: true
- source:
- address: 198.51.100.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: telnet
- destination:
- address: 198.51.110.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: www
- dscp: ef
- ttl:
- eq: 10
- - name: 150
- aces:
- - grant: deny
- protocol_options:
- tcp:
- syn: true
- source:
- address: 198.51.100.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: telnet
- destination:
- address: 198.51.110.0
- wildcard_bits: 0.0.0.255
- port_protocol:
- eq: telnet
- dscp: ef
- ttl:
- eq: 10
- state: overridden
- register: result
-
- - assert:
- that:
- - "result.commands|length == 8"
- - "result.changed == true"
- - "result.commands|symmetric_difference(overridden.commands) == []"
-
- - name: Revert back to base config using facts round trip
- ios_acls:
- config: "{{ ansible_facts['network_resources']['acls'] }}"
- state: overridden
- register: revert
-
- - assert:
- that:
- - "revert.commands|length == 11"
- - "revert.changed == true"
- - "revert.commands|symmetric_difference(rtt.commands) == []"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_acls/vars/main.yaml b/test/integration/targets/ios_acls/vars/main.yaml
deleted file mode 100644
index 18ff8ef538..0000000000
--- a/test/integration/targets/ios_acls/vars/main.yaml
+++ /dev/null
@@ -1,242 +0,0 @@
----
-deleted:
- commands:
- - "no ip access-list extended test_acl"
- - "ip access-list extended 110"
- - "no 10"
- - "no ip access-list extended 123"
- - "no ipv6 access-list R1_TRAFFIC"
-
-deleted_afi:
- commands:
- - "no ip access-list extended 110"
- - "no ip access-list extended 123"
- - "no ip access-list extended test_acl"
-
-merged:
- commands:
- - "ip access-list standard std_acl"
- - "deny 192.0.2.0 0.0.0.255"
- - "ip access-list extended test_acl"
- - "deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10"
- - "ip access-list extended 110"
- - "10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10"
- - "ip access-list extended 123"
- - "deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12"
- - "deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20"
- - "ipv6 access-list R1_TRAFFIC"
- - "deny tcp any eq www any eq telnet ack dscp af11"
-
-replaced:
- commands:
- - "ip access-list extended 110"
- - "no 10"
- - "deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www syn dscp ef ttl eq 10"
- - "ip access-list extended 150"
- - "20 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10"
-
-overridden:
- commands:
- - "no ip access-list extended 123"
- - "no ip access-list extended test_acl"
- - "no ipv6 access-list R1_TRAFFIC"
- - "ip access-list extended 110"
- - "no 10"
- - "deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq www ack dscp ef ttl eq 10"
- - "ip access-list extended 150"
- - "deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10"
-
-gathered:
- config:
- - acls:
- - aces:
- - destination:
- address: 192.0.3.0
- wildcard_bits: 0.0.0.255
- dscp: ef
- grant: deny
- protocol: icmp
- protocol_options:
- icmp:
- echo: true
- sequence: 10
- source:
- address: 192.0.2.0
- wildcard_bits: 0.0.0.255
- ttl:
- eq: 10
- acl_type: extended
- name: '110'
- - aces:
- - destination:
- address: 198.51.101.0
- port_protocol:
- eq: telnet
- wildcard_bits: 0.0.0.255
- grant: deny
- protocol: tcp
- protocol_options:
- tcp:
- ack: true
- sequence: 10
- source:
- address: 198.51.100.0
- wildcard_bits: 0.0.0.255
- tos:
- service_value: 12
- - destination:
- address: 192.0.4.0
- port_protocol:
- eq: www
- wildcard_bits: 0.0.0.255
- dscp: ef
- grant: deny
- protocol: tcp
- protocol_options:
- tcp:
- ack: true
- sequence: 20
- source:
- address: 192.0.3.0
- wildcard_bits: 0.0.0.255
- ttl:
- lt: 20
- acl_type: extended
- name: '123'
- - aces:
- - destination:
- address: 192.0.3.0
- port_protocol:
- eq: www
- wildcard_bits: 0.0.0.255
- grant: deny
- option:
- traceroute: true
- protocol: tcp
- protocol_options:
- tcp:
- fin: true
- sequence: 10
- source:
- address: 192.0.2.0
- wildcard_bits: 0.0.0.255
- ttl:
- eq: 10
- acl_type: extended
- name: test_acl
- afi: ipv4
- - acls:
- - aces:
- - destination:
- any: true
- port_protocol:
- eq: telnet
- dscp: af11
- grant: deny
- protocol: tcp
- protocol_options:
- tcp:
- ack: true
- sequence: 10
- source:
- any: true
- port_protocol:
- eq: www
- name: R1_TRAFFIC
- afi: ipv6
-
-parsed:
- config:
- - acls:
- - aces:
- - destination:
- address: 192.0.3.0
- port_protocol:
- eq: www
- wildcard_bits: 0.0.0.255
- grant: deny
- option:
- traceroute: true
- protocol: tcp
- protocol_options:
- tcp:
- fin: true
- source:
- address: 192.0.2.0
- wildcard_bits: 0.0.0.255
- ttl:
- eq: 10
- name: test_acl
- - aces:
- - destination:
- address: 198.51.101.0
- port_protocol:
- eq: telnet
- wildcard_bits: 0.0.0.255
- grant: deny
- protocol: tcp
- protocol_options:
- tcp:
- ack: true
- source:
- address: 198.51.100.0
- wildcard_bits: 0.0.0.255
- tos:
- service_value: 12
- - destination:
- address: 192.0.4.0
- port_protocol:
- eq: www
- wildcard_bits: 0.0.0.255
- dscp: ef
- grant: deny
- protocol: tcp
- protocol_options:
- tcp:
- ack: true
- source:
- address: 192.0.3.0
- wildcard_bits: 0.0.0.255
- ttl:
- lt: 20
- name: '123'
- afi: ipv4
- - acls:
- - aces:
- - destination:
- any: true
- port_protocol:
- eq: telnet
- dscp: af11
- grant: deny
- protocol: tcp
- protocol_options:
- tcp:
- ack: true
- source:
- any: true
- port_protocol:
- eq: www
- name: R1_TRAFFIC
- afi: ipv6
-
-rendered:
- commands:
- - ip access-list extended 110
- - 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www syn dscp ef ttl eq 10
- - ip access-list extended 150
- - deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10
-
-rtt:
- commands:
- - no ip access-list extended 150
- - ip access-list extended 110
- - no 10
- - 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10
- - ip access-list extended 123
- - 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
- - 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
- - ip access-list extended test_acl
- - 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
- - ipv6 access-list R1_TRAFFIC
- - sequence 10 deny tcp any eq www any eq telnet ack dscp af11
diff --git a/test/integration/targets/ios_banner/defaults/main.yaml b/test/integration/targets/ios_banner/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/ios_banner/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/ios_banner/meta/main.yml b/test/integration/targets/ios_banner/meta/main.yml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_banner/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_banner/tasks/cli.yaml b/test/integration/targets/ios_banner/tasks/cli.yaml
deleted file mode 100644
index 6b93fd5400..0000000000
--- a/test/integration/targets/ios_banner/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_banner/tasks/main.yaml b/test/integration/targets/ios_banner/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_banner/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_banner/tests/cli/basic-login.yaml b/test/integration/targets/ios_banner/tests/cli/basic-login.yaml
deleted file mode 100644
index 5102087d4e..0000000000
--- a/test/integration/targets/ios_banner/tests/cli/basic-login.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
----
-
-- name: setup - remove login
- ios_banner:
- banner: login
- state: absent
- provider: "{{ cli }}"
-
-
-- name: Set login
- ios_banner:
- banner: login
- text: |
- this is my login banner
- that has a multiline
- string
- state: present
- provider: "{{ cli }}"
-
- register: result
-
-- debug:
- msg: "{{ result }}"
-
-- assert:
- that:
- - "result.changed == true"
- - "'banner login @\nthis is my login banner\nthat has a multiline\nstring\n@' in result.commands"
-
-- name: Set login again (idempotent)
- ios_banner:
- banner: login
- text: |
- this is my login banner
- that has a multiline
- string
- state: present
- provider: "{{ cli }}"
-
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.commands | length == 0"
-
-
-# FIXME add in tests for everything defined in docs
-# FIXME Test state:absent + test:
-# FIXME Without powers ensure "privileged mode required"
diff --git a/test/integration/targets/ios_banner/tests/cli/basic-motd.yaml b/test/integration/targets/ios_banner/tests/cli/basic-motd.yaml
deleted file mode 100644
index 792758a157..0000000000
--- a/test/integration/targets/ios_banner/tests/cli/basic-motd.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
----
-
-- name: setup - remove motd
- ios_banner:
- banner: motd
- state: absent
- provider: "{{ cli }}"
-
-
-- name: Set motd
- ios_banner:
- banner: motd
- text: |
- this is my motd banner
- that has a multiline
- string
- state: present
- provider: "{{ cli }}"
-
- register: result
-
-- debug:
- msg: "{{ result }}"
-
-- assert:
- that:
- - "result.changed == true"
- - "'banner motd @\nthis is my motd banner\nthat has a multiline\nstring\n@' in result.commands"
-
-- name: Set motd again (idempotent)
- ios_banner:
- banner: motd
- text: |
- this is my motd banner
- that has a multiline
- string
- state: present
- provider: "{{ cli }}"
-
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.commands | length == 0"
-
-
-# FIXME add in tests for everything defined in docs
-# FIXME Test state:absent + test:
-# FIXME Without powers ensure "privileged mode required"
diff --git a/test/integration/targets/ios_banner/tests/cli/basic-no-login.yaml b/test/integration/targets/ios_banner/tests/cli/basic-no-login.yaml
deleted file mode 100644
index 1fbe53a4a1..0000000000
--- a/test/integration/targets/ios_banner/tests/cli/basic-no-login.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- name: Setup
- ios_banner:
- banner: login
- text: |
- Junk login banner
- over multiple lines
- state: present
- provider: "{{ cli }}"
-
-- name: remove login
- ios_banner:
- banner: login
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- debug:
- msg: "{{ result }}"
-
-- assert:
- that:
- - "result.changed == true"
- - "'no banner login' in result.commands" # does this break due to "contains?"
-
-- name: remove login (idempotent)
- ios_banner:
- banner: login
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.commands | length == 0"
-
-
-# FIXME add in tests for everything defined in docs
-# FIXME Test state:absent + test:
-# FIXME Without powers ensure "privileged mode required"
diff --git a/test/integration/targets/ios_banner/tests/cli/multiple-login-exec.yaml b/test/integration/targets/ios_banner/tests/cli/multiple-login-exec.yaml
deleted file mode 100644
index d70f219574..0000000000
--- a/test/integration/targets/ios_banner/tests/cli/multiple-login-exec.yaml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-
-- name: Setup - set login and exec
- ios_banner:
- banner: "{{ item }}"
- text: |
- this is my login banner
- that as a multiline
- string
- state: present
- provider: "{{ cli }}"
- loop:
- - login
- - exec
-
-
-- name: Set login
- ios_banner:
- banner: "login"
- text: |
- this is my login banner
- that as a multiline
- string
- state: present
- provider: "{{ cli }}"
-
- register: result
-
-- debug:
- msg: "{{ result }}"
-
-- assert:
- that:
- - "result.changed == false"
- - "result.commands | length == 0"
-
-- name: Set exec
- ios_banner:
- banner: "exec"
- text: |
- this is my login banner
- that as a multiline
- string
- state: present
- provider: "{{ cli }}"
-
- register: result
-
-- debug:
- msg: "{{ result }}"
-
-- assert:
- that:
- - "result.changed == false"
- - "result.commands | length == 0"
diff --git a/test/integration/targets/ios_banner/tests/cli/net_banner.yml b/test/integration/targets/ios_banner/tests/cli/net_banner.yml
deleted file mode 100644
index 49e98f631d..0000000000
--- a/test/integration/targets/ios_banner/tests/cli/net_banner.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-- debug: msg="START ios cli/net_banner.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: setup - remove login
- net_banner:
- banner: login
- state: absent
- authorize: yes
-
-- name: Set login
- net_banner:
- banner: login
- text: this is my login banner confgiured by net_banner
- state: present
- authorize: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'banner login @\nthis is my login banner confgiured by net_banner\n@' in result.commands"
-
-- name: teardown - remove login
- net_banner:
- banner: login
- state: absent
- authorize: yes
-
-- debug: msg="END ios cli/net_banner.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_bgp/defaults/main.yaml b/test/integration/targets/ios_bgp/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/ios_bgp/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/ios_bgp/meta/main.yaml b/test/integration/targets/ios_bgp/meta/main.yaml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_bgp/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_bgp/tasks/cli.yaml b/test/integration/targets/ios_bgp/tasks/cli.yaml
deleted file mode 100644
index 575f5d0a8e..0000000000
--- a/test/integration/targets/ios_bgp/tasks/cli.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_bgp/tasks/main.yaml b/test/integration/targets/ios_bgp/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_bgp/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_bgp/tests/cli/basic.yaml b/test/integration/targets/ios_bgp/tests/cli/basic.yaml
deleted file mode 100644
index 9d6713530a..0000000000
--- a/test/integration/targets/ios_bgp/tests/cli/basic.yaml
+++ /dev/null
@@ -1,504 +0,0 @@
-- debug: msg="START ios cli/ios_bgp.yaml on connection={{ ansible_connection }}"
-
-- name: Clear existing BGP config
- ios_bgp:
- operation: delete
- ignore_errors: yes
-
-- block:
-
- - name: Add fake config with 'bgp' string
- ios_config:
- match: none
- replace: block
- lines:
- - "no ip access-list extended BGP_ACL"
- - "ip access-list extended BGP_ACL"
- - "permit tcp any any eq bgp"
-
- - name: Try delete fake bgp config
- register: result
- ios_bgp:
- operation: delete
-
- - assert:
- that:
- - 'result.changed == false'
-
- - name: Clean fake config with 'bgp' string
- ios_config:
- match: none
- replace: block
- lines:
- - "no ip access-list extended BGP_ACL"
-
- - name: Add fake bgp-like config
- ios_config:
- match: none
- replace: block
- lines:
- - "no ip access-list extended BGP_ACL_2"
- - "ip access-list extended BGP_ACL_2"
- - "remark router bgp 64496"
- - "remark neighbor 192.0.2.10 remote-as 64496"
- - "remark neighbor 192.0.2.10 shutdown"
- - "remark address-family ipv4"
- - "remark neighbor 192.0.2.10 activate"
- - "remark exit-address-family"
- - "permit tcp any any eq bgp"
-
- - name: Try delete fake bgp-like config
- register: result
- ios_bgp:
- operation: delete
-
- - assert:
- that:
- - 'result.changed == false'
-
- - name: Clean fake bgp-like config
- ios_config:
- match: none
- replace: block
- lines:
- - "no ip access-list extended BGP_ACL_2"
-
- - name: Configure BGP with AS 64496 and a router-id
- ios_bgp: &config
- operation: merge
- config:
- bgp_as: 64496
- router_id: 192.0.2.2
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - "'router bgp 64496' in result.commands"
- - "'bgp router-id 192.0.2.2' in result.commands"
-
- - name: Configure BGP with AS 64496 and a router-id (idempotent)
- ios_bgp: *config
- register: result
-
- - assert:
- that:
- - 'result.changed == false'
-
- - name: Configure BGP neighbors
- ios_bgp: &nbr
- operation: merge
- config:
- bgp_as: 64496
- neighbors:
- - neighbor: 192.0.2.10
- remote_as: 64496
- password: ansible
- description: IBGP_NBR_1
- ebgp_multihop: 100
- timers:
- keepalive: 300
- holdtime: 360
- min_neighbor_holdtime: 360
-
- - neighbor: 192.0.2.15
- remote_as: 64496
- description: IBGP_NBR_2
- ebgp_multihop: 150
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - "'router bgp 64496' in result.commands"
- - "'neighbor 192.0.2.10 remote-as 64496' in result.commands"
- - "'neighbor 192.0.2.10 description IBGP_NBR_1' in result.commands"
- - "'neighbor 192.0.2.10 ebgp-multihop 100' in result.commands"
- - "'neighbor 192.0.2.10 timers 300 360 360' in result.commands"
- - "'neighbor 192.0.2.15 remote-as 64496' in result.commands"
- - "'neighbor 192.0.2.15 description IBGP_NBR_2' in result.commands"
- - "'neighbor 192.0.2.15 ebgp-multihop 150' in result.commands"
-
- - name: Configure BGP neighbors (idempotent)
- ios_bgp: *nbr
- register: result
-
- - assert:
- that:
- - 'result.changed == false'
-
- - name: Configure BGP neighbors with operation replace
- ios_bgp: &nbr_rplc
- operation: replace
- config:
- bgp_as: 64496
- neighbors:
- - neighbor: 192.0.2.15
- remote_as: 64496
- description: IBGP_NBR_2
- ebgp_multihop: 150
-
- - neighbor: 203.0.113.10
- remote_as: 64511
- description: EBGP_NBR_1
- local_as: 64497
-
- - neighbor: 10.10.20.20
- remote_as: 65012
- description: BGP_NBR_2
- ebgp_multihop: 100
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - "'neighbor 203.0.113.10 remote-as 64511' in result.commands"
- - "'neighbor 203.0.113.10 description EBGP_NBR_1' in result.commands"
- - "'neighbor 203.0.113.10 local-as 64497' in result.commands"
- - "'neighbor 10.10.20.20 remote-as 65012' in result.commands"
- - "'neighbor 10.10.20.20 description BGP_NBR_2' in result.commands"
- - "'no neighbor 192.0.2.10' in result.commands"
-
- - name: Configure BGP neighbors with operation replace (idempotent)
- ios_bgp: *nbr_rplc
- register: result
-
- - assert:
- that:
- - 'result.changed == false'
-
- - name: Configure root-level networks for BGP
- ios_bgp: &net
- operation: merge
- config:
- bgp_as: 64496
- networks:
- - prefix: 203.0.113.0
- masklen: 27
- route_map: RMAP_1
-
- - prefix: 203.0.113.32
- masklen: 27
- route_map: RMAP_2
- register: result
-
- - assert:
- that:
- - 'result.changed == True'
- - "'router bgp 64496' in result.commands"
- - "'network 203.0.113.0 mask 255.255.255.224 route-map RMAP_1' in result.commands"
- - "'network 203.0.113.32 mask 255.255.255.224 route-map RMAP_2' in result.commands"
-
- - name: Configure root-level networks for BGP (idempotent)
- ios_bgp: *net
- register: result
-
- - assert:
- that:
- - 'result.changed == false'
-
- - name: Configure root-level networks for BGP with operation replace
- ios_bgp: &net_rplc
- operation: replace
- config:
- bgp_as: 64496
- networks:
- - prefix: 203.0.113.0
- masklen: 27
- route_map: RMAP_1
-
- - prefix: 198.51.100.16
- masklen: 28
- register: result
-
- - assert:
- that:
- - 'result.changed == True'
- - "'router bgp 64496' in result.commands"
- - "'network 198.51.100.16 mask 255.255.255.240' in result.commands"
- - "'no network 203.0.113.32 mask 255.255.255.224 route-map RMAP_2' in result.commands"
-
- - name: Configure root-level networks for BGP with operation replace (idempotent)
- ios_bgp: *net_rplc
- register: result
-
- - assert:
- that:
- - 'result.changed == false'
-
- - name: Configure BGP neighbors under address family mode
- ios_bgp: &af_nbr
- operation: merge
- config:
- bgp_as: 64496
- address_family:
- - afi: ipv4
- safi: unicast
- neighbors:
- - neighbor: 203.0.113.10
- activate: yes
- maximum_prefix: 250
- advertisement_interval: 120
-
- - neighbor: 192.0.2.15
- activate: yes
- route_reflector_client: True
-
- - neighbor: 10.10.20.20
- activate: yes
- prefix_list_in: incoming-prefixes
- prefix_list_out: outgoing-prefixes
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - "'router bgp 64496' in result.commands"
- - "'address-family ipv4' in result.commands"
- - "'neighbor 203.0.113.10 activate' in result.commands"
- - "'neighbor 203.0.113.10 maximum-prefix 250' in result.commands"
- - "'neighbor 203.0.113.10 advertisement-interval 120' in result.commands"
- - "'neighbor 192.0.2.15 activate' in result.commands"
- - "'neighbor 192.0.2.15 route-reflector-client' in result.commands"
- - "'neighbor 10.10.20.20 activate' in result.commands"
- - "'neighbor 10.10.20.20 prefix-list incoming-prefixes in' in result.commands"
- - "'neighbor 10.10.20.20 prefix-list outgoing-prefixes out' in result.commands"
-
- - name: Configure BGP neighbors under address family mode (idempotent)
- ios_bgp: *af_nbr
- register: result
-
- - assert:
- that:
- - 'result.changed == false'
-
- - name: Configure networks under address family
- ios_bgp: &af_net
- operation: merge
- config:
- bgp_as: 64496
- address_family:
- - afi: ipv4
- safi: multicast
- networks:
- - prefix: 198.51.100.48
- masklen: 28
- route_map: RMAP_1
-
- - prefix: 192.0.2.64
- masklen: 27
-
- - prefix: 203.0.113.160
- masklen: 27
- route_map: RMAP_2
-
- - afi: ipv4
- safi: unicast
- networks:
- - prefix: 198.51.100.64
- masklen: 28
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - "'router bgp 64496' in result.commands"
- - "'address-family ipv4 multicast' in result.commands"
- - "'network 198.51.100.48 mask 255.255.255.240 route-map RMAP_1' in result.commands"
- - "'network 192.0.2.64 mask 255.255.255.224' in result.commands"
- - "'network 203.0.113.160 mask 255.255.255.224 route-map RMAP_2' in result.commands"
- - "'exit-address-family' in result.commands"
- - "'address-family ipv4' in result.commands"
- - "'network 198.51.100.64 mask 255.255.255.240' in result.commands"
- - "'exit-address-family' in result.commands"
-
- - name: Configure networks under address family (idempotent)
- ios_bgp: *af_net
- register: result
-
- - assert:
- that:
- - 'result.changed == false'
-
- - name: Configure networks under address family with operation replace
- ios_bgp: &af_net_rplc
- operation: replace
- config:
- bgp_as: 64496
- address_family:
- - afi: ipv4
- safi: multicast
- networks:
- - prefix: 198.51.100.80
- masklen: 28
-
- - prefix: 192.0.2.64
- masklen: 27
-
- - prefix: 203.0.113.192
- masklen: 27
-
- - afi: ipv4
- safi: unicast
- networks:
- - prefix: 198.51.100.64
- masklen: 28
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - '"router bgp 64496" in result.commands'
- - '"address-family ipv4 multicast" in result.commands'
- - '"network 198.51.100.80 mask 255.255.255.240" in result.commands'
- - '"network 203.0.113.192 mask 255.255.255.224" in result.commands'
- - '"no network 198.51.100.48 mask 255.255.255.240 route-map RMAP_1" in result.commands'
- - '"no network 203.0.113.160 mask 255.255.255.224 route-map RMAP_2" in result.commands'
- - '"exit-address-family" in result.commands'
-
- - name: Configure networks under address family with operation replace (idempotent)
- ios_bgp: *af_net_rplc
- register: result
-
- - assert:
- that:
- - 'result.changed == false'
-
- - name: Configure redistribute information under address family mode
- ios_bgp: &af_rdr
- operation: merge
- config:
- bgp_as: 64496
- address_family:
- - afi: ipv4
- safi: multicast
- redistribute:
- - protocol: ospf
- id: 112
- metric: 64
-
- - protocol: eigrp
- id: 233
- metric: 256
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - "'router bgp 64496' in result.commands"
- - "'address-family ipv4 multicast' in result.commands"
- - "'redistribute ospf 112 metric 64' in result.commands"
- - "'redistribute eigrp 233 metric 256' in result.commands"
- - "'exit-address-family' in result.commands"
-
- - name: Configure redistribute information under address family mode (idempotent)
- ios_bgp: *af_rdr
- register: result
-
- - assert:
- that:
- - 'result.changed == false'
-
- - name: Get the IOS version
- ios_facts:
- gather_subset: all
-
- - name: Configure redistribute information under address family mode with operation replace
- ios_bgp: &af_rdr_rplc
- operation: replace
- config:
- bgp_as: 64496
- address_family:
- - afi: ipv4
- safi: multicast
- redistribute:
- - protocol: ospf
- id: 112
- metric: 64
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - "'router bgp 64496' in result.commands"
- - "'address-family ipv4 multicast' in result.commands"
- - "'no redistribute eigrp 233' in result.commands"
- - "'exit-address-family' in result.commands"
-
- - name: Configure redistribute information under address family mode with operation replace (idempotent)
- ios_bgp: *af_rdr_rplc
- register: result
- when: ansible_net_version != "15.6(2)T"
-
- - assert:
- that:
- - 'result.changed == false'
- when: ansible_net_version != "15.6(2)T"
-
- - name: Override all the exisiting BGP config
- ios_bgp:
- operation: override
- config:
- bgp_as: 64497
- router_id: 192.0.2.10
- log_neighbor_changes: True
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - "'no router bgp 64496' in result.commands"
- - "'router bgp 64497' in result.commands"
- - "'bgp router-id 192.0.2.10' in result.commands"
- - "'bgp log-neighbor-changes' in result.commands"
-
- - name: "Configure BGP neighbors with classful boundary"
- ios_bgp: &classful
- config:
- bgp_as: 64497
- log_neighbor_changes: true
- networks:
- - prefix: 198.51.100.0
- masklen: 23
-
- - prefix: 201.0.113.32
- masklen: 24
-
- operation: merge
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - "'router bgp 64497' in result.commands"
- - "'network 198.51.100.0 mask 255.255.254.0' in result.commands"
- - "'network 201.0.113.32' in result.commands"
-
- - name: Configure BGP neighbors with classful boundary (idempotent)
- ios_bgp: *classful
- register: result
-
- - assert:
- that:
- - 'result.changed == false'
-
- always:
- - name: Teardown
- ios_bgp: &rm
- operation: delete
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - "'no router bgp 64497' in result.commands"
-
- - name: Teardown again (idempotent)
- ios_bgp: *rm
- register: result
-
- - assert:
- that:
- - 'result.changed == false'
-
-- debug: msg="END ios cli/ios_bgp.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_command/defaults/main.yaml b/test/integration/targets/ios_command/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/ios_command/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/ios_command/meta/main.yml b/test/integration/targets/ios_command/meta/main.yml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_command/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_command/tasks/cli.yaml b/test/integration/targets/ios_command/tasks/cli.yaml
deleted file mode 100644
index 6b93fd5400..0000000000
--- a/test/integration/targets/ios_command/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_command/tasks/main.yaml b/test/integration/targets/ios_command/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_command/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_command/tests/cli/bad_operator.yaml b/test/integration/targets/ios_command/tests/cli/bad_operator.yaml
deleted file mode 100644
index 99ad05420b..0000000000
--- a/test/integration/targets/ios_command/tests/cli/bad_operator.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- debug: msg="START cli/bad_operator.yaml on connection={{ ansible_connection }}"
-
-- name: test bad operator
- ios_command:
- commands:
- - show version
- - show interfaces GigabitEthernet 0/0
- provider: "{{ cli }}"
- wait_for:
- - "result[0] contains 'Description: Foo'"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
-
-- debug: msg="END cli/bad_operator.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_command/tests/cli/cli_command.yaml b/test/integration/targets/ios_command/tests/cli/cli_command.yaml
deleted file mode 100644
index a2a252d3ab..0000000000
--- a/test/integration/targets/ios_command/tests/cli/cli_command.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-- debug:
- msg: "START cli/cli_command.yaml on connection={{ ansible_connection }}"
-
-- block:
- - name: get output for single command
- cli_command:
- command: show version
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
-
- - name: send invalid command
- cli_command:
- command: 'show foo'
- register: result
- ignore_errors: yes
-
- - assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
- when: "ansible_connection == 'network_cli'"
-
-- debug: msg="END cli/cli_command.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_command/tests/cli/contains.yaml b/test/integration/targets/ios_command/tests/cli/contains.yaml
deleted file mode 100644
index 3e41f90399..0000000000
--- a/test/integration/targets/ios_command/tests/cli/contains.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- debug: msg="START cli/contains.yaml on connection={{ ansible_connection }}"
-
-- name: test contains operator
- ios_command:
- commands:
- - show version
- - show interface loopback 888
- provider: "{{ cli }}"
- wait_for:
- - "result[0] contains Cisco"
- - "result[1] contains Loopback888"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
-
-- debug: msg="END cli/contains.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_command/tests/cli/error_regex.yaml b/test/integration/targets/ios_command/tests/cli/error_regex.yaml
deleted file mode 100644
index c8c8a47c04..0000000000
--- a/test/integration/targets/ios_command/tests/cli/error_regex.yaml
+++ /dev/null
@@ -1,59 +0,0 @@
----
-- debug: msg="START cli/error_regex.yaml on connection={{ ansible_connection }}"
-
-- block:
- - name: clear logs 1
- cli_command: &clear_logs
- command: clear logging
- prompt:
- - Clear logging buffer
- answer:
- - "\r"
- ignore_errors: True
-
- - name: send log with error regex match 1
- cli_command: &send_logs
- command: "send log 'IPSEC-3-REPLAY_ERROR: test log_1'"
- ignore_errors: True
-
- - name: fetch logs without command specific error regex
- ios_command:
- commands:
- - show logging
- register: result
- ignore_errors: True
-
- - name: ensure task fails due to mismatched regex
- assert:
- that:
- - "result.failed == true"
-
- - name: pause to avoid rate limiting
- pause:
- seconds: 10
-
- - name: clear logs 2
- cli_command: *clear_logs
- ignore_errors: True
-
- - name: send log with error regex match 2
- cli_command: *send_logs
- ignore_errors: True
-
- - name: fetch logs with command specific error regex
- ios_command:
- commands:
- - show logging
- register: result
- vars:
- ansible_terminal_stderr_re:
- - pattern: 'connection timed out'
- flags: 're.I'
-
- - name: ensure task with modified error regex is success
- assert:
- that:
- - "result.failed == false"
- when: ansible_connection == 'network_cli'
-
-- debug: msg="END cli/error_regex.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_command/tests/cli/invalid.yaml b/test/integration/targets/ios_command/tests/cli/invalid.yaml
deleted file mode 100644
index 35829ff605..0000000000
--- a/test/integration/targets/ios_command/tests/cli/invalid.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-- debug: msg="START cli/invalid.yaml on connection={{ ansible_connection }}"
-
-- name: run invalid command
- ios_command:
- commands: show foo
- provider: "{{ cli }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed"
-
-- name: run commands that include invalid command
- ios_command:
- commands:
- - show version
- - show foo
- provider: "{{ cli }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed"
-
-- debug: msg="END cli/invalid.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_command/tests/cli/output.yaml b/test/integration/targets/ios_command/tests/cli/output.yaml
deleted file mode 100644
index 945b388b17..0000000000
--- a/test/integration/targets/ios_command/tests/cli/output.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-- debug: msg="START cli/output.yaml on connection={{ ansible_connection }}"
-
-- name: get output for single command
- ios_command:
- commands:
- - show version
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
-
-- name: get output for multiple commands
- ios_command:
- commands:
- - show version
- - show interfaces
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout | length == 2"
-
-- debug: msg="END cli/output.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_command/tests/cli/timeout.yaml b/test/integration/targets/ios_command/tests/cli/timeout.yaml
deleted file mode 100644
index 4f430edeb2..0000000000
--- a/test/integration/targets/ios_command/tests/cli/timeout.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-- debug: msg="START cli/timeout.yaml on connection={{ ansible_connection }}"
-
-- name: test bad condition
- ios_command:
- commands:
- - show version
- provider: "{{ cli }}"
- wait_for:
- - "result[0] contains bad_value_string"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
-
-- debug: msg="END cli/timeout.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/defaults/main.yaml b/test/integration/targets/ios_config/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/ios_config/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/ios_config/meta/main.yml b/test/integration/targets/ios_config/meta/main.yml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_config/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_config/tasks/cli.yaml b/test/integration/targets/ios_config/tasks/cli.yaml
deleted file mode 100644
index 82d196e4ed..0000000000
--- a/test/integration/targets/ios_config/tasks/cli.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }} ansible_connection=network_cli"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_config/tasks/cli_config.yaml b/test/integration/targets/ios_config/tasks/cli_config.yaml
deleted file mode 100644
index a3c82d6384..0000000000
--- a/test/integration/targets/ios_config/tasks/cli_config.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all cli_config test cases
- find:
- paths: "{{ role_path }}/tests/cli_config"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }} ansible_connection=network_cli"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_config/tasks/main.yaml b/test/integration/targets/ios_config/tasks/main.yaml
deleted file mode 100644
index 5e327e8d52..0000000000
--- a/test/integration/targets/ios_config/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: cli_config.yaml, tags: ['cli_config'] }
diff --git a/test/integration/targets/ios_config/templates/basic/base_running_config b/test/integration/targets/ios_config/templates/basic/base_running_config
deleted file mode 100644
index 37254dc963..0000000000
--- a/test/integration/targets/ios_config/templates/basic/base_running_config
+++ /dev/null
@@ -1,9 +0,0 @@
-version 15.6
-service timestamps debug datetime msec
-service timestamps log datetime msec
-no service password-encryption
-!
-hostname an-ios-01.ansible.com
-!
-boot-start-marker
-boot-end-marker
diff --git a/test/integration/targets/ios_config/templates/basic/config.j2 b/test/integration/targets/ios_config/templates/basic/config.j2
deleted file mode 100644
index 06f9848883..0000000000
--- a/test/integration/targets/ios_config/templates/basic/config.j2
+++ /dev/null
@@ -1,4 +0,0 @@
-interface Loopback999
- description this is a test
- shutdown
-
diff --git a/test/integration/targets/ios_config/templates/basic/configblock.j2 b/test/integration/targets/ios_config/templates/basic/configblock.j2
deleted file mode 100644
index 46150c4d90..0000000000
--- a/test/integration/targets/ios_config/templates/basic/configblock.j2
+++ /dev/null
@@ -1,5 +0,0 @@
-ip access-list extended test
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
- permit ip host 192.0.2.4 any log
diff --git a/test/integration/targets/ios_config/templates/basic/configexact1.j2 b/test/integration/targets/ios_config/templates/basic/configexact1.j2
deleted file mode 100644
index 82ad080c5d..0000000000
--- a/test/integration/targets/ios_config/templates/basic/configexact1.j2
+++ /dev/null
@@ -1,6 +0,0 @@
-no ip access-list extended test
-ip access-list extended test
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
- permit ip host 192.0.2.4 any log
diff --git a/test/integration/targets/ios_config/templates/basic/configexact2.j2 b/test/integration/targets/ios_config/templates/basic/configexact2.j2
deleted file mode 100644
index 46150c4d90..0000000000
--- a/test/integration/targets/ios_config/templates/basic/configexact2.j2
+++ /dev/null
@@ -1,5 +0,0 @@
-ip access-list extended test
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
- permit ip host 192.0.2.4 any log
diff --git a/test/integration/targets/ios_config/templates/basic/configstrict1.j2 b/test/integration/targets/ios_config/templates/basic/configstrict1.j2
deleted file mode 100644
index 46150c4d90..0000000000
--- a/test/integration/targets/ios_config/templates/basic/configstrict1.j2
+++ /dev/null
@@ -1,5 +0,0 @@
-ip access-list extended test
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
- permit ip host 192.0.2.4 any log
diff --git a/test/integration/targets/ios_config/templates/basic/intended_running_config b/test/integration/targets/ios_config/templates/basic/intended_running_config
deleted file mode 100644
index bdad8d3d8b..0000000000
--- a/test/integration/targets/ios_config/templates/basic/intended_running_config
+++ /dev/null
@@ -1,9 +0,0 @@
-version 15.6
-service timestamps debug datetime msec
-service timestamps log datetime msec
-no service password-encryption
-!
-hostname an-ios-02.ansible.com
-!
-boot-start-marker
-boot-end-marker
diff --git a/test/integration/targets/ios_config/templates/basic/macro.j2 b/test/integration/targets/ios_config/templates/basic/macro.j2
deleted file mode 100644
index 44a7a9bdbd..0000000000
--- a/test/integration/targets/ios_config/templates/basic/macro.j2
+++ /dev/null
@@ -1,8 +0,0 @@
- A12345678 123456789 123456789 123456789 123456789 123456789 123456789
- B12345678 123456789 123456789 123456789 123456789 123456789 123456789
- C12345678 123456789 123456789 123456789 123456789 123456789 123456789
- D12345678 123456789 123456789 123456789 123456789 123456789 123456789
- E12345678 123456789 123456789 123456789 123456789 123456789 123456789
- F12345678 123456789 123456789 123456789 123456789 123456789 123456789
- G12345678 123456789 123456789 123456789 123456789 123456789 123456789
- H12345678 123456789 123456789 123456789 123456789 123456789 123456789
diff --git a/test/integration/targets/ios_config/templates/basic/setupblock.j2 b/test/integration/targets/ios_config/templates/basic/setupblock.j2
deleted file mode 100644
index f57aa49b73..0000000000
--- a/test/integration/targets/ios_config/templates/basic/setupblock.j2
+++ /dev/null
@@ -1,5 +0,0 @@
-no ip access-list extended test
-ip access-list extended test
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
diff --git a/test/integration/targets/ios_config/templates/basic/setupexact.j2 b/test/integration/targets/ios_config/templates/basic/setupexact.j2
deleted file mode 100644
index e8791e272e..0000000000
--- a/test/integration/targets/ios_config/templates/basic/setupexact.j2
+++ /dev/null
@@ -1,7 +0,0 @@
-no ip access-list extended test
-ip access-list extended test
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
- permit ip host 192.0.2.4 any log
- permit ip host 192.0.2.5 any log
diff --git a/test/integration/targets/ios_config/templates/basic/setupstrict.j2 b/test/integration/targets/ios_config/templates/basic/setupstrict.j2
deleted file mode 100644
index e8791e272e..0000000000
--- a/test/integration/targets/ios_config/templates/basic/setupstrict.j2
+++ /dev/null
@@ -1,7 +0,0 @@
-no ip access-list extended test
-ip access-list extended test
- permit ip host 192.0.2.1 any log
- permit ip host 192.0.2.2 any log
- permit ip host 192.0.2.3 any log
- permit ip host 192.0.2.4 any log
- permit ip host 192.0.2.5 any log
diff --git a/test/integration/targets/ios_config/templates/defaults/config.j2 b/test/integration/targets/ios_config/templates/defaults/config.j2
deleted file mode 100644
index 1d4d9da8d4..0000000000
--- a/test/integration/targets/ios_config/templates/defaults/config.j2
+++ /dev/null
@@ -1,4 +0,0 @@
-interface Loopback999
- description this is a test
- no shutdown
-
diff --git a/test/integration/targets/ios_config/tests/cli/backup.yaml b/test/integration/targets/ios_config/tests/cli/backup.yaml
deleted file mode 100644
index 0921d0086b..0000000000
--- a/test/integration/targets/ios_config/tests/cli/backup.yaml
+++ /dev/null
@@ -1,125 +0,0 @@
----
-- debug: msg="START cli/cli_backup.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- commands:
- - no description
- - no shutdown
- parents:
- - interface Loopback999
- match: none
-
-- name: collect any backup files
- find:
- paths: "{{ role_path }}/backup"
- pattern: "{{ inventory_hostname_short }}_config*"
- register: backup_files
- connection: local
-
-- name: delete backup files
- file:
- path: "{{ item.path }}"
- state: absent
- with_items: "{{backup_files.files|default([])}}"
-
-- name: configure device with config
- ios_config:
- src: basic/config.j2
- backup: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-# FIXME Bug https://github.com/ansible/ansible/issues/19382
-# - "result.updates is not defined"
-
-- name: collect any backup files
- find:
- paths: "{{ role_path }}/backup"
- pattern: "{{ inventory_hostname_short }}_config*"
- register: backup_files
- connection: local
-
-- assert:
- that:
- - "backup_files.files is defined"
-
-- name: delete configurable backup file path
- file:
- path: "{{ item }}"
- state: absent
- with_items:
- - "{{ role_path }}/backup_test_dir/"
- - "{{ role_path }}/backup/backup.cfg"
-
-- name: take configuration backup in custom filename and directory path
- ios_config:
- backup: yes
- backup_options:
- filename: backup.cfg
- dir_path: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check if the backup file-1 exist
- find:
- paths: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}/backup.cfg"
- register: backup_file
- connection: local
-
-- assert:
- that:
- - "backup_file.files is defined"
-
-- name: take configuration backup in custom filename
- ios_config:
- backup: yes
- backup_options:
- filename: backup.cfg
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check if the backup file-2 exist
- find:
- paths: "{{ role_path }}/backup/backup.cfg"
- register: backup_file
- connection: local
-
-- assert:
- that:
- - "backup_file.files is defined"
-
-- name: take configuration backup in custom path and default filename
- ios_config:
- backup: yes
- backup_options:
- dir_path: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check if the backup file-3 exist
- find:
- paths: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
- pattern: "{{ inventory_hostname_short }}_config*"
- register: backup_file
- connection: local
-
-- assert:
- that:
- - "backup_file.files is defined"
-
-- debug: msg="END cli/cli_backup.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/defaults.yaml b/test/integration/targets/ios_config/tests/cli/defaults.yaml
deleted file mode 100644
index 3792a9eb6a..0000000000
--- a/test/integration/targets/ios_config/tests/cli/defaults.yaml
+++ /dev/null
@@ -1,57 +0,0 @@
----
-- debug: msg="START cli/defaults.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- commands:
- - no description
- - shutdown
- parents:
- - interface Loopback999
- match: none
-
-- name: configure device with defaults included
- ios_config:
- src: defaults/config.j2
- defaults: yes
- register: result
-
-- debug: var=result
-
-- assert:
- that:
- - "result.changed == true"
-# FIXME Bug https://github.com/ansible/ansible/issues/19382
-# - "result.updates is not defined"
-
-- name: check device with defaults included
- ios_config:
- src: defaults/config.j2
- defaults: yes
- register: result
-
-- debug: var=result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.updates is not defined"
-
-- name: Check device is in proper prompt after error
- ios_config:
- lines:
- - mac-address-table notification mac-move
- ignore_errors: yes
-
-- name: show interfaces brief to ensure deivce goes to valid prompt
- ios_command:
- commands:
- - show interfaces
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
-
-- debug: msg="END cli/defaults.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/diff.yaml b/test/integration/targets/ios_config/tests/cli/diff.yaml
deleted file mode 100644
index dbdd033a89..0000000000
--- a/test/integration/targets/ios_config/tests/cli/diff.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- debug: msg="START cli/diff.yaml on connection={{ ansible_connection }}"
-
-- name: Ensure hostname is preset
- ios_system:
- hostname: "{{ shorter_hostname }}"
-
-- name: ios_config diff against retrieved config
- ios_config:
- diff_against: intended
- intended_config: "{{ lookup('file', '{{ role_path }}/templates/basic/intended_running_config') }}"
- diff: true
- register: result
-
-- assert:
- that:
- - "'hostname an-ios-02.ansible.com' in result['diff']['after']"
- - "'hostname {{ shorter_hostname }}' in result['diff']['before']"
-
-- name: ios_config diff against provided running_config
- ios_config:
- diff_against: intended
- intended_config: "{{ lookup('file', '{{ role_path }}/templates/basic/intended_running_config') }}"
- running_config: "{{ lookup('file', '{{ role_path }}/templates/basic/base_running_config') }}"
- diff: true
- register: result
-
-- assert:
- that:
- - "'hostname an-ios-02.ansible.com' in result['diff']['after']"
- - "'hostname an-ios-01.ansible.com' in result['diff']['before']"
-
-- debug: msg="END cli/diff.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/macro.yaml b/test/integration/targets/ios_config/tests/cli/macro.yaml
deleted file mode 100644
index b526f47dc5..0000000000
--- a/test/integration/targets/ios_config/tests/cli/macro.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-
-- debug: msg="START cli/cli_macro.yaml on connection={{ ansible_connection }}"
-
-- name: "Check for macro support"
- ios_command:
- commands:
- - "show parser macro brief"
- register: supports_macro
- ignore_errors: yes
-
-- name: "ios_config macro integration tests"
- when: supports_macro is succeeded
- block:
-
- - name: "Define macro name"
- set_fact:
- macro_name: 'MACRO_ANSIBLE_TEST'
-
- - name: "setup - remove configuration"
- ios_config:
- lines:
- - 'no macro name {{ macro_name }}'
- - 'do show clock'
- match: none
-
- - name: "configure macro"
- ios_config:
- parents: "macro name {{ macro_name }}"
- # before: [ 'no macro name ...']
- multiline_delimiter: '@'
- after: '@'
- match: line
- replace: block
- lines: "{{ lookup('template', 'basic/macro.j2') }}"
- register: result
-
- - name: "Check if macro has been added"
- assert:
- that:
- - "result.changed == true"
-
- - name: "configure macro again - idempotent check"
- ios_config:
- parents: "macro name {{ macro_name }}"
- multiline_delimiter: '@'
- after: '@'
- match: line
- replace: block
- lines: "{{ lookup('template', 'basic/macro.j2') }}"
- register: result
-
- - name: "macro already/correctly configured ?"
- assert:
- that:
- - "result.changed == false"
-
- always:
- - name: "teardown"
- ios_config:
- lines:
- - "no macro name {{ macro_name }}"
- - 'do show clock'
- match: none
-
-- debug: msg="END cli/cli_macro.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/save.yaml b/test/integration/targets/ios_config/tests/cli/save.yaml
deleted file mode 100644
index bd83961575..0000000000
--- a/test/integration/targets/ios_config/tests/cli/save.yaml
+++ /dev/null
@@ -1,49 +0,0 @@
----
-- debug: msg="START cli/save.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- commands:
- - no description
- - no shutdown
- parents:
- - interface Loopback999
- match: none
- save_when: modified
-
-- name: save should always run
- ios_config:
- save_when: always
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: delete config (setup)
- ios_config:
- replace: line
- lines:
- - "no ip http server"
- save_when: modified
- register: result
-
-- name: save should run when changed
- ios_config:
- replace: line
- lines:
- - "ip http server"
- save_when: modified
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: teardown
- ios_config:
- lines:
- - "no ip http server"
- register: result
-
-- debug: msg="END cli/save.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/src_basic.yaml b/test/integration/targets/ios_config/tests/cli/src_basic.yaml
deleted file mode 100644
index c9381aca86..0000000000
--- a/test/integration/targets/ios_config/tests/cli/src_basic.yaml
+++ /dev/null
@@ -1,70 +0,0 @@
----
-- debug: msg="START cli/src_basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- commands:
- - no description
- - no shutdown
- parents:
- - interface Loopback999
- match: none
-
-- name: configure device with config
- ios_config:
- src: basic/config.j2
- register: result
-
-- name: debug, remove me
- debug:
- msg: "{{ result }}"
-- assert:
- that:
- - "result.changed == true"
-# https://github.com/ansible/ansible-modules-core/issues/4807
-# FIXME Bug https://github.com/ansible/ansible/issues/19382
-# - "result.updates is not defined"
-
-- name: check device with config
- ios_config:
- src: basic/config.j2
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-# https://github.com/ansible/ansible-modules-core/issues/4807
-# FIXME Bug https://github.com/ansible/ansible/issues/19382
-# - "result.updates is not defined"
-
-- name: check for empty diff
- ios_config:
- running_config: |
- service timestamps debug datetime msec
- service timestamps log datetime msec
- lines:
- - service timestamps debug datetime msec
- - service timestamps log datetime msec
- check_mode: True
- register: result
-- assert:
- that:
- - "result.updates is undefined"
-
-- name: check for diff with ignore lines for running config
- ios_config:
- running_config: |
- service timestamps debug datetime msec
- service timestamps log datetime msec
- lines:
- - service timestamps debug datetime msec
- - service timestamps log datetime msec
- diff_ignore_lines: service timestamps log datetime msec
- check_mode: True
- register: result
-
-- assert:
- that:
- - "'service timestamps log datetime msec' in result.updates"
-
-- debug: msg="END cli/src_basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/src_invalid.yaml b/test/integration/targets/ios_config/tests/cli/src_invalid.yaml
deleted file mode 100644
index 0744324037..0000000000
--- a/test/integration/targets/ios_config/tests/cli/src_invalid.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-- debug: msg="START cli/src_invalid.yaml on connection={{ ansible_connection }}"
-
-
-# Defend https://github.com/ansible/ansible-modules-core/issues/4797
-- name: configure with invalid src
- ios_config:
- src: basic/foobar.j2
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.changed == false"
- - "result.failed == true"
- - "result.msg == 'path specified in src not found'"
-
-- debug: msg="END cli/src_invalid.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/src_match_none.yaml b/test/integration/targets/ios_config/tests/cli/src_match_none.yaml
deleted file mode 100644
index 4300a37d28..0000000000
--- a/test/integration/targets/ios_config/tests/cli/src_match_none.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START cli/src_match_none.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- commands:
- - no description
- - no shutdown
- parents:
- - interface Loopback999
- match: none
-
-- name: configure device with config
- ios_config:
- src: basic/config.j2
- match: none
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-# https://github.com/ansible/ansible-modules-core/issues/4807
-# FIXME Bug https://github.com/ansible/ansible/issues/19382
-# - "result.updates is not defined"
-
-- name: check device with config
- ios_config:
- src: basic/config.j2
- register: result
-
-- assert:
- that:
- # Idempotent test
-# https://github.com/ansible/ansible-modules-core/issues/4807
- - "result.changed == false"
- - "result.updates is not defined"
-
-- debug: msg="END cli/src_match_none.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/sublevel.yaml b/test/integration/targets/ios_config/tests/cli/sublevel.yaml
deleted file mode 100644
index 7442cd9c2b..0000000000
--- a/test/integration/targets/ios_config/tests/cli/sublevel.yaml
+++ /dev/null
@@ -1,39 +0,0 @@
----
-- debug: msg="START cli/sublevel.yaml on connection={{ ansible_connection }}"
-
-- name: setup test
- ios_config:
- lines:
- - 'no ip access-list extended test'
- - 'no ip access-list standard test'
- match: none
-
-- name: configure sub level command
- ios_config:
- lines: ['permit ip any any log']
- parents: ['ip access-list extended test']
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list extended test' in result.updates"
- - "'permit ip any any log' in result.updates"
-
-- name: configure sub level command idempotent check
- ios_config:
- lines: ['permit ip any any log']
- parents: ['ip access-list extended test']
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines:
- - 'no ip access-list extended test'
- match: none
-
-- debug: msg="END cli/sublevel.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/sublevel_block.yaml b/test/integration/targets/ios_config/tests/cli/sublevel_block.yaml
deleted file mode 100644
index 05d14ee77d..0000000000
--- a/test/integration/targets/ios_config/tests/cli/sublevel_block.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-- debug: msg="START cli/sublevel_block.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- parents: ['ip access-list extended test']
- before: ['no ip access-list extended test']
- after: ['exit']
- match: none
-
-- name: configure sub level command using block resplace
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- parents: ['ip access-list extended test']
- replace: block
- after: ['exit']
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list extended test' in result.updates"
- - "'permit ip host 192.0.2.1 any log' in result.updates"
- - "'permit ip host 192.0.2.2 any log' in result.updates"
- - "'permit ip host 192.0.2.3 any log' in result.updates"
- - "'permit ip host 192.0.2.4 any log' in result.updates"
-
-- name: check sub level command using block replace
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- parents: ['ip access-list extended test']
- replace: block
- after: ['exit']
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines:
- - no ip access-list extended test
- match: none
-
-- debug: msg="END cli/sublevel_block.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml b/test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml
deleted file mode 100644
index 0feb3f99e5..0000000000
--- a/test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
----
-- debug: msg="START cli/sublevel_exact.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- - permit ip host 192.0.2.5 any log
- parents: ip access-list extended test
- before: no ip access-list extended test
- after: exit
- match: none
-
-- name: configure sub level command using exact match
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- parents: ip access-list extended test
- before: no ip access-list extended test
- after: exit
- match: exact
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list extended test' in result.updates"
- - "'permit ip host 192.0.2.1 any log' in result.updates"
- - "'permit ip host 192.0.2.2 any log' in result.updates"
- - "'permit ip host 192.0.2.3 any log' in result.updates"
- - "'permit ip host 192.0.2.4 any log' in result.updates"
- - "'permit ip host 192.0.2.5 any log' not in result.updates"
-
-- name: check sub level command using exact match
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- parents: ip access-list extended test
- match: exact
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines:
- - no ip access-list extended test
- match: none
-
-- debug: msg="END cli/sublevel_exact.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml b/test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml
deleted file mode 100644
index ea4cb11b3e..0000000000
--- a/test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml
+++ /dev/null
@@ -1,57 +0,0 @@
----
-- debug: msg="START cli/sublevel_strict.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- - permit ip host 192.0.2.5 any log
- parents: ip access-list extended test
- before: no ip access-list extended test
- match: none
-
-- name: configure sub level command using strict match
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- parents: ip access-list extended test
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: check sub level command using strict match
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.2 any log
- parents: ip access-list extended test
- after: exit
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list extended test' in result.updates"
- - "'permit ip host 192.0.2.1 any log' not in result.updates"
- - "'permit ip host 192.0.2.2 any log' in result.updates"
- - "'permit ip host 192.0.2.3 any log' in result.updates"
- - "'permit ip host 192.0.2.4 any log' not in result.updates"
- - "'permit ip host 192.0.2.5 any log' not in result.updates"
-
-- name: teardown
- ios_config:
- lines: no ip access-list extended test
- match: none
-
-- debug: msg="END cli/sublevel_strict.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/sublevel_strict_mul_parents.yaml b/test/integration/targets/ios_config/tests/cli/sublevel_strict_mul_parents.yaml
deleted file mode 100644
index f99f77e341..0000000000
--- a/test/integration/targets/ios_config/tests/cli/sublevel_strict_mul_parents.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-- debug: msg="START cli/sublevel_strict_mul_parents.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - class-map c1
- - match precedence 7
- - policy-map p1
- - class c1
- before: ['no policy-map p1', 'no class-map c1']
- match: none
-
-- name: configure sub level command using strict match
- ios_config:
- lines:
- - set ip precedence 5
- - police cir percent 10
- parents: ['policy-map p1', 'class c1']
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'set ip precedence 5' in result.updates"
- - "'police cir percent 10' in result.updates"
-
-- name: change sub level command order and config with strict match
- ios_config:
- lines:
- - police cir percent 10
- - set ip precedence 5
- parents: ['policy-map p1', 'class c1']
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'set ip precedence 5' in result.updates"
- - "'police cir percent 10' in result.updates"
-
-- name: Config sub level command with strict match (Idempotency)
- ios_config:
- lines:
-#IOS does not change orded of class action if reconfigured
-#so we have to use old order for Idempoteny
- - set ip precedence 5
- - police cir percent 10
- parents: ['policy-map p1', 'class c1']
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines:
- - no policy-map p1
- - no class-map c1
- match: none
-
-- debug: msg="END cli/sublevel_strict_mul_parents.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/toplevel.yaml b/test/integration/targets/ios_config/tests/cli/toplevel.yaml
deleted file mode 100644
index 0408c8202a..0000000000
--- a/test/integration/targets/ios_config/tests/cli/toplevel.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- debug: msg="START cli/toplevel.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines: ['hostname {{ shorter_hostname }}']
- match: none
-
-- name: configure top level command
- ios_config:
- lines: ['hostname foo']
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'hostname foo' in result.updates"
-
-- name: configure top level command idempotent check
- ios_config:
- lines: ['hostname foo']
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines: ['hostname {{ shorter_hostname }}']
- match: none
-
-- debug: msg="END cli/toplevel.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/toplevel_after.yaml b/test/integration/targets/ios_config/tests/cli/toplevel_after.yaml
deleted file mode 100644
index 26039e06a3..0000000000
--- a/test/integration/targets/ios_config/tests/cli/toplevel_after.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- debug: msg="START cli/toplevel_after.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - "snmp-server contact ansible"
- - "hostname {{ shorter_hostname }}"
- match: none
-
-- name: configure top level command with before
- ios_config:
- lines: ['hostname foo']
- after: ['snmp-server contact bar']
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'hostname foo' in result.updates"
- - "'snmp-server contact bar' in result.updates"
-
-- name: configure top level command with before idempotent check
- ios_config:
- lines: ['hostname foo']
- after: ['snmp-server contact foo']
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines:
- - "no snmp-server contact"
- - "hostname {{ shorter_hostname }}"
- match: none
-
-- debug: msg="END cli/toplevel_after.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/toplevel_before.yaml b/test/integration/targets/ios_config/tests/cli/toplevel_before.yaml
deleted file mode 100644
index ab210be8c8..0000000000
--- a/test/integration/targets/ios_config/tests/cli/toplevel_before.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- debug: msg="START cli/toplevel_before.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - "snmp-server contact ansible"
- - "hostname {{ shorter_hostname }}"
- match: none
-
-- name: configure top level command with before
- ios_config:
- lines: ['hostname foo']
- before: ['snmp-server contact bar']
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'hostname foo' in result.updates"
- - "'snmp-server contact bar' in result.updates"
-
-- name: configure top level command with before idempotent check
- ios_config:
- lines: ['hostname foo']
- before: ['snmp-server contact foo']
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines:
- - "no snmp-server contact"
- - "hostname {{ shorter_hostname }}"
- match: none
-
-- debug: msg="END cli/toplevel_before.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml b/test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml
deleted file mode 100644
index 06aa838481..0000000000
--- a/test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-- debug: msg="START cli/toplevel_nonidempotent.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines: ['hostname {{ shorter_hostname }}']
- match: none
-
-- name: configure top level command
- ios_config:
- lines: ['hostname foo']
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'hostname foo' in result.updates"
-
-- name: configure top level command idempotent check
- ios_config:
- lines: ['hostname foo']
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: teardown
- ios_config:
- lines: ['hostname {{ shorter_hostname }}']
- match: none
-
-- debug: msg="END cli/toplevel_nonidempotent.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli_config/cli_backup.yaml b/test/integration/targets/ios_config/tests/cli_config/cli_backup.yaml
deleted file mode 100644
index a431c01fde..0000000000
--- a/test/integration/targets/ios_config/tests/cli_config/cli_backup.yaml
+++ /dev/null
@@ -1,113 +0,0 @@
-- debug: msg="END cli_config/backup.yaml on connection={{ ansible_connection }}"
-
-- name: delete configurable backup file path
- file:
- path: "{{ item }}"
- state: absent
- with_items:
- - "{{ role_path }}/backup_test_dir/"
- - "{{ role_path }}/backup/backup.cfg"
-
-- name: collect any backup files
- find:
- paths: "{{ role_path }}/backup"
- pattern: "{{ inventory_hostname_short }}_config*"
- register: backup_files
- connection: local
-
-- name: delete backup files
- file:
- path: "{{ item.path }}"
- state: absent
- with_items: "{{backup_files.files|default([])}}"
-
-- name: take config backup
- cli_config:
- backup: yes
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: collect any backup files
- find:
- paths: "{{ role_path }}/backup"
- pattern: "{{ inventory_hostname_short }}_config*"
- register: backup_files
- connection: local
-
-- assert:
- that:
- - "backup_files.files is defined"
-
-- name: take configuration backup in custom filename and directory path
- cli_config:
- backup: yes
- backup_options:
- filename: backup.cfg
- dir_path: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check if the backup file-1 exist
- find:
- paths: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}/backup.cfg"
- register: backup_file
- connection: local
-
-- assert:
- that:
- - "backup_file.files is defined"
-
-- name: take configuration backup in custom filename
- cli_config:
- backup: yes
- backup_options:
- filename: backup.cfg
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check if the backup file-2 exist
- find:
- paths: "{{ role_path }}/backup/backup.cfg"
- register: backup_file
- connection: local
-
-- assert:
- that:
- - "backup_file.files is defined"
-
-- name: take configuration backup in custom path and default filename
- cli_config:
- backup: yes
- backup_options:
- dir_path: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
- become: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check if the backup file-3 exist
- find:
- paths: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
- pattern: "{{ inventory_hostname_short }}_config*"
- register: backup_file
- connection: local
-
-- assert:
- that:
- - "backup_file.files is defined"
-
-- debug: msg="END cli_config/backup.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli_config/cli_basic.yaml b/test/integration/targets/ios_config/tests/cli_config/cli_basic.yaml
deleted file mode 100644
index 607b3df498..0000000000
--- a/test/integration/targets/ios_config/tests/cli_config/cli_basic.yaml
+++ /dev/null
@@ -1,45 +0,0 @@
----
-- debug: msg="START cli_config/cli_basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- cli_config: &rm
- config: |
- interface loopback999
- no description
- shutdown
- diff_match: none
-
-- name: configure device with config
- cli_config: &conf
- config: "{{ lookup('template', 'basic/config.j2') }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: Idempotence
- cli_config: *conf
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: remove config
- cli_config: *rm
-
-- name: configure device with config
- cli_config:
- config: "{{ lookup('template', 'basic/config.j2') }}"
- defaults: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: teardown
- cli_config: *rm
-
-- debug: msg="END cli_config/cli_basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli_config/cli_block_replace.yaml b/test/integration/targets/ios_config/tests/cli_config/cli_block_replace.yaml
deleted file mode 100644
index f66f83f96d..0000000000
--- a/test/integration/targets/ios_config/tests/cli_config/cli_block_replace.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-- debug: msg="START cli_config/cli_block_replace.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove configuration
- cli_config:
- config: "{{ lookup('template', 'basic/setupblock.j2') }}"
- diff_match: none
-
-- name: block replace
- cli_config: &block
- config: "{{ lookup('template', 'basic/configblock.j2') }}"
- diff_replace: block
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: block replace (Idempotence)
- cli_config: *block
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- cli_config:
- config: no ip access-list extended test
- diff_match: none
-
-- debug: msg="END cli_config/cli_block_replace.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli_config/cli_exact_match.yaml b/test/integration/targets/ios_config/tests/cli_config/cli_exact_match.yaml
deleted file mode 100644
index 597afa5099..0000000000
--- a/test/integration/targets/ios_config/tests/cli_config/cli_exact_match.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- debug: msg="START cli_config/cli_exact_match.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove configuration
- cli_config:
- config: "{{ lookup('template', 'basic/setupexact.j2') }}"
- diff_match: none
-
-- name: configure using exact match
- cli_config:
- config: "{{ lookup('template', 'basic/configexact1.j2') }}"
- diff_match: exact
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check using exact match
- cli_config:
- config: "{{ lookup('template', 'basic/configexact2.j2') }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- cli_config:
- config: no ip access-list extended test
- diff_match: none
-
-- debug: msg="END cli_config/cli_exact_match.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_config/tests/cli_config/cli_strict_match.yaml b/test/integration/targets/ios_config/tests/cli_config/cli_strict_match.yaml
deleted file mode 100644
index 45ba54f1ef..0000000000
--- a/test/integration/targets/ios_config/tests/cli_config/cli_strict_match.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- debug: msg="START cli_config/cli_strict_match.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove configuration
- cli_config:
- config: "{{ lookup('template', 'basic/setupstrict.j2') }}"
- diff_match: none
-
-- name: configure using strict match
- cli_config:
- config: "{{ lookup('template', 'basic/configstrict1.j2') }}"
- diff_match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: teardown
- cli_config:
- config: no ip access-list extended test
- diff_match: none
-
-- debug: msg="END cli_config/cli_strict_match.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_facts/defaults/main.yaml b/test/integration/targets/ios_facts/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/ios_facts/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/ios_facts/meta/main.yml b/test/integration/targets/ios_facts/meta/main.yml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_facts/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_facts/tasks/cli.yaml b/test/integration/targets/ios_facts/tasks/cli.yaml
deleted file mode 100644
index 6b93fd5400..0000000000
--- a/test/integration/targets/ios_facts/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_facts/tasks/main.yaml b/test/integration/targets/ios_facts/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_facts/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_facts/tests/cli/all_facts.yaml b/test/integration/targets/ios_facts/tests/cli/all_facts.yaml
deleted file mode 100644
index 5f2a754487..0000000000
--- a/test/integration/targets/ios_facts/tests/cli/all_facts.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-- debug: msg="START cli/all_facts.yaml on connection={{ ansible_connection }}"
-
-
-- name: test getting all facts
- ios_facts:
- gather_subset:
- - all
- provider: "{{ cli }}"
- register: result
-
-
-
-- assert:
- that:
- # _facts modules should never report a change
- - "result.changed == false"
-
- # Correct subsets are present
- - "'config' in result.ansible_facts.ansible_net_gather_subset"
- - "'hardware' in result.ansible_facts.ansible_net_gather_subset"
- - "'default' in result.ansible_facts.ansible_net_gather_subset"
- - "'interfaces' in result.ansible_facts.ansible_net_gather_subset"
-
- # Items from those subsets are present
- - "result.ansible_facts.ansible_net_filesystems is defined"
- # Check that these facts not only are present, but are valid (positive integers)
- - "result.ansible_facts.ansible_net_memfree_mb > 1"
- - "result.ansible_facts.ansible_net_memtotal_mb > 1"
-
-- assert:
- that: "{{ item.value.spacetotal_kb }} > {{ item.value.spacefree_kb }}"
- loop: "{{ lookup('dict', result.ansible_facts.ansible_net_filesystems_info, wantlist=True) }}"
-
-- debug: msg="END cli/all_facts.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_facts/tests/cli/default_facts.yaml b/test/integration/targets/ios_facts/tests/cli/default_facts.yaml
deleted file mode 100644
index 11cb9e518f..0000000000
--- a/test/integration/targets/ios_facts/tests/cli/default_facts.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-- debug: msg="START cli/default_facts.yaml on connection={{ ansible_connection }}"
-
-
-- name: test getting default facts
- ios_facts:
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- # _facts modules should never report a change
- - "result.changed == false"
-
- # Correct subsets are present
- - "'hardware' in result.ansible_facts.ansible_net_gather_subset"
- - "'default' in result.ansible_facts.ansible_net_gather_subset"
- - "'interfaces' in result.ansible_facts.ansible_net_gather_subset"
- - "result.ansible_facts.ansible_net_filesystems is defined"
- # ... and not present
- - "'config' not in result.ansible_facts.ansible_net_gather_subset"
-
- # Items from those subsets are present
- - "result.ansible_facts.ansible_net_filesystems is defined" #hw
- - "result.ansible_facts.ansible_net_memtotal_mb > 10" #hw
- - "result.ansible_facts.ansible_net_interfaces | length > 1" # more than one interface returned
-
- # ... and not present
- - "result.ansible_facts.ansible_net_config is not defined" # config
-
-- assert:
- that: "{{ item.value.spacetotal_kb }} > {{ item.value.spacefree_kb }}"
- loop: "{{ lookup('dict', result.ansible_facts.ansible_net_filesystems_info, wantlist=True) }}"
-
-- debug: msg="END cli/default.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_facts/tests/cli/invalid_subset.yaml b/test/integration/targets/ios_facts/tests/cli/invalid_subset.yaml
deleted file mode 100644
index e7d4281f7d..0000000000
--- a/test/integration/targets/ios_facts/tests/cli/invalid_subset.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
----
-- debug: msg="START cli/invalid_subset.yaml on connection={{ ansible_connection }}"
-
-
-- name: test invalid subset (foobar)
- ios_facts:
- gather_subset:
- - "foobar"
- provider: "{{ cli }}"
- register: result
- ignore_errors: true
-
-
-- assert:
- that:
- # Failures shouldn't return changes
- - "result.changed == false"
- # It's a failure
- - "result.failed == true"
- # Sensible Failure message
- - "result.msg == 'Subset must be one of [config, default, hardware, interfaces], got foobar'"
-
-###############
-# FIXME Future
-# We may in the future want to add a test for
-
-- name: test subset specified multiple times
- ios_facts:
- gather_subset:
- - "!hardware"
- - "hardware"
- provider: "{{ cli }}"
- register: result
- ignore_errors: true
-
-- assert:
- that:
- # Failures shouldn't return changes
- - "result.changed == false"
- # It's a failure
- - "result.failed == true"
- # Sensible Failure message
- - "result.msg == 'Bad subset'"
- ignore_errors: true
-
-
-
-- debug: msg="END cli/invalid_subset.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_facts/tests/cli/not_hardware.yaml b/test/integration/targets/ios_facts/tests/cli/not_hardware.yaml
deleted file mode 100644
index da46f2cd90..0000000000
--- a/test/integration/targets/ios_facts/tests/cli/not_hardware.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
----
-- debug: msg="START cli/not_hardware_facts.yaml on connection={{ ansible_connection }}"
-
-
-- name: test not hardware
- ios_facts:
- gather_subset:
- - "!hardware"
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- # _facts modules should never report a change
- - "result.changed == false"
-
- # Correct subsets are present
- - "'config' in result.ansible_facts.ansible_net_gather_subset"
-
- - "'default' in result.ansible_facts.ansible_net_gather_subset"
- - "'interfaces' in result.ansible_facts.ansible_net_gather_subset"
- # ... and not present
- - "'hardware' not in result.ansible_facts.ansible_net_gather_subset"
-
- # Items from those subsets are present
- - "result.ansible_facts.ansible_net_interfaces | length > 1" # more than one interface returned
- # ... and not present
- - "result.ansible_facts.ansible_net_filesystems is not defined"
- - "result.ansible_facts.ansible_net_filesystems_info is not defined"
-
-- debug: msg="END cli/not_hardware_facts.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_file/aliases b/test/integration/targets/ios_file/aliases
deleted file mode 100644
index 6bb69158a7..0000000000
--- a/test/integration/targets/ios_file/aliases
+++ /dev/null
@@ -1 +0,0 @@
-shippable/ios/group1
diff --git a/test/integration/targets/ios_file/defaults/main.yaml b/test/integration/targets/ios_file/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/ios_file/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/ios_file/ios1.cfg b/test/integration/targets/ios_file/ios1.cfg
deleted file mode 100644
index 120dd4cad7..0000000000
--- a/test/integration/targets/ios_file/ios1.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-vlan 3
- name ank_vlan3
-!
diff --git a/test/integration/targets/ios_file/nonascii.bin b/test/integration/targets/ios_file/nonascii.bin
deleted file mode 100644
index 14c6ddb1b8..0000000000
--- a/test/integration/targets/ios_file/nonascii.bin
+++ /dev/null
Binary files differ
diff --git a/test/integration/targets/ios_file/tasks/cli.yaml b/test/integration/targets/ios_file/tasks/cli.yaml
deleted file mode 100644
index 575f5d0a8e..0000000000
--- a/test/integration/targets/ios_file/tasks/cli.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_file/tasks/main.yaml b/test/integration/targets/ios_file/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_file/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_file/tests/cli/net_get.yaml b/test/integration/targets/ios_file/tests/cli/net_get.yaml
deleted file mode 100644
index 906429f534..0000000000
--- a/test/integration/targets/ios_file/tests/cli/net_get.yaml
+++ /dev/null
@@ -1,52 +0,0 @@
----
-- debug: msg="START ios cli/net_get.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: setup
- ios_config:
- lines:
- - ip ssh version 2
- - ip scp server enable
- - username {{ ansible_ssh_user }} privilege 15
- match: none
-
-- name: setup (copy file to be fetched from device)
- net_put:
- src: ios1.cfg
- register: result
-
-- name: setup (remove file from localhost if present)
- file:
- path: ios_{{ inventory_hostname }}.cfg
- state: absent
- delegate_to: localhost
-
-- name: get the file from device with relative destination
- net_get:
- src: ios1.cfg
- dest: 'ios_{{ inventory_hostname }}.cfg'
- register: result
-
-- assert:
- that:
- - result.changed == true
-
-- name: Idempotency check
- net_get:
- src: ios1.cfg
- dest: 'ios_{{ inventory_hostname }}.cfg'
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: setup (remove file from localhost if present)
- file:
- path: ios_{{ inventory_hostname }}.cfg
- state: absent
- delegate_to: localhost
-
-- debug: msg="END ios cli/net_get.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_file/tests/cli/net_put.yaml b/test/integration/targets/ios_file/tests/cli/net_put.yaml
deleted file mode 100644
index d7c1b03630..0000000000
--- a/test/integration/targets/ios_file/tests/cli/net_put.yaml
+++ /dev/null
@@ -1,73 +0,0 @@
----
-- debug:
- msg: "START ios cli/net_put.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: setup
- ios_config:
- lines:
- - ip ssh version 2
- - ip scp server enable
- - username {{ ansible_ssh_user }} privilege 15
- match: none
-
-- name: Delete existing files if present on remote host
- ios_command:
- commands: "{{ item }}"
- loop:
- - delete /force ios1.cfg
- - delete /force ios.cfg
- - delete /force nonascii.bin
- ignore_errors: true
-
-- name: copy file from controller to ios + scp (Default)
- net_put:
- src: ios1.cfg
- register: result
-
-- assert:
- that:
- - result.changed == true
-
-- name: Idempotency Check
- net_put:
- src: ios1.cfg
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: copy file from controller to ios + dest specified
- net_put:
- src: ios1.cfg
- dest: ios.cfg
- register: result
-
-- assert:
- that:
- - result.changed == true
-
-- name: copy file with non-ascii characters to ios in template mode(Fail case)
- net_put:
- src: nonascii.bin
- mode: 'text'
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - result.failed == true
-
-- name: copy file with non-ascii characters to ios in default mode(binary)
- net_put:
- src: nonascii.bin
- register: result
-
-- assert:
- that:
- - result.changed == true
-
-- debug: msg="END ios cli/net_put.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_interface/defaults/main.yaml b/test/integration/targets/ios_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/ios_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/ios_interface/meta/main.yaml b/test/integration/targets/ios_interface/meta/main.yaml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_interface/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_interface/tasks/cli.yaml b/test/integration/targets/ios_interface/tasks/cli.yaml
deleted file mode 100644
index 6b93fd5400..0000000000
--- a/test/integration/targets/ios_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_interface/tasks/main.yaml b/test/integration/targets/ios_interface/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_interface/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_interface/tests/cli/basic.yaml b/test/integration/targets/ios_interface/tests/cli/basic.yaml
deleted file mode 100644
index a61152d6f7..0000000000
--- a/test/integration/targets/ios_interface/tests/cli/basic.yaml
+++ /dev/null
@@ -1,228 +0,0 @@
----
-- debug: msg="START ios_interface cli/basic.yaml on connection={{ ansible_connection }}"
-
-- name: Configure interface (setup)
- ios_interface:
- name: "{{ test_interface }}"
- description: test-interface-1
- speed: 1000
- mtu: 1800
- state: present
- provider: "{{ cli }}"
- register: result
-
-- name: Configure interface
- ios_interface:
- name: "{{ test_interface }}"
- description: test-interface-initial
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"description test-interface-initial" in result.commands'
-
-- name: Confgure interface (idempotent)
- ios_interface:
- name: "{{ test_interface }}"
- description: test-interface-initial
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: Confgure interface parameters
- ios_interface:
- name: "{{ test_interface }}"
- description: test-interface
- mtu: 2000
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"description test-interface" in result.commands'
- - '"mtu 2000" in result.commands'
-
-- name: Change interface parameters
- ios_interface:
- name: "{{ test_interface }}"
- description: test-interface-1
- mtu: 1800
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"description test-interface-1" in result.commands'
- - '"mtu 1800" in result.commands'
-
-- name: Disable interface
- ios_interface:
- name: "{{ test_interface }}"
- enabled: False
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"shutdown" in result.commands'
-
-- name: Enable interface
- ios_interface:
- name: "{{ test_interface }}"
- enabled: True
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"no shutdown" in result.commands'
-
-- name: Confgure second interface (setup)
- ios_interface:
- name: "{{ test_interface2 }}"
- description: test-interface-initial
- speed: 1000
- mtu: 1800
- state: present
- provider: "{{ cli }}"
- register: result
-
-- name: Add interface aggregate
- ios_interface:
- aggregate:
- - { name: "{{ test_interface }}", mtu: 2000, description: test-interface-1 }
- - { name: "{{ test_interface2 }}", mtu: 2000, description: test-interface-2 }
- speed: 1000
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"mtu 2000" in result.commands'
- - '"interface {{ test_interface2 }}" in result.commands'
- - '"description test-interface-2" in result.commands'
- - '"mtu 2000" in result.commands'
-
-- name: Add interface aggregate (idempotent)
- ios_interface:
- aggregate:
- - { name: "{{ test_interface }}", mtu: 2000, description: test-interface-1 }
- - { name: "{{ test_interface2 }}", mtu: 2000, description: test-interface-2 }
- speed: 1000
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: Disable interface aggregate
- ios_interface:
- aggregate:
- - { name: "{{ test_interface }}" }
- - { name: "{{ test_interface2 }}" }
- enabled: False
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"shutdown" in result.commands'
- - '"interface {{ test_interface2 }}" in result.commands'
- - '"shutdown" in result.commands'
-
-- name: Enable interface aggregate
- ios_interface:
- aggregate:
- - { name: "{{ test_interface }}" }
- - { name: "{{ test_interface2 }}" }
- enabled: True
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"no shutdown" in result.commands'
- - '"interface {{ test_interface2 }}" in result.commands'
- - '"no shutdown" in result.commands'
-
-- name: loopback interface setup
- ios_interface:
- aggregate:
- - name: Loopback9
- - name: Loopback10
- state: absent
- provider: "{{ cli }}"
-
-- name: Create loopback interface aggregate
- ios_interface:
- aggregate:
- - name: Loopback9
- - name: Loopback10
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface Loopback9" in result.commands'
- - '"interface Loopback10" in result.commands'
-
-- name: Delete loopback interface aggregate
- ios_interface:
- aggregate:
- - name: Loopback9
- - name: Loopback10
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"no interface Loopback9" in result.commands'
- - '"no interface Loopback10" in result.commands'
-
-- name: Delete loopback interface aggregate (idempotent)
- ios_interface:
- aggregate:
- - name: Loopback9
- - name: Loopback10
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- debug: msg="END ios_interface cli/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_interface/tests/cli/intent.yaml b/test/integration/targets/ios_interface/tests/cli/intent.yaml
deleted file mode 100644
index 1758c6cb98..0000000000
--- a/test/integration/targets/ios_interface/tests/cli/intent.yaml
+++ /dev/null
@@ -1,140 +0,0 @@
----
-- debug: msg="START ios_interface cli/intent.yaml on connection={{ ansible_connection }}"
-
-- name: Check intent arguments
- ios_interface:
- name: "{{ test_interface }}"
- state: up
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - "result.failed == false"
-
-- name: Check intent arguments (failed condition)
- ios_interface:
- name: "{{ test_interface }}"
- state: down
- provider: "{{ cli }}"
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result.failed == true"
- - "'state eq(down)' in result.failed_conditions"
-
-- name: Config + intent
- ios_interface:
- name: "{{ test_interface }}"
- enabled: False
- state: down
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - "result.failed == false"
-
-- name: Config + intent (fail)
- ios_interface:
- name: "{{ test_interface }}"
- enabled: False
- provider: "{{ cli }}"
- state: up
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result.failed == true"
- - "'state eq(up)' in result.failed_conditions"
-
-- name: Register show neighbors detail
- ios_command:
- commands:
- - show lldp neighbors
- provider: "{{ cli }}"
- register: show_lldp_neighbors_result
-
-- block:
- - name: Check neighbors intent arguments
- ios_interface:
- name: Gi0/0
- neighbors:
- - port: eth0
- host: netdev
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.failed == false"
-
- - name: Check neighbors intent arguments (failed condition)
- ios_interface:
- name: Gi0/0
- neighbors:
- - port: dummy_port
- host: dummy_host
- provider: "{{ cli }}"
- ignore_errors: yes
- register: result
-
- - assert:
- that:
- - "result.failed == true"
- - "'host dummy_host' in result.failed_conditions"
- - "'port dummy_port' in result.failed_conditions"
- when: '"netdev" in show_lldp_neighbors_result.stdout[0]'
-
-- name: Aggregate config + intent (pass)
- ios_interface:
- aggregate:
- - name: "{{ test_interface }}"
- enabled: True
- state: up
- provider: "{{ cli }}"
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result.failed == false"
-
-- block:
- - name: Aggregate neighbors intent (pass)
- ios_interface:
- aggregate:
- - name: Gi0/0
- neighbors:
- - port: eth0
- host: netdev
- provider: "{{ cli }}"
- ignore_errors: yes
- register: result
-
- - assert:
- that:
- - "result.failed == false"
-
- - name: Aggregate neighbors intent (fail)
- ios_interface:
- aggregate:
- - name: Gi0/0
- neighbors:
- - port: eth0
- host: netdev
- - port: dummy_port
- host: dummy_host
- provider: "{{ cli }}"
- ignore_errors: yes
- register: result
-
- - assert:
- that:
- - "result.failed == true"
- - "'host dummy_host' in result.failed_conditions"
- - "'port dummy_port' in result.failed_conditions"
- when: "'netdev' in show_lldp_neighbors_result.stdout[0]"
diff --git a/test/integration/targets/ios_interface/tests/cli/net_interface.yaml b/test/integration/targets/ios_interface/tests/cli/net_interface.yaml
deleted file mode 100644
index 45f70a1ddb..0000000000
--- a/test/integration/targets/ios_interface/tests/cli/net_interface.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
----
-- debug: msg="START ios cli/net_interface.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: Configure interface (setup)
- net_interface:
- name: "{{ test_interface }}"
- description: test-interface-1
- speed: 1000
- mtu: 1800
- state: present
- provider: "{{ cli }}"
- register: result
-
-- name: Configure interface using platform agnostic module
- net_interface:
- name: "{{ test_interface }}"
- description: test-interface-initial
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"description test-interface-initial" in result.commands'
-
-- name: Confgure interface parameters using platform agnostic module
- net_interface:
- name: "{{ test_interface }}"
- description: test-interface
- mtu: 2000
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"description test-interface" in result.commands'
- - '"mtu 2000" in result.commands'
-
-- debug: msg="START ios cli/net_interface.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_interfaces/defaults/main.yaml b/test/integration/targets/ios_interfaces/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/ios_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/ios_interfaces/meta/main.yaml b/test/integration/targets/ios_interfaces/meta/main.yaml
deleted file mode 100644
index 32cf5dda7e..0000000000
--- a/test/integration/targets/ios_interfaces/meta/main.yaml
+++ /dev/null
@@ -1 +0,0 @@
-dependencies: []
diff --git a/test/integration/targets/ios_interfaces/tasks/cli.yaml b/test/integration/targets/ios_interfaces/tasks/cli.yaml
deleted file mode 100644
index 242420aa7f..0000000000
--- a/test/integration/targets/ios_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- name: Collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- register: test_cases
- delegate_to: localhost
-
-- name: Set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- delegate_to: localhost
-
-- name: Run test case (connection=network_cli)
- include: "{{ test_case_to_run }}"
- vars:
- ansible_connection: network_cli
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_interfaces/tasks/main.yaml b/test/integration/targets/ios_interfaces/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_interfaces/tests/cli/_populate_config.yaml b/test/integration/targets/ios_interfaces/tests/cli/_populate_config.yaml
deleted file mode 100644
index 7494111773..0000000000
--- a/test/integration/targets/ios_interfaces/tests/cli/_populate_config.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: Populate Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- interface GigabitEthernet 0/1
- description this is interface1
- mtu 65
- speed 10
- no shutdown
- interface GigabitEthernet 0/2
- description this is interface2
- mtu 110
- duplex auto
- speed 100
- shutdown
diff --git a/test/integration/targets/ios_interfaces/tests/cli/_remove_config.yaml b/test/integration/targets/ios_interfaces/tests/cli/_remove_config.yaml
deleted file mode 100644
index 3cebd16814..0000000000
--- a/test/integration/targets/ios_interfaces/tests/cli/_remove_config.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: Remove Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- interface loopback888
- no description
- no shutdown
- interface loopback999
- no description
- no shutdown
- interface GigabitEthernet 0/1
- no description
- no mtu
- no duplex
- no speed
- no shutdown
- interface GigabitEthernet 0/2
- no description
- no mtu
- no duplex
- no speed
- no shutdown
diff --git a/test/integration/targets/ios_interfaces/tests/cli/deleted.yaml b/test/integration/targets/ios_interfaces/tests/cli/deleted.yaml
deleted file mode 100644
index 04c919403e..0000000000
--- a/test/integration/targets/ios_interfaces/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
----
-- debug:
- msg: "Start Deleted integration state for ios_interfaces ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Delete attributes of all configured interfaces
- ios_interfaces: &deleted
- state: deleted
- register: result
-
- - debug:
- msg:
- - "{{ deleted['commands'] | symmetric_difference(result['commands']) }}"
- - "{{ deleted['before'] | symmetric_difference(result['before']) }}"
- - "{{ deleted['after'] | symmetric_difference(result['after']) }}"
-
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ deleted['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ deleted['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ deleted['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Delete attributes of all configured interfaces (IDEMPOTENT)
- ios_interfaces: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_interfaces/tests/cli/empty_config.yaml b/test/integration/targets/ios_interfaces/tests/cli/empty_config.yaml
deleted file mode 100644
index cb0761e9a4..0000000000
--- a/test/integration/targets/ios_interfaces/tests/cli/empty_config.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-- debug:
- msg: "START ios_interfaces empty_config.yaml integration tests on connection={{ ansible_connection }}"
-
-- name: Merged with empty config should give appropriate error message
- ios_interfaces:
- config:
- state: merged
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state merged'
-
-- name: Replaced with empty config should give appropriate error message
- ios_interfaces:
- config:
- state: replaced
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state replaced'
-
-- name: Overridden with empty config should give appropriate error message
- ios_interfaces:
- config:
- state: overridden
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state overridden'
diff --git a/test/integration/targets/ios_interfaces/tests/cli/merged.yaml b/test/integration/targets/ios_interfaces/tests/cli/merged.yaml
deleted file mode 100644
index 775edbe1bd..0000000000
--- a/test/integration/targets/ios_interfaces/tests/cli/merged.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
----
-- debug:
- msg: "START Merged ios_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- block:
- - name: Merge provided configuration with device configuration
- ios_interfaces: &merged
- config:
- - name: GigabitEthernet0/1
- description: 'Configured and Merged by Ansible-Network'
- mtu: 110
- enabled: True
- duplex: half
- - name: GigabitEthernet0/2
- description: 'Configured and Merged by Ansible-Network'
- mtu: 2800
- enabled: False
- speed: 100
- duplex: full
- state: merged
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ merged['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ merged['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ merged['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Merge provided configuration with device configuration (IDEMPOTENT)
- ios_interfaces: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_interfaces/tests/cli/overridden.yaml b/test/integration/targets/ios_interfaces/tests/cli/overridden.yaml
deleted file mode 100644
index d0231f1de6..0000000000
--- a/test/integration/targets/ios_interfaces/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
----
-- debug:
- msg: "START Overridden ios_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Override device configuration of all interfaces with provided configuration
- ios_interfaces: &overridden
- config:
- - name: GigabitEthernet0/2
- description: 'Configured and Overridden by Ansible-Network'
- enabled: False
- duplex: full
- mtu: 2000
- state: overridden
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ overridden['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ overridden['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ overridden['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Override device configuration of all interfaces with provided configuration (IDEMPOTENT)
- ios_interfaces: *overridden
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_interfaces/tests/cli/replaced.yaml b/test/integration/targets/ios_interfaces/tests/cli/replaced.yaml
deleted file mode 100644
index 24b21a6988..0000000000
--- a/test/integration/targets/ios_interfaces/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
----
-- debug:
- msg: "START Replaced ios_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Replaces device configuration of listed interfaces with provided configuration
- ios_interfaces: &replaced
- config:
- - name: GigabitEthernet0/1
- description: 'Configured and Replaced by Ansible-Network'
- mtu: 110
- - name: GigabitEthernet0/2
- description: 'Configured and Replaced by Ansible-Network'
- speed: 10
- state: replaced
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ replaced['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ replaced['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ replaced['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Replaces device configuration of listed interfaces with provided configuration (IDEMPOTENT)
- ios_interfaces: *replaced
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_interfaces/vars/main.yaml b/test/integration/targets/ios_interfaces/vars/main.yaml
deleted file mode 100644
index 1eb0cb68ad..0000000000
--- a/test/integration/targets/ios_interfaces/vars/main.yaml
+++ /dev/null
@@ -1,214 +0,0 @@
----
-merged:
- before:
- - enabled: true
- name: loopback888
- - enabled: true
- name: loopback999
- - duplex: auto
- enabled: true
- name: GigabitEthernet0/0
- speed: auto
- - duplex: auto
- enabled: true
- name: GigabitEthernet0/1
- speed: auto
- - duplex: auto
- enabled: true
- name: GigabitEthernet0/2
- speed: auto
-
- commands:
- - "interface GigabitEthernet0/1"
- - "description Configured and Merged by Ansible-Network"
- - "mtu 110"
- - "duplex half"
- - "interface GigabitEthernet0/2"
- - "description Configured and Merged by Ansible-Network"
- - "mtu 2800"
- - "speed 100"
- - "duplex full"
- - "shutdown"
-
- after:
- - enabled: true
- name: loopback888
- - enabled: true
- name: loopback999
- - duplex: auto
- enabled: true
- name: GigabitEthernet0/0
- speed: auto
- - description: Configured and Merged by Ansible-Network
- duplex: half
- enabled: true
- mtu: 110
- name: GigabitEthernet0/1
- speed: auto
- - description: Configured and Merged by Ansible-Network
- duplex: full
- enabled: false
- mtu: 2800
- name: GigabitEthernet0/2
- speed: '100'
-
-replaced:
- before:
- - enabled: true
- name: loopback888
- - enabled: true
- name: loopback999
- - duplex: auto
- enabled: true
- name: GigabitEthernet0/0
- speed: auto
- - description: this is interface1
- duplex: auto
- enabled: true
- mtu: 65
- name: GigabitEthernet0/1
- speed: '10'
- - description: this is interface2
- duplex: auto
- enabled: false
- mtu: 110
- name: GigabitEthernet0/2
- speed: '100'
-
- commands:
- - "interface GigabitEthernet0/1"
- - "no speed"
- - "description Configured and Replaced by Ansible-Network"
- - "mtu 110"
- - "interface GigabitEthernet0/2"
- - "no shutdown"
- - "no mtu"
- - "description Configured and Replaced by Ansible-Network"
- - "speed 10"
-
- after:
- - enabled: true
- name: loopback888
- - enabled: true
- name: loopback999
- - duplex: auto
- enabled: true
- name: GigabitEthernet0/0
- speed: auto
- - description: Configured and Replaced by Ansible-Network
- duplex: auto
- enabled: true
- mtu: 110
- name: GigabitEthernet0/1
- speed: auto
- - description: Configured and Replaced by Ansible-Network
- duplex: auto
- enabled: true
- name: GigabitEthernet0/2
- speed: '10'
-
-overridden:
- before:
- - enabled: true
- name: loopback888
- - enabled: true
- name: loopback999
- - duplex: auto
- enabled: true
- name: GigabitEthernet0/0
- speed: auto
- - description: this is interface1
- duplex: auto
- enabled: true
- mtu: 65
- name: GigabitEthernet0/1
- speed: '10'
- - description: this is interface2
- duplex: auto
- enabled: false
- mtu: 110
- name: GigabitEthernet0/2
- speed: '100'
-
- commands:
- - "interface GigabitEthernet0/1"
- - "no description"
- - "no speed"
- - "no mtu"
- - "interface GigabitEthernet0/2"
- - "no speed"
- - "description Configured and Overridden by Ansible-Network"
- - "mtu 2000"
- - "duplex full"
-
- after:
- - enabled: true
- name: loopback888
- - enabled: true
- name: loopback999
- - duplex: auto
- enabled: true
- name: GigabitEthernet0/0
- speed: auto
- - duplex: auto
- enabled: true
- name: GigabitEthernet0/1
- speed: auto
- - description: Configured and Overridden by Ansible-Network
- duplex: full
- enabled: false
- mtu: 2000
- name: GigabitEthernet0/2
- speed: auto
-
-deleted:
- before:
- - enabled: true
- name: loopback888
- - enabled: true
- name: loopback999
- - duplex: auto
- enabled: true
- name: GigabitEthernet0/0
- speed: auto
- - description: this is interface1
- duplex: auto
- enabled: true
- mtu: 65
- name: GigabitEthernet0/1
- speed: '10'
- - description: this is interface2
- duplex: auto
- enabled: false
- mtu: 110
- name: GigabitEthernet0/2
- speed: '100'
-
- commands:
- - "interface GigabitEthernet0/1"
- - "no description"
- - "no speed"
- - "no mtu"
- - "interface GigabitEthernet0/2"
- - "no description"
- - "no shutdown"
- - "no speed"
- - "no mtu"
-
- after:
- - enabled: true
- name: loopback888
- - enabled: true
- name: loopback999
- - duplex: auto
- enabled: true
- name: GigabitEthernet0/0
- speed: auto
- - duplex: auto
- enabled: true
- name: GigabitEthernet0/1
- speed: auto
- - duplex: auto
- enabled: true
- name: GigabitEthernet0/2
- speed: auto
diff --git a/test/integration/targets/ios_l2_interface/defaults/main.yaml b/test/integration/targets/ios_l2_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/ios_l2_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/ios_l2_interface/meta/main.yml b/test/integration/targets/ios_l2_interface/meta/main.yml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_l2_interface/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_l2_interface/tasks/cli.yaml b/test/integration/targets/ios_l2_interface/tasks/cli.yaml
deleted file mode 100644
index a71aef3f53..0000000000
--- a/test/integration/targets/ios_l2_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found:
- - files: "{{ test_items|default([]) }}"
- skip: true
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_l2_interface/tasks/main.yaml b/test/integration/targets/ios_l2_interface/tasks/main.yaml
deleted file mode 100644
index 03f5b146cc..0000000000
--- a/test/integration/targets/ios_l2_interface/tasks/main.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- when: 'switch_type == "L2"'
diff --git a/test/integration/targets/ios_l2_interface/tests/cli/agg.yaml b/test/integration/targets/ios_l2_interface/tests/cli/agg.yaml
deleted file mode 100644
index 9de5904615..0000000000
--- a/test/integration/targets/ios_l2_interface/tests/cli/agg.yaml
+++ /dev/null
@@ -1,81 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} ios_l2_interface aggregate test"
-
-- name: Setup - Ensure interfaces are switchport
- ios_config:
- lines:
- - switchport
- parents:
- - "interface {{ item }}"
- loop:
- - "{{ test_interface }}"
- - "{{ test_interface2 }}"
-
-- name: "Setup vlans"
- ios_vlan:
- aggregate:
- - vlan_id: 6
- - vlan_id: 15
- provider: "{{ cli }}"
-
-- name: Setup - Remove interface aggregate before testing
- ios_l2_interface:
- aggregate:
- - { name: "{{ test_interface }}", mode: access, access_vlan: 6 }
- - { name: "{{ test_interface2 }}", mode: access, access_vlan: 15 }
- state: absent
- provider: "{{ cli }}"
-
-- block:
- - name: Configure interface for access_vlan aggregate
- ios_l2_interface: &conf_agg
- aggregate:
- - { name: "{{ test_interface }}", mode: access, access_vlan: 6 }
- - { name: "{{ test_interface2 }}", mode: access, access_vlan: 15 }
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
-
- - name: Configure interface for access_vlan aggregate(Idempotence)
- ios_l2_interface: *conf_agg
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: Remove interface aggregate
- ios_l2_interface: &rm_agg
- aggregate:
- - { name: "{{ test_interface }}", mode: access, access_vlan: 6 }
- - { name: "{{ test_interface2 }}", mode: access, access_vlan: 15 }
- provider: "{{ cli }}"
- state: absent
- register: result
-
- - assert:
- that:
- - "result.changed == true"
-
- - name: Remove interface aggregate(Idempotence)
- ios_l2_interface: *rm_agg
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - name: "remove vlans"
- ios_vlan:
- aggregate:
- - vlan_id: 6
- - vlan_id: 15
- state: absent
- provider: "{{ cli }}"
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} ios_l2_interface aggregate test"
diff --git a/test/integration/targets/ios_l2_interface/tests/cli/sanity.yaml b/test/integration/targets/ios_l2_interface/tests/cli/sanity.yaml
deleted file mode 100644
index 44466f9617..0000000000
--- a/test/integration/targets/ios_l2_interface/tests/cli/sanity.yaml
+++ /dev/null
@@ -1,168 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} ios_l2_interface sanity test"
-
-- name: "Setup interface"
- ios_config: &default
- lines:
- - "default interface {{ test_interface }}"
- provider: "{{ cli }}"
-
-- name: set trunk encapsulation type
- ios_config:
- lines:
- - switchport trunk encapsulation dot1q
- parents:
- - "interface {{ test_interface }}"
- provider: "{{ cli }}"
-
-- name: "Setup vlans"
- ios_vlan:
- aggregate:
- - vlan_id: 5
- - vlan_id: 6
- - vlan_id: 7
- - vlan_id: 8
- - vlan_id: 9
- - vlan_id: 10
- - vlan_id: 20
- provider: "{{ cli }}"
-
-- block:
- - name: Ensure interface is in its default switchport state
- ios_l2_interface: &def_swi
- name: "{{ test_interface }}"
- state: unconfigured
- provider: "{{ cli }}"
-
- - name: Ensure interface is configured for access vlan 20
- ios_l2_interface: &acc_vl
- name: "{{ test_interface }}"
- mode: access
- access_vlan: 20
- provider: "{{ cli }}"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "access vlan Idempotence"
- ios_l2_interface: *acc_vl
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Ensure interface only has vlans 5-10 as trunk vlans
- ios_l2_interface: &tr_vl
- name: "{{ test_interface }}"
- mode: trunk
- native_vlan: 10
- trunk_allowed_vlans: 5-10
- provider: "{{ cli }}"
- register: result
-
- - assert: *true
-
- - name: "trunk vlan Idempotence"
- ios_l2_interface: *tr_vl
- register: result
-
- - assert: *false
-
- - name: Ensure interface is a trunk port and ensure 2-50 are being tagged (doesn't mean others aren't also being tagged)
- ios_l2_interface: &tag
- name: "{{ test_interface }}"
- mode: trunk
- native_vlan: 10
- trunk_vlans: 2-50
- provider: "{{ cli }}"
- register: result
-
- - assert: *true
-
- - name: "tag vlan Idempotence"
- ios_l2_interface: *tag
- register: result
-
- - assert: *false
-
- - name: Remove full trunk vlan range 2-50
- ios_l2_interface: &no_tag
- name: "{{ test_interface }}"
- mode: trunk
- trunk_vlans: 2-50
- state: absent
- provider: "{{ cli }}"
- register: result
-
- - assert: *true
-
- - name: Check Idempotence Remove full trunk vlan range 2-50
- ios_l2_interface: *no_tag
- register: result
-
- - assert: *false
-
- - name: Reconfigure interface trunk port and ensure 2-50 are being tagged
- ios_l2_interface: *tag
- register: result
-
- - assert: *true
-
- - name: Check Idempotence Reconfigure interface trunk port and ensure 2-50 are being tagged
- ios_l2_interface: *tag
- register: result
-
- - assert: *false
-
- - name: Remove partial trunk vlan range 30-4094 are removed
- ios_l2_interface: &partial
- name: "{{ test_interface }}"
- mode: trunk
- trunk_vlans: 30-4094
- state: absent
- provider: "{{ cli }}"
- register: result
-
- - assert: *true
-
- - name: Check Idempotence Remove partial trunk vlan range 30-4094 are removed
- ios_l2_interface: *partial
- register: result
-
- - assert: *false
-
- - name: put interface default state
- ios_l2_interface: *def_swi
- register: result
-
- - assert: *true
-
- - name: "default state idempotence"
- ios_l2_interface: *def_swi
- register: result
-
- - assert: *false
-
- always:
- - name: "remove vlans"
- ios_vlan:
- aggregate:
- - vlan_id: 5
- - vlan_id: 6
- - vlan_id: 7
- - vlan_id: 8
- - vlan_id: 9
- - vlan_id: 10
- - vlan_id: 20
- state: absent
- provider: "{{ cli }}"
- ignore_errors: yes
-
- - name: "default interface"
- ios_config: *default
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} ios_l2_interface sanity test"
diff --git a/test/integration/targets/ios_l2_interfaces/defaults/main.yaml b/test/integration/targets/ios_l2_interfaces/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/ios_l2_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/ios_l2_interfaces/meta/main.yaml b/test/integration/targets/ios_l2_interfaces/meta/main.yaml
deleted file mode 100644
index 32cf5dda7e..0000000000
--- a/test/integration/targets/ios_l2_interfaces/meta/main.yaml
+++ /dev/null
@@ -1 +0,0 @@
-dependencies: []
diff --git a/test/integration/targets/ios_l2_interfaces/tasks/cli.yaml b/test/integration/targets/ios_l2_interfaces/tasks/cli.yaml
deleted file mode 100644
index 3bafcd702f..0000000000
--- a/test/integration/targets/ios_l2_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
----
-- name: Collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- register: test_cases
- delegate_to: localhost
-
-- name: Set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- delegate_to: localhost
-
-- name: Get the IOS version
- ios_facts:
- gather_subset: all
-
-- name: Run test case (connection=network_cli)
- include: "{{ test_case_to_run }}"
- vars:
- ansible_connection: network_cli
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_l2_interfaces/tasks/main.yaml b/test/integration/targets/ios_l2_interfaces/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_l2_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_l2_interfaces/tests/cli/_populate_config.yaml b/test/integration/targets/ios_l2_interfaces/tests/cli/_populate_config.yaml
deleted file mode 100644
index 01d1b309e7..0000000000
--- a/test/integration/targets/ios_l2_interfaces/tests/cli/_populate_config.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-- name: Populate Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- interface GigabitEthernet 0/1
- switchport access vlan 10
- interface GigabitEthernet 0/2
- switchport trunk encapsulation dot1q
- switchport trunk native vlan 10
- switchport trunk allowed vlan 10-20,40
- switchport trunk pruning vlan 10,20
- switchport mode trunk
- when: ansible_net_version != "15.6(2)T"
diff --git a/test/integration/targets/ios_l2_interfaces/tests/cli/_remove_config.yaml b/test/integration/targets/ios_l2_interfaces/tests/cli/_remove_config.yaml
deleted file mode 100644
index 3b502087ca..0000000000
--- a/test/integration/targets/ios_l2_interfaces/tests/cli/_remove_config.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- name: Remove Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- interface GigabitEthernet 0/1
- no switchport access vlan
- no switchport trunk encapsulation
- no switchport trunk native vlan
- no switchport trunk allowed vlan
- no switchport trunk pruning vlan
- no switchport mode
- interface GigabitEthernet 0/2
- no switchport access vlan
- no switchport trunk encapsulation
- no switchport trunk native vlan
- no switchport trunk allowed vlan
- no switchport trunk pruning vlan
- no switchport mode
- when: ansible_net_version != "15.6(2)T"
diff --git a/test/integration/targets/ios_l2_interfaces/tests/cli/deleted.yaml b/test/integration/targets/ios_l2_interfaces/tests/cli/deleted.yaml
deleted file mode 100644
index 7f460e6b32..0000000000
--- a/test/integration/targets/ios_l2_interfaces/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- debug:
- msg: "Start Deleted integration state for ios_l2_interfaces ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Delete L2 attributes from all configured interfaces
- ios_l2_interfaces: &deleted
- state: deleted
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ deleted['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ deleted['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ deleted['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Delete attributes of all configured interfaces (IDEMPOTENT)
- ios_l2_interfaces: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.changed == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_l2_interfaces/tests/cli/empty_config.yaml b/test/integration/targets/ios_l2_interfaces/tests/cli/empty_config.yaml
deleted file mode 100644
index 66ef9a6a06..0000000000
--- a/test/integration/targets/ios_l2_interfaces/tests/cli/empty_config.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-- debug:
- msg: "START ios_l2_interfaces empty_config.yaml integration tests on connection={{ ansible_connection }}"
-
-- name: Merged with empty config should give appropriate error message
- ios_l2_interfaces:
- config:
- state: merged
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state merged'
-
-- name: Replaced with empty config should give appropriate error message
- ios_l2_interfaces:
- config:
- state: replaced
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state replaced'
-
-- name: Overridden with empty config should give appropriate error message
- ios_l2_interfaces:
- config:
- state: overridden
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state overridden'
diff --git a/test/integration/targets/ios_l2_interfaces/tests/cli/merged.yaml b/test/integration/targets/ios_l2_interfaces/tests/cli/merged.yaml
deleted file mode 100644
index 18edcec050..0000000000
--- a/test/integration/targets/ios_l2_interfaces/tests/cli/merged.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
----
-- debug:
- msg: "START Merged ios_l2_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- block:
- - name: Merge provided configuration with device configuration
- ios_l2_interfaces: &merged
- config:
- - name: GigabitEthernet0/1
- access:
- vlan: 30
- - name: GigabitEthernet0/2
- trunk:
- allowed_vlans: 15-20,40
- native_vlan: 20
- pruning_vlans: 10,20
- encapsulation: dot1q
- mode: trunk
- state: merged
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ merged['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ merged['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ merged['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Merge provided configuration with device configuration (IDEMPOTENT)
- ios_l2_interfaces: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_l2_interfaces/tests/cli/overridden.yaml b/test/integration/targets/ios_l2_interfaces/tests/cli/overridden.yaml
deleted file mode 100644
index 66a60653d7..0000000000
--- a/test/integration/targets/ios_l2_interfaces/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
----
-- debug:
- msg: "START Overridden ios_l2_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Override device L2 configuration from all interfaces with provided configuration
- ios_l2_interfaces: &overridden
- config:
- - name: GigabitEthernet0/2
- trunk:
- allowed_vlans: 30-35,40
- native_vlan: 30
- encapsulation: isl
- state: overridden
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ overridden['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ overridden['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ overridden['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Override device L2 configuration from all interfaces with provided configuration (IDEMPOTENT)
- ios_l2_interfaces: *overridden
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_l2_interfaces/tests/cli/replaced.yaml b/test/integration/targets/ios_l2_interfaces/tests/cli/replaced.yaml
deleted file mode 100644
index cbd7e95741..0000000000
--- a/test/integration/targets/ios_l2_interfaces/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
----
-- debug:
- msg: "START Replaced ios_l2_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Replaces device L2 configuration from listed interfaces with provided configuration
- ios_l2_interfaces: &replaced
- config:
- - name: GigabitEthernet0/1
- access:
- vlan: 40
- - name: GigabitEthernet0/2
- trunk:
- native_vlan: 20
- pruning_vlans: 10-20,30
- encapsulation: dot1q
- state: replaced
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ replaced['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ replaced['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ replaced['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Replaces device L2 configuration from listed interfaces with provided configuration (IDEMPOTENT)
- ios_l2_interfaces: *replaced
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_l2_interfaces/vars/main.yaml b/test/integration/targets/ios_l2_interfaces/vars/main.yaml
deleted file mode 100644
index d4780c770a..0000000000
--- a/test/integration/targets/ios_l2_interfaces/vars/main.yaml
+++ /dev/null
@@ -1,159 +0,0 @@
----
-merged:
- before:
- - name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- - name: GigabitEthernet0/2
-
- commands:
- - "interface GigabitEthernet0/1"
- - "switchport access vlan 30"
- - "switchport voice vlan 40"
- - "interface GigabitEthernet0/2"
- - "switchport trunk encapsulation dot1q"
- - "switchport trunk native vlan 20"
- - "switchport trunk allowed vlan 15-20,40"
- - "switchport trunk pruning vlan 10,20"
- - "switchport mode trunk"
-
- after:
- - name: GigabitEthernet0/0
- - access:
- vlan: 30
- voice:
- vlan: 40
- name: GigabitEthernet0/1
- - mode: trunk
- name: GigabitEthernet0/2
- trunk:
- allowed_vlans:
- - 15-20
- - "40"
- encapsulation: dot1q
- native_vlan: 20
- pruning_vlans:
- - "10"
- - "20"
-
-replaced:
- before:
- - name: GigabitEthernet0/0
- - access:
- vlan: 10
- voice:
- vlan: 40
- name: GigabitEthernet0/1
- - mode: trunk
- name: GigabitEthernet0/2
- trunk:
- allowed_vlans:
- - 10-20
- - "40"
- encapsulation: dot1q
- native_vlan: 10
- pruning_vlans:
- - "10"
- - "20"
-
- commands:
- - "interface GigabitEthernet0/1"
- - "switchport access vlan 40"
- - "switchport voice vlan 20"
- - "interface GigabitEthernet0/2"
- - "no switchport mode"
- - "no switchport trunk allowed vlan"
- - "switchport trunk native vlan 20"
- - "switchport trunk pruning vlan 10-20,30"
-
- after:
- - name: GigabitEthernet0/0
- - access:
- vlan: 40
- voice:
- vlan: 20
- name: GigabitEthernet0/1
- - name: GigabitEthernet0/2
- trunk:
- encapsulation: dot1q
- native_vlan: 20
- pruning_vlans:
- - 10-20
- - "30"
-
-overridden:
- before:
- - name: GigabitEthernet0/0
- - access:
- vlan: 10
- voice:
- vlan: 40
- name: GigabitEthernet0/1
- - mode: trunk
- name: GigabitEthernet0/2
- trunk:
- allowed_vlans:
- - 10-20
- - "40"
- encapsulation: dot1q
- native_vlan: 10
- pruning_vlans:
- - "10"
- - "20"
-
- commands:
- - "interface GigabitEthernet0/1"
- - "no switchport access vlan"
- - "no switchport voice vlan"
- - "interface GigabitEthernet0/2"
- - "no switchport mode"
- - "no switchport trunk pruning vlan"
- - "switchport trunk encapsulation isl"
- - "switchport trunk native vlan 30"
- - "switchport trunk allowed vlan 30-35,40"
-
- after:
- - name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- - name: GigabitEthernet0/2
- trunk:
- allowed_vlans:
- - 30-35
- - "40"
- encapsulation: isl
- native_vlan: 30
-
-deleted:
- before:
- - name: GigabitEthernet0/0
- - access:
- vlan: 10
- voice:
- vlan: 40
- name: GigabitEthernet0/1
- - mode: trunk
- name: GigabitEthernet0/2
- trunk:
- allowed_vlans:
- - 10-20
- - "40"
- encapsulation: dot1q
- native_vlan: 10
- pruning_vlans:
- - "10"
- - "20"
-
- commands:
- - "interface GigabitEthernet0/1"
- - "no switchport access vlan"
- - "no switch voice vlan"
- - "interface GigabitEthernet0/2"
- - "no switchport mode"
- - "no switchport trunk encapsulation"
- - "no switchport trunk native vlan"
- - "no switchport trunk allowed vlan"
- - "no switchport trunk pruning vlan"
-
- after:
- - name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- - name: GigabitEthernet0/2
diff --git a/test/integration/targets/ios_l3_interface/defaults/main.yaml b/test/integration/targets/ios_l3_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/ios_l3_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/ios_l3_interface/meta/main.yaml b/test/integration/targets/ios_l3_interface/meta/main.yaml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_l3_interface/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_l3_interface/tasks/cli.yaml b/test/integration/targets/ios_l3_interface/tasks/cli.yaml
deleted file mode 100644
index 6b93fd5400..0000000000
--- a/test/integration/targets/ios_l3_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_l3_interface/tasks/main.yaml b/test/integration/targets/ios_l3_interface/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_l3_interface/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_l3_interface/tests/cli/basic.yaml b/test/integration/targets/ios_l3_interface/tests/cli/basic.yaml
deleted file mode 100644
index cb0de03f74..0000000000
--- a/test/integration/targets/ios_l3_interface/tests/cli/basic.yaml
+++ /dev/null
@@ -1,257 +0,0 @@
----
-- debug: msg="START ios_l3_interface cli/basic.yaml on connection={{ ansible_connection }}"
-
-- name: Delete interface ipv4 and ipv6 address(setup)
- ios_l3_interface:
- name: "{{ test_interface }}"
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- name: Setup - Ensure interfaces are switchport
- ios_config:
- lines:
- - no shutdown
- parents:
- - "interface {{ item }}"
- provider: "{{ cli }}"
- loop:
- - "{{ test_interface }}"
- - "{{ test_interface2 }}"
-
-- name: Configure interface ipv4 address
- ios_l3_interface:
- name: "{{ test_interface }}"
- ipv4: 192.168.20.1/24
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"ip address 192.168.20.1 255.255.255.0" in result.commands'
-
-- name: Configure interface ipv4 address (idempotent)
- ios_l3_interface:
- name: "{{ test_interface }}"
- ipv4: 192.168.20.1/24
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert: &unchanged
- that:
- - 'result.changed == false'
-
-- name: Assign same ipv4 address to other interface (fail)
- ios_l3_interface:
- name: "{{ test_interface2 }}"
- ipv4: 192.168.20.1/24
- state: present
- provider: "{{ cli }}"
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
-
-- name: Change interface ipv4 address
- ios_l3_interface:
- name: "{{ test_interface }}"
- ipv4: dhcp
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"ip address dhcp" in result.commands'
-
-- name: Configure interface ipv6 address
- ios_l3_interface: &ipv6-1
- name: "{{ test_interface }}"
- ipv6: fd5d:12c9:2201:1::1/64
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"ipv6 address fd5d:12c9:2201:1::1/64" in result.commands'
-
-- name: Configure interface ipv6 address (idempotent)
- ios_l3_interface: *ipv6-1
- register: result
-
-- assert: *unchanged
-
-- name: Configure second ipv6 address on interface
- ios_l3_interface: &ipv6-2
- name: "{{ test_interface }}"
- ipv6: fd5d:12c9:2291:1::1/64
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"ipv6 address fd5d:12c9:2291:1::1/64" in result.commands'
-
-- name: Ensure first ipv6 address still associated with interface
- ios_l3_interface: *ipv6-1
- register: result
-
-- assert: *unchanged
-
-- name: Ensure second ipv6 address still associated with interface
- ios_l3_interface: *ipv6-2
- register: result
-
-- assert: *unchanged
-
-- name: Assign same ipv6 address to other interface (fail)
- ios_l3_interface:
- name: "{{ test_interface2 }}"
- ipv6: fd5d:12c9:2201:1::1/64
- state: present
- provider: "{{ cli }}"
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
-
-- name: Change interface ipv6 address
- ios_l3_interface:
- name: "{{ test_interface }}"
- ipv6: dhcp
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"ipv6 address dhcp" in result.commands'
-
-- name: Delete interface ipv4 and ipv6 address
- ios_l3_interface:
- name: "{{ test_interface }}"
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"no ip address" in result.commands'
- - '"no ipv6 address" in result.commands'
-
-- name: Delete interface ipv4 and ipv6 address (idempotent)
- ios_l3_interface:
- name: "{{ test_interface }}"
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- assert: *unchanged
-
-- name: Delete second interface ipv4 and ipv6 address (setup)
- ios_l3_interface:
- name: "{{ test_interface2 }}"
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- name: Configure ipv4 and ipv6 address using aggregate
- ios_l3_interface:
- aggregate:
- - { name: "{{ test_interface }}", ipv4: 192.161.0.1/24, ipv6: "fd5d:12c9:2201:2::2/64" }
- - { name: "{{ test_interface2 }}", ipv4: 192.162.0.2/16, ipv6: "fd5e:12c9:2201:3::3/32" }
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"ip address 192.161.0.1 255.255.255.0" in result.commands'
- - '"ipv6 address fd5d:12c9:2201:2::2/64" in result.commands'
- - '"interface {{ test_interface2 }}" in result.commands'
- - '"ip address 192.162.0.2 255.255.0.0" in result.commands'
- - '"ipv6 address fd5e:12c9:2201:3::3/32" in result.commands'
-
-- name: Configure ipv4 and ipv6 address using aggregate (idempotent)
- ios_l3_interface:
- aggregate:
- - { name: "{{ test_interface }}", ipv4: 192.161.0.1/24, ipv6: "fd5d:12c9:2201:2::2/64" }
- - { name: "{{ test_interface2 }}", ipv4: 192.162.0.2/16, ipv6: "fd5e:12c9:2201:3::3/32" }
- provider: "{{ cli }}"
- register: result
-
-- assert: *unchanged
-
-- name: Change ipv4 and ipv6 address using aggregate
- ios_l3_interface:
- aggregate:
- - { name: "{{ test_interface }}", ipv4: 193.167.1.1/8, ipv6: "fd5a:12c9:2201:4::4/32" }
- - { name: "{{ test_interface2 }}", ipv4: 192.169.2.2/24, ipv6: "fd5b:12c9:2201:5::5/90" }
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"ip address 193.167.1.1 255.0.0.0" in result.commands'
- - '"ipv6 address fd5a:12c9:2201:4::4/32" in result.commands'
- - '"interface {{ test_interface2 }}" in result.commands'
- - '"ip address 192.169.2.2 255.255.255.0" in result.commands'
- - '"ipv6 address fd5b:12c9:2201:5::5/90" in result.commands'
-
-
-- name: Delete ipv4 and ipv6 address using aggregate
- ios_l3_interface:
- aggregate:
- - { name: "{{ test_interface }}" }
- - { name: "{{ test_interface2 }}" }
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"no ip address" in result.commands'
- - '"no ipv6 address" in result.commands'
- - '"interface {{ test_interface2 }}" in result.commands'
- - '"no ip address" in result.commands'
- - '"no ipv6 address" in result.commands'
-
-- name: Delete ipv4 and ipv6 address using aggregate (idempotent)
- ios_l3_interface:
- aggregate:
- - { name: "{{ test_interface }}" }
- - { name: "{{ test_interface2 }}" }
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- assert: *unchanged
-
-- debug: msg="END ios_l3_interface cli/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_l3_interfaces/defaults/main.yaml b/test/integration/targets/ios_l3_interfaces/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/ios_l3_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/ios_l3_interfaces/meta/main.yaml b/test/integration/targets/ios_l3_interfaces/meta/main.yaml
deleted file mode 100644
index 32cf5dda7e..0000000000
--- a/test/integration/targets/ios_l3_interfaces/meta/main.yaml
+++ /dev/null
@@ -1 +0,0 @@
-dependencies: []
diff --git a/test/integration/targets/ios_l3_interfaces/tasks/cli.yaml b/test/integration/targets/ios_l3_interfaces/tasks/cli.yaml
deleted file mode 100644
index 242420aa7f..0000000000
--- a/test/integration/targets/ios_l3_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- name: Collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- register: test_cases
- delegate_to: localhost
-
-- name: Set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- delegate_to: localhost
-
-- name: Run test case (connection=network_cli)
- include: "{{ test_case_to_run }}"
- vars:
- ansible_connection: network_cli
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_l3_interfaces/tasks/main.yaml b/test/integration/targets/ios_l3_interfaces/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_l3_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_l3_interfaces/tests/cli/_populate_config.yaml b/test/integration/targets/ios_l3_interfaces/tests/cli/_populate_config.yaml
deleted file mode 100644
index 130cab1eaf..0000000000
--- a/test/integration/targets/ios_l3_interfaces/tests/cli/_populate_config.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-- name: Populate Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- interface GigabitEthernet 0/1
- ip address 203.0.113.27 255.255.255.0
- interface GigabitEthernet 0/2
- ip address 192.0.2.1 255.255.255.0 secondary
- ip address 192.0.2.2 255.255.255.0
- ipv6 address 2001:db8:0:3::/64
diff --git a/test/integration/targets/ios_l3_interfaces/tests/cli/_remove_config.yaml b/test/integration/targets/ios_l3_interfaces/tests/cli/_remove_config.yaml
deleted file mode 100644
index a0db7f0698..0000000000
--- a/test/integration/targets/ios_l3_interfaces/tests/cli/_remove_config.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-- name: Remove Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- interface GigabitEthernet 0/1
- no ip address
- no ipv6 address
- interface GigabitEthernet 0/2
- no ip address
- no ipv6 address
diff --git a/test/integration/targets/ios_l3_interfaces/tests/cli/deleted.yaml b/test/integration/targets/ios_l3_interfaces/tests/cli/deleted.yaml
deleted file mode 100644
index aa28c2b2a9..0000000000
--- a/test/integration/targets/ios_l3_interfaces/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
----
-- debug:
- msg: "Start Deleted integration state for ios_l3_interfaces ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Delete attributes of provided configured interfaces
- ios_l3_interfaces: &deleted
- config:
- - name: GigabitEthernet0/1
- - name: GigabitEthernet0/2
- state: deleted
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ deleted['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ deleted['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ deleted['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Delete attributes of all configured interfaces (IDEMPOTENT)
- ios_l3_interfaces: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_l3_interfaces/tests/cli/empty_config.yaml b/test/integration/targets/ios_l3_interfaces/tests/cli/empty_config.yaml
deleted file mode 100644
index a9ccad652b..0000000000
--- a/test/integration/targets/ios_l3_interfaces/tests/cli/empty_config.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-- debug:
- msg: "START ios_l3_interfaces empty_config.yaml integration tests on connection={{ ansible_connection }}"
-
-- name: Merged with empty config should give appropriate error message
- ios_l3_interfaces:
- config:
- state: merged
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state merged'
-
-- name: Replaced with empty config should give appropriate error message
- ios_l3_interfaces:
- config:
- state: replaced
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state replaced'
-
-- name: Overridden with empty config should give appropriate error message
- ios_l3_interfaces:
- config:
- state: overridden
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state overridden'
diff --git a/test/integration/targets/ios_l3_interfaces/tests/cli/merged.yaml b/test/integration/targets/ios_l3_interfaces/tests/cli/merged.yaml
deleted file mode 100644
index 0902eaec84..0000000000
--- a/test/integration/targets/ios_l3_interfaces/tests/cli/merged.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
----
-- debug:
- msg: "START Merged ios_l3_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- block:
- - name: Merge provided configuration with device configuration
- ios_l3_interfaces: &merged
- config:
- - name: GigabitEthernet0/1
- ipv4:
- - address: dhcp
- dhcp_client: 0
- dhcp_hostname: test.com
- - name: GigabitEthernet0/2
- ipv4:
- - address: 198.51.100.1/24
- secondary: True
- - address: 198.51.100.2/24
- ipv6:
- - address: 2001:db8:0:3::/64
- state: merged
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ merged['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ merged['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ merged['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Merge provided configuration with device configuration (IDEMPOTENT)
- ios_l3_interfaces: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_l3_interfaces/tests/cli/overridden.yaml b/test/integration/targets/ios_l3_interfaces/tests/cli/overridden.yaml
deleted file mode 100644
index 2ebe3fd621..0000000000
--- a/test/integration/targets/ios_l3_interfaces/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,49 +0,0 @@
----
-- debug:
- msg: "START Overridden ios_l3_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Override device configuration of all interfaces with provided configuration
- ios_l3_interfaces: &overridden
- config:
- - name: GigabitEthernet0/0
- ipv4:
- - address: dhcp
- - name: GigabitEthernet0/2
- ipv4:
- - address: 198.51.100.1/24
- - address: 198.51.100.2/24
- secondary: True
- state: overridden
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ overridden['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ overridden['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ overridden['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Override device configuration of all interfaces with provided configuration (IDEMPOTENT)
- ios_l3_interfaces: *overridden
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_l3_interfaces/tests/cli/replaced.yaml b/test/integration/targets/ios_l3_interfaces/tests/cli/replaced.yaml
deleted file mode 100644
index 7e6e4de24d..0000000000
--- a/test/integration/targets/ios_l3_interfaces/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
----
-- debug:
- msg: "START Replaced ios_l3_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Replaces device configuration of listed interfaces with provided configuration
- ios_l3_interfaces: &replaced
- config:
- - name: GigabitEthernet0/1
- ipv4:
- - address: 203.0.114.1/24
- - name: GigabitEthernet0/2
- ipv4:
- - address: 198.51.100.1/24
- secondary: True
- - address: 198.51.100.2/24
- ipv6:
- - address: 2001:db8:1:1::/64
- state: replaced
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ replaced['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ replaced['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ replaced['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Replaces device configuration of listed interfaces with provided configuration (IDEMPOTENT)
- ios_l3_interfaces: *replaced
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_l3_interfaces/vars/main.yaml b/test/integration/targets/ios_l3_interfaces/vars/main.yaml
deleted file mode 100644
index b85a3c2ae5..0000000000
--- a/test/integration/targets/ios_l3_interfaces/vars/main.yaml
+++ /dev/null
@@ -1,157 +0,0 @@
----
-merged:
- before:
- - name: loopback888
- - name: loopback999
- - ipv4:
- - address: dhcp
- name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- - name: GigabitEthernet0/2
-
- commands:
- - "interface GigabitEthernet0/1"
- - "ip address dhcp client-id GigabitEthernet 0/0 hostname test.com"
- - "interface GigabitEthernet0/2"
- - "ip address 198.51.100.1 255.255.255.0 secondary"
- - "ip address 198.51.100.2 255.255.255.0"
- - "ipv6 address 2001:db8:0:3::/64"
-
- after:
- - name: loopback888
- - name: loopback999
- - ipv4:
- - address: dhcp
- name: GigabitEthernet0/0
- - ipv4:
- - address: dhcp
- dhcp_client: 0
- dhcp_hostname: test.com
- name: GigabitEthernet0/1
- - ipv4:
- - address: 198.51.100.1 255.255.255.0
- secondary: true
- - address: 198.51.100.2 255.255.255.0
- ipv6:
- - address: 2001:db8:0:3::/64
- name: GigabitEthernet0/2
-
-
-replaced:
- before:
- - name: loopback888
- - name: loopback999
- - ipv4:
- - address: dhcp
- name: GigabitEthernet0/0
- - ipv4:
- - address: 203.0.113.27 255.255.255.0
- name: GigabitEthernet0/1
- - ipv4:
- - address: 192.0.2.1 255.255.255.0
- secondary: true
- - address: 192.0.2.2 255.255.255.0
- ipv6:
- - address: 2001:db8:0:3::/64
- name: GigabitEthernet0/2
-
- commands:
- - "interface GigabitEthernet0/1"
- - "ip address 203.0.114.1 255.255.255.0"
- - "interface GigabitEthernet0/2"
- - "no ip address"
- - "no ipv6 address"
- - "ip address 198.51.100.1 255.255.255.0 secondary"
- - "ip address 198.51.100.2 255.255.255.0"
- - "ipv6 address 2001:db8:1:1::/64"
-
- after:
- - name: loopback888
- - name: loopback999
- - ipv4:
- - address: dhcp
- name: GigabitEthernet0/0
- - ipv4:
- - address: 203.0.114.1 255.255.255.0
- name: GigabitEthernet0/1
- - ipv4:
- - address: 198.51.100.1 255.255.255.0
- secondary: true
- - address: 198.51.100.2 255.255.255.0
- ipv6:
- - address: 2001:db8:1:1::/64
- name: GigabitEthernet0/2
-
-overridden:
- before:
- - name: loopback888
- - name: loopback999
- - ipv4:
- - address: dhcp
- name: GigabitEthernet0/0
- - ipv4:
- - address: 203.0.113.27 255.255.255.0
- name: GigabitEthernet0/1
- - ipv4:
- - address: 192.0.2.1 255.255.255.0
- secondary: true
- - address: 192.0.2.2 255.255.255.0
- ipv6:
- - address: 2001:db8:0:3::/64
- name: GigabitEthernet0/2
-
- commands:
- - "interface GigabitEthernet0/1"
- - "no ip address"
- - "interface GigabitEthernet0/2"
- - "no ip address"
- - "no ipv6 address"
- - "ip address 198.51.100.1 255.255.255.0"
- - "ip address 198.51.100.2 255.255.255.0 secondary"
-
- after:
- - name: loopback888
- - name: loopback999
- - ipv4:
- - address: dhcp
- name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- - ipv4:
- - address: 198.51.100.2 255.255.255.0
- secondary: true
- - address: 198.51.100.1 255.255.255.0
- name: GigabitEthernet0/2
-
-deleted:
- before:
- - name: loopback888
- - name: loopback999
- - ipv4:
- - address: dhcp
- name: GigabitEthernet0/0
- - ipv4:
- - address: 203.0.113.27 255.255.255.0
- name: GigabitEthernet0/1
- - ipv4:
- - address: 192.0.2.1 255.255.255.0
- secondary: true
- - address: 192.0.2.2 255.255.255.0
- ipv6:
- - address: 2001:db8:0:3::/64
- name: GigabitEthernet0/2
-
- commands:
- - "interface GigabitEthernet0/1"
- - "no ip address"
- - "interface GigabitEthernet0/2"
- - "no ip address"
- - "no ipv6 address"
-
- after:
- - name: loopback888
- - name: loopback999
- - ipv4:
- - address: dhcp
- name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- - name: GigabitEthernet0/2
diff --git a/test/integration/targets/ios_lacp/aliases b/test/integration/targets/ios_lacp/aliases
deleted file mode 100644
index 6bb69158a7..0000000000
--- a/test/integration/targets/ios_lacp/aliases
+++ /dev/null
@@ -1 +0,0 @@
-shippable/ios/group1
diff --git a/test/integration/targets/ios_lacp/defaults/main.yaml b/test/integration/targets/ios_lacp/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/ios_lacp/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/ios_lacp/meta/main.yaml b/test/integration/targets/ios_lacp/meta/main.yaml
deleted file mode 100644
index 32cf5dda7e..0000000000
--- a/test/integration/targets/ios_lacp/meta/main.yaml
+++ /dev/null
@@ -1 +0,0 @@
-dependencies: []
diff --git a/test/integration/targets/ios_lacp/tasks/cli.yaml b/test/integration/targets/ios_lacp/tasks/cli.yaml
deleted file mode 100644
index 3bafcd702f..0000000000
--- a/test/integration/targets/ios_lacp/tasks/cli.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
----
-- name: Collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- register: test_cases
- delegate_to: localhost
-
-- name: Set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- delegate_to: localhost
-
-- name: Get the IOS version
- ios_facts:
- gather_subset: all
-
-- name: Run test case (connection=network_cli)
- include: "{{ test_case_to_run }}"
- vars:
- ansible_connection: network_cli
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_lacp/tasks/main.yaml b/test/integration/targets/ios_lacp/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_lacp/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_lacp/tests/cli/_populate_config.yaml b/test/integration/targets/ios_lacp/tests/cli/_populate_config.yaml
deleted file mode 100644
index c192cb556d..0000000000
--- a/test/integration/targets/ios_lacp/tests/cli/_populate_config.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-- name: Populate Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- lacp system-priority 500
- when: ansible_net_version != "15.6(2)T"
diff --git a/test/integration/targets/ios_lacp/tests/cli/_remove_config.yaml b/test/integration/targets/ios_lacp/tests/cli/_remove_config.yaml
deleted file mode 100644
index 2b21b291ca..0000000000
--- a/test/integration/targets/ios_lacp/tests/cli/_remove_config.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-- name: Remove Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- no lacp system-priority
- when: ansible_net_version != "15.6(2)T"
diff --git a/test/integration/targets/ios_lacp/tests/cli/deleted.yaml b/test/integration/targets/ios_lacp/tests/cli/deleted.yaml
deleted file mode 100644
index 6022637a74..0000000000
--- a/test/integration/targets/ios_lacp/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- debug:
- msg: "Start Deleted integration state for ios_lacp ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Delete configured System LACP
- ios_lacp: &deleted
- state: deleted
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ deleted['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ deleted['before'] == result['before'] }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ deleted['before'] == result['before'] }}"
-
- - name: Delete configured System LACP (IDEMPOTENT)
- ios_lacp: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.changed == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lacp/tests/cli/empty_config.yaml b/test/integration/targets/ios_lacp/tests/cli/empty_config.yaml
deleted file mode 100644
index 6b369f5087..0000000000
--- a/test/integration/targets/ios_lacp/tests/cli/empty_config.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- debug:
- msg: "START ios_lacp empty_config.yaml integration tests on connection={{ ansible_connection }}"
-
-- block:
- - name: Merged with empty config should give appropriate error message
- ios_lacp:
- config:
- state: merged
- register: result
- ignore_errors: True
-
- - assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state merged'
-
- - name: Replaced with empty config should give appropriate error message
- ios_lacp:
- config:
- state: replaced
- register: result
- ignore_errors: True
-
- - assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state replaced'
- when: ansible_net_version != "15.6(2)T"
diff --git a/test/integration/targets/ios_lacp/tests/cli/merged.yaml b/test/integration/targets/ios_lacp/tests/cli/merged.yaml
deleted file mode 100644
index 1ed005c2b2..0000000000
--- a/test/integration/targets/ios_lacp/tests/cli/merged.yaml
+++ /dev/null
@@ -1,42 +0,0 @@
----
-- debug:
- msg: "START Merged ios_lacp state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- block:
- - name: Merge provided configuration system LACP
- ios_lacp: &merged
- config:
- system:
- priority: 10
- state: merged
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ merged['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ merged['before'] == result['before'] }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ merged['before'] == result['before'] }}"
-
- - name: Merge provided configuration system LACP (IDEMPOTENT)
- ios_lacp: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lacp/tests/cli/replaced.yaml b/test/integration/targets/ios_lacp/tests/cli/replaced.yaml
deleted file mode 100644
index 7e48df1e9d..0000000000
--- a/test/integration/targets/ios_lacp/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
----
-- debug:
- msg: "START Replaced ios_lacp state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Replaces system LACP configuration provided LACP configuration
- ios_lacp: &replaced
- config:
- system:
- priority: 20
- state: replaced
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ replaced['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ replaced['before'] == result['before'] }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ replaced['before'] == result['before'] }}"
-
- - name: Replaces system LACP configuration provided LACP configuration (IDEMPOTENT)
- ios_lacp: *replaced
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lacp/vars/main.yaml b/test/integration/targets/ios_lacp/vars/main.yaml
deleted file mode 100644
index 6832c791b0..0000000000
--- a/test/integration/targets/ios_lacp/vars/main.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-merged:
- before:
- system:
- priority: 32768
-
- commands:
- - "lacp system-priority 10"
-
- after:
- - system:
- priority: 10
-
-replaced:
- before:
- system:
- priority: 500
-
- commands:
- - "lacp system-priority 20"
-
- after:
- system:
- priority: 20
-
-deleted:
- before:
- system:
- priority: 500
-
- commands:
- - "no lacp system-priority"
-
- after:
- system:
- priority: 32768
diff --git a/test/integration/targets/ios_lacp_interfaces/defaults/main.yaml b/test/integration/targets/ios_lacp_interfaces/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/ios_lacp_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/ios_lacp_interfaces/tasks/cli.yaml b/test/integration/targets/ios_lacp_interfaces/tasks/cli.yaml
deleted file mode 100644
index 3bafcd702f..0000000000
--- a/test/integration/targets/ios_lacp_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
----
-- name: Collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- register: test_cases
- delegate_to: localhost
-
-- name: Set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- delegate_to: localhost
-
-- name: Get the IOS version
- ios_facts:
- gather_subset: all
-
-- name: Run test case (connection=network_cli)
- include: "{{ test_case_to_run }}"
- vars:
- ansible_connection: network_cli
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_lacp_interfaces/tasks/main.yaml b/test/integration/targets/ios_lacp_interfaces/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_lacp_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_lacp_interfaces/tests/cli/_populate_config.yaml b/test/integration/targets/ios_lacp_interfaces/tests/cli/_populate_config.yaml
deleted file mode 100644
index 54e139b0ae..0000000000
--- a/test/integration/targets/ios_lacp_interfaces/tests/cli/_populate_config.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- name: Populate Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- interface GigabitEthernet 0/1
- lacp port-priority 30
- interface GigabitEthernet 0/2
- lacp port-priority 20
- interface Port-channel 10
- lacp fast-switchover
- lacp max-bundle 2
- interface Port-channel 40
- lacp max-bundle 5
- when: ansible_net_version != "15.6(2)T"
diff --git a/test/integration/targets/ios_lacp_interfaces/tests/cli/_remove_config.yaml b/test/integration/targets/ios_lacp_interfaces/tests/cli/_remove_config.yaml
deleted file mode 100644
index f298b7d417..0000000000
--- a/test/integration/targets/ios_lacp_interfaces/tests/cli/_remove_config.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: Remove Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- interface GigabitEthernet 0/1
- no lacp port-priority
- interface GigabitEthernet 0/2
- no lacp port-priority
- interface Port-channel 10
- no lacp fast-switchover
- no lacp max-bundle
- interface Port-channel 40
- no lacp fast-switchover
- no lacp max-bundle
- when: ansible_net_version != "15.6(2)T"
diff --git a/test/integration/targets/ios_lacp_interfaces/tests/cli/deleted.yaml b/test/integration/targets/ios_lacp_interfaces/tests/cli/deleted.yaml
deleted file mode 100644
index 8e03114454..0000000000
--- a/test/integration/targets/ios_lacp_interfaces/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- debug:
- msg: "Start Deleted integration state for ios_lacp_interfaces ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Delete LACP attributes for all configured interfaces
- ios_lacp_interfaces: &deleted
- state: deleted
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ deleted['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ deleted['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ deleted['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Delete LACP attributes for all configured interfaces (IDEMPOTENT)
- ios_lacp_interfaces: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.changed == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/test/integration/targets/ios_lacp_interfaces/tests/cli/empty_config.yaml b/test/integration/targets/ios_lacp_interfaces/tests/cli/empty_config.yaml
deleted file mode 100644
index 705f47afb9..0000000000
--- a/test/integration/targets/ios_lacp_interfaces/tests/cli/empty_config.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug:
- msg: "START ios_lacp_interfaces empty_config.yaml integration tests on connection={{ ansible_connection }}"
-
-- block:
- - name: Merged with empty config should give appropriate error message
- ios_lacp_interfaces:
- config:
- state: merged
- register: result
- ignore_errors: True
-
- - assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state merged'
-
- - name: Replaced with empty config should give appropriate error message
- ios_lacp_interfaces:
- config:
- state: replaced
- register: result
- ignore_errors: True
-
- - assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state replaced'
-
- - name: Overridden with empty config should give appropriate error message
- ios_lacp_interfaces:
- config:
- state: overridden
- register: result
- ignore_errors: True
-
- - assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state overridden'
- when: ansible_net_version != "15.6(2)T"
diff --git a/test/integration/targets/ios_lacp_interfaces/tests/cli/merged.yaml b/test/integration/targets/ios_lacp_interfaces/tests/cli/merged.yaml
deleted file mode 100644
index 3bfd29b1d2..0000000000
--- a/test/integration/targets/ios_lacp_interfaces/tests/cli/merged.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
----
-- debug:
- msg: "START Merged ios_lacp_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- block:
- - name: Merge the provided configuration with the exisiting running configuration
- ios_lacp_interfaces: &merged
- config:
- - name: GigabitEthernet0/1
- port_priority: 30
- - name: GigabitEthernet0/2
- port_priority: 20
- - name: Port-channel10
- fast_switchover: True
- max_bundle: 2
- state: merged
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ merged['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ merged['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ merged['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Merge the provided configuration with the exisiting running configuration (IDEMPOTENT)
- ios_lacp_interfaces: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lacp_interfaces/tests/cli/overridden.yaml b/test/integration/targets/ios_lacp_interfaces/tests/cli/overridden.yaml
deleted file mode 100644
index e9d4ca2465..0000000000
--- a/test/integration/targets/ios_lacp_interfaces/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
----
-- debug:
- msg: "START Overridden ios_lacp_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Override device configuration of all lacp_interfaces with provided configuration
- ios_lacp_interfaces: &overridden
- config:
- - name: GigabitEthernet0/2
- port_priority: 40
- - name: Port-channel40
- fast_switchover: True
- max_bundle: 2
- state: overridden
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ overridden['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ overridden['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ overridden['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Override device configuration of all lacp_interfaces with provided configuration (IDEMPOTENT)
- ios_lacp_interfaces: *overridden
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lacp_interfaces/tests/cli/replaced.yaml b/test/integration/targets/ios_lacp_interfaces/tests/cli/replaced.yaml
deleted file mode 100644
index 2d5e8e7b79..0000000000
--- a/test/integration/targets/ios_lacp_interfaces/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
----
-- debug:
- msg: "START Replaced ios_lacp_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Replaces device configuration of listed lacp_interfaces with provided configuration
- ios_lacp_interfaces: &replaced
- config:
- - name: GigabitEthernet0/1
- port_priority: 10
- - name: Port-channel40
- fast_switchover: True
- state: replaced
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ replaced['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ replaced['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ replaced['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Replaces device configuration of listed lacp_interfaces with provided configuration (IDEMPOTENT)
- ios_lacp_interfaces: *replaced
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lacp_interfaces/vars/main.yaml b/test/integration/targets/ios_lacp_interfaces/vars/main.yaml
deleted file mode 100644
index b57c882d41..0000000000
--- a/test/integration/targets/ios_lacp_interfaces/vars/main.yaml
+++ /dev/null
@@ -1,126 +0,0 @@
----
-merged:
- before:
- - name: Port-channel10
- - name: Port-channel40
- - name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- - name: GigabitEthernet0/2
-
- commands:
- - "interface GigabitEthernet0/1"
- - "lacp port-priority 30"
- - "interface GigabitEthernet0/2"
- - "lacp port-priority 20"
- - "interface Port-channel10"
- - "lacp max-bundle 2"
- - "lacp fast-switchover"
-
- after:
- - fast_switchover: True
- max_bundle: 2
- name: Port-channel10
- - name: Port-channel40
- - name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- port_priority: 30
- - name: GigabitEthernet0/2
- port_priority: 20
-
-replaced:
- before:
- - fast_switchover: True
- max_bundle: 2
- name: Port-channel10
- - max_bundle: 5
- name: Port-channel40
- - name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- port_priority: 30
- - name: GigabitEthernet0/2
- port_priority: 20
-
- commands:
- - "interface GigabitEthernet0/1"
- - "lacp port-priority 10"
- - "interface Port-channel40"
- - "no lacp max-bundle"
- - "lacp fast-switchover"
-
- after:
- - fast_switchover: True
- max_bundle: 2
- name: Port-channel10
- - fast_switchover: True
- name: Port-channel40
- - name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- port_priority: 10
- - name: GigabitEthernet0/2
- port_priority: 20
-
-overridden:
- before:
- - fast_switchover: True
- max_bundle: 2
- name: Port-channel10
- - max_bundle: 5
- name: Port-channel40
- - name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- port_priority: 30
- - name: GigabitEthernet0/2
- port_priority: 20
-
- commands:
- - "interface GigabitEthernet0/1"
- - "no lacp port-priority"
- - "interface GigabitEthernet0/2"
- - "lacp port-priority 40"
- - "interface Port-channel10"
- - "no lacp fast-switchover"
- - "no lacp max-bundle"
- - "interface Port-channel40"
- - "lacp fast-switchover"
- - "lacp max-bundle 2"
-
- after:
- - name: Port-channel10
- - fast_switchover: True
- max_bundle: 2
- name: Port-channel40
- - name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- - name: GigabitEthernet0/2
- port_priority: 40
-
-deleted:
- before:
- - fast_switchover: True
- max_bundle: 2
- name: Port-channel10
- - max_bundle: 5
- name: Port-channel40
- - name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- port_priority: 30
- - name: GigabitEthernet0/2
- port_priority: 20
-
- commands:
- - "interface GigabitEthernet0/1"
- - "no lacp port-priority"
- - "interface GigabitEthernet0/2"
- - "no lacp port-priority"
- - "interface Port-channel10"
- - "no lacp fast-switchover"
- - "no lacp max-bundle"
- - "interface Port-channel40"
- - "no lacp max-bundle"
-
- after:
- - name: Port-channel10
- - name: Port-channel40
- - name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- - name: GigabitEthernet0/2
diff --git a/test/integration/targets/ios_lag_interfaces/defaults/main.yaml b/test/integration/targets/ios_lag_interfaces/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/ios_lag_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/ios_lag_interfaces/meta/main.yaml b/test/integration/targets/ios_lag_interfaces/meta/main.yaml
deleted file mode 100644
index 32cf5dda7e..0000000000
--- a/test/integration/targets/ios_lag_interfaces/meta/main.yaml
+++ /dev/null
@@ -1 +0,0 @@
-dependencies: []
diff --git a/test/integration/targets/ios_lag_interfaces/tasks/cli.yaml b/test/integration/targets/ios_lag_interfaces/tasks/cli.yaml
deleted file mode 100644
index 3bafcd702f..0000000000
--- a/test/integration/targets/ios_lag_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
----
-- name: Collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- register: test_cases
- delegate_to: localhost
-
-- name: Set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- delegate_to: localhost
-
-- name: Get the IOS version
- ios_facts:
- gather_subset: all
-
-- name: Run test case (connection=network_cli)
- include: "{{ test_case_to_run }}"
- vars:
- ansible_connection: network_cli
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_lag_interfaces/tasks/main.yaml b/test/integration/targets/ios_lag_interfaces/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_lag_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_lag_interfaces/tests/cli/_populate_config.yaml b/test/integration/targets/ios_lag_interfaces/tests/cli/_populate_config.yaml
deleted file mode 100644
index 6a3f2f8ca1..0000000000
--- a/test/integration/targets/ios_lag_interfaces/tests/cli/_populate_config.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-- name: Populate Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- interface GigabitEthernet 0/1
- channel-group 1 mode active
- interface GigabitEthernet 0/2
- channel-group 1 mode passive
- when: ansible_net_version != "15.6(2)T"
diff --git a/test/integration/targets/ios_lag_interfaces/tests/cli/_remove_config.yaml b/test/integration/targets/ios_lag_interfaces/tests/cli/_remove_config.yaml
deleted file mode 100644
index 3a57969291..0000000000
--- a/test/integration/targets/ios_lag_interfaces/tests/cli/_remove_config.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-- name: Remove Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- interface GigabitEthernet 0/1
- no channel-group
- interface GigabitEthernet 0/2
- no channel-group
- when: ansible_net_version != "15.6(2)T"
diff --git a/test/integration/targets/ios_lag_interfaces/tests/cli/deleted.yaml b/test/integration/targets/ios_lag_interfaces/tests/cli/deleted.yaml
deleted file mode 100644
index 01429d3d2a..0000000000
--- a/test/integration/targets/ios_lag_interfaces/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- debug:
- msg: "Start Deleted integration state for ios_lag_interfaces ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Delete attributes of all configured interfaces
- ios_lag_interfaces: &deleted
- state: deleted
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ deleted['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ deleted['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ deleted['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Delete attributes of all configured interfaces (IDEMPOTENT)
- ios_lag_interfaces: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.changed == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lag_interfaces/tests/cli/empty_config.yaml b/test/integration/targets/ios_lag_interfaces/tests/cli/empty_config.yaml
deleted file mode 100644
index c77acf1037..0000000000
--- a/test/integration/targets/ios_lag_interfaces/tests/cli/empty_config.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug:
- msg: "START ios_lag_interfaces empty_config.yaml integration tests on connection={{ ansible_connection }}"
-
-- block:
- - name: Merged with empty config should give appropriate error message
- ios_lag_interfaces:
- config:
- state: merged
- register: result
- ignore_errors: True
-
- - assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state merged'
-
- - name: Replaced with empty config should give appropriate error message
- ios_lag_interfaces:
- config:
- state: replaced
- register: result
- ignore_errors: True
-
- - assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state replaced'
-
- - name: Overridden with empty config should give appropriate error message
- ios_lag_interfaces:
- config:
- state: overridden
- register: result
- ignore_errors: True
-
- - assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state overridden'
- when: ansible_net_version != "15.6(2)T"
diff --git a/test/integration/targets/ios_lag_interfaces/tests/cli/merged.yaml b/test/integration/targets/ios_lag_interfaces/tests/cli/merged.yaml
deleted file mode 100644
index 07ade884b7..0000000000
--- a/test/integration/targets/ios_lag_interfaces/tests/cli/merged.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
----
-- debug:
- msg: "START Merged ios_lag_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- block:
- - name: Merge provided configuration with device configuration
- ios_lag_interfaces: &merged
- config:
- - name: Port-channel1
- members:
- - member: GigabitEthernet0/1
- mode: active
- - member: GigabitEthernet0/2
- mode: passive
- state: merged
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ merged['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ merged['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ merged['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Merge provided configuration with device configuration (IDEMPOTENT)
- ios_lag_interfaces: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lag_interfaces/tests/cli/overridden.yaml b/test/integration/targets/ios_lag_interfaces/tests/cli/overridden.yaml
deleted file mode 100644
index 03415b97bc..0000000000
--- a/test/integration/targets/ios_lag_interfaces/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
----
-- debug:
- msg: "START Overridden ios_lag_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Override device configuration of all interfaces with provided configuration
- ios_lag_interfaces: &overridden
- config:
- - name: Port-channel10
- members:
- - member: GigabitEthernet0/2
- mode: passive
- state: overridden
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ overridden['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ overridden['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ overridden['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Override device configuration of all interfaces with provided configuration (IDEMPOTENT)
- ios_lag_interfaces: *overridden
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lag_interfaces/tests/cli/replaced.yaml b/test/integration/targets/ios_lag_interfaces/tests/cli/replaced.yaml
deleted file mode 100644
index 26ec314e31..0000000000
--- a/test/integration/targets/ios_lag_interfaces/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
----
-- debug:
- msg: "START Replaced ios_lag_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Replaces device configuration of listed interfaces with provided configuration
- ios_lag_interfaces: &replaced
- config:
- - name: Port-channel2
- members:
- - member: GigabitEthernet0/1
- mode: active
- - name: Port-channel40
- members:
- - member: GigabitEthernet0/2
- mode: active
- state: replaced
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ replaced['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ replaced['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ replaced['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Replaces device configuration of listed interfaces with provided configuration (IDEMPOTENT)
- ios_lag_interfaces: *replaced
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lag_interfaces/vars/main.yaml b/test/integration/targets/ios_lag_interfaces/vars/main.yaml
deleted file mode 100644
index e97107f1dd..0000000000
--- a/test/integration/targets/ios_lag_interfaces/vars/main.yaml
+++ /dev/null
@@ -1,93 +0,0 @@
----
-merged:
- before:
- - name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- - name: GigabitEthernet0/2
-
- commands:
- - "interface GigabitEthernet0/1"
- - "channel-group 1 mode active"
- - "interface GigabitEthernet0/2"
- - "channel-group 1 mode passive"
-
- after:
- - name: GigabitEthernet0/0
- - members:
- - member: GigabitEthernet0/1
- mode: active
- - member: GigabitEthernet0/2
- mode: passive
- name: Port-channel1
-
-replaced:
- before:
- - name: GigabitEthernet0/0
- - members:
- - member: GigabitEthernet0/1
- mode: active
- - member: GigabitEthernet0/2
- mode: passive
- name: Port-channel1
-
- commands:
- - "interface GigabitEthernet0/1"
- - "channel-group 2 mode active"
- - "interface GigabitEthernet0/2"
- - "channel-group 40 mode active"
-
- after:
- - name: GigabitEthernet0/0
- - members:
- - member: GigabitEthernet0/1
- mode: active
- name: Port-channel2
- - members:
- - member: GigabitEthernet0/2
- mode: active
- name: Port-channel40
-
-overridden:
- before:
- - name: GigabitEthernet0/0
- - members:
- - member: GigabitEthernet0/1
- mode: active
- - member: GigabitEthernet0/2
- mode: passive
- name: Port-channel1
-
- commands:
- - "interface GigabitEthernet0/1"
- - "no channel-group"
- - "interface GigabitEthernet0/2"
- - "channel-group 10 mode passive"
-
- after:
- - name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- - members:
- - member: GigabitEthernet0/2
- mode: passive
- name: Port-channel10
-
-deleted:
- before:
- - name: GigabitEthernet0/0
- - members:
- - member: GigabitEthernet0/1
- mode: active
- - member: GigabitEthernet0/2
- mode: passive
- name: Port-channel1
-
- commands:
- - "interface GigabitEthernet0/1"
- - "no channel-group"
- - "interface GigabitEthernet0/2"
- - "no channel-group"
-
- after:
- - name: GigabitEthernet0/0
- - name: GigabitEthernet0/1
- - name: GigabitEthernet0/2
diff --git a/test/integration/targets/ios_linkagg/defaults/main.yaml b/test/integration/targets/ios_linkagg/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/ios_linkagg/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/ios_linkagg/meta/main.yaml b/test/integration/targets/ios_linkagg/meta/main.yaml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_linkagg/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_linkagg/tasks/cli.yaml b/test/integration/targets/ios_linkagg/tasks/cli.yaml
deleted file mode 100644
index 6b93fd5400..0000000000
--- a/test/integration/targets/ios_linkagg/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_linkagg/tasks/main.yaml b/test/integration/targets/ios_linkagg/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_linkagg/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_linkagg/tests/cli/basic.yaml b/test/integration/targets/ios_linkagg/tests/cli/basic.yaml
deleted file mode 100644
index d873067ab4..0000000000
--- a/test/integration/targets/ios_linkagg/tests/cli/basic.yaml
+++ /dev/null
@@ -1,171 +0,0 @@
----
-- debug: msg="START cli/basic.yaml on connection={{ ansible_connection }}"
-
-- set_fact: switch_type="{{ switch_type }}"
-
-- block:
-
- - name: setup - remove config used in test(part1)
- ios_config:
- lines:
- - no interface port-channel 20
- provider: "{{ cli }}"
- ignore_errors: yes
-
- - name: setup - remove config used in test(part2)
- ios_config:
- lines:
- - no interface port-channel 5
- provider: "{{ cli }}"
- ignore_errors: yes
-
- - name: setup - remove config used in test(part3)
- ios_config:
- lines:
- - no channel-group 20 mode active
- provider: "{{ cli }}"
- parents: "{{ item }}"
- loop:
- - interface GigabitEthernet0/1
- - interface GigabitEthernet0/2
-
- - name: create linkagg
- ios_linkagg: &create
- group: 20
- state: present
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface port-channel 20' in result.commands"
-
- - name: create linkagg(Idempotence)
- ios_linkagg: *create
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: set link aggregation group to members
- ios_linkagg: &configure_member
- group: 20
- mode: active
- members:
- - GigabitEthernet0/1
- - GigabitEthernet0/2
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface GigabitEthernet0/1' in result.commands"
- - "'channel-group 20 mode active' in result.commands"
- - "'interface GigabitEthernet0/2' in result.commands"
- - "'channel-group 20 mode active' in result.commands"
-
- - name: set link aggregation group to members(Idempotence)
- ios_linkagg: *configure_member
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: remove link aggregation group from member
- ios_linkagg: &remove_member
- group: 20
- mode: active
- members:
- - GigabitEthernet0/2
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface GigabitEthernet0/1' in result.commands"
- - "'no channel-group 20 mode active' in result.commands"
-
- - name: remove link aggregation group from member(Idempotence)
- ios_linkagg: *remove_member
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: remove linkagg
- ios_linkagg: &remove
- group: 20
- state: absent
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'no interface port-channel 20' in result.commands"
-
- - name: remove linkagg(Idempotence)
- ios_linkagg: *remove
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: create aggregate of linkagg definitions
- ios_linkagg: &create_agg
- aggregate:
- - { group: 5 }
- - { group: 20, mode: active, members: ['GigabitEthernet0/1'] }
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface port-channel 5' in result.commands"
- - "'interface port-channel 20' in result.commands"
- - "'interface GigabitEthernet0/1' in result.commands"
- - "'channel-group 20 mode active' in result.commands"
-
- - name: create aggregate of linkagg definitions(Idempotence)
- ios_linkagg: *create_agg
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: teardown(part1)
- ios_config:
- lines:
- - no interface port-channel 20
- provider: "{{ cli }}"
- ignore_errors: yes
-
- - name: teardown(part2)
- ios_config:
- lines:
- - no interface port-channel 5
- provider: "{{ cli }}"
- ignore_errors: yes
-
- - name: teardown(part3)
- ios_config:
- lines:
- - no channel-group 20 mode active
- provider: "{{ cli }}"
- parents: "{{ item }}"
- loop:
- - interface GigabitEthernet0/1
- - interface GigabitEthernet0/2
-
- when: switch_type == 'L2'
-
-- debug: msg="END cli/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_lldp/defaults/main.yaml b/test/integration/targets/ios_lldp/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/ios_lldp/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/ios_lldp/meta/main.yaml b/test/integration/targets/ios_lldp/meta/main.yaml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_lldp/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_lldp/tasks/cli.yaml b/test/integration/targets/ios_lldp/tasks/cli.yaml
deleted file mode 100644
index 6b93fd5400..0000000000
--- a/test/integration/targets/ios_lldp/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_lldp/tasks/main.yaml b/test/integration/targets/ios_lldp/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_lldp/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_lldp/tests/cli/basic.yaml b/test/integration/targets/ios_lldp/tests/cli/basic.yaml
deleted file mode 100644
index a2119e1843..0000000000
--- a/test/integration/targets/ios_lldp/tests/cli/basic.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
----
-- debug: msg="START ios_lldp cli/basic.yaml on connection={{ ansible_connection }}"
-
-- name: Make sure LLDP is not running before tests
- ios_config:
- lines: no lldp run
- provider: "{{ cli }}"
-
-- name: Enable LLDP service
- ios_lldp:
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"lldp run" in result.commands'
-
-- name: Enable LLDP service again (idempotent)
- ios_lldp:
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: Disable LLDP service
- ios_lldp:
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"no lldp run" in result.commands'
-
-- name: Disable LLDP service (idempotent)
- ios_lldp:
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- debug: msg="END ios_lldp cli/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_lldp_global/aliases b/test/integration/targets/ios_lldp_global/aliases
deleted file mode 100644
index 6bb69158a7..0000000000
--- a/test/integration/targets/ios_lldp_global/aliases
+++ /dev/null
@@ -1 +0,0 @@
-shippable/ios/group1
diff --git a/test/integration/targets/ios_lldp_global/defaults/main.yaml b/test/integration/targets/ios_lldp_global/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/ios_lldp_global/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/ios_lldp_global/meta/main.yaml b/test/integration/targets/ios_lldp_global/meta/main.yaml
deleted file mode 100644
index 32cf5dda7e..0000000000
--- a/test/integration/targets/ios_lldp_global/meta/main.yaml
+++ /dev/null
@@ -1 +0,0 @@
-dependencies: []
diff --git a/test/integration/targets/ios_lldp_global/tasks/cli.yaml b/test/integration/targets/ios_lldp_global/tasks/cli.yaml
deleted file mode 100644
index 242420aa7f..0000000000
--- a/test/integration/targets/ios_lldp_global/tasks/cli.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- name: Collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- register: test_cases
- delegate_to: localhost
-
-- name: Set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- delegate_to: localhost
-
-- name: Run test case (connection=network_cli)
- include: "{{ test_case_to_run }}"
- vars:
- ansible_connection: network_cli
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_lldp_global/tasks/main.yaml b/test/integration/targets/ios_lldp_global/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_lldp_global/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_lldp_global/tests/cli/_populate_config.yaml b/test/integration/targets/ios_lldp_global/tests/cli/_populate_config.yaml
deleted file mode 100644
index 6bea3dcf21..0000000000
--- a/test/integration/targets/ios_lldp_global/tests/cli/_populate_config.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-- name: Populate Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- lldp holdtime 10
- lldp run
- lldp timer 100
- lldp reinit 3
diff --git a/test/integration/targets/ios_lldp_global/tests/cli/_remove_config.yaml b/test/integration/targets/ios_lldp_global/tests/cli/_remove_config.yaml
deleted file mode 100644
index 1098845c79..0000000000
--- a/test/integration/targets/ios_lldp_global/tests/cli/_remove_config.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-- name: Remove Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- no lldp holdtime
- no lldp run
- no lldp timer
- no lldp reinit
diff --git a/test/integration/targets/ios_lldp_global/tests/cli/deleted.yaml b/test/integration/targets/ios_lldp_global/tests/cli/deleted.yaml
deleted file mode 100644
index cc6e24dee9..0000000000
--- a/test/integration/targets/ios_lldp_global/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- debug:
- msg: "Start Deleted integration state for ios_lldp_global ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Delete configured Global LLDP
- ios_lldp_global: &deleted
- state: deleted
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ deleted['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ deleted['before'] == result['before'] }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ deleted['before'] == result['before'] }}"
-
- - name: Delete configured Global LLDP (IDEMPOTENT)
- ios_lldp_global: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lldp_global/tests/cli/empty_config.yaml b/test/integration/targets/ios_lldp_global/tests/cli/empty_config.yaml
deleted file mode 100644
index b8cc397152..0000000000
--- a/test/integration/targets/ios_lldp_global/tests/cli/empty_config.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
----
-- debug:
- msg: "START ios_lldp_global empty_config.yaml integration tests on connection={{ ansible_connection }}"
-
-- name: Merged with empty config should give appropriate error message
- ios_lldp_global:
- config:
- state: merged
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state merged'
-
-- name: Replaced with empty config should give appropriate error message
- ios_lldp_global:
- config:
- state: replaced
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state replaced'
diff --git a/test/integration/targets/ios_lldp_global/tests/cli/merged.yaml b/test/integration/targets/ios_lldp_global/tests/cli/merged.yaml
deleted file mode 100644
index 00757ecfac..0000000000
--- a/test/integration/targets/ios_lldp_global/tests/cli/merged.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
----
-- debug:
- msg: "START Merged ios_lldp_global state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- block:
- - name: Merge provided configuration Global LLDP
- ios_lldp_global: &merged
- config:
- holdtime: 10
- enabled: True
- reinit: 3
- timer: 20
- state: merged
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ merged['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ merged['before'] == result['before'] }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ merged['before'] == result['before'] }}"
-
- - name: Merge provided configuration Global LLDP (IDEMPOTENT)
- ios_lldp_global: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lldp_global/tests/cli/replaced.yaml b/test/integration/targets/ios_lldp_global/tests/cli/replaced.yaml
deleted file mode 100644
index 892b5dbc34..0000000000
--- a/test/integration/targets/ios_lldp_global/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
----
-- debug:
- msg: "START Replaced ios_lldp_global state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Replaces Global LLDP configuration with provided LLDP configuration
- ios_lldp_global: &replaced
- config:
- holdtime: 20
- reinit: 5
- state: replaced
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ replaced['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ replaced['before'] == result['before'] }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ replaced['before'] == result['before'] }}"
-
- - name: Replaces Global LLDP configuration with provided LLDP configuration (IDEMPOTENT)
- ios_lldp_global: *replaced
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lldp_global/vars/main.yaml b/test/integration/targets/ios_lldp_global/vars/main.yaml
deleted file mode 100644
index ed87644bf8..0000000000
--- a/test/integration/targets/ios_lldp_global/vars/main.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
----
-merged:
- before: {}
-
- commands:
- - "lldp holdtime 10"
- - "lldp run"
- - "lldp timer 20"
- - "lldp reinit 3"
-
- after:
- timer: 20
- holdtime: 10
- reinit: 3
- enabled: True
-
-replaced:
- before:
- timer: 100
- holdtime: 10
- reinit: 3
- enabled: True
-
- commands:
- - "no lldp run"
- - "no lldp timer"
- - "lldp holdtime 20"
- - "lldp reinit 5"
-
- after:
- holdtime: 10
- reinit: 3
-
-deleted:
- before:
- timer: 100
- holdtime: 10
- reinit: 3
- enabled: True
-
- commands:
- - "no lldp holdtime"
- - "no lldp run"
- - "no lldp timer"
- - "no lldp reinit"
-
- after: {}
diff --git a/test/integration/targets/ios_lldp_interfaces/defaults/main.yaml b/test/integration/targets/ios_lldp_interfaces/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/ios_lldp_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/ios_lldp_interfaces/tasks/cli.yaml b/test/integration/targets/ios_lldp_interfaces/tasks/cli.yaml
deleted file mode 100644
index 242420aa7f..0000000000
--- a/test/integration/targets/ios_lldp_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- name: Collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- register: test_cases
- delegate_to: localhost
-
-- name: Set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- delegate_to: localhost
-
-- name: Run test case (connection=network_cli)
- include: "{{ test_case_to_run }}"
- vars:
- ansible_connection: network_cli
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_lldp_interfaces/tasks/main.yaml b/test/integration/targets/ios_lldp_interfaces/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_lldp_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_lldp_interfaces/tests/cli/_enable_lldp.yaml b/test/integration/targets/ios_lldp_interfaces/tests/cli/_enable_lldp.yaml
deleted file mode 100644
index 19fb690cbb..0000000000
--- a/test/integration/targets/ios_lldp_interfaces/tests/cli/_enable_lldp.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-- name: Enable LLDP Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- lldp run
diff --git a/test/integration/targets/ios_lldp_interfaces/tests/cli/_populate_config.yaml b/test/integration/targets/ios_lldp_interfaces/tests/cli/_populate_config.yaml
deleted file mode 100644
index f3e97a3f8f..0000000000
--- a/test/integration/targets/ios_lldp_interfaces/tests/cli/_populate_config.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-- name: Populate Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- interface GigabitEthernet 0/0
- lldp receive
- lldp transmit
- interface GigabitEthernet 0/1
- lldp receive
- lldp transmit
- interface GigabitEthernet 0/2
- lldp receive
- lldp transmit
diff --git a/test/integration/targets/ios_lldp_interfaces/tests/cli/_remove_config.yaml b/test/integration/targets/ios_lldp_interfaces/tests/cli/_remove_config.yaml
deleted file mode 100644
index bf401c6a32..0000000000
--- a/test/integration/targets/ios_lldp_interfaces/tests/cli/_remove_config.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-- name: Remove Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- interface GigabitEthernet 0/0
- no lldp receive
- no lldp transmit
- interface GigabitEthernet 0/1
- no lldp receive
- no lldp transmit
- interface GigabitEthernet 0/2
- no lldp receive
- no lldp transmit
diff --git a/test/integration/targets/ios_lldp_interfaces/tests/cli/deleted.yaml b/test/integration/targets/ios_lldp_interfaces/tests/cli/deleted.yaml
deleted file mode 100644
index 46fadff52a..0000000000
--- a/test/integration/targets/ios_lldp_interfaces/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,42 +0,0 @@
----
-- debug:
- msg: "Start Deleted integration state for ios_lldp_interfaces ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _enable_lldp.yaml
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Delete LLDP attributes for respective configured interfaces
- ios_lldp_interfaces: &deleted
- state: deleted
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ deleted['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ deleted['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ deleted['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Delete LLDP attributes for respective configured interfaces (IDEMPOTENT)
- ios_lldp_interfaces: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/test/integration/targets/ios_lldp_interfaces/tests/cli/empty_config.yaml b/test/integration/targets/ios_lldp_interfaces/tests/cli/empty_config.yaml
deleted file mode 100644
index 61c66b0cca..0000000000
--- a/test/integration/targets/ios_lldp_interfaces/tests/cli/empty_config.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-- debug:
- msg: "START ios_lldp_interfaces empty_config.yaml integration tests on connection={{ ansible_connection }}"
-
-- name: Merged with empty config should give appropriate error message
- ios_lldp_interfaces:
- config:
- state: merged
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state merged'
-
-- name: Replaced with empty config should give appropriate error message
- ios_lldp_interfaces:
- config:
- state: replaced
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state replaced'
-
-- name: Overridden with empty config should give appropriate error message
- ios_lldp_interfaces:
- config:
- state: overridden
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state overridden'
diff --git a/test/integration/targets/ios_lldp_interfaces/tests/cli/merged.yaml b/test/integration/targets/ios_lldp_interfaces/tests/cli/merged.yaml
deleted file mode 100644
index 445026fa03..0000000000
--- a/test/integration/targets/ios_lldp_interfaces/tests/cli/merged.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
----
-- debug:
- msg: "START Merged ios_lldp_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _enable_lldp.yaml
-
-- include_tasks: _remove_config.yaml
-
-- block:
- - name: Merge the provided configuration with the exisiting running configuration
- ios_lldp_interfaces: &merged
- config:
- - name: GigabitEthernet0/0
- receive: True
- transmit: True
- - name: GigabitEthernet0/1
- receive: True
- transmit: True
- - name: GigabitEthernet0/2
- receive: True
- transmit: False
- state: merged
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ merged['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ merged['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ merged['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Merge the provided configuration with the exisiting running configuration (IDEMPOTENT)
- ios_lldp_interfaces: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lldp_interfaces/tests/cli/overridden.yaml b/test/integration/targets/ios_lldp_interfaces/tests/cli/overridden.yaml
deleted file mode 100644
index ad26ba0133..0000000000
--- a/test/integration/targets/ios_lldp_interfaces/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
----
-- debug:
- msg: "START Overridden ios_lldp_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _enable_lldp.yaml
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Override device configuration of all lldp_interfaces with provided configuration
- ios_lldp_interfaces: &overridden
- config:
- - name: GigabitEthernet0/0
- receive: True
- transmit: True
- - name: GigabitEthernet0/2
- receive: True
- state: overridden
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ overridden['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ overridden['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ overridden['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Override device configuration of all lldp_interfaces with provided configuration (IDEMPOTENT)
- ios_lldp_interfaces: *overridden
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lldp_interfaces/tests/cli/replaced.yaml b/test/integration/targets/ios_lldp_interfaces/tests/cli/replaced.yaml
deleted file mode 100644
index 687e8a017d..0000000000
--- a/test/integration/targets/ios_lldp_interfaces/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
----
-- debug:
- msg: "START Replaced ios_lldp_interfaces state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _enable_lldp.yaml
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Replaces device configuration of listed lldp_interfaces with provided configuration
- ios_lldp_interfaces: &replaced
- config:
- - name: GigabitEthernet0/1
- transmit: True
- - name: GigabitEthernet0/2
- receive: True
- transmit: False
- state: replaced
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ replaced['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ replaced['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ replaced['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Replaces device configuration of listed lldp_interfaces with provided configuration (IDEMPOTENT)
- ios_lldp_interfaces: *replaced
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lldp_interfaces/vars/main.yaml b/test/integration/targets/ios_lldp_interfaces/vars/main.yaml
deleted file mode 100644
index 1ba6ba5aee..0000000000
--- a/test/integration/targets/ios_lldp_interfaces/vars/main.yaml
+++ /dev/null
@@ -1,126 +0,0 @@
----
-merged:
- before:
- - name: GigabitEthernet0/0
- receive: False
- transmit: False
- - name: GigabitEthernet0/1
- receive: False
- transmit: False
- - name: GigabitEthernet0/2
- receive: False
- transmit: False
-
- commands:
- - "interface GigabitEthernet0/0"
- - "lldp receive"
- - "lldp transmit"
- - "interface GigabitEthernet0/1"
- - "lldp receive"
- - "lldp transmit"
- - "interface GigabitEthernet0/2"
- - "lldp receive"
-
- after:
- - name: GigabitEthernet0/0
- receive: True
- transmit: True
- - name: GigabitEthernet0/1
- receive: True
- transmit: True
- - name: GigabitEthernet0/2
- receive: True
- transmit: False
-
-replaced:
- before:
- - name: GigabitEthernet0/0
- receive: True
- transmit: True
- - name: GigabitEthernet0/1
- receive: True
- transmit: True
- - name: GigabitEthernet0/2
- receive: True
- transmit: True
-
- commands:
- - "interface GigabitEthernet0/1"
- - "no lldp receive"
- - "interface GigabitEthernet0/2"
- - "no lldp transmit"
-
- after:
- - name: GigabitEthernet0/0
- receive: True
- transmit: True
- - name: GigabitEthernet0/1
- receive: False
- transmit: True
- - name: GigabitEthernet0/2
- receive: True
- transmit: False
-
-overridden:
- before:
- - name: GigabitEthernet0/0
- receive: True
- transmit: True
- - name: GigabitEthernet0/1
- receive: True
- transmit: True
- - name: GigabitEthernet0/2
- receive: True
- transmit: True
-
- commands:
- - "interface GigabitEthernet0/1"
- - "no lldp receive"
- - "no lldp transmit"
- - "interface GigabitEthernet0/2"
- - "no lldp transmit"
-
- after:
- - name: GigabitEthernet0/0
- receive: True
- transmit: True
- - name: GigabitEthernet0/1
- receive: False
- transmit: False
- - name: GigabitEthernet0/2
- receive: True
- transmit: False
-
-deleted:
- before:
- - name: GigabitEthernet0/0
- receive: True
- transmit: True
- - name: GigabitEthernet0/1
- receive: True
- transmit: True
- - name: GigabitEthernet0/2
- receive: True
- transmit: True
-
- commands:
- - "interface GigabitEthernet0/0"
- - "no lldp receive"
- - "no lldp transmit"
- - "interface GigabitEthernet0/1"
- - "no lldp receive"
- - "no lldp transmit"
- - "interface GigabitEthernet0/2"
- - "no lldp receive"
- - "no lldp transmit"
-
- after:
- - name: GigabitEthernet0/0
- receive: False
- transmit: False
- - name: GigabitEthernet0/1
- receive: False
- transmit: False
- - name: GigabitEthernet0/2
- receive: False
- transmit: False
diff --git a/test/integration/targets/ios_logging/defaults/main.yaml b/test/integration/targets/ios_logging/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/ios_logging/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/ios_logging/meta/main.yaml b/test/integration/targets/ios_logging/meta/main.yaml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_logging/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_logging/tasks/cli.yaml b/test/integration/targets/ios_logging/tasks/cli.yaml
deleted file mode 100644
index 6b93fd5400..0000000000
--- a/test/integration/targets/ios_logging/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_logging/tasks/main.yaml b/test/integration/targets/ios_logging/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_logging/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_logging/tests/cli/basic.yaml b/test/integration/targets/ios_logging/tests/cli/basic.yaml
deleted file mode 100644
index fc63620418..0000000000
--- a/test/integration/targets/ios_logging/tests/cli/basic.yaml
+++ /dev/null
@@ -1,144 +0,0 @@
----
-# ensure logging configs are empty
-- name: Remove host logging
- ios_logging: &remove_host
- dest: host
- name: 172.16.0.1
- state: absent
- provider: "{{ cli }}"
-
-- name: Remove console
- ios_logging:
- dest: console
- level: warnings
- state: absent
- provider: "{{ cli }}"
-
-- name: Remove buffer
- ios_logging:
- dest: buffered
- size: 8000
- provider: "{{ cli }}"
- state: absent
-
-# start tests
-- name: Set up host logging
- ios_logging:
- dest: host
- name: 172.16.0.1
- facility: local7
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging host 172.16.0.1" in result.commands'
- - '"logging facility local7" in result.commands'
-
-- name: Set up host logging again (idempotent)
- ios_logging:
- dest: host
- name: 172.16.0.1
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert: &unchanged
- that:
- - 'result.changed == false'
-
-- name: Delete/disable host logging
- ios_logging: *remove_host
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"no logging host 172.16.0.1" in result.commands'
-
-- name: Delete/disable host logging (idempotent)
- ios_logging: *remove_host
- register: result
-
-- assert: *unchanged
-
-- name: Console logging with level warnings
- ios_logging:
- dest: console
- level: warnings
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging console warnings" in result.commands'
-
-- name: Configure Buffer size
- ios_logging:
- dest: buffered
- size: 8000
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging buffered 8000" in result.commands'
-
-
-- name: Change logging parameters using aggregate
- ios_logging:
- aggregate:
- - { dest: console, level: notifications }
- - { dest: buffered, size: 9000 }
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging buffered 9000" in result.commands'
- - '"logging console notifications" in result.commands'
-
-- name: Set both logging destination and facility
- ios_logging: &set_both
- dest: buffered
- facility: uucp
- level: alerts
- size: 4096
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging buffered 4096 alerts" in result.commands'
- - '"logging facility uucp" in result.commands'
-
-- name: Set both logging destination and facility (idempotent)
- ios_logging: *set_both
- register: result
-
-- assert: *unchanged
-
-- name: remove logging as collection tearDown
- ios_logging:
- aggregate:
- - { dest: console, level: notifications }
- - { dest: buffered, size: 4096, level: alerts }
- - { facility: uucp }
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"no logging console" in result.commands'
- - '"no logging buffered" in result.commands'
- - '"no logging facility uucp" in result.commands'
diff --git a/test/integration/targets/ios_logging/tests/cli/net_logging.yaml b/test/integration/targets/ios_logging/tests/cli/net_logging.yaml
deleted file mode 100644
index 154336bdb4..0000000000
--- a/test/integration/targets/ios_logging/tests/cli/net_logging.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-- debug: msg="START ios cli/net_logging.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: Remove host logging - setup
- net_logging:
- dest: host
- name: 172.16.0.1
- state: absent
- provider: "{{ cli }}"
-
-- name: Set up host logging using platform agnostic module
- net_logging:
- dest: host
- name: 172.16.0.1
- facility: local7
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging host 172.16.0.1" in result.commands'
- - '"logging facility local7" in result.commands'
-
-- name: Remove host logging - teardown
- net_logging:
- dest: host
- name: 172.16.0.1
- state: absent
- provider: "{{ cli }}"
-
-- debug: msg="END ios cli/net_logging.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_ntp/defaults/main.yaml b/test/integration/targets/ios_ntp/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/ios_ntp/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/ios_ntp/meta/main.yml b/test/integration/targets/ios_ntp/meta/main.yml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_ntp/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_ntp/tasks/cli.yaml b/test/integration/targets/ios_ntp/tasks/cli.yaml
deleted file mode 100644
index 6b93fd5400..0000000000
--- a/test/integration/targets/ios_ntp/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_ntp/tasks/main.yaml b/test/integration/targets/ios_ntp/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_ntp/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_ntp/tests/cli/ntp_configuration.yaml b/test/integration/targets/ios_ntp/tests/cli/ntp_configuration.yaml
deleted file mode 100644
index 67a9d7b4f2..0000000000
--- a/test/integration/targets/ios_ntp/tests/cli/ntp_configuration.yaml
+++ /dev/null
@@ -1,106 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} ios_ntp sanity test"
-
-- name: remove NTP (if set)
- ios_ntp: &remove
- server: 10.75.32.5
- source_int: "{{ test_interface }}"
- acl: NTP_ACL
- logging: true
- key_id: 10
- auth_key: 15435A030726242723273C21181319000A
- auth: true
- state: absent
- provider: "{{ cli }}"
- ignore_errors: true
-
-- block:
-
- - name: configure NTP
- ios_ntp: &config
- server: 10.75.32.5
- source_int: "{{ test_interface }}"
- state: present
- provider: "{{ cli }}"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: idempotence check
- ios_ntp: *config
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: load acl NTP_ACL into device
- ios_config:
- lines:
- - 10 permit ip host 192.0.2.1 any log
- parents: ip access-list extended NTP_ACL
- provider: "{{ cli }}"
- register: result
-
- - assert: *true
-
- - name: configure NTP
- ios_ntp: &config1
- acl: NTP_ACL
- logging: true
- state: present
- provider: "{{ cli }}"
- register: result
-
- - assert: *true
-
- - name: idempotence check
- ios_ntp: *config1
- register: result
-
- - assert: *false
-
- - name: configure NTP with diffferen values
- ios_ntp: &config2
- key_id: 10
- auth_key: 15435A030726242723273C21181319000A
- auth: true
- state: present
- provider: "{{ cli }}"
- register: result
-
- - assert: *true
-
- - name: idempotence check
- ios_ntp: *config2
- register: result
-
- - assert: *false
-
- - name: remove part of config
- ios_ntp: &config3
- acl: NTP_ACL
- logging: true
- state: absent
- provider: "{{ cli }}"
- register: result
-
- - assert: *true
-
- - name: idempotence check
- ios_ntp: *config3
- register: result
-
- - assert: *false
-
- always:
- - name: Remove ntp config
- ios_ntp: *remove
-
- - name: remove NTP_ACL from device
- ios_config:
- lines:
- - no ip access-list extended NTP_ACL
- provider: "{{ cli }}"
diff --git a/test/integration/targets/ios_ping/defaults/main.yaml b/test/integration/targets/ios_ping/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/ios_ping/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/ios_ping/meta/main.yaml b/test/integration/targets/ios_ping/meta/main.yaml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_ping/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_ping/tasks/cli.yaml b/test/integration/targets/ios_ping/tasks/cli.yaml
deleted file mode 100644
index 6b93fd5400..0000000000
--- a/test/integration/targets/ios_ping/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_ping/tasks/main.yaml b/test/integration/targets/ios_ping/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_ping/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_ping/tests/cli/ping.yaml b/test/integration/targets/ios_ping/tests/cli/ping.yaml
deleted file mode 100644
index 3b6c96ce81..0000000000
--- a/test/integration/targets/ios_ping/tests/cli/ping.yaml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-- debug: msg="START cli/ping.yaml on connection={{ ansible_connection }}"
-
-- ios_command:
- commands: show version
- provider: "{{ cli }}"
- register: show_version_result
-
-- set_fact: management_interface=GigabitEthernet0/0
- when: "'Cisco IOS' in show_version_result.stdout[0]"
-
-- set_fact: management_interface=GigabitEthernet1
- when: "'Cisco IOS-XE' in show_version_result.stdout[0]"
-
-- name: Get show ip management nterface output
- ios_command:
- commands:
- - "show ip interface {{ management_interface }} | include Internet address"
- provider: "{{ cli }}"
- register: show_ip_interface_result
-
-- name: Extract the IP address from registered output
- set_fact: management_ip="{{ show_ip_interface_result.stdout[0].split()[-1].split('/')[0] }}"
-
-- name: expected successful ping
- ios_ping: &valid_ip
- dest: '{{ management_ip }}'
- provider: "{{ cli }}"
- register: esp
-
-- name: unexpected unsuccessful ping
- ios_ping: &invalid_ip
- dest: '10.255.255.250'
- provider: "{{ cli }}"
- register: uup
- ignore_errors: yes
-
-- name: unexpected successful ping
- ios_ping:
- <<: *valid_ip
- state: 'absent'
- register: usp
- ignore_errors: yes
-
-- name: expected unsuccessful ping
- ios_ping:
- <<: *invalid_ip
- state: 'absent'
- register: eup
-
-- name: assert
- assert:
- that:
- - esp.failed == eup.failed == false
- - usp.failed == uup.failed == true
diff --git a/test/integration/targets/ios_smoke/defaults/main.yaml b/test/integration/targets/ios_smoke/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/ios_smoke/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/ios_smoke/meta/main.yaml b/test/integration/targets/ios_smoke/meta/main.yaml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_smoke/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_smoke/tasks/cli.yaml b/test/integration/targets/ios_smoke/tasks/cli.yaml
deleted file mode 100644
index d696cc518d..0000000000
--- a/test/integration/targets/ios_smoke/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_smoke/tasks/main.yaml b/test/integration/targets/ios_smoke/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_smoke/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_smoke/templates/defaults/config.j2 b/test/integration/targets/ios_smoke/templates/defaults/config.j2
deleted file mode 100644
index 1d4d9da8d4..0000000000
--- a/test/integration/targets/ios_smoke/templates/defaults/config.j2
+++ /dev/null
@@ -1,4 +0,0 @@
-interface Loopback999
- description this is a test
- no shutdown
-
diff --git a/test/integration/targets/ios_smoke/tests/cli/common_config.yaml b/test/integration/targets/ios_smoke/tests/cli/common_config.yaml
deleted file mode 100644
index 1870ee0e29..0000000000
--- a/test/integration/targets/ios_smoke/tests/cli/common_config.yaml
+++ /dev/null
@@ -1,212 +0,0 @@
-# ios_linkagg -> CustomNetworkConfig
-# ios_config -> dumps, NetworkConfig
-
-- debug: msg="START cli/common_config.yaml on connection={{ ansible_connection }}"
-
-# Hit NetworkConfig
-- name: set hostname
- ios_config:
- lines: ['hostname ios-smoke']
- match: none
- provider: "{{ cli }}"
-
-- name: hit diff_ignore_lines
- ios_config:
- lines: ['hostname ios-smoke-diff']
- diff_ignore_lines:
- - hostname ios-smoke
- save_when: modified
- provider: "{{ cli }}"
-
-- name: return hostname
- ios_config:
- lines: ['hostname {{ shorter_hostname }}']
- match: none
- provider: "{{ cli }}"
-
-- name: hit items with parents
- ios_config:
- lines: ['permit ip any any log']
- parents: ['ip access-list extended test']
- provider: "{{ cli }}"
- match: exact
- register: result
-
-- name: teardown
- ios_config:
- lines:
- - 'no ip access-list extended test'
- match: none
- provider: "{{ cli }}"
-
-- name: setup test NetworkConfig.difference, replace=block
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- parents: ['ip access-list extended test']
- before: ['no ip access-list extended test']
- after: ['exit']
- provider: "{{ cli }}"
- match: none
-
-- name: test NetworkConfig.difference, replace=block
- ios_config:
- lines:
- - permit ip host 192.0.2.1 any log
- - permit ip host 192.0.2.2 any log
- - permit ip host 192.0.2.3 any log
- - permit ip host 192.0.2.4 any log
- parents: ['ip access-list extended test']
- replace: block
- after: ['exit']
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list extended test' in result.updates"
- - "'permit ip host 192.0.2.1 any log' in result.updates"
- - "'permit ip host 192.0.2.2 any log' in result.updates"
- - "'permit ip host 192.0.2.3 any log' in result.updates"
- - "'permit ip host 192.0.2.4 any log' in result.updates"
-
-- name: teardown- NetworkConfig.difference, replace=block
- ios_config:
- lines:
- - no ip access-list extended test
- match: none
- provider: "{{ cli }}"
-
-# CustomNetworkConfig
-# currently gets skipped because switch_type != 'L2'
-- set_fact: switch_type="{{ switch_type }}"
-
-- block:
-
- - name: setup - remove config used in test(part1)
- ios_config:
- lines:
- - no interface port-channel 20
- provider: "{{ cli }}"
- ignore_errors: yes
-
- - name: setup - remove config used in test(part2)
- ios_config:
- lines:
- - no interface port-channel 5
- provider: "{{ cli }}"
- ignore_errors: yes
-
- - name: setup - remove config used in test(part3)
- ios_config:
- lines:
- - no channel-group 20 mode active
- provider: "{{ cli }}"
- parents: "{{ item }}"
- loop:
- - interface GigabitEthernet0/1
- - interface GigabitEthernet0/2
-
- - name: create linkagg
- ios_linkagg: &create
- group: 20
- state: present
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface port-channel 20' in result.commands"
-
- - name: set link aggregation group to members
- ios_linkagg: &configure_member
- group: 20
- mode: active
- members:
- - GigabitEthernet0/1
- - GigabitEthernet0/2
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface GigabitEthernet0/1' in result.commands"
- - "'channel-group 20 mode active' in result.commands"
- - "'interface GigabitEthernet0/2' in result.commands"
- - "'channel-group 20 mode active' in result.commands"
-
- - name: remove link aggregation group from member
- ios_linkagg: &remove_member
- group: 20
- mode: active
- members:
- - GigabitEthernet0/2
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface GigabitEthernet0/1' in result.commands"
- - "'no channel-group 20 mode active' in result.commands"
-
- - name: remove linkagg
- ios_linkagg: &remove
- group: 20
- state: absent
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'no interface port-channel 20' in result.commands"
-
- - name: create aggregate of linkagg definitions
- ios_linkagg: &create_agg
- aggregate:
- - { group: 5 }
- - { group: 20, mode: active, members: ['GigabitEthernet0/1'] }
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface port-channel 5' in result.commands"
- - "'interface port-channel 20' in result.commands"
- - "'interface GigabitEthernet0/1' in result.commands"
- - "'channel-group 20 mode active' in result.commands"
-
- - name: teardown(part1)
- ios_config:
- lines:
- - no interface port-channel 20
- provider: "{{ cli }}"
- ignore_errors: yes
-
- - name: teardown(part2)
- ios_config:
- lines:
- - no interface port-channel 5
- provider: "{{ cli }}"
- ignore_errors: yes
-
- - name: teardown(part3)
- ios_config:
- lines:
- - no channel-group 20 mode active
- provider: "{{ cli }}"
- parents: "{{ item }}"
- loop:
- - interface GigabitEthernet0/1
- - interface GigabitEthernet0/2
-
- when: switch_type == 'L2'
-
-- debug: msg="END cli/common_config.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_smoke/tests/cli/common_utils.yaml b/test/integration/targets/ios_smoke/tests/cli/common_utils.yaml
deleted file mode 100644
index 6b1f6b4e9d..0000000000
--- a/test/integration/targets/ios_smoke/tests/cli/common_utils.yaml
+++ /dev/null
@@ -1,152 +0,0 @@
----
-# ios_command -> ComplexList
-# ios_interface -> conditional, remove_default_spec
-# ios_logging -> validate_ip_address
-# ios_l3_interface -> is_netmask, is_masklen, to_subnet, to_netmask, to_masklen
-
-#ComplexList already covered
-
-- debug: msg="START ios_smoke cli/common_utils.yaml on connection={{ ansible_connection }}"
-
-# hit is_netmask(), is_masklen(), to_netmask(), to_masklen()
-- name: Delete interface ipv4 and ipv6 address(setup)
- ios_l3_interface:
- name: "{{ test_interface }}"
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- name: Setup - Ensure interfaces are switchport
- ios_config:
- lines:
- - no shutdown
- parents:
- - "interface {{ item }}"
- provider: "{{ cli }}"
- loop:
- - "{{ test_interface }}"
- - "{{ test_interface2 }}"
-
-- name: Configure interface ipv4 address
- ios_l3_interface:
- name: "{{ test_interface }}"
- ipv4: 192.168.20.1/24
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"ip address 192.168.20.1 255.255.255.0" in result.commands'
-
-- name: test invalid subnet
- ios_l3_interface:
- name: "{{ test_interface }}"
- ipv4: 192.168.20.1/45
- state: present
- provider: "{{ cli }}"
- register: result
- ignore_errors: yes
-
-- debug: var=result
-
-- assert:
- that:
- - 'result.failed == true'
-
-- name: Change ipv4 and ipv6 address using aggregate
- ios_l3_interface:
- aggregate:
- - { name: "{{ test_interface }}", ipv4: 193.167.1.1/8, ipv6: "fd5a:12c9:2201:4::4/32" }
- - { name: "{{ test_interface2 }}", ipv4: 192.169.2.2/24, ipv6: "fd5b:12c9:2201:5::5/90" }
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ test_interface }}" in result.commands'
- - '"ip address 193.167.1.1 255.0.0.0" in result.commands'
- - '"ipv6 address fd5a:12c9:2201:4::4/32" in result.commands'
- - '"interface {{ test_interface2 }}" in result.commands'
- - '"ip address 192.169.2.2 255.255.255.0" in result.commands'
- - '"ipv6 address fd5b:12c9:2201:5::5/90" in result.commands'
-
-- name: Delete ipv4 and ipv6 address using aggregate
- ios_l3_interface:
- aggregate:
- - { name: "{{ test_interface }}" }
- - { name: "{{ test_interface2 }}" }
- state: absent
- provider: "{{ cli }}"
- register: result
-
-# hit validate_ip_address()
-- name: Remove host logging - setup
- net_logging:
- dest: host
- name: 172.16.0.1
- state: absent
- provider: "{{ cli }}"
-
-- name: Remove host logging - teardown
- net_logging:
- dest: host
- name: 172.16.0.1
- state: absent
- provider: "{{ cli }}"
-
-# hit conditional(), remove_default_spec()
-- name: Check intent arguments
- ios_interface:
- name: "{{ test_interface }}"
- state: up
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - "result.failed == false"
-
-- name: Check intent arguments (failed condition)
- ios_interface:
- name: "{{ test_interface }}"
- state: down
- provider: "{{ cli }}"
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result.failed == true"
- - "'state eq(down)' in result.failed_conditions"
-
-- name: Config + intent
- ios_interface:
- name: "{{ test_interface }}"
- enabled: False
- state: down
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - "result.failed == false"
-
-- name: Config + intent (fail)
- ios_interface:
- name: "{{ test_interface }}"
- enabled: False
- provider: "{{ cli }}"
- state: up
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result.failed == true"
- - "'state eq(up)' in result.failed_conditions"
-
-- debug: msg="END ios_smoke cli/common_utils.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_smoke/tests/cli/misc_tests.yaml b/test/integration/targets/ios_smoke/tests/cli/misc_tests.yaml
deleted file mode 100644
index dfe513eac4..0000000000
--- a/test/integration/targets/ios_smoke/tests/cli/misc_tests.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- debug: msg="START ios_smoke cli/misc_tests.yaml on connection={{ ansible_connection }}"
-
-# hit network.ios.ios- get_defaults_flag()
-- name: setup
- ios_config:
- commands:
- - no description
- - shutdown
- parents:
- - interface Loopback999
- match: none
- provider: "{{ cli }}"
-
-- name: configure device with defaults included
- ios_config:
- src: defaults/config.j2
- defaults: yes
- provider: "{{ cli }}"
- register: result
-
-- name: run ios commands to test command_timeout
- ios_command:
- commands:
- - show running-config all
- - show interfaces
- - show running-config all
- vars:
- ansible_command_timeout: 1
- ansible_buffer_read_timeout: 2
- ignore_errors: True
- register: result
- when: ansible_connection == 'network_cli'
-
-- assert:
- that:
- - 'result.failed == true'
- - "'timeout value 1 seconds reached' in result.msg"
- when: ansible_connection == 'network_cli'
-
-- debug: msg="END ios_smoke cli/misc_tests.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_smoke/tests/cli/reboot.yaml b/test/integration/targets/ios_smoke/tests/cli/reboot.yaml
deleted file mode 100644
index 6f9a77b255..0000000000
--- a/test/integration/targets/ios_smoke/tests/cli/reboot.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-- block:
- - cli_command:
- command: reload
- prompt:
- - "yes/no"
- - "confirm"
- answer:
- - "no"
- - "y"
- check_all: yes
-
- - wait_for_connection:
- delay: 20
- sleep: 10
-
- - cli_command:
- command: show version
- when: ansible_connection.endswith("network_cli")
diff --git a/test/integration/targets/ios_static_route/defaults/main.yaml b/test/integration/targets/ios_static_route/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/ios_static_route/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/ios_static_route/meta/main.yaml b/test/integration/targets/ios_static_route/meta/main.yaml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_static_route/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_static_route/tasks/cli.yaml b/test/integration/targets/ios_static_route/tasks/cli.yaml
deleted file mode 100644
index 6b93fd5400..0000000000
--- a/test/integration/targets/ios_static_route/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_static_route/tasks/main.yaml b/test/integration/targets/ios_static_route/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_static_route/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_static_route/tests/cli/basic.yaml b/test/integration/targets/ios_static_route/tests/cli/basic.yaml
deleted file mode 100644
index c58a0e3408..0000000000
--- a/test/integration/targets/ios_static_route/tests/cli/basic.yaml
+++ /dev/null
@@ -1,144 +0,0 @@
----
-- debug: msg="START ios cli/ios_static_route.yaml on connection={{ ansible_connection }}"
-
-- name: Clear all static routes
- ios_static_route: &delete_all
- aggregate:
- - { prefix: 172.16.31.0 }
- - { prefix: 172.16.32.0 }
- - { prefix: 172.16.33.0 }
- - { prefix: 172.16.34.0 }
- mask: 255.255.255.0
- next_hop: 10.0.0.8
- state: absent
- provider: "{{ cli }}"
-
-- name: create static route
- ios_static_route:
- prefix: 172.16.31.0
- mask: 255.255.255.0
- next_hop: 10.0.0.8
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - 'result.commands == ["ip route 172.16.31.0 255.255.255.0 10.0.0.8"]'
-
-- name: Verify idempotence with default admin_distance
- ios_static_route:
- prefix: 172.16.31.0
- mask: 255.255.255.0
- next_hop: 10.0.0.8
- admin_distance: 1
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: modify admin distance of static route
- ios_static_route: &admin2
- prefix: 172.16.31.0
- mask: 255.255.255.0
- next_hop: 10.0.0.8
- admin_distance: 2
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - 'result.commands == ["ip route 172.16.31.0 255.255.255.0 10.0.0.8 2"]'
-
-- name: modify admin distance of static route again (idempotent)
- ios_static_route: *admin2
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: Verify idempotence with unspecified admin_distance
- ios_static_route:
- prefix: 172.16.31.0
- mask: 255.255.255.0
- next_hop: 10.0.0.8
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: delete static route
- ios_static_route: &delete
- prefix: 172.16.31.0
- mask: 255.255.255.0
- next_hop: 10.0.0.8
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - 'result.commands == ["no ip route 172.16.31.0 255.255.255.0 10.0.0.8"]'
-
-- name: delete static route again (idempotent)
- ios_static_route: *delete
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: Add static route aggregates
- ios_static_route:
- aggregate:
- - { prefix: 172.16.32.0 }
- - { prefix: 172.16.33.0 }
- mask: 255.255.255.0
- next_hop: 10.0.0.8
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - 'result.commands == ["ip route 172.16.32.0 255.255.255.0 10.0.0.8", "ip route 172.16.33.0 255.255.255.0 10.0.0.8"]'
-
-- name: Add and remove static route aggregates with overrides
- ios_static_route:
- aggregate:
- - { prefix: 172.16.32.0 }
- - { prefix: 172.16.33.0, state: absent }
- - { prefix: 172.16.34.0 }
- mask: 255.255.255.0
- next_hop: 10.0.0.8
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - 'result.commands == ["no ip route 172.16.33.0 255.255.255.0 10.0.0.8", "ip route 172.16.34.0 255.255.255.0 10.0.0.8"]'
-
-- name: Remove static route aggregates
- ios_static_route: *delete_all
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - 'result.commands == ["no ip route 172.16.32.0 255.255.255.0 10.0.0.8", "no ip route 172.16.34.0 255.255.255.0 10.0.0.8"]'
-
-- debug: msg="END ios cli/ios_static_route.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_static_route/tests/cli/net_static_route.yaml b/test/integration/targets/ios_static_route/tests/cli/net_static_route.yaml
deleted file mode 100644
index 3e7c99d4c6..0000000000
--- a/test/integration/targets/ios_static_route/tests/cli/net_static_route.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- debug: msg="START ios cli/net_static_route.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: delete static route - setup
- net_static_route: &delete
- prefix: 172.16.31.0
- mask: 255.255.255.0
- next_hop: 10.0.0.8
- state: absent
- provider: "{{ cli }}"
-
-- name: create static route using platform agnostic module
- net_static_route:
- prefix: 172.16.31.0
- mask: 255.255.255.0
- next_hop: 10.0.0.8
- admin_distance: 1
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - 'result.commands == ["ip route 172.16.31.0 255.255.255.0 10.0.0.8 1"]'
-
-- name: delete static route - teardown
- net_static_route: *delete
-
-- debug: msg="END ios cli/net_static_route.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_static_routes/defaults/main.yaml b/test/integration/targets/ios_static_routes/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/ios_static_routes/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/ios_static_routes/meta/main.yaml b/test/integration/targets/ios_static_routes/meta/main.yaml
deleted file mode 100644
index 32cf5dda7e..0000000000
--- a/test/integration/targets/ios_static_routes/meta/main.yaml
+++ /dev/null
@@ -1 +0,0 @@
-dependencies: []
diff --git a/test/integration/targets/ios_static_routes/tasks/cli.yaml b/test/integration/targets/ios_static_routes/tasks/cli.yaml
deleted file mode 100644
index 337e34133b..0000000000
--- a/test/integration/targets/ios_static_routes/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: Collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- register: test_cases
- delegate_to: localhost
-
-- name: Set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- delegate_to: localhost
-
-- name: Run test case (connection=network_cli)
- include: "{{ test_case_to_run }}"
- vars:
- ansible_connection: network_cli
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/ios_static_routes/tasks/main.yaml b/test/integration/targets/ios_static_routes/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_static_routes/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_static_routes/tests/cli/_intial_setup_config.yaml b/test/integration/targets/ios_static_routes/tests/cli/_intial_setup_config.yaml
deleted file mode 100644
index a6b390ad04..0000000000
--- a/test/integration/targets/ios_static_routes/tests/cli/_intial_setup_config.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-- name: Intitial Setup Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- vrf definition ansible_temp_vrf
- address-family ipv4
- ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 tag 50 name test_vrf track 150
- ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
- ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
- ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 tag 40 name route_1 multicast
- ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 tag 105 name test_v6
diff --git a/test/integration/targets/ios_static_routes/tests/cli/_populate_config.yaml b/test/integration/targets/ios_static_routes/tests/cli/_populate_config.yaml
deleted file mode 100644
index e6275cc7e2..0000000000
--- a/test/integration/targets/ios_static_routes/tests/cli/_populate_config.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-- name: Populate Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 tag 50 name test_vrf track 150
- ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
- ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
- ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 tag 40 name route_1 multicast
- ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 tag 105 name test_v6
diff --git a/test/integration/targets/ios_static_routes/tests/cli/_remove_config.yaml b/test/integration/targets/ios_static_routes/tests/cli/_remove_config.yaml
deleted file mode 100644
index acfd6cc8e5..0000000000
--- a/test/integration/targets/ios_static_routes/tests/cli/_remove_config.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-- name: Remove Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 tag 50 name test_vrf track 150
- no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
- no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
- no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 tag 40 name route_1 multicast
- no ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 tag 105 name test_v6
- no vrf definition ansible_temp_vrf
diff --git a/test/integration/targets/ios_static_routes/tests/cli/deleted.yaml b/test/integration/targets/ios_static_routes/tests/cli/deleted.yaml
deleted file mode 100644
index 2d3967b129..0000000000
--- a/test/integration/targets/ios_static_routes/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-- debug:
- msg: "Start Deleted integration state for ios_static_routes ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _intial_setup_config.yaml
-
-- block:
- - name: Delete attributes of provided configured interfaces
- ios_static_routes: &deleted
- config:
- - vrf: ansible_temp_vrf
- address_families:
- - afi: ipv4
- routes:
- - dest: 192.0.2.0/24
- next_hops:
- - forward_router_address: 192.0.2.1
- name: test_vrf
- tag: 50
- track: 150
- - address_families:
- - afi: ipv4
- routes:
- - dest: 198.51.100.0/24
- next_hops:
- - forward_router_address: 198.51.101.1
- name: route_1
- distance_metric: 110
- tag: 40
- multicast: True
- - forward_router_address: 198.51.101.2
- name: route_2
- distance_metric: 30
- - forward_router_address: 198.51.101.3
- name: route_3
- - afi: ipv6
- routes:
- - dest: 2001:DB8:0:3::/64
- next_hops:
- - forward_router_address: 2001:DB8:0:3::2
- name: test_v6
- tag: 105
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.commands|length == 5"
- - "result.changed == true"
- - "result.commands|symmetric_difference(deleted.commands) == []"
-
- - name: Delete attributes of all configured interfaces (IDEMPOTENT)
- ios_static_routes: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.commands|length == 0"
- - "result.changed == false"
-
- always:
- - include_tasks: _populate_config.yaml
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_static_routes/tests/cli/empty_config.yaml b/test/integration/targets/ios_static_routes/tests/cli/empty_config.yaml
deleted file mode 100644
index 0cf39e734a..0000000000
--- a/test/integration/targets/ios_static_routes/tests/cli/empty_config.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-- debug:
- msg: "START ios_static_routes empty_config.yaml integration tests on connection={{ ansible_connection }}"
-
-- name: Merged with empty config should give appropriate error message
- ios_static_routes:
- config:
- state: merged
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state merged'
-
-- name: Replaced with empty config should give appropriate error message
- ios_static_routes:
- config:
- state: replaced
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state replaced'
-
-- name: Overridden with empty config should give appropriate error message
- ios_static_routes:
- config:
- state: overridden
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state overridden'
-
-- name: Rendered with empty config should give appropriate error message
- ios_static_routes:
- config:
- state: rendered
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state rendered'
-
-- name: Parsed with empty config should give appropriate error message
- ios_static_routes:
- running_config:
- state: parsed
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of running_config parameter must not be empty for state parsed'
diff --git a/test/integration/targets/ios_static_routes/tests/cli/gathered.yaml b/test/integration/targets/ios_static_routes/tests/cli/gathered.yaml
deleted file mode 100644
index 4377f544d0..0000000000
--- a/test/integration/targets/ios_static_routes/tests/cli/gathered.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- debug:
- msg: "START ios_static_routes gathered integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _intial_setup_config.yaml
-
-- block:
- - name: Gather the provided configuration with the exisiting running configuration
- ios_static_routes: &gathered
- config:
- state: gathered
- register: result
-
- - name: Assert that gathered dicts was correctly generated
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/test/integration/targets/ios_static_routes/tests/cli/merged.yaml b/test/integration/targets/ios_static_routes/tests/cli/merged.yaml
deleted file mode 100644
index 26825412ca..0000000000
--- a/test/integration/targets/ios_static_routes/tests/cli/merged.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-- debug:
- msg: "START Merged ios_static_routes state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _intial_setup_config.yaml
-
-- block:
- - name: Merge provided configuration with device configuration
- ios_static_routes: &merged
- config:
- - vrf: ansible_temp_vrf
- address_families:
- - afi: ipv4
- routes:
- - dest: 192.0.2.0/24
- next_hops:
- - forward_router_address: 192.0.2.1
- name: merged_vrf
- tag: 50
- track: 150
- - address_families:
- - afi: ipv4
- routes:
- - dest: 198.51.100.0/24
- next_hops:
- - forward_router_address: 198.51.101.1
- name: merged_route_1
- distance_metric: 110
- tag: 40
- multicast: True
- - forward_router_address: 198.51.101.2
- name: merged_route_2
- distance_metric: 30
- - forward_router_address: 198.51.101.3
- name: merged_route_3
- - afi: ipv6
- routes:
- - dest: 2001:DB8:0:3::/64
- next_hops:
- - forward_router_address: 2001:DB8:0:3::2
- name: merged_v6
- tag: 105
- state: merged
- register: result
-
- - assert:
- that:
- - "result.commands|length == 5"
- - "result.changed == true"
- - "result.commands|symmetric_difference(merged.commands) == []"
-
- - name: Merge provided configuration with device configuration (IDEMPOTENT)
- ios_static_routes: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.commands|length == 0"
- - "result['changed'] == false"
-
- always:
- - include_tasks: _populate_config.yaml
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_static_routes/tests/cli/overridden.yaml b/test/integration/targets/ios_static_routes/tests/cli/overridden.yaml
deleted file mode 100644
index 02b6acb6a8..0000000000
--- a/test/integration/targets/ios_static_routes/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-- debug:
- msg: "START Overridden ios_static_routes state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _intial_setup_config.yaml
-
-- block:
- - name: Override device configuration of all interfaces with provided configuration
- ios_static_routes: &overridden
- config:
- - vrf: ansible_temp_vrf
- address_families:
- - afi: ipv4
- routes:
- - dest: 192.0.2.0/24
- next_hops:
- - forward_router_address: 192.0.2.1
- name: override_vrf
- tag: 50
- track: 150
- - address_families:
- - afi: ipv4
- routes:
- - dest: 198.51.100.0/24
- next_hops:
- - forward_router_address: 198.51.101.3
- name: override_route
- - afi: ipv6
- routes:
- - dest: 2001:DB8:0:3::/64
- next_hops:
- - forward_router_address: 2001:DB8:0:3::2
- name: override_v6
- tag: 175
- state: overridden
- register: result
-
- - assert:
- that:
- - "result.commands|length == 8"
- - "result.changed == true"
- - "result.commands|symmetric_difference(overridden.commands) == []"
-
- - name: Override device configuration of all interfaces with provided configuration (IDEMPOTENT)
- ios_static_routes: *overridden
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result.commands|length == 0"
- - "result['changed'] == false"
-
- always:
- - include_tasks: _populate_config.yaml
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_static_routes/tests/cli/rendered.yaml b/test/integration/targets/ios_static_routes/tests/cli/rendered.yaml
deleted file mode 100644
index 9805efebaf..0000000000
--- a/test/integration/targets/ios_static_routes/tests/cli/rendered.yaml
+++ /dev/null
@@ -1,54 +0,0 @@
----
-- debug:
- msg: "START ios_static_routes rendered integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _intial_setup_config.yaml
-
-- block:
- - name: Rendered the provided configuration with the exisiting running configuration
- ios_static_routes: &rendered
- config:
- - vrf: ansible_temp_vrf
- address_families:
- - afi: ipv4
- routes:
- - dest: 192.0.2.0/24
- next_hops:
- - forward_router_address: 192.0.2.1
- name: test_vrf
- tag: 50
- track: 150
- - address_families:
- - afi: ipv4
- routes:
- - dest: 198.51.100.0/24
- next_hops:
- - forward_router_address: 198.51.101.1
- name: route_1
- distance_metric: 110
- tag: 40
- multicast: True
- - forward_router_address: 198.51.101.2
- name: route_2
- distance_metric: 30
- - forward_router_address: 198.51.101.3
- name: route_3
- - afi: ipv6
- routes:
- - dest: 2001:DB8:0:3::/64
- next_hops:
- - forward_router_address: 2001:DB8:0:3::2
- name: test_v6
- tag: 105
- state: rendered
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.rendered|symmetric_difference(rendered.commands) == []"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_static_routes/tests/cli/replaced.yaml b/test/integration/targets/ios_static_routes/tests/cli/replaced.yaml
deleted file mode 100644
index b7e7badfed..0000000000
--- a/test/integration/targets/ios_static_routes/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
----
-- debug:
- msg: "START Replaced ios_static_routes state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _intial_setup_config.yaml
-
-- block:
- - name: Replaces device configuration of listed interfaces with provided configuration
- ios_static_routes: &replaced
- config:
- - vrf: ansible_temp_vrf
- address_families:
- - afi: ipv4
- routes:
- - dest: 192.0.2.0/24
- next_hops:
- - forward_router_address: 192.0.2.1
- name: replaced_vrf
- tag: 75
- track: 155
- - address_families:
- - afi: ipv4
- routes:
- - dest: 198.51.100.0/24
- next_hops:
- - forward_router_address: 198.51.101.1
- name: replaced_route
- distance_metric: 175
- tag: 70
- multicast: True
- - afi: ipv6
- routes:
- - dest: 2001:DB8:0:3::/64
- next_hops:
- - forward_router_address: 2001:DB8:0:3::2
- name: replaced_v6
- tag: 110
- state: replaced
- register: result
-
- - assert:
- that:
- - "result.commands|length == 7"
- - "result.changed == true"
- - "result.commands|symmetric_difference(replaced.commands) == []"
-
- - name: Replaces device configuration of listed interfaces with provided configuration (IDEMPOTENT)
- ios_static_routes: *replaced
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result.commands|length == 0"
- - "result['changed'] == false"
-
- always:
- - include_tasks: _populate_config.yaml
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_static_routes/tests/cli/rtt.yaml b/test/integration/targets/ios_static_routes/tests/cli/rtt.yaml
deleted file mode 100644
index e8a5c6b151..0000000000
--- a/test/integration/targets/ios_static_routes/tests/cli/rtt.yaml
+++ /dev/null
@@ -1,78 +0,0 @@
----
-- debug:
- msg: "START ios_static_routes round trip integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- block:
- - name: Apply the provided configuration (base config)
- ios_static_routes:
- config:
- - vrf: ansible_temp_vrf
- address_families:
- - afi: ipv4
- routes:
- - dest: 192.0.2.0/24
- next_hops:
- - forward_router_address: 192.0.2.1
- name: rtt_vrf
- tag: 50
- track: 150
- - address_families:
- - afi: ipv4
- routes:
- - dest: 198.51.100.0/24
- next_hops:
- - forward_router_address: 198.51.101.1
- name: rtt_route_1
- distance_metric: 110
- tag: 40
- multicast: True
- state: merged
- register: base_config
-
- - name: Gather static routes facts
- ios_facts:
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources:
- - static_routes
-
- - name: Apply the configuration which need to be reverted
- ios_static_routes:
- config:
- - vrf: ansible_temp_vrf
- address_families:
- - afi: ipv4
- routes:
- - dest: 192.0.2.0/24
- next_hops:
- - forward_router_address: 192.0.2.12
- name: new_rtt_vrf
- tag: 10
- track: 150
- state: overridden
- register: result
-
- - assert:
- that:
- - "result.commands|length == 2"
- - "result.changed == true"
- - "result.commands|symmetric_difference(rtt.override_commands) == []"
-
- - name: Revert back to base config using facts round trip
- ios_static_routes:
- config: "{{ ansible_facts['network_resources']['static_routes'] }}"
- state: overridden
- register: revert
-
- - assert:
- that:
- - "revert.commands|length == 1"
- - "revert.changed == true"
- - "revert.commands|symmetric_difference(rtt.override_revert_commands) == []"
-
- always:
- - include_tasks: _populate_config.yaml
- - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/test/integration/targets/ios_static_routes/vars/main.yaml b/test/integration/targets/ios_static_routes/vars/main.yaml
deleted file mode 100644
index 30c67c56e9..0000000000
--- a/test/integration/targets/ios_static_routes/vars/main.yaml
+++ /dev/null
@@ -1,88 +0,0 @@
----
-deleted:
- commands:
- - "no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50"
- - "no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40"
- - "no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2"
- - "no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3"
- - "no ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105"
-
-merged:
- commands:
- - "ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name merged_vrf track 150 tag 50"
- - "ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name merged_route_1 tag 40"
- - "ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name merged_route_2"
- - "ip route 198.51.100.0 255.255.255.0 198.51.101.3 name merged_route_3"
- - "ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name merged_v6 tag 105"
-
-replaced:
- commands:
- - "no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50"
- - "no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40"
- - "no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2"
- - "no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3"
- - "ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name replaced_vrf track 155 tag 75"
- - "ip route 198.51.100.0 255.255.255.0 198.51.101.1 175 multicast name replaced_route tag 70"
- - "ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name replaced_v6 tag 110"
-
-overridden:
- commands:
- - "no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40"
- - "no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2"
- - "no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3"
- - "no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50"
- - "no ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105"
- - "ip route 198.51.100.0 255.255.255.0 198.51.101.3 name override_route"
- - "ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name override_vrf track 150 tag 50"
- - "ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name override_v6 tag 175"
-
-rendered:
- commands:
- - "ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50"
- - "ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40"
- - "ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2"
- - "ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3"
- - "ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105"
-
-gathered:
- config:
- - address_families:
- - afi: ipv4
- routes:
- - dest: 192.0.2.0/24
- next_hops:
- - forward_router_address: 192.0.2.1
- name: test_vrf
- tag: 50
- track: 150
- vrf: ansible_temp_vrf
- - address_families:
- - afi: ipv6
- routes:
- - dest: 2001:DB8:0:3::/64
- next_hops:
- - forward_router_address: 2001:DB8:0:3::2
- name: test_v6
- tag: 105
- - afi: ipv4
- routes:
- - dest: 198.51.100.0/24
- next_hops:
- - distance_metric: 110
- forward_router_address: 198.51.101.1
- multicast: true
- name: route_1
- tag: 40
- - distance_metric: 30
- forward_router_address: 198.51.101.2
- name: route_2
- - forward_router_address: 198.51.101.3
- name: route_3
-
-rtt:
- override_commands:
- - "no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name rtt_route_1 tag 40"
- - "ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.12 name new_rtt_vrf track 150 tag 10"
-
- override_revert_commands:
- - "ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name rtt_route_1 tag 40"
diff --git a/test/integration/targets/ios_system/defaults/main.yaml b/test/integration/targets/ios_system/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/ios_system/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/ios_system/meta/main.yml b/test/integration/targets/ios_system/meta/main.yml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_system/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_system/tasks/cli.yaml b/test/integration/targets/ios_system/tasks/cli.yaml
deleted file mode 100644
index 6b93fd5400..0000000000
--- a/test/integration/targets/ios_system/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_system/tasks/main.yaml b/test/integration/targets/ios_system/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_system/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_system/tests/cli/net_system.yaml b/test/integration/targets/ios_system/tests/cli/net_system.yaml
deleted file mode 100644
index d5e36fea8d..0000000000
--- a/test/integration/targets/ios_system/tests/cli/net_system.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
----
-- debug: msg="START ios cli/net_system.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: setup
- ios_config:
- lines:
- - no ip domain-list ansible.com
- - no ip domain-list redhat.com
- match: none
- provider: "{{ cli }}"
-
-- name: configure domain_search using platform agnostic module
- net_system:
- domain_search:
- - ansible.com
- - redhat.com
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'ip domain list ansible.com' in result.commands"
- - "'ip domain list redhat.com' in result.commands"
-
-- name: teardown
- ios_config:
- lines:
- - no ip domain-list ansible.com
- - no ip domain-list redhat.com
- match: none
- provider: "{{ cli }}"
-
-- debug: msg="END ios cli/net_system.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_system/tests/cli/set_domain_list.yaml b/test/integration/targets/ios_system/tests/cli/set_domain_list.yaml
deleted file mode 100644
index d371b7dbd7..0000000000
--- a/test/integration/targets/ios_system/tests/cli/set_domain_list.yaml
+++ /dev/null
@@ -1,122 +0,0 @@
----
-- debug: msg="START cli/set_domain_search.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - no ip domain-list ansible.com
- - no ip domain-list redhat.com
- match: none
- provider: "{{ cli }}"
-
-- name: configure domain_search
- ios_system:
- domain_search:
- - ansible.com
- - redhat.com
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'ip domain list ansible.com' in result.commands"
- - "'ip domain list redhat.com' in result.commands"
-
-- name: verify domain_search
- ios_system:
- domain_search:
- - ansible.com
- - redhat.com
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: remove one entry
- ios_system:
- domain_search:
- - ansible.com
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'no ip domain list redhat.com' in result.commands"
-
-- name: verify remove one entry
- ios_system:
- domain_search:
- - ansible.com
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: add one entry
- ios_system:
- domain_search:
- - ansible.com
- - redhat.com
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'ip domain list redhat.com' in result.commands"
-
-- name: verify add one entry
- ios_system:
- domain_search:
- - ansible.com
- - redhat.com
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: add and remove one entry
- ios_system:
- domain_search:
- - ansible.com
- - eng.ansible.com
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'no ip domain list redhat.com' in result.commands"
- - "'ip domain list eng.ansible.com' in result.commands"
- - result.commands|length == 2
-
-- name: verify add and remove one entry
- ios_system:
- domain_search:
- - ansible.com
- - eng.ansible.com
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: teardown
- ios_config:
- lines:
- - no ip domain-list ansible.com
- - no ip domain-list redhat.com
- - no ip domain-list eng.ansible.com
- match: none
- provider: "{{ cli }}"
-
-- debug: msg="END cli/set_domain_search.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_system/tests/cli/set_domain_name.yaml b/test/integration/targets/ios_system/tests/cli/set_domain_name.yaml
deleted file mode 100644
index 60a4659f65..0000000000
--- a/test/integration/targets/ios_system/tests/cli/set_domain_name.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-- debug: msg="START cli/set_domain_name.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines: no ip domain-name
- match: none
- provider: "{{ cli }}"
-
-- name: configure domain_name
- ios_system:
- domain_name: eng.ansible.com
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: verify domain_name
- ios_system:
- domain_name: eng.ansible.com
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines: no ip domain-name
- match: none
- provider: "{{ cli }}"
-
-- debug: msg="END cli/set_domain_name.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_system/tests/cli/set_hostname.yaml b/test/integration/targets/ios_system/tests/cli/set_hostname.yaml
deleted file mode 100644
index 1b39764c6e..0000000000
--- a/test/integration/targets/ios_system/tests/cli/set_hostname.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-- debug: msg="START cli/set_hostname.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines: hostname switch
- match: none
- provider: "{{ cli }}"
-
-- name: configure hostname
- ios_system:
- hostname: foo
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: verify hostname
- ios_system:
- hostname: foo
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- ios_config:
- lines: "hostname {{ inventory_hostname }}"
- match: none
- provider: "{{ cli }}"
-
-- debug: msg="END cli/set_hostname.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_system/tests/cli/set_lookup_source.yaml b/test/integration/targets/ios_system/tests/cli/set_lookup_source.yaml
deleted file mode 100644
index b8cf59d7b2..0000000000
--- a/test/integration/targets/ios_system/tests/cli/set_lookup_source.yaml
+++ /dev/null
@@ -1,94 +0,0 @@
----
-- debug: msg="START cli/set_lookup_source.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - no ip domain lookup source-interface Loopback888
- - vrf definition ansible
- match: none
- provider: "{{ cli }}"
-
-- name: configure lookup_source
- ios_system:
- lookup_source: Loopback888
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'ip domain lookup source-interface Loopback888' in result.commands"
-
-- name: verify lookup_source
- ios_system:
- lookup_source: Loopback888
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: Disable lookup_source
- ios_system:
- lookup_enabled: False
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'no ip domain lookup' in result.commands"
-
-- name: Disable lookup_source
- ios_system:
- lookup_enabled: True
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'ip domain lookup' in result.commands"
-
-#- name: change to vrf
-# ios_system:
-# lookup_source:
-# - interface: Loopback10
-# vrf: ansible
-# provider: "{{ cli }}"
-# provider: "{{ cli }}"
-# register: result
-#
-#- assert:
-# that:
-# - result.changed == true
-# - "'no ip domain lookup source-interface Management1' in result.commands"
-# - "'ip domain lookup vrf ansible source-interface Management1' in result.commands"
-# - result.commands|length == 2
-#
-#- name: verify change to vrf
-# ios_system:
-# lookup_source:
-# - interface: Management1
-# vrf: ansible
-# provider: "{{ cli }}"
-# provider: "{{ cli }}"
-# register: result
-#
-#- assert:
-# that:
-# - result.changed == false
-
-- name: teardown
- ios_config:
- lines:
- - no ip domain lookup source-interface Loopback888
- - no vrf definition ansible
- match: none
- provider: "{{ cli }}"
- ignore_errors: yes
-# FIXME: Not sure why this is failing with msg": "no vrf definition ansible\r\n% IPv4 and IPv6 addresses from all interfaces in VRF ansible have been removed\r\nfoo(config)#", rc:1
-
-- debug: msg="END cli/set_lookup_source.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_system/tests/cli/set_name_servers.yaml b/test/integration/targets/ios_system/tests/cli/set_name_servers.yaml
deleted file mode 100644
index 5dcc32ed1f..0000000000
--- a/test/integration/targets/ios_system/tests/cli/set_name_servers.yaml
+++ /dev/null
@@ -1,91 +0,0 @@
----
-- debug: msg="START cli/set_name_servers.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- ios_config:
- lines:
- - no ip name-server
- match: none
- provider: "{{ cli }}"
-
-- name: configure name_servers
- ios_system:
- name_servers:
- - 192.0.2.1
- - 192.0.2.2
- - 192.0.2.3
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == true
- - result.commands|length == 3
- - "'ip name-server 192.0.2.1' in result.commands"
- - "'ip name-server 192.0.2.2' in result.commands"
- - "'ip name-server 192.0.2.3' in result.commands"
-
-- name: verify name_servers
- ios_system:
- name_servers:
- - 192.0.2.1
- - 192.0.2.2
- - 192.0.2.3
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-#- name: change to vrf
-# ios_system:
-# name_servers:
-# - 192.0.2.1
-# - { server: 192.0.2.2, vrf: ansible }
-# - 192.0.2.3
-# provider: "{{ cli }}"
-# register: result
-
-#- assert:
-# that:
-# - result.changed == true
-# - result.commands|length == 2
-# - "'no ip name-server 192.0.2.2' in result.commands"
-# - "'ip name-server 192.0.2.2 vrf ansible' in result.commands"
-
-#- name: verify change to vrf
-# ios_system:
-# name_servers:
-# - 192.0.2.1
-# - { server: 192.0.2.2, vrf: ansible }
-# - 192.0.2.3
-# provider: "{{ cli }}"
-# register: result
-#
-#- assert:
-# that:
-# - result.changed == false
-
-- name: remove one
- ios_system:
- name_servers:
- - 192.0.2.1
- - 192.0.2.2
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - result.changed == true
- - result.commands|length == 1
- - "'no ip name-server 192.0.2.3' in result.commands"
-
-- name: teardown
- ios_config:
- lines:
- - no ip name-server
- match: none
- provider: "{{ cli }}"
-
-- debug: msg="END cli/set_name_servers.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_user/defaults/main.yaml b/test/integration/targets/ios_user/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/ios_user/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/ios_user/files/test_rsa b/test/integration/targets/ios_user/files/test_rsa
deleted file mode 100644
index 9fdc8c3af0..0000000000
--- a/test/integration/targets/ios_user/files/test_rsa
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEpAIBAAKCAQEAseTsv6oTMJbsRgOSaNEVBlsqE4tKI2MBEOHzTlUnE3GBRtZi
-xlUlF9rZcjtk+hTIz3N3UrLtxMnWqv0YGM8tXZTcz50M9ANDE/oNXrXkkMKX5WWr
-OcgDCAAZYSVJ/vIt/xZkYteax6zMZQqEBIc/rKo8KuxKZTUMqj0GHkCQbA/o7lBQ
-hpdUZxtU/Y2uc9tXVhav3jVzTFUOdwZrCAJghdCCweJfwAj1DdHODip+/hNu+3Sk
-DNl0bdhWoNNnUFCYPOUK2B79OMg2+r5bwH7xgURIoTuc54HlGectJpIzI7GB6VfL
-UCsJn0uQ7HwX7XAtZjhJWP8dKPd1FuUgg5M8MwIDAQABAoIBACfBVz9GDN/Q+qBy
-7+dIwoAXI4IWoMzjtTtGo48f7Iml1hQ0mQJlyNJZ8DpdF6XjuzTRQxtSLVzLFpRD
-13zD4AmH2Qj0ug5WJEl0mkRONfQ76KI1ZFyXXEYPb5yMLssw6CKXqHuGX2q8LTlv
-bi1s5Ef8C1I0WDPh9SCeXp2oJB5h2G+HtCXDyxASK2nAKqhkpQqPhg5Rd50mBOpD
-WE/lor358hU0Aj/qhzjeWKNNK8pgeahXz5anEQZ69TUH102B6bNh8Ao4ZL2j3tr0
-6FbE3ooQT7+zOLm5xOFJ9OnJ2yDVW6Dj1Czllx2vJUcxKsKxaGF76xNCIPiSUUfS
-mnOnEfECgYEA2bBFc9Pb8AI0bZZ8Q6XE7Jqa6BOaLbzyjK6IzdyAV/LKdk3yRfEZ
-Rb2iNy8poBUYBqBUMfRsRVq5dabjYkz9X5e+75S8Lm/qiktlhTpQYWk5q+eBZdPm
-I+dG64Tdyv+Y/NwN4enIsw8LGllY472iUf37ms2+uOA8/BysQ2n7ss0CgYEA0TPD
-IhmLqNhQGkS2GU6tM8G7LyGOaIH3mmyCviYgEauWWw3bn/Hhiq/6tLtQc6pv2nIa
-ifbACnI+GiIoBFwz8ofuFA8dm76uro7o6eWP5iUizoGISYSewCFpcCpp0xn7/FNR
-3RT4YRBMt3yL8J1cVBpPRRbIwp/bZ+pRb0Ggqv8CgYEAoNAFHqHdkhou3N4UgmzN
-YvR7hwIkHbG9hIvS6DECZvYm9upyFZUcVFbYpOekWmv6ybpbOGQWL83rv6w/wfia
-HKofFSHNOojWvL8iCh+gDbYMMp/dCXpWQyOxUn9e0X2saO+vGbr41r5AN4DVl7gZ
-V3THD/75691Lb/tGjq6Wj+kCgYB6ZhadNOUJfMYhGGKSm/2qcobaJH/1lVUQ/Lvi
-FNxeek4WKB1/jz2urxe39oAzrFyVKn1sivoBIqZDFAjlxCyAkhcxlUZ1gTMi3mpX
-rwBqXv/mYtMicH2RW/scrTQNVv6fuwACoepQoADCuhQGS4thiaMngRUlCfKM8gOD
-XJpscQKBgQDIMURtVIV/2ZcGqHv/3G5jsPJPsTycv6YR4gTs5GUBy5If2Rs7DMWE
-pJLIcU+SJhMeVKTZPrePibzCp2+rMSI5pc6T+9LC79RKsfie3UybWfLZrSmtnxJx
-MgC49TR4NFP6yoYJPYiTdRJ/1Bu68WfVafFK86i9MKAI5OU2ba3/Bg==
------END RSA PRIVATE KEY-----
diff --git a/test/integration/targets/ios_user/files/test_rsa.pub b/test/integration/targets/ios_user/files/test_rsa.pub
deleted file mode 100644
index e6939a2955..0000000000
--- a/test/integration/targets/ios_user/files/test_rsa.pub
+++ /dev/null
@@ -1 +0,0 @@
-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCx5Oy/qhMwluxGA5Jo0RUGWyoTi0ojYwEQ4fNOVScTcYFG1mLGVSUX2tlyO2T6FMjPc3dSsu3Eydaq/RgYzy1dlNzPnQz0A0MT+g1eteSQwpflZas5yAMIABlhJUn+8i3/FmRi15rHrMxlCoQEhz+sqjwq7EplNQyqPQYeQJBsD+juUFCGl1RnG1T9ja5z21dWFq/eNXNMVQ53BmsIAmCF0ILB4l/ACPUN0c4OKn7+E277dKQM2XRt2Fag02dQUJg85QrYHv04yDb6vlvAfvGBREihO5zngeUZ5y0mkjMjsYHpV8tQKwmfS5DsfBftcC1mOElY/x0o93UW5SCDkzwz ansible_ios_user_test
diff --git a/test/integration/targets/ios_user/meta/main.yaml b/test/integration/targets/ios_user/meta/main.yaml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_user/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_user/tasks/cli.yaml b/test/integration/targets/ios_user/tasks/cli.yaml
deleted file mode 100644
index 6b93fd5400..0000000000
--- a/test/integration/targets/ios_user/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_user/tasks/main.yaml b/test/integration/targets/ios_user/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_user/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_user/tests/cli/auth.yaml b/test/integration/targets/ios_user/tests/cli/auth.yaml
deleted file mode 100644
index 7e7a7b000c..0000000000
--- a/test/integration/targets/ios_user/tests/cli/auth.yaml
+++ /dev/null
@@ -1,83 +0,0 @@
----
-- block:
- - name: Create user with password
- ios_user:
- name: auth_user
- privilege: 15
- role: network-operator
- state: present
- provider: "{{ cli }}"
- configured_password: pass123
-
- - name: test login
- expect:
- command: "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port|default(22) }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=no show version"
- responses:
- (?i)password: "pass123"
-
- - name: test login with invalid password (should fail)
- expect:
- command: "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port|default(22) }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=no show version"
- responses:
- (?i)password: "badpass"
- ignore_errors: yes
- register: results
-
- - name: check that attempt failed
- assert:
- that:
- - results.failed
-
- always:
- - name: delete user
- ios_user:
- name: auth_user
- state: absent
- provider: "{{ cli }}"
- register: result
-
- - name: reset connection
- meta: reset_connection
-
-
-- block:
- - name: Ensure ssh key is not world readable
- file:
- path: "{{ role_path }}/files/test_rsa"
- mode: 0600
-
- - name: Create user with sshkey
- ios_user:
- name: ssh_user
- privilege: 15
- role: network-operator
- state: present
- provider: "{{ cli }}"
- sshkey: "{{ lookup('file', 'files/test_rsa.pub') }}"
-
- - name: test sshkey login
- shell: "ssh ssh_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port|default(22) }} -o IdentityFile={{ role_path }}/files/test_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o BatchMode=yes -o PubkeyAuthentication=yes show version"
-
- - name: test login without sshkey (should fail)
- expect:
- command: "ssh ssh_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port|default(22) }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=no show version"
- responses:
- (?i)password: badpass
- ignore_errors: yes
- register: results
-
- - name: check that attempt failed
- assert:
- that:
- - results.failed
-
- always:
- - name: delete user
- ios_user:
- name: ssh_user
- state: absent
- provider: "{{ cli }}"
- register: result
-
- - name: reset connection
- meta: reset_connection
diff --git a/test/integration/targets/ios_user/tests/cli/basic.yaml b/test/integration/targets/ios_user/tests/cli/basic.yaml
deleted file mode 100644
index 144b073879..0000000000
--- a/test/integration/targets/ios_user/tests/cli/basic.yaml
+++ /dev/null
@@ -1,142 +0,0 @@
----
-- name: tear down old users if they exist (Setup)
- become: true
- ios_user:
- aggregate:
- - name: ansibletest1
- - name: ansibletest2
- - name: ansibletest3
- - name: ansibletest4
- - name: ansibletest5
- - name: ansibletest6
- state: absent
- provider: "{{ cli }}"
-
-- name: Create user (SetUp)
- become: true
- ios_user:
- name: ansibletest1
- privilege: 15
- role: network-operator
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - 'result.commands == ["username ansibletest1 view network-operator", "username ansibletest1 privilege 15"]'
-
-- name: Collection of users (SetUp)
- become: true
- ios_user:
- aggregate:
- - name: ansibletest2
- - name: ansibletest3
- provider: "{{ cli }}"
- state: present
- view: network-admin
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - 'result.commands == ["username ansibletest2 view network-admin", "username ansibletest3 view network-admin"]'
-
-- name: Add user again (Idempotent)
- become: true
- ios_user:
- name: ansibletest1
- privilege: 15
- role: network-operator
- state: present
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
- - 'result.commands | length == 0'
-
-- name: Add collection of users again (Idempotent)
- become: true
- ios_user:
- aggregate:
- - name: ansibletest2
- - name: ansibletest3
- provider: "{{ cli }}"
- state: present
- view: network-admin
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
- - 'result.commands | length == 0'
-
-- name: Create user with password_type (password)
- become: true
- ios_user:
- name: ansibleuser4
- password_type: password
- configured_password: testpass
- provider: "{{ cli }}"
- state: present
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - "'username ansibleuser4 password' in result.commands[0]"
-
-- name: Create user with password_type (secret)
- become: true
- ios_user:
- name: ansibleuser5
- password_type: secret
- configured_password: testpass
- provider: "{{ cli }}"
- state: present
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - "'username ansibleuser5 secret' in result.commands[0]"
-
-- name: Create user with hashed_password
- become: true
- ios_user:
- name: ansibleuser6
- hashed_password:
- type: 5
- value: $3$8JcDilcYgFZi.yz4ApaqkHG2.8/
- provider: "{{ cli }}"
- state: present
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - "'username ansibleuser6 secret' in result.commands[0]"
-
-- name: tearDown
- become: true
- ios_user:
- aggregate:
- - name: ansibletest1
- - name: ansibletest2
- - name: ansibletest3
- - name: ansibletest4
- - name: ansibletest5
- - name: ansibletest6
- state: absent
- provider: "{{ cli }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"no username ansibletest1" in result.commands[0]["command"]'
- - '"no username ansibletest2" in result.commands[1]["command"]'
- - '"no username ansibletest3" in result.commands[2]["command"]'
diff --git a/test/integration/targets/ios_vlan/defaults/main.yaml b/test/integration/targets/ios_vlan/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/ios_vlan/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/ios_vlan/meta/main.yaml b/test/integration/targets/ios_vlan/meta/main.yaml
deleted file mode 100644
index 159cea8d38..0000000000
--- a/test/integration/targets/ios_vlan/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_ios_tests
diff --git a/test/integration/targets/ios_vlan/tasks/cli.yaml b/test/integration/targets/ios_vlan/tasks/cli.yaml
deleted file mode 100644
index 6b93fd5400..0000000000
--- a/test/integration/targets/ios_vlan/tasks/cli.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_local
diff --git a/test/integration/targets/ios_vlan/tasks/main.yaml b/test/integration/targets/ios_vlan/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_vlan/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_vlan/tests/cli/basic.yaml b/test/integration/targets/ios_vlan/tests/cli/basic.yaml
deleted file mode 100644
index 4f71458d22..0000000000
--- a/test/integration/targets/ios_vlan/tests/cli/basic.yaml
+++ /dev/null
@@ -1,239 +0,0 @@
----
-- debug: msg="START cli/basic.yaml on connection={{ ansible_connection }}"
-
-- set_fact: switch_type="{{ switch_type }}"
-
-- block:
-
- - name: setup - remove vlan used in test
- ios_config:
- lines:
- - no vlan 100
- - no vlan 200
- - no vlan 300
- provider: "{{ cli }}"
-
- - name: setup - remove switchport settings on interfaces used in test
- ios_config:
- lines:
- - switchport mode access
- - no switchport access vlan 100
- provider: "{{ cli }}"
- parents: "{{ item }}"
- loop:
- - interface GigabitEthernet0/1
- - interface GigabitEthernet0/2
-
- - name: create vlan
- ios_vlan: &create
- vlan_id: 100
- name: test-vlan
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'vlan 100' in result.commands"
- - "'name test-vlan' in result.commands"
-
- - name: create vlan(idempotence)
- ios_vlan: *create
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: Add interfaces to vlan
- ios_vlan: &interfaces
- vlan_id: 100
- interfaces:
- - GigabitEthernet0/1
- - GigabitEthernet0/2
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface GigabitEthernet0/1' in result.commands"
- - "'switchport mode access' in result.commands"
- - "'switchport access vlan 100' in result.commands"
- - "'interface GigabitEthernet0/2' in result.commands"
- - "'switchport mode access' in result.commands"
- - "'switchport access vlan 100' in result.commands"
-
- - name: Add interfaces to vlan(idempotence)
- ios_vlan: *interfaces
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: Check interface assigned to vrf (intent)
- ios_vlan:
- vlan_id: 100
- associated_interfaces:
- - GigabitEthernet0/1
- - GigabitEthernet0/2
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.failed == false"
-
- - name: Check interface assigned to vrf (fail)
- ios_vlan:
- vlan_id: 100
- associated_interfaces:
- - test
- provider: "{{ cli }}"
- ignore_errors: yes
- register: result
-
- - assert:
- that:
- - "result.failed == True"
-
- - name: Remove interface from vlan
- ios_vlan: &single_int
- vlan_id: 100
- interfaces:
- - GigabitEthernet0/1
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'vlan 100' in result.commands"
- - "'interface GigabitEthernet0/2' in result.commands"
- - "'switchport mode access' in result.commands"
- - "'no switchport access vlan 100' in result.commands"
-
- - name: Remove interface from vlan(idempotence)
- ios_vlan: *single_int
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: Suspend vlan
- ios_vlan:
- vlan_id: 100
- state: suspend
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'vlan 100' in result.commands"
- - "'state suspend' in result.commands"
-
- - name: Unsuspend vlan
- ios_vlan:
- vlan_id: 100
- state: active
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'vlan 100' in result.commands"
- - "'state active' in result.commands"
-
- - name: delete vlan
- ios_vlan: &delete
- vlan_id: 100
- provider: "{{ cli }}"
- state: absent
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'no vlan 100' in result.commands"
-
- - name: delete vlan(idempotence)
- ios_vlan: *delete
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: create vlans using aggregate
- ios_vlan: &create_aggregate
- aggregate:
- - { vlan_id: 200, name: vlan-200 }
- - { vlan_id: 300, name: vlan-300 }
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'vlan 200' in result.commands"
- - "'name vlan-200' in result.commands"
- - "'vlan 300' in result.commands"
- - "'name vlan-300' in result.commands"
-
- - name: create vlans using aggregate(idempotence)
- ios_vlan: *create_aggregate
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: delete vlans using aggregate
- ios_vlan: &delete_aggregate
- aggregate:
- - { vlan_id: 200, name: vlan-200 }
- - { vlan_id: 300, name: vlan-300 }
- state: absent
- provider: "{{ cli }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'no vlan 200' in result.commands"
- - "'no vlan 300' in result.commands"
-
- - name: delete vlans using aggregate(idempotence)
- ios_vlan: *delete_aggregate
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: teardown(part1)
- ios_config:
- lines:
- - no vlan 100
- - no vlan 200
- - no vlan 300
- provider: "{{ cli }}"
-
- - name: teardown(part2)
- ios_config:
- lines:
- - switchport mode access
- - no switchport access vlan 100
- provider: "{{ cli }}"
- parents: "{{ item }}"
- loop:
- - interface GigabitEthernet0/1
- - interface GigabitEthernet0/2
-
- when: switch_type == 'L2'
-
-- debug: msg="END cli/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/ios_vlans/defaults/main.yaml b/test/integration/targets/ios_vlans/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/ios_vlans/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/ios_vlans/meta/main.yaml b/test/integration/targets/ios_vlans/meta/main.yaml
deleted file mode 100644
index 32cf5dda7e..0000000000
--- a/test/integration/targets/ios_vlans/meta/main.yaml
+++ /dev/null
@@ -1 +0,0 @@
-dependencies: []
diff --git a/test/integration/targets/ios_vlans/tasks/cli.yaml b/test/integration/targets/ios_vlans/tasks/cli.yaml
deleted file mode 100644
index 3bafcd702f..0000000000
--- a/test/integration/targets/ios_vlans/tasks/cli.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
----
-- name: Collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- register: test_cases
- delegate_to: localhost
-
-- name: Set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- delegate_to: localhost
-
-- name: Get the IOS version
- ios_facts:
- gather_subset: all
-
-- name: Run test case (connection=network_cli)
- include: "{{ test_case_to_run }}"
- vars:
- ansible_connection: network_cli
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_vlans/tasks/main.yaml b/test/integration/targets/ios_vlans/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_vlans/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_vlans/tests/cli/_populate_config.yaml b/test/integration/targets/ios_vlans/tests/cli/_populate_config.yaml
deleted file mode 100644
index c8c7402ee5..0000000000
--- a/test/integration/targets/ios_vlans/tests/cli/_populate_config.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-- name: Setup
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- vlan 10
- vlan 20
- vlan 30
- when: ansible_net_version != "15.6(2)T"
diff --git a/test/integration/targets/ios_vlans/tests/cli/_remove_config.yaml b/test/integration/targets/ios_vlans/tests/cli/_remove_config.yaml
deleted file mode 100644
index 8b45b6fa11..0000000000
--- a/test/integration/targets/ios_vlans/tests/cli/_remove_config.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-- name: Remove Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- no vlan 10
- no vlan 20
- no vlan 30
- no vlan 40
- when: ansible_net_version != "15.6(2)T"
diff --git a/test/integration/targets/ios_vlans/tests/cli/deleted.yaml b/test/integration/targets/ios_vlans/tests/cli/deleted.yaml
deleted file mode 100644
index 99ca146fd5..0000000000
--- a/test/integration/targets/ios_vlans/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,42 +0,0 @@
----
-- debug:
- msg: "Start Deleted integration state for ios_vlans ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Delete VLANs attributes for all configured VLANs
- ios_vlans: &deleted
- state: deleted
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ deleted['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ deleted['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ deleted['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Delete VLANs attributes for all configured VLANs (IDEMPOTENT)
- ios_vlans: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.changed == false"
-
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_vlans/tests/cli/empty_config.yaml b/test/integration/targets/ios_vlans/tests/cli/empty_config.yaml
deleted file mode 100644
index f54c1f86de..0000000000
--- a/test/integration/targets/ios_vlans/tests/cli/empty_config.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug:
- msg: "START ios_vlans empty_config.yaml integration tests on connection={{ ansible_connection }}"
-
-- block:
- - name: Merged with empty config should give appropriate error message
- ios_vlans:
- config:
- state: merged
- register: result
- ignore_errors: True
-
- - assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state merged'
-
- - name: Replaced with empty config should give appropriate error message
- ios_vlans:
- config:
- state: replaced
- register: result
- ignore_errors: True
-
- - assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state replaced'
-
- - name: Overridden with empty config should give appropriate error message
- ios_vlans:
- config:
- state: overridden
- register: result
- ignore_errors: True
-
- - assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state overridden'
- when: ansible_net_version != "15.6(2)T"
diff --git a/test/integration/targets/ios_vlans/tests/cli/merged.yaml b/test/integration/targets/ios_vlans/tests/cli/merged.yaml
deleted file mode 100644
index 1e16cdd3a4..0000000000
--- a/test/integration/targets/ios_vlans/tests/cli/merged.yaml
+++ /dev/null
@@ -1,54 +0,0 @@
----
-- debug:
- msg: "START Merged ios_vlans state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- block:
- - name: Merge provided configuration with device configuration
- ios_vlans: &merged
- config:
- - name: Vlan_10
- vlan_id: 10
- state: active
- shutdown: disabled
- remote_span: True
- - name: Vlan_20
- vlan_id: 20
- mtu: 610
- state: active
- shutdown: enabled
- - name: Vlan_30
- vlan_id: 30
- state: suspend
- shutdown: enabled
- state: merged
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ merged['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ merged['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ merged['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Merge provided configuration with device configuration (IDEMPOTENT)
- ios_vlans: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_vlans/tests/cli/overridden.yaml b/test/integration/targets/ios_vlans/tests/cli/overridden.yaml
deleted file mode 100644
index d464b91a26..0000000000
--- a/test/integration/targets/ios_vlans/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
----
-- debug:
- msg: "START Overridden ios_vlans state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Override device configuration of all VLANs with provided configuration
- ios_vlans: &overridden
- config:
- - name: VLAN_10
- vlan_id: 10
- mtu: 1000
- - name: VLAN_40
- vlan_id: 40
- mtu: 850
- state: overridden
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ overridden['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ overridden['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ overridden['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Override device configuration of all interfaces with provided configuration (IDEMPOTENT)
- ios_vlans: *overridden
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_vlans/tests/cli/replaced.yaml b/test/integration/targets/ios_vlans/tests/cli/replaced.yaml
deleted file mode 100644
index 3fbeef796c..0000000000
--- a/test/integration/targets/ios_vlans/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,49 +0,0 @@
----
-- debug:
- msg: "START Replaced ios_vlans state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Replaces device configuration of listed VLANs with provided configuration
- ios_vlans: &replaced
- config:
- - vlan_id: 20
- name: Test_VLAN20
- mtu: 700
- shutdown: disabled
- - vlan_id: 30
- name: Test_VLAN30
- mtu: 1000
- state: replaced
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ replaced['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ replaced['before'] | symmetric_difference(result['before']) | length == 0 }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ replaced['after'] | symmetric_difference(result['after']) | length == 0 }}"
-
- - name: Replaces device configuration of listed interfaces with provided configuration (IDEMPOTENT)
- ios_vlans: *replaced
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
- when: ansible_net_version != "15.6(2)T"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_vlans/vars/main.yaml b/test/integration/targets/ios_vlans/vars/main.yaml
deleted file mode 100644
index 24e92dc898..0000000000
--- a/test/integration/targets/ios_vlans/vars/main.yaml
+++ /dev/null
@@ -1,345 +0,0 @@
----
-merged:
- before:
- - mtu: 1500
- name: default
- shutdown: disabled
- state: active
- vlan_id: 1
- - mtu: 1500
- name: fddi-default
- shutdown: enabled
- state: active
- vlan_id: 1002
- - mtu: 1500
- name: token-ring-default
- shutdown: enabled
- state: active
- vlan_id: 1003
- - mtu: 1500
- name: fddinet-default
- shutdown: enabled
- state: active
- vlan_id: 1004
- - mtu: 1500
- name: trnet-default
- shutdown: enabled
- state: active
- vlan_id: 1005
-
- commands:
- - "vlan 10"
- - "name Vlan_10"
- - "state active"
- - "remote-span"
- - "no shutdown"
- - "vlan 20"
- - "name Vlan_20"
- - "state active"
- - "mtu 610"
- - "shutdown"
- - "vlan 30"
- - "name Vlan_30"
- - "state suspend"
- - "shutdown"
-
- after:
- - mtu: 1500
- name: default
- shutdown: disabled
- state: active
- vlan_id: 1
- - mtu: 1500
- name: Vlan_10
- remote_span: true
- shutdown: disabled
- state: active
- vlan_id: 10
- - mtu: 610
- name: Vlan_20
- shutdown: enabled
- state: active
- vlan_id: 20
- - mtu: 1500
- name: Vlan_30
- shutdown: enabled
- state: suspend
- vlan_id: 30
- - mtu: 1500
- name: fddi-default
- shutdown: enabled
- state: active
- vlan_id: 1002
- - mtu: 1500
- name: token-ring-default
- shutdown: enabled
- state: active
- vlan_id: 1003
- - mtu: 1500
- name: fddinet-default
- shutdown: enabled
- state: active
- vlan_id: 1004
- - mtu: 1500
- name: trnet-default
- shutdown: enabled
- state: active
- vlan_id: 1005
-
-replaced:
- before:
- - mtu: 1500
- name: default
- shutdown: disabled
- state: active
- vlan_id: 1
- - mtu: 1500
- name: VLAN0010
- shutdown: disabled
- state: active
- vlan_id: 10
- - mtu: 1500
- name: VLAN0020
- shutdown: disabled
- state: active
- vlan_id: 20
- - mtu: 1500
- name: VLAN0030
- shutdown: disabled
- state: active
- vlan_id: 30
- - mtu: 1500
- name: fddi-default
- shutdown: enabled
- state: active
- vlan_id: 1002
- - mtu: 1500
- name: token-ring-default
- shutdown: enabled
- state: active
- vlan_id: 1003
- - mtu: 1500
- name: fddinet-default
- shutdown: enabled
- state: active
- vlan_id: 1004
- - mtu: 1500
- name: trnet-default
- shutdown: enabled
- state: active
- vlan_id: 1005
-
- commands:
- - "vlan 20"
- - "name Test_VLAN20"
- - "mtu 700"
- - "vlan 30"
- - "name Test_VLAN30"
- - "mtu 1000"
-
- after:
- - mtu: 1500
- name: default
- shutdown: disabled
- state: active
- vlan_id: 1
- - mtu: 1500
- name: VLAN0010
- shutdown: disabled
- state: active
- vlan_id: 10
- - mtu: 700
- name: Test_VLAN20
- shutdown: disabled
- state: active
- vlan_id: 20
- - mtu: 1000
- name: Test_VLAN30
- shutdown: disabled
- state: active
- vlan_id: 30
- - mtu: 1500
- name: fddi-default
- shutdown: enabled
- state: active
- vlan_id: 1002
- - mtu: 1500
- name: token-ring-default
- shutdown: enabled
- state: active
- vlan_id: 1003
- - mtu: 1500
- name: fddinet-default
- shutdown: enabled
- state: active
- vlan_id: 1004
- - mtu: 1500
- name: trnet-default
- shutdown: enabled
- state: active
- vlan_id: 1005
-
-overridden:
- before:
- - mtu: 1500
- name: default
- shutdown: disabled
- state: active
- vlan_id: 1
- - mtu: 1500
- name: VLAN0010
- shutdown: disabled
- state: active
- vlan_id: 10
- - mtu: 1500
- name: VLAN0020
- shutdown: disabled
- state: active
- vlan_id: 20
- - mtu: 1500
- name: VLAN0030
- shutdown: disabled
- state: active
- vlan_id: 30
- - mtu: 1500
- name: fddi-default
- shutdown: enabled
- state: active
- vlan_id: 1002
- - mtu: 1500
- name: token-ring-default
- shutdown: enabled
- state: active
- vlan_id: 1003
- - mtu: 1500
- name: fddinet-default
- shutdown: enabled
- state: active
- vlan_id: 1004
- - mtu: 1500
- name: trnet-default
- shutdown: enabled
- state: active
- vlan_id: 1005
-
- commands:
- - "vlan 10"
- - "name VLAN_10"
- - "mtu 1000"
- - "no vlan 20"
- - "no vlan 30"
- - "vlan 40"
- - "name VLAN_40"
- - "mtu 850"
-
- after:
- - mtu: 1500
- name: default
- shutdown: disabled
- state: active
- vlan_id: 1
- - mtu: 1000
- name: VLAN_10
- shutdown: disabled
- state: active
- vlan_id: 10
- - mtu: 850
- name: VLAN_40
- shutdown: disabled
- state: active
- vlan_id: 40
- - mtu: 1500
- name: fddi-default
- shutdown: enabled
- state: active
- vlan_id: 1002
- - mtu: 1500
- name: token-ring-default
- shutdown: enabled
- state: active
- vlan_id: 1003
- - mtu: 1500
- name: fddinet-default
- shutdown: enabled
- state: active
- vlan_id: 1004
- - mtu: 1500
- name: trnet-default
- shutdown: enabled
- state: active
- vlan_id: 1005
-
-deleted:
- before:
- - mtu: 1500
- name: default
- shutdown: disabled
- state: active
- vlan_id: 1
- - mtu: 1500
- name: VLAN0010
- shutdown: disabled
- state: active
- vlan_id: 10
- - mtu: 1500
- name: VLAN0020
- shutdown: disabled
- state: active
- vlan_id: 20
- - mtu: 1500
- name: VLAN0030
- shutdown: disabled
- state: active
- vlan_id: 30
- - mtu: 1500
- name: fddi-default
- shutdown: enabled
- state: active
- vlan_id: 1002
- - mtu: 1500
- name: token-ring-default
- shutdown: enabled
- state: active
- vlan_id: 1003
- - mtu: 1500
- name: fddinet-default
- shutdown: enabled
- state: active
- vlan_id: 1004
- - mtu: 1500
- name: trnet-default
- shutdown: enabled
- state: active
- vlan_id: 1005
-
- commands:
- - "no vlan 10"
- - "no vlan 20"
- - "no vlan 30"
-
- after:
- - mtu: 1500
- name: default
- shutdown: disabled
- state: active
- vlan_id: 1
- - mtu: 1500
- name: fddi-default
- shutdown: enabled
- state: active
- vlan_id: 1002
- - mtu: 1500
- name: token-ring-default
- shutdown: enabled
- state: active
- vlan_id: 1003
- - mtu: 1500
- name: fddinet-default
- shutdown: enabled
- state: active
- vlan_id: 1004
- - mtu: 1500
- name: trnet-default
- shutdown: enabled
- state: active
- vlan_id: 1005
diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt
index 99bc316d2a..cb050a0467 100644
--- a/test/sanity/ignore.txt
+++ b/test/sanity/ignore.txt
@@ -92,20 +92,6 @@ lib/ansible/module_utils/network/dellos6/dellos6.py future-import-boilerplate
lib/ansible/module_utils/network/dellos6/dellos6.py metaclass-boilerplate
lib/ansible/module_utils/network/dellos9/dellos9.py future-import-boilerplate
lib/ansible/module_utils/network/dellos9/dellos9.py metaclass-boilerplate
-lib/ansible/module_utils/network/ios/ios.py future-import-boilerplate
-lib/ansible/module_utils/network/ios/ios.py metaclass-boilerplate
-lib/ansible/module_utils/network/ios/providers/cli/config/base.py future-import-boilerplate
-lib/ansible/module_utils/network/ios/providers/cli/config/base.py metaclass-boilerplate
-lib/ansible/module_utils/network/ios/providers/cli/config/bgp/address_family.py future-import-boilerplate
-lib/ansible/module_utils/network/ios/providers/cli/config/bgp/address_family.py metaclass-boilerplate
-lib/ansible/module_utils/network/ios/providers/cli/config/bgp/neighbors.py future-import-boilerplate
-lib/ansible/module_utils/network/ios/providers/cli/config/bgp/neighbors.py metaclass-boilerplate
-lib/ansible/module_utils/network/ios/providers/cli/config/bgp/process.py future-import-boilerplate
-lib/ansible/module_utils/network/ios/providers/cli/config/bgp/process.py metaclass-boilerplate
-lib/ansible/module_utils/network/ios/providers/module.py future-import-boilerplate
-lib/ansible/module_utils/network/ios/providers/module.py metaclass-boilerplate
-lib/ansible/module_utils/network/ios/providers/providers.py future-import-boilerplate
-lib/ansible/module_utils/network/ios/providers/providers.py metaclass-boilerplate
lib/ansible/module_utils/network/iosxr/iosxr.py future-import-boilerplate
lib/ansible/module_utils/network/iosxr/iosxr.py metaclass-boilerplate
lib/ansible/module_utils/network/iosxr/providers/cli/config/bgp/address_family.py future-import-boilerplate
@@ -1829,142 +1815,6 @@ lib/ansible/modules/network/f5/bigiq_regkey_license_assignment.py validate-modul
lib/ansible/modules/network/f5/bigiq_regkey_pool.py validate-modules:doc-required-mismatch
lib/ansible/modules/network/f5/bigiq_utility_license.py validate-modules:doc-required-mismatch
lib/ansible/modules/network/f5/bigiq_utility_license_assignment.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/_ios_interface.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/ios/_ios_interface.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/_ios_interface.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/ios/_ios_interface.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/_ios_interface.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/_ios_interface.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/ios/_ios_interface.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/ios/_ios_interface.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/ios/_ios_l2_interface.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/ios/_ios_l2_interface.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/_ios_l2_interface.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/ios/_ios_l2_interface.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/_ios_l2_interface.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/_ios_l2_interface.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/ios/_ios_l2_interface.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/ios/_ios_l2_interface.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/ios/_ios_l3_interface.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/ios/_ios_l3_interface.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/_ios_l3_interface.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/ios/_ios_l3_interface.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/_ios_l3_interface.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/_ios_l3_interface.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/ios/_ios_l3_interface.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/ios/_ios_l3_interface.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/ios/_ios_vlan.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/ios/_ios_vlan.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/_ios_vlan.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/ios/_ios_vlan.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/_ios_vlan.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/_ios_vlan.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/ios/_ios_vlan.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/ios/_ios_vlan.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/ios/_ios_vlan.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/ios/ios_banner.py future-import-boilerplate
-lib/ansible/modules/network/ios/ios_banner.py metaclass-boilerplate
-lib/ansible/modules/network/ios/ios_banner.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/ios_banner.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/ios_banner.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/ios_bgp.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/ios/ios_bgp.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/ios_bgp.py validate-modules:invalid-ansiblemodule-schema
-lib/ansible/modules/network/ios/ios_bgp.py validate-modules:nonexistent-parameter-documented
-lib/ansible/modules/network/ios/ios_bgp.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/ios/ios_command.py future-import-boilerplate
-lib/ansible/modules/network/ios/ios_command.py metaclass-boilerplate
-lib/ansible/modules/network/ios/ios_command.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/ios_command.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/ios_command.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/ios_command.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/ios/ios_command.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/ios/ios_config.py future-import-boilerplate
-lib/ansible/modules/network/ios/ios_config.py metaclass-boilerplate
-lib/ansible/modules/network/ios/ios_config.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/ios_config.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/ios_config.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/ios_config.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/ios/ios_config.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/ios/ios_facts.py future-import-boilerplate
-lib/ansible/modules/network/ios/ios_facts.py metaclass-boilerplate
-lib/ansible/modules/network/ios/ios_facts.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/ios_facts.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/ios_facts.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/ios/ios_facts.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/ios/ios_interfaces.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/ios/ios_l2_interfaces.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/ios/ios_l3_interfaces.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/ios/ios_l3_interfaces.py validate-modules:invalid-ansiblemodule-schema
-lib/ansible/modules/network/ios/ios_l3_interfaces.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/ios/ios_lag_interfaces.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/ios/ios_lag_interfaces.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/ios_linkagg.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/ios/ios_linkagg.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/ios_linkagg.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/ios/ios_linkagg.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/ios_linkagg.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/ios_linkagg.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/ios/ios_linkagg.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/ios/ios_linkagg.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/ios/ios_linkagg.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/ios/ios_lldp.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/ios/ios_lldp.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/ios_lldp.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/ios_lldp.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/ios_logging.py future-import-boilerplate
-lib/ansible/modules/network/ios/ios_logging.py metaclass-boilerplate
-lib/ansible/modules/network/ios/ios_logging.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/ios/ios_logging.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/ios_logging.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/ios/ios_logging.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/ios_logging.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/ios_logging.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/ios/ios_logging.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/ios/ios_logging.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/ios/ios_ntp.py future-import-boilerplate
-lib/ansible/modules/network/ios/ios_ntp.py metaclass-boilerplate
-lib/ansible/modules/network/ios/ios_ntp.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/ios_ntp.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/ios_ntp.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/ios_ping.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/ios_ping.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/ios_ping.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/ios/ios_static_route.py future-import-boilerplate
-lib/ansible/modules/network/ios/ios_static_route.py metaclass-boilerplate
-lib/ansible/modules/network/ios/ios_static_route.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/ios/ios_static_route.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/ios_static_route.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/ios/ios_static_route.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/ios_static_route.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/ios_static_route.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/ios/ios_static_route.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/ios/ios_static_route.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/ios/ios_system.py future-import-boilerplate
-lib/ansible/modules/network/ios/ios_system.py metaclass-boilerplate
-lib/ansible/modules/network/ios/ios_system.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/ios_system.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/ios_system.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/ios_system.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/ios/ios_system.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/ios/ios_user.py future-import-boilerplate
-lib/ansible/modules/network/ios/ios_user.py metaclass-boilerplate
-lib/ansible/modules/network/ios/ios_user.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/ios/ios_user.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/ios_user.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/ios/ios_user.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/ios_user.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/ios_user.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/ios/ios_user.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/ios/ios_user.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/ios/ios_user.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/ios/ios_vrf.py future-import-boilerplate
-lib/ansible/modules/network/ios/ios_vrf.py metaclass-boilerplate
-lib/ansible/modules/network/ios/ios_vrf.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/ios/ios_vrf.py validate-modules:doc-missing-type
-lib/ansible/modules/network/ios/ios_vrf.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/ios/ios_vrf.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/ios/ios_vrf.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/iosxr/_iosxr_interface.py validate-modules:doc-choices-do-not-match-spec
lib/ansible/modules/network/iosxr/_iosxr_interface.py validate-modules:doc-default-does-not-match-spec
lib/ansible/modules/network/iosxr/_iosxr_interface.py validate-modules:doc-elements-mismatch
@@ -3130,7 +2980,6 @@ lib/ansible/plugins/action/bigiq.py action-plugin-docs # undocumented action plu
lib/ansible/plugins/action/dellos10.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
lib/ansible/plugins/action/dellos6.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
lib/ansible/plugins/action/dellos9.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
-lib/ansible/plugins/action/ios.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
lib/ansible/plugins/action/iosxr.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
lib/ansible/plugins/action/junos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
lib/ansible/plugins/action/normal.py action-plugin-docs # default action plugin for modules without a dedicated action plugin
@@ -3163,8 +3012,6 @@ lib/ansible/plugins/doc_fragments/hcloud.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/hcloud.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/inventory_cache.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/inventory_cache.py metaclass-boilerplate
-lib/ansible/plugins/doc_fragments/ios.py future-import-boilerplate
-lib/ansible/plugins/doc_fragments/ios.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/iosxr.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/iosxr.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/junos.py future-import-boilerplate
diff --git a/test/units/modules/network/ios/fixtures/configure_terminal b/test/units/modules/network/ios/fixtures/configure_terminal
deleted file mode 100644
index 139597f9cb..0000000000
--- a/test/units/modules/network/ios/fixtures/configure_terminal
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/test/units/modules/network/ios/fixtures/ios_acl_interfaces.cfg b/test/units/modules/network/ios/fixtures/ios_acl_interfaces.cfg
deleted file mode 100644
index 1462c13530..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_acl_interfaces.cfg
+++ /dev/null
@@ -1,8 +0,0 @@
-interface GigabitEthernet0/1
-ip access-group 110 in
-ip access-group 123 out
-ipv6 traffic-filter temp_v6 in
-ipv6 traffic-filter test_v6 out
-interface GigabitEthernet0/2
-ip access-group 110 in
-ip access-group 123 out
diff --git a/test/units/modules/network/ios/fixtures/ios_acls_config.cfg b/test/units/modules/network/ios/fixtures/ios_acls_config.cfg
deleted file mode 100644
index c90c8db909..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_acls_config.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-ip access-list extended 110
-deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10
-ipv6 access-list R1_TRAFFIC
-deny tcp any eq www any eq telnet ack dscp af11 \ No newline at end of file
diff --git a/test/units/modules/network/ios/fixtures/ios_banner_show_banner.txt b/test/units/modules/network/ios/fixtures/ios_banner_show_banner.txt
deleted file mode 100644
index a134a31753..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_banner_show_banner.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-this is a sample
-mulitline banner
-used for testing
diff --git a/test/units/modules/network/ios/fixtures/ios_banner_show_running_config_ios12.txt b/test/units/modules/network/ios/fixtures/ios_banner_show_running_config_ios12.txt
deleted file mode 100644
index 004387a9b8..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_banner_show_running_config_ios12.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-banner exec ^C
-this is a sample
-mulitline banner
-used for testing
-^C
-banner login ^C
-this is a sample
-mulitline banner
-used for testing
-^C
-!
-dummy
-end
-of
-config
diff --git a/test/units/modules/network/ios/fixtures/ios_bgp_config.cfg b/test/units/modules/network/ios/fixtures/ios_bgp_config.cfg
deleted file mode 100644
index 9fec934aa4..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_bgp_config.cfg
+++ /dev/null
@@ -1,24 +0,0 @@
-!
-router bgp 64496
- bgp router-id 192.0.2.1
- bgp log-neighbor-changes
- neighbor 192.51.100.1 remote-as 64496
- neighbor 192.51.100.1 timers 120 360 360
- neighbor 198.51.100.3 remote-as 64498
- neighbor 203.0.113.5 remote-as 500
- neighbor 203.0.113.5 description EBGP_PEER
- !
- address-family ipv4
- network 192.0.2.0 mask 255.255.254.0 route-map RMAP_1
- network 198.51.100.0 mask 255.255.255.128 route-map RMAP_2
- redistribute static metric 100
- redistribute eigrp metric 10 route-map RMAP_3
- neighbor 203.0.113.1 remove-private-as
- neighbor 203.0.113.1 maximum-prefix 100
- exit-address-family
- !
- address-family ipv4 multicast
- network 203.0.113.0 mask 255.255.255.224 route-map RMAP_1
- network 192.0.2.0 mask 255.255.255.192 route-map RMAP_2
- exit-address-family
-!
diff --git a/test/units/modules/network/ios/fixtures/ios_config_config.cfg b/test/units/modules/network/ios/fixtures/ios_config_config.cfg
deleted file mode 100644
index afad9d08aa..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_config_config.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-!
-hostname router
-!
-interface GigabitEthernet0/0
- ip address 1.2.3.4 255.255.255.0
- description test string
-!
-interface GigabitEthernet0/1
- ip address 6.7.8.9 255.255.255.0
- description test string
- shutdown
-!
diff --git a/test/units/modules/network/ios/fixtures/ios_config_defaults.cfg b/test/units/modules/network/ios/fixtures/ios_config_defaults.cfg
deleted file mode 100644
index e54645ab14..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_config_defaults.cfg
+++ /dev/null
@@ -1,13 +0,0 @@
-!
-hostname router
-!
-interface GigabitEthernet0/0
- ip address 1.2.3.4 255.255.255.0
- description test string
- no shutdown
-!
-interface GigabitEthernet0/1
- ip address 6.7.8.9 255.255.255.0
- description test string
- shutdown
-!
diff --git a/test/units/modules/network/ios/fixtures/ios_config_src.cfg b/test/units/modules/network/ios/fixtures/ios_config_src.cfg
deleted file mode 100644
index b3d8961a99..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_config_src.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-!
-hostname foo
-!
-interface GigabitEthernet0/0
- no ip address
-!
-interface GigabitEthernet0/1
- ip address 6.7.8.9 255.255.255.0
- description test string
- shutdown
-!
diff --git a/test/units/modules/network/ios/fixtures/ios_facts_dir b/test/units/modules/network/ios/fixtures/ios_facts_dir
deleted file mode 100644
index 3adc44adba..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_facts_dir
+++ /dev/null
@@ -1,23 +0,0 @@
-Directory of bootflash:/
-
- 11 drwx 16384 Jun 1 2017 13:03:27 +00:00 lost+found
-325121 drwx 4096 Jun 1 2017 13:03:54 +00:00 .super.iso.dir
- 12 -rw- 31 Jun 22 2018 15:17:06 +00:00 .CsrLxc_LastInstall
- 13 -rw- 69 Jun 1 2017 13:05:53 +00:00 virtual-instance.conf
-438913 drwx 4096 Jun 1 2017 13:04:57 +00:00 core
- 15 -rw- 125736960 Jun 1 2017 13:03:54 +00:00 iosxe-remote-mgmt.16.03.04.ova
-105667 -rw- 292164568 Jun 1 2017 13:04:04 +00:00 csr1000v-mono-universalk9.16.03.04.SPA.pkg
-105668 -rw- 34370768 Jun 1 2017 13:04:10 +00:00 csr1000v-rpboot.16.03.04.SPA.pkg
-105666 -rw- 5317 Jun 1 2017 13:04:10 +00:00 packages.conf
-195073 drwx 4096 Jun 1 2017 13:04:51 +00:00 .prst_sync
-414529 drwx 4096 Jun 1 2017 13:04:57 +00:00 .rollback_timer
- 16 -rw- 0 Jun 1 2017 13:05:00 +00:00 tracelogs.kZn
-16257 drwx 24576 Jun 22 2018 16:03:11 +00:00 tracelogs
-349505 drwx 4096 Jun 1 2017 13:05:08 +00:00 .installer
-292609 drwx 4096 Jun 1 2017 13:05:59 +00:00 virtual-instance
- 17 -rw- 30 Jun 22 2018 15:17:59 +00:00 throughput_monitor_params
-48769 drwx 4096 Jun 1 2017 13:06:04 +00:00 onep
- 19 -rw- 376 Jun 22 2018 15:18:11 +00:00 csrlxc-cfg.log
- 20 -rw- 0 Jun 22 2018 15:17:59 +00:00 cvac.log
-
-7897796608 bytes total (6608056320 bytes free)
diff --git a/test/units/modules/network/ios/fixtures/ios_facts_show_cdp b/test/units/modules/network/ios/fixtures/ios_facts_show_cdp
deleted file mode 100644
index c5fff7d278..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_facts_show_cdp
+++ /dev/null
@@ -1,4 +0,0 @@
-Global CDP information:
- Sending CDP packets every 60 seconds
- Sending a holdtime value of 180 seconds
- Sending CDPv2 advertisements is enabled
diff --git a/test/units/modules/network/ios/fixtures/ios_facts_show_cdp_neighbors_detail b/test/units/modules/network/ios/fixtures/ios_facts_show_cdp_neighbors_detail
deleted file mode 100644
index b3d5453dd2..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_facts_show_cdp_neighbors_detail
+++ /dev/null
@@ -1,40 +0,0 @@
--------------------------
-Device ID: R2
-Entry address(es):
- IP address: 10.0.0.3
-Platform: cisco CSR1000V, Capabilities: Router IGMP
-Interface: GigabitEthernet1, Port ID (outgoing port): GigabitEthernet2
-Holdtime : 149 sec
-
-Version :
-Cisco IOS Software [Everest], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.6.4, RELEASE SOFTWARE (fc3)
-Technical Support: http://www.cisco.com/techsupport
-Copyright (c) 1986-2018 by Cisco Systems, Inc.
-Compiled Sun 08-Jul-18 04:30 by mcpre
-
-advertisement version: 2
-Duplex: full
-Management address(es):
- IP address: 10.0.0.3
-
--------------------------
-Device ID: R3
-Entry address(es):
- IP address: 10.0.0.4
-Platform: cisco CSR1000V, Capabilities: Router IGMP
-Interface: GigabitEthernet1, Port ID (outgoing port): GigabitEthernet3
-Holdtime : 149 sec
-
-Version :
-Cisco IOS Software [Everest], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.6.4, RELEASE SOFTWARE (fc3)
-Technical Support: http://www.cisco.com/techsupport
-Copyright (c) 1986-2018 by Cisco Systems, Inc.
-Compiled Sun 08-Jul-18 04:30 by mcpre
-
-advertisement version: 2
-Duplex: full
-Management address(es):
- IP address: 10.0.0.4
-
-
-Total cdp entries displayed : 2
diff --git a/test/units/modules/network/ios/fixtures/ios_facts_show_interfaces b/test/units/modules/network/ios/fixtures/ios_facts_show_interfaces
deleted file mode 100644
index 002b8b9eee..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_facts_show_interfaces
+++ /dev/null
@@ -1,61 +0,0 @@
-GigabitEthernet0/0 is up, line protocol is up
- Hardware is iGbE, address is 5e00.0003.0000 (bia 5e00.0003.0000)
- Description: OOB Management
- Internet address is 10.8.38.66/24
- MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
- reliability 253/255, txload 1/255, rxload 1/255
- Encapsulation ARPA, loopback not set
- Keepalive set (10 sec)
- Full Duplex, Auto Speed, link type is auto, media type is RJ45
- output flow-control is unsupported, input flow-control is unsupported
- ARP type: ARPA, ARP Timeout 04:00:00
- Last input 00:00:00, output 00:00:00, output hang never
- Last clearing of "show interface" counters never
- Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
- Queueing strategy: fifo
- Output queue: 0/40 (size/max)
- 5 minute input rate 3000 bits/sec, 2 packets/sec
- 5 minute output rate 2000 bits/sec, 2 packets/sec
- 2226666 packets input, 398288440 bytes, 0 no buffer
- Received 156442 broadcasts (0 IP multicasts)
- 25440 runts, 0 giants, 0 throttles
- 25440 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
- 0 watchdog, 0 multicast, 0 pause input
- 1304895 packets output, 119337031 bytes, 0 underruns
- 0 output errors, 0 collisions, 3 interface resets
- 1083697 unknown protocol drops
- 0 babbles, 0 late collision, 0 deferred
- 1 lost carrier, 0 no carrier, 0 pause output
- 0 output buffer failures, 0 output buffers swapped out
-GigabitEthernet1 is up, line protocol is up
- Hardware is CSR vNIC, address is 5e00.0006.0000 (bia 5e00.0006.0000)
- Description: OOB Management
- Internet address is 10.8.38.67/24
- MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
- reliability 255/255, txload 1/255, rxload 1/255
- Encapsulation ARPA, loopback not set
- Keepalive set (10 sec)
- Full Duplex, 1000Mbps, link type is auto, media type is RJ45
- output flow-control is unsupported, input flow-control is unsupported
- ARP type: ARPA, ARP Timeout 04:00:00
- Last input 00:00:01, output 00:00:07, output hang never
- Last clearing of "show interface" counters never
- Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0
- Queueing strategy: fifo
- Output queue: 0/40 (size/max)
- 5 minute input rate 3000 bits/sec, 3 packets/sec
- 5 minute output rate 3000 bits/sec, 3 packets/sec
- 8463791 packets input, 1445150230 bytes, 0 no buffer
- Received 0 broadcasts (0 IP multicasts)
- 0 runts, 0 giants, 0 throttles
- 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
- 0 watchdog, 0 multicast, 0 pause input
- 3521571 packets output, 348781823 bytes, 0 underruns
- 0 output errors, 0 collisions, 1 interface resets
- 4150764 unknown protocol drops
- 0 babbles, 0 late collision, 0 deferred
- 0 lost carrier, 0 no carrier, 0 pause output
- 0 output buffer failures, 0 output buffers swapped out
-Tunnel1110 is up, line protocol is up
- Hardware is Tunnel
- Internet address is 10.10.10.2/30
diff --git a/test/units/modules/network/ios/fixtures/ios_facts_show_ip_interface b/test/units/modules/network/ios/fixtures/ios_facts_show_ip_interface
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_facts_show_ip_interface
+++ /dev/null
diff --git a/test/units/modules/network/ios/fixtures/ios_facts_show_ipv6_interface b/test/units/modules/network/ios/fixtures/ios_facts_show_ipv6_interface
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_facts_show_ipv6_interface
+++ /dev/null
diff --git a/test/units/modules/network/ios/fixtures/ios_facts_show_lldp b/test/units/modules/network/ios/fixtures/ios_facts_show_lldp
deleted file mode 100644
index 09847c318c..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_facts_show_lldp
+++ /dev/null
@@ -1,6 +0,0 @@
-
-Global LLDP Information:
- Status: ACTIVE
- LLDP advertisements are sent every 30 seconds
- LLDP hold time advertised is 120 seconds
- LLDP interface reinitialisation delay is 2 seconds
diff --git a/test/units/modules/network/ios/fixtures/ios_facts_show_lldp_neighbors_detail b/test/units/modules/network/ios/fixtures/ios_facts_show_lldp_neighbors_detail
deleted file mode 100644
index adc4f30e46..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_facts_show_lldp_neighbors_detail
+++ /dev/null
@@ -1,50 +0,0 @@
-------------------------------------------------
-Local Intf: Gi1
-Chassis id: 001e.14d4.5300
-Port id: Gi3
-Port Description: GigabitEthernet3
-System Name: R3
-
-System Description:
-Cisco IOS Software [Everest], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.6.4, RELEASE SOFTWARE (fc3)
-Technical Support: http://www.cisco.com/techsupport
-Copyright (c) 1986-2018 by Cisco Systems, Inc.
-Compiled Sun 08-Jul-18 04:30 by
-
-Time remaining: 116 seconds
-System Capabilities: B,R
-Enabled Capabilities: R
-Management Addresses:
- IP: 10.0.0.4
-Auto Negotiation - not supported
-Physical media capabilities - not advertised
-Media Attachment Unit type - not advertised
-Vlan ID: - not advertised
-
-------------------------------------------------
-Local Intf: Gi3
-Chassis id: 001e.e6c9.6d00
-Port id: Gi1
-Port Description: GigabitEthernet1
-System Name: Rtest
-
-System Description:
-Cisco IOS Software [Everest], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.6.4, RELEASE SOFTWARE (fc3)
-Technical Support: http://www.cisco.com/techsupport
-Copyright (c) 1986-2018 by Cisco Systems, Inc.
-Compiled Sun 08-Jul-18 04:30 by
-
-Time remaining: 116 seconds
-System Capabilities: B,R
-Enabled Capabilities: R
-Management Addresses:
- IP: 10.3.0.3
-Auto Negotiation - not supported
-Physical media capabilities - not advertised
-Media Attachment Unit type - not advertised
-Vlan ID: - not advertised
-
-
-Total entries displayed: 2
-
-
diff --git a/test/units/modules/network/ios/fixtures/ios_facts_show_memory_statistics b/test/units/modules/network/ios/fixtures/ios_facts_show_memory_statistics
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_facts_show_memory_statistics
+++ /dev/null
diff --git a/test/units/modules/network/ios/fixtures/ios_facts_show_version b/test/units/modules/network/ios/fixtures/ios_facts_show_version
deleted file mode 100644
index 58322c80b4..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_facts_show_version
+++ /dev/null
@@ -1,68 +0,0 @@
-Cisco Internetwork Operating System Software
-IOS (tm) C3750 Software (C3750-I5-M), Version 12.1(14)EA1, RELEASE SOFTWARE (fc1)
-Copyright (c) 1986-2003 by cisco Systems, Inc.
-Compiled Tue 22-Jul-03 13:17 by antonino
-Image text-base: 0x00003000, data-base: 0x008F0CF8
-
-ROM: Bootstrap program is C3750 boot loader
-BOOTLDR: C3750 Boot Loader (C3750-HBOOT-M) Version 12.1(11r)AX, RELEASE SOFTWARE (fc1)
-
-3750RJ uptime is 1 hour, 29 minutes
-System returned to ROM by power-on
-System image file is "flash:c3750-i5-mz.121.14-EA1/c3750-i5-mz.121.14-EA1.bin"
-
-cisco WS-C3750-24TS (PowerPC405) processor (revision A0) with 120822K/10240K bytes of memory.
-Processor board ID CAT0726R0ZU
-Last reset from power-on
-Bridging software.
-2 Virtual Ethernet/IEEE 802.3 interface(s)
-48 FastEthernet/IEEE 802.3 interface(s)
-16 Gigabit Ethernet/IEEE 802.3 interface(s)
-The password-recovery mechanism is enabled.
-
-512K bytes of flash-simulated non-volatile configuration memory.
-Base ethernet MAC Address : 00:0D:29:B4:18:00
-Motherboard assembly number : 73-7055-06
-Power supply part number : 341-0034-01
-Motherboard serial number : CAT0726043V
-Power supply serial number : PHI0708009K
-Model revision number : A0
-Motherboard revision number : A0
-Model number : WS-C3750-24TS-E
-System serial number : CAT0726R0ZU
-
-Switch Ports Model SW Version SW Image
------- ----- ----- ---------- ----------
-* 1 26 WS-C3750-24TS 12.1(14)EA1 C3750-I5-M
-2 26 WS-C3750-24TS 12.1(14)EA1 C3750-I5-M
-3 12 WS-C3750G-12S 12.1(14)EA1 C3750-I5-M
-
-Switch 02
----------
-Switch Uptime : 1 hour, 29 minutes
-Base ethernet MAC Address : 00:0D:29:B4:3F:00
-Motherboard assembly number : 73-7055-06
-Power supply part number : 341-0034-01
-Motherboard serial number : CAT07260438
-Power supply serial number : PHI0708008X
-Model revision number : A0
-Motherboard revision number : A0
-Model number : WS-C3750-24TS-E
-System serial number : CAT0726R10A
-
-Switch 03
----------
-Switch Uptime : 1 hour, 29 minutes
-Base ethernet MAC Address : 00:0D:BD:6A:3E:00
-Motherboard assembly number : 73-8307-06
-Power supply part number : 341-0048-01
-Motherboard serial number : CAT073205S2
-Power supply serial number : DTH0731055Z
-Model revision number : A0
-Motherboard revision number : A0
-Model number : WS-C3750G-12S-E
-System serial number : CAT0732R0M4
-Top assembly part number : 800-23419-01
-Top assembly revision number : A0
-
-Configuration register is 0xF
diff --git a/test/units/modules/network/ios/fixtures/ios_logging_config.cfg b/test/units/modules/network/ios/fixtures/ios_logging_config.cfg
deleted file mode 100644
index 8a51afa7e5..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_logging_config.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-!
-logging buffered 5000
-logging console informational
-logging facility local0
-no logging monitor
-logging host 1.2.3.4 transport tcp
-logging host 1.2.3.4
-logging host 2.3.4.5
-logging host 1.2.3.4 transport tcp port 1000
-logging host 1.2.3.4 transport udp port 1000
-!
diff --git a/test/units/modules/network/ios/fixtures/ios_logging_config_ios12.cfg b/test/units/modules/network/ios/fixtures/ios_logging_config_ios12.cfg
deleted file mode 100644
index 58be36dff5..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_logging_config_ios12.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-!
-logging buffered 5000
-logging console informational
-logging facility local0
-logging 2.3.4.5
-!
diff --git a/test/units/modules/network/ios/fixtures/ios_ntp_config.cfg b/test/units/modules/network/ios/fixtures/ios_ntp_config.cfg
deleted file mode 100644
index ccd8558ab3..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_ntp_config.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-ntp logging
-ntp authentication-key 10 md5 15435A030726242723273C21181319000A 7
-ntp authenticate
-ntp trusted-key 10
-ntp source Loopback0
-ntp access-group peer NTP_ACL
-ntp server 10.75.32.5
diff --git a/test/units/modules/network/ios/fixtures/ios_ping_ping_10.255.255.250_repeat_2 b/test/units/modules/network/ios/fixtures/ios_ping_ping_10.255.255.250_repeat_2
deleted file mode 100644
index 9b25d64549..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_ping_ping_10.255.255.250_repeat_2
+++ /dev/null
@@ -1,4 +0,0 @@
-Type escape sequence to abort.
-Sending 2, 100-byte ICMP Echos to 10.255.255.250, timeout is 2 seconds:
-..
-Success rate is 0 percent (0/2)
diff --git a/test/units/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_repeat_2 b/test/units/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_repeat_2
deleted file mode 100644
index 4dddd76b0f..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_repeat_2
+++ /dev/null
@@ -1,4 +0,0 @@
-Type escape sequence to abort.
-Sending 2, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
-!!
-Success rate is 100 percent (2/2), round-trip min/avg/max = 25/25/25 ms
diff --git a/test/units/modules/network/ios/fixtures/ios_static_routes_config.cfg b/test/units/modules/network/ios/fixtures/ios_static_routes_config.cfg
deleted file mode 100644
index b947d5dcfe..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_static_routes_config.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-ip route vrf ansible_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 175 tag 50
-ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 60
diff --git a/test/units/modules/network/ios/fixtures/ios_system_config.cfg b/test/units/modules/network/ios/fixtures/ios_system_config.cfg
deleted file mode 100644
index 3330b4aa34..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_system_config.cfg
+++ /dev/null
@@ -1,14 +0,0 @@
-!
-hostname ios01
-!
-ip domain list vrf management example.net
-ip domain list example.net
-ip domain list example.com
-ip domain lookup source-interface GigabitEthernet0/0
-ip domain name vrf management eng.example.net
-ip domain name eng.example.net
-ip name-server vrf management 8.8.8.8
-ip name-server 8.8.8.8
-!
-vrf definition test
-!
diff --git a/test/units/modules/network/ios/fixtures/ios_user_config.cfg b/test/units/modules/network/ios/fixtures/ios_user_config.cfg
deleted file mode 100644
index dd5b2095fa..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_user_config.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-username admin view network-admin secret 5 $1$mdQIUxjg$3t3lzBpfKfITKvFm1uEIY.
-username ansible view network-admin secret 5 $1$3yWSXiIi$VdzV59ChiurrNdGxlDeAW/
diff --git a/test/units/modules/network/ios/fixtures/ios_vlan_config.cfg b/test/units/modules/network/ios/fixtures/ios_vlan_config.cfg
deleted file mode 100644
index 69ac0b5e55..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_vlan_config.cfg
+++ /dev/null
@@ -1,9 +0,0 @@
-VLAN Name Status Ports
----- -------------------------------- --------- -------------------------------
-1 default active Gi1/0/4, Gi1/0/5
- Gi1/0/52
- Gi1/0/54
-2 vlan2 active Gi1/0/6, Gi1/0/7
-9 vlan9 active Gi1/0/6
-1002 fddi-default act/unsup
-1003 fddo-default act/unsup
diff --git a/test/units/modules/network/ios/fixtures/ios_vrf_config.cfg b/test/units/modules/network/ios/fixtures/ios_vrf_config.cfg
deleted file mode 100644
index 0a2d35f8fb..0000000000
--- a/test/units/modules/network/ios/fixtures/ios_vrf_config.cfg
+++ /dev/null
@@ -1,81 +0,0 @@
-!
-vrf definition test_1
- description test vrf 1
- rd 1:100
-!
-vrf definition test_2
- description test vrf 2
-!
-vrf definition test_3
-!
-vrf definition test_17
- rd 2:100
- !
- address-family ipv4
- exit-address-family
- !
- address-family ipv6
- route-target export 168.0.0.15:100
- route-target export 4:100
- route-target export 2:100
- route-target export 168.0.0.13:100
- route-target import 168.0.0.14:100
- route-target import 2:100
- route-target import 168.0.0.13:100
- exit-address-family
-!
-vrf definition test_18
- rd 168.0.0.9:100
- !
- address-family ipv4
- route-target export 168.0.0.10:100
- route-target export 168.0.0.9:100
- route-target export 3:100
- route-target import 168.0.0.9:100
- route-target import 3:100
- route-target import 168.0.0.10:600
- exit-address-family
- !
- address-family ipv6
- exit-address-family
-!
-vrf definition test_19
- rd 10:700
- route-target export 2:102
- route-target export 2:103
- route-target export 2:100
- route-target export 2:101
- route-target import 2:104
- route-target import 2:105
- route-target import 2:100
- route-target import 2:101
- !
- address-family ipv4
- route-target export 2:102
- route-target export 2:103
- route-target export 2:100
- route-target export 2:101
- route-target import 2:104
- route-target import 2:105
- route-target import 2:100
- route-target import 2:101
- exit-address-family
- !
- address-family ipv6
- route-target export 2:102
- route-target export 2:103
- route-target export 2:100
- route-target export 2:101
- route-target import 2:104
- route-target import 2:105
- route-target import 2:100
- route-target import 2:101
- exit-address-family
-!
-interface Ethernet1
- ip address 1.2.3.4/5
-!
-interface Ethernet2
- ip address 1.2.3.4/5
- vrf forwarding test_1
-!
diff --git a/test/units/modules/network/ios/fixtures/show_version b/test/units/modules/network/ios/fixtures/show_version
deleted file mode 100644
index d293df3a18..0000000000
--- a/test/units/modules/network/ios/fixtures/show_version
+++ /dev/null
@@ -1,45 +0,0 @@
-Cisco IOS Software, IOSv Software (VIOS-ADVENTERPRISEK9-M), Version 15.6(1)T, RELEASE SOFTWARE (fc1)
-Technical Support: http://www.cisco.com/techsupport
-Copyright (c) 1986-2015 by Cisco Systems, Inc.
-Compiled Fri 20-Nov-15 13:39 by prod_rel_team
-
-
-ROM: Bootstrap program is IOSv
-
-ios01 uptime is 7 weeks, 5 days, 11 hours, 14 minutes
-System returned to ROM by reload
-System image file is "flash0:/vios-adventerprisek9-m"
-Last reload reason: Unknown reason
-
-
-
-This product contains cryptographic features and is subject to United
-States and local country laws governing import, export, transfer and
-use. Delivery of Cisco cryptographic products does not imply
-third-party authority to import, export, distribute or use encryption.
-Importers, exporters, distributors and users are responsible for
-compliance with U.S. and local country laws. By using this product you
-agree to comply with applicable laws and regulations. If you are unable
-to comply with U.S. and local laws, return this product immediately.
-
-A summary of U.S. laws governing Cisco cryptographic products may be found at:
-http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
-
-If you require further assistance please contact us by sending email to
-export@cisco.com.
-
-Cisco IOSv (revision 1.0) with with 472441K/50176K bytes of memory.
-Processor board ID 99I10YFMUCJ3JEZMV4DQB
-3 Gigabit Ethernet interfaces
-DRAM configuration is 72 bits wide with parity disabled.
-256K bytes of non-volatile configuration memory.
-2097152K bytes of ATA System CompactFlash 0 (Read/Write)
-0K bytes of ATA CompactFlash 1 (Read/Write)
-0K bytes of ATA CompactFlash 2 (Read/Write)
-10080K bytes of ATA CompactFlash 3 (Read/Write)
-
-
-
-Configuration register is 0x0
-
-
diff --git a/test/units/modules/network/ios/ios_module.py b/test/units/modules/network/ios/ios_module.py
deleted file mode 100644
index 34df31c812..0000000000
--- a/test/units/modules/network/ios/ios_module.py
+++ /dev/null
@@ -1,87 +0,0 @@
-# (c) 2016 Red Hat Inc.
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-import os
-import json
-
-from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase
-
-
-fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
-fixture_data = {}
-
-
-def load_fixture(name):
- path = os.path.join(fixture_path, name)
-
- if path in fixture_data:
- return fixture_data[path]
-
- with open(path) as f:
- data = f.read()
-
- try:
- data = json.loads(data)
- except Exception:
- pass
-
- fixture_data[path] = data
- return data
-
-
-class TestIosModule(ModuleTestCase):
-
- def execute_module(self, failed=False, changed=False, commands=None, sort=True, defaults=False):
- self.load_fixtures(commands)
-
- if failed:
- result = self.failed()
- self.assertTrue(result['failed'], result)
- else:
- result = self.changed(changed)
- self.assertEqual(result['changed'], changed, result)
-
- if commands is not None:
- if sort:
- self.assertEqual(sorted(commands), sorted(result['commands']), result['commands'])
- else:
- self.assertEqual(commands, result['commands'], result['commands'])
-
- return result
-
- def failed(self):
- with self.assertRaises(AnsibleFailJson) as exc:
- self.module.main()
-
- result = exc.exception.args[0]
- self.assertTrue(result['failed'], result)
- return result
-
- def changed(self, changed=False):
- with self.assertRaises(AnsibleExitJson) as exc:
- self.module.main()
-
- result = exc.exception.args[0]
- self.assertEqual(result['changed'], changed, result)
- return result
-
- def load_fixtures(self, commands=None):
- pass
diff --git a/test/units/modules/network/ios/test_ios_acl_interfaces.py b/test/units/modules/network/ios/test_ios_acl_interfaces.py
deleted file mode 100644
index b3296062a5..0000000000
--- a/test/units/modules/network/ios/test_ios_acl_interfaces.py
+++ /dev/null
@@ -1,335 +0,0 @@
-#
-# (c) 2019, Ansible by Red Hat, inc
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-#
-
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from units.compat.mock import patch
-from ansible.modules.network.ios import ios_acl_interfaces
-from units.modules.utils import set_module_args
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosAclInterfacesModule(TestIosModule):
- module = ios_acl_interfaces
-
- def setUp(self):
- super(TestIosAclInterfacesModule, self).setUp()
-
- self.mock_get_config = patch('ansible.module_utils.network.common.network.Config.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.module_utils.network.common.network.Config.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_resource_connection_config = patch('ansible.module_utils.network.common.cfg.base.'
- 'get_resource_connection')
- self.get_resource_connection_config = self.mock_get_resource_connection_config.start()
-
- self.mock_get_resource_connection_facts = patch('ansible.module_utils.network.common.facts.facts.'
- 'get_resource_connection')
- self.get_resource_connection_facts = self.mock_get_resource_connection_facts.start()
-
- self.mock_edit_config = patch('ansible.module_utils.network.ios.providers.providers.CliProvider.edit_config')
- self.edit_config = self.mock_edit_config.start()
-
- self.mock_execute_show_command = patch('ansible.module_utils.network.ios.facts.acl_interfaces.acl_interfaces.'
- 'Acl_InterfacesFacts.get_acl_interfaces_data')
- self.execute_show_command = self.mock_execute_show_command.start()
-
- def tearDown(self):
- super(TestIosAclInterfacesModule, self).tearDown()
- self.mock_get_resource_connection_config.stop()
- self.mock_get_resource_connection_facts.stop()
- self.mock_edit_config.stop()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
- self.mock_execute_show_command.stop()
-
- def load_fixtures(self, commands=None):
-
- def load_from_file(*args, **kwargs):
- return load_fixture('ios_acl_interfaces.cfg')
- self.execute_show_command.side_effect = load_from_file
-
- def test_ios_acl_interfaces_merged(self):
- set_module_args(
- dict(config=[
- dict(name="GigabitEthernet0/1",
- access_groups=[
- dict(afi="ipv4",
- acls=[
- dict(name="merge_110",
- direction="in"),
- dict(name="merge_123",
- direction="out")
- ]),
- dict(afi="ipv6",
- acls=[
- dict(name="merge_temp_v6",
- direction="in"),
- dict(name="merge_test_v6",
- direction="out")
- ])
- ]),
- dict(name="GigabitEthernet0/2",
- access_groups=[
- dict(afi="ipv4",
- acls=[
- dict(name="merge_110",
- direction="in"),
- dict(name="merge_123",
- direction="out")
- ])
- ])
- ], state="merged"))
- commands = ['interface GigabitEthernet0/1',
- 'ip access-group merge_110 in',
- 'ip access-group merge_123 out',
- 'ipv6 traffic-filter merge_temp_v6 in',
- 'ipv6 traffic-filter merge_test_v6 out',
- 'interface GigabitEthernet0/2',
- 'ip access-group merge_110 in',
- 'ip access-group merge_123 out'
- ]
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], commands)
-
- def test_ios_acl_interfaces_merged_idempotent(self):
- set_module_args(dict(
- config=[dict(
- name="GigabitEthernet0/1",
- access_groups=[dict(
- afi="ipv4",
- acls=[dict(
- name="110",
- direction="in"
- ), dict(
- name="123",
- direction="out"
- )]
- ), dict(
- afi="ipv6",
- acls=[dict(
- name="test_v6",
- direction="out"
- ), dict(
- name="temp_v6",
- direction="in"
- )]
- )]
- ), dict(
- name="GigabitEthernet0/2",
- access_groups=[dict(
- afi="ipv4",
- acls=[dict(
- name="110",
- direction="in"
- ), dict(
- name="123",
- direction="out"
- )]
- )]
- )], state="merged"
- ))
- self.execute_module(changed=False, commands=[])
-
- def test_ios_acl_interfaces_replaced(self):
- set_module_args(dict(
- config=[dict(
- name="GigabitEthernet0/1",
- access_groups=[dict(
- afi="ipv4",
- acls=[dict(
- name="replace_100",
- direction="out"
- ), dict(
- name="110",
- direction="in"
- )]
- )]
- )], state="replaced"
- ))
- commands = ['interface GigabitEthernet0/1',
- 'no ip access-group 123 out',
- 'no ipv6 traffic-filter temp_v6 in',
- 'no ipv6 traffic-filter test_v6 out',
- 'ip access-group replace_100 out'
- ]
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], commands)
-
- def test_ios_acl_interfaces_replaced_idempotent(self):
- set_module_args(dict(
- config=[dict(
- name="GigabitEthernet0/1",
- access_groups=[dict(
- afi="ipv4",
- acls=[dict(
- name="110",
- direction="in"
- ), dict(
- name="123",
- direction="out"
- )]
- ), dict(
- afi="ipv6",
- acls=[dict(
- name="test_v6",
- direction="out"
- ), dict(
- name="temp_v6",
- direction="in"
- )]
- )]
- )], state="replaced"
- ))
- self.execute_module(changed=False, commands=[])
-
- def test_ios_acl_interfaces_overridden(self):
- set_module_args(dict(
- config=[dict(
- name="GigabitEthernet0/1",
- access_groups=[dict(
- afi="ipv4",
- acls=[dict(
- name="100",
- direction="out"
- ), dict(
- name="110",
- direction="in"
- )]
- )]
- )], state="overridden"
- ))
-
- commands = [
- 'interface GigabitEthernet0/1',
- 'no ip access-group 123 out',
- 'no ipv6 traffic-filter test_v6 out',
- 'no ipv6 traffic-filter temp_v6 in',
- 'ip access-group 100 out',
- 'interface GigabitEthernet0/2',
- 'no ip access-group 110 in',
- 'no ip access-group 123 out'
- ]
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_acl_interfaces_overridden_idempotent(self):
- set_module_args(dict(
- config=[dict(
- name="GigabitEthernet0/1",
- access_groups=[dict(
- afi="ipv4",
- acls=[dict(
- name="110",
- direction="in"
- ), dict(
- name="123",
- direction="out"
- )]
- ), dict(
- afi="ipv6",
- acls=[dict(
- name="test_v6",
- direction="out"
- ), dict(
- name="temp_v6",
- direction="in"
- )]
- )]
- ), dict(
- name="GigabitEthernet0/2",
- access_groups=[dict(
- afi="ipv4",
- acls=[dict(
- name="110",
- direction="in"
- ), dict(
- name="123",
- direction="out"
- )]
- )]
- )], state="overridden"
- ))
- self.execute_module(changed=False, commands=[])
-
- def test_ios_acl_interfaces_deleted_interface(self):
- set_module_args(
- dict(config=[
- dict(name="GigabitEthernet0/1")
- ], state="deleted"))
- commands = ['interface GigabitEthernet0/1',
- 'no ip access-group 110 in',
- 'no ip access-group 123 out',
- 'no ipv6 traffic-filter test_v6 out',
- 'no ipv6 traffic-filter temp_v6 in',
- ]
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_acl_interfaces_deleted_afi(self):
- set_module_args(
- dict(config=[
- dict(name="GigabitEthernet0/1",
- access_groups=[
- dict(afi="ipv6")])
- ], state="deleted"))
- commands = ['interface GigabitEthernet0/1',
- 'no ipv6 traffic-filter test_v6 out',
- 'no ipv6 traffic-filter temp_v6 in',
- ]
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_acl_interfaces_parsed(self):
- set_module_args(
- dict(
- running_config="interface GigabitEthernet0/1\nip access-group 110 in\nipv6 traffic-filter test_v6 out",
- state="parsed"
- )
- )
- result = self.execute_module(changed=False)
- parsed_list = [
- {'access_groups':
- [
- {'acls':
- [
- {'direction': 'in', 'name': '110'}
- ], 'afi': 'ipv4'},
- {'acls':
- [
- {'direction': 'out', 'name': 'test_v6'}
- ],
- 'afi': 'ipv6'}
- ],
- 'name': 'GigabitEthernet0/1'}]
- self.assertEqual(parsed_list, result['parsed'])
-
- def test_ios_acl_interfaces_rendered(self):
- set_module_args(
- dict(config=[
- dict(name="GigabitEthernet0/1",
- access_groups=[
- dict(afi="ipv4",
- acls=[
- dict(name="110",
- direction="in"),
- dict(name="123",
- direction="out")
- ]),
- dict(afi="ipv6",
- acls=[
- dict(name="temp_v6", direction="in"),
- dict(name="test_v6", direction="out")
- ])
- ])
- ], state="rendered"))
- commands = ['interface GigabitEthernet0/1',
- 'ip access-group 110 in',
- 'ip access-group 123 out',
- 'ipv6 traffic-filter temp_v6 in',
- 'ipv6 traffic-filter test_v6 out'
- ]
- result = self.execute_module(changed=False)
- self.assertEqual(sorted(result['rendered']), commands)
diff --git a/test/units/modules/network/ios/test_ios_acls.py b/test/units/modules/network/ios/test_ios_acls.py
deleted file mode 100644
index 3dc7ee6aa2..0000000000
--- a/test/units/modules/network/ios/test_ios_acls.py
+++ /dev/null
@@ -1,451 +0,0 @@
-#
-# (c) 2019, Ansible by Red Hat, inc
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-#
-
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-import sys
-
-import pytest
-
-# These tests and/or the module under test are unstable on Python 3.5.
-# See: https://app.shippable.com/github/ansible/ansible/runs/161331/15/tests
-# This is most likely due to CPython 3.5 not maintaining dict insertion order.
-pytestmark = pytest.mark.skipif(sys.version_info[:2] == (3, 5), reason="Tests and/or module are unstable on Python 3.5.")
-
-from units.compat.mock import patch
-from ansible.modules.network.ios import ios_acls
-from units.modules.utils import set_module_args
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosAclsModule(TestIosModule):
- module = ios_acls
-
- def setUp(self):
- super(TestIosAclsModule, self).setUp()
-
- self.mock_get_config = patch('ansible.module_utils.network.common.network.Config.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.module_utils.network.common.network.Config.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_resource_connection_config = patch('ansible.module_utils.network.common.cfg.base.'
- 'get_resource_connection')
- self.get_resource_connection_config = self.mock_get_resource_connection_config.start()
-
- self.mock_get_resource_connection_facts = patch('ansible.module_utils.network.common.facts.facts.'
- 'get_resource_connection')
- self.get_resource_connection_facts = self.mock_get_resource_connection_facts.start()
-
- self.mock_edit_config = patch('ansible.module_utils.network.ios.providers.providers.CliProvider.edit_config')
- self.edit_config = self.mock_edit_config.start()
-
- self.mock_execute_show_command = patch('ansible.module_utils.network.ios.facts.acls.acls.'
- 'AclsFacts.get_acl_data')
- self.execute_show_command = self.mock_execute_show_command.start()
-
- def tearDown(self):
- super(TestIosAclsModule, self).tearDown()
- self.mock_get_resource_connection_config.stop()
- self.mock_get_resource_connection_facts.stop()
- self.mock_edit_config.stop()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
- self.mock_execute_show_command.stop()
-
- def load_fixtures(self, commands=None, transport='cli'):
- def load_from_file(*args, **kwargs):
- return load_fixture('ios_acls_config.cfg')
- self.execute_show_command.side_effect = load_from_file
-
- def test_ios_acls_merged(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="std_acl",
- acl_type="standard",
- aces=[
- dict(
- grant="deny",
- source=dict(
- address="192.0.2.0",
- wildcard_bits="0.0.0.255"
- )
- )
- ])
- ]),
- dict(afi="ipv6",
- acls=[
- dict(name="merge_v6_acl",
- aces=[
- dict(
- grant="deny",
- protocol_options=dict(
- tcp=dict(ack="true")
- ),
- source=dict(
- any="true",
- port_protocol=dict(eq="www")
- ),
- destination=dict(
- any="true",
- port_protocol=dict(eq="telnet")),
- dscp="af11"
- )
- ])
- ])
- ], state="merged"
- )
- )
- result = self.execute_module(changed=True)
- commands = [
- 'ip access-list standard std_acl',
- 'deny 192.0.2.0 0.0.0.255',
- 'ipv6 access-list merge_v6_acl',
- 'deny tcp any eq www any eq telnet ack dscp af11'
- ]
- self.assertEqual(result['commands'], commands)
-
- def test_ios_acls_merged_idempotent(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="110",
- aces=[
- dict(
- grant="deny",
- protocol_options=dict(
- icmp=dict(echo="true")
- ),
- source=dict(
- address="192.0.2.0",
- wildcard_bits="0.0.0.255"
- ),
- destination=dict(
- address="192.0.3.0",
- wildcard_bits="0.0.0.255"
- ),
- dscp="ef",
- ttl=dict(eq=10)
- )
- ])
- ]),
- dict(afi="ipv6",
- acls=[
- dict(name="R1_TRAFFIC",
- aces=[
- dict(
- grant="deny",
- protocol_options=dict(tcp=dict(ack="true")),
- source=dict(
- any="true",
- port_protocol=dict(eq="www")
- ),
- destination=dict(
- any="true",
- port_protocol=dict(eq="telnet")
- ),
- dscp="af11"
- )
- ])
- ])
- ], state="merged"
- ))
- self.execute_module(changed=False, commands=[], sort=True)
-
- def test_ios_acls_replaced(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="replace_acl",
- acl_type="extended",
- aces=[
- dict(
- grant="deny",
- protocol_options=dict(
- tcp=dict(ack="true")
- ),
- source=dict(
- address="198.51.100.0",
- wildcard_bits="0.0.0.255"
- ),
- destination=dict(
- address="198.51.101.0",
- wildcard_bits="0.0.0.255",
- port_protocol=dict(eq="telnet")
- ),
- tos=dict(service_value=12)
- )
- ])
- ])
- ], state="replaced"
- ))
- result = self.execute_module(changed=True)
- commands = [
- 'ip access-list extended replace_acl',
- 'deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12'
- ]
- self.assertEqual(result['commands'], commands)
-
- def test_ios_acls_replaced_idempotent(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="110",
- aces=[
- dict(
- grant="deny",
- protocol_options=dict(
- icmp=dict(echo="true")
- ),
- source=dict(
- address="192.0.2.0",
- wildcard_bits="0.0.0.255"
- ),
- destination=dict(
- address="192.0.3.0",
- wildcard_bits="0.0.0.255"
- ),
- dscp="ef",
- ttl=dict(eq=10)
- )
- ])
- ])
- ], state="replaced"
- ))
- self.execute_module(changed=False, commands=[], sort=True)
-
- def test_ios_acls_overridden(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="150",
- aces=[
- dict(
- grant="deny",
- protocol_options=dict(
- tcp=dict(syn="true")
- ),
- source=dict(
- address="198.51.100.0",
- wildcard_bits="0.0.0.255",
- port_protocol=dict(eq="telnet")
- ),
- destination=dict(
- address="198.51.110.0",
- wildcard_bits="0.0.0.255",
- port_protocol=dict(eq="telnet")
- ),
- dscp="ef",
- ttl=dict(eq=10)
- )
- ])
- ])
- ], state="overridden"
- ))
- result = self.execute_module(changed=True)
- commands = [
- 'no ip access-list extended 110',
- 'no ipv6 access-list R1_TRAFFIC',
- 'ip access-list extended 150',
- 'deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10'
- ]
- self.assertEqual(result['commands'], commands)
-
- def test_ios_acls_overridden_idempotent(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="110",
- aces=[
- dict(
- grant="deny",
- protocol_options=dict(
- icmp=dict(echo="true")
- ),
- source=dict(
- address="192.0.2.0",
- wildcard_bits="0.0.0.255"
- ),
- destination=dict(
- address="192.0.3.0",
- wildcard_bits="0.0.0.255"
- ),
- dscp="ef",
- ttl=dict(eq=10)
- )
- ])
- ]),
- dict(afi="ipv6",
- acls=[
- dict(name="R1_TRAFFIC",
- aces=[
- dict(
- grant="deny",
- protocol_options=dict(tcp=dict(ack="true")),
- source=dict(
- any="true",
- port_protocol=dict(eq="www")
- ),
- destination=dict(
- any="true",
- port_protocol=dict(eq="telnet")
- ),
- dscp="af11"
- )
- ])
- ])
- ], state="overridden"
- ))
- self.execute_module(changed=False, commands=[], sort=True)
-
- def test_ios_acls_deleted_afi_based(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4")
- ], state="deleted"
- ))
- result = self.execute_module(changed=True)
- commands = [
- 'no ip access-list extended 110'
- ]
- self.assertEqual(result['commands'], commands)
-
- def test_ios_acls_deleted_acl_based(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="110",
- aces=[
- dict(
- grant="deny",
- protocol_options=dict(
- icmp=dict(echo="true")
- ),
- source=dict(
- address="192.0.2.0",
- wildcard_bits="0.0.0.255"
- ),
- destination=dict(
- address="192.0.3.0",
- wildcard_bits="0.0.0.255"
- ),
- dscp="ef",
- ttl=dict(eq=10)
- )
- ])
- ]),
- dict(afi="ipv6",
- acls=[
- dict(name="R1_TRAFFIC",
- aces=[
- dict(
- grant="deny",
- protocol_options=dict(tcp=dict(ack="true")),
- source=dict(
- any="true",
- port_protocol=dict(eq="www")
- ),
- destination=dict(
- any="true",
- port_protocol=dict(eq="telnet")
- ),
- dscp="af11"
- )
- ])
- ])
- ], state="deleted"
- ))
- result = self.execute_module(changed=True)
- commands = [
- 'no ip access-list extended 110',
- 'no ipv6 access-list R1_TRAFFIC',
- ]
- self.assertEqual(result['commands'], commands)
-
- def test_ios_acls_rendered(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="110",
- aces=[
- dict(
- grant="deny",
- sequence="10",
- protocol_options=dict(
- tcp=dict(syn="true")
- ),
- source=dict(
- address="192.0.2.0",
- wildcard_bits="0.0.0.255"
- ),
- destination=dict(
- address="192.0.3.0",
- wildcard_bits="0.0.0.255",
- port_protocol=dict(eq="www")
- ),
- dscp="ef",
- ttl=dict(eq=10)
- )
- ])
- ])
- ], state="rendered"))
- commands = [
- 'ip access-list extended 110',
- '10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www syn dscp ef ttl eq 10'
- ]
- result = self.execute_module(changed=False)
- self.assertEqual(result['rendered'], commands)
-
- def test_ios_acls_parsed(self):
- set_module_args(
- dict(running_config="ipv6 access-list R1_TRAFFIC\ndeny tcp any eq www any eq telnet ack dscp af11",
- state="parsed"))
- result = self.execute_module(changed=False)
- parsed_list = [
- {
- "acls": [
- {
- "aces": [
- {
- "destination": {
- "any": True,
- "port_protocol": {
- "eq": "telnet"
- }
- },
- "dscp": "af11",
- "grant": "deny",
- "protocol": "tcp",
- "protocol_options": {
- "tcp": {
- "ack": True
- }
- },
- "source": {
- "any": True,
- "port_protocol": {
- "eq": "www"
- }
- }
- }
- ],
- "name": "R1_TRAFFIC"
- }
- ],
- "afi": "ipv6"
- }
- ]
- self.assertEqual(parsed_list, result['parsed'])
diff --git a/test/units/modules/network/ios/test_ios_banner.py b/test/units/modules/network/ios/test_ios_banner.py
deleted file mode 100644
index cdd43d8e79..0000000000
--- a/test/units/modules/network/ios/test_ios_banner.py
+++ /dev/null
@@ -1,76 +0,0 @@
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from units.compat.mock import patch
-from ansible.modules.network.ios import ios_banner
-from units.modules.utils import set_module_args
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosBannerModule(TestIosModule):
-
- module = ios_banner
-
- def setUp(self):
- super(TestIosBannerModule, self).setUp()
-
- self.mock_get_config = patch('ansible.modules.network.ios.ios_banner.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.ios.ios_banner.load_config')
- self.load_config = self.mock_load_config.start()
-
- def tearDown(self):
- super(TestIosBannerModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None):
- def load_from_file(*args, **kwargs):
- return load_fixture('ios_banner_show_running_config_ios12.txt')
- self.get_config.side_effect = load_from_file
-
- def test_ios_banner_create(self):
- for banner_type in ('login', 'motd', 'exec', 'incoming', 'slip-ppp'):
- set_module_args(dict(banner=banner_type, text='test\nbanner\nstring'))
- commands = ['banner {0} @\ntest\nbanner\nstring\n@'.format(banner_type)]
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_banner_remove(self):
- set_module_args(dict(banner='login', state='absent'))
- commands = ['no banner login']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_banner_nochange(self):
- banner_text = load_fixture('ios_banner_show_banner.txt')
- set_module_args(dict(banner='login', text=banner_text))
- self.execute_module()
-
-
-class TestIosBannerIos12Module(TestIosBannerModule):
-
- def load_fixtures(self, commands=None):
- def load_from_file(*args, **kwargs):
- return load_fixture('ios_banner_show_running_config_ios12.txt')
- self.get_config.side_effect = load_from_file
-
- def test_ios_banner_nochange(self):
- banner_text = load_fixture('ios_banner_show_banner.txt')
- set_module_args(dict(banner='exec', text=banner_text))
- self.execute_module()
diff --git a/test/units/modules/network/ios/test_ios_bgp.py b/test/units/modules/network/ios/test_ios_bgp.py
deleted file mode 100644
index 792219778c..0000000000
--- a/test/units/modules/network/ios/test_ios_bgp.py
+++ /dev/null
@@ -1,207 +0,0 @@
-#
-# (c) 2019, Ansible by Red Hat, inc
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-#
-
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from ansible.module_utils.network.ios.providers.cli.config.bgp.process import Provider
-from ansible.modules.network.ios import ios_bgp
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosBgpModule(TestIosModule):
- module = ios_bgp
-
- def setUp(self):
- super(TestIosBgpModule, self).setUp()
- self._bgp_config = load_fixture('ios_bgp_config.cfg')
-
- def test_ios_bgp(self):
- obj = Provider(params=dict(config=dict(bgp_as=64496, router_id='192.0.2.2', networks=None,
- address_family=None), operation='merge'))
- commands = obj.render(self._bgp_config)
- self.assertEqual(commands, ['router bgp 64496', 'bgp router-id 192.0.2.2', 'exit'])
-
- def test_ios_bgp_idempotent(self):
- obj = Provider(params=dict(config=dict(bgp_as=64496, router_id='192.0.2.1', networks=None,
- address_family=None), operation='merge'))
- commands = obj.render(self._bgp_config)
- self.assertEqual(commands, [])
-
- def test_ios_bgp_remove(self):
- obj = Provider(params=dict(config=dict(bgp_as=64496, networks=None, address_family=None), operation='delete'))
- commands = obj.render(self._bgp_config)
- self.assertEqual(commands, ['no router bgp 64496'])
-
- def test_ios_bgp_neighbor(self):
- obj = Provider(params=dict(config=dict(bgp_as=64496, neighbors=[dict(neighbor='192.51.100.2', remote_as=64496)],
- networks=None, address_family=None),
- operation='merge'))
- commands = obj.render(self._bgp_config)
- self.assertEqual(commands, ['router bgp 64496', 'neighbor 192.51.100.2 remote-as 64496', 'exit'])
-
- def test_ios_bgp_neighbor_idempotent(self):
- obj = Provider(params=dict(config=dict(bgp_as=64496, neighbors=[dict(neighbor='192.51.100.1', remote_as=64496,
- timers=dict(keepalive=120, holdtime=360,
- min_neighbor_holdtime=360))],
- networks=None, address_family=None),
- operation='merge'))
- commands = obj.render(self._bgp_config)
- self.assertEqual(commands, [])
-
- def test_ios_bgp_network(self):
- obj = Provider(params=dict(config=dict(bgp_as=64496, networks=[dict(prefix='192.0.1.0', masklen=23, route_map='RMAP_1')],
- address_family=None),
- operation='merge'))
- commands = obj.render(self._bgp_config)
- self.assertEqual(sorted(commands), sorted(['router bgp 64496', 'network 192.0.1.0 mask 255.255.254.0 route-map RMAP_1',
- 'exit']))
-
- def test_ios_bgp_network_idempotent(self):
- obj = Provider(
- params=dict(config=dict(bgp_as=64496, networks=[dict(prefix='192.0.2.0', masklen=23, route_map='RMAP_1'),
- dict(prefix='198.51.100.0', masklen=25,
- route_map='RMAP_2')],
- address_family=None),
- operation='merge'))
- commands = obj.render(self._bgp_config)
- self.assertEqual(commands, [])
-
- def test_ios_bgp_address_family_redistribute(self):
- rd_1 = dict(protocol='ospf', id='233', metric=90, route_map=None)
-
- config = dict(bgp_as=64496, address_family=[dict(afi='ipv4', safi='unicast', redistribute=[rd_1])],
- networks=None)
-
- obj = Provider(params=dict(config=config, operation='merge'))
-
- commands = obj.render(self._bgp_config)
- cmd = ['router bgp 64496', 'address-family ipv4', 'redistribute ospf 233 metric 90',
- 'exit-address-family', 'exit']
- self.assertEqual(sorted(commands), sorted(cmd))
-
- def test_ios_bgp_address_family_redistribute_idempotent(self):
- rd_1 = dict(protocol='eigrp', metric=10, route_map='RMAP_3', id=None)
- rd_2 = dict(protocol='static', metric=100, id=None, route_map=None)
-
- config = dict(bgp_as=64496, address_family=[dict(afi='ipv4', safi='unicast', redistribute=[rd_1, rd_2])],
- networks=None)
-
- obj = Provider(params=dict(config=config, operation='merge'))
-
- commands = obj.render(self._bgp_config)
- self.assertEqual(commands, [])
-
- def test_ios_bgp_address_family_neighbors(self):
- af_nbr_1 = dict(neighbor='192.51.100.1', maximum_prefix=35, activate=True)
- af_nbr_2 = dict(neighbor='192.51.100.3', route_reflector_client=True, activate=True)
-
- config = dict(bgp_as=64496, address_family=[dict(afi='ipv4', safi='multicast', neighbors=[af_nbr_1, af_nbr_2])],
- networks=None)
-
- obj = Provider(params=dict(config=config, operation='merge'))
-
- commands = obj.render(self._bgp_config)
- cmd = ['router bgp 64496', 'address-family ipv4 multicast', 'neighbor 192.51.100.1 activate',
- 'neighbor 192.51.100.1 maximum-prefix 35', 'neighbor 192.51.100.3 activate',
- 'neighbor 192.51.100.3 route-reflector-client', 'exit-address-family', 'exit']
- self.assertEqual(sorted(commands), sorted(cmd))
-
- def test_ios_bgp_address_family_neighbors_idempotent(self):
- af_nbr_1 = dict(neighbor='203.0.113.1', remove_private_as=True, maximum_prefix=100)
-
- config = dict(bgp_as=64496, address_family=[dict(afi='ipv4', safi='unicast', neighbors=[af_nbr_1])],
- networks=None)
-
- obj = Provider(params=dict(config=config, operation='merge'))
-
- commands = obj.render(self._bgp_config)
- self.assertEqual(commands, [])
-
- def test_ios_bgp_address_family_networks(self):
- net = dict(prefix='1.0.0.0', masklen=8, route_map='RMAP_1')
- net2 = dict(prefix='192.168.1.0', masklen=24, route_map='RMAP_2')
-
- config = dict(bgp_as=64496, address_family=[dict(afi='ipv4', safi='multicast', networks=[net, net2])],
- networks=None)
-
- obj = Provider(params=dict(config=config, operation='merge'))
-
- commands = obj.render(self._bgp_config)
- cmd = ['router bgp 64496', 'address-family ipv4 multicast', 'network 1.0.0.0 mask 255.0.0.0 route-map RMAP_1',
- 'network 192.168.1.0 mask 255.255.255.0 route-map RMAP_2', 'exit-address-family', 'exit']
- self.assertEqual(sorted(commands), sorted(cmd))
-
- def test_ios_bgp_address_family_networks_idempotent(self):
- net = dict(prefix='203.0.113.0', masklen=27, route_map='RMAP_1')
- net2 = dict(prefix='192.0.2.0', masklen=26, route_map='RMAP_2')
-
- config = dict(bgp_as=64496, address_family=[dict(afi='ipv4', safi='multicast', networks=[net, net2])],
- networks=None)
-
- obj = Provider(params=dict(config=config, operation='merge'))
-
- commands = obj.render(self._bgp_config)
- self.assertEqual(commands, [])
-
- def test_ios_bgp_operation_override(self):
- net_1 = dict(prefix='1.0.0.0', masklen=8, route_map='RMAP_1')
- net_2 = dict(prefix='192.168.1.0', masklen=24, route_map='RMAP_2')
- nbr_1 = dict(neighbor='192.51.100.1', remote_as=64496, update_source='GigabitEthernet0/1')
- nbr_2 = dict(neighbor='192.51.100.3', remote_as=64496, timers=dict(keepalive=300, holdtime=360,
- min_neighbor_holdtime=360))
- af_nbr_1 = dict(neighbor='192.51.100.1', maximum_prefix=35)
- af_nbr_2 = dict(neighbor='192.51.100.3', route_reflector_client=True)
-
- af_1 = dict(afi='ipv4', safi='unicast', neighbors=[af_nbr_1, af_nbr_2])
- af_2 = dict(afi='ipv4', safi='multicast', networks=[net_1, net_2])
- config = dict(bgp_as=64496, neighbors=[nbr_1, nbr_2], address_family=[af_1, af_2], networks=None)
-
- obj = Provider(params=dict(config=config, operation='override'))
- commands = obj.render(self._bgp_config)
-
- cmd = ['no router bgp 64496', 'router bgp 64496', 'neighbor 192.51.100.1 remote-as 64496',
- 'neighbor 192.51.100.1 update-source GigabitEthernet0/1', 'neighbor 192.51.100.3 remote-as 64496',
- 'neighbor 192.51.100.3 timers 300 360 360', 'address-family ipv4',
- 'neighbor 192.51.100.1 maximum-prefix 35', 'neighbor 192.51.100.3 route-reflector-client',
- 'exit-address-family',
- 'address-family ipv4 multicast', 'network 1.0.0.0 mask 255.0.0.0 route-map RMAP_1',
- 'network 192.168.1.0 mask 255.255.255.0 route-map RMAP_2',
- 'exit-address-family', 'exit']
-
- self.assertEqual(sorted(commands), sorted(cmd))
-
- def test_ios_bgp_operation_replace(self):
- rd = dict(protocol='ospf', id=223, metric=110, route_map=None)
- net = dict(prefix='203.0.113.0', masklen=27, route_map='RMAP_1')
- net2 = dict(prefix='192.0.2.0', masklen=26, route_map='RMAP_2')
-
- af_1 = dict(afi='ipv4', safi='unicast', redistribute=[rd])
- af_2 = dict(afi='ipv4', safi='multicast', networks=[net, net2])
-
- config = dict(bgp_as=64496, address_family=[af_1, af_2], networks=None)
- obj = Provider(params=dict(config=config, operation='replace'))
- commands = obj.render(self._bgp_config)
-
- cmd = ['router bgp 64496', 'address-family ipv4', 'redistribute ospf 223 metric 110',
- 'no redistribute eigrp',
- 'no redistribute static', 'exit-address-family', 'exit']
-
- self.assertEqual(sorted(commands), sorted(cmd))
-
- def test_ios_bgp_operation_replace_with_new_as(self):
- rd = dict(protocol='ospf', id=223, metric=110, route_map=None)
-
- af_1 = dict(afi='ipv4', safi='unicast', redistribute=[rd])
-
- config = dict(bgp_as=64497, address_family=[af_1], networks=None)
- obj = Provider(params=dict(config=config, operation='replace'))
- commands = obj.render(self._bgp_config)
-
- cmd = ['no router bgp 64496', 'router bgp 64497', 'address-family ipv4',
- 'redistribute ospf 223 metric 110',
- 'exit-address-family', 'exit']
-
- self.assertEqual(sorted(commands), sorted(cmd))
diff --git a/test/units/modules/network/ios/test_ios_command.py b/test/units/modules/network/ios/test_ios_command.py
deleted file mode 100644
index 1dab227b9a..0000000000
--- a/test/units/modules/network/ios/test_ios_command.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# (c) 2016 Red Hat Inc.
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-import json
-
-from units.compat.mock import patch
-from ansible.modules.network.ios import ios_command
-from units.modules.utils import set_module_args
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosCommandModule(TestIosModule):
-
- module = ios_command
-
- def setUp(self):
- super(TestIosCommandModule, self).setUp()
-
- self.mock_run_commands = patch('ansible.modules.network.ios.ios_command.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- def tearDown(self):
- super(TestIosCommandModule, self).tearDown()
- self.mock_run_commands.stop()
-
- def load_fixtures(self, commands=None):
-
- def load_from_file(*args, **kwargs):
- module, commands = args
- output = list()
-
- for item in commands:
- try:
- obj = json.loads(item['command'])
- command = obj['command']
- except ValueError:
- command = item['command']
- filename = str(command).replace(' ', '_')
- output.append(load_fixture(filename))
- return output
-
- self.run_commands.side_effect = load_from_file
-
- def test_ios_command_simple(self):
- set_module_args(dict(commands=['show version']))
- result = self.execute_module()
- self.assertEqual(len(result['stdout']), 1)
- self.assertTrue(result['stdout'][0].startswith('Cisco IOS Software'))
-
- def test_ios_command_multiple(self):
- set_module_args(dict(commands=['show version', 'show version']))
- result = self.execute_module()
- self.assertEqual(len(result['stdout']), 2)
- self.assertTrue(result['stdout'][0].startswith('Cisco IOS Software'))
-
- def test_ios_command_wait_for(self):
- wait_for = 'result[0] contains "Cisco IOS"'
- set_module_args(dict(commands=['show version'], wait_for=wait_for))
- self.execute_module()
-
- def test_ios_command_wait_for_fails(self):
- wait_for = 'result[0] contains "test string"'
- set_module_args(dict(commands=['show version'], wait_for=wait_for))
- self.execute_module(failed=True)
- self.assertEqual(self.run_commands.call_count, 10)
-
- def test_ios_command_retries(self):
- wait_for = 'result[0] contains "test string"'
- set_module_args(dict(commands=['show version'], wait_for=wait_for, retries=2))
- self.execute_module(failed=True)
- self.assertEqual(self.run_commands.call_count, 2)
-
- def test_ios_command_match_any(self):
- wait_for = ['result[0] contains "Cisco IOS"',
- 'result[0] contains "test string"']
- set_module_args(dict(commands=['show version'], wait_for=wait_for, match='any'))
- self.execute_module()
-
- def test_ios_command_match_all(self):
- wait_for = ['result[0] contains "Cisco IOS"',
- 'result[0] contains "IOSv Software"']
- set_module_args(dict(commands=['show version'], wait_for=wait_for, match='all'))
- self.execute_module()
-
- def test_ios_command_match_all_failure(self):
- wait_for = ['result[0] contains "Cisco IOS"',
- 'result[0] contains "test string"']
- commands = ['show version', 'show version']
- set_module_args(dict(commands=commands, wait_for=wait_for, match='all'))
- self.execute_module(failed=True)
-
- def test_ios_command_configure_check_warning(self):
- commands = ['configure terminal']
- set_module_args({
- 'commands': commands,
- '_ansible_check_mode': True,
- })
- result = self.execute_module()
- self.assertEqual(
- result['warnings'],
- ['Only show commands are supported when using check mode, not executing configure terminal'],
- )
-
- def test_ios_command_configure_not_warning(self):
- commands = ['configure terminal']
- set_module_args(dict(commands=commands))
- result = self.execute_module()
- self.assertEqual(result['warnings'], [])
diff --git a/test/units/modules/network/ios/test_ios_config.py b/test/units/modules/network/ios/test_ios_config.py
deleted file mode 100644
index 0aa4dcc90b..0000000000
--- a/test/units/modules/network/ios/test_ios_config.py
+++ /dev/null
@@ -1,250 +0,0 @@
-#
-# (c) 2016 Red Hat Inc.
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from units.compat.mock import patch, MagicMock
-from ansible.modules.network.ios import ios_config
-from ansible.plugins.cliconf.ios import Cliconf
-from units.modules.utils import set_module_args
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosConfigModule(TestIosModule):
-
- module = ios_config
-
- def setUp(self):
- super(TestIosConfigModule, self).setUp()
-
- self.mock_get_config = patch('ansible.modules.network.ios.ios_config.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_get_connection = patch('ansible.modules.network.ios.ios_config.get_connection')
- self.get_connection = self.mock_get_connection.start()
-
- self.conn = self.get_connection()
- self.conn.edit_config = MagicMock()
-
- self.mock_run_commands = patch('ansible.modules.network.ios.ios_config.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.cliconf_obj = Cliconf(MagicMock())
- self.running_config = load_fixture('ios_config_config.cfg')
-
- def tearDown(self):
- super(TestIosConfigModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_run_commands.stop()
- self.mock_get_connection.stop()
-
- def load_fixtures(self, commands=None):
- config_file = 'ios_config_config.cfg'
- self.get_config.return_value = load_fixture(config_file)
- self.get_connection.edit_config.return_value = None
-
- def test_ios_config_unchanged(self):
- src = load_fixture('ios_config_config.cfg')
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff(src, src))
- set_module_args(dict(src=src))
- self.execute_module()
-
- def test_ios_config_src(self):
- src = load_fixture('ios_config_src.cfg')
- set_module_args(dict(src=src))
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff(src, self.running_config))
- commands = ['hostname foo', 'interface GigabitEthernet0/0',
- 'no ip address']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_config_backup(self):
- set_module_args(dict(backup=True))
- result = self.execute_module()
- self.assertIn('__backup__', result)
-
- def test_ios_config_save_changed_true(self):
- src = load_fixture('ios_config_src.cfg')
- set_module_args(dict(src=src, save_when='changed'))
- commands = ['hostname foo', 'interface GigabitEthernet0/0', 'no ip address']
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff(src, self.running_config))
- self.execute_module(changed=True, commands=commands)
- self.assertEqual(self.run_commands.call_count, 1)
- self.assertEqual(self.get_config.call_count, 1)
- self.assertEqual(self.conn.edit_config.call_count, 1)
- args = self.run_commands.call_args[0][1]
- self.assertIn('copy running-config startup-config\r', args)
-
- def test_ios_config_save_changed_false(self):
- set_module_args(dict(save_when='changed'))
- self.execute_module(changed=False)
- self.assertEqual(self.run_commands.call_count, 0)
- self.assertEqual(self.get_config.call_count, 0)
- self.assertEqual(self.conn.edit_config.call_count, 0)
-
- def test_ios_config_save_always(self):
- self.run_commands.return_value = "hostname foo"
- set_module_args(dict(save_when='always'))
- self.execute_module(changed=True)
- self.assertEqual(self.run_commands.call_count, 1)
- self.assertEqual(self.get_config.call_count, 0)
- self.assertEqual(self.conn.edit_config.call_count, 0)
- args = self.run_commands.call_args[0][1]
- self.assertIn('copy running-config startup-config\r', args)
-
- def test_ios_config_lines_wo_parents(self):
- lines = ['hostname foo']
- set_module_args(dict(lines=lines))
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff('\n'.join(lines), self.running_config))
- commands = ['hostname foo']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_config_lines_w_parents(self):
- lines = ['shutdown']
- parents = ['interface GigabitEthernet0/0']
- set_module_args(dict(lines=lines, parents=parents))
- module = MagicMock()
- module.params = {'lines': lines, 'parents': parents, 'src': None}
- candidate_config = ios_config.get_candidate_config(module)
-
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff(candidate_config, self.running_config))
-
- commands = ['interface GigabitEthernet0/0', 'shutdown']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_config_before(self):
- lines = ['hostname foo']
- set_module_args(dict(lines=lines, before=['test1', 'test2']))
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff('\n'.join(lines), self.running_config))
- commands = ['test1', 'test2', 'hostname foo']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_config_after(self):
- lines = ['hostname foo']
- set_module_args(dict(lines=lines, after=['test1', 'test2']))
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff('\n'.join(lines), self.running_config))
- commands = ['hostname foo', 'test1', 'test2']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_config_before_after_no_change(self):
- lines = ['hostname router']
- set_module_args(dict(lines=lines,
- before=['test1', 'test2'],
- after=['test3', 'test4']))
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff('\n'.join(lines), self.running_config))
- self.execute_module()
-
- def test_ios_config_config(self):
- config = 'hostname localhost'
- lines = ['hostname router']
- set_module_args(dict(lines=lines, config=config))
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff('\n'.join(lines), config))
- commands = ['hostname router']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_config_replace_block(self):
- lines = ['description test string', 'test string']
- parents = ['interface GigabitEthernet0/0']
- set_module_args(dict(lines=lines, replace='block', parents=parents))
-
- module = MagicMock()
- module.params = {'lines': lines, 'parents': parents, 'src': None}
- candidate_config = ios_config.get_candidate_config(module)
-
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff(candidate_config, self.running_config, diff_replace='block', path=parents))
-
- commands = parents + lines
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_config_match_none(self):
- lines = ['hostname router']
- set_module_args(dict(lines=lines, match='none'))
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff('\n'.join(lines), self.running_config, diff_match='none'))
- self.execute_module(changed=True, commands=lines)
-
- def test_ios_config_match_none2(self):
- lines = ['ip address 1.2.3.4 255.255.255.0', 'description test string']
- parents = ['interface GigabitEthernet0/0']
- set_module_args(dict(lines=lines, parents=parents, match='none'))
-
- module = MagicMock()
- module.params = {'lines': lines, 'parents': parents, 'src': None}
- candidate_config = ios_config.get_candidate_config(module)
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff(candidate_config, self.running_config, diff_match='none', path=parents))
-
- commands = parents + lines
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_config_match_strict(self):
- lines = ['ip address 1.2.3.4 255.255.255.0', 'description test string',
- 'shutdown']
- parents = ['interface GigabitEthernet0/0']
- set_module_args(dict(lines=lines, parents=parents, match='strict'))
-
- module = MagicMock()
- module.params = {'lines': lines, 'parents': parents, 'src': None}
- candidate_config = ios_config.get_candidate_config(module)
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff(candidate_config, self.running_config, diff_match='strict', path=parents))
-
- commands = parents + ['shutdown']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_config_match_exact(self):
- lines = ['ip address 1.2.3.4 255.255.255.0', 'description test string',
- 'shutdown']
- parents = ['interface GigabitEthernet0/0']
- set_module_args(dict(lines=lines, parents=parents, match='exact'))
-
- module = MagicMock()
- module.params = {'lines': lines, 'parents': parents, 'src': None}
- candidate_config = ios_config.get_candidate_config(module)
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff(candidate_config, self.running_config, diff_match='exact', path=parents))
-
- commands = parents + lines
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_config_src_and_lines_fails(self):
- args = dict(src='foo', lines='foo')
- set_module_args(args)
- self.execute_module(failed=True)
-
- def test_ios_config_src_and_parents_fails(self):
- args = dict(src='foo', parents='foo')
- set_module_args(args)
- self.execute_module(failed=True)
-
- def test_ios_config_match_exact_requires_lines(self):
- args = dict(match='exact')
- set_module_args(args)
- self.execute_module(failed=True)
-
- def test_ios_config_match_strict_requires_lines(self):
- args = dict(match='strict')
- set_module_args(args)
- self.execute_module(failed=True)
-
- def test_ios_config_replace_block_requires_lines(self):
- args = dict(replace='block')
- set_module_args(args)
- self.execute_module(failed=True)
-
- def test_ios_config_replace_config_requires_src(self):
- args = dict(replace='config')
- set_module_args(args)
- self.execute_module(failed=True)
diff --git a/test/units/modules/network/ios/test_ios_facts.py b/test/units/modules/network/ios/test_ios_facts.py
deleted file mode 100644
index e197fe5995..0000000000
--- a/test/units/modules/network/ios/test_ios_facts.py
+++ /dev/null
@@ -1,123 +0,0 @@
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from units.compat.mock import patch
-from ansible.modules.network.ios import ios_facts
-from ansible.module_utils.six import assertCountEqual
-from units.modules.utils import set_module_args
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosFactsModule(TestIosModule):
-
- module = ios_facts
-
- def setUp(self):
- super(TestIosFactsModule, self).setUp()
- self.mock_run_commands = patch('ansible.module_utils.network.ios.facts.legacy.base.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.mock_get_resource_connection = patch('ansible.module_utils.network.common.facts.facts.get_resource_connection')
- self.get_resource_connection = self.mock_get_resource_connection.start()
-
- self.mock_get_capabilities = patch('ansible.module_utils.network.ios.facts.legacy.base.get_capabilities')
- self.get_capabilities = self.mock_get_capabilities.start()
- self.get_capabilities.return_value = {
- 'device_info': {
- 'network_os': 'ios',
- 'network_os_hostname': 'an-ios-01',
- 'network_os_image': 'flash0:/vios-adventerprisek9-m',
- 'network_os_model': 'WS-C3750-24TS',
- 'network_os_version': '15.6(3)M2'
- },
- 'network_api': 'cliconf'
- }
-
- def tearDown(self):
- super(TestIosFactsModule, self).tearDown()
- self.mock_run_commands.stop()
- self.mock_get_capabilities.stop()
-
- def load_fixtures(self, commands=None):
- def load_from_file(*args, **kwargs):
- commands = kwargs['commands']
- output = list()
-
- for command in commands:
- filename = str(command).split(' | ')[0].replace(' ', '_')
- output.append(load_fixture('ios_facts_%s' % filename))
- return output
-
- self.run_commands.side_effect = load_from_file
-
- def test_ios_facts_stacked(self):
- set_module_args(dict(gather_subset='default'))
- result = self.execute_module()
- self.assertEqual(
- result['ansible_facts']['ansible_net_model'], 'WS-C3750-24TS'
- )
- self.assertEqual(
- result['ansible_facts']['ansible_net_serialnum'], 'CAT0726R0ZU'
- )
- self.assertEqual(
- result['ansible_facts']['ansible_net_stacked_models'], ['WS-C3750-24TS-E', 'WS-C3750-24TS-E', 'WS-C3750G-12S-E']
- )
- self.assertEqual(
- result['ansible_facts']['ansible_net_stacked_serialnums'], ['CAT0726R0ZU', 'CAT0726R10A', 'CAT0732R0M4']
- )
-
- def test_ios_facts_tunnel_address(self):
- set_module_args(dict(gather_subset='interfaces'))
- result = self.execute_module()
- self.assertEqual(
- result['ansible_facts']['ansible_net_interfaces']['GigabitEthernet0/0']['macaddress'], '5e00.0003.0000'
- )
- self.assertEqual(
- result['ansible_facts']['ansible_net_interfaces']['GigabitEthernet1']['macaddress'], '5e00.0006.0000'
- )
- self.assertIsNone(
- result['ansible_facts']['ansible_net_interfaces']['Tunnel1110']['macaddress']
- )
-
- def test_ios_facts_filesystems_info(self):
- set_module_args(dict(gather_subset='hardware'))
- result = self.execute_module()
- self.assertEqual(
- result['ansible_facts']['ansible_net_filesystems_info']['bootflash:']['spacetotal_kb'], 7712692.0
- )
- self.assertEqual(
- result['ansible_facts']['ansible_net_filesystems_info']['bootflash:']['spacefree_kb'], 6453180.0
- )
-
- def test_ios_facts_neighbors(self):
- set_module_args(dict(gather_subset='interfaces'))
- result = self.execute_module()
- assertCountEqual(
- self,
- result['ansible_facts']['ansible_net_neighbors'].keys(), ['GigabitEthernet1', 'GigabitEthernet3']
- )
- assertCountEqual(
- self,
- result['ansible_facts']['ansible_net_neighbors']['GigabitEthernet1'],
- [{'host': 'R2', 'port': 'GigabitEthernet2'}, {'host': 'R3', 'port': 'GigabitEthernet3'}]
- )
- assertCountEqual(
- self,
- result['ansible_facts']['ansible_net_neighbors']['GigabitEthernet3'], [{'host': 'Rtest', 'port': 'Gi1'}]
- )
diff --git a/test/units/modules/network/ios/test_ios_logging.py b/test/units/modules/network/ios/test_ios_logging.py
deleted file mode 100644
index c54f4a6eb6..0000000000
--- a/test/units/modules/network/ios/test_ios_logging.py
+++ /dev/null
@@ -1,140 +0,0 @@
-#
-# (c) 2016 Red Hat Inc.
-# (c) 2017 Paul Neumann
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from units.compat.mock import patch
-from ansible.modules.network.ios import ios_logging
-from units.modules.utils import set_module_args
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosLoggingModule(TestIosModule):
-
- module = ios_logging
-
- def setUp(self):
- super(TestIosLoggingModule, self).setUp()
-
- self.mock_get_config = patch('ansible.modules.network.ios.ios_logging.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.ios.ios_logging.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_capabilities = patch('ansible.modules.network.ios.ios_logging.get_capabilities')
- self.get_capabilities = self.mock_get_capabilities.start()
- self.get_capabilities.return_value = {'device_info': {'network_os_version': '15.6(2)T'}}
-
- def tearDown(self):
- super(TestIosLoggingModule, self).tearDown()
-
- self.mock_get_config.stop()
- self.mock_load_config.stop()
- self.mock_get_capabilities.stop()
-
- def load_fixtures(self, commands=None):
- self.get_config.return_value = load_fixture('ios_logging_config.cfg')
- self.load_config.return_value = None
-
- def test_ios_logging_buffer_size_changed_implicit(self):
- set_module_args(dict(dest='buffered'))
- commands = ['logging buffered 4096']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_logging_buffer_size_changed_explicit(self):
- set_module_args(dict(dest='buffered', size=6000))
- commands = ['logging buffered 6000']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_logging_add_host(self):
- set_module_args(dict(dest='host', name='192.168.1.1'))
- commands = ['logging host 192.168.1.1']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_logging_host_idempotent(self):
- set_module_args(dict(dest='host', name='2.3.4.5'))
- commands = []
- self.execute_module(changed=False, commands=commands)
-
- def test_ios_logging_delete_non_exist_host(self):
- set_module_args(dict(dest='host', name='192.168.1.1', state='absent'))
- commands = []
- self.execute_module(changed=False, commands=commands)
-
- def test_ios_logging_delete_host(self):
- set_module_args(dict(dest='host', name='2.3.4.5', state='absent'))
- commands = ['no logging host 2.3.4.5']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_logging_configure_disabled_monitor_destination(self):
- set_module_args(dict(dest='monitor', level='debugging'))
- commands = ['logging monitor debugging']
- self.execute_module(changed=True, commands=commands)
-
-
-class TestIosLoggingModuleIOS12(TestIosModule):
-
- module = ios_logging
-
- def setUp(self):
- super(TestIosLoggingModuleIOS12, self).setUp()
-
- self.mock_get_config = patch('ansible.modules.network.ios.ios_logging.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.ios.ios_logging.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_capabilities = patch('ansible.modules.network.ios.ios_logging.get_capabilities')
- self.get_capabilities = self.mock_get_capabilities.start()
- self.get_capabilities.return_value = {'device_info': {'network_os_version': '12.1(2)T'}}
-
- def tearDown(self):
- super(TestIosLoggingModuleIOS12, self).tearDown()
-
- self.mock_get_config.stop()
- self.mock_load_config.stop()
- self.mock_get_capabilities.stop()
-
- def load_fixtures(self, commands=None):
- self.get_config.return_value = load_fixture('ios_logging_config_ios12.cfg')
- self.load_config.return_value = None
-
- def test_ios_logging_add_host(self):
- set_module_args(dict(dest='host', name='192.168.1.1'))
- commands = ['logging 192.168.1.1']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_logging_host_idempotent(self):
- set_module_args(dict(dest='host', name='2.3.4.5'))
- commands = []
- self.execute_module(changed=False, commands=commands)
-
- def test_ios_logging_delete_non_exist_host(self):
- set_module_args(dict(dest='host', name='192.168.1.1', state='absent'))
- commands = []
- self.execute_module(changed=False, commands=commands)
-
- def test_ios_logging_delete_host(self):
- set_module_args(dict(dest='host', name='2.3.4.5', state='absent'))
- commands = ['no logging 2.3.4.5']
- self.execute_module(changed=True, commands=commands)
diff --git a/test/units/modules/network/ios/test_ios_ntp.py b/test/units/modules/network/ios/test_ios_ntp.py
deleted file mode 100644
index 0d106a75c0..0000000000
--- a/test/units/modules/network/ios/test_ios_ntp.py
+++ /dev/null
@@ -1,99 +0,0 @@
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from units.compat.mock import patch
-from ansible.modules.network.ios import ios_ntp
-from units.modules.utils import set_module_args
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosNtpModule(TestIosModule):
-
- module = ios_ntp
-
- def setUp(self):
- super(TestIosNtpModule, self).setUp()
-
- self.mock_get_config = patch('ansible.modules.network.ios.ios_ntp.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.ios.ios_ntp.load_config')
- self.load_config = self.mock_load_config.start()
-
- def tearDown(self):
- super(TestIosNtpModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None):
- self.get_config.return_value = load_fixture('ios_ntp_config.cfg').strip()
- self.load_config.return_value = dict(diff=None, session='session')
-
- def test_ios_ntp_idempotent(self):
- set_module_args(dict(
- server='10.75.32.5',
- source_int='Loopback0',
- acl='NTP_ACL',
- logging=True,
- auth=True,
- auth_key='15435A030726242723273C21181319000A',
- key_id='10',
- state='present'
- ))
- commands = []
- self.execute_module(changed=False, commands=commands)
-
- def test_ios_ntp_config(self):
- set_module_args(dict(
- server='10.75.33.5',
- source_int='Vlan2',
- acl='NTP_ACL',
- logging=True,
- auth=True,
- auth_key='15435A030726242723273C21181319000A',
- key_id='10',
- state='present'
- ))
- commands = [
- 'ntp server 10.75.33.5',
- 'ntp source Vlan2'
- ]
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_ntp_remove(self):
- set_module_args(dict(
- server='10.75.32.5',
- source_int='Loopback0',
- acl='NTP_ACL',
- logging=True,
- auth=True,
- auth_key='15435A030726242723273C21181319000A',
- key_id='10',
- state='absent'
- ))
- commands = [
- 'no ntp server 10.75.32.5',
- 'no ntp source Loopback0',
- 'no ntp access-group peer NTP_ACL',
- 'no ntp logging',
- 'no ntp authenticate',
- 'no ntp trusted-key 10',
- 'no ntp authentication-key 10 md5 15435A030726242723273C21181319000A 7'
- ]
- self.execute_module(changed=True, commands=commands)
diff --git a/test/units/modules/network/ios/test_ios_ping.py b/test/units/modules/network/ios/test_ios_ping.py
deleted file mode 100644
index 0bb73bb756..0000000000
--- a/test/units/modules/network/ios/test_ios_ping.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# (c) 2016 Red Hat Inc.
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from units.compat.mock import patch
-from ansible.modules.network.ios import ios_ping
-from units.modules.utils import set_module_args
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosPingModule(TestIosModule):
- ''' Class used for Unit Tests agains ios_ping module '''
- module = ios_ping
-
- def setUp(self):
- super(TestIosPingModule, self).setUp()
- self.mock_run_commands = patch('ansible.modules.network.ios.ios_ping.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- def tearDown(self):
- super(TestIosPingModule, self).tearDown()
- self.mock_run_commands.stop()
-
- def load_fixtures(self, commands=None):
- def load_from_file(*args, **kwargs):
- commands = kwargs['commands']
- output = list()
-
- for command in commands:
- filename = str(command).split(' | ')[0].replace(' ', '_')
- output.append(load_fixture('ios_ping_%s' % filename))
- return output
-
- self.run_commands.side_effect = load_from_file
-
- def test_ios_ping_expected_success(self):
- ''' Test for successful pings when destination should be reachable '''
- set_module_args(dict(count=2, dest="8.8.8.8"))
- self.execute_module()
-
- def test_ios_ping_expected_failure(self):
- ''' Test for unsuccessful pings when destination should not be reachable '''
- set_module_args(dict(count=2, dest="10.255.255.250", state="absent"))
- self.execute_module()
-
- def test_ios_ping_unexpected_success(self):
- ''' Test for successful pings when destination should not be reachable - FAIL. '''
- set_module_args(dict(count=2, dest="8.8.8.8", state="absent"))
- self.execute_module(failed=True)
-
- def test_ios_ping_unexpected_failure(self):
- ''' Test for unsuccessful pings when destination should be reachable - FAIL. '''
- set_module_args(dict(count=2, dest="10.255.255.250"))
- self.execute_module(failed=True)
diff --git a/test/units/modules/network/ios/test_ios_static_routes.py b/test/units/modules/network/ios/test_ios_static_routes.py
deleted file mode 100644
index 50b0ffa7ec..0000000000
--- a/test/units/modules/network/ios/test_ios_static_routes.py
+++ /dev/null
@@ -1,357 +0,0 @@
-#
-# (c) 2019, Ansible by Red Hat, inc
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-#
-
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from units.compat.mock import patch
-from ansible.modules.network.ios import ios_static_routes
-from units.modules.utils import set_module_args
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosStaticRoutesModule(TestIosModule):
- module = ios_static_routes
-
- def setUp(self):
- super(TestIosStaticRoutesModule, self).setUp()
-
- self.mock_get_config = patch('ansible.module_utils.network.common.network.Config.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.module_utils.network.common.network.Config.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_resource_connection_config = patch('ansible.module_utils.network.common.cfg.base.'
- 'get_resource_connection')
- self.get_resource_connection_config = self.mock_get_resource_connection_config.start()
-
- self.mock_get_resource_connection_facts = patch('ansible.module_utils.network.common.facts.facts.'
- 'get_resource_connection')
- self.get_resource_connection_facts = self.mock_get_resource_connection_facts.start()
-
- self.mock_edit_config = patch('ansible.module_utils.network.ios.providers.providers.CliProvider.edit_config')
- self.edit_config = self.mock_edit_config.start()
-
- self.mock_execute_show_command = patch('ansible.module_utils.network.ios.facts.static_routes.static_routes.'
- 'Static_RoutesFacts.get_static_routes_data')
- self.execute_show_command = self.mock_execute_show_command.start()
-
- def tearDown(self):
- super(TestIosStaticRoutesModule, self).tearDown()
- self.mock_get_resource_connection_config.stop()
- self.mock_get_resource_connection_facts.stop()
- self.mock_edit_config.stop()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
- self.mock_execute_show_command.stop()
-
- def load_fixtures(self, commands=None, transport='cli'):
- def load_from_file(*args, **kwargs):
- return load_fixture('ios_static_routes_config.cfg')
- self.execute_show_command.side_effect = load_from_file
-
- def test_ios_static_routes_merged(self):
- set_module_args(dict(
- config=[dict(
- vrf="ansible_vrf",
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="192.0.2.0 255.255.255.0",
- next_hops=[dict(
- forward_router_address="192.0.2.1",
- name="test_vrf",
- tag=50,
- track=150
- )],
- )],
- )],
- ), dict(
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="198.51.100.0 255.255.255.0",
- next_hops=[dict(
- forward_router_address="198.51.101.1",
- name="route_1",
- distance_metric=110,
- tag=40,
- multicast=True
- )],
- )],
- )],
- )], state="merged"
- ))
- result = self.execute_module(changed=True)
- commands = ['ip route vrf ansible_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50',
- 'ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40'
- ]
- self.assertEqual(result['commands'], commands)
-
- def test_ios_static_routes_merged_idempotent(self):
- set_module_args(dict(
- config=[dict(
- vrf="ansible_vrf",
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="192.0.2.0/24",
- next_hops=[dict(
- forward_router_address="192.0.2.1",
- name="test_vrf",
- tag=50,
- track=175
- )],
- )],
- )],
- ), dict(
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="198.51.100.0/24",
- next_hops=[dict(
- forward_router_address="198.51.101.1",
- name="route_1",
- distance_metric=110,
- tag=60,
- multicast=True
- )],
- )],
- )],
- )], state="merged"
- ))
- self.execute_module(changed=False, commands=[], sort=True)
-
- def test_ios_static_routes_replaced(self):
- set_module_args(dict(
- config=[dict(
- vrf="ansible_vrf",
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="192.0.2.0 255.255.255.0",
- next_hops=[dict(
- forward_router_address="192.0.2.1",
- name="replaced_vrf",
- tag=10,
- track=170
- )],
- )],
- )],
- ), dict(
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="198.51.100.0 255.255.255.0",
- next_hops=[dict(
- forward_router_address="198.51.101.1",
- name="replaced_route_1",
- distance_metric=110,
- tag=60,
- multicast=True
- )],
- )],
- )],
- )], state="replaced"
- ))
- result = self.execute_module(changed=True)
- commands = ['ip route vrf ansible_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name replaced_vrf track 170 tag 10',
- 'ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name replaced_route_1 tag 60'
- ]
- self.assertEqual(result['commands'], commands)
-
- def test_ios_static_routes_replaced_idempotent(self):
- set_module_args(dict(
- config=[dict(
- vrf="ansible_vrf",
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="192.0.2.0/24",
- next_hops=[dict(
- forward_router_address="192.0.2.1",
- name="test_vrf",
- tag=50,
- track=175
- )],
- )],
- )],
- ), dict(
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="198.51.100.0/24",
- next_hops=[dict(
- forward_router_address="198.51.101.1",
- name="route_1",
- distance_metric=110,
- tag=60,
- multicast=True
- )],
- )],
- )],
- )], state="replaced"
- ))
- self.execute_module(changed=False, commands=[], sort=True)
-
- def test_ios_static_routes_overridden(self):
- set_module_args(dict(
- config=[dict(
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="198.51.100.0 255.255.255.0",
- next_hops=[dict(
- forward_router_address="198.51.101.1",
- name="override_route_1",
- distance_metric=150,
- tag=50,
- multicast=True
- )],
- )],
- )],
- )], state="overridden"
- ))
- result = self.execute_module(changed=True)
- commands = [
- 'no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 60',
- 'no ip route vrf ansible_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 175 tag 50',
- 'ip route 198.51.100.0 255.255.255.0 198.51.101.1 150 multicast name override_route_1 tag 50'
- ]
-
- self.assertEqual(result['commands'], commands)
-
- def test_ios_static_routes_overridden_idempotent(self):
- set_module_args(dict(
- config=[dict(
- vrf="ansible_vrf",
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="192.0.2.0/24",
- next_hops=[dict(
- forward_router_address="192.0.2.1",
- name="test_vrf",
- tag=50,
- track=175
- )],
- )],
- )],
- ), dict(
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="198.51.100.0/24",
- next_hops=[dict(
- forward_router_address="198.51.101.1",
- name="route_1",
- distance_metric=110,
- tag=60,
- multicast=True
- )],
- )],
- )],
- )], state="overridden"
- ))
- self.execute_module(changed=False, commands=[], sort=True)
-
- def test_ios_delete_static_route_config(self):
- set_module_args(dict(
- config=[dict(
- vrf="ansible_vrf",
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="192.0.2.0/24",
- next_hops=[dict(
- forward_router_address="192.0.2.1",
- name="test_vrf",
- tag=50,
- track=175
- )],
- )],
- )],
- ), dict(
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="198.51.100.0/24",
- next_hops=[dict(
- forward_router_address="198.51.101.1",
- name="route_1",
- distance_metric=110,
- tag=60,
- multicast=True
- )],
- )],
- )],
- )], state="deleted"
- ))
- result = self.execute_module(changed=True)
- commands = [
- 'no ip route vrf ansible_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 175 tag 50',
- 'no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 60'
- ]
- self.assertEqual(result['commands'], commands)
-
- def test_ios_delete_static_route_dest_based(self):
- set_module_args(dict(
- config=[dict(
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="198.51.100.0/24"
- )],
- )],
- )], state="deleted"
- ))
- result = self.execute_module(changed=True)
- commands = [
- 'no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 60'
- ]
- self.assertEqual(result['commands'], commands)
-
- def test_ios_delete_static_route_vrf_based(self):
- set_module_args(dict(
- config=[dict(
- vrf="ansible_vrf",
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="192.0.2.0/24"
- )],
- )],
- )], state="deleted"
- ))
- result = self.execute_module(changed=True)
- commands = [
- 'no ip route vrf ansible_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 175 tag 50'
- ]
- self.assertEqual(result['commands'], commands)
-
- def test_static_route_rendered(self):
- set_module_args(dict(
- config=[dict(
- vrf="ansible_vrf",
- address_families=[dict(
- afi="ipv4",
- routes=[dict(
- dest="192.0.2.0/24",
- next_hops=[dict(
- forward_router_address="192.0.2.1",
- name="test_vrf",
- tag=50,
- track=175
- )],
- )],
- )],
- )], state="rendered"
- ))
- commands = [
- 'ip route vrf ansible_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 175 tag 50'
- ]
- result = self.execute_module(changed=False)
- self.assertEqual(sorted(result['rendered']), commands)
diff --git a/test/units/modules/network/ios/test_ios_system.py b/test/units/modules/network/ios/test_ios_system.py
deleted file mode 100644
index 0d43949f47..0000000000
--- a/test/units/modules/network/ios/test_ios_system.py
+++ /dev/null
@@ -1,123 +0,0 @@
-#
-# (c) 2016 Red Hat Inc.
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from units.compat.mock import patch
-from ansible.modules.network.ios import ios_system
-from units.modules.utils import set_module_args
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosSystemModule(TestIosModule):
-
- module = ios_system
-
- def setUp(self):
- super(TestIosSystemModule, self).setUp()
-
- self.mock_get_config = patch('ansible.modules.network.ios.ios_system.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.ios.ios_system.load_config')
- self.load_config = self.mock_load_config.start()
-
- def tearDown(self):
- super(TestIosSystemModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None):
- self.get_config.return_value = load_fixture('ios_system_config.cfg')
- self.load_config.return_value = None
-
- def test_ios_system_hostname_changed(self):
- set_module_args(dict(hostname='foo'))
- commands = ['hostname foo']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_system_domain_name(self):
- set_module_args(dict(domain_name=['test.com']))
- commands = ['ip domain name test.com',
- 'no ip domain name eng.example.net',
- 'no ip domain name vrf management eng.example.net']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_system_domain_name_complex(self):
- set_module_args(dict(domain_name=[{'name': 'test.com', 'vrf': 'test'},
- {'name': 'eng.example.net'}]))
- commands = ['ip domain name vrf test test.com',
- 'no ip domain name vrf management eng.example.net']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_system_domain_search(self):
- set_module_args(dict(domain_search=['ansible.com', 'redhat.com']))
- commands = ['no ip domain list vrf management example.net',
- 'no ip domain list example.net',
- 'no ip domain list example.com',
- 'ip domain list ansible.com',
- 'ip domain list redhat.com']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_system_domain_search_complex(self):
- set_module_args(dict(domain_search=[{'name': 'ansible.com', 'vrf': 'test'}]))
- commands = ['no ip domain list vrf management example.net',
- 'no ip domain list example.net',
- 'no ip domain list example.com',
- 'ip domain list vrf test ansible.com']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_system_lookup_source(self):
- set_module_args(dict(lookup_source='Ethernet1'))
- commands = ['ip domain lookup source-interface Ethernet1']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_system_name_servers(self):
- name_servers = ['8.8.8.8', '8.8.4.4']
- set_module_args(dict(name_servers=name_servers))
- commands = ['no ip name-server vrf management 8.8.8.8',
- 'ip name-server 8.8.4.4']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def rest_ios_system_name_servers_complex(self):
- name_servers = dict(server='8.8.8.8', vrf='test')
- set_module_args(dict(name_servers=name_servers))
- commands = ['no name-server 8.8.8.8',
- 'no name-server vrf management 8.8.8.8',
- 'ip name-server vrf test 8.8.8.8']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_system_state_absent(self):
- set_module_args(dict(state='absent'))
- commands = ['no hostname',
- 'no ip domain lookup source-interface GigabitEthernet0/0',
- 'no ip domain list vrf management', 'no ip domain list',
- 'no ip domain name vrf management', 'no ip domain name',
- 'no ip name-server vrf management', 'no ip name-server']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_system_no_change(self):
- set_module_args(dict(hostname='ios01'))
- self.execute_module(commands=[])
-
- def test_ios_system_missing_vrf(self):
- name_servers = dict(server='8.8.8.8', vrf='missing')
- set_module_args(dict(name_servers=name_servers))
- self.execute_module(failed=True)
diff --git a/test/units/modules/network/ios/test_ios_user.py b/test/units/modules/network/ios/test_ios_user.py
deleted file mode 100644
index 5f0032bcae..0000000000
--- a/test/units/modules/network/ios/test_ios_user.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# (c) 2016 Red Hat Inc.
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from units.compat.mock import patch
-from ansible.modules.network.ios import ios_user
-from units.modules.utils import set_module_args
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosUserModule(TestIosModule):
-
- module = ios_user
-
- def setUp(self):
- super(TestIosUserModule, self).setUp()
-
- self.mock_get_config = patch('ansible.modules.network.ios.ios_user.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.ios.ios_user.load_config')
- self.load_config = self.mock_load_config.start()
-
- def tearDown(self):
- super(TestIosUserModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None, transport='cli'):
- self.get_config.return_value = load_fixture('ios_user_config.cfg')
- self.load_config.return_value = dict(diff=None, session='session')
-
- def test_ios_user_create(self):
- set_module_args(dict(name='test', nopassword=True))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['username test nopassword'])
-
- def test_ios_user_delete(self):
- set_module_args(dict(name='ansible', state='absent'))
- result = self.execute_module(changed=True)
- cmds = [
- {
- "command": "no username ansible", "answer": "y", "newline": False,
- "prompt": "This operation will remove all username related configurations with same name",
- }
- ]
-
- result_cmd = []
- for i in result['commands']:
- result_cmd.append(i)
-
- self.assertEqual(result_cmd, cmds)
-
- def test_ios_user_password(self):
- set_module_args(dict(name='ansible', configured_password='test'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['username ansible secret test'])
-
- def test_ios_user_privilege(self):
- set_module_args(dict(name='ansible', privilege=15))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['username ansible privilege 15'])
-
- def test_ios_user_privilege_invalid(self):
- set_module_args(dict(name='ansible', privilege=25))
- self.execute_module(failed=True)
-
- def test_ios_user_purge(self):
- set_module_args(dict(purge=True))
- result = self.execute_module(changed=True)
- cmd = {
- "command": "no username ansible", "answer": "y", "newline": False,
- "prompt": "This operation will remove all username related configurations with same name",
- }
-
- result_cmd = []
- for i in result['commands']:
- result_cmd.append(i)
-
- self.assertEqual(result_cmd, [cmd])
-
- def test_ios_user_view(self):
- set_module_args(dict(name='ansible', view='test'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['username ansible view test'])
-
- def test_ios_user_update_password_changed(self):
- set_module_args(dict(name='test', configured_password='test', update_password='on_create'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['username test secret test'])
-
- def test_ios_user_update_password_on_create_ok(self):
- set_module_args(dict(name='ansible', configured_password='test', update_password='on_create'))
- self.execute_module()
-
- def test_ios_user_update_password_always(self):
- set_module_args(dict(name='ansible', configured_password='test', update_password='always'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['username ansible secret test'])
-
- def test_ios_user_set_sshkey(self):
- set_module_args(dict(name='ansible', sshkey='dGVzdA=='))
- commands = [
- 'ip ssh pubkey-chain',
- 'username ansible',
- 'key-hash ssh-rsa 098F6BCD4621D373CADE4E832627B4F6',
- 'exit',
- 'exit'
- ]
- result = self.execute_module(changed=True, commands=commands)
- self.assertEqual(result['commands'], commands)
-
- def test_ios_user_set_sshkey_multiple(self):
- set_module_args(dict(name='ansible', sshkey=['dGVzdA==', 'eHWacB2==']))
- commands = [
- 'ip ssh pubkey-chain',
- 'username ansible',
- 'key-hash ssh-rsa 098F6BCD4621D373CADE4E832627B4F6',
- 'key-hash ssh-rsa A019918340A1E9183388D9A675603036',
- 'exit',
- 'exit'
- ]
- result = self.execute_module(changed=True, commands=commands)
- self.assertEqual(result['commands'], commands)
diff --git a/test/units/modules/network/ios/test_ios_vlan.py b/test/units/modules/network/ios/test_ios_vlan.py
deleted file mode 100644
index 201efd1ad4..0000000000
--- a/test/units/modules/network/ios/test_ios_vlan.py
+++ /dev/null
@@ -1,149 +0,0 @@
-# (c) 2018 Red Hat Inc.
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from units.compat.mock import patch
-from ansible.modules.network.ios import _ios_vlan
-from ansible.modules.network.ios._ios_vlan import parse_vlan_brief
-from units.modules.utils import set_module_args
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosVlanModule(TestIosModule):
-
- module = _ios_vlan
-
- def setUp(self):
- super(TestIosVlanModule, self).setUp()
-
- self.mock_run_commands = patch('ansible.modules.network.ios._ios_vlan.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.mock_load_config = patch('ansible.modules.network.ios._ios_vlan.load_config')
- self.load_config = self.mock_load_config.start()
-
- def tearDown(self):
- super(TestIosVlanModule, self).tearDown()
- self.mock_run_commands.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None, transport='cli'):
- self.run_commands.return_value = [load_fixture('ios_vlan_config.cfg')]
- self.load_config.return_value = {'diff': None, 'session': 'session'}
-
- def test_ios_vlan_create(self):
- set_module_args({'vlan_id': '3', 'name': 'test', 'state': 'present'})
- result = self.execute_module(changed=True)
- expected_commands = [
- 'vlan 3',
- 'name test',
- ]
- self.assertEqual(result['commands'], expected_commands)
-
- def test_ios_vlan_id_startwith_9(self):
- set_module_args({'vlan_id': '9', 'name': 'vlan9', 'state': 'present'})
- result = self.execute_module(changed=False)
- expected_commands = []
- self.assertEqual(result['commands'], expected_commands)
-
- def test_ios_vlan_rename(self):
- set_module_args({'vlan_id': '2', 'name': 'test', 'state': 'present'})
- result = self.execute_module(changed=True)
- expected_commands = [
- 'vlan 2',
- 'name test',
- ]
- self.assertEqual(result['commands'], expected_commands)
-
- def test_ios_vlan_with_interfaces(self):
- set_module_args({'vlan_id': '2', 'name': 'vlan2', 'state': 'present', 'interfaces': ['GigabitEthernet1/0/8', 'GigabitEthernet1/0/7']})
- result = self.execute_module(changed=True)
- expected_commands = [
- 'vlan 2',
- 'interface GigabitEthernet1/0/8',
- 'switchport mode access',
- 'switchport access vlan 2',
- 'vlan 2',
- 'interface GigabitEthernet1/0/6',
- 'switchport mode access',
- 'no switchport access vlan 2',
- ]
- self.assertEqual(result['commands'], expected_commands)
-
- def test_ios_vlan_with_interfaces_and_newvlan(self):
- set_module_args({'vlan_id': '3', 'name': 'vlan3', 'state': 'present', 'interfaces': ['GigabitEthernet1/0/8', 'GigabitEthernet1/0/7']})
- result = self.execute_module(changed=True)
- expected_commands = [
- 'vlan 3',
- 'name vlan3',
- 'interface GigabitEthernet1/0/8',
- 'switchport mode access',
- 'switchport access vlan 3',
- 'interface GigabitEthernet1/0/7',
- 'switchport mode access',
- 'switchport access vlan 3',
- ]
- self.assertEqual(result['commands'], expected_commands)
-
- def test_parse_vlan_brief(self):
- result = parse_vlan_brief(load_fixture('ios_vlan_config.cfg'))
- obj = [
- {
- 'name': 'default',
- 'interfaces': [
- 'GigabitEthernet1/0/4',
- 'GigabitEthernet1/0/5',
- 'GigabitEthernet1/0/52',
- 'GigabitEthernet1/0/54',
- ],
- 'state': 'active',
- 'vlan_id': '1',
- },
- {
- 'name': 'vlan2',
- 'interfaces': [
- 'GigabitEthernet1/0/6',
- 'GigabitEthernet1/0/7',
- ],
- 'state': 'active',
- 'vlan_id': '2',
- },
- {
- 'name': 'vlan9',
- 'interfaces': [
- 'GigabitEthernet1/0/6',
- ],
- 'state': 'active',
- 'vlan_id': '9',
- },
- {
- 'name': 'fddi-default',
- 'interfaces': [],
- 'state': 'act/unsup',
- 'vlan_id': '1002',
- },
- {
- 'name': 'fddo-default',
- 'interfaces': [],
- 'state': 'act/unsup',
- 'vlan_id': '1003',
- },
- ]
- self.assertEqual(result, obj)
diff --git a/test/units/modules/network/ios/test_ios_vrf.py b/test/units/modules/network/ios/test_ios_vrf.py
deleted file mode 100644
index 1b00c4e665..0000000000
--- a/test/units/modules/network/ios/test_ios_vrf.py
+++ /dev/null
@@ -1,210 +0,0 @@
-#
-# (c) 2016 Red Hat Inc.
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-
-__metaclass__ = type
-
-from units.compat.mock import patch
-from ansible.modules.network.ios import ios_vrf
-from units.modules.utils import set_module_args
-from .ios_module import TestIosModule, load_fixture
-
-
-class TestIosVrfModule(TestIosModule):
- module = ios_vrf
-
- def setUp(self):
- super(TestIosVrfModule, self).setUp()
-
- self.mock_get_config = patch('ansible.modules.network.ios.ios_vrf.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.ios.ios_vrf.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_exec_command = patch('ansible.modules.network.ios.ios_vrf.exec_command')
- self.exec_command = self.mock_exec_command.start()
-
- def tearDown(self):
- super(TestIosVrfModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
- self.mock_exec_command.stop()
-
- def load_fixtures(self, commands=None):
- self.get_config.return_value = load_fixture('ios_vrf_config.cfg')
- self.exec_command.return_value = (0, load_fixture('ios_vrf_config.cfg').strip(), None)
- self.load_config.return_value = None
-
- def test_ios_vrf_name(self):
- set_module_args(dict(name='test_4'))
- commands = ['vrf definition test_4']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrf_name_unchanged(self):
- set_module_args(dict(name='test_1', rd='1:100', description='test vrf 1'))
- self.execute_module()
-
- def test_ios_vrf_description(self):
- set_module_args(dict(name='test_1', description='test string'))
- commands = ['vrf definition test_1', 'description test string']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrf_rd(self):
- set_module_args(dict(name='test_1', rd='2:100'))
- commands = ['vrf definition test_1', 'rd 2:100']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrf_interfaces(self):
- set_module_args(dict(name='test_1', interfaces=['Ethernet1']))
- commands = ['interface Ethernet2', 'no vrf forwarding test_1', 'interface Ethernet1', 'vrf forwarding test_1', 'ip address 1.2.3.4/5']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrf_state_absent(self):
- set_module_args(dict(name='test_1', state='absent'))
- commands = ['no vrf definition test_1']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_vrf_purge_all(self):
- set_module_args(dict(purge=True))
- commands = ['no vrf definition test_1', 'no vrf definition test_2', 'no vrf definition test_3', 'no vrf definition test_17',
- 'no vrf definition test_18', 'no vrf definition test_19']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_vrf_purge_all_but_one(self):
- set_module_args(dict(name='test_1', purge=True))
- commands = ['no vrf definition test_2', 'no vrf definition test_3', 'no vrf definition test_17', 'no vrf definition test_18',
- 'no vrf definition test_19']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_vrfs_no_purge(self):
- vrfs = [{'name': 'test_1'}, {'name': 'test_4'}]
- set_module_args(dict(vrfs=vrfs))
- commands = ['vrf definition test_4']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_vrfs_purge(self):
- vrfs = [{'name': 'test_1'}, {'name': 'test_4'}]
- set_module_args(dict(vrfs=vrfs, purge=True))
- commands = ['vrf definition test_4', 'no vrf definition test_2',
- 'no vrf definition test_3', 'no vrf definition test_17', 'no vrf definition test_18', 'no vrf definition test_19']
- self.execute_module(changed=True, commands=commands)
-
- def test_ios_vrfs_global_arg(self):
- vrfs = [{'name': 'test_1'}, {'name': 'test_2'}]
- set_module_args(dict(vrfs=vrfs, description='test string'))
- commands = ['vrf definition test_1', 'description test string', 'vrf definition test_2', 'description test string']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrfs_local_override_description(self):
- vrfs = [{'name': 'test_1', 'description': 'test vrf 1'}, {'name': 'test_2'}]
- set_module_args(dict(vrfs=vrfs, description='test string'))
- commands = ['vrf definition test_2', 'description test string']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrfs_local_override_state(self):
- vrfs = [{'name': 'test_1', 'state': 'absent'}, {'name': 'test_2'}]
- set_module_args(dict(vrfs=vrfs, description='test string'))
- commands = ['no vrf definition test_1', 'vrf definition test_2', 'description test string']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrf_route_both(self):
- set_module_args(dict(name='test_5', rd='2:100', route_both=['2:100', '3:100']))
- commands = ['vrf definition test_5', 'address-family ipv4', 'exit', 'address-family ipv6', 'exit', 'rd 2:100', 'route-target import 2:100',
- 'route-target import 3:100', 'route-target export 2:100', 'route-target export 3:100']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrf_route_import(self):
- set_module_args(dict(name='test_6', rd='3:100', route_import=['3:100', '4:100']))
- commands = ['vrf definition test_6', 'rd 3:100', 'route-target import 3:100',
- 'route-target import 4:100']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrf_route_export(self):
- set_module_args(dict(name='test_7', rd='4:100', route_export=['3:100', '4:100']))
- commands = ['vrf definition test_7', 'rd 4:100', 'route-target export 3:100',
- 'route-target export 4:100']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrf_route_both_mixed(self):
- set_module_args(dict(name='test_8', rd='5:100', route_both=['3:100', '4:100'], route_export=['3:100', '4:100']))
- self.execute_module(changed=True)
-
- def test_ios_vrf_route_both_ipv4(self):
- set_module_args(dict(name='test_9', rd='168.0.0.9:100', route_both_ipv4=['168.0.0.9:100', '3:100']))
- commands = ['vrf definition test_9', 'address-family ipv4', 'exit', 'rd 168.0.0.9:100', 'address-family ipv4',
- 'route-target import 168.0.0.9:100', 'route-target import 3:100', 'exit-address-family', 'address-family ipv4',
- 'route-target export 168.0.0.9:100', 'route-target export 3:100', 'exit-address-family']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrf_route_import_ipv4(self):
- set_module_args(dict(name='test_10', rd='168.0.0.10:100', route_import_ipv4=['168.0.0.10:100', '3:100']))
- commands = ['vrf definition test_10', 'address-family ipv4', 'exit', 'rd 168.0.0.10:100', 'address-family ipv4',
- 'route-target import 168.0.0.10:100', 'route-target import 3:100', 'exit-address-family']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrf_route_export_ipv4(self):
- set_module_args(dict(name='test_11', rd='168.0.0.11:100', route_export_ipv4=['168.0.0.11:100', '3:100']))
- commands = ['vrf definition test_11', 'address-family ipv4', 'exit', 'rd 168.0.0.11:100', 'address-family ipv4',
- 'route-target export 168.0.0.11:100', 'route-target export 3:100', 'exit-address-family']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrf_route_both_ipv4_mixed(self):
- set_module_args(dict(name='test_12', rd='168.0.0.12:100', route_both_ipv4=['168.0.0.12:100', '3:100'], route_export_ipv4=['168.0.0.15:100', '6:100']))
- self.execute_module(changed=True)
-
- def test_ios_vrf_route_both_ipv6(self):
- set_module_args(dict(name='test_13', rd='2:100', route_both_ipv6=['2:100', '168.0.0.13:100']))
- commands = ['vrf definition test_13', 'address-family ipv6', 'exit', 'rd 2:100', 'address-family ipv6',
- 'route-target import 2:100', 'route-target import 168.0.0.13:100', 'exit-address-family', 'address-family ipv6',
- 'route-target export 2:100', 'route-target export 168.0.0.13:100', 'exit-address-family']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrf_route_import_ipv6(self):
- set_module_args(dict(name='test_14', rd='3:100', route_import_ipv6=['3:100', '168.0.0.14:100']))
- commands = ['vrf definition test_14', 'address-family ipv6', 'exit', 'rd 3:100', 'address-family ipv6',
- 'route-target import 3:100', 'route-target import 168.0.0.14:100', 'exit-address-family']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrf_route_export_ipv6(self):
- set_module_args(dict(name='test_15', rd='4:100', route_export_ipv6=['168.0.0.15:100', '4:100']))
- commands = ['vrf definition test_15', 'address-family ipv6', 'exit', 'rd 4:100', 'address-family ipv6',
- 'route-target export 168.0.0.15:100', 'route-target export 4:100', 'exit-address-family']
- self.execute_module(changed=True, commands=commands, sort=False)
-
- def test_ios_vrf_route_both_ipv6_mixed(self):
- set_module_args(dict(name='test_16', rd='5:100', route_both_ipv6=['168.0.0.9:100', '4:100'], route_export_ipv6=['168.0.0.12:100', '6:100']))
- self.execute_module(changed=True)
-
- def test_ios_vrf_route_both_ipv6_mixed_idempotent(self):
- set_module_args(dict(name='test_17', rd='2:100', route_import_ipv6=['168.0.0.14:100'], route_both_ipv6=['2:100', '168.0.0.13:100'],
- route_export_ipv6=['168.0.0.15:100', '4:100']))
- self.execute_module(changed=False, commands=[], sort=False)
-
- def test_ios_vrf_route_both_ipv4_mixed_idempotent(self):
- set_module_args(dict(name='test_18', rd='168.0.0.9:100', route_import_ipv4=['168.0.0.10:600'], route_export_ipv4=['168.0.0.10:100'],
- route_both_ipv4=['168.0.0.9:100', '3:100']))
- self.execute_module(changed=False, commands=[], sort=False)
-
- def test_ios_vrf_all_route_both_idempotent(self):
- set_module_args(dict(name='test_19', rd='10:700', route_both=['2:100', '2:101'], route_export=['2:102', '2:103'], route_import=['2:104', '2:105'],
- route_both_ipv4=['2:100', '2:101'], route_export_ipv4=['2:102', '2:103'], route_import_ipv4=['2:104', '2:105'],
- route_both_ipv6=['2:100', '2:101'], route_export_ipv6=['2:102', '2:103'], route_import_ipv6=['2:104', '2:105']))
- self.execute_module(changed=False, commands=[], sort=False)
diff --git a/test/units/plugins/cliconf/fixtures/ios/show_version b/test/units/plugins/cliconf/fixtures/ios/show_version
deleted file mode 100644
index eadd3d3ad1..0000000000
--- a/test/units/plugins/cliconf/fixtures/ios/show_version
+++ /dev/null
@@ -1,54 +0,0 @@
-Cisco IOS XE Software, Version 16.06.01
-Cisco IOS Software [Everest], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.6.1, RELEASE SOFTWARE (fc2)
-Technical Support: http://www.cisco.com/techsupport
-Copyright (c) 1986-2017 by Cisco Systems, Inc.
-Compiled Sat 22-Jul-17 05:51 by mcpre
-
-
-Cisco IOS-XE software, Copyright (c) 2005-2017 by cisco Systems, Inc.
-All rights reserved. Certain components of Cisco IOS-XE software are
-licensed under the GNU General Public License ("GPL") Version 2.0. The
-software code licensed under GPL Version 2.0 is free software that comes
-with ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such
-GPL code under the terms of GPL Version 2.0. For more details, see the
-documentation or "License Notice" file accompanying the IOS-XE software,
-or the applicable URL provided on the flyer accompanying the IOS-XE
-software.
-
-
-ROM: IOS-XE ROMMON
-
-an-csr-01 uptime is 1 day, 16 hours, 15 minutes
-Uptime for this control processor is 1 day, 16 hours, 16 minutes
-System returned to ROM by reload
-System image file is "bootflash:packages.conf"
-Last reload reason: Reload Command
-
-
-
-This product contains cryptographic features and is subject to United
-States and local country laws governing import, export, transfer and
-use. Delivery of Cisco cryptographic products does not imply
-third-party authority to import, export, distribute or use encryption.
-Importers, exporters, distributors and users are responsible for
-compliance with U.S. and local country laws. By using this product you
-agree to comply with applicable laws and regulations. If you are unable
-to comply with U.S. and local laws, return this product immediately.
-
-A summary of U.S. laws governing Cisco cryptographic products may be found at:
-http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
-
-If you require further assistance please contact us by sending email to
-export@cisco.com.
-
-License Level: ax
-License Type: Default. No valid license found.
-Next reload license Level: ax
-
-cisco CSR1000V (VXE) processor (revision VXE) with 1225511K/3075K bytes of memory.
-Processor board ID 9I5BX4UHSO4
-3 Gigabit Ethernet interfaces
-32768K bytes of non-volatile configuration memory.
-3018776K bytes of physical memory.
-16162815K bytes of virtual hard disk at bootflash:.
-0K bytes of WebUI ODM Files at webui:.
diff --git a/test/units/plugins/cliconf/fixtures/nos/show_chassis b/test/units/plugins/cliconf/fixtures/nos/show_chassis
deleted file mode 100644
index af51cbaff7..0000000000
--- a/test/units/plugins/cliconf/fixtures/nos/show_chassis
+++ /dev/null
@@ -1,30 +0,0 @@
-
-Chassis Name: BR-VDX6740
-switchType: 131
-
-FAN Unit: 1
-Time Awake: 0 days
-
-FAN Unit: 2
-Time Awake: 0 days
-
-POWER SUPPLY Unit: 1
-Factory Part Num: 23-1000043-01
-Factory Serial Num:
-Time Awake: 0 days
-
-POWER SUPPLY Unit: 2
-Factory Part Num: 23-1000043-01
-Factory Serial Num:
-Time Awake: 0 days
-
-CHASSIS/WWN Unit: 1
-Power Consume Factor: 0
-Factory Part Num: 40-1000927-06
-Factory Serial Num: CPL2541K01E
-Manufacture: Day: 11 Month: 8 Year: 14
-Update: Day: 18 Month: 7 Year: 2018
-Time Alive: 1116 days
-Time Awake: 0 days
-
-Airflow direction : Port side INTAKE
diff --git a/test/units/plugins/cliconf/fixtures/nos/show_running-config b/test/units/plugins/cliconf/fixtures/nos/show_running-config
deleted file mode 100644
index 8a4f631fe2..0000000000
--- a/test/units/plugins/cliconf/fixtures/nos/show_running-config
+++ /dev/null
@@ -1,549 +0,0 @@
-diag post rbridge-id 104 enable
-ntp server 10.10.10.1 use-vrf mgmt-vrf
-logging raslog console INFO
-logging auditlog class SECURITY
-logging auditlog class CONFIGURATION
-logging auditlog class FIRMWARE
-logging syslog-facility local LOG_LOCAL7
-logging syslog-client localip CHASSIS_IP
-switch-attributes 104
- chassis-name VDX6740
- host-name LEAF4
-!
-no support autoupload enable
-line vty
- exec-timeout 10
-!
-zoning enabled-configuration cfg-name ""
-zoning enabled-configuration default-zone-access allaccess
-zoning enabled-configuration cfg-action cfg-save
-dpod 104/0/1
- reserve
-!
-dpod 104/0/2
-!
-dpod 104/0/3
-!
-dpod 104/0/4
-!
-dpod 104/0/5
-!
-dpod 104/0/6
-!
-dpod 104/0/7
-!
-dpod 104/0/8
-!
-dpod 104/0/9
-!
-dpod 104/0/10
-!
-dpod 104/0/11
-!
-dpod 104/0/12
-!
-dpod 104/0/13
-!
-dpod 104/0/14
-!
-dpod 104/0/15
-!
-dpod 104/0/16
-!
-dpod 104/0/17
-!
-dpod 104/0/18
-!
-dpod 104/0/19
-!
-dpod 104/0/20
-!
-dpod 104/0/21
-!
-dpod 104/0/22
-!
-dpod 104/0/23
-!
-dpod 104/0/24
-!
-dpod 104/0/25
-!
-dpod 104/0/26
-!
-dpod 104/0/27
-!
-dpod 104/0/28
-!
-dpod 104/0/29
-!
-dpod 104/0/30
-!
-dpod 104/0/31
-!
-dpod 104/0/32
-!
-dpod 104/0/33
-!
-dpod 104/0/34
-!
-dpod 104/0/35
-!
-dpod 104/0/36
-!
-dpod 104/0/37
-!
-dpod 104/0/38
-!
-dpod 104/0/39
-!
-dpod 104/0/40
-!
-dpod 104/0/41
-!
-dpod 104/0/42
-!
-dpod 104/0/43
-!
-dpod 104/0/44
-!
-dpod 104/0/45
-!
-dpod 104/0/46
-!
-dpod 104/0/47
-!
-dpod 104/0/48
-!
-dpod 104/0/49
-!
-dpod 104/0/50
-!
-dpod 104/0/51
-!
-dpod 104/0/52
-!
-role name admin desc Administrator
-role name user desc User
-aaa authentication login local
-aaa accounting exec default start-stop none
-aaa accounting commands default start-stop none
-service password-encryption
-username admin password "BwrsDbB+tABWGWpINOVKoQ==\n" encryption-level 7 role admin desc Administrator
-username user password "BwrsDbB+tABWGWpINOVKoQ==\n" encryption-level 7 role user desc User
-ip access-list extended test
- seq 10 permit ip host 1.1.1.1 any log
-!
-snmp-server contact "Field Support."
-snmp-server location "End User Premise."
-snmp-server sys-descr "Extreme VDX Switch."
-snmp-server enable trap
-snmp-server community private groupname admin
-snmp-server community public groupname user
-snmp-server view All 1 included
-snmp-server group admin v1 read All write All notify All
-snmp-server group public v1 read All
-snmp-server group public v2c read All
-snmp-server group user v1 read All
-snmp-server group user v2c read All
-hardware
- connector-group 104/0/1
- speed LowMixed
- !
- connector-group 104/0/3
- speed LowMixed
- !
- connector-group 104/0/5
- speed LowMixed
- !
- connector-group 104/0/6
- speed LowMixed
- !
-!
-cee-map default
- precedence 1
- priority-group-table 1 weight 40 pfc on
- priority-group-table 15.0 pfc off
- priority-group-table 15.1 pfc off
- priority-group-table 15.2 pfc off
- priority-group-table 15.3 pfc off
- priority-group-table 15.4 pfc off
- priority-group-table 15.5 pfc off
- priority-group-table 15.6 pfc off
- priority-group-table 15.7 pfc off
- priority-group-table 2 weight 60 pfc off
- priority-table 2 2 2 1 2 2 2 15.0
- remap fabric-priority priority 0
- remap lossless-priority priority 0
-!
-fcoe
- fabric-map default
- vlan 1002
- san-mode local
- priority 3
- virtual-fabric 128
- fcmap 0E:FC:00
- advertisement interval 8000
- keep-alive timeout
- !
-!
-interface Vlan 1
-!
-fabric route mcast rbridge-id 104
-!
-protocol lldp
- advertise dcbx-fcoe-app-tlv
- advertise dcbx-fcoe-logical-link-tlv
- advertise dcbx-tlv
- advertise bgp-auto-nbr-tlv
- advertise optional-tlv management-address
- advertise optional-tlv system-name
- system-description Extreme-VDX-VCS 120
-!
-vlan dot1q tag native
-port-profile UpgradedVlanProfile
- vlan-profile
- switchport
- switchport mode trunk
- switchport trunk allowed vlan all
- !
-!
-port-profile default
- vlan-profile
- switchport
- switchport mode trunk
- switchport trunk native-vlan 1
- !
-!
-port-profile-domain default
- port-profile UpgradedVlanProfile
-!
-class-map cee
-!
-class-map default
-!
-rbridge-id 104
- switch-attributes chassis-name VDX6740
- switch-attributes host-name LEAF4
- vrf mgmt-vrf
- address-family ipv4 unicast
- ip route 0.0.0.0/0 10.26.0.1
- !
- address-family ipv6 unicast
- !
- !
- system-monitor fan threshold marginal-threshold 1 down-threshold 2
- system-monitor fan alert state removed action raslog
- system-monitor power threshold marginal-threshold 1 down-threshold 2
- system-monitor power alert state removed action raslog
- system-monitor temp threshold marginal-threshold 1 down-threshold 2
- system-monitor cid-card threshold marginal-threshold 1 down-threshold 2
- system-monitor cid-card alert state none action none
- system-monitor sfp alert state none action none
- system-monitor compact-flash threshold marginal-threshold 1 down-threshold 0
- system-monitor MM threshold marginal-threshold 1 down-threshold 0
- system-monitor LineCard threshold marginal-threshold 1 down-threshold 2
- system-monitor LineCard alert state none action none
- system-monitor SFM threshold marginal-threshold 1 down-threshold 2
- resource-monitor cpu enable
- resource-monitor memory enable threshold 100 action raslog
- resource-monitor process memory enable alarm 500 critical 600
- no protocol vrrp
- no protocol vrrp-extended
- hardware-profile tcam default
- hardware-profile route-table default maximum_paths 8 openflow off
- hardware-profile kap default
- fabric neighbor-discovery
- clock timezone America/Los_Angeles
- ag
- enable
- counter reliability 25
- timeout fnm 120
- pg 0
- modes lb
- rename pg0
- !
- !
- telnet server use-vrf default-vrf
- telnet server use-vrf mgmt-vrf
- ssh server key rsa 2048
- ssh server key ecdsa 256
- ssh server key dsa
- ssh server use-vrf default-vrf
- ssh server use-vrf mgmt-vrf
- http server use-vrf default-vrf
- http server use-vrf mgmt-vrf
- fcoe
- fcoe-enodes 0
- !
-!
-interface Management 104/0
- no tcp burstrate
- ip icmp echo-reply
- no ip address dhcp
- ip address 10.26.7.226/17
- ipv6 icmpv6 echo-reply
- no ipv6 address autoconfig
- no ipv6 address dhcp
- vrf forwarding mgmt-vrf
- no shutdown
-!
-interface TenGigabitEthernet 104/0/1
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/2
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/3
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/4
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/5
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/6
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/7
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/8
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/9
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/10
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/11
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/12
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/13
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/14
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/15
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/16
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/17
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/18
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/19
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/20
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/21
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/22
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/23
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/24
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/25
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/26
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/27
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/28
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/29
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/30
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/31
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/32
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/33
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/34
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/35
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/36
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/37
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/38
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/39
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/40
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/41
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/42
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/43
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/44
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/45
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/46
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/47
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface TenGigabitEthernet 104/0/48
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface FortyGigabitEthernet 104/0/49
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface FortyGigabitEthernet 104/0/50
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface FortyGigabitEthernet 104/0/51
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
-interface FortyGigabitEthernet 104/0/52
- fabric isl enable
- fabric trunk enable
- no shutdown
-!
diff --git a/test/units/plugins/cliconf/fixtures/nos/show_version b/test/units/plugins/cliconf/fixtures/nos/show_version
deleted file mode 100644
index 1accd8191e..0000000000
--- a/test/units/plugins/cliconf/fixtures/nos/show_version
+++ /dev/null
@@ -1,17 +0,0 @@
-Network Operating System Software
-Network Operating System Version: 7.2.0
-Copyright (c) 1995-2017 Brocade Communications Systems, Inc.
-Firmware name: 7.2.0
-Build Time: 10:52:47 Jul 10, 2017
-Install Time: 01:32:03 Jan 5, 2018
-Kernel: 2.6.34.6
-
-BootProm: 1.0.1
-Control Processor: e500mc with 4096 MB of memory
-
-Slot Name Primary/Secondary Versions Status
----------------------------------------------------------------------------
-SW/0 NOS 7.2.0 ACTIVE*
- 7.2.0
-SW/1 NOS 7.2.0 STANDBY
- 7.2.0
diff --git a/test/units/plugins/cliconf/fixtures/slxos/show_chassis b/test/units/plugins/cliconf/fixtures/slxos/show_chassis
deleted file mode 100644
index 1f7f0c51b3..0000000000
--- a/test/units/plugins/cliconf/fixtures/slxos/show_chassis
+++ /dev/null
@@ -1,40 +0,0 @@
-
-Chassis Name: BR-SLX9140
-switchType: 3001
-
-FAN Unit: 1
-Time Awake: 36 days
-
-FAN Unit: 2
-Time Awake: 36 days
-
-FAN Unit: 3
-Time Awake: 36 days
-
-FAN Unit: 5
-Time Awake: 36 days
-
-FAN Unit: 6
-Time Awake: 36 days
-
-POWER SUPPLY Unit: 1
-Factory Part Num: 11-1111111-11
-Factory Serial Num: ASERIALNUMB
-Time Awake: 36 days
-
-POWER SUPPLY Unit: 2
-Factory Part Num: 11-1111111-11
-Factory Serial Num: ASERIALNUMB
-Time Awake: 36 days
-
-CHASSIS/WWN Unit: 1
-Power Consume Factor: 0
-Factory Part Num: 11-1111111-11
-Factory Serial Num: ASERIALNUMB
-Manufacture: Day: 12 Month: 1 Year: 2017
-Update: Day: 5 Month: 4 Year: 2018
-Time Alive: 277 days
-Time Awake: 36 days
-
-Airflow direction : Port side INTAKE
-
diff --git a/test/units/plugins/cliconf/fixtures/slxos/show_running-config b/test/units/plugins/cliconf/fixtures/slxos/show_running-config
deleted file mode 100644
index b2e540d97e..0000000000
--- a/test/units/plugins/cliconf/fixtures/slxos/show_running-config
+++ /dev/null
@@ -1,624 +0,0 @@
-root enable
-host-table aging-mode conversational
-clock timezone Europe/Warsaw
-hardware
- profile tcam default
- profile overlay-visibility default
- profile route-table default maximum_paths 8
- system-mode default
-!
-http server use-vrf default-vrf
-http server use-vrf mgmt-vrf
-node-id 1
-!
-ntp server 172.16.10.2 use-vrf mgmt-vrf
-!
-logging raslog console INFO
-logging syslog-server 10.1.5.11 use-vrf mgmt-vrf
-!
-logging auditlog class SECURITY
-logging auditlog class CONFIGURATION
-logging auditlog class FIRMWARE
-logging syslog-facility local LOG_LOCAL0
-logging syslog-client localip CHASSIS_IP
-switch-attributes chassis-name SLX9140-LEAF2
-switch-attributes host-name DC2LEAF2
-no support autoupload enable
-support ffdc
-resource-monitor cpu enable threshold 90 action raslog
-resource-monitor memory enable threshold 100 action raslog
-resource-monitor process memory enable alarm 1000 critical 1200
-system-monitor fan threshold marginal-threshold 1 down-threshold 2
-system-monitor fan alert state removed action raslog
-system-monitor power threshold marginal-threshold 1 down-threshold 2
-system-monitor power alert state removed action raslog
-system-monitor temp threshold marginal-threshold 1 down-threshold 2
-system-monitor cid-card threshold marginal-threshold 1 down-threshold 2
-system-monitor cid-card alert state none action none
-system-monitor compact-flash threshold marginal-threshold 1 down-threshold 0
-system-monitor MM threshold marginal-threshold 1 down-threshold 0
-system-monitor LineCard threshold marginal-threshold 1 down-threshold 2
-system-monitor LineCard alert state none action none
-system-monitor SFM threshold marginal-threshold 1 down-threshold 2
-telemetry server use-vrf mgmt-vrf
- transport tcp
- port 50051
- activate
-!
-telemetry profile system-utilization default_system_utilization_statistics
- interval 60
- add total-system-memory
- add total-used-memory
- add total-free-memory
- add cached-memory
- add buffers
- add user-free-memory
- add kernel-free-memory
- add total-swap-memory
- add total-free-swap-memory
- add total-used-swap-memory
- add user-process
- add system-process
- add niced-process
- add iowait
- add hw-interrupt
- add sw-interrupt
- add idle-state
- add steal-time
- add uptime
-!
-telemetry profile interface default_interface_statistics
- interval 30
- add out-pkts
- add in-pkts
- add out-unicast-pkts
- add in-unicast-pkts
- add out-broadcast-pkts
- add in-broadcast-pkts
- add out-multicast-pkts
- add in-multicast-pkts
- add out-pkts-per-second
- add in-pkts-per-second
- add out-bandwidth
- add in-bandwidth
- add out-octets
- add in-octets
- add out-errors
- add in-errors
- add out-crc-errors
- add in-crc-errors
- add out-discards
- add in-discards
-!
-line vty
- exec-timeout 10
-!
-threshold-monitor Buffer limit 70
-vrf mgmt-vrf
- address-family ipv4 unicast
- ip route 0.0.0.0/0 172.168.192.1
- !
- address-family ipv6 unicast
- !
-!
-ssh server key rsa 2048
-ssh server key ecdsa 256
-ssh server key dsa
-ssh server use-vrf default-vrf
-ssh server use-vrf mgmt-vrf
-telnet server use-vrf default-vrf
-telnet server use-vrf mgmt-vrf
-role name admin desc Administrator
-role name user desc User
-aaa authentication login local
-aaa accounting exec default start-stop none
-aaa accounting commands default start-stop none
-service password-encryption
-username admin password "AINTNOPARTYLIKEAHOTELPARTYCAUSEAHOTELPARTYDONTSLEEPNOONEWOULDEVERACTUALLYTYPETHISWHYAREYOUHERE\n" encryption-level 7 role admin desc Administrator
-cee-map default
- precedence 1
- priority-group-table 1 weight 40 pfc on
- priority-group-table 15.0 pfc off
- priority-group-table 15.1 pfc off
- priority-group-table 15.2 pfc off
- priority-group-table 15.3 pfc off
- priority-group-table 15.4 pfc off
- priority-group-table 15.5 pfc off
- priority-group-table 15.6 pfc off
- priority-group-table 15.7 pfc off
- priority-group-table 2 weight 60 pfc off
- priority-table 2 2 2 1 2 2 2 15.0
- remap lossless-priority priority 0
-!
-mac access-list extended M1
- seq 10 permit any any
-!
-vlan 1
- ip igmp snooping startup-query-interval 100
- ipv6 mld snooping startup-query-interval 100
-!
-vlan 100
-!
-vlan 200
-!
-vlan 1001
- router-interface Ve 1001
- description Thomas-Test-Cluster
-!
-qos map cos-mutation all-zero-map
- map cos 0 to cos 0
- map cos 1 to cos 0
- map cos 2 to cos 0
- map cos 3 to cos 0
- map cos 4 to cos 0
- map cos 5 to cos 0
- map cos 6 to cos 0
- map cos 7 to cos 0
-!
-qos map cos-mutation default
- map cos 0 to cos 0
- map cos 1 to cos 1
- map cos 2 to cos 2
- map cos 3 to cos 3
- map cos 4 to cos 4
- map cos 5 to cos 5
- map cos 6 to cos 6
- map cos 7 to cos 7
-!
-qos map cos-traffic-class all-zero-map
- map cos 0 to traffic-class 0
- map cos 1 to traffic-class 0
- map cos 2 to traffic-class 0
- map cos 3 to traffic-class 0
- map cos 4 to traffic-class 0
- map cos 5 to traffic-class 0
- map cos 6 to traffic-class 0
- map cos 7 to traffic-class 0
-!
-qos map cos-traffic-class default
- map cos 0 to traffic-class 1
- map cos 1 to traffic-class 0
- map cos 2 to traffic-class 2
- map cos 3 to traffic-class 3
- map cos 4 to traffic-class 4
- map cos 5 to traffic-class 5
- map cos 6 to traffic-class 6
- map cos 7 to traffic-class 7
-!
-qos map cos-dscp all-zero-map
- map cos 0 to dscp 0
- map cos 1 to dscp 0
- map cos 2 to dscp 0
- map cos 3 to dscp 0
- map cos 4 to dscp 0
- map cos 5 to dscp 0
- map cos 6 to dscp 0
- map cos 7 to dscp 0
-!
-qos map cos-dscp default
- map cos 0 to dscp 0
- map cos 1 to dscp 8
- map cos 2 to dscp 16
- map cos 3 to dscp 24
- map cos 4 to dscp 32
- map cos 5 to dscp 40
- map cos 6 to dscp 48
- map cos 7 to dscp 56
-!
-qos map traffic-class-cos all-zero-map
- map traffic-class 0 to cos 0
- map traffic-class 1 to cos 0
- map traffic-class 2 to cos 0
- map traffic-class 3 to cos 0
- map traffic-class 4 to cos 0
- map traffic-class 5 to cos 0
- map traffic-class 6 to cos 0
- map traffic-class 7 to cos 0
-!
-qos map traffic-class-cos default
- map traffic-class 0 to cos 0
- map traffic-class 1 to cos 1
- map traffic-class 2 to cos 2
- map traffic-class 3 to cos 3
- map traffic-class 4 to cos 4
- map traffic-class 5 to cos 5
- map traffic-class 6 to cos 6
- map traffic-class 7 to cos 7
-!
-qos map traffic-class-mutation all-zero-map
- map traffic-class 0 to traffic-class 0
- map traffic-class 1 to traffic-class 0
- map traffic-class 2 to traffic-class 0
- map traffic-class 3 to traffic-class 0
- map traffic-class 4 to traffic-class 0
- map traffic-class 5 to traffic-class 0
- map traffic-class 6 to traffic-class 0
- map traffic-class 7 to traffic-class 0
-!
-qos map traffic-class-mutation default
- map traffic-class 0 to traffic-class 0
- map traffic-class 1 to traffic-class 1
- map traffic-class 2 to traffic-class 2
- map traffic-class 3 to traffic-class 3
- map traffic-class 4 to traffic-class 4
- map traffic-class 5 to traffic-class 5
- map traffic-class 6 to traffic-class 6
- map traffic-class 7 to traffic-class 7
-!
-qos map traffic-class-dscp all-zero-map
- map traffic-class 0 to dscp 0
- map traffic-class 1 to dscp 0
- map traffic-class 2 to dscp 0
- map traffic-class 3 to dscp 0
- map traffic-class 4 to dscp 0
- map traffic-class 5 to dscp 0
- map traffic-class 6 to dscp 0
- map traffic-class 7 to dscp 0
-!
-qos map traffic-class-dscp default
- map traffic-class 0 to dscp 0
- map traffic-class 1 to dscp 8
- map traffic-class 2 to dscp 16
- map traffic-class 3 to dscp 24
- map traffic-class 4 to dscp 32
- map traffic-class 5 to dscp 40
- map traffic-class 6 to dscp 48
- map traffic-class 7 to dscp 56
-!
-qos map dscp-mutation all-zero-map
- map dscp 0-63 to dscp 0
-!
-qos map dscp-mutation default
- map dscp 0 to dscp 0
- map dscp 1 to dscp 1
- map dscp 10 to dscp 10
- map dscp 11 to dscp 11
- map dscp 12 to dscp 12
- map dscp 13 to dscp 13
- map dscp 14 to dscp 14
- map dscp 15 to dscp 15
- map dscp 16 to dscp 16
- map dscp 17 to dscp 17
- map dscp 18 to dscp 18
- map dscp 19 to dscp 19
- map dscp 2 to dscp 2
- map dscp 20 to dscp 20
- map dscp 21 to dscp 21
- map dscp 22 to dscp 22
- map dscp 23 to dscp 23
- map dscp 24 to dscp 24
- map dscp 25 to dscp 25
- map dscp 26 to dscp 26
- map dscp 27 to dscp 27
- map dscp 28 to dscp 28
- map dscp 29 to dscp 29
- map dscp 3 to dscp 3
- map dscp 30 to dscp 30
- map dscp 31 to dscp 31
- map dscp 32 to dscp 32
- map dscp 33 to dscp 33
- map dscp 34 to dscp 34
- map dscp 35 to dscp 35
- map dscp 36 to dscp 36
- map dscp 37 to dscp 37
- map dscp 38 to dscp 38
- map dscp 39 to dscp 39
- map dscp 4 to dscp 4
- map dscp 40 to dscp 40
- map dscp 41 to dscp 41
- map dscp 42 to dscp 42
- map dscp 43 to dscp 43
- map dscp 44 to dscp 44
- map dscp 45 to dscp 45
- map dscp 46 to dscp 46
- map dscp 47 to dscp 47
- map dscp 48 to dscp 48
- map dscp 49 to dscp 49
- map dscp 5 to dscp 5
- map dscp 50 to dscp 50
- map dscp 51 to dscp 51
- map dscp 52 to dscp 52
- map dscp 53 to dscp 53
- map dscp 54 to dscp 54
- map dscp 55 to dscp 55
- map dscp 56 to dscp 56
- map dscp 57 to dscp 57
- map dscp 58 to dscp 58
- map dscp 59 to dscp 59
- map dscp 6 to dscp 6
- map dscp 60 to dscp 60
- map dscp 61 to dscp 61
- map dscp 62 to dscp 62
- map dscp 63 to dscp 63
- map dscp 7 to dscp 7
- map dscp 8 to dscp 8
- map dscp 9 to dscp 9
-!
-qos map dscp-traffic-class all-zero-map
- map dscp 0-63 to traffic-class 0
-!
-qos map dscp-traffic-class default
- map dscp 0-7 to traffic-class 0
- map dscp 16-23 to traffic-class 2
- map dscp 24-31 to traffic-class 3
- map dscp 32-39 to traffic-class 4
- map dscp 40-47 to traffic-class 5
- map dscp 48-55 to traffic-class 6
- map dscp 56-63 to traffic-class 7
- map dscp 8-15 to traffic-class 1
-!
-qos map dscp-cos all-zero-map
- map dscp 0-63 to cos 0
-!
-qos map dscp-cos default
- map dscp 0-7 to cos 0
- map dscp 16-23 to cos 2
- map dscp 24-31 to cos 3
- map dscp 32-39 to cos 4
- map dscp 40-47 to cos 5
- map dscp 48-55 to cos 6
- map dscp 56-63 to cos 7
- map dscp 8-15 to cos 1
-!
-protocol lldp
- advertise optional-tlv management-address
- system-description Brocade BR-SLX9140 Router
-!
-vlan dot1q tag native
-police-remark-profile default
-!
-class-map BD-100
-!
-class-map C1
- match access-group M1
-!
-class-map cee
-!
-class-map default
-!
-policy-map P1
- class C1
- police cir 1000000
- !
-!
-policy-map P2
- class default
- police cir 12121212
- !
-!
-no protocol vrrp
-no protocol vrrp-extended
-router bgp
- local-as 65301
- capability as4-enable
- bfd interval 300 min-rx 300 multiplier 3
- neighbor leaf_group peer-group
- neighbor leaf_group remote-as 65500
- neighbor leaf_group bfd
- neighbor 10.220.4.3 remote-as 65500
- neighbor 10.220.4.3 peer-group leaf_group
- address-family ipv4 unicast
- network 172.32.252.5/32
- maximum-paths 8
- !
- address-family ipv6 unicast
- !
- address-family l2vpn evpn
- !
-!
-interface Loopback 1
- ip address 172.16.128.6/32
- no shutdown
-!
-interface Loopback 2
- ip address 172.16.129.5/32
- no shutdown
-!
-interface Management 0
- no tcp burstrate
- no shutdown
- vrf forwarding mgmt-vrf
- ip address dhcp
-!
-interface Ethernet 0/1
- speed 25000
- fec mode disabled
- switchport
- switchport mode access
- switchport access vlan 1
- no shutdown
-!
-interface Ethernet 0/2
- no shutdown
-!
-interface Ethernet 0/3
- speed 25000
- fec mode RS-FEC
- no shutdown
-!
-interface Ethernet 0/4
- shutdown
-!
-interface Ethernet 0/5
- service-policy in P1
- no shutdown
-!
-interface Ethernet 0/6
- mtu 1548
- description L2 Interface
- no shutdown
-!
-interface Ethernet 0/7
- mtu 1548
- description L2 Interface
- no shutdown
-!
-interface Ethernet 0/8
- switchport
- switchport mode trunk
- switchport trunk allowed vlan add 100,200
- switchport trunk tag native-vlan
- shutdown
-!
-interface Ethernet 0/9
- shutdown
-!
-interface Ethernet 0/10
- no shutdown
-!
-interface Ethernet 0/11
- no shutdown
-!
-interface Ethernet 0/12
- no shutdown
-!
-interface Ethernet 0/13
- no shutdown
-!
-interface Ethernet 0/14
- no shutdown
-!
-interface Ethernet 0/15
- shutdown
-!
-interface Ethernet 0/16
- shutdown
-!
-interface Ethernet 0/17
- shutdown
-!
-interface Ethernet 0/18
- shutdown
-!
-interface Ethernet 0/19
- shutdown
-!
-interface Ethernet 0/20
- shutdown
-!
-interface Ethernet 0/21
- shutdown
-!
-interface Ethernet 0/22
- shutdown
-!
-interface Ethernet 0/23
- shutdown
-!
-interface Ethernet 0/24
- shutdown
-!
-interface Ethernet 0/25
- shutdown
-!
-interface Ethernet 0/26
- shutdown
-!
-interface Ethernet 0/27
- shutdown
-!
-interface Ethernet 0/28
- shutdown
-!
-interface Ethernet 0/29
- shutdown
-!
-interface Ethernet 0/30
- shutdown
-!
-interface Ethernet 0/31
- shutdown
-!
-interface Ethernet 0/32
- shutdown
-!
-interface Ethernet 0/33
- shutdown
-!
-interface Ethernet 0/34
- shutdown
-!
-interface Ethernet 0/35
- shutdown
-!
-interface Ethernet 0/36
- shutdown
-!
-interface Ethernet 0/37
- shutdown
-!
-interface Ethernet 0/38
- shutdown
-!
-interface Ethernet 0/39
- shutdown
-!
-interface Ethernet 0/40
- shutdown
-!
-interface Ethernet 0/41
- shutdown
-!
-interface Ethernet 0/42
- shutdown
-!
-interface Ethernet 0/43
- shutdown
-!
-interface Ethernet 0/44
- shutdown
-!
-interface Ethernet 0/45
- shutdown
-!
-interface Ethernet 0/46
- shutdown
-!
-interface Ethernet 0/47
- shutdown
-!
-interface Ethernet 0/48
- shutdown
-!
-interface Ethernet 0/49
- shutdown
-!
-interface Ethernet 0/50
- fec mode RS-FEC
- no shutdown
-!
-interface Ethernet 0/51
- fec mode RS-FEC
- no shutdown
-!
-interface Ethernet 0/52
- fec mode RS-FEC
- no shutdown
-!
-interface Ethernet 0/53
- fec mode RS-FEC
- no shutdown
-!
-interface Ethernet 0/54
- fec mode disabled
- no shutdown
-!
-interface Port-channel 200
- switchport
- switchport mode access
- switchport access vlan 200
- shutdown
-!
-interface Port-channel 1024
- insight enable
- no shutdown
-!
-monitor session 1
- source ethernet 0/1 destination port-channel 1024 direction both
-!
-monitor session 2
-!
-bridge-domain 100 p2mp
-!
-cluster MCT1 1
-!
diff --git a/test/units/plugins/cliconf/fixtures/slxos/show_startup-config b/test/units/plugins/cliconf/fixtures/slxos/show_startup-config
deleted file mode 100644
index b2e540d97e..0000000000
--- a/test/units/plugins/cliconf/fixtures/slxos/show_startup-config
+++ /dev/null
@@ -1,624 +0,0 @@
-root enable
-host-table aging-mode conversational
-clock timezone Europe/Warsaw
-hardware
- profile tcam default
- profile overlay-visibility default
- profile route-table default maximum_paths 8
- system-mode default
-!
-http server use-vrf default-vrf
-http server use-vrf mgmt-vrf
-node-id 1
-!
-ntp server 172.16.10.2 use-vrf mgmt-vrf
-!
-logging raslog console INFO
-logging syslog-server 10.1.5.11 use-vrf mgmt-vrf
-!
-logging auditlog class SECURITY
-logging auditlog class CONFIGURATION
-logging auditlog class FIRMWARE
-logging syslog-facility local LOG_LOCAL0
-logging syslog-client localip CHASSIS_IP
-switch-attributes chassis-name SLX9140-LEAF2
-switch-attributes host-name DC2LEAF2
-no support autoupload enable
-support ffdc
-resource-monitor cpu enable threshold 90 action raslog
-resource-monitor memory enable threshold 100 action raslog
-resource-monitor process memory enable alarm 1000 critical 1200
-system-monitor fan threshold marginal-threshold 1 down-threshold 2
-system-monitor fan alert state removed action raslog
-system-monitor power threshold marginal-threshold 1 down-threshold 2
-system-monitor power alert state removed action raslog
-system-monitor temp threshold marginal-threshold 1 down-threshold 2
-system-monitor cid-card threshold marginal-threshold 1 down-threshold 2
-system-monitor cid-card alert state none action none
-system-monitor compact-flash threshold marginal-threshold 1 down-threshold 0
-system-monitor MM threshold marginal-threshold 1 down-threshold 0
-system-monitor LineCard threshold marginal-threshold 1 down-threshold 2
-system-monitor LineCard alert state none action none
-system-monitor SFM threshold marginal-threshold 1 down-threshold 2
-telemetry server use-vrf mgmt-vrf
- transport tcp
- port 50051
- activate
-!
-telemetry profile system-utilization default_system_utilization_statistics
- interval 60
- add total-system-memory
- add total-used-memory
- add total-free-memory
- add cached-memory
- add buffers
- add user-free-memory
- add kernel-free-memory
- add total-swap-memory
- add total-free-swap-memory
- add total-used-swap-memory
- add user-process
- add system-process
- add niced-process
- add iowait
- add hw-interrupt
- add sw-interrupt
- add idle-state
- add steal-time
- add uptime
-!
-telemetry profile interface default_interface_statistics
- interval 30
- add out-pkts
- add in-pkts
- add out-unicast-pkts
- add in-unicast-pkts
- add out-broadcast-pkts
- add in-broadcast-pkts
- add out-multicast-pkts
- add in-multicast-pkts
- add out-pkts-per-second
- add in-pkts-per-second
- add out-bandwidth
- add in-bandwidth
- add out-octets
- add in-octets
- add out-errors
- add in-errors
- add out-crc-errors
- add in-crc-errors
- add out-discards
- add in-discards
-!
-line vty
- exec-timeout 10
-!
-threshold-monitor Buffer limit 70
-vrf mgmt-vrf
- address-family ipv4 unicast
- ip route 0.0.0.0/0 172.168.192.1
- !
- address-family ipv6 unicast
- !
-!
-ssh server key rsa 2048
-ssh server key ecdsa 256
-ssh server key dsa
-ssh server use-vrf default-vrf
-ssh server use-vrf mgmt-vrf
-telnet server use-vrf default-vrf
-telnet server use-vrf mgmt-vrf
-role name admin desc Administrator
-role name user desc User
-aaa authentication login local
-aaa accounting exec default start-stop none
-aaa accounting commands default start-stop none
-service password-encryption
-username admin password "AINTNOPARTYLIKEAHOTELPARTYCAUSEAHOTELPARTYDONTSLEEPNOONEWOULDEVERACTUALLYTYPETHISWHYAREYOUHERE\n" encryption-level 7 role admin desc Administrator
-cee-map default
- precedence 1
- priority-group-table 1 weight 40 pfc on
- priority-group-table 15.0 pfc off
- priority-group-table 15.1 pfc off
- priority-group-table 15.2 pfc off
- priority-group-table 15.3 pfc off
- priority-group-table 15.4 pfc off
- priority-group-table 15.5 pfc off
- priority-group-table 15.6 pfc off
- priority-group-table 15.7 pfc off
- priority-group-table 2 weight 60 pfc off
- priority-table 2 2 2 1 2 2 2 15.0
- remap lossless-priority priority 0
-!
-mac access-list extended M1
- seq 10 permit any any
-!
-vlan 1
- ip igmp snooping startup-query-interval 100
- ipv6 mld snooping startup-query-interval 100
-!
-vlan 100
-!
-vlan 200
-!
-vlan 1001
- router-interface Ve 1001
- description Thomas-Test-Cluster
-!
-qos map cos-mutation all-zero-map
- map cos 0 to cos 0
- map cos 1 to cos 0
- map cos 2 to cos 0
- map cos 3 to cos 0
- map cos 4 to cos 0
- map cos 5 to cos 0
- map cos 6 to cos 0
- map cos 7 to cos 0
-!
-qos map cos-mutation default
- map cos 0 to cos 0
- map cos 1 to cos 1
- map cos 2 to cos 2
- map cos 3 to cos 3
- map cos 4 to cos 4
- map cos 5 to cos 5
- map cos 6 to cos 6
- map cos 7 to cos 7
-!
-qos map cos-traffic-class all-zero-map
- map cos 0 to traffic-class 0
- map cos 1 to traffic-class 0
- map cos 2 to traffic-class 0
- map cos 3 to traffic-class 0
- map cos 4 to traffic-class 0
- map cos 5 to traffic-class 0
- map cos 6 to traffic-class 0
- map cos 7 to traffic-class 0
-!
-qos map cos-traffic-class default
- map cos 0 to traffic-class 1
- map cos 1 to traffic-class 0
- map cos 2 to traffic-class 2
- map cos 3 to traffic-class 3
- map cos 4 to traffic-class 4
- map cos 5 to traffic-class 5
- map cos 6 to traffic-class 6
- map cos 7 to traffic-class 7
-!
-qos map cos-dscp all-zero-map
- map cos 0 to dscp 0
- map cos 1 to dscp 0
- map cos 2 to dscp 0
- map cos 3 to dscp 0
- map cos 4 to dscp 0
- map cos 5 to dscp 0
- map cos 6 to dscp 0
- map cos 7 to dscp 0
-!
-qos map cos-dscp default
- map cos 0 to dscp 0
- map cos 1 to dscp 8
- map cos 2 to dscp 16
- map cos 3 to dscp 24
- map cos 4 to dscp 32
- map cos 5 to dscp 40
- map cos 6 to dscp 48
- map cos 7 to dscp 56
-!
-qos map traffic-class-cos all-zero-map
- map traffic-class 0 to cos 0
- map traffic-class 1 to cos 0
- map traffic-class 2 to cos 0
- map traffic-class 3 to cos 0
- map traffic-class 4 to cos 0
- map traffic-class 5 to cos 0
- map traffic-class 6 to cos 0
- map traffic-class 7 to cos 0
-!
-qos map traffic-class-cos default
- map traffic-class 0 to cos 0
- map traffic-class 1 to cos 1
- map traffic-class 2 to cos 2
- map traffic-class 3 to cos 3
- map traffic-class 4 to cos 4
- map traffic-class 5 to cos 5
- map traffic-class 6 to cos 6
- map traffic-class 7 to cos 7
-!
-qos map traffic-class-mutation all-zero-map
- map traffic-class 0 to traffic-class 0
- map traffic-class 1 to traffic-class 0
- map traffic-class 2 to traffic-class 0
- map traffic-class 3 to traffic-class 0
- map traffic-class 4 to traffic-class 0
- map traffic-class 5 to traffic-class 0
- map traffic-class 6 to traffic-class 0
- map traffic-class 7 to traffic-class 0
-!
-qos map traffic-class-mutation default
- map traffic-class 0 to traffic-class 0
- map traffic-class 1 to traffic-class 1
- map traffic-class 2 to traffic-class 2
- map traffic-class 3 to traffic-class 3
- map traffic-class 4 to traffic-class 4
- map traffic-class 5 to traffic-class 5
- map traffic-class 6 to traffic-class 6
- map traffic-class 7 to traffic-class 7
-!
-qos map traffic-class-dscp all-zero-map
- map traffic-class 0 to dscp 0
- map traffic-class 1 to dscp 0
- map traffic-class 2 to dscp 0
- map traffic-class 3 to dscp 0
- map traffic-class 4 to dscp 0
- map traffic-class 5 to dscp 0
- map traffic-class 6 to dscp 0
- map traffic-class 7 to dscp 0
-!
-qos map traffic-class-dscp default
- map traffic-class 0 to dscp 0
- map traffic-class 1 to dscp 8
- map traffic-class 2 to dscp 16
- map traffic-class 3 to dscp 24
- map traffic-class 4 to dscp 32
- map traffic-class 5 to dscp 40
- map traffic-class 6 to dscp 48
- map traffic-class 7 to dscp 56
-!
-qos map dscp-mutation all-zero-map
- map dscp 0-63 to dscp 0
-!
-qos map dscp-mutation default
- map dscp 0 to dscp 0
- map dscp 1 to dscp 1
- map dscp 10 to dscp 10
- map dscp 11 to dscp 11
- map dscp 12 to dscp 12
- map dscp 13 to dscp 13
- map dscp 14 to dscp 14
- map dscp 15 to dscp 15
- map dscp 16 to dscp 16
- map dscp 17 to dscp 17
- map dscp 18 to dscp 18
- map dscp 19 to dscp 19
- map dscp 2 to dscp 2
- map dscp 20 to dscp 20
- map dscp 21 to dscp 21
- map dscp 22 to dscp 22
- map dscp 23 to dscp 23
- map dscp 24 to dscp 24
- map dscp 25 to dscp 25
- map dscp 26 to dscp 26
- map dscp 27 to dscp 27
- map dscp 28 to dscp 28
- map dscp 29 to dscp 29
- map dscp 3 to dscp 3
- map dscp 30 to dscp 30
- map dscp 31 to dscp 31
- map dscp 32 to dscp 32
- map dscp 33 to dscp 33
- map dscp 34 to dscp 34
- map dscp 35 to dscp 35
- map dscp 36 to dscp 36
- map dscp 37 to dscp 37
- map dscp 38 to dscp 38
- map dscp 39 to dscp 39
- map dscp 4 to dscp 4
- map dscp 40 to dscp 40
- map dscp 41 to dscp 41
- map dscp 42 to dscp 42
- map dscp 43 to dscp 43
- map dscp 44 to dscp 44
- map dscp 45 to dscp 45
- map dscp 46 to dscp 46
- map dscp 47 to dscp 47
- map dscp 48 to dscp 48
- map dscp 49 to dscp 49
- map dscp 5 to dscp 5
- map dscp 50 to dscp 50
- map dscp 51 to dscp 51
- map dscp 52 to dscp 52
- map dscp 53 to dscp 53
- map dscp 54 to dscp 54
- map dscp 55 to dscp 55
- map dscp 56 to dscp 56
- map dscp 57 to dscp 57
- map dscp 58 to dscp 58
- map dscp 59 to dscp 59
- map dscp 6 to dscp 6
- map dscp 60 to dscp 60
- map dscp 61 to dscp 61
- map dscp 62 to dscp 62
- map dscp 63 to dscp 63
- map dscp 7 to dscp 7
- map dscp 8 to dscp 8
- map dscp 9 to dscp 9
-!
-qos map dscp-traffic-class all-zero-map
- map dscp 0-63 to traffic-class 0
-!
-qos map dscp-traffic-class default
- map dscp 0-7 to traffic-class 0
- map dscp 16-23 to traffic-class 2
- map dscp 24-31 to traffic-class 3
- map dscp 32-39 to traffic-class 4
- map dscp 40-47 to traffic-class 5
- map dscp 48-55 to traffic-class 6
- map dscp 56-63 to traffic-class 7
- map dscp 8-15 to traffic-class 1
-!
-qos map dscp-cos all-zero-map
- map dscp 0-63 to cos 0
-!
-qos map dscp-cos default
- map dscp 0-7 to cos 0
- map dscp 16-23 to cos 2
- map dscp 24-31 to cos 3
- map dscp 32-39 to cos 4
- map dscp 40-47 to cos 5
- map dscp 48-55 to cos 6
- map dscp 56-63 to cos 7
- map dscp 8-15 to cos 1
-!
-protocol lldp
- advertise optional-tlv management-address
- system-description Brocade BR-SLX9140 Router
-!
-vlan dot1q tag native
-police-remark-profile default
-!
-class-map BD-100
-!
-class-map C1
- match access-group M1
-!
-class-map cee
-!
-class-map default
-!
-policy-map P1
- class C1
- police cir 1000000
- !
-!
-policy-map P2
- class default
- police cir 12121212
- !
-!
-no protocol vrrp
-no protocol vrrp-extended
-router bgp
- local-as 65301
- capability as4-enable
- bfd interval 300 min-rx 300 multiplier 3
- neighbor leaf_group peer-group
- neighbor leaf_group remote-as 65500
- neighbor leaf_group bfd
- neighbor 10.220.4.3 remote-as 65500
- neighbor 10.220.4.3 peer-group leaf_group
- address-family ipv4 unicast
- network 172.32.252.5/32
- maximum-paths 8
- !
- address-family ipv6 unicast
- !
- address-family l2vpn evpn
- !
-!
-interface Loopback 1
- ip address 172.16.128.6/32
- no shutdown
-!
-interface Loopback 2
- ip address 172.16.129.5/32
- no shutdown
-!
-interface Management 0
- no tcp burstrate
- no shutdown
- vrf forwarding mgmt-vrf
- ip address dhcp
-!
-interface Ethernet 0/1
- speed 25000
- fec mode disabled
- switchport
- switchport mode access
- switchport access vlan 1
- no shutdown
-!
-interface Ethernet 0/2
- no shutdown
-!
-interface Ethernet 0/3
- speed 25000
- fec mode RS-FEC
- no shutdown
-!
-interface Ethernet 0/4
- shutdown
-!
-interface Ethernet 0/5
- service-policy in P1
- no shutdown
-!
-interface Ethernet 0/6
- mtu 1548
- description L2 Interface
- no shutdown
-!
-interface Ethernet 0/7
- mtu 1548
- description L2 Interface
- no shutdown
-!
-interface Ethernet 0/8
- switchport
- switchport mode trunk
- switchport trunk allowed vlan add 100,200
- switchport trunk tag native-vlan
- shutdown
-!
-interface Ethernet 0/9
- shutdown
-!
-interface Ethernet 0/10
- no shutdown
-!
-interface Ethernet 0/11
- no shutdown
-!
-interface Ethernet 0/12
- no shutdown
-!
-interface Ethernet 0/13
- no shutdown
-!
-interface Ethernet 0/14
- no shutdown
-!
-interface Ethernet 0/15
- shutdown
-!
-interface Ethernet 0/16
- shutdown
-!
-interface Ethernet 0/17
- shutdown
-!
-interface Ethernet 0/18
- shutdown
-!
-interface Ethernet 0/19
- shutdown
-!
-interface Ethernet 0/20
- shutdown
-!
-interface Ethernet 0/21
- shutdown
-!
-interface Ethernet 0/22
- shutdown
-!
-interface Ethernet 0/23
- shutdown
-!
-interface Ethernet 0/24
- shutdown
-!
-interface Ethernet 0/25
- shutdown
-!
-interface Ethernet 0/26
- shutdown
-!
-interface Ethernet 0/27
- shutdown
-!
-interface Ethernet 0/28
- shutdown
-!
-interface Ethernet 0/29
- shutdown
-!
-interface Ethernet 0/30
- shutdown
-!
-interface Ethernet 0/31
- shutdown
-!
-interface Ethernet 0/32
- shutdown
-!
-interface Ethernet 0/33
- shutdown
-!
-interface Ethernet 0/34
- shutdown
-!
-interface Ethernet 0/35
- shutdown
-!
-interface Ethernet 0/36
- shutdown
-!
-interface Ethernet 0/37
- shutdown
-!
-interface Ethernet 0/38
- shutdown
-!
-interface Ethernet 0/39
- shutdown
-!
-interface Ethernet 0/40
- shutdown
-!
-interface Ethernet 0/41
- shutdown
-!
-interface Ethernet 0/42
- shutdown
-!
-interface Ethernet 0/43
- shutdown
-!
-interface Ethernet 0/44
- shutdown
-!
-interface Ethernet 0/45
- shutdown
-!
-interface Ethernet 0/46
- shutdown
-!
-interface Ethernet 0/47
- shutdown
-!
-interface Ethernet 0/48
- shutdown
-!
-interface Ethernet 0/49
- shutdown
-!
-interface Ethernet 0/50
- fec mode RS-FEC
- no shutdown
-!
-interface Ethernet 0/51
- fec mode RS-FEC
- no shutdown
-!
-interface Ethernet 0/52
- fec mode RS-FEC
- no shutdown
-!
-interface Ethernet 0/53
- fec mode RS-FEC
- no shutdown
-!
-interface Ethernet 0/54
- fec mode disabled
- no shutdown
-!
-interface Port-channel 200
- switchport
- switchport mode access
- switchport access vlan 200
- shutdown
-!
-interface Port-channel 1024
- insight enable
- no shutdown
-!
-monitor session 1
- source ethernet 0/1 destination port-channel 1024 direction both
-!
-monitor session 2
-!
-bridge-domain 100 p2mp
-!
-cluster MCT1 1
-!
diff --git a/test/units/plugins/cliconf/fixtures/slxos/show_version b/test/units/plugins/cliconf/fixtures/slxos/show_version
deleted file mode 100644
index 0d648378ac..0000000000
--- a/test/units/plugins/cliconf/fixtures/slxos/show_version
+++ /dev/null
@@ -1,18 +0,0 @@
-SLX-OS Operating System Software
-SLX-OS Operating System Version: 17s.1.02
-Copyright (c) 1995-2018 Brocade Communications Systems, Inc.
-Firmware name: 17s.1.02
-Build Time: 00:06:59 Sep 28, 2017
-Install Time: 15:58:29 Feb 9, 2018
-Kernel: 2.6.34.6
-Host Version: Ubuntu 14.04 LTS
-Host Kernel: Linux 3.14.17
-
-Control Processor: QEMU Virtual CPU version 2.0.0
-
-System Uptime: 34days 4hrs 41mins 53secs
-
-Slot Name Primary/Secondary Versions Status
----------------------------------------------------------------------------
-SW/0 SLX-OS 17s.1.02 ACTIVE*
- 17s.1.02
diff --git a/test/units/plugins/cliconf/test_ios.py b/test/units/plugins/cliconf/test_ios.py
deleted file mode 100644
index 44650b84b8..0000000000
--- a/test/units/plugins/cliconf/test_ios.py
+++ /dev/null
@@ -1,133 +0,0 @@
-#
-# (c) 2019 Red Hat Inc.
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-#
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from os import path
-import json
-
-from mock import MagicMock
-
-from units.compat import unittest
-from ansible.plugins.cliconf import ios
-from ansible.module_utils._text import to_bytes
-
-
-b_FIXTURE_DIR = b'%s/fixtures/ios' % (
- to_bytes(path.dirname(path.abspath(__file__)), errors='surrogate_or_strict')
-)
-
-
-def _connection_side_effect(*args, **kwargs):
- try:
- if args:
- value = args[0]
- else:
- value = kwargs.get('command')
-
- fixture_path = path.abspath(
- b'%s/%s' % (b_FIXTURE_DIR, b'_'.join(value.split(b' ')))
- )
- with open(fixture_path, 'rb') as file_desc:
- return file_desc.read()
- except (OSError, IOError):
- if args:
- value = args[0]
- return value
- elif kwargs.get('command'):
- value = kwargs.get('command')
- return value
-
- return 'Nope'
-
-
-class TestPluginCLIConfIOS(unittest.TestCase):
- """ Test class for IOS CLI Conf Methods
- """
- def setUp(self):
- self._mock_connection = MagicMock()
- self._mock_connection.send.side_effect = _connection_side_effect
- self._cliconf = ios.Cliconf(self._mock_connection)
- self.maxDiff = None
-
- def tearDown(self):
- pass
-
- def test_get_device_info(self):
- """ Test get_device_info
- """
- device_info = self._cliconf.get_device_info()
-
- mock_device_info = {'network_os': 'ios',
- 'network_os_model': 'CSR1000V',
- 'network_os_version': '16.06.01',
- 'network_os_hostname': 'an-csr-01',
- 'network_os_image': 'bootflash:packages.conf'
- }
-
- self.assertEqual(device_info, mock_device_info)
-
- def test_get_capabilities(self):
- """ Test get_capabilities
- """
- capabilities = json.loads(self._cliconf.get_capabilities())
- mock_capabilities = {
- 'network_api': 'cliconf',
- 'rpc': [
- 'get_config',
- 'edit_config',
- 'get_capabilities',
- 'get',
- 'enable_response_logging',
- 'disable_response_logging',
- 'edit_banner',
- 'get_diff',
- 'run_commands',
- 'get_defaults_flag'
- ],
- 'device_operations': {
- 'supports_diff_replace': True,
- 'supports_commit': False,
- 'supports_rollback': False,
- 'supports_defaults': True,
- 'supports_onbox_diff': False,
- 'supports_commit_comment': False,
- 'supports_multiline_delimiter': True,
- 'supports_diff_match': True,
- 'supports_diff_ignore_lines': True,
- 'supports_generate_diff': True,
- 'supports_replace': False
- },
- 'device_info': {
- 'network_os_hostname': 'an-csr-01',
- 'network_os_image': 'bootflash:packages.conf',
- 'network_os_model': 'CSR1000V',
- 'network_os_version': '16.06.01',
- 'network_os': 'ios'
- },
- 'format': ['text'],
- 'diff_match': ['line', 'strict', 'exact', 'none'],
- 'diff_replace': ['line', 'block'],
- 'output': []
- }
-
- self.assertEqual(
- mock_capabilities,
- capabilities
- )